Bug 516687 - [SysML 1.1] Move SysML 1.1 to an independent repository
- copy the code from Papyrus core repository
- change the build to follow maven convention
- fix or Ignore tests that weren't executed by the master build
- fix dependencies problem in tests plugins
Change-Id: I4639fd584ecb79e29240a71ae502bdd05f725442
diff --git a/features/.project b/features/.project
new file mode 100755
index 0000000..7203751
--- /dev/null
+++ b/features/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>features</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>
+ </natures>
+</projectDescription>
diff --git a/features/.settings/org.eclipse.core.resources.prefs b/features/.settings/org.eclipse.core.resources.prefs
new file mode 100755
index 0000000..99f26c0
--- /dev/null
+++ b/features/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/features/org.eclipse.papyrus.sysml.architecture.feature/.project b/features/org.eclipse.papyrus.sysml.architecture.feature/.project
new file mode 100755
index 0000000..45c3369
--- /dev/null
+++ b/features/org.eclipse.papyrus.sysml.architecture.feature/.project
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.sysml.architecture.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.oomph.version.VersionBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>check.maven.pom</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>ignore.lower.bound.dependency.ranges</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>release.path</key>
+ <value>/org.eclipse.papyrus.releng.main.release/release.xml</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ <nature>org.eclipse.oomph.version.VersionNature</nature>
+ </natures>
+</projectDescription>
diff --git a/features/org.eclipse.papyrus.sysml.architecture.feature/build.properties b/features/org.eclipse.papyrus.sysml.architecture.feature/build.properties
new file mode 100755
index 0000000..cff2bd5
--- /dev/null
+++ b/features/org.eclipse.papyrus.sysml.architecture.feature/build.properties
@@ -0,0 +1,6 @@
+bin.includes = feature.xml,\
+ epl-v10.html,\
+ license.html,\
+ feature.properties
+src.includes = epl-v10.html,\
+ license.html
diff --git a/features/org.eclipse.papyrus.sysml.architecture.feature/epl-v10.html b/features/org.eclipse.papyrus.sysml.architecture.feature/epl-v10.html
new file mode 100755
index 0000000..cb1073a
--- /dev/null
+++ b/features/org.eclipse.papyrus.sysml.architecture.feature/epl-v10.html
@@ -0,0 +1,304 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html xmlns:o="urn:schemas-microsoft-com:office:office"
+xmlns:w="urn:schemas-microsoft-com:office:word"
+xmlns="http://www.w3.org/TR/REC-html40">
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel=File-List
+href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+
+ }
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head>
+
+<body lang="EN-US" style='tab-interval:.5in'>
+
+<div class=Section1>
+
+<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>"Contribution" means:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear=left>
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+changes to the Program, and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+additions to the Program;</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style='font-size:10.0pt'>"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style='font-size:10.0pt'>"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span
+style='color:red'> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+its license agreement:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
+
+<p><span style='font-size:10.0pt'>When the Program is made available in source
+code form:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it must be made available under this Agreement; and </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style='font-size:10.0pt'>Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style='font-size:10.0pt'>For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
+
+<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class=MsoNormal></p>
+
+</div>
+
+</body>
+
+</html>
\ No newline at end of file
diff --git a/features/org.eclipse.papyrus.sysml.architecture.feature/feature.properties b/features/org.eclipse.papyrus.sysml.architecture.feature/feature.properties
new file mode 100755
index 0000000..fd8b5f3
--- /dev/null
+++ b/features/org.eclipse.papyrus.sysml.architecture.feature/feature.properties
@@ -0,0 +1,138 @@
+# NLS_MESSAGEFORMAT_VAR
+
+# "featureName" property - name of the feature
+featureName=Papyrus SysML architecture
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse Modeling Project
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+Eclipse Foundation Software User Agreement\n\
+April 9, 2014\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the\n\
+Eclipse Foundation is provided to you under the terms and conditions of\n\
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
+provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse Foundation source code\n\
+repository ("Repository") in software modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+\t- Content may be structured and packaged into modules to facilitate delivering,\n\
+\t extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+\t plug-in fragments ("Fragments"), and features ("Features").\n\
+\t- Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
+\t in a directory named "plugins".\n\
+\t- A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+\t Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+\t Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+\t numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+\t- Features may also include other Features ("Included Features"). Within a Feature, files\n\
+\t named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+\t- The top-level (root) directory\n\
+\t- Plug-in and Fragment directories\n\
+\t- Inside Plug-ins and Fragments packaged as JARs\n\
+\t- Sub-directories of the directory named "src" of certain Plug-ins\n\
+\t- Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
+Update License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties" found within a Feature.\n\
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
+terms and conditions (or references to such terms and conditions) that\n\
+govern your use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+\t- Eclipse Distribution License Version 1.0 (available at http://www.eclipse.org/licenses/edl-v1.0.html)\n\
+\t- Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+\t- Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+\t- Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+\t- Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+\n\Use of Provisioning Technology\n\
+\n\
+The Eclipse Foundation makes available provisioning software, examples of which include,\n\
+but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
+the purpose of allowing users to install software, documentation, information and/or\n\
+other materials (collectively "Installable Software"). This capability is provided with\n\
+the intent of allowing such users to install, extend and update Eclipse-based products.\n\
+Information about packaging Installable Software is available at\n\
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
+\n\
+You may use Provisioning Technology to allow other parties to install Installable Software.\n\
+You shall be responsible for enabling the applicable license agreements relating to the\n\
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
+in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
+making it available in accordance with the Specification, you further acknowledge your\n\
+agreement to, and the acquisition of all necessary rights to permit the following:\n\
+\n\
+\t1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
+\t the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
+\t extending or updating the functionality of an Eclipse-based product.\n\
+\t2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
+\t Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
+\t3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
+\t govern the use of the Installable Software ("Installable Software Agreement") and such\n\
+\t Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
+\t with the Specification. Such Installable Software Agreement must inform the user of the\n\
+\t terms and conditions that govern the Installable Software and must solicit acceptance by\n\
+\t the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
+\t indication of agreement by the user, the provisioning Technology will complete installation\n\
+\t of the Installable Software.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use, and\n\
+re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/features/org.eclipse.papyrus.sysml.architecture.feature/feature.xml b/features/org.eclipse.papyrus.sysml.architecture.feature/feature.xml
new file mode 100755
index 0000000..1f61e40
--- /dev/null
+++ b/features/org.eclipse.papyrus.sysml.architecture.feature/feature.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.papyrus.sysml.architecture.feature"
+ label="%featureName"
+ version="1.0.0.qualifier"
+ provider-name="%providerName">
+
+ <copyright url="http://www.eclipse.org/legal/epl-v10.html">
+ Copyright (c) 2012 CEA LIST, and Maged Elaasar.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License
+v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <description url="https://eclipse.org/papyrus/">
+ Papyrus SysML Architecture Context.
+ </description>
+
+ <plugin
+ id="org.eclipse.papyrus.sysml.architecture"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
diff --git a/features/org.eclipse.papyrus.sysml.architecture.feature/license.html b/features/org.eclipse.papyrus.sysml.architecture.feature/license.html
new file mode 100755
index 0000000..c3d34c3
--- /dev/null
+++ b/features/org.eclipse.papyrus.sysml.architecture.feature/license.html
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
+</head>
+
+<body lang="EN-US">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>April 9, 2014</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). 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
+ ("EPL"). 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, "Program" 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 ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").</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 ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</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 "features". Within a Feature, files named "feature.xml" 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 ("Included Features"). Within a Feature, files named "feature.xml" 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 "about.html" ("Abouts"). The terms and conditions governing Features and
+Included Features should be contained in files named "license.html" ("Feature Licenses"). 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 "src" 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 ("Feature Update License") 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 "license" property of files named "feature.properties" found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Eclipse Distribution License Version 1.0 (available at <a href="http://www.eclipse.org/licenses/edl-v10.html">http://www.eclipse.org/licenses/edl-v1.0.html</a>)</li>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+ Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or
+ other materials (collectively "Installable Software"). 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>
+ ("Specification").</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 ("Provisioning Process") in which a user may execute the Provisioning Technology
+ on a machine ("Target Machine") 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 ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target
+ Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+ the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+ indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
+</body>
+</html>
diff --git a/features/org.eclipse.papyrus.sysml.architecture.feature/pom.xml b/features/org.eclipse.papyrus.sysml.architecture.feature/pom.xml
new file mode 100755
index 0000000..0c8277a
--- /dev/null
+++ b/features/org.eclipse.papyrus.sysml.architecture.feature/pom.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.papyrus.sysml</groupId>
+ <artifactId>org.eclipse.papyrus.sysml.features</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.papyrus.sysml.architecture.feature</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>eclipse-feature</packaging>
+</project>
\ No newline at end of file
diff --git a/features/org.eclipse.papyrus.sysml.diagram.feature/.project b/features/org.eclipse.papyrus.sysml.diagram.feature/.project
new file mode 100755
index 0000000..de36ea9
--- /dev/null
+++ b/features/org.eclipse.papyrus.sysml.diagram.feature/.project
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.sysml.diagram.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.oomph.version.VersionBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>check.maven.pom</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>ignore.lower.bound.dependency.ranges</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>release.path</key>
+ <value>/org.eclipse.papyrus.releng.main.release/release.xml</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ <nature>org.eclipse.oomph.version.VersionNature</nature>
+ </natures>
+</projectDescription>
diff --git a/features/org.eclipse.papyrus.sysml.diagram.feature/build.properties b/features/org.eclipse.papyrus.sysml.diagram.feature/build.properties
new file mode 100755
index 0000000..cff2bd5
--- /dev/null
+++ b/features/org.eclipse.papyrus.sysml.diagram.feature/build.properties
@@ -0,0 +1,6 @@
+bin.includes = feature.xml,\
+ epl-v10.html,\
+ license.html,\
+ feature.properties
+src.includes = epl-v10.html,\
+ license.html
diff --git a/features/org.eclipse.papyrus.sysml.diagram.feature/epl-v10.html b/features/org.eclipse.papyrus.sysml.diagram.feature/epl-v10.html
new file mode 100755
index 0000000..cb1073a
--- /dev/null
+++ b/features/org.eclipse.papyrus.sysml.diagram.feature/epl-v10.html
@@ -0,0 +1,304 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html xmlns:o="urn:schemas-microsoft-com:office:office"
+xmlns:w="urn:schemas-microsoft-com:office:word"
+xmlns="http://www.w3.org/TR/REC-html40">
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel=File-List
+href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+
+ }
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head>
+
+<body lang="EN-US" style='tab-interval:.5in'>
+
+<div class=Section1>
+
+<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>"Contribution" means:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear=left>
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+changes to the Program, and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+additions to the Program;</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style='font-size:10.0pt'>"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style='font-size:10.0pt'>"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span
+style='color:red'> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+its license agreement:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
+
+<p><span style='font-size:10.0pt'>When the Program is made available in source
+code form:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it must be made available under this Agreement; and </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style='font-size:10.0pt'>Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style='font-size:10.0pt'>For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
+
+<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class=MsoNormal></p>
+
+</div>
+
+</body>
+
+</html>
\ No newline at end of file
diff --git a/features/org.eclipse.papyrus.sysml.diagram.feature/feature.properties b/features/org.eclipse.papyrus.sysml.diagram.feature/feature.properties
new file mode 100755
index 0000000..338b2fc
--- /dev/null
+++ b/features/org.eclipse.papyrus.sysml.diagram.feature/feature.properties
@@ -0,0 +1,138 @@
+# NLS_MESSAGEFORMAT_VAR
+
+# "featureName" property - name of the feature
+featureName=Papyrus SysML diagrams
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse Modeling Project
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+Eclipse Foundation Software User Agreement\n\
+April 9, 2014\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the\n\
+Eclipse Foundation is provided to you under the terms and conditions of\n\
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
+provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse Foundation source code\n\
+repository ("Repository") in software modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+\t- Content may be structured and packaged into modules to facilitate delivering,\n\
+\t extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+\t plug-in fragments ("Fragments"), and features ("Features").\n\
+\t- Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
+\t in a directory named "plugins".\n\
+\t- A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+\t Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+\t Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+\t numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+\t- Features may also include other Features ("Included Features"). Within a Feature, files\n\
+\t named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+\t- The top-level (root) directory\n\
+\t- Plug-in and Fragment directories\n\
+\t- Inside Plug-ins and Fragments packaged as JARs\n\
+\t- Sub-directories of the directory named "src" of certain Plug-ins\n\
+\t- Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
+Update License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties" found within a Feature.\n\
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
+terms and conditions (or references to such terms and conditions) that\n\
+govern your use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+\t- Eclipse Distribution License Version 1.0 (available at http://www.eclipse.org/licenses/edl-v1.0.html)\n\
+\t- Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+\t- Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+\t- Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+\t- Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+\n\Use of Provisioning Technology\n\
+\n\
+The Eclipse Foundation makes available provisioning software, examples of which include,\n\
+but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
+the purpose of allowing users to install software, documentation, information and/or\n\
+other materials (collectively "Installable Software"). This capability is provided with\n\
+the intent of allowing such users to install, extend and update Eclipse-based products.\n\
+Information about packaging Installable Software is available at\n\
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
+\n\
+You may use Provisioning Technology to allow other parties to install Installable Software.\n\
+You shall be responsible for enabling the applicable license agreements relating to the\n\
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
+in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
+making it available in accordance with the Specification, you further acknowledge your\n\
+agreement to, and the acquisition of all necessary rights to permit the following:\n\
+\n\
+\t1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
+\t the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
+\t extending or updating the functionality of an Eclipse-based product.\n\
+\t2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
+\t Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
+\t3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
+\t govern the use of the Installable Software ("Installable Software Agreement") and such\n\
+\t Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
+\t with the Specification. Such Installable Software Agreement must inform the user of the\n\
+\t terms and conditions that govern the Installable Software and must solicit acceptance by\n\
+\t the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
+\t indication of agreement by the user, the provisioning Technology will complete installation\n\
+\t of the Installable Software.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use, and\n\
+re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/features/org.eclipse.papyrus.sysml.diagram.feature/feature.xml b/features/org.eclipse.papyrus.sysml.diagram.feature/feature.xml
new file mode 100755
index 0000000..ea829e6
--- /dev/null
+++ b/features/org.eclipse.papyrus.sysml.diagram.feature/feature.xml
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.papyrus.sysml.diagram.feature"
+ label="%featureName"
+ version="3.0.0.qualifier"
+ provider-name="%providerName">
+
+ <copyright url="http://www.eclipse.org/legal/epl-v10.html">
+ 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
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <description url="https://eclipse.org/papyrus/">
+ The Papyrus implementations of the SysML 1.1 diagram editors.
+ </description>
+
+ <plugin
+ id="org.eclipse.papyrus.sysml.diagram.blockdefinition"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.sysml.diagram.common"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.sysml.diagram.requirement"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.sysml.diagram.ui"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.sysml.diagram.internalblock"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.sysml.diagram.parametric"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.sysml.diagram.css"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"/>
+
+</feature>
diff --git a/features/org.eclipse.papyrus.sysml.diagram.feature/license.html b/features/org.eclipse.papyrus.sysml.diagram.feature/license.html
new file mode 100755
index 0000000..c3d34c3
--- /dev/null
+++ b/features/org.eclipse.papyrus.sysml.diagram.feature/license.html
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
+</head>
+
+<body lang="EN-US">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>April 9, 2014</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). 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
+ ("EPL"). 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, "Program" 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 ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").</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 ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</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 "features". Within a Feature, files named "feature.xml" 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 ("Included Features"). Within a Feature, files named "feature.xml" 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 "about.html" ("Abouts"). The terms and conditions governing Features and
+Included Features should be contained in files named "license.html" ("Feature Licenses"). 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 "src" 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 ("Feature Update License") 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 "license" property of files named "feature.properties" found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Eclipse Distribution License Version 1.0 (available at <a href="http://www.eclipse.org/licenses/edl-v10.html">http://www.eclipse.org/licenses/edl-v1.0.html</a>)</li>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+ Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or
+ other materials (collectively "Installable Software"). 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>
+ ("Specification").</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 ("Provisioning Process") in which a user may execute the Provisioning Technology
+ on a machine ("Target Machine") 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 ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target
+ Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+ the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+ indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
+</body>
+</html>
diff --git a/features/org.eclipse.papyrus.sysml.diagram.feature/pom.xml b/features/org.eclipse.papyrus.sysml.diagram.feature/pom.xml
new file mode 100755
index 0000000..202aaa7
--- /dev/null
+++ b/features/org.eclipse.papyrus.sysml.diagram.feature/pom.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.papyrus.sysml</groupId>
+ <artifactId>org.eclipse.papyrus.sysml.features</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.papyrus.sysml.diagram.feature</artifactId>
+ <version>3.0.0-SNAPSHOT</version>
+ <packaging>eclipse-feature</packaging>
+</project>
\ No newline at end of file
diff --git a/features/org.eclipse.papyrus.sysml.feature/.project b/features/org.eclipse.papyrus.sysml.feature/.project
new file mode 100755
index 0000000..74b5b39
--- /dev/null
+++ b/features/org.eclipse.papyrus.sysml.feature/.project
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.sysml.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.oomph.version.VersionBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>check.maven.pom</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>ignore.lower.bound.dependency.ranges</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>release.path</key>
+ <value>/org.eclipse.papyrus.releng.main.release/release.xml</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ <nature>org.eclipse.oomph.version.VersionNature</nature>
+ </natures>
+</projectDescription>
diff --git a/features/org.eclipse.papyrus.sysml.feature/build.properties b/features/org.eclipse.papyrus.sysml.feature/build.properties
new file mode 100755
index 0000000..cff2bd5
--- /dev/null
+++ b/features/org.eclipse.papyrus.sysml.feature/build.properties
@@ -0,0 +1,6 @@
+bin.includes = feature.xml,\
+ epl-v10.html,\
+ license.html,\
+ feature.properties
+src.includes = epl-v10.html,\
+ license.html
diff --git a/features/org.eclipse.papyrus.sysml.feature/epl-v10.html b/features/org.eclipse.papyrus.sysml.feature/epl-v10.html
new file mode 100755
index 0000000..cb1073a
--- /dev/null
+++ b/features/org.eclipse.papyrus.sysml.feature/epl-v10.html
@@ -0,0 +1,304 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html xmlns:o="urn:schemas-microsoft-com:office:office"
+xmlns:w="urn:schemas-microsoft-com:office:word"
+xmlns="http://www.w3.org/TR/REC-html40">
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel=File-List
+href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+
+ }
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head>
+
+<body lang="EN-US" style='tab-interval:.5in'>
+
+<div class=Section1>
+
+<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>"Contribution" means:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear=left>
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+changes to the Program, and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+additions to the Program;</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style='font-size:10.0pt'>"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style='font-size:10.0pt'>"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span
+style='color:red'> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+its license agreement:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
+
+<p><span style='font-size:10.0pt'>When the Program is made available in source
+code form:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it must be made available under this Agreement; and </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style='font-size:10.0pt'>Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style='font-size:10.0pt'>For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
+
+<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class=MsoNormal></p>
+
+</div>
+
+</body>
+
+</html>
\ No newline at end of file
diff --git a/features/org.eclipse.papyrus.sysml.feature/feature.properties b/features/org.eclipse.papyrus.sysml.feature/feature.properties
new file mode 100755
index 0000000..fadd7d2
--- /dev/null
+++ b/features/org.eclipse.papyrus.sysml.feature/feature.properties
@@ -0,0 +1,138 @@
+# NLS_MESSAGEFORMAT_VAR
+
+# "featureName" property - name of the feature
+featureName=Papyrus SysML
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse Modeling Project
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+Eclipse Foundation Software User Agreement\n\
+April 9, 2014\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the\n\
+Eclipse Foundation is provided to you under the terms and conditions of\n\
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
+provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse Foundation source code\n\
+repository ("Repository") in software modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+\t- Content may be structured and packaged into modules to facilitate delivering,\n\
+\t extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+\t plug-in fragments ("Fragments"), and features ("Features").\n\
+\t- Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
+\t in a directory named "plugins".\n\
+\t- A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+\t Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+\t Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+\t numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+\t- Features may also include other Features ("Included Features"). Within a Feature, files\n\
+\t named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+\t- The top-level (root) directory\n\
+\t- Plug-in and Fragment directories\n\
+\t- Inside Plug-ins and Fragments packaged as JARs\n\
+\t- Sub-directories of the directory named "src" of certain Plug-ins\n\
+\t- Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
+Update License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties" found within a Feature.\n\
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
+terms and conditions (or references to such terms and conditions) that\n\
+govern your use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+\t- Eclipse Distribution License Version 1.0 (available at http://www.eclipse.org/licenses/edl-v1.0.html)\n\
+\t- Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+\t- Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+\t- Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+\t- Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+\n\Use of Provisioning Technology\n\
+\n\
+The Eclipse Foundation makes available provisioning software, examples of which include,\n\
+but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
+the purpose of allowing users to install software, documentation, information and/or\n\
+other materials (collectively "Installable Software"). This capability is provided with\n\
+the intent of allowing such users to install, extend and update Eclipse-based products.\n\
+Information about packaging Installable Software is available at\n\
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
+\n\
+You may use Provisioning Technology to allow other parties to install Installable Software.\n\
+You shall be responsible for enabling the applicable license agreements relating to the\n\
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
+in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
+making it available in accordance with the Specification, you further acknowledge your\n\
+agreement to, and the acquisition of all necessary rights to permit the following:\n\
+\n\
+\t1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
+\t the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
+\t extending or updating the functionality of an Eclipse-based product.\n\
+\t2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
+\t Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
+\t3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
+\t govern the use of the Installable Software ("Installable Software Agreement") and such\n\
+\t Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
+\t with the Specification. Such Installable Software Agreement must inform the user of the\n\
+\t terms and conditions that govern the Installable Software and must solicit acceptance by\n\
+\t the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
+\t indication of agreement by the user, the provisioning Technology will complete installation\n\
+\t of the Installable Software.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use, and\n\
+re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/features/org.eclipse.papyrus.sysml.feature/feature.xml b/features/org.eclipse.papyrus.sysml.feature/feature.xml
new file mode 100755
index 0000000..a0d8228
--- /dev/null
+++ b/features/org.eclipse.papyrus.sysml.feature/feature.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.papyrus.sysml.feature"
+ label="%featureName"
+ version="2.0.0.qualifier"
+ provider-name="%providerName">
+
+ <copyright url="http://www.eclipse.org/legal/epl-v10.html">
+ 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
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <description url="https://eclipse.org/papyrus/">
+ Core of the service edit for Papyrus SysML 1.1 modeler.
+ </description>
+
+ <plugin
+ id="org.eclipse.papyrus.sysml"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.sysml.architecture"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.sysml.service.types"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.sysml.edit"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
diff --git a/features/org.eclipse.papyrus.sysml.feature/license.html b/features/org.eclipse.papyrus.sysml.feature/license.html
new file mode 100755
index 0000000..c3d34c3
--- /dev/null
+++ b/features/org.eclipse.papyrus.sysml.feature/license.html
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
+</head>
+
+<body lang="EN-US">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>April 9, 2014</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). 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
+ ("EPL"). 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, "Program" 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 ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").</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 ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</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 "features". Within a Feature, files named "feature.xml" 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 ("Included Features"). Within a Feature, files named "feature.xml" 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 "about.html" ("Abouts"). The terms and conditions governing Features and
+Included Features should be contained in files named "license.html" ("Feature Licenses"). 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 "src" 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 ("Feature Update License") 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 "license" property of files named "feature.properties" found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Eclipse Distribution License Version 1.0 (available at <a href="http://www.eclipse.org/licenses/edl-v10.html">http://www.eclipse.org/licenses/edl-v1.0.html</a>)</li>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+ Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or
+ other materials (collectively "Installable Software"). 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>
+ ("Specification").</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 ("Provisioning Process") in which a user may execute the Provisioning Technology
+ on a machine ("Target Machine") 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 ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target
+ Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+ the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+ indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
+</body>
+</html>
diff --git a/features/org.eclipse.papyrus.sysml.feature/pom.xml b/features/org.eclipse.papyrus.sysml.feature/pom.xml
new file mode 100755
index 0000000..1afa842
--- /dev/null
+++ b/features/org.eclipse.papyrus.sysml.feature/pom.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.papyrus.sysml</groupId>
+ <artifactId>org.eclipse.papyrus.sysml.features</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.papyrus.sysml.feature</artifactId>
+ <version>2.0.0-SNAPSHOT</version>
+ <packaging>eclipse-feature</packaging>
+</project>
\ No newline at end of file
diff --git a/features/org.eclipse.papyrus.sysml.modelexplorer.feature/.project b/features/org.eclipse.papyrus.sysml.modelexplorer.feature/.project
new file mode 100755
index 0000000..ce3bd67
--- /dev/null
+++ b/features/org.eclipse.papyrus.sysml.modelexplorer.feature/.project
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.sysml.modelexplorer.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.oomph.version.VersionBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>check.maven.pom</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>ignore.lower.bound.dependency.ranges</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>release.path</key>
+ <value>/org.eclipse.papyrus.releng.main.release/release.xml</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ <nature>org.eclipse.oomph.version.VersionNature</nature>
+ </natures>
+</projectDescription>
diff --git a/features/org.eclipse.papyrus.sysml.modelexplorer.feature/build.properties b/features/org.eclipse.papyrus.sysml.modelexplorer.feature/build.properties
new file mode 100755
index 0000000..cff2bd5
--- /dev/null
+++ b/features/org.eclipse.papyrus.sysml.modelexplorer.feature/build.properties
@@ -0,0 +1,6 @@
+bin.includes = feature.xml,\
+ epl-v10.html,\
+ license.html,\
+ feature.properties
+src.includes = epl-v10.html,\
+ license.html
diff --git a/features/org.eclipse.papyrus.sysml.modelexplorer.feature/epl-v10.html b/features/org.eclipse.papyrus.sysml.modelexplorer.feature/epl-v10.html
new file mode 100755
index 0000000..cb1073a
--- /dev/null
+++ b/features/org.eclipse.papyrus.sysml.modelexplorer.feature/epl-v10.html
@@ -0,0 +1,304 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html xmlns:o="urn:schemas-microsoft-com:office:office"
+xmlns:w="urn:schemas-microsoft-com:office:word"
+xmlns="http://www.w3.org/TR/REC-html40">
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel=File-List
+href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+
+ }
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head>
+
+<body lang="EN-US" style='tab-interval:.5in'>
+
+<div class=Section1>
+
+<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>"Contribution" means:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear=left>
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+changes to the Program, and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+additions to the Program;</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style='font-size:10.0pt'>"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style='font-size:10.0pt'>"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span
+style='color:red'> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+its license agreement:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
+
+<p><span style='font-size:10.0pt'>When the Program is made available in source
+code form:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it must be made available under this Agreement; and </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style='font-size:10.0pt'>Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style='font-size:10.0pt'>For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
+
+<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class=MsoNormal></p>
+
+</div>
+
+</body>
+
+</html>
\ No newline at end of file
diff --git a/features/org.eclipse.papyrus.sysml.modelexplorer.feature/feature.properties b/features/org.eclipse.papyrus.sysml.modelexplorer.feature/feature.properties
new file mode 100755
index 0000000..253cd1b
--- /dev/null
+++ b/features/org.eclipse.papyrus.sysml.modelexplorer.feature/feature.properties
@@ -0,0 +1,138 @@
+# NLS_MESSAGEFORMAT_VAR
+
+# "featureName" property - name of the feature
+featureName=Papyrus SysML ModelExplorer
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse Modeling Project
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+Eclipse Foundation Software User Agreement\n\
+April 9, 2014\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the\n\
+Eclipse Foundation is provided to you under the terms and conditions of\n\
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
+provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse Foundation source code\n\
+repository ("Repository") in software modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+\t- Content may be structured and packaged into modules to facilitate delivering,\n\
+\t extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+\t plug-in fragments ("Fragments"), and features ("Features").\n\
+\t- Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
+\t in a directory named "plugins".\n\
+\t- A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+\t Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+\t Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+\t numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+\t- Features may also include other Features ("Included Features"). Within a Feature, files\n\
+\t named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+\t- The top-level (root) directory\n\
+\t- Plug-in and Fragment directories\n\
+\t- Inside Plug-ins and Fragments packaged as JARs\n\
+\t- Sub-directories of the directory named "src" of certain Plug-ins\n\
+\t- Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
+Update License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties" found within a Feature.\n\
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
+terms and conditions (or references to such terms and conditions) that\n\
+govern your use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+\t- Eclipse Distribution License Version 1.0 (available at http://www.eclipse.org/licenses/edl-v1.0.html)\n\
+\t- Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+\t- Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+\t- Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+\t- Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+\n\Use of Provisioning Technology\n\
+\n\
+The Eclipse Foundation makes available provisioning software, examples of which include,\n\
+but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
+the purpose of allowing users to install software, documentation, information and/or\n\
+other materials (collectively "Installable Software"). This capability is provided with\n\
+the intent of allowing such users to install, extend and update Eclipse-based products.\n\
+Information about packaging Installable Software is available at\n\
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
+\n\
+You may use Provisioning Technology to allow other parties to install Installable Software.\n\
+You shall be responsible for enabling the applicable license agreements relating to the\n\
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
+in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
+making it available in accordance with the Specification, you further acknowledge your\n\
+agreement to, and the acquisition of all necessary rights to permit the following:\n\
+\n\
+\t1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
+\t the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
+\t extending or updating the functionality of an Eclipse-based product.\n\
+\t2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
+\t Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
+\t3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
+\t govern the use of the Installable Software ("Installable Software Agreement") and such\n\
+\t Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
+\t with the Specification. Such Installable Software Agreement must inform the user of the\n\
+\t terms and conditions that govern the Installable Software and must solicit acceptance by\n\
+\t the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
+\t indication of agreement by the user, the provisioning Technology will complete installation\n\
+\t of the Installable Software.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use, and\n\
+re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/features/org.eclipse.papyrus.sysml.modelexplorer.feature/feature.xml b/features/org.eclipse.papyrus.sysml.modelexplorer.feature/feature.xml
new file mode 100755
index 0000000..b855f68
--- /dev/null
+++ b/features/org.eclipse.papyrus.sysml.modelexplorer.feature/feature.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.papyrus.sysml.modelexplorer.feature"
+ label="%featureName"
+ version="1.2.0.qualifier"
+ provider-name="%providerName">
+
+ <description url="https://eclipse.org/papyrus/">
+ Papyrus Model Explorer content providers for SysML.
+ </description>
+
+ <copyright url="http://www.eclipse.org/legal/epl-v10.html">
+ 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
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <plugin
+ id="org.eclipse.papyrus.sysml.modelexplorer"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.sysml.architecture"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
diff --git a/features/org.eclipse.papyrus.sysml.modelexplorer.feature/license.html b/features/org.eclipse.papyrus.sysml.modelexplorer.feature/license.html
new file mode 100755
index 0000000..c3d34c3
--- /dev/null
+++ b/features/org.eclipse.papyrus.sysml.modelexplorer.feature/license.html
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
+</head>
+
+<body lang="EN-US">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>April 9, 2014</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). 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
+ ("EPL"). 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, "Program" 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 ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").</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 ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</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 "features". Within a Feature, files named "feature.xml" 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 ("Included Features"). Within a Feature, files named "feature.xml" 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 "about.html" ("Abouts"). The terms and conditions governing Features and
+Included Features should be contained in files named "license.html" ("Feature Licenses"). 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 "src" 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 ("Feature Update License") 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 "license" property of files named "feature.properties" found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Eclipse Distribution License Version 1.0 (available at <a href="http://www.eclipse.org/licenses/edl-v10.html">http://www.eclipse.org/licenses/edl-v1.0.html</a>)</li>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+ Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or
+ other materials (collectively "Installable Software"). 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>
+ ("Specification").</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 ("Provisioning Process") in which a user may execute the Provisioning Technology
+ on a machine ("Target Machine") 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 ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target
+ Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+ the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+ indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
+</body>
+</html>
diff --git a/features/org.eclipse.papyrus.sysml.modelexplorer.feature/pom.xml b/features/org.eclipse.papyrus.sysml.modelexplorer.feature/pom.xml
new file mode 100755
index 0000000..d01e863
--- /dev/null
+++ b/features/org.eclipse.papyrus.sysml.modelexplorer.feature/pom.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.papyrus.sysml</groupId>
+ <artifactId>org.eclipse.papyrus.sysml.features</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.papyrus.sysml.modelexplorer.feature</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ <packaging>eclipse-feature</packaging>
+</project>
\ No newline at end of file
diff --git a/features/org.eclipse.papyrus.sysml.nattable.feature/.project b/features/org.eclipse.papyrus.sysml.nattable.feature/.project
new file mode 100755
index 0000000..29d11dd
--- /dev/null
+++ b/features/org.eclipse.papyrus.sysml.nattable.feature/.project
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.sysml.nattable.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.oomph.version.VersionBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>check.maven.pom</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>ignore.lower.bound.dependency.ranges</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>release.path</key>
+ <value>/org.eclipse.papyrus.releng.main.release/release.xml</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ <nature>org.eclipse.oomph.version.VersionNature</nature>
+ </natures>
+</projectDescription>
diff --git a/features/org.eclipse.papyrus.sysml.nattable.feature/build.properties b/features/org.eclipse.papyrus.sysml.nattable.feature/build.properties
new file mode 100755
index 0000000..b9ce334
--- /dev/null
+++ b/features/org.eclipse.papyrus.sysml.nattable.feature/build.properties
@@ -0,0 +1,7 @@
+bin.includes = feature.xml,\
+ build.properties,\
+ epl-v10.html,\
+ license.html,\
+ feature.properties
+src.includes = epl-v10.html,\
+ license.html
diff --git a/features/org.eclipse.papyrus.sysml.nattable.feature/epl-v10.html b/features/org.eclipse.papyrus.sysml.nattable.feature/epl-v10.html
new file mode 100755
index 0000000..cb1073a
--- /dev/null
+++ b/features/org.eclipse.papyrus.sysml.nattable.feature/epl-v10.html
@@ -0,0 +1,304 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html xmlns:o="urn:schemas-microsoft-com:office:office"
+xmlns:w="urn:schemas-microsoft-com:office:word"
+xmlns="http://www.w3.org/TR/REC-html40">
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel=File-List
+href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+
+ }
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head>
+
+<body lang="EN-US" style='tab-interval:.5in'>
+
+<div class=Section1>
+
+<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>"Contribution" means:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear=left>
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+changes to the Program, and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+additions to the Program;</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style='font-size:10.0pt'>"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style='font-size:10.0pt'>"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span
+style='color:red'> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+its license agreement:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
+
+<p><span style='font-size:10.0pt'>When the Program is made available in source
+code form:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it must be made available under this Agreement; and </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style='font-size:10.0pt'>Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style='font-size:10.0pt'>For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
+
+<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class=MsoNormal></p>
+
+</div>
+
+</body>
+
+</html>
\ No newline at end of file
diff --git a/features/org.eclipse.papyrus.sysml.nattable.feature/feature.properties b/features/org.eclipse.papyrus.sysml.nattable.feature/feature.properties
new file mode 100755
index 0000000..11ac9ed
--- /dev/null
+++ b/features/org.eclipse.papyrus.sysml.nattable.feature/feature.properties
@@ -0,0 +1,132 @@
+# NLS_MESSAGEFORMAT_VAR
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+Eclipse Foundation Software User Agreement\n\
+April 9, 2014\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the\n\
+Eclipse Foundation is provided to you under the terms and conditions of\n\
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
+provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse Foundation source code\n\
+repository ("Repository") in software modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+\t- Content may be structured and packaged into modules to facilitate delivering,\n\
+\t extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+\t plug-in fragments ("Fragments"), and features ("Features").\n\
+\t- Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
+\t in a directory named "plugins".\n\
+\t- A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+\t Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+\t Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+\t numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+\t- Features may also include other Features ("Included Features"). Within a Feature, files\n\
+\t named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+\t- The top-level (root) directory\n\
+\t- Plug-in and Fragment directories\n\
+\t- Inside Plug-ins and Fragments packaged as JARs\n\
+\t- Sub-directories of the directory named "src" of certain Plug-ins\n\
+\t- Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
+Update License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties" found within a Feature.\n\
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
+terms and conditions (or references to such terms and conditions) that\n\
+govern your use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+\t- Eclipse Distribution License Version 1.0 (available at http://www.eclipse.org/licenses/edl-v1.0.html)\n\
+\t- Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+\t- Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+\t- Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+\t- Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+\n\Use of Provisioning Technology\n\
+\n\
+The Eclipse Foundation makes available provisioning software, examples of which include,\n\
+but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
+the purpose of allowing users to install software, documentation, information and/or\n\
+other materials (collectively "Installable Software"). This capability is provided with\n\
+the intent of allowing such users to install, extend and update Eclipse-based products.\n\
+Information about packaging Installable Software is available at\n\
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
+\n\
+You may use Provisioning Technology to allow other parties to install Installable Software.\n\
+You shall be responsible for enabling the applicable license agreements relating to the\n\
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
+in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
+making it available in accordance with the Specification, you further acknowledge your\n\
+agreement to, and the acquisition of all necessary rights to permit the following:\n\
+\n\
+\t1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
+\t the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
+\t extending or updating the functionality of an Eclipse-based product.\n\
+\t2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
+\t Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
+\t3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
+\t govern the use of the Installable Software ("Installable Software Agreement") and such\n\
+\t Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
+\t with the Specification. Such Installable Software Agreement must inform the user of the\n\
+\t terms and conditions that govern the Installable Software and must solicit acceptance by\n\
+\t the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
+\t indication of agreement by the user, the provisioning Technology will complete installation\n\
+\t of the Installable Software.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use, and\n\
+re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/features/org.eclipse.papyrus.sysml.nattable.feature/feature.xml b/features/org.eclipse.papyrus.sysml.nattable.feature/feature.xml
new file mode 100755
index 0000000..116c6e9
--- /dev/null
+++ b/features/org.eclipse.papyrus.sysml.nattable.feature/feature.xml
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.papyrus.sysml.nattable.feature"
+ label="Papyrus SysML Table - New Version"
+ version="2.0.0.qualifier"
+ provider-name="Eclipse Modeling Project">
+
+ <copyright url="http://www.eclipse.org/legal/epl-v10.html">
+ 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
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <description url="https://eclipse.org/papyrus/">
+ Papyrus Nattable are a set of plugins dedicated to manage tables in relation with Sysml models.
+ </description>
+
+ <plugin
+ id="org.eclipse.papyrus.sysml.nattable"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.sysml.nattable.requirement"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.sysml.nattable.requirement.config"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.sysml.nattable.allocation"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.sysml.nattable.allocation.config"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.sysml.nattable.menu"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
diff --git a/features/org.eclipse.papyrus.sysml.nattable.feature/license.html b/features/org.eclipse.papyrus.sysml.nattable.feature/license.html
new file mode 100755
index 0000000..c3d34c3
--- /dev/null
+++ b/features/org.eclipse.papyrus.sysml.nattable.feature/license.html
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
+</head>
+
+<body lang="EN-US">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>April 9, 2014</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). 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
+ ("EPL"). 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, "Program" 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 ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").</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 ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</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 "features". Within a Feature, files named "feature.xml" 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 ("Included Features"). Within a Feature, files named "feature.xml" 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 "about.html" ("Abouts"). The terms and conditions governing Features and
+Included Features should be contained in files named "license.html" ("Feature Licenses"). 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 "src" 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 ("Feature Update License") 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 "license" property of files named "feature.properties" found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Eclipse Distribution License Version 1.0 (available at <a href="http://www.eclipse.org/licenses/edl-v10.html">http://www.eclipse.org/licenses/edl-v1.0.html</a>)</li>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+ Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or
+ other materials (collectively "Installable Software"). 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>
+ ("Specification").</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 ("Provisioning Process") in which a user may execute the Provisioning Technology
+ on a machine ("Target Machine") 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 ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target
+ Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+ the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+ indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
+</body>
+</html>
diff --git a/features/org.eclipse.papyrus.sysml.nattable.feature/pom.xml b/features/org.eclipse.papyrus.sysml.nattable.feature/pom.xml
new file mode 100755
index 0000000..4bec256
--- /dev/null
+++ b/features/org.eclipse.papyrus.sysml.nattable.feature/pom.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.papyrus.sysml</groupId>
+ <artifactId>org.eclipse.papyrus.sysml.features</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.papyrus.sysml.nattable.feature</artifactId>
+ <version>2.0.0-SNAPSHOT</version>
+ <packaging>eclipse-feature</packaging>
+</project>
\ No newline at end of file
diff --git a/features/org.eclipse.papyrus.sysml.properties.feature/.project b/features/org.eclipse.papyrus.sysml.properties.feature/.project
new file mode 100755
index 0000000..cee5339
--- /dev/null
+++ b/features/org.eclipse.papyrus.sysml.properties.feature/.project
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.sysml.properties.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.oomph.version.VersionBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>check.maven.pom</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>ignore.lower.bound.dependency.ranges</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>release.path</key>
+ <value>/org.eclipse.papyrus.releng.main.release/release.xml</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ <nature>org.eclipse.oomph.version.VersionNature</nature>
+ </natures>
+</projectDescription>
diff --git a/features/org.eclipse.papyrus.sysml.properties.feature/build.properties b/features/org.eclipse.papyrus.sysml.properties.feature/build.properties
new file mode 100755
index 0000000..cff2bd5
--- /dev/null
+++ b/features/org.eclipse.papyrus.sysml.properties.feature/build.properties
@@ -0,0 +1,6 @@
+bin.includes = feature.xml,\
+ epl-v10.html,\
+ license.html,\
+ feature.properties
+src.includes = epl-v10.html,\
+ license.html
diff --git a/features/org.eclipse.papyrus.sysml.properties.feature/epl-v10.html b/features/org.eclipse.papyrus.sysml.properties.feature/epl-v10.html
new file mode 100755
index 0000000..cb1073a
--- /dev/null
+++ b/features/org.eclipse.papyrus.sysml.properties.feature/epl-v10.html
@@ -0,0 +1,304 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html xmlns:o="urn:schemas-microsoft-com:office:office"
+xmlns:w="urn:schemas-microsoft-com:office:word"
+xmlns="http://www.w3.org/TR/REC-html40">
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel=File-List
+href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+
+ }
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head>
+
+<body lang="EN-US" style='tab-interval:.5in'>
+
+<div class=Section1>
+
+<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>"Contribution" means:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear=left>
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+changes to the Program, and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+additions to the Program;</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style='font-size:10.0pt'>"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style='font-size:10.0pt'>"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span
+style='color:red'> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+its license agreement:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
+
+<p><span style='font-size:10.0pt'>When the Program is made available in source
+code form:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it must be made available under this Agreement; and </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style='font-size:10.0pt'>Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style='font-size:10.0pt'>For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
+
+<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class=MsoNormal></p>
+
+</div>
+
+</body>
+
+</html>
\ No newline at end of file
diff --git a/features/org.eclipse.papyrus.sysml.properties.feature/feature.properties b/features/org.eclipse.papyrus.sysml.properties.feature/feature.properties
new file mode 100755
index 0000000..ecee033
--- /dev/null
+++ b/features/org.eclipse.papyrus.sysml.properties.feature/feature.properties
@@ -0,0 +1,138 @@
+# NLS_MESSAGEFORMAT_VAR
+
+# "featureName" property - name of the feature
+featureName=Papyrus SysML properties
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse Modeling Project
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+Eclipse Foundation Software User Agreement\n\
+April 9, 2014\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the\n\
+Eclipse Foundation is provided to you under the terms and conditions of\n\
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
+provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse Foundation source code\n\
+repository ("Repository") in software modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+\t- Content may be structured and packaged into modules to facilitate delivering,\n\
+\t extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+\t plug-in fragments ("Fragments"), and features ("Features").\n\
+\t- Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
+\t in a directory named "plugins".\n\
+\t- A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+\t Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+\t Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+\t numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+\t- Features may also include other Features ("Included Features"). Within a Feature, files\n\
+\t named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+\t- The top-level (root) directory\n\
+\t- Plug-in and Fragment directories\n\
+\t- Inside Plug-ins and Fragments packaged as JARs\n\
+\t- Sub-directories of the directory named "src" of certain Plug-ins\n\
+\t- Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
+Update License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties" found within a Feature.\n\
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
+terms and conditions (or references to such terms and conditions) that\n\
+govern your use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+\t- Eclipse Distribution License Version 1.0 (available at http://www.eclipse.org/licenses/edl-v1.0.html)\n\
+\t- Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+\t- Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+\t- Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+\t- Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+\n\Use of Provisioning Technology\n\
+\n\
+The Eclipse Foundation makes available provisioning software, examples of which include,\n\
+but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
+the purpose of allowing users to install software, documentation, information and/or\n\
+other materials (collectively "Installable Software"). This capability is provided with\n\
+the intent of allowing such users to install, extend and update Eclipse-based products.\n\
+Information about packaging Installable Software is available at\n\
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
+\n\
+You may use Provisioning Technology to allow other parties to install Installable Software.\n\
+You shall be responsible for enabling the applicable license agreements relating to the\n\
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
+in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
+making it available in accordance with the Specification, you further acknowledge your\n\
+agreement to, and the acquisition of all necessary rights to permit the following:\n\
+\n\
+\t1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
+\t the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
+\t extending or updating the functionality of an Eclipse-based product.\n\
+\t2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
+\t Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
+\t3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
+\t govern the use of the Installable Software ("Installable Software Agreement") and such\n\
+\t Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
+\t with the Specification. Such Installable Software Agreement must inform the user of the\n\
+\t terms and conditions that govern the Installable Software and must solicit acceptance by\n\
+\t the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
+\t indication of agreement by the user, the provisioning Technology will complete installation\n\
+\t of the Installable Software.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use, and\n\
+re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/features/org.eclipse.papyrus.sysml.properties.feature/feature.xml b/features/org.eclipse.papyrus.sysml.properties.feature/feature.xml
new file mode 100755
index 0000000..a92b9df
--- /dev/null
+++ b/features/org.eclipse.papyrus.sysml.properties.feature/feature.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><feature id="org.eclipse.papyrus.sysml.properties.feature" label="%featureName" provider-name="%providerName" version="1.2.0.qualifier">
+
+ <copyright url="http://www.eclipse.org/legal/epl-v10.html">
+ 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
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <description url="https://eclipse.org/papyrus/">
+ This feature references plug-ins that specialize property view for SysML.
+ </description>
+
+ <plugin download-size="0" id="org.eclipse.papyrus.sysml.properties" install-size="0" unpack="false" version="0.0.0"/>
+
+</feature>
\ No newline at end of file
diff --git a/features/org.eclipse.papyrus.sysml.properties.feature/license.html b/features/org.eclipse.papyrus.sysml.properties.feature/license.html
new file mode 100755
index 0000000..c3d34c3
--- /dev/null
+++ b/features/org.eclipse.papyrus.sysml.properties.feature/license.html
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
+</head>
+
+<body lang="EN-US">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>April 9, 2014</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). 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
+ ("EPL"). 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, "Program" 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 ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").</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 ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</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 "features". Within a Feature, files named "feature.xml" 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 ("Included Features"). Within a Feature, files named "feature.xml" 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 "about.html" ("Abouts"). The terms and conditions governing Features and
+Included Features should be contained in files named "license.html" ("Feature Licenses"). 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 "src" 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 ("Feature Update License") 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 "license" property of files named "feature.properties" found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Eclipse Distribution License Version 1.0 (available at <a href="http://www.eclipse.org/licenses/edl-v10.html">http://www.eclipse.org/licenses/edl-v1.0.html</a>)</li>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+ Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or
+ other materials (collectively "Installable Software"). 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>
+ ("Specification").</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 ("Provisioning Process") in which a user may execute the Provisioning Technology
+ on a machine ("Target Machine") 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 ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target
+ Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+ the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+ indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
+</body>
+</html>
diff --git a/features/org.eclipse.papyrus.sysml.properties.feature/pom.xml b/features/org.eclipse.papyrus.sysml.properties.feature/pom.xml
new file mode 100755
index 0000000..84b1fe5
--- /dev/null
+++ b/features/org.eclipse.papyrus.sysml.properties.feature/pom.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.papyrus.sysml</groupId>
+ <artifactId>org.eclipse.papyrus.sysml.features</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.papyrus.sysml.properties.feature</artifactId>
+ <packaging>eclipse-feature</packaging>
+</project>
\ No newline at end of file
diff --git a/features/org.eclipse.papyrus.tests.sysml.diagram.feature/.project b/features/org.eclipse.papyrus.tests.sysml.diagram.feature/.project
new file mode 100755
index 0000000..bc06e6d
--- /dev/null
+++ b/features/org.eclipse.papyrus.tests.sysml.diagram.feature/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.tests.sysml.diagram.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
diff --git a/features/org.eclipse.papyrus.tests.sysml.diagram.feature/build.properties b/features/org.eclipse.papyrus.tests.sysml.diagram.feature/build.properties
new file mode 100755
index 0000000..480ae08
--- /dev/null
+++ b/features/org.eclipse.papyrus.tests.sysml.diagram.feature/build.properties
@@ -0,0 +1,5 @@
+bin.includes = feature.xml,\
+ license.html,\
+ epl-v10.html
+src.includes = epl-v10.html,\
+ license.html
diff --git a/features/org.eclipse.papyrus.tests.sysml.diagram.feature/epl-v10.html b/features/org.eclipse.papyrus.tests.sysml.diagram.feature/epl-v10.html
new file mode 100755
index 0000000..cb1073a
--- /dev/null
+++ b/features/org.eclipse.papyrus.tests.sysml.diagram.feature/epl-v10.html
@@ -0,0 +1,304 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html xmlns:o="urn:schemas-microsoft-com:office:office"
+xmlns:w="urn:schemas-microsoft-com:office:word"
+xmlns="http://www.w3.org/TR/REC-html40">
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel=File-List
+href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+
+ }
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head>
+
+<body lang="EN-US" style='tab-interval:.5in'>
+
+<div class=Section1>
+
+<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>"Contribution" means:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear=left>
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+changes to the Program, and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+additions to the Program;</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style='font-size:10.0pt'>"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style='font-size:10.0pt'>"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span
+style='color:red'> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+its license agreement:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
+
+<p><span style='font-size:10.0pt'>When the Program is made available in source
+code form:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it must be made available under this Agreement; and </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style='font-size:10.0pt'>Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style='font-size:10.0pt'>For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
+
+<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class=MsoNormal></p>
+
+</div>
+
+</body>
+
+</html>
\ No newline at end of file
diff --git a/features/org.eclipse.papyrus.tests.sysml.diagram.feature/feature.properties b/features/org.eclipse.papyrus.tests.sysml.diagram.feature/feature.properties
new file mode 100755
index 0000000..630d5e1
--- /dev/null
+++ b/features/org.eclipse.papyrus.tests.sysml.diagram.feature/feature.properties
@@ -0,0 +1,138 @@
+# NLS_MESSAGEFORMAT_VAR
+
+# "featureName" property - name of the feature
+featureName=Papyrus SysML diagram tests
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse Modeling Project
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+Eclipse Foundation Software User Agreement\n\
+April 9, 2014\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the\n\
+Eclipse Foundation is provided to you under the terms and conditions of\n\
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
+provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse Foundation source code\n\
+repository ("Repository") in software modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+\t- Content may be structured and packaged into modules to facilitate delivering,\n\
+\t extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+\t plug-in fragments ("Fragments"), and features ("Features").\n\
+\t- Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
+\t in a directory named "plugins".\n\
+\t- A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+\t Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+\t Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+\t numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+\t- Features may also include other Features ("Included Features"). Within a Feature, files\n\
+\t named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+\t- The top-level (root) directory\n\
+\t- Plug-in and Fragment directories\n\
+\t- Inside Plug-ins and Fragments packaged as JARs\n\
+\t- Sub-directories of the directory named "src" of certain Plug-ins\n\
+\t- Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
+Update License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties" found within a Feature.\n\
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
+terms and conditions (or references to such terms and conditions) that\n\
+govern your use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+\t- Eclipse Distribution License Version 1.0 (available at http://www.eclipse.org/licenses/edl-v1.0.html)\n\
+\t- Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+\t- Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+\t- Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+\t- Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+\n\Use of Provisioning Technology\n\
+\n\
+The Eclipse Foundation makes available provisioning software, examples of which include,\n\
+but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
+the purpose of allowing users to install software, documentation, information and/or\n\
+other materials (collectively "Installable Software"). This capability is provided with\n\
+the intent of allowing such users to install, extend and update Eclipse-based products.\n\
+Information about packaging Installable Software is available at\n\
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
+\n\
+You may use Provisioning Technology to allow other parties to install Installable Software.\n\
+You shall be responsible for enabling the applicable license agreements relating to the\n\
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
+in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
+making it available in accordance with the Specification, you further acknowledge your\n\
+agreement to, and the acquisition of all necessary rights to permit the following:\n\
+\n\
+\t1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
+\t the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
+\t extending or updating the functionality of an Eclipse-based product.\n\
+\t2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
+\t Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
+\t3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
+\t govern the use of the Installable Software ("Installable Software Agreement") and such\n\
+\t Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
+\t with the Specification. Such Installable Software Agreement must inform the user of the\n\
+\t terms and conditions that govern the Installable Software and must solicit acceptance by\n\
+\t the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
+\t indication of agreement by the user, the provisioning Technology will complete installation\n\
+\t of the Installable Software.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use, and\n\
+re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/features/org.eclipse.papyrus.tests.sysml.diagram.feature/feature.xml b/features/org.eclipse.papyrus.tests.sysml.diagram.feature/feature.xml
new file mode 100755
index 0000000..4bdf4af
--- /dev/null
+++ b/features/org.eclipse.papyrus.tests.sysml.diagram.feature/feature.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.papyrus.tests.sysml.diagram.feature"
+ label="Tests SysML Diagram Feature"
+ version="1.2.0.qualifier"
+ provider-name="Eclipse Modeling Project">
+
+ <copyright url="http://www.eclipse.org/legal/epl-v10.html">
+ Copyright (c) 2011 CEA LIST
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License
+v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <description url="https://eclipse.org/papyrus/">
+ Tests on the block internal and parametric diagrams.
+ </description>
+
+ <plugin
+ id="org.eclipse.papyrus.sysml.diagram.blockdefinition.tests"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.sysml.diagram.internalblock.tests"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.sysml.diagram.parametric.tests"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
diff --git a/features/org.eclipse.papyrus.tests.sysml.diagram.feature/license.html b/features/org.eclipse.papyrus.tests.sysml.diagram.feature/license.html
new file mode 100755
index 0000000..c3d34c3
--- /dev/null
+++ b/features/org.eclipse.papyrus.tests.sysml.diagram.feature/license.html
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
+</head>
+
+<body lang="EN-US">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>April 9, 2014</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). 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
+ ("EPL"). 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, "Program" 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 ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").</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 ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</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 "features". Within a Feature, files named "feature.xml" 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 ("Included Features"). Within a Feature, files named "feature.xml" 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 "about.html" ("Abouts"). The terms and conditions governing Features and
+Included Features should be contained in files named "license.html" ("Feature Licenses"). 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 "src" 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 ("Feature Update License") 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 "license" property of files named "feature.properties" found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Eclipse Distribution License Version 1.0 (available at <a href="http://www.eclipse.org/licenses/edl-v10.html">http://www.eclipse.org/licenses/edl-v1.0.html</a>)</li>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+ Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or
+ other materials (collectively "Installable Software"). 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>
+ ("Specification").</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 ("Provisioning Process") in which a user may execute the Provisioning Technology
+ on a machine ("Target Machine") 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 ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target
+ Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+ the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+ indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
+</body>
+</html>
diff --git a/features/org.eclipse.papyrus.tests.sysml.diagram.feature/pom.xml b/features/org.eclipse.papyrus.tests.sysml.diagram.feature/pom.xml
new file mode 100755
index 0000000..d5c437b
--- /dev/null
+++ b/features/org.eclipse.papyrus.tests.sysml.diagram.feature/pom.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.papyrus.sysml</groupId>
+ <artifactId>org.eclipse.papyrus.sysml.features</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.papyrus.tests.sysml.diagram.feature</artifactId>
+ <packaging>eclipse-feature</packaging>
+</project>
\ No newline at end of file
diff --git a/features/org.eclipse.papyrus.tests.sysml.feature/.project b/features/org.eclipse.papyrus.tests.sysml.feature/.project
new file mode 100755
index 0000000..ec7ac06
--- /dev/null
+++ b/features/org.eclipse.papyrus.tests.sysml.feature/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.tests.sysml.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
diff --git a/features/org.eclipse.papyrus.tests.sysml.feature/build.properties b/features/org.eclipse.papyrus.tests.sysml.feature/build.properties
new file mode 100755
index 0000000..64f93a9
--- /dev/null
+++ b/features/org.eclipse.papyrus.tests.sysml.feature/build.properties
@@ -0,0 +1 @@
+bin.includes = feature.xml
diff --git a/features/org.eclipse.papyrus.tests.sysml.feature/epl-v10.html b/features/org.eclipse.papyrus.tests.sysml.feature/epl-v10.html
new file mode 100755
index 0000000..cb1073a
--- /dev/null
+++ b/features/org.eclipse.papyrus.tests.sysml.feature/epl-v10.html
@@ -0,0 +1,304 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html xmlns:o="urn:schemas-microsoft-com:office:office"
+xmlns:w="urn:schemas-microsoft-com:office:word"
+xmlns="http://www.w3.org/TR/REC-html40">
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel=File-List
+href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+
+ }
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head>
+
+<body lang="EN-US" style='tab-interval:.5in'>
+
+<div class=Section1>
+
+<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>"Contribution" means:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear=left>
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+changes to the Program, and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+additions to the Program;</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style='font-size:10.0pt'>"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style='font-size:10.0pt'>"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span
+style='color:red'> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+its license agreement:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
+
+<p><span style='font-size:10.0pt'>When the Program is made available in source
+code form:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it must be made available under this Agreement; and </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style='font-size:10.0pt'>Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style='font-size:10.0pt'>For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
+
+<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class=MsoNormal></p>
+
+</div>
+
+</body>
+
+</html>
\ No newline at end of file
diff --git a/features/org.eclipse.papyrus.tests.sysml.feature/feature.properties b/features/org.eclipse.papyrus.tests.sysml.feature/feature.properties
new file mode 100755
index 0000000..c2220df
--- /dev/null
+++ b/features/org.eclipse.papyrus.tests.sysml.feature/feature.properties
@@ -0,0 +1,138 @@
+# NLS_MESSAGEFORMAT_VAR
+
+# "featureName" property - name of the feature
+featureName=Papyrus SysML tests
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse Modeling Project
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+Eclipse Foundation Software User Agreement\n\
+April 9, 2014\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the\n\
+Eclipse Foundation is provided to you under the terms and conditions of\n\
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
+provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse Foundation source code\n\
+repository ("Repository") in software modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+\t- Content may be structured and packaged into modules to facilitate delivering,\n\
+\t extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+\t plug-in fragments ("Fragments"), and features ("Features").\n\
+\t- Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
+\t in a directory named "plugins".\n\
+\t- A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+\t Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+\t Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+\t numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+\t- Features may also include other Features ("Included Features"). Within a Feature, files\n\
+\t named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+\t- The top-level (root) directory\n\
+\t- Plug-in and Fragment directories\n\
+\t- Inside Plug-ins and Fragments packaged as JARs\n\
+\t- Sub-directories of the directory named "src" of certain Plug-ins\n\
+\t- Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
+Update License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties" found within a Feature.\n\
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
+terms and conditions (or references to such terms and conditions) that\n\
+govern your use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+\t- Eclipse Distribution License Version 1.0 (available at http://www.eclipse.org/licenses/edl-v1.0.html)\n\
+\t- Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+\t- Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+\t- Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+\t- Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+\n\Use of Provisioning Technology\n\
+\n\
+The Eclipse Foundation makes available provisioning software, examples of which include,\n\
+but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
+the purpose of allowing users to install software, documentation, information and/or\n\
+other materials (collectively "Installable Software"). This capability is provided with\n\
+the intent of allowing such users to install, extend and update Eclipse-based products.\n\
+Information about packaging Installable Software is available at\n\
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
+\n\
+You may use Provisioning Technology to allow other parties to install Installable Software.\n\
+You shall be responsible for enabling the applicable license agreements relating to the\n\
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
+in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
+making it available in accordance with the Specification, you further acknowledge your\n\
+agreement to, and the acquisition of all necessary rights to permit the following:\n\
+\n\
+\t1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
+\t the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
+\t extending or updating the functionality of an Eclipse-based product.\n\
+\t2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
+\t Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
+\t3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
+\t govern the use of the Installable Software ("Installable Software Agreement") and such\n\
+\t Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
+\t with the Specification. Such Installable Software Agreement must inform the user of the\n\
+\t terms and conditions that govern the Installable Software and must solicit acceptance by\n\
+\t the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
+\t indication of agreement by the user, the provisioning Technology will complete installation\n\
+\t of the Installable Software.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use, and\n\
+re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/features/org.eclipse.papyrus.tests.sysml.feature/feature.xml b/features/org.eclipse.papyrus.tests.sysml.feature/feature.xml
new file mode 100755
index 0000000..c66ea68
--- /dev/null
+++ b/features/org.eclipse.papyrus.tests.sysml.feature/feature.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><feature id="org.eclipse.papyrus.tests.sysml.feature" label="Tests SysML Feature" provider-name="Eclipse Modeling Project" version="1.2.0.qualifier">
+
+
+ <copyright url="http://www.eclipse.org/legal/epl-v10.html">
+ Copyright (c) 2011 CEA LIST
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License
+v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <description url="https://eclipse.org/papyrus/">
+ Tests on Papyrus SysML 1.1 modeler.
+ </description>
+
+ <plugin download-size="0" id="org.eclipse.papyrus.sysml.service.types.tests" install-size="0" unpack="false" version="0.0.0"/>
+
+ <plugin download-size="0" id="org.eclipse.papyrus.sysml.tests" install-size="0" unpack="false" version="0.0.0"/>
+
+ <plugin download-size="0" id="org.eclipse.papyrus.sysml.modelexplorer.tests" install-size="0" unpack="false" version="0.0.0"/>
+
+</feature>
\ No newline at end of file
diff --git a/features/org.eclipse.papyrus.tests.sysml.feature/license.html b/features/org.eclipse.papyrus.tests.sysml.feature/license.html
new file mode 100755
index 0000000..c3d34c3
--- /dev/null
+++ b/features/org.eclipse.papyrus.tests.sysml.feature/license.html
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
+</head>
+
+<body lang="EN-US">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>April 9, 2014</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). 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
+ ("EPL"). 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, "Program" 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 ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").</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 ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</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 "features". Within a Feature, files named "feature.xml" 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 ("Included Features"). Within a Feature, files named "feature.xml" 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 "about.html" ("Abouts"). The terms and conditions governing Features and
+Included Features should be contained in files named "license.html" ("Feature Licenses"). 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 "src" 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 ("Feature Update License") 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 "license" property of files named "feature.properties" found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Eclipse Distribution License Version 1.0 (available at <a href="http://www.eclipse.org/licenses/edl-v10.html">http://www.eclipse.org/licenses/edl-v1.0.html</a>)</li>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+ Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or
+ other materials (collectively "Installable Software"). 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>
+ ("Specification").</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 ("Provisioning Process") in which a user may execute the Provisioning Technology
+ on a machine ("Target Machine") 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 ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target
+ Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+ the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+ indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
+</body>
+</html>
diff --git a/features/org.eclipse.papyrus.tests.sysml.feature/pom.xml b/features/org.eclipse.papyrus.tests.sysml.feature/pom.xml
new file mode 100755
index 0000000..e918156
--- /dev/null
+++ b/features/org.eclipse.papyrus.tests.sysml.feature/pom.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.papyrus.sysml</groupId>
+ <artifactId>org.eclipse.papyrus.sysml.features</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.papyrus.tests.sysml.feature</artifactId>
+ <packaging>eclipse-feature</packaging>
+</project>
\ No newline at end of file
diff --git a/features/org.eclipse.papyrus.tests.sysml.nattable.feature/.project b/features/org.eclipse.papyrus.tests.sysml.nattable.feature/.project
new file mode 100755
index 0000000..094b443
--- /dev/null
+++ b/features/org.eclipse.papyrus.tests.sysml.nattable.feature/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.tests.sysml.nattable.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
diff --git a/features/org.eclipse.papyrus.tests.sysml.nattable.feature/build.properties b/features/org.eclipse.papyrus.tests.sysml.nattable.feature/build.properties
new file mode 100755
index 0000000..67be479
--- /dev/null
+++ b/features/org.eclipse.papyrus.tests.sysml.nattable.feature/build.properties
@@ -0,0 +1,5 @@
+bin.includes = feature.xml,\
+ epl-v10.html,\
+ license.html
+src.includes = epl-v10.html,\
+ license.html
diff --git a/features/org.eclipse.papyrus.tests.sysml.nattable.feature/epl-v10.html b/features/org.eclipse.papyrus.tests.sysml.nattable.feature/epl-v10.html
new file mode 100755
index 0000000..cb1073a
--- /dev/null
+++ b/features/org.eclipse.papyrus.tests.sysml.nattable.feature/epl-v10.html
@@ -0,0 +1,304 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html xmlns:o="urn:schemas-microsoft-com:office:office"
+xmlns:w="urn:schemas-microsoft-com:office:word"
+xmlns="http://www.w3.org/TR/REC-html40">
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel=File-List
+href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+
+ }
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head>
+
+<body lang="EN-US" style='tab-interval:.5in'>
+
+<div class=Section1>
+
+<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>"Contribution" means:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear=left>
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+changes to the Program, and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+additions to the Program;</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style='font-size:10.0pt'>"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style='font-size:10.0pt'>"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span
+style='color:red'> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+its license agreement:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
+
+<p><span style='font-size:10.0pt'>When the Program is made available in source
+code form:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it must be made available under this Agreement; and </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style='font-size:10.0pt'>Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style='font-size:10.0pt'>For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
+
+<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class=MsoNormal></p>
+
+</div>
+
+</body>
+
+</html>
\ No newline at end of file
diff --git a/features/org.eclipse.papyrus.tests.sysml.nattable.feature/feature.properties b/features/org.eclipse.papyrus.tests.sysml.nattable.feature/feature.properties
new file mode 100755
index 0000000..af58253
--- /dev/null
+++ b/features/org.eclipse.papyrus.tests.sysml.nattable.feature/feature.properties
@@ -0,0 +1,138 @@
+# NLS_MESSAGEFORMAT_VAR
+
+# "featureName" property - name of the feature
+featureName=Papyrus Sysml Nattable Tests
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse Modeling Project
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+Eclipse Foundation Software User Agreement\n\
+April 14, 2010\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the\n\
+Eclipse Foundation is provided to you under the terms and conditions of\n\
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
+provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse Foundation source code\n\
+repository ("Repository") in software modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+ - Content may be structured and packaged into modules to facilitate delivering,\n\
+ extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+ plug-in fragments ("Fragments"), and features ("Features").\n\
+ - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
+ in a directory named "plugins".\n\
+ - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+ Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+ Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+ numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+ - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+ named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+ - The top-level (root) directory\n\
+ - Plug-in and Fragment directories\n\
+ - Inside Plug-ins and Fragments packaged as JARs\n\
+ - Sub-directories of the directory named "src" of certain Plug-ins\n\
+ - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
+Update License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties" found within a Feature.\n\
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
+terms and conditions (or references to such terms and conditions) that\n\
+govern your use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+ - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+ - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+ - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+ - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+ - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+\n\Use of Provisioning Technology\n\
+\n\
+The Eclipse Foundation makes available provisioning software, examples of which include,\n\
+but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
+the purpose of allowing users to install software, documentation, information and/or\n\
+other materials (collectively "Installable Software"). This capability is provided with\n\
+the intent of allowing such users to install, extend and update Eclipse-based products.\n\
+Information about packaging Installable Software is available at\n\
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
+\n\
+You may use Provisioning Technology to allow other parties to install Installable Software.\n\
+You shall be responsible for enabling the applicable license agreements relating to the\n\
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
+in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
+making it available in accordance with the Specification, you further acknowledge your\n\
+agreement to, and the acquisition of all necessary rights to permit the following:\n\
+\n\
+ 1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
+ the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
+ extending or updating the functionality of an Eclipse-based product.\n\
+ 2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
+ Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
+ 3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
+ govern the use of the Installable Software ("Installable Software Agreement") and such\n\
+ Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
+ with the Specification. Such Installable Software Agreement must inform the user of the\n\
+ terms and conditions that govern the Installable Software and must solicit acceptance by\n\
+ the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
+ indication of agreement by the user, the provisioning Technology will complete installation\n\
+ of the Installable Software.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use, and\n\
+re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/features/org.eclipse.papyrus.tests.sysml.nattable.feature/feature.xml b/features/org.eclipse.papyrus.tests.sysml.nattable.feature/feature.xml
new file mode 100755
index 0000000..82dd637
--- /dev/null
+++ b/features/org.eclipse.papyrus.tests.sysml.nattable.feature/feature.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.papyrus.tests.sysml.nattable.feature"
+ label="SysML NatTable Feature Tests"
+ version="1.2.0.qualifier"
+ provider-name="Eclipse Modeling Project">
+
+ <copyright url="http://www.eclipse.org/legal/epl-v10.html">
+ Copyright (c) 2011 CEA LIST
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License
+v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <description url="https://eclipse.org/papyrus/">
+ Sysml 1.1 nattable tests.
+ </description>
+
+ <plugin
+ id="org.eclipse.papyrus.sysml.nattable.allocation.tests"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
diff --git a/features/org.eclipse.papyrus.tests.sysml.nattable.feature/license.html b/features/org.eclipse.papyrus.tests.sysml.nattable.feature/license.html
new file mode 100755
index 0000000..c3d34c3
--- /dev/null
+++ b/features/org.eclipse.papyrus.tests.sysml.nattable.feature/license.html
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
+</head>
+
+<body lang="EN-US">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>April 9, 2014</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). 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
+ ("EPL"). 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, "Program" 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 ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").</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 ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</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 "features". Within a Feature, files named "feature.xml" 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 ("Included Features"). Within a Feature, files named "feature.xml" 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 "about.html" ("Abouts"). The terms and conditions governing Features and
+Included Features should be contained in files named "license.html" ("Feature Licenses"). 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 "src" 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 ("Feature Update License") 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 "license" property of files named "feature.properties" found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Eclipse Distribution License Version 1.0 (available at <a href="http://www.eclipse.org/licenses/edl-v10.html">http://www.eclipse.org/licenses/edl-v1.0.html</a>)</li>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+ Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or
+ other materials (collectively "Installable Software"). 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>
+ ("Specification").</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 ("Provisioning Process") in which a user may execute the Provisioning Technology
+ on a machine ("Target Machine") 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 ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target
+ Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+ the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+ indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
+</body>
+</html>
diff --git a/features/org.eclipse.papyrus.tests.sysml.nattable.feature/pom.xml b/features/org.eclipse.papyrus.tests.sysml.nattable.feature/pom.xml
new file mode 100755
index 0000000..4080b7a
--- /dev/null
+++ b/features/org.eclipse.papyrus.tests.sysml.nattable.feature/pom.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.papyrus.sysml</groupId>
+ <artifactId>org.eclipse.papyrus.sysml.features</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.papyrus.tests.sysml.nattable.feature</artifactId>
+ <packaging>eclipse-feature</packaging>
+</project>
\ No newline at end of file
diff --git a/features/pom.xml b/features/pom.xml
new file mode 100755
index 0000000..080c1f6
--- /dev/null
+++ b/features/pom.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<project>
+ <parent>
+ <groupId>org.eclipse.papyrus.sysml</groupId>
+ <artifactId>org.eclipse.papyrus.sysml.parent</artifactId>
+ <version>3.0.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>org.eclipse.papyrus.sysml.features</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ <packaging>pom</packaging>
+ <modules>
+ <!-- <module>org.eclipse.papyrus.tests.sysml.diagram.feature</module>
+ <module>org.eclipse.papyrus.tests.sysml.feature</module>
+ <module>org.eclipse.papyrus.tests.sysml.nattable.feature</module>-->
+ <module>org.eclipse.papyrus.sysml.architecture.feature</module>
+ <module>org.eclipse.papyrus.sysml.diagram.feature</module>
+ <module>org.eclipse.papyrus.sysml.feature</module>
+ <module>org.eclipse.papyrus.sysml.modelexplorer.feature</module>
+ <module>org.eclipse.papyrus.sysml.nattable.feature</module>
+ <module>org.eclipse.papyrus.sysml.properties.feature</module>
+ </modules>
+</project>
diff --git a/org.eclipse.papyrus.sysml.targetplatform.oxygen/.project b/org.eclipse.papyrus.sysml.targetplatform.oxygen/.project
new file mode 100755
index 0000000..7100ac5
--- /dev/null
+++ b/org.eclipse.papyrus.sysml.targetplatform.oxygen/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.sysml.targetplatform.oxygen</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.papyrus.sysml.targetplatform.oxygen/.settings/org.eclipse.core.resources.prefs b/org.eclipse.papyrus.sysml.targetplatform.oxygen/.settings/org.eclipse.core.resources.prefs
new file mode 100755
index 0000000..99f26c0
--- /dev/null
+++ b/org.eclipse.papyrus.sysml.targetplatform.oxygen/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/org.eclipse.papyrus.sysml.targetplatform.oxygen/org.eclipse.papyrus.sysml.targetplatform.oxygen.target b/org.eclipse.papyrus.sysml.targetplatform.oxygen/org.eclipse.papyrus.sysml.targetplatform.oxygen.target
new file mode 100755
index 0000000..003d821
--- /dev/null
+++ b/org.eclipse.papyrus.sysml.targetplatform.oxygen/org.eclipse.papyrus.sysml.targetplatform.oxygen.target
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?pde?>
+<!-- generated with https://github.com/mbarbero/fr.obeo.releng.targetplatform -->
+<target name="Papyrus Oxygen" sequenceNumber="1491471559">
+ <locations>
+ <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
+ <unit id="org.eclipse.platform.feature.group" version="0.0.0"/>
+ <unit id="org.eclipse.rcp.feature.group" version="0.0.0"/>
+ <unit id="org.eclipse.jdt.feature.group" version="0.0.0"/>
+ <unit id="org.eclipse.equinox.p2.discovery.feature.feature.group" version="0.0.0"/>
+ <unit id="org.eclipse.equinox.executable.feature.group" version="0.0.0"/>
+ <unit id="org.eclipse.ocl.uml.feature.group" version="0.0.0"/>
+ <repository id="eclipse-oxygen" location="http://download.eclipse.org/releases/oxygen/"/>
+ </location>
+ <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
+ <unit id="org.eclipse.papyrus.sdk.feature.feature.group" version="0.0.0"/>
+ <unit id="org.eclipse.papyrus.views.properties.model.xwt" version="0.0.0"/>
+ <repository id="eclipse-papyrus-oxygen-nightly" location="http://download.eclipse.org/modeling/mdt/papyrus/updates/nightly/oxygen/main/"/>
+ </location>
+ <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
+ <unit id="org.eclipse.nebula.widgets.nattable.core.feature.feature.group" version="1.5.0.201703192131"/>
+ <unit id="org.eclipse.nebula.widgets.nattable.core.source.feature.feature.group" version="1.5.0.201703192131"/>
+ <unit id="org.eclipse.nebula.widgets.nattable.extension.glazedlists.feature.feature.group" version="1.5.0.201703192131"/>
+ <unit id="org.eclipse.nebula.widgets.nattable.extension.glazedlists.source.feature.feature.group" version="1.5.0.201703192131"/>
+ <unit id="org.eclipse.nebula.widgets.nattable.extension.nebula.feature.feature.group" version="1.1.0.201703192131"/>
+ <unit id="org.eclipse.nebula.widgets.nattable.extension.nebula.source.feature.feature.group" version="1.1.0.201703192131"/>
+ <repository id="nattable" location="http://download.eclipse.org/nattable/releases/1.5.0/repository"/>
+ </location>
+ <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
+ <unit id="org.eclipse.papyrus.junit.feature.feature.group" version="0.0.0"/>
+ <repository id="eclipse-papyrus-developer-master" location="https://hudson.eclipse.org/papyrus/job/Papyrus-Master-Developer/lastSuccessfulBuild/artifact/repository/"/>
+ </location>
+ </locations>
+</target>
diff --git a/org.eclipse.papyrus.sysml.targetplatform.oxygen/org.eclipse.papyrus.sysml.targetplatform.oxygen.tpd b/org.eclipse.papyrus.sysml.targetplatform.oxygen/org.eclipse.papyrus.sysml.targetplatform.oxygen.tpd
new file mode 100755
index 0000000..b15926e
--- /dev/null
+++ b/org.eclipse.papyrus.sysml.targetplatform.oxygen/org.eclipse.papyrus.sysml.targetplatform.oxygen.tpd
@@ -0,0 +1,29 @@
+target "Papyrus Oxygen" with source requirements
+
+location "http://download.eclipse.org/releases/oxygen/" eclipse-oxygen {
+ org.eclipse.platform.feature.group lazy
+ org.eclipse.rcp.feature.group lazy
+ org.eclipse.jdt.feature.group lazy
+ org.eclipse.equinox.p2.discovery.feature.feature.group lazy
+ org.eclipse.equinox.executable.feature.group lazy
+ org.eclipse.ocl.uml.feature.group lazy
+}
+
+location "http://download.eclipse.org/modeling/mdt/papyrus/updates/nightly/oxygen/main/" eclipse-papyrus-oxygen-nightly {
+ org.eclipse.papyrus.sdk.feature.feature.group lazy
+ org.eclipse.papyrus.views.properties.model.xwt lazy
+ }
+
+ location nattable "http://download.eclipse.org/nattable/releases/1.5.0/repository" {
+ org.eclipse.nebula.widgets.nattable.core.feature.feature.group
+ org.eclipse.nebula.widgets.nattable.core.source.feature.feature.group
+ org.eclipse.nebula.widgets.nattable.extension.glazedlists.feature.feature.group
+ org.eclipse.nebula.widgets.nattable.extension.glazedlists.source.feature.feature.group
+ org.eclipse.nebula.widgets.nattable.extension.nebula.feature.feature.group
+ org.eclipse.nebula.widgets.nattable.extension.nebula.source.feature.feature.group
+}
+
+location "https://hudson.eclipse.org/papyrus/job/Papyrus-Master-Developer/lastSuccessfulBuild/artifact/repository/" eclipse-papyrus-developer-master {
+ org.eclipse.papyrus.junit.feature.feature.group lazy
+}
+
\ No newline at end of file
diff --git a/org.eclipse.papyrus.sysml.targetplatform.oxygen/pom.xml b/org.eclipse.papyrus.sysml.targetplatform.oxygen/pom.xml
new file mode 100755
index 0000000..f0d3ad9
--- /dev/null
+++ b/org.eclipse.papyrus.sysml.targetplatform.oxygen/pom.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>org.eclipse.papyrus.sysml.parent</artifactId>
+ <groupId>org.eclipse.papyrus.sysml</groupId>
+ <version>3.0.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.papyrus.sysml.targetplatform.oxygen</artifactId>
+ <packaging>eclipse-target-definition</packaging>
+</project>
\ No newline at end of file
diff --git a/plugins/.project b/plugins/.project
new file mode 100755
index 0000000..ae5eb5b
--- /dev/null
+++ b/plugins/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>plugins</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/.settings/org.eclipse.core.resources.prefs b/plugins/.settings/org.eclipse.core.resources.prefs
new file mode 100755
index 0000000..99f26c0
--- /dev/null
+++ b/plugins/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/plugins/architecture/.project b/plugins/architecture/.project
new file mode 100755
index 0000000..e57b53e
--- /dev/null
+++ b/plugins/architecture/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>architecture</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/architecture/.settings/org.eclipse.core.resources.prefs b/plugins/architecture/.settings/org.eclipse.core.resources.prefs
new file mode 100755
index 0000000..99f26c0
--- /dev/null
+++ b/plugins/architecture/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/plugins/architecture/org.eclipse.papyrus.sysml.architecture/.classpath b/plugins/architecture/org.eclipse.papyrus.sysml.architecture/.classpath
new file mode 100755
index 0000000..eca7bdb
--- /dev/null
+++ b/plugins/architecture/org.eclipse.papyrus.sysml.architecture/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/architecture/org.eclipse.papyrus.sysml.architecture/.project b/plugins/architecture/org.eclipse.papyrus.sysml.architecture/.project
new file mode 100755
index 0000000..58a640e
--- /dev/null
+++ b/plugins/architecture/org.eclipse.papyrus.sysml.architecture/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.sysml.architecture</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/architecture/org.eclipse.papyrus.sysml.architecture/.settings/org.eclipse.jdt.core.prefs b/plugins/architecture/org.eclipse.papyrus.sysml.architecture/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 0000000..0c68a61
--- /dev/null
+++ b/plugins/architecture/org.eclipse.papyrus.sysml.architecture/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/plugins/architecture/org.eclipse.papyrus.sysml.architecture/META-INF/MANIFEST.MF b/plugins/architecture/org.eclipse.papyrus.sysml.architecture/META-INF/MANIFEST.MF
new file mode 100755
index 0000000..42dc9ca
--- /dev/null
+++ b/plugins/architecture/org.eclipse.papyrus.sysml.architecture/META-INF/MANIFEST.MF
@@ -0,0 +1,36 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.papyrus.sysml.architecture;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Require-Bundle: org.eclipse.papyrus.uml.service.types;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.infra.nattable.common;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.uml.architecture;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.papyrus.infra.emf;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.infra.nattable;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.infra.nattable.common;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.infra.services.controlmode;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.infra.services.edit;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.infra.types.rulebased;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.uml.diagram.activity;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.uml.diagram.clazz;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.uml.diagram.communication;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.uml.diagram.composite;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.uml.diagram.interactionoverview;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.uml.diagram.sequence;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.uml.diagram.statemachine;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.uml.diagram.stereotype.edition;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.uml.diagram.timing;bundle-version="[1.3.0,2.0.0)",
+ org.eclipse.papyrus.uml.service.types;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.uml.service.types.ui;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.sysml.diagram.blockdefinition;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.sysml.diagram.internalblock;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.sysml.diagram.parametric;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.sysml.diagram.requirement;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.sysml.nattable.allocation.config;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.papyrus.sysml.nattable.requirement.config;bundle-version="[1.2.0,2.0.0)"
+Export-Package: org.eclipse.papyrus.sysml.architecture
+Bundle-Vendor: %providerName
diff --git a/plugins/architecture/org.eclipse.papyrus.sysml.architecture/about.html b/plugins/architecture/org.eclipse.papyrus.sysml.architecture/about.html
new file mode 100755
index 0000000..bbf2bd6
--- /dev/null
+++ b/plugins/architecture/org.eclipse.papyrus.sysml.architecture/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>January 30, 2017</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/plugins/architecture/org.eclipse.papyrus.sysml.architecture/build.properties b/plugins/architecture/org.eclipse.papyrus.sysml.architecture/build.properties
new file mode 100755
index 0000000..ae2a4cf
--- /dev/null
+++ b/plugins/architecture/org.eclipse.papyrus.sysml.architecture/build.properties
@@ -0,0 +1,9 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ plugin.properties,\
+ model/,\
+ about.html,\
+ icons/
diff --git a/plugins/architecture/org.eclipse.papyrus.sysml.architecture/icons/sysml.gif b/plugins/architecture/org.eclipse.papyrus.sysml.architecture/icons/sysml.gif
new file mode 100755
index 0000000..0876070
--- /dev/null
+++ b/plugins/architecture/org.eclipse.papyrus.sysml.architecture/icons/sysml.gif
Binary files differ
diff --git a/plugins/architecture/org.eclipse.papyrus.sysml.architecture/model/sysml.architecture b/plugins/architecture/org.eclipse.papyrus.sysml.architecture/model/sysml.architecture
new file mode 100755
index 0000000..89fa3f6
--- /dev/null
+++ b/plugins/architecture/org.eclipse.papyrus.sysml.architecture/model/sysml.architecture
@@ -0,0 +1,185 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<architecture:ArchitectureDomain xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" xmlns:gmfdiagrepresentation="http://www.eclipse.org/papyrus/infra/gmfdiag/representation" xmlns:nattablerepresentation="http://www.eclipse.org/papyrus/infra/nattable/representation" xmi:id="_yMTQcMSdEeaKZJ_pGfaSiA" name="Systems Engineering" description="The domain of developing software systems">
+ <stakeholders xmi:id="_yMTQccSdEeaKZJ_pGfaSiA" name="Systems Engineer" description="An engineer interested in system development">
+ <concerns href="#_yMTQcsSdEeaKZJ_pGfaSiA"/>
+ <concerns href="platform:/plugin/org.eclipse.papyrus.uml.architecture/model/uml.architecture#_HQhf4sSYEeaKZJ_pGfaSiA"/>
+ <concerns href="platform:/plugin/org.eclipse.papyrus.uml.architecture/model/uml.architecture#_HQhf48SYEeaKZJ_pGfaSiA"/>
+ <concerns href="#_yMTQc8SdEeaKZJ_pGfaSiA"/>
+ <concerns href="platform:/plugin/org.eclipse.papyrus.uml.architecture/model/uml.architecture#_HQhf5MSYEeaKZJ_pGfaSiA"/>
+ </stakeholders>
+ <concerns xmi:id="_yMTQcsSdEeaKZJ_pGfaSiA" name="Requirements" description="The concern of developing the system's requirements"/>
+ <concerns xmi:id="_yMTQc8SdEeaKZJ_pGfaSiA" name="Parametrics" description="The concern of developing the system's parametrics"/>
+ <contexts xsi:type="architecture:ArchitectureDescriptionLanguage" xmi:id="_yMTQdMSdEeaKZJ_pGfaSiA" name="SysML" description="The Systems Modeling Language" id="org.eclipse.papyrus.sysml.architecture.SysML" icon="platform:/plugin/org.eclipse.papyrus.sysml.architecture/icons/sysml.gif" creationCommandClass="org.eclipse.papyrus.sysml.diagram.common.commands.CreateSysMLModelCommand">
+ <viewpoints xmi:id="_M5u1AMShEeaKZJ_pGfaSiA" name="Systems Analysis" description="A viewpoint allowing systems analysis with SysML" id="org.eclipse.papyrus.sysml.analysis">
+ <representationKinds xsi:type="gmfdiagrepresentation:PapyrusDiagram" href="#_iBC4gHDvEeWh-MssWmCB_A"/>
+ <representationKinds xsi:type="gmfdiagrepresentation:PapyrusDiagram" href="platform:/plugin/org.eclipse.papyrus.uml.architecture/model/uml.architecture#_yeY0sHDvEeWh-MssWmCB_A"/>
+ <representationKinds xsi:type="gmfdiagrepresentation:PapyrusDiagram" href="#_m2D8IHDuEeWh-MssWmCB_A"/>
+ <representationKinds xsi:type="nattablerepresentation:PapyrusTable" href="#_lTE0gHDwEeWh-MssWmCB_A"/>
+ <representationKinds xsi:type="nattablerepresentation:PapyrusTable" href="platform:/plugin/org.eclipse.papyrus.uml.architecture/model/uml.architecture#_d4-QwCT-EeedRqoTe_1ZiA"/>
+ </viewpoints>
+ <viewpoints xmi:id="_PAtvoMShEeaKZJ_pGfaSiA" name="Systems Design" description="A viewpoint allowing systems design with SysML" id="org.eclipse.papyrus.sysml.design">
+ <representationKinds xsi:type="gmfdiagrepresentation:PapyrusDiagram" href="#_m2D8IHDuEeWh-MssWmCB_A"/>
+ <representationKinds xsi:type="gmfdiagrepresentation:PapyrusDiagram" href="#_eHbioHDvEeWh-MssWmCB_A"/>
+ <representationKinds xsi:type="gmfdiagrepresentation:PapyrusDiagram" href="#_eHbipHDvEeWh-MssWmCB_A"/>
+ <representationKinds xsi:type="gmfdiagrepresentation:PapyrusDiagram" href="#_eHbirXDvEeWh-MssWmCB_A"/>
+ <representationKinds xsi:type="gmfdiagrepresentation:PapyrusDiagram" href="platform:/plugin/org.eclipse.papyrus.uml.architecture/model/uml.architecture#_UzcgsHDtEeWh-MssWmCB_A"/>
+ <representationKinds xsi:type="gmfdiagrepresentation:PapyrusDiagram" href="platform:/plugin/org.eclipse.papyrus.uml.architecture/model/uml.architecture#_FuMjYHDuEeWh-MssWmCB_A"/>
+ <representationKinds xsi:type="gmfdiagrepresentation:PapyrusDiagram" href="#_M-Q3sHDuEeWh-MssWmCB_A"/>
+ <representationKinds xsi:type="gmfdiagrepresentation:PapyrusDiagram" href="platform:/plugin/org.eclipse.papyrus.uml.architecture/model/uml.architecture#_zzf4cXDtEeWh-MssWmCB_A"/>
+ <representationKinds xsi:type="gmfdiagrepresentation:PapyrusDiagram" href="platform:/plugin/org.eclipse.papyrus.uml.architecture/model/uml.architecture#_TR15IHDvEeWh-MssWmCB_A"/>
+ <representationKinds xsi:type="gmfdiagrepresentation:PapyrusDiagram" href="platform:/plugin/org.eclipse.papyrus.uml.architecture/model/uml.architecture#_PwD0cHDvEeWh-MssWmCB_A"/>
+ <representationKinds xsi:type="nattablerepresentation:PapyrusTable" href="#_r5y7wHDuEeWh-MssWmCB_A"/>
+ <representationKinds xsi:type="nattablerepresentation:PapyrusTable" href="platform:/plugin/org.eclipse.papyrus.uml.architecture/model/uml.architecture#_P3J1cEb7EeRVGbM3cmVSqQ"/>
+ <representationKinds xsi:type="nattablerepresentation:PapyrusTable" href="platform:/plugin/org.eclipse.papyrus.uml.architecture/model/uml.architecture#_Uz8agHDcEeWh-MssWmCB_A"/>
+ <representationKinds xsi:type="nattablerepresentation:PapyrusTable" href="platform:/plugin/org.eclipse.papyrus.uml.architecture/model/uml.architecture#_P3J1cEa7EeSVGbM3cmVSqQ"/>
+ <representationKinds xsi:type="nattablerepresentation:PapyrusTable" href="platform:/plugin/org.eclipse.papyrus.uml.architecture/model/uml.architecture#_WC1q0P4UEhSRsNBVzfUrzA"/>
+ <representationKinds xsi:type="nattablerepresentation:PapyrusTable" href="platform:/plugin/org.eclipse.papyrus.uml.architecture/model/uml.architecture#_wXztQHDwEwWh-MssWmCB_A"/>
+ <representationKinds xsi:type="nattablerepresentation:PapyrusTable" href="platform:/plugin/org.eclipse.papyrus.uml.architecture/model/uml.architecture#_d4-QwCT-EeedRqoTe_1ZiA"/>
+ </viewpoints>
+ <elementTypes href="platform:/plugin/org.eclipse.papyrus.infra.emf/model/infra-emf.elementtypesconfigurations#_rWI4YHPzEeSnGJwaJWHCSg"/>
+ <elementTypes href="platform:/plugin/org.eclipse.papyrus.infra.gmfdiag.common/model/gmfdiag-common.elementtypesconfigurations#_rWI4YHPzEeSnGJwaJWHCSg"/>
+ <elementTypes href="platform:/plugin/org.eclipse.papyrus.infra.gmfdiag.common/model/notation.elementtypesconfigurations#_ScP1oFYCEeS0WsAAtVmToA"/>
+ <elementTypes href="platform:/plugin/org.eclipse.papyrus.infra.nattable/model/nattable-tablecontents.elementtypesconfigurations#_rWI4YHPzEeSnGJwaJWHCSg"/>
+ <elementTypes href="platform:/plugin/org.eclipse.papyrus.infra.nattable/model/nattable-tablecontext.elementtypesconfigurations#_rWI4YHPzEeSnGJwaJWHCSg"/>
+ <elementTypes href="platform:/plugin/org.eclipse.papyrus.infra.nattable.common/model/nattable-common.elementtypesconfigurations#_rWI4YHPzEeSnGJwaJWHCSg"/>
+ <elementTypes href="platform:/plugin/org.eclipse.papyrus.infra.services.controlmode/model/controlmode.elementtypesconfigurations#_rWI4YHPzEeSnGJwaJWHCSg"/>
+ <elementTypes href="platform:/plugin/org.eclipse.papyrus.infra.services.edit/model/marker.elementtypesconfigurations#_rWI4YHPzEeSnGJwaJWHCSg"/>
+ <elementTypes href="platform:/plugin/org.eclipse.papyrus.infra.types.rulebased/model/rulebased.elementtypesconfigurations#_ScP1oFYCEeS0WsAAtVmToA"/>
+ <elementTypes href="platform:/plugin/org.eclipse.papyrus.uml.diagram.activity/model/activityDiagram.elementtypesconfigurations#_x8G0YGaNEeSyJIsxLao1Pw"/>
+ <elementTypes href="platform:/plugin/org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.elementtypesconfigurations#_rWI4YHPzEeSnGJwaJWHCSg"/>
+ <elementTypes href="platform:/plugin/org.eclipse.papyrus.uml.diagram.communication/model/communicationdiagram-uml.elementtypesconfigurations#_rWI4YHPzEeSnGJwaJWHCSg"/>
+ <elementTypes href="platform:/plugin/org.eclipse.papyrus.uml.diagram.composite/model/compositediagram.elementtypesconfigurations#_tL86sLazEeSbnofizoRSMQ"/>
+ <elementTypes href="platform:/plugin/org.eclipse.papyrus.uml.diagram.interactionoverview/model/interactionOverviewDiagram.elementtypesconfigurations#_x8G0YGaNEeSyJIsxLao1Pw"/>
+ <elementTypes href="platform:/plugin/org.eclipse.papyrus.uml.diagram.statemachine/model/stateMachineDiagram.elementtypesconfigurations#_wYwtMMeDEeSwP_9Vn5UnWg"/>
+ <elementTypes href="platform:/plugin/org.eclipse.papyrus.uml.diagram.stereotype.edition/model/stereotype-edit.elementtypesconfigurations#_ScP1oFYCEeS0WsAAtVmToA"/>
+ <elementTypes href="platform:/plugin/org.eclipse.papyrus.uml.diagram.timing/model/timingdiagram-uml.elementtypesconfigurations#_BJMa0PyeEeWbo9Y7g2MLdw"/>
+ <elementTypes href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/StandardProfile.elementtypesconfigurations#_jfoLkGT_EeSEqNuV3JpFCA"/>
+ <elementTypes href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml-containments.elementtypesconfigurations#_ScP1oFYCEeS0WsAAtVmToA"/>
+ <elementTypes href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/umldi.elementtypesconfigurations#_ScP1oFYCEeS0WsAAtVmToA"/>
+ <elementTypes href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#_ScP1oFYCEeS0WsAAtVmToA"/>
+ <elementTypes href="platform:/plugin/org.eclipse.papyrus.uml.service.types.ui/model/uml-advice.elementtypesconfigurations#_ScP1oFYCEeS0WsAAtVmToA"/>
+ <elementTypes href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml-activities.elementtypesconfigurations#_rRIxgLOjEeWH6Y3Wi2YKxg"/>
+ <elementTypes href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml-allocations.elementtypesconfigurations#_u9Zn4LOjEeWH6Y3Wi2YKxg"/>
+ <elementTypes href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml-blocks.elementtypesconfigurations#_3i038FYIEeS0WsAAtVmToA"/>
+ <elementTypes href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml-constraints.elementtypesconfigurations#_0h9coLOjEeWH6Y3Wi2YKxg"/>
+ <elementTypes href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml-modelelements.elementtypesconfigurations#_2o9lYLOjEeWH6Y3Wi2YKxg"/>
+ <elementTypes href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml-portsandflows.elementtypesconfigurations#_6wATQLOjEeWH6Y3Wi2YKxg"/>
+ <elementTypes href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml-requirements.elementtypesconfigurations#_LYuC4LOtEeWH6Y3Wi2YKxg"/>
+ <elementTypes href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#_649xgFYBEeS0WsAAtVmToA"/>
+ <representationKinds xsi:type="gmfdiagrepresentation:PapyrusDiagram" xmi:id="_m2D8IHDuEeWh-MssWmCB_A" name="Block Definition Diagram" icon="platform:/plugin/org.eclipse.papyrus.sysml.diagram.blockdefinition/icons/obj16/Diagram_BlockDefinition.gif" implementationID="BlockDefinition" creationCommandClass="org.eclipse.papyrus.sysml.diagram.blockdefinition.BlockDefinitionDiagramCreateCommand">
+ <concerns href="platform:/plugin/org.eclipse.papyrus.uml.architecture/model/uml.architecture#_HQhf48SYEeaKZJ_pGfaSiA"/>
+ <modelRules xmi:id="_m2D8IXDuEeWh-MssWmCB_A">
+ <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ </modelRules>
+ <modelRules xmi:id="_m2D8InDuEeWh-MssWmCB_A">
+ <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
+ <stereotypes href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks/Block"/>
+ </modelRules>
+ <owningRules xmi:id="_m2D8I3DuEeWh-MssWmCB_A">
+ <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ </owningRules>
+ <owningRules xmi:id="_m2D8JHDuEeWh-MssWmCB_A">
+ <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
+ <stereotypes href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks/Block"/>
+ </owningRules>
+ <childRules xmi:id="_m2D8JXDuEeWh-MssWmCB_A"/>
+ </representationKinds>
+ <representationKinds xsi:type="gmfdiagrepresentation:PapyrusDiagram" xmi:id="_M-Q3sHDuEeWh-MssWmCB_A" name="Internal Block Diagram" icon="platform:/plugin/org.eclipse.papyrus.sysml.diagram.internalblock/icons/obj16/Diagram_InternalBlock.gif" implementationID="InternalBlock" creationCommandClass="org.eclipse.papyrus.sysml.diagram.internalblock.InternalBlockDiagramCreateCommand">
+ <concerns href="platform:/plugin/org.eclipse.papyrus.uml.architecture/model/uml.architecture#_HQhf48SYEeaKZJ_pGfaSiA"/>
+ <modelRules xmi:id="_M-Q3sXDuEeWh-MssWmCB_A">
+ <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
+ <stereotypes href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks/Block"/>
+ </modelRules>
+ <owningRules xmi:id="_M-Q3snDuEeWh-MssWmCB_A">
+ <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
+ <stereotypes href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks/Block"/>
+ </owningRules>
+ <owningRules xmi:id="_M-Q3s3DuEeWh-MssWmCB_A">
+ <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ <newModelPath xmi:id="_M-Q3tHDuEeWh-MssWmCB_A" creationType="org.eclipse.papyrus.sysml.Block">
+ <feature href="http://www.eclipse.org/uml2/5.0.0/UML#//Package/packagedElement"/>
+ </newModelPath>
+ </owningRules>
+ <childRules xmi:id="_M-Q3tXDuEeWh-MssWmCB_A"/>
+ </representationKinds>
+ <representationKinds xsi:type="gmfdiagrepresentation:PapyrusDiagram" xmi:id="_eHbioHDvEeWh-MssWmCB_A" name="Parametric Diagram" concerns="_yMTQc8SdEeaKZJ_pGfaSiA" icon="platform:/plugin/org.eclipse.papyrus.sysml.diagram.parametric/icons/obj16/Diagram_Parametric.png" implementationID="Parametric" creationCommandClass="org.eclipse.papyrus.sysml.diagram.parametric.ParametricDiagramCreateCommand">
+ <modelRules xmi:id="_eHbioXDvEeWh-MssWmCB_A">
+ <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ </modelRules>
+ <owningRules xmi:id="_eHbionDvEeWh-MssWmCB_A">
+ <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ </owningRules>
+ <childRules xmi:id="_eHbio3DvEeWh-MssWmCB_A"/>
+ </representationKinds>
+ <representationKinds xsi:type="gmfdiagrepresentation:PapyrusDiagram" xmi:id="_eHbipHDvEeWh-MssWmCB_A" name="Parametric Diagram" concerns="_yMTQc8SdEeaKZJ_pGfaSiA" icon="platform:/plugin/org.eclipse.papyrus.sysml.diagram.parametric/icons/obj16/Diagram_Parametric.png" implementationID="Parametric" creationCommandClass="org.eclipse.papyrus.sysml.diagram.parametric.ParametricDiagramCreateCommand">
+ <modelRules xmi:id="_eHbipXDvEeWh-MssWmCB_A">
+ <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
+ <stereotypes href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints/ConstraintBlock"/>
+ </modelRules>
+ <owningRules xmi:id="_eHbipnDvEeWh-MssWmCB_A">
+ <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
+ <stereotypes href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints/ConstraintBlock"/>
+ </owningRules>
+ <owningRules xmi:id="_eHbip3DvEeWh-MssWmCB_A">
+ <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ </owningRules>
+ <childRules xmi:id="_eHbiqHDvEeWh-MssWmCB_A"/>
+ <paletteRules xmi:id="_eHbiqXDvEeWh-MssWmCB_A" permit="false" element="parametric.tool.blockpropertycomposite"/>
+ <paletteRules xmi:id="_eHbiqnDvEeWh-MssWmCB_A" permit="false" element="parametric.tool.reference"/>
+ <paletteRules xmi:id="_eHbiq3DvEeWh-MssWmCB_A" permit="false" element="parametric.tool.value"/>
+ <paletteRules xmi:id="_eHbirHDvEeWh-MssWmCB_A" element=""/>
+ </representationKinds>
+ <representationKinds xsi:type="gmfdiagrepresentation:PapyrusDiagram" xmi:id="_eHbirXDvEeWh-MssWmCB_A" name="Parametric Diagram" concerns="_yMTQc8SdEeaKZJ_pGfaSiA" icon="platform:/plugin/org.eclipse.papyrus.sysml.diagram.parametric/icons/obj16/Diagram_Parametric.png" implementationID="Parametric" creationCommandClass="org.eclipse.papyrus.sysml.diagram.parametric.ParametricDiagramCreateCommand">
+ <modelRules xmi:id="_eHbirnDvEeWh-MssWmCB_A">
+ <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
+ <stereotypes href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks/Block"/>
+ </modelRules>
+ <owningRules xmi:id="_eHbir3DvEeWh-MssWmCB_A">
+ <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ </owningRules>
+ <owningRules xmi:id="_eHbisHDvEeWh-MssWmCB_A">
+ <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
+ <stereotypes href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks/Block"/>
+ </owningRules>
+ <childRules xmi:id="_eHbisXDvEeWh-MssWmCB_A"/>
+ </representationKinds>
+ <representationKinds xsi:type="gmfdiagrepresentation:PapyrusDiagram" xmi:id="_iBC4gHDvEeWh-MssWmCB_A" name="Requirement Diagram" concerns="_yMTQcsSdEeaKZJ_pGfaSiA" icon="platform:/plugin/org.eclipse.papyrus.sysml.diagram.requirement/icons/obj16/Diagram_Requirement.gif" implementationID="RequirementDiagram" creationCommandClass="org.eclipse.papyrus.sysml.diagram.requirement.RequirementDiagramCreateCommand">
+ <modelRules xmi:id="_iBC4gXDvEeWh-MssWmCB_A">
+ <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ </modelRules>
+ <owningRules xmi:id="_iBC4gnDvEeWh-MssWmCB_A">
+ <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ </owningRules>
+ <childRules xmi:id="_iBC4g3DvEeWh-MssWmCB_A"/>
+ </representationKinds>
+ <representationKinds xsi:type="nattablerepresentation:PapyrusTable" xmi:id="_r5y7wHDuEeWh-MssWmCB_A" name="Allocation Table" icon="platform:/plugin/org.eclipse.papyrus.sysml.nattable.allocation.config/icons/table_SysML_Allocation.png" implementationID="PapyrusSysMLAllocationTable">
+ <concerns href="platform:/plugin/org.eclipse.papyrus.uml.architecture/model/uml.architecture#_HQhf48SYEeaKZJ_pGfaSiA"/>
+ <modelRules xmi:id="_r5y7wXDuEeWh-MssWmCB_A">
+ <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ </modelRules>
+ <owningRules xmi:id="_r5y7wnDuEeWh-MssWmCB_A">
+ <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ </owningRules>
+ <configuration href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.allocation.config/resources/allocation.nattableconfiguration#/"/>
+ </representationKinds>
+ <representationKinds xsi:type="nattablerepresentation:PapyrusTable" xmi:id="_lTE0gHDwEeWh-MssWmCB_A" name="Requirement Table" description="" concerns="_yMTQcsSdEeaKZJ_pGfaSiA" icon="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/icons/table_SysML_Requirement.png" implementationID="PapyrusSysMLRequirementTable">
+ <modelRules xmi:id="_lTE0gXDwEeWh-MssWmCB_A">
+ <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ </modelRules>
+ <modelRules xmi:id="_lTE0gnDwEeWh-MssWmCB_A">
+ <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
+ <stereotypes href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements/Requirement"/>
+ </modelRules>
+ <owningRules xmi:id="_lTE0g3DwEeWh-MssWmCB_A">
+ <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ </owningRules>
+ <configuration href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#/"/>
+ </representationKinds>
+ <metamodel href="http://www.eclipse.org/uml2/5.0.0/UML#/"/>
+ <profiles href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ <profiles href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/>
+ <profiles href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints"/>
+ <profiles href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ <profiles href="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations"/>
+ </contexts>
+</architecture:ArchitectureDomain>
diff --git a/plugins/architecture/org.eclipse.papyrus.sysml.architecture/plugin.properties b/plugins/architecture/org.eclipse.papyrus.sysml.architecture/plugin.properties
new file mode 100755
index 0000000..f941ea8
--- /dev/null
+++ b/plugins/architecture/org.eclipse.papyrus.sysml.architecture/plugin.properties
@@ -0,0 +1,14 @@
+# Copyright (c) 2017 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:
+# Maged Elaasar - Initial API and implementation
+#
+#
+
+pluginName = SysML Architecture
+providerName=Eclipse Modeling Project
diff --git a/plugins/architecture/org.eclipse.papyrus.sysml.architecture/plugin.xml b/plugins/architecture/org.eclipse.papyrus.sysml.architecture/plugin.xml
new file mode 100755
index 0000000..17a04ac
--- /dev/null
+++ b/plugins/architecture/org.eclipse.papyrus.sysml.architecture/plugin.xml
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+
+ <extension
+ point="org.eclipse.gmf.runtime.emf.type.core.elementTypeBindings">
+ <clientContext
+ id="org.eclipse.papyrus.sysml.architecture.SysML">
+ <matcher
+ class="org.eclipse.papyrus.sysml.architecture.internal.NoContextEnablementMatcher">
+ </matcher>
+ </clientContext>
+ <binding context="org.eclipse.papyrus.sysml.architecture.SysML">
+ <!-- ElementType that deals with View deletion when their related model element is deleted -->
+ <elementType ref="org.eclipse.gmf.runtime.diagram.core.advice.notationDepdendents"/>
+ <elementType ref="org.eclipse.gmf.runtime.diagram.core.advice.removeBookmarks"/>
+ <!-- Check for attempts to edit read-only objects that cannot reasonably be made writeable. -->
+ <advice ref="org.eclipse.papyrus.infra.emf.readOnlyAdvice" />
+ <!-- Delete markers attached to objects being deleted. -->
+ </binding>
+ </extension>
+
+ <extension point="org.eclipse.papyrus.infra.architecture.models">
+ <model path="model/sysml.architecture"/>
+ </extension>
+
+ <extension
+ point="org.eclipse.papyrus.infra.gmfdiag.common.diagramReconciler">
+ <diagramReconciler
+ diagramType="BlockDefinition"
+ reconcilerClass="org.eclipse.papyrus.sysml.architecture.migration.SysMLDiagramReconciler_1_3_0"
+ source="1.2.0"
+ target="1.3.0">
+ </diagramReconciler>
+ <diagramReconciler
+ diagramType="InternalBlock"
+ reconcilerClass="org.eclipse.papyrus.sysml.architecture.migration.SysMLDiagramReconciler_1_3_0"
+ source="1.2.0"
+ target="1.3.0">
+ </diagramReconciler>
+ <diagramReconciler
+ diagramType="Parametric"
+ reconcilerClass="org.eclipse.papyrus.sysml.architecture.migration.SysMLDiagramReconciler_1_3_0"
+ source="1.2.0"
+ target="1.3.0">
+ </diagramReconciler>
+ <diagramReconciler
+ diagramType="RequirementDiagram"
+ reconcilerClass="org.eclipse.papyrus.sysml.architecture.migration.SysMLDiagramReconciler_1_3_0"
+ source="1.2.0"
+ target="1.3.0">
+ </diagramReconciler>
+ </extension>
+
+ <extension
+ point="org.eclipse.papyrus.infra.nattable.common.tableReconciler">
+ <tableReconciler
+ reconcilerClass="org.eclipse.papyrus.sysml.architecture.migration.SysMLTableReconciler_1_3_0"
+ source="1.0.0"
+ target="1.3.0">
+ </tableReconciler>
+ </extension>
+
+</plugin>
+
diff --git a/plugins/architecture/org.eclipse.papyrus.sysml.architecture/pom.xml b/plugins/architecture/org.eclipse.papyrus.sysml.architecture/pom.xml
new file mode 100755
index 0000000..d6bc7d0
--- /dev/null
+++ b/plugins/architecture/org.eclipse.papyrus.sysml.architecture/pom.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>org.eclipse.papyrus.sysml-architecture</artifactId>
+ <groupId>org.eclipse.papyrus.sysml</groupId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.papyrus.sysml.architecture</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/plugins/architecture/org.eclipse.papyrus.sysml.architecture/src/org/eclipse/papyrus/sysml/architecture/SysMLArchitectureContextIds.java b/plugins/architecture/org.eclipse.papyrus.sysml.architecture/src/org/eclipse/papyrus/sysml/architecture/SysMLArchitectureContextIds.java
new file mode 100755
index 0000000..c87a6e7
--- /dev/null
+++ b/plugins/architecture/org.eclipse.papyrus.sysml.architecture/src/org/eclipse/papyrus/sysml/architecture/SysMLArchitectureContextIds.java
@@ -0,0 +1,26 @@
+/*****************************************************************************
+ * Copyright (c) 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Maged Elaasar - Initial API and Implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.architecture;
+
+/**
+ * The ids of SysML-related architecture contexts
+ *
+ * @since 1.0
+ */
+public class SysMLArchitectureContextIds {
+
+ /**
+ * The id of the SysML architecture context
+ */
+ public static final String SysML = "org.eclipse.papyrus.sysml.architecture.SysML"; //$NON-NLS-1$
+}
diff --git a/plugins/architecture/org.eclipse.papyrus.sysml.architecture/src/org/eclipse/papyrus/sysml/architecture/internal/NoContextEnablementMatcher.java b/plugins/architecture/org.eclipse.papyrus.sysml.architecture/src/org/eclipse/papyrus/sysml/architecture/internal/NoContextEnablementMatcher.java
new file mode 100755
index 0000000..344e823
--- /dev/null
+++ b/plugins/architecture/org.eclipse.papyrus.sysml.architecture/src/org/eclipse/papyrus/sysml/architecture/internal/NoContextEnablementMatcher.java
@@ -0,0 +1,29 @@
+/*****************************************************************************
+ * Copyright (c) 2017 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:
+ *
+ * Maged Elaasar - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.architecture.internal;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher;
+
+/**
+ * A no context matcher used to register element type bindings in the extension points
+ */
+public class NoContextEnablementMatcher implements IElementMatcher {
+
+ @Override
+ public boolean matches(EObject eObject) {
+ return false;
+ }
+}
diff --git a/plugins/architecture/org.eclipse.papyrus.sysml.architecture/src/org/eclipse/papyrus/sysml/architecture/migration/SysMLDiagramReconciler_1_3_0.java b/plugins/architecture/org.eclipse.papyrus.sysml.architecture/src/org/eclipse/papyrus/sysml/architecture/migration/SysMLDiagramReconciler_1_3_0.java
new file mode 100755
index 0000000..468433c
--- /dev/null
+++ b/plugins/architecture/org.eclipse.papyrus.sysml.architecture/src/org/eclipse/papyrus/sysml/architecture/migration/SysMLDiagramReconciler_1_3_0.java
@@ -0,0 +1,90 @@
+/*****************************************************************************
+ * Copyright (c) 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Maged Elaasar - Initial API and Implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.architecture.migration;
+
+import java.util.Collection;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.papyrus.infra.core.architecture.RepresentationKind;
+import org.eclipse.papyrus.infra.core.architecture.merged.MergedArchitectureDescriptionLanguage;
+import org.eclipse.papyrus.infra.architecture.ArchitectureDomainManager;
+import org.eclipse.papyrus.infra.gmfdiag.common.reconciler.DiagramReconciler_1_3_0;
+import org.eclipse.papyrus.infra.gmfdiag.representation.PapyrusDiagram;
+import org.eclipse.papyrus.infra.viewpoints.policy.ProfileUtils;
+import org.eclipse.papyrus.infra.viewpoints.style.PapyrusViewStyle;
+import org.eclipse.papyrus.sysml.architecture.SysMLArchitectureContextIds;
+
+/**
+ * SysML Diagram Reconciler from 1.2.0 to 1.3.0 that switches the old PapyrusViewStyle by
+ * the new PapyrusDiagramStyle
+ */
+public class SysMLDiagramReconciler_1_3_0 extends DiagramReconciler_1_3_0 {
+
+ private static final String BLOCK_DEFINITION_DIAGRAM = "BlockDefinition";
+ private static final String INTERNAL_BLOCK_DIAGRAM = "InternalBlock";
+ private static final String PARAMETRIC_DIAGRAM = "Parametric";
+ private static final String REQUIREMENT_DIAGRAM = "RequirementDiagram";
+
+ /**
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.reconciler.DiagramReconciler_1_3_0#getPapyrusDiagram(org.eclipse.papyrus.infra.viewpoints.style.PapyrusViewStyle)
+ *
+ * @param oldStyle
+ * @return
+ */
+ @Override
+ protected PapyrusDiagram getDiagramKind(Diagram diagram, PapyrusViewStyle oldStyle) {
+ if (oldStyle != null) {
+ org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusDiagram oldDiagramKind =
+ (org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusDiagram) oldStyle.getConfiguration();
+ if (oldDiagramKind != null)
+ return getDiagramKind(oldDiagramKind.getName(), diagram);
+ }
+ if (BLOCK_DEFINITION_DIAGRAM.equals(diagram.getType())) {
+ return getDiagramKind("Block Definition Diagram", diagram);
+ } else if (INTERNAL_BLOCK_DIAGRAM.equals(diagram.getType())) {
+ return getDiagramKind("Internal Block Diagram", diagram);
+ } else if (PARAMETRIC_DIAGRAM.equals(diagram.getType())) {
+ return getDiagramKind("Parametric Diagram", diagram);
+ } else if (REQUIREMENT_DIAGRAM.equals(diagram.getType())) {
+ return getDiagramKind("Requirement Diagram", diagram);
+ }
+ return null;
+ }
+
+ /**
+ * Gets the diagram kind that matches given name and that supports the given diagram
+ */
+ protected PapyrusDiagram getDiagramKind(String name, Diagram diagram) {
+ ArchitectureDomainManager manager = ArchitectureDomainManager.getInstance();
+ MergedArchitectureDescriptionLanguage context = (MergedArchitectureDescriptionLanguage) manager.getArchitectureContextById(SysMLArchitectureContextIds.SysML);
+ for(RepresentationKind pKind : context.getRepresentationKinds()) {
+ if (pKind.getName().equals(name)) {
+ PapyrusDiagram dKind = (PapyrusDiagram) pKind;
+ if (dKind.getModelRules().get(0).getElement().isInstance(diagram.getElement())) {
+ boolean allStereotypesApplied = true;
+ Collection<EClass> appliedStereotypes =
+ ProfileUtils.getProfileHelper().getAppliedStereotypes(diagram.getElement());
+ for (EClass stereotype : dKind.getModelRules().get(0).getStereotypes()) {
+ if (!appliedStereotypes.contains(stereotype)) {
+ allStereotypesApplied = false;
+ }
+ }
+ if (allStereotypesApplied)
+ return dKind;
+ }
+ }
+ }
+ return null;
+ }
+}
diff --git a/plugins/architecture/org.eclipse.papyrus.sysml.architecture/src/org/eclipse/papyrus/sysml/architecture/migration/SysMLTableReconciler_1_3_0.java b/plugins/architecture/org.eclipse.papyrus.sysml.architecture/src/org/eclipse/papyrus/sysml/architecture/migration/SysMLTableReconciler_1_3_0.java
new file mode 100755
index 0000000..a2d4195
--- /dev/null
+++ b/plugins/architecture/org.eclipse.papyrus.sysml.architecture/src/org/eclipse/papyrus/sysml/architecture/migration/SysMLTableReconciler_1_3_0.java
@@ -0,0 +1,113 @@
+/*****************************************************************************
+ * Copyright (c) 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Maged Elaasar - Initial API and Implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.architecture.migration;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.gmf.runtime.common.core.command.AbstractCommand;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.papyrus.infra.architecture.ArchitectureDomainManager;
+import org.eclipse.papyrus.infra.core.architecture.RepresentationKind;
+import org.eclipse.papyrus.infra.core.architecture.merged.MergedArchitectureDescriptionLanguage;
+import org.eclipse.papyrus.infra.nattable.common.reconciler.TableReconciler;
+import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
+import org.eclipse.papyrus.infra.nattable.representation.PapyrusTable;
+import org.eclipse.papyrus.sysml.architecture.SysMLArchitectureContextIds;
+
+/**
+ * UML Table Reconciler from 1.0.0 to 1.1.0 that replaces the old prototype value for tables
+ * with ones based on table kinds
+ */
+public class SysMLTableReconciler_1_3_0 extends TableReconciler {
+
+ private static final String ALLOCATION_TABLE = "Allocation Table";
+ private static final String REQUIREMENT_TABLE = "Requirement Table";
+
+ @Override
+ public ICommand getReconcileCommand(Table table) {
+ if (table.getPrototype() instanceof org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusView) {
+ org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusView oldTableKind =
+ (org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusView) table.getPrototype();
+
+ RepresentationKind newTableKind = null;
+ if (oldTableKind != null) {
+ if (ALLOCATION_TABLE.equals(oldTableKind.getName())) {
+ newTableKind = getTableKind(oldTableKind.getName(), table);
+ } else if (REQUIREMENT_TABLE.equals(oldTableKind.getName())) {
+ newTableKind = getTableKind(oldTableKind.getName(), table);
+ }
+ };
+
+ if (newTableKind != null)
+ return new ReplaceTablePrototypeCommand(table, newTableKind);
+ }
+ return null;
+ }
+
+ protected PapyrusTable getTableKind(String name, Table table) {
+ ArchitectureDomainManager manager = ArchitectureDomainManager.getInstance();
+ MergedArchitectureDescriptionLanguage context = (MergedArchitectureDescriptionLanguage) manager.getArchitectureContextById(SysMLArchitectureContextIds.SysML);
+ for(RepresentationKind pKind : context.getRepresentationKinds()) {
+ if (pKind.getName().equals(name)) {
+ PapyrusTable tKind = (PapyrusTable) pKind;
+ if (tKind.getModelRules().get(0).getElement().isInstance(table.getContext())) {
+ return tKind;
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * A command to replace the old table prototype with the new representation kinds
+ */
+ protected class ReplaceTablePrototypeCommand extends AbstractCommand {
+
+ private Table table;
+ private RepresentationKind newKind;
+
+ public ReplaceTablePrototypeCommand(Table table, RepresentationKind newKind) {
+ super("Replace the papyrus view style from 1.0.0 to 1.1.0");
+ this.table = table;
+ this.newKind = newKind;
+ }
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ table.setPrototype(newKind);
+ return CommandResult.newOKCommandResult();
+ }
+
+ @Override
+ public boolean canUndo() {
+ return false;
+ }
+
+ @Override
+ public boolean canRedo() {
+ return false;
+ }
+
+ @Override
+ protected CommandResult doRedoWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ throw new ExecutionException("Should not be called, canRedo false"); //$NON-NLS-1$
+ }
+
+ @Override
+ protected CommandResult doUndoWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ throw new ExecutionException("Should not be called, canUndo false"); //$NON-NLS-1$
+ }
+ }
+}
diff --git a/plugins/architecture/pom.xml b/plugins/architecture/pom.xml
new file mode 100755
index 0000000..422b44c
--- /dev/null
+++ b/plugins/architecture/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>org.eclipse.papyrus.sysml-architecture</artifactId>
+ <packaging>pom</packaging>
+ <parent>
+ <groupId>org.eclipse.papyrus.sysml</groupId>
+ <artifactId>org.eclipse.papyrus.sysml</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <name>Papyrus SysML Architecture</name>
+ <description>Papyrus SysML Architecture Contexts.</description>
+
+ <modules>
+ <module>org.eclipse.papyrus.sysml.architecture</module>
+ </modules>
+</project>
diff --git a/plugins/diagram/.project b/plugins/diagram/.project
new file mode 100755
index 0000000..bfe6ec1
--- /dev/null
+++ b/plugins/diagram/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>diagram</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/diagram/.settings/org.eclipse.core.resources.prefs b/plugins/diagram/.settings/org.eclipse.core.resources.prefs
new file mode 100755
index 0000000..99f26c0
--- /dev/null
+++ b/plugins/diagram/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/.classpath b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/.classpath
new file mode 100755
index 0000000..0c22b5d
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/.classpath
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="src-gen"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/.project b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/.project
new file mode 100755
index 0000000..b7e1bee
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/.project
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.sysml.diagram.blockdefinition</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>
+ <buildCommand>
+ <name>org.eclipse.oomph.version.VersionBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>check.maven.pom</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>ignore.lower.bound.dependency.ranges</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>release.path</key>
+ <value>/org.eclipse.papyrus.releng.main.release/release.xml</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.oomph.version.VersionNature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/.settings/net.sf.jautodoc.prefs b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/.settings/net.sf.jautodoc.prefs
new file mode 100755
index 0000000..15278fc
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/.settings/net.sf.jautodoc.prefs
@@ -0,0 +1,7 @@
+#Thu Apr 21 13:16:39 CEST 2011
+add_header=true
+eclipse.preferences.version=1
+header_text=/*****************************************************************************\r\n * Copyright (c) 2011 CEA LIST.\r\n *\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http\://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors\:\r\n *\t\t\r\n *\t\tCEA LIST - Initial API and implementation\r\n *\r\n *****************************************************************************/
+project_specific_settings=true
+replace_header=true
+replacements=<?xml version\="1.0" standalone\="yes"?>\n\n<replacements>\n<replacement key\="get" scope\="1" mode\="0">Gets the</replacement>\n<replacement key\="set" scope\="1" mode\="0">Sets the</replacement>\n<replacement key\="add" scope\="1" mode\="0">Adds the</replacement>\n<replacement key\="edit" scope\="1" mode\="0">Edits the</replacement>\n<replacement key\="remove" scope\="1" mode\="0">Removes the</replacement>\n<replacement key\="init" scope\="1" mode\="0">Inits the</replacement>\n<replacement key\="parse" scope\="1" mode\="0">Parses the</replacement>\n<replacement key\="create" scope\="1" mode\="0">Creates the</replacement>\n<replacement key\="build" scope\="1" mode\="0">Builds the</replacement>\n<replacement key\="is" scope\="1" mode\="0">Checks if is</replacement>\n<replacement key\="print" scope\="1" mode\="0">Prints the</replacement>\n<replacement key\="has" scope\="1" mode\="0">Checks for</replacement>\n</replacements>\n\n
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/.settings/org.eclipse.jdt.core.prefs b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 0000000..94d61f0
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,291 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/.settings/org.eclipse.jdt.ui.prefs b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/.settings/org.eclipse.jdt.ui.prefs
new file mode 100755
index 0000000..954281d
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,68 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+formatter_profile=_Papyrus
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/.settings/org.eclipse.pde.api.tools.prefs b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100755
index 0000000..23fb95e
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/.settings/org.eclipse.pde.api.tools.prefs
@@ -0,0 +1,98 @@
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+API_USE_SCAN_FIELD_SEVERITY=Error
+API_USE_SCAN_METHOD_SEVERITY=Error
+API_USE_SCAN_TYPE_SEVERITY=Error
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Ignore
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_ANNOTATION=Ignore
+INVALID_JAVADOC_TAG=Ignore
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Ignore
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+MISSING_EE_DESCRIPTIONS=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=Enabled
+eclipse.preferences.version=1
+incompatible_api_component_version=Error
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Warning
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/META-INF/MANIFEST.MF b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/META-INF/MANIFEST.MF
new file mode 100755
index 0000000..cfcdd23
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/META-INF/MANIFEST.MF
@@ -0,0 +1,29 @@
+Manifest-Version: 1.0
+Export-Package: org.eclipse.papyrus.sysml.diagram.blockdefinition,
+ org.eclipse.papyrus.sysml.diagram.blockdefinition.command,
+ org.eclipse.papyrus.sysml.diagram.blockdefinition.dnd.helper,
+ org.eclipse.papyrus.sysml.diagram.blockdefinition.edit.part,
+ org.eclipse.papyrus.sysml.diagram.blockdefinition.edit.policy,
+ org.eclipse.papyrus.sysml.diagram.blockdefinition.factory,
+ org.eclipse.papyrus.sysml.diagram.blockdefinition.helper.advice,
+ org.eclipse.papyrus.sysml.diagram.blockdefinition.messages,
+ org.eclipse.papyrus.sysml.diagram.blockdefinition.part,
+ org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences,
+ org.eclipse.papyrus.sysml.diagram.blockdefinition.provider,
+ org.eclipse.papyrus.sysml.diagram.blockdefinition.ui,
+ org.eclipse.papyrus.sysml.diagram.blockdefinition.utils
+Require-Bundle: org.eclipse.papyrus.uml.diagram.clazz;bundle-version="[3.0.0,4.0.0)";visibility:=reexport,
+ org.eclipse.gmf.runtime.diagram.ui.providers;bundle-version="[1.7.0,2.0.0)",
+ org.eclipse.papyrus.sysml.diagram.common;bundle-version="[2.0.0,3.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.sysml.service.types;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.infra.gmfdiag.navigation;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.infra.internationalization.utils;bundle-version="[1.0.0,2.0.0)"
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 3.0.0.qualifier
+Bundle-Localization: plugin
+Bundle-Name: %pluginName
+Bundle-Activator: org.eclipse.papyrus.sysml.diagram.blockdefinition.Activator
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.papyrus.sysml.diagram.blockdefinition;singleton:=true
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/about.html b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/about.html
new file mode 100755
index 0000000..d35d5ae
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/build.properties b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/build.properties
new file mode 100755
index 0000000..ca8d845
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/build.properties
@@ -0,0 +1,15 @@
+bin.includes = META-INF/,\
+ .,\
+ icons/,\
+ palettes/,\
+ plugin.properties,\
+ messages.properties,\
+ about.html,\
+ plugin.xml,\
+ model/
+output..=bin/
+src.includes = about.html,\
+ model/,\
+ src/
+source..=src/,src-gen/
+bin..=bin/
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/icons/obj16/Diagram_BlockDefinition.gif b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/icons/obj16/Diagram_BlockDefinition.gif
new file mode 100755
index 0000000..103060a
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/icons/obj16/Diagram_BlockDefinition.gif
Binary files differ
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/icons/obj16/InstanceLink.gif b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/icons/obj16/InstanceLink.gif
new file mode 100755
index 0000000..d9712d1
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/icons/obj16/InstanceLink.gif
Binary files differ
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/icons/obj16/Link.gif b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/icons/obj16/Link.gif
new file mode 100755
index 0000000..13fb22e
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/icons/obj16/Link.gif
Binary files differ
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/messages.properties b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/messages.properties
new file mode 100755
index 0000000..0fbb20a
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/messages.properties
@@ -0,0 +1,2 @@
+Notification_Drop_Title=Drop in diagram
+Notification_Drop_UMLAssociationWarning=The Association ({0}) can not be dropped in this diagram because it is not a SysML Association.\nIt was probably not created in a SysML Diagram.
\ No newline at end of file
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/model/SysML.BlockDefinition.idgen b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/model/SysML.BlockDefinition.idgen
new file mode 100755
index 0000000..5d6ee89
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/model/SysML.BlockDefinition.idgen
@@ -0,0 +1,498 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<idgen:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:gmfgen="http://www.eclipse.org/gmf/2009/GenModel" xmlns:idgen="http://www.eclipse.org/papyrus/0.7.0/idgen" name="BlockDefinition" type="BlockDefinition" icon="icons/obj16/Diagram_BlockDefinition.gif" label="SysML Block Definition Diagram" language="sysml" javaPackagePrefix="org.eclipse.papyrus.sysml.diagram.blockdefinition" javaClassPrefix="BlockDefinitionDiagram" createCommandLabel="Create a new Block Definition Diagram">
+ <diagramEditPart name="Diagram edit part">
+ <behaviors javaClassQualifiedName="org.eclipse.papyrus.uml.diagram.common.editpolicies.DuplicatePasteEditPolicy" key="DuplicatePasteEditPolicy.PASTE_ROLE"/>
+ <behaviors javaClassQualifiedName="org.eclipse.papyrus.sysml.diagram.blockdefinition.edit.policy.CustomDiagramDragDropEditPolicy" key="EditPolicyRoles.DRAG_DROP_ROLE"/>
+ <behaviors name="" javaClassQualifiedName="org.eclipse.papyrus.sysml.diagram.blockdefinition.edit.policy.ShowHideRelatedLinkEditPolicy" key="ShowHideRelatedLinkEditPolicy"/>
+ </diagramEditPart>
+ <inheritedDiagrams name="ClassDiagram" viewProviderClassQualifiedName="" editPartProviderClassQualifiedName="" dndEditPolicyClassQualifiedName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy">
+ <genInheritedEditor href="../../org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen#PapyrusUMLClassDiagram"/>
+ <genNodes>
+ <genNode xsi:type="gmfgen:GenTopLevelNode" href="../../org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@topLevelNodes.7"/>
+ </genNodes>
+ <genNodes generatePreferencePage="false" generateTool="false">
+ <genNode xsi:type="gmfgen:GenChildNode" href="../../org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@childNodes.26"/>
+ </genNodes>
+ <genNodes>
+ <genNode xsi:type="gmfgen:GenTopLevelNode" href="../../org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@topLevelNodes.9"/>
+ </genNodes>
+ <genNodes generatePreferencePage="false" generateTool="false">
+ <genNode xsi:type="gmfgen:GenChildNode" href="../../org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@childNodes.28"/>
+ </genNodes>
+ <genNodes>
+ <genNode xsi:type="gmfgen:GenTopLevelNode" href="../../org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@topLevelNodes.3"/>
+ </genNodes>
+ <genNodes generatePreferencePage="false" generateTool="false">
+ <genNode xsi:type="gmfgen:GenChildNode" href="../../org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@childNodes.22"/>
+ </genNodes>
+ <genNodes>
+ <genNode xsi:type="gmfgen:GenTopLevelNode" href="../../org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@topLevelNodes.13"/>
+ </genNodes>
+ <genNodes generatePreferencePage="false" generateTool="false">
+ <genNode xsi:type="gmfgen:GenChildNode" href="../../org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@childNodes.33"/>
+ </genNodes>
+ <genNodes>
+ <genNode xsi:type="gmfgen:GenTopLevelNode" href="../../org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@topLevelNodes.14"/>
+ </genNodes>
+ <genNodes generatePreferencePage="false" generateTool="false">
+ <genNode xsi:type="gmfgen:GenChildNode" href="../../org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@childNodes.32"/>
+ </genNodes>
+ <genLinks name="Comment / Constraint link" generatePreferencePage="false">
+ <genLink href="../../org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@links.16"/>
+ </genLinks>
+ <genLinks generatePreferencePage="false" generateTool="false">
+ <genLink href="../../org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@links.17"/>
+ </genLinks>
+ </inheritedDiagrams>
+ <customJavaClasses customEditPolicyProvider="org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.CustomEditPolicyProvider" customPreferenceInitializer="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.CustomPreferenceInitializer"/>
+ <usedCustomNodes href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#shape_uml_constraint_as_label"/>
+ <usedCustomNodes href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#shape_uml_enumerationliteral_as_label"/>
+ <usedCustomNodes href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#shape_uml_operation_as_label"/>
+ <usedCustomNodes href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_flowport_as_label"/>
+ <usedCustomNodes href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#shape_uml_port_as_label"/>
+ <usedCustomNodes href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_constraintproperty_as_label"/>
+ <usedCustomNodes href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_flowproperty_as_label"/>
+ <usedCustomNodes href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_part_as_label"/>
+ <usedCustomNodes href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_reference_as_label"/>
+ <usedCustomNodes href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_value_as_label"/>
+ <usedCustomNodes href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#shape_uml_property_as_label"/>
+ <usedCustomNodes href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#shape_uml_reception_as_label"/>
+ <usedCustomNodes href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#shape_uml_actor_as_classifier"/>
+ <usedCustomNodes href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#shape_uml_enumeration_as_classifier"/>
+ <usedCustomNodes href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#shape_uml_primitivetype_as_classifier"/>
+ <usedCustomNodes href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_valuetype_as_classifier"/>
+ <usedCustomNodes href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#shape_uml_datatype_as_classifier"/>
+ <usedCustomNodes href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_flowspecification_as_classifier"/>
+ <usedCustomNodes href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#shape_uml_interface_as_classifier"/>
+ <usedCustomNodes href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#shape_uml_signal_as_classifier"/>
+ <usedCustomNodes href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_constraintblock_as_classifier"/>
+ <usedCustomNodes href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_block_as_classifier"/>
+ <usedCustomNodes href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_dimension_as_classifier"/>
+ <usedCustomNodes href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_unit_as_classifier"/>
+ <usedCustomNodes href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_flowport_as_affixed"/>
+ <usedCustomNodes href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#shape_uml_port_as_affixed"/>
+ <usedCustomEdges href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#link_sysml_association"/>
+ <usedCustomEdges href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#link_uml_usage"/>
+ <usedCustomEdges href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#link_uml_interfacerealization"/>
+ <usedCustomEdges href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#link_uml_dependency"/>
+ <usedCustomEdges href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#link_uml_generalization"/>
+ <usedCustomDecorations href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#compartment_uml_enumerationliteral_as_list"/>
+ <usedCustomDecorations href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#compartment_uml_operation_as_list"/>
+ <usedCustomDecorations href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#compartment_uml_port_as_list"/>
+ <usedCustomDecorations href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#compartment_uml_property_as_list"/>
+ <usedCustomDecorations href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#compartment_sysml_constraint_as_list"/>
+ <usedCustomDecorations href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#compartment_sysml_flowport_as_list"/>
+ <usedCustomDecorations href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#compartment_sysml_flowproperty_as_list"/>
+ <usedCustomDecorations href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#compartment_sysml_parameter_as_list"/>
+ <usedCustomDecorations href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#compartment_sysml_part_as_list"/>
+ <usedCustomDecorations href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#compartment_sysml_reference_as_list"/>
+ <usedCustomDecorations href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#compartment_sysml_value_as_list"/>
+ <usedCustomDecorations href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#compartment_sysml_property_as_list"/>
+ <usedCustomDecorations href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#affixedlabel_uml_namedelement_name"/>
+ <usedCustomDecorations href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#affixedlabel_uml_appliedstereotype"/>
+ <usedCustomDecorations href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#affixedlabel_uml_port_label"/>
+ <usedCustomDecorations href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#affixedlabel_sysml_flowport_label"/>
+ <usedCustomDecorations href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#label_uml_namedelement_name"/>
+ <usedCustomDecorations href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#label_sysml_block_name"/>
+ <usedCustomDecorations href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#label_sysml_constraintblock_name"/>
+ <usedCustomDecorations href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#label_sysml_dimension_name"/>
+ <usedCustomDecorations href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#label_sysml_flowspecification_name"/>
+ <usedCustomDecorations href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#label_sysml_unit_name"/>
+ <usedCustomDecorations href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#label_sysml_valuetype_name"/>
+ <usedCustomDecorations href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#linklabel_uml_appliedstereotype"/>
+ <usedCustomDecorations href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#linklabel_uml_namedelement_name"/>
+ <usedCustomDecorations href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#linklabel_uml_association_source_multiplicity"/>
+ <usedCustomDecorations href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#linklabel_uml_association_source_role"/>
+ <usedCustomDecorations href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#linklabel_uml_association_target_multiplicity"/>
+ <usedCustomDecorations href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#linklabel_uml_association_target_role"/>
+ <diagramConfig>
+ <contains xsi:type="idgen:GraphicalTypeDiagramRef">
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_block_as_classifier"/>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_flowport_as_affixed"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#shape_uml_port_as_affixed"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#compartment_sysml_property_as_list"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#compartment_sysml_part_as_list"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#compartment_sysml_reference_as_list"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#compartment_uml_port_as_list"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#compartment_sysml_flowport_as_list"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#compartment_uml_operation_as_list"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#compartment_sysml_constraint_as_list"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#compartment_sysml_value_as_list"/>
+ </contains>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_constraintblock_as_classifier"/>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#compartment_sysml_parameter_as_list"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#compartment_sysml_constraint_as_list"/>
+ </contains>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_flowspecification_as_classifier"/>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#compartment_sysml_flowproperty_as_list"/>
+ </contains>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_dimension_as_classifier"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#shape_uml_datatype_as_classifier"/>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#compartment_uml_property_as_list"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#compartment_uml_operation_as_list"/>
+ </contains>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_unit_as_classifier"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_valuetype_as_classifier"/>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#compartment_uml_property_as_list"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#compartment_uml_operation_as_list"/>
+ </contains>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#shape_uml_actor_as_classifier"/>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#compartment_uml_property_as_list"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#compartment_uml_operation_as_list"/>
+ </contains>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#shape_uml_enumeration_as_classifier"/>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#compartment_uml_enumerationliteral_as_list"/>
+ </contains>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#shape_uml_interface_as_classifier"/>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#compartment_uml_property_as_list"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#compartment_uml_operation_as_list"/>
+ </contains>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#shape_uml_primitivetype_as_classifier"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#shape_uml_signal_as_classifier"/>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#compartment_uml_property_as_list"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#compartment_uml_operation_as_list"/>
+ </contains>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#link_sysml_association"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#link_uml_usage"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#link_uml_interfacerealization"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#link_uml_dependency"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#link_uml_generalization"/>
+ </contains>
+ <contains xsi:type="idgen:LegacyTypeRef" legacyRef="//@inheritedDiagrams.0/@genNodes.2">
+ <contains xsi:type="idgen:LegacyCompartmentRef">
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_block_as_classifier"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_constraintblock_as_classifier"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_flowspecification_as_classifier"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_dimension_as_classifier"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#shape_uml_datatype_as_classifier"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_unit_as_classifier"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_valuetype_as_classifier"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#shape_uml_actor_as_classifier"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#shape_uml_enumeration_as_classifier"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#shape_uml_interface_as_classifier"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#shape_uml_primitivetype_as_classifier"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#shape_uml_signal_as_classifier"/>
+ </contains>
+ <legacyRef href="../../org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@compartments.31"/>
+ </contains>
+ </contains>
+ <contains xsi:type="idgen:LegacyTypeRef" legacyRef="//@inheritedDiagrams.0/@genNodes.3">
+ <contains xsi:type="idgen:LegacyCompartmentRef">
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_block_as_classifier"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_constraintblock_as_classifier"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_flowspecification_as_classifier"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_dimension_as_classifier"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#shape_uml_datatype_as_classifier"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_unit_as_classifier"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_valuetype_as_classifier"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#shape_uml_actor_as_classifier"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#shape_uml_enumeration_as_classifier"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#shape_uml_interface_as_classifier"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#shape_uml_primitivetype_as_classifier"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#shape_uml_signal_as_classifier"/>
+ </contains>
+ <legacyRef href="../../org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@compartments.13"/>
+ </contains>
+ </contains>
+ <contains xsi:type="idgen:LegacyTypeRef" legacyRef="//@inheritedDiagrams.0/@genNodes.0">
+ <contains xsi:type="idgen:LegacyCompartmentRef">
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_block_as_classifier"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_constraintblock_as_classifier"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_flowspecification_as_classifier"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_dimension_as_classifier"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#shape_uml_datatype_as_classifier"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_unit_as_classifier"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_valuetype_as_classifier"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#shape_uml_actor_as_classifier"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#shape_uml_enumeration_as_classifier"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#shape_uml_interface_as_classifier"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#shape_uml_primitivetype_as_classifier"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#shape_uml_signal_as_classifier"/>
+ </contains>
+ <legacyRef href="../../org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@compartments.30"/>
+ </contains>
+ </contains>
+ <contains xsi:type="idgen:LegacyTypeRef" legacyRef="//@inheritedDiagrams.0/@genNodes.1">
+ <contains xsi:type="idgen:LegacyCompartmentRef">
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_block_as_classifier"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_constraintblock_as_classifier"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_flowspecification_as_classifier"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_dimension_as_classifier"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#shape_uml_datatype_as_classifier"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_unit_as_classifier"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_valuetype_as_classifier"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#shape_uml_actor_as_classifier"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#shape_uml_enumeration_as_classifier"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#shape_uml_interface_as_classifier"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#shape_uml_primitivetype_as_classifier"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#shape_uml_signal_as_classifier"/>
+ </contains>
+ <legacyRef href="../../org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@compartments.12"/>
+ </contains>
+ </contains>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#compartment_sysml_flowproperty_as_list"/>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_flowproperty_as_label"/>
+ </contains>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#compartment_uml_property_as_list"/>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#shape_uml_port_as_label"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#shape_uml_property_as_label"/>
+ </contains>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#compartment_sysml_parameter_as_list"/>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#shape_uml_property_as_label"/>
+ </contains>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#compartment_uml_port_as_list"/>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#shape_uml_port_as_label"/>
+ </contains>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#compartment_sysml_flowport_as_list"/>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_flowport_as_label"/>
+ </contains>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#compartment_uml_operation_as_list"/>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#shape_uml_operation_as_label"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#shape_uml_reception_as_label"/>
+ </contains>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#compartment_sysml_constraint_as_list"/>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#shape_uml_constraint_as_label"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_constraintproperty_as_label"/>
+ </contains>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#compartment_uml_enumerationliteral_as_list"/>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#shape_uml_enumerationliteral_as_label"/>
+ </contains>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#compartment_sysml_property_as_list"/>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_flowport_as_label"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#shape_uml_port_as_label"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#shape_uml_property_as_label"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_part_as_label"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_reference_as_label"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_value_as_label"/>
+ </contains>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#compartment_sysml_part_as_list"/>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_part_as_label"/>
+ </contains>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#compartment_sysml_reference_as_list"/>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_reference_as_label"/>
+ </contains>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#compartment_sysml_value_as_list"/>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_value_as_label"/>
+ </contains>
+ </contains>
+ </diagramConfig>
+ <preferences name="DiagramPreferences">
+ <pages name="Dependency"/>
+ </preferences>
+</idgen:Diagram>
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/org.eclipse.papyrus.sysml.diagram.blockdefinition.iml b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/org.eclipse.papyrus.sysml.diagram.blockdefinition.iml
new file mode 100755
index 0000000..c819b20
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/org.eclipse.papyrus.sysml.diagram.blockdefinition.iml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+ <component name="NewModuleRootManager" inherit-compiler-output="false">
+ <output url="file://$MODULE_DIR$/bin" />
+ <exclude-output />
+ <content url="file://$MODULE_DIR$">
+ <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/src-gen" isTestSource="false" />
+ </content>
+ <orderEntry type="jdk" jdkName="JavaSE-1.6" jdkType="JavaSDK" />
+ <orderEntry type="module" module-name="org.eclipse.papyrus.uml.diagram.clazz" />
+ <orderEntry type="module" module-name="org.eclipse.papyrus.sysml.diagram.common" />
+ <orderEntry type="module" module-name="org.eclipse.papyrus.sysml.service.types" />
+ <orderEntry type="module" module-name="org.eclipse.papyrus.infra.gmfdiag.navigation" />
+ <orderEntry type="module" module-name="org.eclipse.papyrus.infra.internationalization.utils" />
+ <orderEntry type="library" name="ECLIPSE" level="application" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ </component>
+</module>
\ No newline at end of file
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/palettes/PapyrusSYSMLBlockDefinitionDiagram.paletteconfiguration b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/palettes/PapyrusSYSMLBlockDefinitionDiagram.paletteconfiguration
new file mode 100755
index 0000000..8808fa8
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/palettes/PapyrusSYSMLBlockDefinitionDiagram.paletteconfiguration
@@ -0,0 +1,274 @@
+<?xml version="1.0" encoding="ASCII"?>
+<paletteconfiguration:PaletteConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:elementtypesconfigurations="http://www.eclipse.org/papyrus/infra/elementtypesconfigurations/1.2" xmlns:paletteconfiguration="http://www.eclipse.org/papyrus/diagram/paletteconfiguration/0.8" id="org.eclipse.papyrus.sysml.diagram.blockdefinition.paletteconfiguration" label="org.eclipse.papyrus.sysml.diagram.blockdefinition Palette" description="">
+ <drawerConfigurations id="org.eclipse.papyrus.sysml.diagram.blockdefinition.SYSML_BlockDefinition__Associations" label="Associations" description="">
+ <icon pluginID="org.eclipse.gmf.runtime.diagram.ui" iconPath="/icons/group.gif"/>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="blockdefinition_associations.tool.association_none" label="Association" description="Create a new Association" kind="ConnectionTool">
+ <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/Association.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.AssociationNone"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="blockdefinition_associations.tool.association_none_directed" label="DirectedAssociation" description="Create a new DirectedAssociation" kind="ConnectionTool">
+ <icon pluginID="org.eclipse.papyrus.uml.service.types" iconPath="/icons/Association_none_directed.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.AssociationNoneDirected"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="blockdefinition_associations.tool.association_composite" label="Composition" description="Create a new Composition" kind="ConnectionTool">
+ <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/Association_composite.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.AssociationComposite"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="blockdefinition_associations.tool.association_composite_directed" label="DirectedComposition" description="Create a new DirectedComposition" kind="ConnectionTool">
+ <icon pluginID="org.eclipse.papyrus.uml.service.types" iconPath="/icons/Association_composite_directed.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.AssociationCompositeDirected"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="blockdefinition_associations.tool.association_shared" label="Aggregation" description="Create a new Aggregation" kind="ConnectionTool">
+ <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/Association_shared.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.AssociationShared"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="blockdefinition_associations.tool.association_shared_directed" label="DirectedAggregation" description="Create a new DirectedAggregation" kind="ConnectionTool">
+ <icon pluginID="org.eclipse.papyrus.uml.service.types" iconPath="/icons/Association_shared_directed.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.AssociationSharedDirected"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="blockdefinition_associations.tool.instance_specification_link" label="InstanceSpecificationLink" description="Create a new InstanceSpecificationLink" kind="ConnectionTool">
+ <icon pluginID="org.eclipse.papyrus.sysml.diagram.blockdefinition" iconPath="/icons/obj16/InstanceLink.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/umldi.elementtypesconfigurations#org.eclipse.papyrus.umldi.InstanceSpecification_Edge"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ </drawerConfigurations>
+ <drawerConfigurations id="org.eclipse.papyrus.sysml.diagram.blockdefinition.SYSML_BlockDefinition__ModelElements" label="ModelElements" description="">
+ <icon pluginID="org.eclipse.gmf.runtime.diagram.ui" iconPath="/icons/group.gif"/>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="blockdefinition_modelelements.tool.package" label="Package" description="Create a new Package">
+ <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/Package.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Package"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="blockdefinition_modelelements.tool.actor" label="Actor" description="Create a new Actor">
+ <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/Actor.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Actor"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="blockdefinition_modelelements.tool.block" label="Block" description="Create a new Block">
+ <icon pluginID="org.eclipse.papyrus.sysml" iconPath="/icons/blocks/Block.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.Block"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="blockdefinition_modelelements.tool.signal" label="Signal" description="Create a new Signal">
+ <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/Signal.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Signal"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="blockdefinition_modelelements.tool.operation" label="Operation" description="Create a new Operation">
+ <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/Operation.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Operation"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="blockdefinition_modelelements.tool.reception" label="Reception" description="Create a new Reception">
+ <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/Reception.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Reception"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="blockdefinition_modelelements.tool.property" label="Property" description="Create a new Property">
+ <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/Property.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Property"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="blockdefinition_modelelements.tool.part" label="Part" description="Create a new Part">
+ <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/Property.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.PartProperty"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="blockdefinition_modelelements.tool.reference" label="Reference" description="Create a new Reference">
+ <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/Property.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.ReferenceProperty"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="blockdefinition_modelelements.tool.actorpart" label="ActorPart" description="Create a new ActorPart">
+ <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/Property.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.ActorPartProperty"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="blockdefinition_modelelements.tool.value" label="Value" description="Create a new Value">
+ <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/Property.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.ValueProperty"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="blockdefinition_modelelements.tool.instancespecification" label="InstanceSpecification" description="Create a new InstanceSpecification">
+ <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/InstanceSpecification.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.InstanceSpecification"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="blockdefinition_modelelements.tool.slot" label="Slot" description="Create a new Slot">
+ <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/Slot.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Slot"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="blockdefinition_modelelements.tool.dependency" label="Dependency" description="Create a new Dependency" kind="ConnectionTool">
+ <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/Dependency.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Dependency"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="blockdefinition_modelelements.tool.generalization" label="Generalization" description="Create a new Generalization" kind="ConnectionTool">
+ <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/Generalization.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Generalization"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ </drawerConfigurations>
+ <drawerConfigurations id="org.eclipse.papyrus.sysml.diagram.blockdefinition.SYSML_BlockDefinition__PortAndFlowTools" label="PortAndFlows">
+ <icon pluginID="org.eclipse.gmf.runtime.diagram.ui" iconPath="/icons/group.gif"/>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="blockdefinition_portandflows.tool.port" label="Port" description="Create a new Port">
+ <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/Port.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Port"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="blockdefinition_portandflows.tool.flowport" label="FlowPort" description="Create a new FlowPort">
+ <icon pluginID="org.eclipse.papyrus.sysml" iconPath="/icons/portandflows/FlowPort.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.FlowPort"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="blockdefinition_portandflows.tool.flowspecification" label="FlowSpecification" description="Create a new FlowSpecification">
+ <icon pluginID="org.eclipse.papyrus.sysml" iconPath="/icons/portandflows/FlowSpecification.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.FlowSpecification"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="blockdefinition_portandflows.tool.flowproperty" label="FlowProperty" description="Create a new FlowProperty">
+ <icon pluginID="org.eclipse.papyrus.sysml" iconPath="/icons/portandflows/FlowProperty.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.FlowProperty"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="blockdefinition_portandflows.tool.interface" label="Interface" description="Create a new Interface">
+ <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/Interface.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Interface"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="blockdefinition_portandflows.tool.interfacerealization" label="InterfaceRealization" description="Create a new InterfaceRealization" kind="ConnectionTool">
+ <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/InterfaceRealization.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.InterfaceRealization"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="blockdefinition_portandflows.tool.usage" label="Usage" description="Create a new Usage" kind="ConnectionTool">
+ <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/Usage.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Usage"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ </drawerConfigurations>
+ <drawerConfigurations id="org.eclipse.papyrus.sysml.diagram.blockdefinition.SYSML_BlockDefinition__DataTypeTools" label="Datatypes">
+ <icon pluginID="org.eclipse.gmf.runtime.diagram.ui" iconPath="/icons/group.gif"/>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="blockdefinition_datatypes.tool.datatype" label="DataType" description="Create a new DataType">
+ <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/DataType.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.DataType"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="blockdefinition_datatypes.tool.valuetype" label="ValueType" description="Create a new ValueType">
+ <icon pluginID="org.eclipse.papyrus.sysml" iconPath="/icons/blocks/ValueType.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.ValueType"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="blockdefinition_datatypes.tool.primitivetype" label="PrimitiveType" description="Create a new PrimitiveType">
+ <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/PrimitiveType.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.PrimitiveType"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="blockdefinition_datatypes.tool.enumeration" label="Enumeration" description="Create a new Enumeration">
+ <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/Enumeration.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Enumeration"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="blockdefinition_datatypes.tool.enumerationliteral" label="EnumerationLiteral" description="Create a new EnumerationLiteral">
+ <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/EnumerationLiteral.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.EnumerationLiteral"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="blockdefinition_datatypes.tool.dimension" label="Dimension" description="Create a new Dimension">
+ <icon pluginID="org.eclipse.papyrus.sysml" iconPath="/icons/blocks/Dimension.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.Dimension"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="blockdefinition_datatypes.tool.unit" label="Unit" description="Create a new Unit">
+ <icon pluginID="org.eclipse.papyrus.sysml" iconPath="/icons/blocks/Unit.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.Unit"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ </drawerConfigurations>
+ <drawerConfigurations id="org.eclipse.papyrus.sysml.diagram.blockdefinition.SYSML_BlockDefinition__ContraintTools" label="CommentAndConstraints">
+ <icon pluginID="org.eclipse.gmf.runtime.diagram.ui" iconPath="/icons/group.gif"/>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="blockdefinition_constraints.tool.constraintblock" label="ConstraintBlock" description="Create a new ConstraintBlock">
+ <icon pluginID="org.eclipse.papyrus.sysml" iconPath="/icons/constraints/ConstraintBlock.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.ConstraintBlock"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="blockdefinition_constraints.tool.constraintproperty" label="ConstraintProperty" description="Create a new ConstraintProperty">
+ <icon pluginID="org.eclipse.papyrus.sysml" iconPath="/icons/constraints/ConstraintProperty.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.ConstraintProperty"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="blockdefinition_constraints.tool.property" label="Parameter" description="Create a new Parameter (Property)">
+ <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/Property.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Property"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="blockdefinition_constraints.tool.constraint" label="Constraint" description="Create a new Constraint">
+ <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/Constraint.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Constraint"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="blockdefinition_constraints.tool.comment" label="Comment" description="Create a new Comment">
+ <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/Comment.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Comment"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="blockdefinition_constraints.tool.comment_constraint_link_1486387609929" label="Comment / Constraint link" description="Create a new Comment / Constraint link" kind="ConnectionTool">
+ <icon pluginID="org.eclipse.papyrus.sysml.diagram.blockdefinition" iconPath="/icons/obj16/Link.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/umldi.elementtypesconfigurations#org.eclipse.papyrus.umldi.Comment_AnnotatedElementEdge"/>
+ </elementDescriptors>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/umldi.elementtypesconfigurations#org.eclipse.papyrus.umldi.Constraint_ConstrainedElementEdge"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ </drawerConfigurations>
+ <requiredProfiles>SysML</requiredProfiles>
+</paletteconfiguration:PaletteConfiguration>
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/palettes/blockdefinition.palette.associations.xml b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/palettes/blockdefinition.palette.associations.xml
new file mode 100755
index 0000000..51548e1
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/palettes/blockdefinition.palette.associations.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<paletteDefinition>
+ <content>
+ <drawer
+ iconpath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ id="org.eclipse.papyrus.sysml.diagram.blockdefinition.SYSML_BlockDefinition__Associations" name="Associations">
+
+ <aspectTool description="Create a new Association" id="blockdefinition_associations.tool.association_none"
+ name="Association" refToolId="blockdefinition.tool.association_none">
+ </aspectTool>
+
+ <aspectTool description="Create a new DirectedAssociation" id="blockdefinition_associations.tool.association_none_directed"
+ name="DirectedAssociation" refToolId="blockdefinition.tool.association_none_directed">
+ </aspectTool>
+
+ <aspectTool description="Create a new Composition" id="blockdefinition_associations.tool.association_composite"
+ name="Composition" refToolId="blockdefinition.tool.association_composite">
+ </aspectTool>
+
+ <aspectTool description="Create a new DirectedComposition" id="blockdefinition_associations.tool.association_composite_directed"
+ name="DirectedComposition" refToolId="blockdefinition.tool.association_composite_directed">
+ </aspectTool>
+
+ <aspectTool description="Create a new Aggregation" id="blockdefinition_associations.tool.association_shared"
+ name="Aggregation" refToolId="blockdefinition.tool.association_shared">
+ </aspectTool>
+
+ <aspectTool description="Create a new DirectedAggregation" id="blockdefinition_associations.tool.association_shared_directed"
+ name="DirectedAggregation" refToolId="blockdefinition.tool.association_shared_directed">
+ </aspectTool>
+
+ <aspectTool description="Create a new InstanceSpecificationLink" id="blockdefinition_associations.tool.instance_specification_link"
+ name="InstanceSpecificationLink" refToolId="blockdefinition.tool.instance_specification_link">
+ </aspectTool>
+
+ </drawer>
+ </content>
+</paletteDefinition>
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/palettes/blockdefinition.palette.constraints.xml b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/palettes/blockdefinition.palette.constraints.xml
new file mode 100755
index 0000000..0cd691e
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/palettes/blockdefinition.palette.constraints.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<paletteDefinition>
+ <content>
+ <drawer
+ iconpath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ id="org.eclipse.papyrus.sysml.diagram.blockdefinition.SYSML_BlockDefinition__ContraintTools" name="CommentAndConstraints">
+
+ <aspectTool description="Create a new ConstraintBlock" id="blockdefinition_constraints.tool.constraintblock"
+ name="ConstraintBlock" refToolId="blockdefinition.tool.constraintblock">
+ </aspectTool>
+ <aspectTool description="Create a new ConstraintProperty" id="blockdefinition_constraints.tool.constraintproperty"
+ name="ConstraintProperty" refToolId="blockdefinition.tool.constraintproperty">
+ </aspectTool>
+ <aspectTool description="Create a new Parameter (Property)" id="blockdefinition_constraints.tool.property"
+ name="Parameter" refToolId="blockdefinition.tool.property">
+ </aspectTool>
+ <aspectTool description="Create a new Constraint" id="blockdefinition_constraints.tool.constraint"
+ name="Constraint" refToolId="blockdefinition.tool.constraint">
+ </aspectTool>
+ <aspectTool description="Create a new Comment" id="blockdefinition_constraints.tool.comment"
+ name="Comment" refToolId="blockdefinition.tool.comment">
+ </aspectTool>
+ <aspectTool description="Create a new Comment / Constraint link" id="blockdefinition_constraints.tool.comment_constraint_link"
+ name="Comment / Constraint link" refToolId="blockdefinition.tool.comment_constraint_link">
+ </aspectTool>
+ </drawer>
+ </content>
+</paletteDefinition>
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/palettes/blockdefinition.palette.datatypes.xml b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/palettes/blockdefinition.palette.datatypes.xml
new file mode 100755
index 0000000..db6d81e
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/palettes/blockdefinition.palette.datatypes.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<paletteDefinition>
+ <content>
+ <drawer
+ iconpath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ id="org.eclipse.papyrus.sysml.diagram.blockdefinition.SYSML_BlockDefinition__DataTypeTools" name="DataTypes">
+
+ <aspectTool description="Create a new DataType" id="blockdefinition_datatypes.tool.datatype"
+ name="DataType" refToolId="blockdefinition.tool.datatype">
+ </aspectTool>
+ <aspectTool description="Create a new ValueType" id="blockdefinition_datatypes.tool.valuetype"
+ name="ValueType" refToolId="blockdefinition.tool.valuetype">
+ </aspectTool>
+ <aspectTool description="Create a new PrimitiveType" id="blockdefinition_datatypes.tool.primitivetype"
+ name="PrimitiveType" refToolId="blockdefinition.tool.primitivetype">
+ </aspectTool>
+ <aspectTool description="Create a new Enumeration" id="blockdefinition_datatypes.tool.enumeration"
+ name="Enumeration" refToolId="blockdefinition.tool.enumeration">
+ </aspectTool>
+ <aspectTool description="Create a new EnumerationLiteral" id="blockdefinition_datatypes.tool.enumerationliteral"
+ name="EnumerationLiteral" refToolId="blockdefinition.tool.enumerationliteral">
+ </aspectTool>
+ <aspectTool description="Create a new Dimension" id="blockdefinition_datatypes.tool.dimension"
+ name="Dimension" refToolId="blockdefinition.tool.dimension">
+ </aspectTool>
+ <aspectTool description="Create a new Unit" id="blockdefinition_datatypes.tool.unit"
+ name="Unit" refToolId="blockdefinition.tool.unit">
+ </aspectTool>
+ </drawer>
+ </content>
+</paletteDefinition>
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/palettes/blockdefinition.palette.gen.xml b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/palettes/blockdefinition.palette.gen.xml
new file mode 100755
index 0000000..4393281
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/palettes/blockdefinition.palette.gen.xml
@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<paletteDefinition>
+ <content>
+ <drawer
+ iconpath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ id="org.eclipse.papyrus.sysml.diagram.blockdefinition.SYSML_BlockDefinition__Tools" name="Tools">
+ <aspectTool description="Create a new Actor" id="blockdefinition.tool.actor"
+ name="Actor" refToolId="blockdefinition.tool.actor">
+ </aspectTool>
+ <aspectTool description="Create a new Block" id="blockdefinition.tool.block"
+ name="Block" refToolId="blockdefinition.tool.block">
+ </aspectTool>
+ <aspectTool description="Create a new Constraint" id="blockdefinition.tool.constraint"
+ name="Constraint" refToolId="blockdefinition.tool.constraint">
+ </aspectTool>
+ <aspectTool description="Create a new ConstraintBlock" id="blockdefinition.tool.constraintblock"
+ name="ConstraintBlock" refToolId="blockdefinition.tool.constraintblock">
+ </aspectTool>
+ <aspectTool description="Create a new ConstraintProperty" id="blockdefinition.tool.constraintproperty"
+ name="ConstraintProperty" refToolId="blockdefinition.tool.constraintproperty">
+ </aspectTool>
+ <aspectTool description="Create a new DataType" id="blockdefinition.tool.datatype"
+ name="DataType" refToolId="blockdefinition.tool.datatype">
+ </aspectTool>
+ <aspectTool description="Create a new Dimension" id="blockdefinition.tool.dimension"
+ name="Dimension" refToolId="blockdefinition.tool.dimension">
+ </aspectTool>
+ <aspectTool description="Create a new Enumeration" id="blockdefinition.tool.enumeration"
+ name="Enumeration" refToolId="blockdefinition.tool.enumeration">
+ </aspectTool>
+ <aspectTool description="Create a new EnumerationLiteral" id="blockdefinition.tool.enumerationliteral"
+ name="EnumerationLiteral" refToolId="blockdefinition.tool.enumerationliteral">
+ </aspectTool>
+ <aspectTool description="Create a new FlowPort" id="blockdefinition.tool.flowport"
+ name="FlowPort" refToolId="blockdefinition.tool.flowport">
+ </aspectTool>
+ <aspectTool description="Create a new FlowProperty" id="blockdefinition.tool.flowproperty"
+ name="FlowProperty" refToolId="blockdefinition.tool.flowproperty">
+ </aspectTool>
+ <aspectTool description="Create a new FlowSpecification" id="blockdefinition.tool.flowspecification"
+ name="FlowSpecification" refToolId="blockdefinition.tool.flowspecification">
+ </aspectTool>
+ <aspectTool description="Create a new Interface" id="blockdefinition.tool.interface"
+ name="Interface" refToolId="blockdefinition.tool.interface">
+ </aspectTool>
+ <aspectTool description="Create a new Operation" id="blockdefinition.tool.operation"
+ name="Operation" refToolId="blockdefinition.tool.operation">
+ </aspectTool>
+ <aspectTool description="Create a new Part" id="blockdefinition.tool.part"
+ name="Part" refToolId="blockdefinition.tool.part">
+ </aspectTool>
+ <aspectTool description="Create a new Port" id="blockdefinition.tool.port"
+ name="Port" refToolId="blockdefinition.tool.port">
+ </aspectTool>
+ <aspectTool description="Create a new PrimitiveType" id="blockdefinition.tool.primitivetype"
+ name="PrimitiveType" refToolId="blockdefinition.tool.primitivetype">
+ </aspectTool>
+ <aspectTool description="Create a new Property" id="blockdefinition.tool.property"
+ name="Property" refToolId="blockdefinition.tool.property">
+ </aspectTool>
+ <aspectTool description="Create a new Reception" id="blockdefinition.tool.reception"
+ name="Reception" refToolId="blockdefinition.tool.reception">
+ </aspectTool>
+ <aspectTool description="Create a new Reference" id="blockdefinition.tool.reference"
+ name="Reference" refToolId="blockdefinition.tool.reference">
+ </aspectTool>
+ <aspectTool description="Create a new Signal" id="blockdefinition.tool.signal"
+ name="Signal" refToolId="blockdefinition.tool.signal">
+ </aspectTool>
+ <aspectTool description="Create a new Unit" id="blockdefinition.tool.unit"
+ name="Unit" refToolId="blockdefinition.tool.unit">
+ </aspectTool>
+ <aspectTool description="Create a new Value" id="blockdefinition.tool.value"
+ name="Value" refToolId="blockdefinition.tool.value">
+ </aspectTool>
+ <aspectTool description="Create a new ValueType" id="blockdefinition.tool.valuetype"
+ name="ValueType" refToolId="blockdefinition.tool.valuetype">
+ </aspectTool>
+ <aspectTool description="Create a new Association" id="blockdefinition.tool.association"
+ name="Association" refToolId="blockdefinition.tool.association">
+ </aspectTool>
+ <aspectTool description="Create a new Dependency" id="blockdefinition.tool.dependency"
+ name="Dependency" refToolId="blockdefinition.tool.dependency">
+ </aspectTool>
+ <aspectTool description="Create a new Generalization" id="blockdefinition.tool.generalization"
+ name="Generalization" refToolId="blockdefinition.tool.generalization">
+ </aspectTool>
+ <aspectTool description="Create a new InterfaceRealization" id="blockdefinition.tool.interfacerealization"
+ name="InterfaceRealization" refToolId="blockdefinition.tool.interfacerealization">
+ </aspectTool>
+ <aspectTool description="Create a new Usage" id="blockdefinition.tool.usage"
+ name="Usage" refToolId="blockdefinition.tool.usage">
+ </aspectTool>
+
+ <aspectTool description="Create a new Comment" id="blockdefinition.tool.comment"
+ name="Comment" refToolId="clazz.tool.comment">
+ </aspectTool>
+ <aspectTool description="Create a new Constraint" id="blockdefinition.tool.constraint"
+ name="Constraint" refToolId="clazz.tool.constraint">
+ </aspectTool>
+ <aspectTool description="Create a new InstanceSpecification" id="blockdefinition.tool.instancespecification"
+ name="InstanceSpecification" refToolId="clazz.tool.instancespecification">
+ </aspectTool>
+ <aspectTool description="Create a new Model" id="blockdefinition.tool.model"
+ name="Model" refToolId="clazz.tool.model">
+ </aspectTool>
+ <aspectTool description="Create a new Package" id="blockdefinition.tool.package"
+ name="Package" refToolId="clazz.tool.package">
+ </aspectTool>
+ <aspectTool description="Create a new Slot" id="blockdefinition.tool.slot"
+ name="Slot" refToolId="clazz.tool.slot">
+ </aspectTool>
+ <aspectTool description="Create a new Comment / Constraint link" id="blockdefinition.tool.comment / constraint link"
+ name="Comment / Constraint link" refToolId="clazz.tool.link">
+ </aspectTool>
+
+ </drawer>
+ </content>
+</paletteDefinition>
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/palettes/blockdefinition.palette.incubation.xml b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/palettes/blockdefinition.palette.incubation.xml
new file mode 100755
index 0000000..68a2b88
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/palettes/blockdefinition.palette.incubation.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<paletteDefinition>
+ <content>
+ <drawer
+ iconpath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ id="org.eclipse.papyrus.sysml.diagram.blockdefinition.SYSML_BlockDefinition__Incubation" name="Incubation">
+
+ <aspectTool description="Create a new Model" id="blockdefinition.tool.model"
+ name="Model" refToolId="clazz.tool.model">
+ </aspectTool>
+ <aspectTool description="Create a new Package" id="blockdefinition.tool.package"
+ name="Package" refToolId="clazz.tool.package">
+ </aspectTool>
+ <aspectTool description="Create a new InstanceSpecification" id="blockdefinition.tool.instancespecification"
+ name="InstanceSpecification" refToolId="clazz.tool.instancespecification">
+ </aspectTool>
+ <aspectTool description="Create a new Slot" id="blockdefinition.tool.slot"
+ name="Slot" refToolId="clazz.tool.slot">
+ </aspectTool>
+ <aspectTool description="Create a new Constraint" id="blockdefinition.tool.constraint"
+ name="Constraint" refToolId="clazz.tool.constraint">
+ </aspectTool>
+ <aspectTool description="Create a new Comment" id="blockdefinition.tool.comment"
+ name="Comment" refToolId="clazz.tool.comment">
+ </aspectTool>
+ <aspectTool description="Create a new Comment / Contraint link" id="blockdefinition.tool.comment / contraint link"
+ name="Comment / Contraint link" refToolId="clazz.tool.link">
+ </aspectTool>
+
+ </drawer>
+ </content>
+</paletteDefinition>
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/palettes/blockdefinition.palette.modelelements.xml b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/palettes/blockdefinition.palette.modelelements.xml
new file mode 100755
index 0000000..daf4f53
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/palettes/blockdefinition.palette.modelelements.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<paletteDefinition>
+ <content>
+ <drawer
+ iconpath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ id="org.eclipse.papyrus.sysml.diagram.blockdefinition.SYSML_BlockDefinition__ModelElements" name="ModelElements">
+
+ <aspectTool description="Create a new Package" id="blockdefinition_modelelements.tool.package"
+ name="Package" refToolId="blockdefinition.tool.package">
+ </aspectTool>
+ <aspectTool description="Create a new Actor" id="blockdefinition_modelelements.tool.actor"
+ name="Actor" refToolId="blockdefinition.tool.actor">
+ </aspectTool>
+ <aspectTool description="Create a new Block" id="blockdefinition_modelelements.tool.block"
+ name="Block" refToolId="blockdefinition.tool.block">
+ </aspectTool>
+ <aspectTool description="Create a new Signal" id="blockdefinition_modelelements.tool.signal"
+ name="Signal" refToolId="blockdefinition.tool.signal">
+ </aspectTool>
+ <aspectTool description="Create a new Operation" id="blockdefinition_modelelements.tool.operation"
+ name="Operation" refToolId="blockdefinition.tool.operation">
+ </aspectTool>
+ <aspectTool description="Create a new Reception" id="blockdefinition_modelelements.tool.reception"
+ name="Reception" refToolId="blockdefinition.tool.reception">
+ </aspectTool>
+ <aspectTool description="Create a new Property" id="blockdefinition_modelelements.tool.property"
+ name="Property" refToolId="blockdefinition.tool.property">
+ </aspectTool>
+ <aspectTool description="Create a new Part" id="blockdefinition_modelelements.tool.part"
+ name="Part" refToolId="blockdefinition.tool.part">
+ </aspectTool>
+ <aspectTool description="Create a new Reference" id="blockdefinition_modelelements.tool.reference"
+ name="Reference" refToolId="blockdefinition.tool.reference">
+ </aspectTool>
+ <aspectTool description="Create a new ActorPart" id="blockdefinition_modelelements.tool.actorpart"
+ name="ActorPart" refToolId="blockdefinition.tool.actorpart">
+ </aspectTool>
+ <aspectTool description="Create a new Value" id="blockdefinition_modelelements.tool.value"
+ name="Value" refToolId="blockdefinition.tool.value">
+ </aspectTool>
+ <aspectTool description="Create a new InstanceSpecification" id="blockdefinition_modelelements.tool.instancespecification"
+ name="InstanceSpecification" refToolId="blockdefinition.tool.instancespecification">
+ </aspectTool>
+ <aspectTool description="Create a new Slot" id="blockdefinition_modelelements.tool.slot"
+ name="Slot" refToolId="blockdefinition.tool.slot">
+ </aspectTool>
+ <aspectTool description="Create a new Dependency" id="blockdefinition_modelelements.tool.dependency"
+ name="Dependency" refToolId="blockdefinition.tool.dependency">
+ </aspectTool>
+ <aspectTool description="Create a new Generalization" id="blockdefinition_modelelements.tool.generalization"
+ name="Generalization" refToolId="blockdefinition.tool.generalization">
+ </aspectTool>
+ </drawer>
+ </content>
+</paletteDefinition>
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/palettes/blockdefinition.palette.portandflows.xml b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/palettes/blockdefinition.palette.portandflows.xml
new file mode 100755
index 0000000..96c2a8a
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/palettes/blockdefinition.palette.portandflows.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<paletteDefinition>
+ <content>
+ <drawer
+ iconpath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ id="org.eclipse.papyrus.sysml.diagram.blockdefinition.SYSML_BlockDefinition__PortAndFlowTools" name="PortAndFlows">
+
+ <aspectTool description="Create a new Port" id="blockdefinition_portandflows.tool.port"
+ name="Port" refToolId="blockdefinition.tool.port">
+ </aspectTool>
+ <aspectTool description="Create a new FlowPort" id="blockdefinition_portandflows.tool.flowport"
+ name="FlowPort" refToolId="blockdefinition.tool.flowport">
+ </aspectTool>
+ <aspectTool description="Create a new FlowSpecification" id="blockdefinition_portandflows.tool.flowspecification"
+ name="FlowSpecification" refToolId="blockdefinition.tool.flowspecification">
+ </aspectTool>
+ <aspectTool description="Create a new FlowProperty" id="blockdefinition_portandflows.tool.flowproperty"
+ name="FlowProperty" refToolId="blockdefinition.tool.flowproperty">
+ </aspectTool>
+ <aspectTool description="Create a new Interface" id="blockdefinition_portandflows.tool.interface"
+ name="Interface" refToolId="blockdefinition.tool.interface">
+ </aspectTool>
+ <aspectTool description="Create a new InterfaceRealization" id="blockdefinition_portandflows.tool.interfacerealization"
+ name="InterfaceRealization" refToolId="blockdefinition.tool.interfacerealization">
+ </aspectTool>
+ <aspectTool description="Create a new Usage" id="blockdefinition_portandflows.tool.usage"
+ name="Usage" refToolId="blockdefinition.tool.usage">
+ </aspectTool>
+
+ </drawer>
+ </content>
+</paletteDefinition>
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/plugin.gen.xml b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/plugin.gen.xml
new file mode 100755
index 0000000..37d985f
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/plugin.gen.xml
@@ -0,0 +1,1308 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+
+<!-- Diagram declaration -->
+<extension point="org.eclipse.papyrus.infra.core.papyrusDiagram">
+ <creationCommand
+ creationCommandClass="org.eclipse.papyrus.sysml.diagram.blockdefinition.BlockDefinitionDiagramCreateCommand"
+ icon="icons/obj16/Diagram_BlockDefinition.gif"
+ id="org.eclipse.papyrus.sysml.diagram.blockdefinition.CreateCommand"
+ language="sysml"
+ label="Block Definition Diagram"/>
+ <editorDiagram
+ actionBarContributorId="org.eclipse.papyrus.uml.diagram.common.part.UMLDiagramActionBarContributor"
+ factoryClass="org.eclipse.papyrus.sysml.diagram.blockdefinition.BlockDefinitionDiagramEditorFactory"
+ icon="icons/obj16/Diagram_BlockDefinition.gif" />
+</extension>
+
+<!-- Diagram creation command and handler -->
+<extension point="org.eclipse.ui.commands">
+ <command id="org.eclipse.papyrus.sysml.diagram.blockdefinition.CreateCommand"
+ name="Create a new Block Definition Diagram"
+ description="Create a new Block Definition Diagram"
+ categoryId="org.eclipse.papyrus.editor.category"/>
+</extension>
+
+<extension point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.papyrus.sysml.diagram.blockdefinition.BlockDefinitionDiagramCreateCommand"
+ commandId="org.eclipse.papyrus.sysml.diagram.blockdefinition.CreateCommand">
+ <activeWhen>
+ <with variable="activeEditorId">
+ <equals value="org.eclipse.papyrus.infra.core.papyrusEditor" />
+ </with>
+ </activeWhen>
+ </handler>
+</extension>
+
+<!-- Diagram creation command registration in menu and toolbar -->
+<extension point="org.eclipse.ui.menus">
+
+ <menuContribution locationURI="menu:org.eclipse.papyrus.ui.menu">
+ <menu id="org.eclipse.papyrus.uml.diagram.ui.menu.diagrams" label="Diagrams">
+ <command commandId="org.eclipse.papyrus.sysml.diagram.blockdefinition.CreateCommand"
+ icon="icons/obj16/Diagram_BlockDefinition.gif" label="Create a new Block Definition Diagram"
+ style="push" tooltip="Create a new Block Definition Diagram">
+ <visibleWhen>
+ <reference definitionId="org.eclipse.papyrus.sysml.diagram.common.IsPapyrusActiveWithSysML"/>
+ </visibleWhen>
+
+ </command>
+ </menu>
+ </menuContribution>
+
+ <menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar">
+ <toolbar id="org.eclipse.papyrus.ui.toolbar">
+ <command commandId="org.eclipse.papyrus.sysml.diagram.blockdefinition.CreateCommand"
+ icon="icons/obj16/Diagram_BlockDefinition.gif" label="Create a new Block Definition Diagram"
+ style="push" tooltip="Create a new Block Definition Diagram">
+ <visibleWhen>
+ <reference definitionId="org.eclipse.papyrus.sysml.diagram.common.IsPapyrusActiveWithSysML"/>
+ </visibleWhen>
+
+ </command>
+ </toolbar>
+ </menuContribution>
+
+ <menuContribution locationURI="popup:org.eclipse.papyrus.views.modelexplorer.popupmenu.creatediagram">
+ <command commandId="org.eclipse.papyrus.sysml.diagram.blockdefinition.CreateCommand"
+ icon="icons/obj16/Diagram_BlockDefinition.gif"
+ label="Create a new Block Definition Diagram"
+ style="push"
+ tooltip="Create a new Block Definition Diagram">
+ <visibleWhen>
+ <reference definitionId="org.eclipse.papyrus.sysml.diagram.common.IsPapyrusActiveWithSysML"/>
+ </visibleWhen>
+
+ </command>
+ </menuContribution>
+
+</extension>
+
+<!-- Palette tool definition (defines tools possibly used by the palette(s)) -->
+<extension point="org.eclipse.gmf.runtime.diagram.ui.paletteProviders"
+ name="SYSML_BlockDefinition_Predefined_Entries"
+ id="org.eclipse.papyrus.sysml.diagram.blockdefinition.palettedefinition">
+
+ <paletteProvider class="org.eclipse.gmf.runtime.diagram.ui.providers.DefaultPaletteProvider">
+ <Priority name="Lowest"/> <!-- Lower priority than Palette tool declaration -->
+
+ <!-- SysML Block Definition Diagram specific tool definition -->
+ <contribution
+ factoryClass="org.eclipse.papyrus.sysml.diagram.blockdefinition.factory.DiagramPaletteFactory">
+
+ <!-- blockdefinition.tool.actor -->
+ <entry
+ defineOnly="true"
+ description="Create a Actor"
+ id="blockdefinition.tool.actor"
+ kind="tool"
+ label="Actor"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Actor.gif"
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Actor.gif">
+ </entry>
+
+ <!-- blockdefinition.tool.block -->
+ <entry
+ defineOnly="true"
+ description="Create a Block"
+ id="blockdefinition.tool.block"
+ kind="tool"
+ label="Block"
+ large_icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/blocks/Block.gif"
+ small_icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/blocks/Block.gif">
+ </entry>
+
+ <!-- blockdefinition.tool.constraint -->
+ <entry
+ defineOnly="true"
+ description="Create a Constraint"
+ id="blockdefinition.tool.constraint"
+ kind="tool"
+ label="Constraint"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif">
+ </entry>
+
+ <!-- blockdefinition.tool.constraintblock -->
+ <entry
+ defineOnly="true"
+ description="Create a ConstraintBlock"
+ id="blockdefinition.tool.constraintblock"
+ kind="tool"
+ label="ConstraintBlock"
+ large_icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/constraints/ConstraintBlock.gif"
+ small_icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/constraints/ConstraintBlock.gif">
+ </entry>
+
+ <!-- blockdefinition.tool.constraintproperty -->
+ <entry
+ defineOnly="true"
+ description="Create a ConstraintProperty"
+ id="blockdefinition.tool.constraintproperty"
+ kind="tool"
+ label="ConstraintProperty"
+ large_icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/constraints/ConstraintProperty.gif"
+ small_icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/constraints/ConstraintProperty.gif">
+ </entry>
+
+ <!-- blockdefinition.tool.datatype -->
+ <entry
+ defineOnly="true"
+ description="Create a DataType"
+ id="blockdefinition.tool.datatype"
+ kind="tool"
+ label="DataType"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DataType.gif"
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DataType.gif">
+ </entry>
+
+ <!-- blockdefinition.tool.dimension -->
+ <entry
+ defineOnly="true"
+ description="Create a Dimension"
+ id="blockdefinition.tool.dimension"
+ kind="tool"
+ label="Dimension"
+ large_icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/blocks/Dimension.gif"
+ small_icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/blocks/Dimension.gif">
+ </entry>
+
+ <!-- blockdefinition.tool.enumeration -->
+ <entry
+ defineOnly="true"
+ description="Create a Enumeration"
+ id="blockdefinition.tool.enumeration"
+ kind="tool"
+ label="Enumeration"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Enumeration.gif"
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Enumeration.gif">
+ </entry>
+
+ <!-- blockdefinition.tool.enumerationliteral -->
+ <entry
+ defineOnly="true"
+ description="Create a EnumerationLiteral"
+ id="blockdefinition.tool.enumerationliteral"
+ kind="tool"
+ label="EnumerationLiteral"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/EnumerationLiteral.gif"
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/EnumerationLiteral.gif">
+ </entry>
+
+ <!-- blockdefinition.tool.flowport -->
+ <entry
+ defineOnly="true"
+ description="Create a FlowPort"
+ id="blockdefinition.tool.flowport"
+ kind="tool"
+ label="FlowPort"
+ large_icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/portandflows/FlowPort.gif"
+ small_icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/portandflows/FlowPort.gif">
+ </entry>
+
+ <!-- blockdefinition.tool.flowproperty -->
+ <entry
+ defineOnly="true"
+ description="Create a FlowProperty"
+ id="blockdefinition.tool.flowproperty"
+ kind="tool"
+ label="FlowProperty"
+ large_icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/portandflows/FlowProperty.gif"
+ small_icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/portandflows/FlowProperty.gif">
+ </entry>
+
+ <!-- blockdefinition.tool.flowspecification -->
+ <entry
+ defineOnly="true"
+ description="Create a FlowSpecification"
+ id="blockdefinition.tool.flowspecification"
+ kind="tool"
+ label="FlowSpecification"
+ large_icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/portandflows/FlowSpecification.gif"
+ small_icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/portandflows/FlowSpecification.gif">
+ </entry>
+
+ <!-- blockdefinition.tool.interface -->
+ <entry
+ defineOnly="true"
+ description="Create a Interface"
+ id="blockdefinition.tool.interface"
+ kind="tool"
+ label="Interface"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Interface.gif"
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Interface.gif">
+ </entry>
+
+ <!-- blockdefinition.tool.operation -->
+ <entry
+ defineOnly="true"
+ description="Create a Operation"
+ id="blockdefinition.tool.operation"
+ kind="tool"
+ label="Operation"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Operation.gif"
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Operation.gif">
+ </entry>
+
+ <!-- blockdefinition.tool.part -->
+ <entry
+ defineOnly="true"
+ description="Create a Part"
+ id="blockdefinition.tool.part"
+ kind="tool"
+ label="Part"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif"
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif">
+ </entry>
+
+ <!-- blockdefinition.tool.port -->
+ <entry
+ defineOnly="true"
+ description="Create a Port"
+ id="blockdefinition.tool.port"
+ kind="tool"
+ label="Port"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Port.gif"
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Port.gif">
+ </entry>
+
+ <!-- blockdefinition.tool.primitivetype -->
+ <entry
+ defineOnly="true"
+ description="Create a PrimitiveType"
+ id="blockdefinition.tool.primitivetype"
+ kind="tool"
+ label="PrimitiveType"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/PrimitiveType.gif"
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/PrimitiveType.gif">
+ </entry>
+
+ <!-- blockdefinition.tool.property -->
+ <entry
+ defineOnly="true"
+ description="Create a Property"
+ id="blockdefinition.tool.property"
+ kind="tool"
+ label="Property"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif"
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif">
+ </entry>
+
+ <!-- blockdefinition.tool.reception -->
+ <entry
+ defineOnly="true"
+ description="Create a Reception"
+ id="blockdefinition.tool.reception"
+ kind="tool"
+ label="Reception"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Reception.gif"
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Reception.gif">
+ </entry>
+
+ <!-- blockdefinition.tool.reference -->
+ <entry
+ defineOnly="true"
+ description="Create a Reference"
+ id="blockdefinition.tool.reference"
+ kind="tool"
+ label="Reference"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif"
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif">
+ </entry>
+
+ <!-- blockdefinition.tool.signal -->
+ <entry
+ defineOnly="true"
+ description="Create a Signal"
+ id="blockdefinition.tool.signal"
+ kind="tool"
+ label="Signal"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Signal.gif"
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Signal.gif">
+ </entry>
+
+ <!-- blockdefinition.tool.unit -->
+ <entry
+ defineOnly="true"
+ description="Create a Unit"
+ id="blockdefinition.tool.unit"
+ kind="tool"
+ label="Unit"
+ large_icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/blocks/Unit.gif"
+ small_icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/blocks/Unit.gif">
+ </entry>
+
+ <!-- blockdefinition.tool.value -->
+ <entry
+ defineOnly="true"
+ description="Create a Value"
+ id="blockdefinition.tool.value"
+ kind="tool"
+ label="Value"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif"
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif">
+ </entry>
+
+ <!-- blockdefinition.tool.valuetype -->
+ <entry
+ defineOnly="true"
+ description="Create a ValueType"
+ id="blockdefinition.tool.valuetype"
+ kind="tool"
+ label="ValueType"
+ large_icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/blocks/ValueType.gif"
+ small_icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/blocks/ValueType.gif">
+ </entry>
+ <!-- Start of user code Custom node button entry -->
+
+ <entry
+ defineOnly="true"
+ description="Create a Model"
+ id="blockdefinition.tool.model"
+ kind="tool"
+ label="Model"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Model.gif"
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Model.gif">
+ </entry>
+
+ <entry
+ defineOnly="true"
+ description="Create a Package"
+ id="blockdefinition.tool.package"
+ kind="tool"
+ label="Package"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Package.gif"
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Package.gif">
+ </entry>
+
+ <entry
+ defineOnly="true"
+ description="Create an InstanceSpecification"
+ id="blockdefinition.tool.instancespecification"
+ kind="tool"
+ label="InstanceSpecification"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InstanceSpecification.gif"
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InstanceSpecification.gif">
+ </entry>
+
+ <entry
+ defineOnly="true"
+ description="Create a Slot"
+ id="blockdefinition.tool.slot"
+ kind="tool"
+ label="Slot"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Slot.gif"
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Slot.gif">
+ </entry>
+
+ <entry
+ defineOnly="true"
+ description="Create a Comment"
+ id="blockdefinition.tool.comment"
+ kind="tool"
+ label="Comment"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif"
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif">
+ </entry>
+
+ <!-- End of user code -->
+
+
+ <!-- blockdefinition.tool.association -->
+ <entry
+ defineOnly="true"
+ description="Create a Association"
+ id="blockdefinition.tool.association"
+ kind="tool"
+ label="Association"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif"
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif">
+ </entry>
+
+ <!-- blockdefinition.tool.dependency -->
+ <entry
+ defineOnly="true"
+ description="Create a Dependency"
+ id="blockdefinition.tool.dependency"
+ kind="tool"
+ label="Dependency"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Dependency.gif"
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Dependency.gif">
+ </entry>
+
+ <!-- blockdefinition.tool.generalization -->
+ <entry
+ defineOnly="true"
+ description="Create a Generalization"
+ id="blockdefinition.tool.generalization"
+ kind="tool"
+ label="Generalization"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Generalization.gif"
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Generalization.gif">
+ </entry>
+
+ <!-- blockdefinition.tool.interfacerealization -->
+ <entry
+ defineOnly="true"
+ description="Create a InterfaceRealization"
+ id="blockdefinition.tool.interfacerealization"
+ kind="tool"
+ label="InterfaceRealization"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InterfaceRealization.gif"
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InterfaceRealization.gif">
+ </entry>
+
+ <!-- blockdefinition.tool.usage -->
+ <entry
+ defineOnly="true"
+ description="Create a Usage"
+ id="blockdefinition.tool.usage"
+ kind="tool"
+ label="Usage"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Usage.gif"
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Usage.gif">
+ </entry>
+ <!-- Start of user code Custom edge button entry -->
+
+ <!-- blockdefinition.tool.association -->
+ <entry
+ defineOnly="true"
+ description="Create an Association"
+ id="blockdefinition.tool.association_none"
+ kind="tool"
+ label="Association"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif"
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif">
+ </entry>
+
+ <!-- blockdefinition.tool.directedassociation -->
+ <entry
+ defineOnly="true"
+ description="Create a DirectedAssociation"
+ id="blockdefinition.tool.association_none_directed"
+ kind="tool"
+ label="DirectedAssociation"
+ large_icon="platform:/plugin/org.eclipse.papyrus.uml.service.types/icons/Association_none_directed.gif"
+ small_icon="platform:/plugin/org.eclipse.papyrus.uml.service.types/icons/Association_none_directed.gif">
+ </entry>
+
+ <!-- blockdefinition.tool.composition -->
+ <entry
+ defineOnly="true"
+ description="Create a Composition"
+ id="blockdefinition.tool.association_composite"
+ kind="tool"
+ label="Composition"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association_composite.gif"
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association_composite.gif">
+ </entry>
+
+ <!-- blockdefinition.tool.directedcomposition -->
+ <entry
+ defineOnly="true"
+ description="Create a DirectedComposition"
+ id="blockdefinition.tool.association_composite_directed"
+ kind="tool"
+ label="DirectedComposition"
+ large_icon="platform:/plugin/org.eclipse.papyrus.uml.service.types/icons/Association_composite_directed.gif"
+ small_icon="platform:/plugin/org.eclipse.papyrus.uml.service.types/icons/Association_composite_directed.gif">
+ </entry>
+
+ <!-- blockdefinition.tool.aggregation -->
+ <entry
+ defineOnly="true"
+ description="Create an Aggregation"
+ id="blockdefinition.tool.association_shared"
+ kind="tool"
+ label="Aggregation"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association_shared.gif"
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association_shared.gif">
+ </entry>
+
+ <!-- blockdefinition.tool.directedaggregation -->
+ <entry
+ defineOnly="true"
+ description="Create a DirectedAggregation"
+ id="blockdefinition.tool.association_shared_directed"
+ kind="tool"
+ label="DirectedAggregation"
+ large_icon="platform:/plugin/org.eclipse.papyrus.uml.service.types/icons/Association_shared_directed.gif"
+ small_icon="platform:/plugin/org.eclipse.papyrus.uml.service.types/icons/Association_shared_directed.gif">
+ </entry>
+
+ <entry
+ defineOnly="true"
+ description="Create a Comment / Constraint link"
+ id="blockdefinition.tool.comment_constraint_link"
+ kind="tool"
+ label="Comment / Constraint link"
+ large_icon="icons/obj16/Link.gif"
+ small_icon="icons/obj16/Link.gif">
+ </entry>
+
+ <!-- End of user code -->
+
+ </contribution>
+
+ <!-- Specify diagram this palette tools relate to -->
+ <editor id="org.eclipse.papyrus.sysml.diagram.blockdefinition"/>
+
+ </paletteProvider>
+</extension>
+
+<!-- Diagram view providers declaration -->
+<extension point="org.eclipse.gmf.runtime.diagram.core.viewProviders">
+ <!-- Diagram view provider -->
+ <viewProvider class="org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.BlockDefinitionDiagramViewProvider">
+ <Priority name="Low"/>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Diagram" semanticHints="BlockDefinition"/>
+ </viewProvider>
+
+ <!-- Custom graphical types view provider -->
+ <viewProvider class="org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.CustomViewProvider">
+ <Priority name="Medium"/>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="SysML::ReferenceProperty, UML::EnumerationLiteral, SysML::ConstraintBlock, UML::Signal, UML::Operation, SysML::FlowProperty, UML::PrimitiveType, UML::Port, SysML::ConstraintProperty, SysML::ValueProperty, UML::Reception, UML::Interface, UML::Constraint, UML::DataType, SysML::Unit, UML::Enumeration, SysML::ValueType, UML::Actor, UML::Property, SysML::Dimension, SysML::FlowSpecification, SysML::PartProperty, SysML::Block, SysML::FlowPort"/>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="shape_sysml_block_as_classifier, shape_sysml_part_as_label, shape_uml_reception_as_label, shape_uml_port_as_label, shape_sysml_valuetype_as_classifier, shape_uml_enumerationliteral_as_label, shape_sysml_constraintproperty_as_label, shape_sysml_dimension_as_classifier, shape_sysml_flowspecification_as_classifier, shape_uml_operation_as_label, shape_sysml_reference_as_label, shape_sysml_unit_as_classifier, shape_sysml_flowport_as_affixed, shape_uml_port_as_affixed, shape_uml_property_as_label, shape_uml_signal_as_classifier, shape_uml_enumeration_as_classifier, shape_uml_primitivetype_as_classifier, shape_uml_datatype_as_classifier, shape_uml_interface_as_classifier, shape_sysml_flowproperty_as_label, shape_sysml_constraintblock_as_classifier, shape_sysml_value_as_label, shape_sysml_flowport_as_label, shape_uml_actor_as_classifier, shape_uml_constraint_as_label"/>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="SysML::AssociationNone, UML::Dependency, SysML::Association, UML::InterfaceRealization, UML::Generalization, SysML::AssociationSharedDirected, SysML::AssociationCompositeDirected, SysML::AssociationComposite, UML::Usage, SysML::AssociationNoneDirected, SysML::AssociationShared"/>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="link_uml_dependency, link_uml_usage, link_uml_interfacerealization, link_sysml_association, link_uml_generalization"/>
+
+ <!-- Additional descriptors provided in case the semantic hint is is not provided -->
+
+ <!-- "uml.Actor" -->
+ <object id="uml.Actor" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Actor"/>
+ </object>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="uml.Actor"/>
+
+ <!-- "uml.Class" -->
+ <object id="uml.Class" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Class"/>
+ </object>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="uml.Class"/>
+
+ <!-- "uml.Constraint" -->
+ <object id="uml.Constraint" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Constraint"/>
+ </object>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="uml.Constraint"/>
+
+ <!-- "uml.DataType" -->
+ <object id="uml.DataType" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.DataType"/>
+ </object>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="uml.DataType"/>
+
+ <!-- "uml.Enumeration" -->
+ <object id="uml.Enumeration" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Enumeration"/>
+ </object>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="uml.Enumeration"/>
+
+ <!-- "uml.EnumerationLiteral" -->
+ <object id="uml.EnumerationLiteral" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.EnumerationLiteral"/>
+ </object>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="uml.EnumerationLiteral"/>
+
+ <!-- "uml.InstanceSpecification" -->
+ <object id="uml.InstanceSpecification" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.InstanceSpecification"/>
+ </object>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="uml.InstanceSpecification"/>
+
+ <!-- "uml.Interface" -->
+ <object id="uml.Interface" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Interface"/>
+ </object>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="uml.Interface"/>
+
+ <!-- "uml.Operation" -->
+ <object id="uml.Operation" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Operation"/>
+ </object>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="uml.Operation"/>
+
+ <!-- "uml.Port" -->
+ <object id="uml.Port" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Port"/>
+ </object>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="uml.Port"/>
+
+ <!-- "uml.PrimitiveType" -->
+ <object id="uml.PrimitiveType" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.PrimitiveType"/>
+ </object>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="uml.PrimitiveType"/>
+
+ <!-- "uml.Property" -->
+ <object id="uml.Property" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Property"/>
+ </object>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="uml.Property"/>
+
+ <!-- "uml.Reception" -->
+ <object id="uml.Reception" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Reception"/>
+ </object>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="uml.Reception"/>
+
+ <!-- "uml.Signal" -->
+ <object id="uml.Signal" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Signal"/>
+ </object>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="uml.Signal"/>
+
+ <!-- "uml.Association" -->
+ <object id="uml.Association" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Association"/>
+ </object>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="uml.Association"/>
+
+ <!-- "uml.Dependency" -->
+ <object id="uml.Dependency" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Dependency"/>
+ </object>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="uml.Dependency"/>
+
+ <!-- "uml.Generalization" -->
+ <object id="uml.Generalization" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Generalization"/>
+ </object>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="uml.Generalization"/>
+
+ <!-- "uml.InterfaceRealization" -->
+ <object id="uml.InterfaceRealization" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.InterfaceRealization"/>
+ </object>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="uml.InterfaceRealization"/>
+
+ <!-- "uml.Usage" -->
+ <object id="uml.Usage" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Usage"/>
+ </object>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="uml.Usage"/>
+
+ </viewProvider>
+
+ <!-- ViewProvider for inherited elements (from ClassDiagram ViewProvider) -->
+ <viewProvider class="org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.InheritedClassDiagramViewProvider">
+ <Priority name="Low"/>
+
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="Model_Shape, Model_Shape_CN, Package_Shape, Package_Shape_CN, InstanceSpecification_Shape, InstanceSpecification_Shape_CN, Constraint_Shape, Constraint_Shape_CN, Comment_Shape, Comment_Shape_CN"/>
+
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="Slot_SlotLabel"/>
+
+ <context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="Comment_AnnotatedElementEdge, Constraint_ConstrainedElementEdge"/>
+
+ <!-- Additional descriptors provided in case the semantic hint is is not provided -->
+
+ <!-- "uml.Model" -->
+ <object id="uml.Model" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Model"/>
+ </object>
+
+ <!-- "uml.Package" -->
+ <object id="uml.Package" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Package"/>
+ </object>
+
+ <!-- "uml.InstanceSpecification" -->
+ <object id="uml.InstanceSpecification" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.InstanceSpecification"/>
+ </object>
+
+ <!-- "uml.Constraint" -->
+ <object id="uml.Constraint" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Constraint"/>
+ </object>
+
+ <!-- "uml.Comment" -->
+ <object id="uml.Comment" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Comment"/>
+ </object>
+
+ <!-- "uml.Slot" -->
+ <object id="uml.Slot" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Slot"/>
+ </object>
+
+ <!-- Additional activation contexts for nodes semantic objects -->
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node"
+ elements="uml.Model, uml.Package, uml.InstanceSpecification, uml.Constraint, uml.Comment, uml.Slot"/>
+
+ </viewProvider>
+</extension>
+
+<!-- Diagram edit part providers declaration -->
+<extension point="org.eclipse.gmf.runtime.diagram.ui.editpartProviders">
+ <!-- Diagram edit part provider -->
+ <editpartProvider class="org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.BlockDefinitionDiagramEditPartProvider">
+ <Priority name="Low"/>
+ <object
+ id="org.eclipse.papyrus.sysml.diagram.blockdefinition.Diagram"
+ class="org.eclipse.gmf.runtime.notation.Diagram">
+ <method name="getType()" value="BlockDefinition"/>
+ </object>
+ <context views="org.eclipse.papyrus.sysml.diagram.blockdefinition.Diagram"/>
+ </editpartProvider>
+
+ <!-- Custom graphical types edit part provider -->
+ <editpartProvider class="org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.CustomEditPartProvider">
+ <Priority name="Medium"/>
+
+ <object
+ class="org.eclipse.gmf.runtime.notation.Node(org.eclipse.gmf.runtime.notation)"
+ id="org.eclipse.papyrus.sysml.diagram.blockdefinition.CustomNodeGraphicalTypes">
+ <method name="getType()" value="shape_sysml_block_as_classifier, shape_sysml_part_as_label, shape_uml_reception_as_label, shape_uml_port_as_label, shape_sysml_valuetype_as_classifier, shape_uml_enumerationliteral_as_label, shape_sysml_constraintproperty_as_label, shape_sysml_dimension_as_classifier, shape_sysml_flowspecification_as_classifier, shape_uml_operation_as_label, shape_sysml_reference_as_label, shape_sysml_unit_as_classifier, shape_sysml_flowport_as_affixed, shape_uml_port_as_affixed, shape_uml_property_as_label, shape_uml_signal_as_classifier, shape_uml_enumeration_as_classifier, shape_uml_primitivetype_as_classifier, shape_uml_datatype_as_classifier, shape_uml_interface_as_classifier, shape_sysml_flowproperty_as_label, shape_sysml_constraintblock_as_classifier, shape_sysml_value_as_label, shape_sysml_flowport_as_label, shape_uml_actor_as_classifier, shape_uml_constraint_as_label"/>
+ </object>
+
+ <object
+ class="org.eclipse.gmf.runtime.notation.Node(org.eclipse.gmf.runtime.notation)"
+ id="org.eclipse.papyrus.sysml.diagram.blockdefinition.CustomGraphicalTypes_Decorations">
+ <method name="getType()" value="linklabel_uml_association_target_role, compartment_sysml_value_as_list, label_sysml_block_name, compartment_sysml_flowproperty_as_list, affixedlabel_uml_port_label, affixedlabel_sysml_flowport_label, linklabel_uml_association_source_multiplicity, label_sysml_dimension_name, linklabel_uml_appliedstereotype, linklabel_uml_association_source_role, linklabel_uml_association_target_multiplicity, compartment_sysml_constraint_as_list, label_sysml_valuetype_name, compartment_sysml_flowport_as_list, linklabel_uml_namedelement_name, compartment_sysml_reference_as_list, label_sysml_flowspecification_name, compartment_uml_property_as_list, label_sysml_unit_name, affixedlabel_uml_namedelement_name, compartment_uml_port_as_list, label_sysml_constraintblock_name, compartment_sysml_parameter_as_list, compartment_sysml_property_as_list, compartment_uml_enumerationliteral_as_list, affixedlabel_uml_appliedstereotype, compartment_uml_operation_as_list, compartment_sysml_part_as_list, label_uml_namedelement_name"/>
+ </object>
+
+ <context views="org.eclipse.papyrus.sysml.diagram.blockdefinition.CustomNodeGraphicalTypes"/>
+ <context views="org.eclipse.papyrus.sysml.diagram.blockdefinition.CustomGraphicalTypes_Decorations"/>
+
+ <object
+ class="org.eclipse.gmf.runtime.notation.Edge(org.eclipse.gmf.runtime.notation)"
+ id="org.eclipse.papyrus.sysml.diagram.blockdefinition.CustomEdgeGraphicalTypes">
+ <method name="getType()" value="link_uml_dependency, link_uml_usage, link_uml_interfacerealization, link_sysml_association, link_uml_generalization"/>
+ </object>
+
+ <context views="org.eclipse.papyrus.sysml.diagram.blockdefinition.CustomEdgeGraphicalTypes"/>
+
+ </editpartProvider>
+
+ <!-- EditPartProvider for inherited elements (from ClassDiagram) -->
+ <editpartProvider class="org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.InheritedClassDiagramEditPartProvider">
+ <Priority name="Low"/>
+ <object
+ id="MODEL"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="Model_Shape, Model_NameLabel, Model_PackagedElementCompartment"/>
+ </object>
+ <object
+ id="MODEL_CN"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="Model_Shape_CN, Model_NameLabel_CN, Model_PackagedElementCompartment_CN"/>
+ </object>
+ <object
+ id="PACKAGE"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="Package_Shape, Package_NameLabel, Package_PackagedElementCompartment"/>
+ </object>
+ <object
+ id="PACKAGE_CN"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="Package_Shape_CN, Package_NameLabel_CN, Package_PackagedElementCompartment_CN"/>
+ </object>
+ <object
+ id="INSTANCE_SPECIFICATION"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="InstanceSpecification_Shape, InstanceSpecification_NameLabel, InstanceSpecification_SlotCompartment"/>
+ </object>
+ <object
+ id="INSTANCE_SPECIFICATION_CN"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="InstanceSpecification_Shape_CN, InstanceSpecification_NameLabel_CN, InstanceSpecification_SlotCompartment_CN"/>
+ </object>
+ <object
+ id="CONSTRAINT"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="Constraint_Shape, Constraint_NameLabel, Constraint_BodyLabel"/>
+ </object>
+ <object
+ id="CONSTRAINT_CN"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="Constraint_Shape_CN, Constraint_NameLabel_CN, Constraint_FloatingNameLabel_CN"/>
+ </object>
+ <object
+ id="COMMENT"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="Comment_Shape, Comment_BodyLabel"/>
+ </object>
+ <object
+ id="COMMENT_CN"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="Comment_Shape_CN, Comment_BodyLabel_CN"/>
+ </object>
+
+ <object
+ id="INSTANCE_SPECIFICATION_SLOT_CLN"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="Slot_SlotLabel"/>
+ </object>
+
+ <object
+ id="COMMENT_ANNOTATED_ELEMENT"
+ class="org.eclipse.gmf.runtime.notation.Edge">
+ <method name="getType()" value="Comment_AnnotatedElementEdge"/>
+ </object>
+ <object
+ id="CONSTRAINT_CONSTRAINED_ELEMENT"
+ class="org.eclipse.gmf.runtime.notation.Edge">
+ <method name="getType()" value="Constraint_ConstrainedElementEdge"/>
+ </object>
+
+ <context views="MODEL, MODEL_CN, PACKAGE, PACKAGE_CN, INSTANCE_SPECIFICATION, INSTANCE_SPECIFICATION_CN, CONSTRAINT, CONSTRAINT_CN, COMMENT, COMMENT_CN"/>
+ <context views="INSTANCE_SPECIFICATION_SLOT_CLN"/>
+ <context views="COMMENT_ANNOTATED_ELEMENT, CONSTRAINT_CONSTRAINED_ELEMENT"/>
+
+ </editpartProvider>
+</extension>
+
+<!-- Diagram edit policy provider -->
+<extension
+ point="org.eclipse.gmf.runtime.diagram.ui.editpolicyProviders">
+ <editpolicyProvider
+ class="org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.CustomEditPolicyProvider">
+ <Priority name="Low"/>
+ </editpolicyProvider>
+</extension>
+
+<!-- Preference pages declaration -->
+<extension point="org.eclipse.ui.preferencePages" id="prefpages">
+
+ <!-- Diagram Preference pages declaration -->
+ <page
+ id="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences"
+ name="BlockDefinition Diagram"
+ category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams"
+ class="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.BlockDefinitionDiagramGeneralPreferencePage">
+ </page>
+
+ <!-- Element Preference pages declaration -->
+ <page category="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.ModelPreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.ModelPreferencePage"
+ name="Model">
+ </page>
+
+
+
+
+ <page category="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.PackagePreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.PackagePreferencePage"
+ name="Package">
+ </page>
+
+
+
+
+ <page category="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.InstanceSpecificationPreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.InstanceSpecificationPreferencePage"
+ name="InstanceSpecification">
+ </page>
+
+
+
+
+ <page category="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.ConstraintPreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.ConstraintPreferencePage"
+ name="Constraint">
+ </page>
+
+
+
+
+ <page category="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.CommentPreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.CommentPreferencePage"
+ name="Comment">
+ </page>
+
+
+
+
+
+
+
+
+ <page category="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.SlotPreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.SlotPreferencePage"
+ name="Slot">
+ </page>
+
+
+
+ <page category="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.ActorPreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.ActorPreferencePage"
+ name="Actor">
+ </page>
+
+ <page category="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.BlockPreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.BlockPreferencePage"
+ name="Block">
+ </page>
+
+ <page category="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.ConstraintPreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.ConstraintPreferencePage"
+ name="Constraint">
+ </page>
+
+ <page category="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.ConstraintBlockPreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.ConstraintBlockPreferencePage"
+ name="ConstraintBlock">
+ </page>
+
+ <page category="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.ConstraintPropertyPreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.ConstraintPropertyPreferencePage"
+ name="ConstraintProperty">
+ </page>
+
+ <page category="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.DataTypePreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.DataTypePreferencePage"
+ name="DataType">
+ </page>
+
+ <page category="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.DimensionPreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.DimensionPreferencePage"
+ name="Dimension">
+ </page>
+
+ <page category="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.EnumerationPreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.EnumerationPreferencePage"
+ name="Enumeration">
+ </page>
+
+ <page category="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.EnumerationLiteralPreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.EnumerationLiteralPreferencePage"
+ name="EnumerationLiteral">
+ </page>
+
+ <page category="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.FlowPortPreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.FlowPortPreferencePage"
+ name="FlowPort">
+ </page>
+
+ <page category="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.FlowPropertyPreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.FlowPropertyPreferencePage"
+ name="FlowProperty">
+ </page>
+
+ <page category="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.FlowSpecificationPreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.FlowSpecificationPreferencePage"
+ name="FlowSpecification">
+ </page>
+
+ <page category="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.InterfacePreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.InterfacePreferencePage"
+ name="Interface">
+ </page>
+
+ <page category="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.OperationPreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.OperationPreferencePage"
+ name="Operation">
+ </page>
+
+ <page category="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.PartPreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.PartPreferencePage"
+ name="Part">
+ </page>
+
+ <page category="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.PortPreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.PortPreferencePage"
+ name="Port">
+ </page>
+
+ <page category="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.PrimitiveTypePreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.PrimitiveTypePreferencePage"
+ name="PrimitiveType">
+ </page>
+
+ <page category="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.PropertyPreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.PropertyPreferencePage"
+ name="Property">
+ </page>
+
+ <page category="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.ReceptionPreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.ReceptionPreferencePage"
+ name="Reception">
+ </page>
+
+ <page category="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.ReferencePreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.ReferencePreferencePage"
+ name="Reference">
+ </page>
+
+ <page category="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.SignalPreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.SignalPreferencePage"
+ name="Signal">
+ </page>
+
+ <page category="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.UnitPreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.UnitPreferencePage"
+ name="Unit">
+ </page>
+
+ <page category="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.ValuePreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.ValuePreferencePage"
+ name="Value">
+ </page>
+
+ <page category="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.ValueTypePreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.ValueTypePreferencePage"
+ name="ValueType">
+ </page>
+
+ <page category="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.AssociationPreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.AssociationPreferencePage"
+ name="Association">
+ </page>
+
+ <page category="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.DependencyPreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.DependencyPreferencePage"
+ name="Dependency">
+ </page>
+
+ <page category="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.GeneralizationPreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.GeneralizationPreferencePage"
+ name="Generalization">
+ </page>
+
+ <page category="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.InterfaceRealizationPreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.InterfaceRealizationPreferencePage"
+ name="InterfaceRealization">
+ </page>
+
+ <page category="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.UsagePreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.UsagePreferencePage"
+ name="Usage">
+ </page>
+
+
+</extension>
+
+<!-- // Start of user code custom extensions
+ -->
+
+<!-- Insert custom extensions here. -->
+
+<!-- Palette tool declaration (declares the real palette containment) -->
+<extension point="org.eclipse.papyrus.uml.diagram.common.paletteDefinition"
+ name="SysML Constraints (BDD)">
+ <paletteDefinition ID="SYSML_Constraints_BlockDefinition"
+ class="org.eclipse.papyrus.uml.diagram.common.service.PluginPaletteProvider"
+ name="SYSML_Constraints_BlockDefinition" icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ path="palettes/blockdefinition.palette.constraints.xml"
+ provider="CEA LIST">
+ <Priority name="Low"/>
+
+ <!-- Specify diagram this palette tools relate to -->
+ <editor id="org.eclipse.papyrus.sysml.diagram.blockdefinition"/>
+ </paletteDefinition>
+</extension>
+
+<!-- Palette tool declaration (declares the real palette containment) -->
+<extension point="org.eclipse.papyrus.uml.diagram.common.paletteDefinition"
+ name="SysML DataTypes (BDD)">
+ <paletteDefinition ID="SYSML_DataTypes_BlockDefinition"
+ class="org.eclipse.papyrus.uml.diagram.common.service.PluginPaletteProvider"
+ name="SYSML_DataTypes_BlockDefinition" icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ path="palettes/blockdefinition.palette.datatypes.xml"
+ provider="CEA LIST">
+ <Priority name="Low"/>
+
+ <!-- Specify diagram this palette tools relate to -->
+ <editor id="org.eclipse.papyrus.sysml.diagram.blockdefinition"/>
+ </paletteDefinition>
+</extension>
+
+<!-- Palette tool declaration (declares the real palette containment) -->
+<extension point="org.eclipse.papyrus.uml.diagram.common.paletteDefinition"
+ name="SysML Port and flows (BDD)">
+ <paletteDefinition ID="SYSML_PortAndFlows_BlockDefinition"
+ class="org.eclipse.papyrus.uml.diagram.common.service.PluginPaletteProvider"
+ name="SYSML_PortAndFlows_BlockDefinition" icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ path="palettes/blockdefinition.palette.portandflows.xml"
+ provider="CEA LIST">
+ <Priority name="Low"/>
+
+ <!-- Specify diagram this palette tools relate to -->
+ <editor id="org.eclipse.papyrus.sysml.diagram.blockdefinition"/>
+ </paletteDefinition>
+</extension>
+
+<!-- Palette tool declaration (declares the real palette containment) -->
+<extension point="org.eclipse.papyrus.uml.diagram.common.paletteDefinition"
+ name="SysML ModelElements (BDD)">
+ <paletteDefinition ID="SYSML_ModelElements_BlockDefinition"
+ class="org.eclipse.papyrus.uml.diagram.common.service.PluginPaletteProvider"
+ name="SYSML_ModelElements_BlockDefinition" icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ path="palettes/blockdefinition.palette.modelelements.xml"
+ provider="CEA LIST">
+ <Priority name="Low"/>
+
+ <!-- Specify diagram this palette tools relate to -->
+ <editor id="org.eclipse.papyrus.sysml.diagram.blockdefinition"/>
+ </paletteDefinition>
+</extension>
+
+<!-- Palette tool declaration (declares the real palette containment) -->
+<extension point="org.eclipse.papyrus.uml.diagram.common.paletteDefinition"
+ name="SysML Associations (BDD)">
+ <paletteDefinition ID="SYSML_Associations_BlockDefinition"
+ class="org.eclipse.papyrus.uml.diagram.common.service.PluginPaletteProvider"
+ name="SYSML_Associations_BlockDefinition" icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ path="palettes/blockdefinition.palette.associations.xml"
+ provider="CEA LIST">
+ <Priority name="Low"/>
+
+ <!-- Specify diagram this palette tools relate to -->
+ <editor id="org.eclipse.papyrus.sysml.diagram.blockdefinition"/>
+ </paletteDefinition>
+</extension>
+
+<!-- Parser provider declaration -->
+<extension point="org.eclipse.gmf.runtime.common.ui.services.parserProviders">
+ <ParserProvider class="org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ParserProvider">
+ <Priority name="Low"/>
+ </ParserProvider>
+</extension>
+
+<extension point="org.eclipse.gmf.runtime.common.ui.services.markerNavigationProviders" id="markers-navigation">
+ <MarkerNavigationProvider class="org.eclipse.papyrus.gmf.diagram.common.provider.MarkerNavigationProvider">
+ <MarkerType name="org.eclipse.papyrus.sysml.diagram.blockdefinition.diagnostic"/>
+ <Priority name="Lowest"/>
+ </MarkerNavigationProvider>
+ </extension>
+
+<extension id="diagnostic" name="Block Definition Diagram problems" point="org.eclipse.core.resources.markers">
+ <super type="org.eclipse.core.resources.problemmarker"/>
+ <super type="org.eclipse.gmf.runtime.common.ui.services.marker"/>
+ <persistent value="true"/>
+</extension>
+
+<extension id="validationDecoratorProvider" name="ValidationDecorations" point="org.eclipse.gmf.runtime.diagram.ui.decoratorProviders">
+ <decoratorProvider class="org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ValidationDecoratorProvider">
+ <Priority name="Lowest"/>
+ <object class="org.eclipse.gmf.runtime.diagram.ui.editparts.IPrimaryEditPart(org.eclipse.gmf.runtime.diagram.ui)" id="PRIMARY_VIEW"/>
+ <context decoratorTargets="PRIMARY_VIEW"/>
+ </decoratorProvider>
+</extension>
+
+<!-- The Command to manages the Provided and Required Interfaces for a Port-->
+<extension
+ point="org.eclipse.ui.commands">
+ <command
+ categoryId="org.eclipse.papyrus.editor.category"
+ description="Allows to manage easily provided Interfaces for a Port"
+ id="org.eclipse.papyrus.sysml.diagram.blockdefinition.command.manage.interfaces"
+ name="Manage Provided Interfaces">
+ </command>
+</extension>
+<!-- The Handler to manages the Provided and Required Interfaces for a Port-->
+<extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.papyrus.sysml.diagram.blockdefinition.handler.ManageProvidedInterfacesHandler"
+ commandId="org.eclipse.papyrus.sysml.diagram.blockdefinition.command.manage.interfaces">
+ <activeWhen>
+ <and>
+ <with
+ variable="selection">
+ <iterate>
+ <instanceof
+ value="org.eclipse.papyrus.uml.diagram.common.edit.part.DefaultChildLabelEditPart">
+ </instanceof>
+ </iterate>
+ </with>
+ <with
+ variable="activeEditor">
+ <test
+ forcePluginActivation="true"
+ property="org.eclipse.papyrus.uml.diagram.common.diagram.tester.diagramType"
+ value="BlockDefinition">
+ </test>
+ </with>
+ </and>
+ </activeWhen>
+ </handler>
+</extension>
+
+<!-- Add the Menu to manages the Provided and Required Interfaces for a Port-->
+<extension
+ point="org.eclipse.ui.menus">
+ <menuContribution
+ allPopups="false"
+ locationURI="popup:org.eclipse.gmf.runtime.diagram.ui.DiagramEditorContextMenu?endof=editMenu">
+ <command
+ commandId="org.eclipse.papyrus.sysml.diagram.blockdefinition.command.manage.interfaces"
+ icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Interface.gif"
+ id="org.eclipse.papyrus.sysml.diagram.blockdefinition.popup.manage.interface"
+ label="Manage Interfaces"
+ mnemonic="&I"
+ style="push"
+ tooltip="The command to manage the interfaces provided and required by a Port">
+ <!-- The action is visible only if there is an active handler for it -->
+ <visibleWhen
+ checkEnabled="true">
+ </visibleWhen>
+ </command>
+ </menuContribution>
+</extension>
+
+<!-- Diagram specific advices -->
+<extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypes">
+
+ <metamodel nsURI="http://www.eclipse.org/uml2/3.0.0/UML">
+
+ <!-- Delete moved views advice -->
+ <adviceBinding id="org.eclipse.papyrus.sysml.diagram.blockdefinition.DeleteViewDuringMoveHelperAdvice"
+ class="org.eclipse.papyrus.sysml.diagram.blockdefinition.helper.advice.DeleteViewDuringMoveHelperAdvice"
+ inheritance="all" typeId="org.eclipse.papyrus.uml.Element">
+ </adviceBinding>
+
+ </metamodel>
+</extension>
+
+<!-- UML ElementType bindings to Papyrus shared IClientContext -->
+<extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypeBindings">
+
+ <!-- Bindings declaration to shared IClientContext -->
+ <binding context="org.eclipse.papyrus.infra.services.edit.TypeContext">
+ <elementType ref="org.eclipse.papyrus.sysml.diagram.blockdefinition.DeleteViewDuringMoveHelperAdvice"/>
+ </binding>
+
+</extension>
+<!-- // End of user code
+ -->
+
+</plugin>
\ No newline at end of file
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/plugin.properties b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/plugin.properties
new file mode 100755
index 0000000..db5df7e
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/plugin.properties
@@ -0,0 +1,12 @@
+#################################################################################
+# Copyright (c) 2010 CEA LIST.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - initial API and implementation
+##################################################################################
+pluginName=SysML Block Definition Diagram
+providerName=Eclipse Modeling Project
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/plugin.xml b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/plugin.xml
new file mode 100755
index 0000000..83dab0d
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/plugin.xml
@@ -0,0 +1,789 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+<!-- Diagram declaration -->
+<extension point="org.eclipse.papyrus.infra.ui.papyrusDiagram">
+ <creationCommand
+ creationCommandClass="org.eclipse.papyrus.sysml.diagram.blockdefinition.BlockDefinitionDiagramCreateCommand"
+ creationCondition="org.eclipse.papyrus.sysml.diagram.blockdefinition.BlockDefinitionDiagramCondition"
+ icon="icons/obj16/Diagram_BlockDefinition.gif"
+ id="org.eclipse.papyrus.sysml.diagram.blockdefinition.CreateCommand"
+ language="sysml"
+ label="Block Definition Diagram"/>
+ <editorDiagram
+ actionBarContributorId="org.eclipse.papyrus.uml.diagram.common.part.UMLDiagramActionBarContributor"
+ factoryClass="org.eclipse.papyrus.sysml.diagram.blockdefinition.BlockDefinitionDiagramEditorFactory"
+ icon="icons/obj16/Diagram_BlockDefinition.gif" />
+</extension>
+
+<!-- Diagram creation command and handler -->
+<extension point="org.eclipse.ui.commands">
+ <command id="org.eclipse.papyrus.sysml.diagram.blockdefinition.CreateCommand"
+ name="Create a new Block Definition Diagram"
+ description="Create a new Block Definition Diagram"
+ categoryId="org.eclipse.papyrus.editor.category"/>
+</extension>
+
+<extension point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.papyrus.sysml.diagram.blockdefinition.BlockDefinitionDiagramCreateCommand"
+ commandId="org.eclipse.papyrus.sysml.diagram.blockdefinition.CreateCommand">
+ <activeWhen>
+ <with variable="activeEditorId">
+ <equals value="org.eclipse.papyrus.infra.core.papyrusEditor" />
+ </with>
+ </activeWhen>
+ </handler>
+</extension>
+
+<!-- Diagram creation command registration in menu and toolbar -->
+
+<!-- Palette tool definition (defines tools possibly used by the palette(s)) -->
+
+<!-- Diagram view providers declaration -->
+<extension point="org.eclipse.gmf.runtime.diagram.core.viewProviders">
+ <!-- Diagram view provider -->
+ <viewProvider class="org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.BlockDefinitionDiagramViewProvider">
+ <Priority name="Low"/>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Diagram" semanticHints="BlockDefinition"/>
+ </viewProvider>
+
+ <!-- Custom graphical types view provider -->
+ <viewProvider class="org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.CustomViewProvider">
+ <Priority name="Medium"/>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="SysML::ActorPartProperty, SysML::ReferenceProperty, UML::EnumerationLiteral, SysML::ConstraintBlock, UML::Signal, UML::Operation, SysML::FlowProperty, UML::PrimitiveType, UML::Port, SysML::ConstraintProperty, SysML::ValueProperty, UML::Reception, UML::Interface, UML::Constraint, UML::DataType, SysML::Unit, UML::Enumeration, SysML::ValueType, UML::Actor, UML::Property, SysML::Dimension, SysML::FlowSpecification, SysML::PartProperty, SysML::Block, SysML::FlowPort"/>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="shape_sysml_block_as_classifier, shape_sysml_part_as_label, shape_uml_reception_as_label, shape_uml_port_as_label, shape_sysml_valuetype_as_classifier, shape_uml_enumerationliteral_as_label, shape_sysml_constraintproperty_as_label, shape_sysml_dimension_as_classifier, shape_sysml_flowspecification_as_classifier, shape_uml_operation_as_label, shape_sysml_reference_as_label, shape_sysml_unit_as_classifier, shape_sysml_flowport_as_affixed, shape_uml_port_as_affixed, shape_uml_property_as_label, shape_uml_signal_as_classifier, shape_uml_enumeration_as_classifier, shape_uml_primitivetype_as_classifier, shape_uml_datatype_as_classifier, shape_uml_interface_as_classifier, shape_sysml_flowproperty_as_label, shape_sysml_constraintblock_as_classifier, shape_sysml_value_as_label, shape_sysml_flowport_as_label, shape_uml_actor_as_classifier, shape_uml_constraint_as_label"/>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="SysML::AssociationNone, UML::Dependency, SysML::Association, UML::InterfaceRealization, UML::Generalization, SysML::AssociationSharedDirected, SysML::AssociationCompositeDirected, SysML::AssociationComposite, UML::Usage, SysML::AssociationNoneDirected, SysML::AssociationShared"/>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="link_uml_dependency, link_uml_usage, link_uml_interfacerealization, link_sysml_association, link_uml_generalization"/>
+
+ <object id="elementtype.node"
+ class="org.eclipse.papyrus.gmf.diagram.common.commands.ISemanticHintAdapter(org.eclipse.papyrus.sysml.diagram.common)">
+
+ <method
+ name="getSemanticHint()"
+ value="SysML::ActorPartProperty, SysML::ReferenceProperty, UML::EnumerationLiteral, SysML::ConstraintBlock, UML::Signal, UML::Operation, SysML::FlowProperty, UML::PrimitiveType, UML::Port, SysML::ConstraintProperty, SysML::ValueProperty, UML::Reception, UML::Interface, UML::Constraint, UML::DataType, SysML::Unit, UML::Enumeration, SysML::ValueType, UML::Actor, UML::Property, SysML::Dimension, SysML::FlowSpecification, SysML::PartProperty, SysML::Block, SysML::FlowPort">
+ </method>
+ </object>
+ <context
+ elements="elementtype.node"
+ viewClass="org.eclipse.gmf.runtime.notation.Node">
+ </context>
+ <object id="elementtype.edge"
+ class="org.eclipse.papyrus.gmf.diagram.common.commands.ISemanticHintAdapter(org.eclipse.papyrus.sysml.diagram.common)">
+ <method
+ name="getSemanticHint()"
+ value="SysML::AssociationNone, UML::Dependency, SysML::Association, UML::InterfaceRealization, UML::Generalization, SysML::AssociationSharedDirected, SysML::AssociationCompositeDirected, SysML::AssociationComposite, UML::Usage, SysML::AssociationNoneDirected, SysML::AssociationShared">
+ </method>
+ </object>
+ <context
+ elements="elementtype.edge"
+ viewClass="org.eclipse.gmf.runtime.notation.Edge">
+ </context>
+
+ <!-- Additional descriptors provided in case the semantic hint is is not provided -->
+
+ <!-- "uml.Actor" -->
+ <object id="uml.Actor" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Actor"/>
+ </object>
+ <context
+ elements="uml.Actor"
+ viewClass="org.eclipse.gmf.runtime.notation.Node"/>
+
+ <!-- "uml.Class" -->
+ <object id="uml.Class" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Class"/>
+ </object>
+ <context
+ elements="uml.Class"
+ viewClass="org.eclipse.gmf.runtime.notation.Node"/>
+
+ <!-- "uml.Constraint" -->
+ <object id="uml.Constraint" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Constraint"/>
+ </object>
+ <context
+ elements="uml.Constraint"
+ viewClass="org.eclipse.gmf.runtime.notation.Node"/>
+
+ <!-- "uml.DataType" -->
+ <object id="uml.DataType" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.DataType"/>
+ </object>
+ <context
+ elements="uml.DataType"
+ viewClass="org.eclipse.gmf.runtime.notation.Node"/>
+
+ <!-- "uml.Enumeration" -->
+ <object id="uml.Enumeration" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Enumeration"/>
+ </object>
+ <context
+ elements="uml.Enumeration"
+ viewClass="org.eclipse.gmf.runtime.notation.Node"/>
+
+ <!-- "uml.EnumerationLiteral" -->
+ <object id="uml.EnumerationLiteral" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.EnumerationLiteral"/>
+ </object>
+ <context
+ elements="uml.EnumerationLiteral"
+ viewClass="org.eclipse.gmf.runtime.notation.Node"/>
+
+ <!-- "uml.InstanceSpecification" -->
+ <object id="uml.InstanceSpecification" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.InstanceSpecification"/>
+ </object>
+ <context
+ elements="uml.InstanceSpecification"
+ viewClass="org.eclipse.gmf.runtime.notation.Node"/>
+
+ <!-- "uml.Interface" -->
+ <object id="uml.Interface" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Interface"/>
+ </object>
+ <context
+ elements="uml.Interface"
+ viewClass="org.eclipse.gmf.runtime.notation.Node"/>
+
+ <!-- "uml.Operation" -->
+ <object id="uml.Operation" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Operation"/>
+ </object>
+ <context
+ elements="uml.Operation"
+ viewClass="org.eclipse.gmf.runtime.notation.Node"/>
+
+ <!-- "uml.Port" -->
+ <object id="uml.Port" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Port"/>
+ </object>
+ <context
+ elements="uml.Port"
+ viewClass="org.eclipse.gmf.runtime.notation.Node"/>
+
+ <!-- "uml.PrimitiveType" -->
+ <object id="uml.PrimitiveType" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.PrimitiveType"/>
+ </object>
+ <context
+ elements="uml.PrimitiveType"
+ viewClass="org.eclipse.gmf.runtime.notation.Node"/>
+
+ <!-- "uml.Property" -->
+ <object id="uml.Property" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Property"/>
+ </object>
+ <context
+ elements="uml.Property"
+ viewClass="org.eclipse.gmf.runtime.notation.Node"/>
+
+ <!-- "uml.Reception" -->
+ <object id="uml.Reception" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Reception"/>
+ </object>
+ <context
+ elements="uml.Reception"
+ viewClass="org.eclipse.gmf.runtime.notation.Node"/>
+
+ <!-- "uml.Signal" -->
+ <object id="uml.Signal" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Signal"/>
+ </object>
+ <context
+ elements="uml.Signal"
+ viewClass="org.eclipse.gmf.runtime.notation.Node"/>
+
+ <!-- "uml.Association" -->
+ <object id="uml.Association" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Association"/>
+ </object>
+ <context
+ elements="uml.Association"
+ viewClass="org.eclipse.gmf.runtime.notation.Edge"/>
+
+ <!-- "uml.Dependency" -->
+ <object id="uml.Dependency" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Dependency"/>
+ </object>
+ <context
+ elements="uml.Dependency"
+ viewClass="org.eclipse.gmf.runtime.notation.Edge"/>
+
+ <!-- "uml.Generalization" -->
+ <object id="uml.Generalization" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Generalization"/>
+ </object>
+ <context
+ elements="uml.Generalization"
+ viewClass="org.eclipse.gmf.runtime.notation.Edge"/>
+
+ <!-- "uml.InterfaceRealization" -->
+ <object id="uml.InterfaceRealization" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.InterfaceRealization"/>
+ </object>
+ <context
+ elements="uml.InterfaceRealization"
+ viewClass="org.eclipse.gmf.runtime.notation.Edge"/>
+
+ <!-- "uml.Usage" -->
+ <object id="uml.Usage" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Usage"/>
+ </object>
+ <context
+ elements="uml.Usage"
+ viewClass="org.eclipse.gmf.runtime.notation.Edge"/>
+
+ </viewProvider>
+
+ <!-- ViewProvider for inherited elements (from ClassDiagram ViewProvider) -->
+ <viewProvider class="org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.InheritedClassDiagramViewProvider">
+ <Priority name="Low"/>
+
+ <!-- Load the ViewProvider on following SemanticHint related to IElementType(s) used in the palette (also used for legacy elements) -->
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="UML::Model, UML::Package, UML::InstanceSpecification, UML::Comment, UML::Constraint, UML::Slot"/>
+
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="Model_Shape, Model_Shape_CN, Package_Shape, Package_Shape_CN, InstanceSpecification_Shape, InstanceSpecification_Shape_CN, Constraint_Shape, Constraint_Shape_CN, Comment_Shape, Comment_Shape_CN"/>
+
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="Slot_SlotLabel"/>
+
+ <context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="Comment_AnnotatedElementEdge, Constraint_ConstrainedElementEdge"/>
+
+ <!-- Additional descriptors provided in case the semantic hint is is not provided -->
+
+ <!-- "uml.Model" -->
+ <object id="uml.Model" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Model"/>
+ </object>
+
+ <!-- "uml.Package" -->
+ <object id="uml.Package" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Package"/>
+ </object>
+
+ <!-- "uml.InstanceSpecification" -->
+ <object id="uml.InstanceSpecification" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.InstanceSpecification"/>
+ </object>
+
+ <!-- "uml.Constraint" -->
+ <object id="uml.Constraint" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Constraint"/>
+ </object>
+
+ <!-- "uml.Comment" -->
+ <object id="uml.Comment" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Comment"/>
+ </object>
+
+ <!-- "uml.Slot" -->
+ <object id="uml.Slot" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Slot"/>
+ </object>
+
+ <!-- Additional activation contexts for nodes semantic objects -->
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node"
+ elements="uml.Model, uml.Package, uml.InstanceSpecification, uml.Constraint, uml.Comment, uml.Slot"/>
+
+ </viewProvider>
+</extension>
+
+<!-- Diagram edit part providers declaration -->
+<extension point="org.eclipse.gmf.runtime.diagram.ui.editpartProviders">
+ <!-- Diagram edit part provider -->
+ <editpartProvider class="org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.BlockDefinitionDiagramEditPartProvider">
+ <Priority name="Low"/>
+ <object
+ id="org.eclipse.papyrus.sysml.diagram.blockdefinition.Diagram"
+ class="org.eclipse.gmf.runtime.notation.Diagram">
+ <method name="getType()" value="BlockDefinition"/>
+ </object>
+ <context views="org.eclipse.papyrus.sysml.diagram.blockdefinition.Diagram"/>
+ </editpartProvider>
+
+ <!-- Custom graphical types edit part provider -->
+ <editpartProvider class="org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.CustomEditPartProvider">
+ <Priority name="Medium"/>
+
+ <object
+ class="org.eclipse.gmf.runtime.notation.Node(org.eclipse.gmf.runtime.notation)"
+ id="org.eclipse.papyrus.sysml.diagram.blockdefinition.CustomNodeGraphicalTypes">
+ <method name="getType()" value="shape_sysml_block_as_classifier, shape_sysml_part_as_label, shape_uml_reception_as_label, shape_uml_port_as_label, shape_sysml_valuetype_as_classifier, shape_uml_enumerationliteral_as_label, shape_sysml_constraintproperty_as_label, shape_sysml_dimension_as_classifier, shape_sysml_flowspecification_as_classifier, shape_uml_operation_as_label, shape_sysml_reference_as_label, shape_sysml_unit_as_classifier, shape_sysml_flowport_as_affixed, shape_uml_port_as_affixed, shape_uml_property_as_label, shape_uml_signal_as_classifier, shape_uml_enumeration_as_classifier, shape_uml_primitivetype_as_classifier, shape_uml_datatype_as_classifier, shape_uml_interface_as_classifier, shape_sysml_flowproperty_as_label, shape_sysml_constraintblock_as_classifier, shape_sysml_value_as_label, shape_sysml_flowport_as_label, shape_uml_actor_as_classifier, shape_uml_constraint_as_label"/>
+ </object>
+
+ <object
+ class="org.eclipse.gmf.runtime.notation.Node(org.eclipse.gmf.runtime.notation)"
+ id="org.eclipse.papyrus.sysml.diagram.blockdefinition.CustomGraphicalTypes_Decorations">
+ <method name="getType()" value="linklabel_uml_association_target_role, compartment_sysml_value_as_list, label_sysml_block_name, compartment_sysml_flowproperty_as_list, affixedlabel_uml_port_label, affixedlabel_sysml_flowport_label, linklabel_uml_association_source_multiplicity, label_sysml_dimension_name, linklabel_uml_appliedstereotype, linklabel_uml_association_source_role, linklabel_uml_association_target_multiplicity, compartment_sysml_constraint_as_list, label_sysml_valuetype_name, compartment_sysml_flowport_as_list, linklabel_uml_namedelement_name, compartment_sysml_reference_as_list, label_sysml_flowspecification_name, compartment_uml_property_as_list, label_sysml_unit_name, affixedlabel_uml_namedelement_name, compartment_uml_port_as_list, label_sysml_constraintblock_name, compartment_sysml_parameter_as_list, compartment_sysml_property_as_list, compartment_uml_enumerationliteral_as_list, affixedlabel_uml_appliedstereotype, compartment_uml_operation_as_list, compartment_sysml_part_as_list, label_uml_namedelement_name"/>
+ </object>
+
+ <context views="org.eclipse.papyrus.sysml.diagram.blockdefinition.CustomNodeGraphicalTypes"/>
+ <context views="org.eclipse.papyrus.sysml.diagram.blockdefinition.CustomGraphicalTypes_Decorations"/>
+
+ <object
+ class="org.eclipse.gmf.runtime.notation.Edge(org.eclipse.gmf.runtime.notation)"
+ id="org.eclipse.papyrus.sysml.diagram.blockdefinition.CustomEdgeGraphicalTypes">
+ <method name="getType()" value="link_uml_dependency, link_uml_usage, link_uml_interfacerealization, link_sysml_association, link_uml_generalization"/>
+ </object>
+
+ <context views="org.eclipse.papyrus.sysml.diagram.blockdefinition.CustomEdgeGraphicalTypes"/>
+
+ </editpartProvider>
+
+ <!-- EditPartProvider for inherited elements (from ClassDiagram) -->
+ <editpartProvider class="org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.InheritedClassDiagramEditPartProvider">
+ <Priority name="Low"/>
+ <object
+ id="MODEL"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="Model_Shape, Model_NameLabel, Model_PackagedElementCompartment"/>
+ </object>
+ <object
+ id="MODEL_CN"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="Model_Shape_CN, Model_NameLabel_CN, Model_PackagedElementCompartment_CN"/>
+ </object>
+ <object
+ id="PACKAGE"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="Package_Shape, Package_NameLabel, Package_PackagedElementCompartment"/>
+ </object>
+ <object
+ id="PACKAGE_CN"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="Package_Shape_CN, Package_NameLabel_CN, Package_PackagedElementCompartment_CN"/>
+ </object>
+ <object
+ id="INSTANCE_SPECIFICATION"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="InstanceSpecification_Shape, InstanceSpecification_NameLabel, InstanceSpecification_SlotCompartment"/>
+ </object>
+ <object
+ id="INSTANCE_SPECIFICATION_CN"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="InstanceSpecification_Shape_CN, InstanceSpecification_NameLabel_CN, InstanceSpecification_SlotCompartment_CN"/>
+ </object>
+ <object
+ id="CONSTRAINT"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="Constraint_Shape, Constraint_NameLabel, Constraint_BodyLabel"/>
+ </object>
+ <object
+ id="CONSTRAINT_CN"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="Constraint_Shape_CN, Constraint_NameLabel_CN, Constraint_FloatingNameLabel_CN"/>
+ </object>
+ <object
+ id="COMMENT"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="Comment_Shape, Comment_BodyLabel"/>
+ </object>
+ <object
+ id="COMMENT_CN"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="Comment_Shape_CN, Comment_BodyLabel_CN"/>
+ </object>
+
+ <object
+ id="INSTANCE_SPECIFICATION_SLOT_CLN"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="Slot_SlotLabel"/>
+ </object>
+
+ <object
+ id="COMMENT_ANNOTATED_ELEMENT"
+ class="org.eclipse.gmf.runtime.notation.Edge">
+ <method name="getType()" value="Comment_AnnotatedElementEdge"/>
+ </object>
+ <object
+ id="CONSTRAINT_CONSTRAINED_ELEMENT"
+ class="org.eclipse.gmf.runtime.notation.Edge">
+ <method name="getType()" value="Constraint_ConstrainedElementEdge"/>
+ </object>
+
+ <context views="MODEL, MODEL_CN, PACKAGE, PACKAGE_CN, INSTANCE_SPECIFICATION, INSTANCE_SPECIFICATION_CN, CONSTRAINT, CONSTRAINT_CN, COMMENT, COMMENT_CN"/>
+ <context views="INSTANCE_SPECIFICATION_SLOT_CLN"/>
+ <context views="COMMENT_ANNOTATED_ELEMENT, CONSTRAINT_CONSTRAINED_ELEMENT"/>
+
+ </editpartProvider>
+</extension>
+
+<!-- Diagram edit policy provider -->
+<extension
+ point="org.eclipse.gmf.runtime.diagram.ui.editpolicyProviders">
+ <editpolicyProvider
+ class="org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.CustomEditPolicyProvider">
+ <Priority name="Low"/>
+ </editpolicyProvider>
+</extension>
+
+<!-- Preference pages declaration -->
+<extension point="org.eclipse.ui.preferencePages" id="prefpages">
+
+ <!-- Diagram Preference pages declaration -->
+ <page
+ id="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences"
+ name="BlockDefinition Diagram"
+ category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams"
+ class="org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.BlockDefinitionDiagramGeneralPreferencePage">
+ </page>
+
+</extension>
+
+<!-- Parser provider declaration -->
+<extension point="org.eclipse.gmf.runtime.common.ui.services.parserProviders">
+ <ParserProvider class="org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ParserProvider">
+ <Priority name="Low"/>
+ </ParserProvider>
+</extension>
+
+<!-- Validation markers declaration -->
+<extension point="org.eclipse.gmf.runtime.common.ui.services.markerNavigationProviders" id="markers-navigation">
+ <MarkerNavigationProvider class="org.eclipse.papyrus.gmf.diagram.common.provider.MarkerNavigationProvider">
+ <MarkerType name="org.eclipse.papyrus.sysml.diagram.blockdefinition.diagnostic"/>
+ <Priority name="Lowest"/>
+ </MarkerNavigationProvider>
+</extension>
+
+<extension id="diagnostic" name="Block Definition Diagram problems" point="org.eclipse.core.resources.markers">
+ <super type="org.eclipse.core.resources.problemmarker"/>
+ <super type="org.eclipse.gmf.runtime.common.ui.services.marker"/>
+ <persistent value="true"/>
+</extension>
+
+<extension id="validationDecoratorProvider" name="ValidationDecorations" point="org.eclipse.gmf.runtime.diagram.ui.decoratorProviders">
+ <decoratorProvider class="org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ValidationDecoratorProvider">
+ <Priority name="Lowest"/>
+ <object class="org.eclipse.gmf.runtime.diagram.ui.editparts.IPrimaryEditPart(org.eclipse.gmf.runtime.diagram.ui)" id="PRIMARY_VIEW"/>
+ <context decoratorTargets="PRIMARY_VIEW"/>
+ </decoratorProvider>
+</extension>
+
+<!-- The Command to manages the Provided and Required Interfaces for a Port-->
+<extension
+ point="org.eclipse.ui.commands">
+ <command
+ categoryId="org.eclipse.papyrus.editor.category"
+ description="Allows to manage easily provided Interfaces for a Port"
+ id="org.eclipse.papyrus.sysml.diagram.blockdefinition.command.manage.interfaces"
+ name="Manage Provided Interfaces">
+ </command>
+</extension>
+<!-- The Handler to manages the Provided and Required Interfaces for a Port-->
+<extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.papyrus.sysml.diagram.blockdefinition.handler.BlockDefinitionManageInterfacesHandler"
+ commandId="org.eclipse.papyrus.sysml.diagram.blockdefinition.command.manage.interfaces">
+ <activeWhen>
+ <and>
+ <or>
+ <with variable="selection">
+ <iterate>
+ <instanceof value="org.eclipse.papyrus.uml.diagram.common.edit.part.DefaultChildLabelEditPart"/>
+ </iterate>
+ </with>
+ <with variable="selection">
+ <iterate>
+ <instanceof value="org.eclipse.papyrus.uml.diagram.common.edit.part.PortAffixedNodeEditPart"/>
+ </iterate>
+ </with>
+ </or>
+ <with variable="activeEditor">
+ <test property="org.eclipse.papyrus.uml.diagram.common.diagram.tester.diagramType" value="BlockDefinition" forcePluginActivation="true"/>
+ </with>
+ </and>
+ </activeWhen>
+ </handler>
+</extension>
+
+<!-- Add the Menu to manages the Provided and Required Interfaces for a Port-->
+<extension
+ point="org.eclipse.ui.menus">
+ <menuContribution
+ allPopups="false"
+ locationURI="popup:org.eclipse.gmf.runtime.diagram.ui.DiagramEditorContextMenu?endof=editMenu">
+ <command
+ commandId="org.eclipse.papyrus.sysml.diagram.blockdefinition.command.manage.interfaces"
+ icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Interface.gif"
+ id="org.eclipse.papyrus.sysml.diagram.blockdefinition.popup.manage.interface"
+ label="Manage Interfaces"
+ mnemonic="&I"
+ style="push"
+ tooltip="The command to manage the interfaces provided and required by a Port">
+ <!-- The action is visible only if there is an active handler for it -->
+ <visibleWhen
+ checkEnabled="true">
+ </visibleWhen>
+ </command>
+ </menuContribution>
+</extension>
+
+<!-- Diagram specific advices -->
+<extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypes">
+
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+
+ <!-- Delete moved views advice -->
+ <adviceBinding id="org.eclipse.papyrus.sysml.diagram.blockdefinition.DeleteViewDuringMoveHelperAdvice"
+ class="org.eclipse.papyrus.sysml.diagram.blockdefinition.helper.advice.DeleteViewDuringMoveHelperAdvice"
+ inheritance="all" typeId="org.eclipse.papyrus.uml.Element">
+ </adviceBinding>
+
+ <!-- Generalization specific advices (remove inconsistent views when a Generalization is deleted) -->
+ <adviceBinding id="org.eclipse.papyrus.sysml.diagram.blockdefinition.GeneralizationHelperAdvice"
+ class="org.eclipse.papyrus.sysml.diagram.blockdefinition.helper.advice.GeneralizationHelperAdvice"
+ inheritance="all" typeId="org.eclipse.papyrus.uml.Generalization">
+ </adviceBinding>
+
+ <!-- Part specific advices (remove inconsistent views when a Part aggregation kind changes) -->
+ <adviceBinding id="org.eclipse.papyrus.sysml.diagram.blockdefinition.DeleteViewDuringPartEditHelperAdvice"
+ class="org.eclipse.papyrus.sysml.diagram.blockdefinition.helper.advice.DeleteViewDuringPartEditHelperAdvice"
+ inheritance="all" typeId="org.eclipse.papyrus.sysml.PartProperty">
+ </adviceBinding>
+
+ <!-- Reference specific advices (remove inconsistent views when a reference aggregation kind changes) -->
+ <adviceBinding id="org.eclipse.papyrus.sysml.diagram.blockdefinition.DeleteViewDuringReferenceEditHelperAdvice"
+ class="org.eclipse.papyrus.sysml.diagram.blockdefinition.helper.advice.DeleteViewDuringReferenceEditHelperAdvice"
+ inheritance="all" typeId="org.eclipse.papyrus.sysml.ReferenceProperty">
+ </adviceBinding>
+
+ <!-- Value specific advices (remove inconsistent views when a value aggregation or type changes) -->
+ <adviceBinding id="org.eclipse.papyrus.sysml.diagram.blockdefinition.DeleteViewDuringValueEditHelperAdvice"
+ class="org.eclipse.papyrus.sysml.diagram.blockdefinition.helper.advice.DeleteViewDuringValueEditHelperAdvice"
+ inheritance="all" typeId="org.eclipse.papyrus.sysml.ValueProperty">
+ </adviceBinding>
+
+ <!-- Block specific advices (remove inconsistent Part or Ref views when a Block is deleted)
+
+ Not used (the property itself is supposed to be deleted during Block delete, no need to create a specific view deletion.
+
+ <adviceBinding id="org.eclipse.papyrus.sysml.diagram.blockdefinition.DeleteViewDuringBlockDeleteHelperAdvice"
+ class="org.eclipse.papyrus.sysml.diagram.blockdefinition.helper.advice.DeleteViewDuringBlockDeleteHelperAdvice"
+ inheritance="all" typeId="org.eclipse.papyrus.sysml.Block">
+ </adviceBinding>
+
+ -->
+
+ <!-- DataType specific advices (remove inconsistent Value views when a DataType is deleted) -->
+ <adviceBinding id="org.eclipse.papyrus.sysml.diagram.blockdefinition.DeleteViewDuringDataTypeDeleteHelperAdvice"
+ class="org.eclipse.papyrus.sysml.diagram.blockdefinition.helper.advice.DeleteViewDuringDataTypeDeleteHelperAdvice"
+ inheritance="all" typeId="org.eclipse.papyrus.sysml.DataType">
+ </adviceBinding>
+
+ </metamodel>
+</extension>
+
+<!-- UML ElementType bindings to Papyrus shared IClientContext -->
+<extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypeBindings">
+
+ <!-- Bindings declaration to shared IClientContext -->
+ <binding context="org.eclipse.papyrus.infra.services.edit.TypeContext">
+ <elementType ref="org.eclipse.papyrus.sysml.diagram.blockdefinition.GeneralizationHelperAdvice"/>
+ <elementType ref="org.eclipse.papyrus.sysml.diagram.blockdefinition.DeleteViewDuringMoveHelperAdvice"/>
+ <elementType ref="org.eclipse.papyrus.sysml.diagram.blockdefinition.DeleteViewDuringPartEditHelperAdvice"/>
+ <elementType ref="org.eclipse.papyrus.sysml.diagram.blockdefinition.DeleteViewDuringReferenceEditHelperAdvice"/>
+ <elementType ref="org.eclipse.papyrus.sysml.diagram.blockdefinition.DeleteViewDuringValueEditHelperAdvice"/>
+ <elementType ref="org.eclipse.papyrus.sysml.diagram.blockdefinition.DeleteViewDuringDataTypeDeleteHelperAdvice"/>
+ </binding>
+
+</extension>
+<!-- // End of user code
+ -->
+<extension point="org.eclipse.papyrus.infra.gmfdiag.common.notationTypesMapping">
+ <diagramMappings diagramID="BlockDefinition">
+ <mapping type="BlockDefinition" humanReadableType="BlockDefinitionDiagram"/>
+ <!-- Compartments -->
+ <mapping
+ humanReadableType="literals"
+ type="compartment_uml_enumerationliteral_as_list">
+ </mapping>
+
+ <mapping
+ humanReadableType="operations"
+ type="compartment_uml_operation_as_list">
+ </mapping>
+
+ <mapping
+ humanReadableType="standard ports"
+ type="compartment_uml_port_as_list">
+ </mapping>
+
+ <mapping
+ humanReadableType="properties"
+ type="compartment_uml_property_as_list">
+ </mapping>
+
+ <mapping
+ humanReadableType="constraints"
+ type="compartment_sysml_constraint_as_list">
+ </mapping>
+
+ <mapping
+ humanReadableType="flow ports"
+ type="compartment_sysml_flowport_as_list">
+ </mapping>
+
+ <mapping
+ humanReadableType="flow properties"
+ type="compartment_sysml_flowproperty_as_list">
+ </mapping>
+
+ <mapping
+ humanReadableType="parameters"
+ type="compartment_sysml_parameter_as_list">
+ </mapping>
+
+ <mapping
+ humanReadableType="parts"
+ type="compartment_sysml_part_as_list">
+ </mapping>
+
+ <mapping
+ humanReadableType="references"
+ type="compartment_sysml_reference_as_list">
+ </mapping>
+
+ <mapping
+ humanReadableType="values"
+ type="compartment_sysml_value_as_list">
+ </mapping>
+
+ <mapping
+ humanReadableType="properties"
+ type="compartment_sysml_property_as_list">
+ </mapping>
+
+ <!-- Link labels -->
+
+ <mapping
+ humanReadableType="Name"
+ type="affixedlabel_uml_namedelement_name">
+ </mapping>
+
+ <mapping
+ humanReadableType="Name"
+ type="affixedlabel_uml_appliedstereotype">
+ </mapping>
+
+ <mapping
+ humanReadableType="Label"
+ type="affixedlabel_uml_port_label">
+ </mapping>
+
+ <mapping
+ humanReadableType="Label"
+ type="affixedlabel_sysml_flowport_label">
+ </mapping>
+
+ <mapping
+ humanReadableType="Stereotype"
+ type="linklabel_uml_appliedstereotype">
+ </mapping>
+
+ <mapping
+ humanReadableType="Name"
+ type="linklabel_uml_namedelement_name">
+ </mapping>
+
+ <mapping
+ humanReadableType="SourceMultiplicity"
+ type="linklabel_uml_association_source_multiplicity">
+ </mapping>
+
+ <mapping
+ humanReadableType="SourceRole"
+ type="linklabel_uml_association_source_role">
+ </mapping>
+
+ <mapping
+ humanReadableType="TargetMultiplicity"
+ type="linklabel_uml_association_target_multiplicity">
+ </mapping>
+
+ <mapping
+ humanReadableType="TargetRole"
+ type="linklabel_uml_association_target_role">
+ </mapping>
+ <mapping
+ humanReadableType="slots"
+ type="InstanceSpecification_SlotCompartment">
+ </mapping>
+ <mapping
+ humanReadableType="slots"
+ type="InstanceSpecification_SlotCompartment_CN">
+ </mapping>
+
+ <mapping
+ humanReadableType="packagedElements"
+ type="Model_PackagedElementCompartment_CN">
+ </mapping>
+ <mapping
+ humanReadableType="packagedElements"
+ type="Package_PackagedElementCompartment_CN">
+ </mapping>
+
+ <mapping
+ humanReadableType="packagedElements"
+ type="Model_PackagedElementCompartment">
+ </mapping>
+ <mapping
+ humanReadableType="packagedElements"
+ type="Package_PackagedElementCompartment">
+ </mapping>
+
+ </diagramMappings>
+ </extension>
+<extension
+ point="org.eclipse.papyrus.infra.gmfdiag.common.diagramReconciler">
+ <diagramReconciler
+ diagramType="BlockDefinition"
+ reconcilerClass="org.eclipse.papyrus.sysml.diagram.blockdefinition.migration.BDDReconciler"
+ source="0.9.1"
+ target="1.3.0">
+ </diagramReconciler>
+ <diagramReconciler
+ diagramType="BlockDefinition"
+ reconcilerClass="org.eclipse.papyrus.uml.diagram.clazz.custom.migration.ClassReconciler_1_1_0"
+ source="1.0.0"
+ target="1.3.0">
+ </diagramReconciler>
+ <diagramReconciler
+ diagramType="BlockDefinition"
+ reconcilerClass="org.eclipse.papyrus.uml.diagram.clazz.custom.migration.ClassReconcilerForCompartment_1_2_0"
+ source="1.1.0"
+ target="1.3.0">
+ </diagramReconciler>
+ <diagramReconciler
+ diagramType="BlockDefinition"
+ reconcilerClass="org.eclipse.papyrus.uml.diagram.clazz.custom.migration.ClassReconciler_1_2_0"
+ source="1.1.0"
+ target="1.3.0">
+ </diagramReconciler>
+</extension>
+
+ <extension
+ point="org.eclipse.papyrus.infra.gmfdiag.common.visualTypeProviders">
+ <visualTypeProvider
+ class="org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.BlockDefinitionVisualTypeProvider"
+ diagramType="BlockDefinition">
+ </visualTypeProvider>
+ </extension>
+
+<extension point="org.eclipse.papyrus.infra.gmfdiag.common.paletteDefinition">
+ <paletteDefinition
+ ID="org.eclipse.papyrus.sysml.diagram.blockdefinition.paletteconfiguration"
+ class="org.eclipse.papyrus.infra.gmfdiag.common.service.palette.ExtendedPluginPaletteProvider"
+ name="Papyrus SysML blockdefinition editor Plugin Palette"
+ path="palettes/PapyrusSYSMLBlockDefinitionDiagram.paletteconfiguration"
+ provider="Eclipse Modeling Project">
+ <Priority
+ name="Lowest">
+ </Priority>
+ <!-- Specify diagram this palette tools relate to -->
+ <editor
+ id="org.eclipse.papyrus.sysml.diagram.blockdefinition">
+ </editor>
+ </paletteDefinition>
+</extension>
+</plugin>
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/pom.xml b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/pom.xml
new file mode 100755
index 0000000..2a1718c
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/pom.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.papyrus.sysml</groupId>
+ <artifactId>org.eclipse.papyrus.sysml-diagram</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.papyrus.sysml.diagram.blockdefinition</artifactId>
+ <version>3.0.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project>
\ No newline at end of file
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/Activator.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/Activator.java
new file mode 100755
index 0000000..9e1a76e
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/Activator.java
@@ -0,0 +1,107 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition;
+
+import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.papyrus.infra.core.log.LogHelper;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.CustomPreferenceInitializer;
+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.sysml.diagram.blockdefinition";
+
+ /** The plug-in shared instance */
+ private static Activator plugin;
+
+ /** The logging helper */
+ public static LogHelper log;
+
+ /** The plug-in Preference store */
+ public static final PreferencesHint DIAGRAM_PREFERENCES_HINT = new PreferencesHint(PLUGIN_ID);
+
+ /** Default constructor */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+
+ // register the login helper
+ log = new LogHelper(plugin);
+
+ // register the preference store
+ PreferencesHint.registerPreferenceStore(DIAGRAM_PREFERENCES_HINT, getPreferenceStore());
+
+ // Preferences initialization
+ CustomPreferenceInitializer diagramPreferenceInitializer = new CustomPreferenceInitializer();
+ diagramPreferenceInitializer.initializeDefaultPreferences();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getInstance() {
+ return plugin;
+ }
+
+ /**
+ * Returns an image descriptor for the image file at the given plug-in relative path.
+ *
+ * @generated
+ * @param path
+ * the path
+ * @return the image descriptor
+ */
+ public static ImageDescriptor getBundledImageDescriptor(String path) {
+ return AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, path);
+ }
+
+ /**
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#getPreferenceStore()
+ *
+ * @return Shared Preference Store.
+ */
+ @Override
+ public IPreferenceStore getPreferenceStore() {
+ IPreferenceStore store = org.eclipse.papyrus.infra.gmfdiag.preferences.Activator.getDefault().getPreferenceStore();
+ return store;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/BlockDefinitionDiagramCreateCommand.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/BlockDefinitionDiagramCreateCommand.java
new file mode 100755
index 0000000..0593fdb
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/BlockDefinitionDiagramCreateCommand.java
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Laurent Wouters (CEA LIST) laurent.wouters@cea.fr - Viewpoints application
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition;
+
+import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
+import org.eclipse.papyrus.infra.gmfdiag.common.AbstractPapyrusGmfCreateDiagramCommandHandler;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+
+/**
+ * Represents the creation command for a SysML block definition diagram
+ *
+ * @author Laurent Wouters
+ */
+public class BlockDefinitionDiagramCreateCommand extends AbstractPapyrusGmfCreateDiagramCommandHandler {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getDefaultDiagramName() {
+ return "New Block Definition Diagram"; //$NON-NLS-1$
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getDiagramNotationID() {
+ return ElementTypes.DIAGRAM_ID;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected PreferencesHint getPreferenceHint() {
+ return Activator.DIAGRAM_PREFERENCES_HINT;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/BlockDefinitionDiagramEditorFactory.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/BlockDefinitionDiagramEditorFactory.java
new file mode 100755
index 0000000..4edfa83
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/BlockDefinitionDiagramEditorFactory.java
@@ -0,0 +1,25 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition;
+
+import org.eclipse.papyrus.infra.gmfdiag.common.GmfEditorFactory;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+
+public class BlockDefinitionDiagramEditorFactory extends GmfEditorFactory {
+
+ public BlockDefinitionDiagramEditorFactory() {
+ super(BlockDefinitionDiagramForMultiEditor.class, ElementTypes.DIAGRAM_ID);
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/BlockDefinitionDiagramForMultiEditor.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/BlockDefinitionDiagramForMultiEditor.java
new file mode 100755
index 0000000..a5c21be
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/BlockDefinitionDiagramForMultiEditor.java
@@ -0,0 +1,133 @@
+/*****************************************************************************
+ * Copyright (c) 2011, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 392301
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.emf.common.ui.URIEditorInput;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.papyrus.infra.core.editor.BackboneException;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.internationalization.utils.utils.LabelInternationalization;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.part.BlockDefinitionDiagramEditor;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.PartInitException;
+
+/**
+ * An editor to be used in multitabs editor. This editor extends the original UML Diagram.
+ *
+ */
+public class BlockDefinitionDiagramForMultiEditor extends BlockDefinitionDiagramEditor {
+
+ /**
+ * The location of diagram icon in the plug-in
+ */
+ private static final String DIAG_IMG_PATH = "icons/obj16/Diagram_BlockDefinition.gif";
+
+ /**
+ * The image descriptor of the diagram icon
+ */
+ private static final ImageDescriptor DIAG_IMG_DESC = Activator.getBundledImageDescriptor(BlockDefinitionDiagramForMultiEditor.DIAG_IMG_PATH);
+
+ /** The editor splitter. */
+ private Composite splitter;
+
+ private Image titleImage;
+
+ /**
+ * Constructor for SashSystem v2. Context and required objects are retrieved from the
+ * ServiceRegistry.
+ *
+ * @throws BackboneException
+ * @throws ServiceException
+ *
+ */
+ public BlockDefinitionDiagramForMultiEditor(ServicesRegistry servicesRegistry, Diagram diagram) throws BackboneException, ServiceException {
+ super(servicesRegistry, diagram);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void init(IEditorSite site, IEditorInput input) throws PartInitException {
+ super.init(site, input);
+ setPartName(LabelInternationalization.getInstance().getDiagramLabel(getDiagram()));
+ titleImage = DIAG_IMG_DESC.createImage();
+ setTitleImage(titleImage);
+ }
+
+ @Override
+ public void dispose() {
+ if (titleImage != null) {
+ titleImage.dispose();
+ titleImage = null;
+ }
+
+ super.dispose();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void setInput(IEditorInput input) {
+ try {
+ // Provide an URI with fragment in order to reuse the same Resource
+ // and set the diagram to the fragment.
+ URIEditorInput uriInput = new URIEditorInput(EcoreUtil.getURI(getDiagram()));
+ doSetInput(uriInput, true);
+ } catch (CoreException x) {
+ String title = "Problem opening";
+ String msg = "Cannot open input element:";
+ Shell shell = getSite().getShell();
+ ErrorDialog.openError(shell, title, msg, x.getStatus());
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void createGraphicalViewer(Composite parent) {
+ splitter = parent;
+ super.createGraphicalViewer(parent);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void setFocus() {
+ splitter.setFocus();
+ super.setFocus();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getEditingDomainID() {
+ return "org.eclipse.papyrus.sysml.diagram.blockdefinition.EditingDomain";
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/edit/part/BlockDefinitionDiagramEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/edit/part/BlockDefinitionDiagramEditPart.java
new file mode 100755
index 0000000..b86c279
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/edit/part/BlockDefinitionDiagramEditPart.java
@@ -0,0 +1,49 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.edit.part;
+
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.gmf.diagram.common.edit.policy.DefaultContainerNodeEditPolicy;
+import org.eclipse.papyrus.gmf.diagram.common.edit.policy.DefaultXYLayoutEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusDiagramEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.AbstractShowHideRelatedLinkEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.edit.policy.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.edit.policy.DiagramSemanticEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.edit.policy.PackageCreationEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.edit.policy.ShowHideRelatedLinkEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
+/**
+ *
+ * @Generated NOT //change the super class
+ */
+public class BlockDefinitionDiagramEditPart extends PapyrusDiagramEditPart {
+
+ public BlockDefinitionDiagramEditPart(View view) {
+ super(view);
+ }
+
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DiagramSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PackageCreationEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultContainerNodeEditPolicy());
+ installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new DefaultXYLayoutEditPolicy());
+ installEditPolicy(AbstractShowHideRelatedLinkEditPolicy.SHOW_HIDE_RELATED_LINK_ROLE, new ShowHideRelatedLinkEditPolicy(this));
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/edit/policy/BlockDefinitionDiagramDragDropEditPolicy.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/edit/policy/BlockDefinitionDiagramDragDropEditPolicy.java
new file mode 100755
index 0000000..a80b81c
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/edit/policy/BlockDefinitionDiagramDragDropEditPolicy.java
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.edit.policy;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.gmf.diagram.common.provider.IGraphicalTypeRegistry;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.GraphicalTypeRegistry;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy;
+
+/**
+ * Customization of the DND edit policy for the BlockDefinition Diagram
+ *
+ * @deprecated prefer using {@link CustomDiagramDragDropEditPolicy}.
+ */
+@Deprecated
+public class BlockDefinitionDiagramDragDropEditPolicy extends ClassDiagramDragDropEditPolicy {
+
+ /** Local graphical type registry */
+ protected IGraphicalTypeRegistry registry = new GraphicalTypeRegistry();
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getNodeVisualID(View containerView, EObject domainElement) {
+ String domainType = registry.getNodeGraphicalType(domainElement, containerView.getType());
+ if (org.eclipse.papyrus.infra.gmfdiag.common.providers.IGraphicalTypeRegistry.UNDEFINED_TYPE.equals(domainType)) {
+ return null; // undefined
+ }
+ return domainType;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getLinkWithClassVisualID(EObject domainElement) {
+ String domainType = registry.getEdgeGraphicalType(domainElement);
+ if (org.eclipse.papyrus.infra.gmfdiag.common.providers.IGraphicalTypeRegistry.UNDEFINED_TYPE.equals(domainType)) {
+ return null; // undefined
+ }
+ return domainType;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/edit/policy/DiagramSemanticEditPolicy.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/edit/policy/DiagramSemanticEditPolicy.java
new file mode 100755
index 0000000..fba7eaa
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/edit/policy/DiagramSemanticEditPolicy.java
@@ -0,0 +1,90 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.edit.policy;
+
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gef.requests.ReconnectRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DuplicateElementsRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.papyrus.uml.diagram.common.commands.DuplicateNamedElementCommand;
+
+public class DiagramSemanticEditPolicy extends PackageSemanticEditPolicy {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getReorientRelationshipSourceCommand(ReconnectRequest request) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getReorientRelationshipTargetCommand(ReconnectRequest request) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getReorientRefRelationshipSourceCommand(ReconnectRequest request) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getReorientRefRelationshipTargetCommand(ReconnectRequest request) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getDuplicateCommand(DuplicateElementsRequest req) {
+ TransactionalEditingDomain editingDomain = ((IGraphicalEditPart) getHost()).getEditingDomain();
+ Diagram currentDiagram = null;
+ if (getHost() instanceof IGraphicalEditPart) {
+ currentDiagram = ((IGraphicalEditPart) getHost()).getNotationView().getDiagram();
+ }
+ return getGEFWrapper(new DuplicateAnythingCommand(editingDomain, req, currentDiagram));
+ }
+
+ /**
+ * @generated
+ */
+ private static class DuplicateAnythingCommand extends DuplicateNamedElementCommand {
+
+ /**
+ * @generated
+ */
+ private Diagram diagram;
+
+ /**
+ * @generated
+ */
+ public DuplicateAnythingCommand(TransactionalEditingDomain editingDomain, DuplicateElementsRequest req, Diagram currentDiagram) {
+ super(editingDomain, req.getLabel(), req.getElementsToBeDuplicated(), req.getAllDuplicatedElementsMap(), currentDiagram);
+ this.diagram = currentDiagram;
+ }
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/factory/BlockDefinitionDiagramViewFactory.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/factory/BlockDefinitionDiagramViewFactory.java
new file mode 100755
index 0000000..3f7bc5b
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/factory/BlockDefinitionDiagramViewFactory.java
@@ -0,0 +1,25 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.factory;
+
+import org.eclipse.gmf.runtime.diagram.ui.view.factories.DiagramViewFactory;
+import org.eclipse.gmf.runtime.notation.MeasurementUnit;
+
+public class BlockDefinitionDiagramViewFactory extends DiagramViewFactory {
+
+ @Override
+ protected MeasurementUnit getMeasurementUnit() {
+ return MeasurementUnit.PIXEL_LITERAL;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/factory/DiagramPaletteFactory.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/factory/DiagramPaletteFactory.java
new file mode 100755
index 0000000..113061e
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/factory/DiagramPaletteFactory.java
@@ -0,0 +1,116 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.factory;
+
+import java.util.Arrays;
+import java.util.HashMap;
+
+import org.eclipse.gef.Tool;
+import org.eclipse.gmf.runtime.diagram.ui.services.palette.PaletteFactory;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.infra.gmfdiag.common.service.palette.AspectUnspecifiedTypeConnectionTool;
+import org.eclipse.papyrus.infra.gmfdiag.common.service.palette.AspectUnspecifiedTypeCreationTool;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+
+@SuppressWarnings("serial")
+public class DiagramPaletteFactory extends PaletteFactory.Adapter {
+
+ private static HashMap<String, IElementType[]> nodesToolIdTypesMap = new HashMap<String, IElementType[]>() {
+
+ {
+ put("blockdefinition.tool.actor", new IElementType[] { UMLElementTypes.ACTOR });
+ put("blockdefinition.tool.block", new IElementType[] { SysMLElementTypes.BLOCK });
+ put("blockdefinition.tool.constraint", new IElementType[] { UMLElementTypes.CONSTRAINT });
+ put("blockdefinition.tool.constraintblock", new IElementType[] { SysMLElementTypes.CONSTRAINT_BLOCK });
+ put("blockdefinition.tool.constraintproperty", new IElementType[] { SysMLElementTypes.CONSTRAINT_PROPERTY });
+ put("blockdefinition.tool.datatype", new IElementType[] { UMLElementTypes.DATA_TYPE });
+ put("blockdefinition.tool.dimension", new IElementType[] { SysMLElementTypes.DIMENSION });
+ put("blockdefinition.tool.enumeration", new IElementType[] { UMLElementTypes.ENUMERATION });
+ put("blockdefinition.tool.enumerationliteral", new IElementType[] { UMLElementTypes.ENUMERATION_LITERAL });
+ put("blockdefinition.tool.flowport", new IElementType[] { SysMLElementTypes.FLOW_PORT });
+ put("blockdefinition.tool.flowproperty", new IElementType[] { SysMLElementTypes.FLOW_PROPERTY });
+ put("blockdefinition.tool.flowspecification", new IElementType[] { SysMLElementTypes.FLOW_SPECIFICATION });
+ put("blockdefinition.tool.interface", new IElementType[] { UMLElementTypes.INTERFACE });
+ put("blockdefinition.tool.operation", new IElementType[] { UMLElementTypes.OPERATION });
+ put("blockdefinition.tool.part", new IElementType[] { SysMLElementTypes.PART_PROPERTY });
+ put("blockdefinition.tool.port", new IElementType[] { UMLElementTypes.PORT });
+ put("blockdefinition.tool.primitivetype", new IElementType[] { UMLElementTypes.PRIMITIVE_TYPE });
+ put("blockdefinition.tool.property", new IElementType[] { UMLElementTypes.PROPERTY });
+ put("blockdefinition.tool.reception", new IElementType[] { UMLElementTypes.RECEPTION });
+ put("blockdefinition.tool.reference", new IElementType[] { SysMLElementTypes.REFERENCE_PROPERTY });
+ put("blockdefinition.tool.signal", new IElementType[] { UMLElementTypes.SIGNAL });
+ put("blockdefinition.tool.unit", new IElementType[] { SysMLElementTypes.UNIT });
+ put("blockdefinition.tool.value", new IElementType[] { SysMLElementTypes.VALUE_PROPERTY });
+ put("blockdefinition.tool.valuetype", new IElementType[] { SysMLElementTypes.VALUE_TYPE });
+ // Start of user code Custom nodes
+
+ // Constraint button replacement
+ remove("blockdefinition.tool.constraint");
+ put("blockdefinition.tool.constraint", new IElementType[] { UMLElementTypes.CONSTRAINT });
+
+ put("blockdefinition.tool.model", new IElementType[] { UMLElementTypes.MODEL });
+ put("blockdefinition.tool.package", new IElementType[] { UMLElementTypes.PACKAGE });
+ put("blockdefinition.tool.instancespecification", new IElementType[] { UMLElementTypes.INSTANCE_SPECIFICATION });
+ put("blockdefinition.tool.slot", new IElementType[] { UMLElementTypes.SLOT });
+ put("blockdefinition.tool.comment", new IElementType[] { UMLElementTypes.COMMENT });
+
+ put("blockdefinition.tool.actorpart", new IElementType[] { SysMLElementTypes.ACTOR_PART_PROPERTY });
+
+ // End of user code
+ }
+ };
+
+ private static HashMap<String, IElementType[]> edgesToolIdTypesMap = new HashMap<String, IElementType[]>() {
+
+ {
+ put("blockdefinition.tool.association", new IElementType[] { SysMLElementTypes.ASSOCIATION });
+ put("blockdefinition.tool.dependency", new IElementType[] { UMLElementTypes.DEPENDENCY });
+ put("blockdefinition.tool.generalization", new IElementType[] { UMLElementTypes.GENERALIZATION });
+ put("blockdefinition.tool.interfacerealization", new IElementType[] { UMLElementTypes.INTERFACE_REALIZATION });
+ put("blockdefinition.tool.usage", new IElementType[] { UMLElementTypes.USAGE });
+ // Start of user code Custom edges
+ put("blockdefinition.tool.association_none", new IElementType[] { SysMLElementTypes.ASSOCIATION_NONE });
+ put("blockdefinition.tool.association_none_directed", new IElementType[] { SysMLElementTypes.ASSOCIATION_NONE_DIRECTED });
+ put("blockdefinition.tool.association_composite", new IElementType[] { SysMLElementTypes.ASSOCIATION_COMPOSITE });
+ put("blockdefinition.tool.association_composite_directed", new IElementType[] { SysMLElementTypes.ASSOCIATION_COMPOSITE_DIRECTED });
+ put("blockdefinition.tool.association_shared", new IElementType[] { SysMLElementTypes.ASSOCIATION_SHARED });
+ put("blockdefinition.tool.association_shared_directed", new IElementType[] { SysMLElementTypes.ASSOCIATION_SHARED_DIRECTED });
+
+ put("blockdefinition.tool.comment_constraint_link", new IElementType[] { ElementTypes.COMMENT_ANNOTATED_ELEMENT, ElementTypes.CONSTRAINT_CONSTRAINED_ELEMENT });
+
+ put("blockdefinition.tool.instance_specification_link", new IElementType[] { ElementTypes.INSTANCE_SPECIFICATION_LINK });
+
+ // End of user code
+ }
+ };
+
+ @Override
+ public Tool createTool(String toolId) {
+
+ IElementType[] types;
+
+ types = nodesToolIdTypesMap.get(toolId);
+ if (types != null) {
+ return new AspectUnspecifiedTypeCreationTool(Arrays.asList(types));
+ }
+
+ types = edgesToolIdTypesMap.get(toolId);
+ if (types != null) {
+ return new AspectUnspecifiedTypeConnectionTool(Arrays.asList(types));
+ }
+ return null;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/part/BlockDefinitionDiagramEditor.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/part/BlockDefinitionDiagramEditor.java
new file mode 100755
index 0000000..1df0636
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/part/BlockDefinitionDiagramEditor.java
@@ -0,0 +1,539 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.part;
+
+import java.util.EventObject;
+import java.util.Set;
+
+import org.eclipse.core.commands.operations.IUndoContext;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.GraphicalViewer;
+import org.eclipse.gef.KeyHandler;
+import org.eclipse.gef.Tool;
+import org.eclipse.gef.commands.CommandStackListener;
+import org.eclipse.gef.palette.PaletteRoot;
+import org.eclipse.gef.ui.palette.PaletteViewer;
+import org.eclipse.gef.ui.palette.PaletteViewerProvider;
+import org.eclipse.gmf.runtime.common.core.service.IProviderChangeListener;
+import org.eclipse.gmf.runtime.common.core.service.ProviderChangeEvent;
+import org.eclipse.gmf.runtime.common.ui.services.marker.MarkerNavigationService;
+import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
+import org.eclipse.gmf.runtime.diagram.ui.actions.ActionIds;
+import org.eclipse.gmf.runtime.diagram.ui.internal.parts.PaletteToolTransferDragSourceListener;
+import org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider;
+import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDocumentProvider;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.jface.util.LocalSelectionTransfer;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.papyrus.commands.util.OperationHistoryDirtyState;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.gmfdiag.common.GmfMultiDiagramDocumentProvider;
+import org.eclipse.papyrus.infra.gmfdiag.common.service.palette.PapyrusPaletteContextMenuProvider;
+import org.eclipse.papyrus.infra.gmfdiag.common.service.palette.PapyrusPaletteService;
+import org.eclipse.papyrus.infra.gmfdiag.common.service.palette.PapyrusPaletteViewer;
+import org.eclipse.papyrus.infra.ui.editor.IMultiDiagramEditor;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.Activator;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.utils.FixPortsLocationOnOpening;
+import org.eclipse.papyrus.uml.diagram.common.listeners.DropTargetListener;
+import org.eclipse.papyrus.uml.diagram.common.part.UmlGmfDiagramEditor;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.dnd.TransferData;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.MouseListener;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.ide.IGotoMarker;
+import org.eclipse.ui.part.ShowInContext;
+
+/**
+ * @generated
+ */
+public class BlockDefinitionDiagramEditor extends UmlGmfDiagramEditor implements IProviderChangeListener, IGotoMarker {
+
+ /**
+ * @generated
+ */
+ public static final String ID = "org.eclipse.papyrus.sysml.diagram.blockdefinition.part.BlockDefinitionDiagramEditorID"; //$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ private KeyHandler paletteKeyHandler = null;
+
+ /**
+ * @generated
+ */
+ private MouseListener paletteMouseListener = null;
+
+ /**
+ * @generated
+ */
+ private OperationHistoryDirtyState dirtyState;
+
+ /**
+ * @generated
+ */
+ private TransactionalEditingDomain editingDomain;
+
+ /**
+ * @generated
+ */
+ private IDocumentProvider documentProvider;
+
+ /**
+ * @generated
+ */
+ public BlockDefinitionDiagramEditor(ServicesRegistry servicesRegistry, Diagram diagram) throws ServiceException {
+ super(servicesRegistry, diagram);
+
+ // Fix Port locations (implementations before 0.8.1 were erroneous see https://bugs.eclipse.org/bugs/show_bug.cgi?id=354815)
+ (new FixPortsLocationOnOpening()).fix(diagram);
+
+ // adds a listener to the palette service, which reacts to palette customizations
+ PapyrusPaletteService.getInstance().addProviderChangeListener(this);
+
+ // Share the same editing provider
+ editingDomain = servicesRegistry.getService(TransactionalEditingDomain.class);
+ documentProvider = new GmfMultiDiagramDocumentProvider(editingDomain);
+
+ // overrides editing domain created by super constructor
+ setDocumentProvider(documentProvider);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected PaletteRoot createPaletteRoot(PaletteRoot existingPaletteRoot) {
+ PaletteRoot paletteRoot;
+ if (existingPaletteRoot == null) {
+ paletteRoot = PapyrusPaletteService.getInstance().createPalette(this, getDefaultPaletteContent());
+ } else {
+ PapyrusPaletteService.getInstance().updatePalette(existingPaletteRoot, this, getDefaultPaletteContent());
+ paletteRoot = existingPaletteRoot;
+ }
+ applyCustomizationsToPalette(paletteRoot);
+ return paletteRoot;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected PreferencesHint getPreferencesHint() {
+ return Activator.DIAGRAM_PREFERENCES_HINT;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public String getContributorId() {
+ return Activator.PLUGIN_ID;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected final IDocumentProvider getDocumentProvider(IEditorInput input) {
+ return documentProvider;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public TransactionalEditingDomain getEditingDomain() {
+ return editingDomain;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected final void setDocumentProvider(IEditorInput input) {
+ // Already set in the constructor
+ }
+
+ /**
+ * @generated
+ */
+ public void gotoMarker(IMarker marker) {
+ MarkerNavigationService.getInstance().gotoMarker(this, marker);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean isSaveAsAllowed() {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void doSaveAs() {
+ performSaveAs(new NullProgressMonitor());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void performSaveAs(IProgressMonitor progressMonitor) {
+ // Nothing
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ShowInContext getShowInContext() {
+ return new ShowInContext(getEditorInput(), getGraphicalViewer().getSelection());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void configureGraphicalViewer() {
+ super.configureGraphicalViewer();
+
+ // Replace diagram contextual menu removing default
+ // delete from model action.
+ DiagramContextMenuProvider provider = (DiagramContextMenuProvider) getDiagramGraphicalViewer().getContextMenu();
+ Set<String> menuExclusions = provider.getExclusionSet();
+ menuExclusions.add(ActionIds.ACTION_DELETE_FROM_MODEL);
+ provider.setExclusionSet(menuExclusions);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected TransactionalEditingDomain createEditingDomain() {
+ // Already configured
+ return editingDomain;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void configureDiagramEditDomain() {
+ super.configureDiagramEditDomain();
+ getDiagramEditDomain().getDiagramCommandStack().addCommandStackListener(new CommandStackListener() {
+
+ public void commandStackChanged(EventObject event) {
+ firePropertyChange(IEditorPart.PROP_DIRTY);
+ }
+ });
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void doSave(IProgressMonitor progressMonitor) {
+ // The saving of the resource is done by the CoreMultiDiagramEditor
+ getDirtyState().saved();
+ }
+
+ /**
+ * @generated
+ */
+ protected OperationHistoryDirtyState getDirtyState() {
+ if (dirtyState == null) {
+ dirtyState = OperationHistoryDirtyState.newInstance(getUndoContext(), getOperationHistory());
+ }
+ return dirtyState;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setUndoContext(IUndoContext context) {
+ if (dirtyState != null) {
+ dirtyState.dispose();
+ dirtyState = null;
+ }
+
+ super.setUndoContext(context);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean isDirty() {
+ return getDirtyState().isDirty();
+ }
+
+ /**
+ * @generated
+ */
+ public void providerChanged(ProviderChangeEvent event) {
+ // update the palette if the palette service has changed
+ if (PapyrusPaletteService.getInstance().equals(event.getSource())) {
+ PapyrusPaletteService.getInstance().updatePalette(getPaletteViewer().getPaletteRoot(), this, getDefaultPaletteContent());
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void dispose() {
+ // remove palette service listener
+ // remove preference listener
+ PapyrusPaletteService.getInstance().removeProviderChangeListener(this);
+
+ if (dirtyState != null) {
+ dirtyState.dispose();
+ dirtyState = null;
+ }
+
+ super.dispose();
+ }
+
+ /**
+ * @generated
+ */
+ protected PaletteViewer getPaletteViewer() {
+ return getEditDomain().getPaletteViewer();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected PaletteViewer constructPaletteViewer() {
+ return new PapyrusPaletteViewer();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected PaletteViewerProvider createPaletteViewerProvider() {
+ getEditDomain().setPaletteRoot(createPaletteRoot(null));
+ return new PaletteViewerProvider(getEditDomain()) {
+
+ /**
+ * Override to provide the additional behavior for the tools. Will intialize with a
+ * PaletteEditPartFactory that has a TrackDragger that understand how to handle the
+ * mouseDoubleClick event for shape creation tools. Also will initialize the palette
+ * with a defaultTool that is the SelectToolEx that undestands how to handle the enter
+ * key which will result in the creation of the shape also.
+ */
+ @Override
+ protected void configurePaletteViewer(PaletteViewer viewer) {
+ super.configurePaletteViewer(viewer);
+
+ // customize menu...
+ viewer.setContextMenu(new PapyrusPaletteContextMenuProvider(viewer));
+
+ viewer.getKeyHandler().setParent(getPaletteKeyHandler());
+ viewer.getControl().addMouseListener(getPaletteMouseListener());
+
+ // Add a transfer drag target listener that is supported on
+ // palette template entries whose template is a creation tool.
+ // This will enable drag and drop of the palette shape creation
+ // tools.
+ viewer.addDragSourceListener(new PaletteToolTransferDragSourceListener(viewer));
+ viewer.setCustomizer(createPaletteCustomizer());
+ }
+
+ @Override
+ public PaletteViewer createPaletteViewer(Composite parent) {
+ PaletteViewer pViewer = constructPaletteViewer();
+ pViewer.createControl(parent);
+ configurePaletteViewer(pViewer);
+ hookPaletteViewer(pViewer);
+ return pViewer;
+ }
+
+ /**
+ * @return Palette Key Handler for the palette
+ */
+ private KeyHandler getPaletteKeyHandler() {
+
+ if (paletteKeyHandler == null) {
+
+ paletteKeyHandler = new KeyHandler() {
+
+ /**
+ * Processes a <i>key released </i> event. This method is called by the Tool
+ * whenever a key is released, and the Tool is in the proper state. Override
+ * to support pressing the enter key to create a shape or connection
+ * (between two selected shapes)
+ *
+ * @param event
+ * the KeyEvent
+ * @return <code>true</code> if KeyEvent was handled in some way
+ */
+ @Override
+ public boolean keyReleased(KeyEvent event) {
+
+ if (event.keyCode == SWT.Selection) {
+
+ Tool tool = getPaletteViewer().getActiveTool().createTool();
+
+ if (toolSupportsAccessibility(tool)) {
+
+ tool.keyUp(event, getDiagramGraphicalViewer());
+
+ // deactivate current selection
+ getPaletteViewer().setActiveTool(null);
+
+ return true;
+ }
+
+ }
+ return super.keyReleased(event);
+ }
+
+ };
+
+ }
+ return paletteKeyHandler;
+ }
+
+ /**
+ * @return Palette Mouse listener for the palette
+ */
+ private MouseListener getPaletteMouseListener() {
+
+ if (paletteMouseListener == null) {
+
+ paletteMouseListener = new MouseListener() {
+
+ /**
+ * Flag to indicate that the current active tool should be cleared after a
+ * mouse double-click event.
+ */
+ private boolean clearActiveTool = false;
+
+ /**
+ * Override to support double-clicking a palette tool entry to create a
+ * shape or connection (between two selected shapes).
+ *
+ * @see MouseListener#mouseDoubleClick(MouseEvent)
+ */
+ public void mouseDoubleClick(MouseEvent e) {
+ Tool tool = getPaletteViewer().getActiveTool().createTool();
+
+ if (toolSupportsAccessibility(tool)) {
+
+ tool.setViewer(getDiagramGraphicalViewer());
+ tool.setEditDomain(getDiagramGraphicalViewer().getEditDomain());
+ tool.mouseDoubleClick(e, getDiagramGraphicalViewer());
+
+ // Current active tool should be deactivated,
+ // but if it is down here it will get
+ // reactivated deep in GEF palette code after
+ // receiving mouse up events.
+ clearActiveTool = true;
+ }
+ }
+
+ public void mouseDown(MouseEvent e) {
+ // do nothing
+ }
+
+ public void mouseUp(MouseEvent e) {
+ // Deactivate current active tool here if a
+ // double-click was handled.
+ if (clearActiveTool) {
+ getPaletteViewer().setActiveTool(null);
+ clearActiveTool = false;
+ }
+
+ }
+ };
+
+ }
+ return paletteMouseListener;
+ }
+
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public GraphicalViewer getGraphicalViewer() {
+ return super.getGraphicalViewer();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void initializeGraphicalViewer() {
+ super.initializeGraphicalViewer();
+
+ // Enable Drop
+ getDiagramGraphicalViewer().addDropTargetListener(new DropTargetListener(getDiagramGraphicalViewer(), LocalSelectionTransfer.getTransfer()) {
+
+ @Override
+ protected Object getJavaObject(TransferData data) {
+ return LocalSelectionTransfer.getTransfer().nativeToJava(data);
+ }
+
+ @Override
+ protected TransactionalEditingDomain getTransactionalEditingDomain() {
+ return getEditingDomain();
+ }
+ });
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void selectionChanged(IWorkbenchPart part, ISelection selection) {
+ if (getSite().getPage().getActiveEditor() instanceof IMultiDiagramEditor) {
+ IMultiDiagramEditor editor = (IMultiDiagramEditor) getSite().getPage().getActiveEditor();
+ // If not the active editor, ignore selection changed.
+ if (this.equals(editor.getActiveEditor())) {
+ updateActions(getSelectionActions());
+ super.selectionChanged(part, selection);
+ } else {
+ super.selectionChanged(part, selection);
+ }
+ } else {
+ super.selectionChanged(part, selection);
+ }
+ // from
+ // org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.DiagramDocumentEditor.selectionChanged(IWorkbenchPart,
+ // ISelection)
+ if (part == this) {
+ rebuildStatusLine();
+ }
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/ActorPreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/ActorPreferencePage.java
new file mode 100755
index 0000000..631a310
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/ActorPreferencePage.java
@@ -0,0 +1,100 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences;
+
+import java.util.Collections;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+
+public class ActorPreferencePage extends BlockDefinitionDiagramNodePreferencePage {
+
+ /** Constant key to access preferences */
+ public static String prefKey = ElementTypes.DIAGRAM_ID + "_" + UMLGraphicalTypes.SHAPE_UML_ACTOR_AS_CLASSIFIER_ID; //$NON-NLS-1$
+
+ /** The compartments default visibility for preferences */
+ public static final Map<String, Boolean> compartmentDefaultVisibilityMap;
+
+ /** The compartment titles default visibility for preferences */
+ public static final Map<String, Boolean> compartmentTitleDefaultVisibilityMap;
+
+ /** Static attribute initialization */
+ static {
+ compartmentDefaultVisibilityMap = new LinkedHashMap<String, Boolean>();
+ compartmentDefaultVisibilityMap.put("properties", Boolean.FALSE); //$NON-NLS-1$
+ compartmentDefaultVisibilityMap.put("operations", Boolean.FALSE); //$NON-NLS-1$
+
+ compartmentTitleDefaultVisibilityMap = new LinkedHashMap<String, Boolean>();
+ compartmentTitleDefaultVisibilityMap.put("properties", Boolean.TRUE); //$NON-NLS-1$
+ compartmentTitleDefaultVisibilityMap.put("operations", Boolean.TRUE); //$NON-NLS-1$
+
+
+ // Start of user code custom static initializations
+ // End of user code
+
+ Collections.unmodifiableMap(compartmentDefaultVisibilityMap);
+ Collections.unmodifiableMap(compartmentTitleDefaultVisibilityMap);
+ }
+
+ /** Constructor */
+ public ActorPreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_" + UMLGraphicalTypes.SHAPE_UML_ACTOR_AS_CLASSIFIER_ID); //$NON-NLS-1$
+ }
+
+ /** Default preferences initializer */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.WIDTH), 100);
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.HEIGHT), 60);
+ // End of user code
+
+ // Initialize default visibility for compartments in preference page.
+ for (String compartmentName : compartmentDefaultVisibilityMap.keySet()) {
+ String showCompartmentKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_VISIBILITY);
+ store.setDefault(showCompartmentKey, compartmentDefaultVisibilityMap.get(compartmentName));
+ }
+
+ // Initialize default title visibility for compartments in preference page.
+ for (String compartmentName : compartmentTitleDefaultVisibilityMap.keySet()) {
+ String showCompartmentTitleKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_NAME_VISIBILITY);
+ store.setDefault(showCompartmentTitleKey, compartmentTitleDefaultVisibilityMap.get(compartmentName));
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void initializeCompartmentNamesList() {
+ for (String name : compartmentDefaultVisibilityMap.keySet()) {
+ this.compartmentNamesList.add(name);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void initializeCompartmentTitlesList() {
+ for (String name : compartmentTitleDefaultVisibilityMap.keySet()) {
+ this.compartmentTitlesList.add(name);
+ }
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/AssociationPreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/AssociationPreferencePage.java
new file mode 100755
index 0000000..0aae340
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/AssociationPreferencePage.java
@@ -0,0 +1,36 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+
+public class AssociationPreferencePage extends BlockDefinitionDiagramLinkPreferencePage {
+
+ /** Constant key to access preferences */
+ public static String prefKey = ElementTypes.DIAGRAM_ID + "_" + SysMLGraphicalTypes.LINK_SYSML_ASSOCIATION_ID; //$NON-NLS-1$
+
+ /** Constructor */
+ public AssociationPreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_" + SysMLGraphicalTypes.LINK_SYSML_ASSOCIATION_ID); //$NON-NLS-1$
+ }
+
+ /** Default preferences initializer */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ // End of user code
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/BlockDefinitionDiagramGeneralPreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/BlockDefinitionDiagramGeneralPreferencePage.java
new file mode 100755
index 0000000..7d35d3a
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/BlockDefinitionDiagramGeneralPreferencePage.java
@@ -0,0 +1,26 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences;
+
+import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.DiagramPreferencePage;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.Activator;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+
+public class BlockDefinitionDiagramGeneralPreferencePage extends DiagramPreferencePage {
+
+ public BlockDefinitionDiagramGeneralPreferencePage() {
+ setPreferenceStore(Activator.getInstance().getPreferenceStore());
+ setPreferenceKey(ElementTypes.DIAGRAM_ID);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/BlockDefinitionDiagramLinkPreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/BlockDefinitionDiagramLinkPreferencePage.java
new file mode 100755
index 0000000..f27b0b8
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/BlockDefinitionDiagramLinkPreferencePage.java
@@ -0,0 +1,73 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.TreeMap;
+
+import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusLinkPreferencePage;
+import org.eclipse.papyrus.infra.gmfdiag.preferences.ui.OrderedLabelGroup;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.Activator;
+import org.eclipse.swt.widgets.Composite;
+
+public class BlockDefinitionDiagramLinkPreferencePage extends AbstractPapyrusLinkPreferencePage {
+
+ /** The list of label names for this link */
+ protected List<String> labelsList;
+
+ /** Constructor */
+ public BlockDefinitionDiagramLinkPreferencePage() {
+ labelsList = new ArrayList<String>();
+ initializeLabelsList();
+ Collections.unmodifiableList(labelsList);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void createPageContents(Composite parent) {
+ super.createPageContents(parent);
+
+ // Add label visibility group
+ if (!labelsList.isEmpty()) {
+ OrderedLabelGroup compartmentGroup = new OrderedLabelGroup(parent, getPreferenceKey(), this, labelsList);
+ addPreferenceGroup(compartmentGroup);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getBundleId() {
+ return Activator.PLUGIN_ID;
+ }
+
+ /** Initialize the list containing names of labels. */
+ protected void initializeLabelsList() {
+ // Implemented by subclasses.
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected final TreeMap<String, String> getLabelRole() {
+ return new TreeMap<String, String>();
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/BlockDefinitionDiagramNodePreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/BlockDefinitionDiagramNodePreferencePage.java
new file mode 100755
index 0000000..c57ff0f
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/BlockDefinitionDiagramNodePreferencePage.java
@@ -0,0 +1,119 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.TreeMap;
+
+import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusNodePreferencePage;
+import org.eclipse.papyrus.infra.gmfdiag.preferences.ui.OrderedCompartmentGroup;
+import org.eclipse.papyrus.infra.gmfdiag.preferences.ui.OrderedLabelGroup;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.Activator;
+import org.eclipse.swt.widgets.Composite;
+
+public class BlockDefinitionDiagramNodePreferencePage extends AbstractPapyrusNodePreferencePage {
+
+ /** The list owning the names of compartments */
+ protected List<String> compartmentNamesList;
+
+ /** The list owning the names of compartment that have a title */
+ protected List<String> compartmentTitlesList;
+
+ /** The list of label names for this node */
+ protected List<String> labelsList;
+
+ /** Constructor */
+ public BlockDefinitionDiagramNodePreferencePage() {
+ this.labelsList = new ArrayList<String>();
+ this.compartmentNamesList = new ArrayList<String>();
+ this.compartmentTitlesList = new ArrayList<String>();
+
+ initializeLabelsList();
+ initializeCompartmentNamesList();
+ initializeCompartmentTitlesList();
+
+ Collections.unmodifiableList(labelsList);
+ Collections.unmodifiableList(compartmentNamesList);
+ Collections.unmodifiableList(compartmentTitlesList);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void createPageContents(Composite parent) {
+ super.createPageContents(parent);
+
+ // Add compartments visibility group
+ if (!compartmentNamesList.isEmpty()) {
+ OrderedCompartmentGroup compartmentGroup = new OrderedCompartmentGroup(parent, getPreferenceKey(), this, compartmentNamesList, compartmentTitlesList, getPreferenceStore());
+ addPreferenceGroup(compartmentGroup);
+ }
+
+ // Add label visibility group
+ if (!labelsList.isEmpty()) {
+ OrderedLabelGroup compartmentGroup = new OrderedLabelGroup(parent, getPreferenceKey(), this, labelsList);
+ addPreferenceGroup(compartmentGroup);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getBundleId() {
+ return Activator.PLUGIN_ID;
+ }
+
+ /** Initialize the list containing names of labels. */
+ protected void initializeLabelsList() {
+ // Implemented by subclasses.
+ }
+
+ /** Initialize the list containing the names of compartments. */
+ protected void initializeCompartmentNamesList() {
+ // Implemented by subclasses.
+ }
+
+ /** Initialize the list containing the names of compartment that have titles. */
+ protected void initializeCompartmentTitlesList() {
+ // Implemented by subclasses.
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected final TreeMap<String, String> getLabelRole() {
+ return new TreeMap<String, String>();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected final TreeMap<String, Boolean> getCompartmentTitleVisibilityPreferences() {
+ return new TreeMap<String, Boolean>();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected final void initializeCompartmentsList() {
+ compartmentsList = Collections.emptyList();
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/BlockDefinitionDiagramPreferenceInitializer.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/BlockDefinitionDiagramPreferenceInitializer.java
new file mode 100755
index 0000000..d1bb296
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/BlockDefinitionDiagramPreferenceInitializer.java
@@ -0,0 +1,67 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences;
+
+import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.Activator;
+
+public class BlockDefinitionDiagramPreferenceInitializer extends AbstractPreferenceInitializer {
+
+ protected IPreferenceStore getPreferenceStore() {
+ return Activator.getInstance().getPreferenceStore();
+ }
+
+ @Override
+ public void initializeDefaultPreferences() {
+ IPreferenceStore store = getPreferenceStore();
+
+ org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.ModelPreferencePage.initDefaults(store);
+ org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.PackagePreferencePage.initDefaults(store);
+ org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.InstanceSpecificationPreferencePage.initDefaults(store);
+ org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.ConstraintPreferencePage.initDefaults(store);
+ org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences.CommentPreferencePage.initDefaults(store);
+ ActorPreferencePage.initDefaults(store);
+ BlockPreferencePage.initDefaults(store);
+ ConstraintPreferencePage.initDefaults(store);
+ ConstraintBlockPreferencePage.initDefaults(store);
+ ConstraintPropertyPreferencePage.initDefaults(store);
+ DataTypePreferencePage.initDefaults(store);
+ DimensionPreferencePage.initDefaults(store);
+ EnumerationPreferencePage.initDefaults(store);
+ EnumerationLiteralPreferencePage.initDefaults(store);
+ FlowPortPreferencePage.initDefaults(store);
+ FlowPropertyPreferencePage.initDefaults(store);
+ FlowSpecificationPreferencePage.initDefaults(store);
+ InterfacePreferencePage.initDefaults(store);
+ OperationPreferencePage.initDefaults(store);
+ PartPreferencePage.initDefaults(store);
+ PortPreferencePage.initDefaults(store);
+ PrimitiveTypePreferencePage.initDefaults(store);
+ PropertyPreferencePage.initDefaults(store);
+ ReceptionPreferencePage.initDefaults(store);
+ ReferencePreferencePage.initDefaults(store);
+ SignalPreferencePage.initDefaults(store);
+ UnitPreferencePage.initDefaults(store);
+ ValuePreferencePage.initDefaults(store);
+ ValueTypePreferencePage.initDefaults(store);
+ AssociationPreferencePage.initDefaults(store);
+ DependencyPreferencePage.initDefaults(store);
+ GeneralizationPreferencePage.initDefaults(store);
+ InterfaceRealizationPreferencePage.initDefaults(store);
+ UsagePreferencePage.initDefaults(store);
+
+ // DependencyPreferencePage.initDefaults(store);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/BlockPreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/BlockPreferencePage.java
new file mode 100755
index 0000000..fe47fb4
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/BlockPreferencePage.java
@@ -0,0 +1,112 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences;
+
+import java.util.Collections;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+
+public class BlockPreferencePage extends BlockDefinitionDiagramNodePreferencePage {
+
+ /** Constant key to access preferences */
+ public static String prefKey = ElementTypes.DIAGRAM_ID + "_" + SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_CLASSIFIER_ID; //$NON-NLS-1$
+
+ /** The compartments default visibility for preferences */
+ public static final Map<String, Boolean> compartmentDefaultVisibilityMap;
+
+ /** The compartment titles default visibility for preferences */
+ public static final Map<String, Boolean> compartmentTitleDefaultVisibilityMap;
+
+ /** Static attribute initialization */
+ static {
+ compartmentDefaultVisibilityMap = new LinkedHashMap<String, Boolean>();
+ compartmentDefaultVisibilityMap.put("properties", Boolean.TRUE); //$NON-NLS-1$
+ compartmentDefaultVisibilityMap.put("parts", Boolean.FALSE); //$NON-NLS-1$
+ compartmentDefaultVisibilityMap.put("references", Boolean.FALSE); //$NON-NLS-1$
+ compartmentDefaultVisibilityMap.put("standard ports", Boolean.FALSE); //$NON-NLS-1$
+ compartmentDefaultVisibilityMap.put("flow ports", Boolean.FALSE); //$NON-NLS-1$
+ compartmentDefaultVisibilityMap.put("operations", Boolean.TRUE); //$NON-NLS-1$
+ compartmentDefaultVisibilityMap.put("constraints", Boolean.TRUE); //$NON-NLS-1$
+ compartmentDefaultVisibilityMap.put("values", Boolean.FALSE); //$NON-NLS-1$
+
+ compartmentTitleDefaultVisibilityMap = new LinkedHashMap<String, Boolean>();
+ compartmentTitleDefaultVisibilityMap.put("properties", Boolean.TRUE); //$NON-NLS-1$
+ compartmentTitleDefaultVisibilityMap.put("parts", Boolean.TRUE); //$NON-NLS-1$
+ compartmentTitleDefaultVisibilityMap.put("references", Boolean.TRUE); //$NON-NLS-1$
+ compartmentTitleDefaultVisibilityMap.put("standard ports", Boolean.TRUE); //$NON-NLS-1$
+ compartmentTitleDefaultVisibilityMap.put("flow ports", Boolean.TRUE); //$NON-NLS-1$
+ compartmentTitleDefaultVisibilityMap.put("operations", Boolean.TRUE); //$NON-NLS-1$
+ compartmentTitleDefaultVisibilityMap.put("constraints", Boolean.TRUE); //$NON-NLS-1$
+ compartmentTitleDefaultVisibilityMap.put("values", Boolean.TRUE); //$NON-NLS-1$
+
+
+ // Start of user code custom static initializations
+ // End of user code
+
+ Collections.unmodifiableMap(compartmentDefaultVisibilityMap);
+ Collections.unmodifiableMap(compartmentTitleDefaultVisibilityMap);
+ }
+
+ /** Constructor */
+ public BlockPreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_" + SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_CLASSIFIER_ID); //$NON-NLS-1$
+ }
+
+ /** Default preferences initializer */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.WIDTH), 100);
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.HEIGHT), 150);
+ // End of user code
+
+ // Initialize default visibility for compartments in preference page.
+ for (String compartmentName : compartmentDefaultVisibilityMap.keySet()) {
+ String showCompartmentKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_VISIBILITY);
+ store.setDefault(showCompartmentKey, compartmentDefaultVisibilityMap.get(compartmentName));
+ }
+
+ // Initialize default title visibility for compartments in preference page.
+ for (String compartmentName : compartmentTitleDefaultVisibilityMap.keySet()) {
+ String showCompartmentTitleKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_NAME_VISIBILITY);
+ store.setDefault(showCompartmentTitleKey, compartmentTitleDefaultVisibilityMap.get(compartmentName));
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void initializeCompartmentNamesList() {
+ for (String name : compartmentDefaultVisibilityMap.keySet()) {
+ this.compartmentNamesList.add(name);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void initializeCompartmentTitlesList() {
+ for (String name : compartmentTitleDefaultVisibilityMap.keySet()) {
+ this.compartmentTitlesList.add(name);
+ }
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/CommentPreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/CommentPreferencePage.java
new file mode 100755
index 0000000..4b30952
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/CommentPreferencePage.java
@@ -0,0 +1,44 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+
+public class CommentPreferencePage extends BlockDefinitionDiagramNodePreferencePage {
+
+ /** Constant key to access preferences */
+ protected static String prefKey = ElementTypes.DIAGRAM_ID + "_Comment"; //$NON-NLS-1$
+
+
+ /** Default constructor */
+ public CommentPreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_Comment"); //$NON-NLS-1$
+ }
+
+ /**
+ * Initialize defaults using a specified {@link IPreferenceStore}
+ *
+ * @param store
+ * the preference store.
+ */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ // End of user code
+
+ }
+
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/ConstraintBlockPreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/ConstraintBlockPreferencePage.java
new file mode 100755
index 0000000..7842d60
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/ConstraintBlockPreferencePage.java
@@ -0,0 +1,98 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences;
+
+import java.util.Collections;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+
+public class ConstraintBlockPreferencePage extends BlockDefinitionDiagramNodePreferencePage {
+
+ /** Constant key to access preferences */
+ public static String prefKey = ElementTypes.DIAGRAM_ID + "_" + SysMLGraphicalTypes.SHAPE_SYSML_CONSTRAINTBLOCK_AS_CLASSIFIER_ID; //$NON-NLS-1$
+
+ /** The compartments default visibility for preferences */
+ public static final Map<String, Boolean> compartmentDefaultVisibilityMap;
+
+ /** The compartment titles default visibility for preferences */
+ public static final Map<String, Boolean> compartmentTitleDefaultVisibilityMap;
+
+ /** Static attribute initialization */
+ static {
+ compartmentDefaultVisibilityMap = new LinkedHashMap<String, Boolean>();
+ compartmentDefaultVisibilityMap.put("parameters", Boolean.TRUE); //$NON-NLS-1$
+ compartmentDefaultVisibilityMap.put("constraints", Boolean.TRUE); //$NON-NLS-1$
+
+ compartmentTitleDefaultVisibilityMap = new LinkedHashMap<String, Boolean>();
+ compartmentTitleDefaultVisibilityMap.put("parameters", Boolean.TRUE); //$NON-NLS-1$
+ compartmentTitleDefaultVisibilityMap.put("constraints", Boolean.TRUE); //$NON-NLS-1$
+
+
+ // Start of user code custom static initializations
+ // End of user code
+
+ Collections.unmodifiableMap(compartmentDefaultVisibilityMap);
+ Collections.unmodifiableMap(compartmentTitleDefaultVisibilityMap);
+ }
+
+ /** Constructor */
+ public ConstraintBlockPreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_" + SysMLGraphicalTypes.SHAPE_SYSML_CONSTRAINTBLOCK_AS_CLASSIFIER_ID); //$NON-NLS-1$
+ }
+
+ /** Default preferences initializer */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ // End of user code
+
+ // Initialize default visibility for compartments in preference page.
+ for (String compartmentName : compartmentDefaultVisibilityMap.keySet()) {
+ String showCompartmentKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_VISIBILITY);
+ store.setDefault(showCompartmentKey, compartmentDefaultVisibilityMap.get(compartmentName));
+ }
+
+ // Initialize default title visibility for compartments in preference page.
+ for (String compartmentName : compartmentTitleDefaultVisibilityMap.keySet()) {
+ String showCompartmentTitleKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_NAME_VISIBILITY);
+ store.setDefault(showCompartmentTitleKey, compartmentTitleDefaultVisibilityMap.get(compartmentName));
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void initializeCompartmentNamesList() {
+ for (String name : compartmentDefaultVisibilityMap.keySet()) {
+ this.compartmentNamesList.add(name);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void initializeCompartmentTitlesList() {
+ for (String name : compartmentTitleDefaultVisibilityMap.keySet()) {
+ this.compartmentTitlesList.add(name);
+ }
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/ConstraintPreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/ConstraintPreferencePage.java
new file mode 100755
index 0000000..838a10b
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/ConstraintPreferencePage.java
@@ -0,0 +1,37 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+
+public class ConstraintPreferencePage extends BlockDefinitionDiagramNodePreferencePage {
+
+ /** Constant key to access preferences */
+ public static String prefKey = ElementTypes.DIAGRAM_ID + "_" + UMLGraphicalTypes.SHAPE_UML_CONSTRAINT_AS_LABEL_ID; //$NON-NLS-1$
+
+ /** Constructor */
+ public ConstraintPreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_" + UMLGraphicalTypes.SHAPE_UML_CONSTRAINT_AS_LABEL_ID); //$NON-NLS-1$
+ }
+
+ /** Default preferences initializer */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ // End of user code
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/ConstraintPropertyPreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/ConstraintPropertyPreferencePage.java
new file mode 100755
index 0000000..beaf4a3
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/ConstraintPropertyPreferencePage.java
@@ -0,0 +1,37 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+
+public class ConstraintPropertyPreferencePage extends BlockDefinitionDiagramNodePreferencePage {
+
+ /** Constant key to access preferences */
+ public static String prefKey = ElementTypes.DIAGRAM_ID + "_" + SysMLGraphicalTypes.SHAPE_SYSML_CONSTRAINTPROPERTY_AS_LABEL_ID; //$NON-NLS-1$
+
+ /** Constructor */
+ public ConstraintPropertyPreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_" + SysMLGraphicalTypes.SHAPE_SYSML_CONSTRAINTPROPERTY_AS_LABEL_ID); //$NON-NLS-1$
+ }
+
+ /** Default preferences initializer */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ // End of user code
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/DataTypePreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/DataTypePreferencePage.java
new file mode 100755
index 0000000..6a2b582
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/DataTypePreferencePage.java
@@ -0,0 +1,98 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences;
+
+import java.util.Collections;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+
+public class DataTypePreferencePage extends BlockDefinitionDiagramNodePreferencePage {
+
+ /** Constant key to access preferences */
+ public static String prefKey = ElementTypes.DIAGRAM_ID + "_" + UMLGraphicalTypes.SHAPE_UML_DATATYPE_AS_CLASSIFIER_ID; //$NON-NLS-1$
+
+ /** The compartments default visibility for preferences */
+ public static final Map<String, Boolean> compartmentDefaultVisibilityMap;
+
+ /** The compartment titles default visibility for preferences */
+ public static final Map<String, Boolean> compartmentTitleDefaultVisibilityMap;
+
+ /** Static attribute initialization */
+ static {
+ compartmentDefaultVisibilityMap = new LinkedHashMap<String, Boolean>();
+ compartmentDefaultVisibilityMap.put("properties", Boolean.TRUE); //$NON-NLS-1$
+ compartmentDefaultVisibilityMap.put("operations", Boolean.FALSE); //$NON-NLS-1$
+
+ compartmentTitleDefaultVisibilityMap = new LinkedHashMap<String, Boolean>();
+ compartmentTitleDefaultVisibilityMap.put("properties", Boolean.TRUE); //$NON-NLS-1$
+ compartmentTitleDefaultVisibilityMap.put("operations", Boolean.TRUE); //$NON-NLS-1$
+
+
+ // Start of user code custom static initializations
+ // End of user code
+
+ Collections.unmodifiableMap(compartmentDefaultVisibilityMap);
+ Collections.unmodifiableMap(compartmentTitleDefaultVisibilityMap);
+ }
+
+ /** Constructor */
+ public DataTypePreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_" + UMLGraphicalTypes.SHAPE_UML_DATATYPE_AS_CLASSIFIER_ID); //$NON-NLS-1$
+ }
+
+ /** Default preferences initializer */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ // End of user code
+
+ // Initialize default visibility for compartments in preference page.
+ for (String compartmentName : compartmentDefaultVisibilityMap.keySet()) {
+ String showCompartmentKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_VISIBILITY);
+ store.setDefault(showCompartmentKey, compartmentDefaultVisibilityMap.get(compartmentName));
+ }
+
+ // Initialize default title visibility for compartments in preference page.
+ for (String compartmentName : compartmentTitleDefaultVisibilityMap.keySet()) {
+ String showCompartmentTitleKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_NAME_VISIBILITY);
+ store.setDefault(showCompartmentTitleKey, compartmentTitleDefaultVisibilityMap.get(compartmentName));
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void initializeCompartmentNamesList() {
+ for (String name : compartmentDefaultVisibilityMap.keySet()) {
+ this.compartmentNamesList.add(name);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void initializeCompartmentTitlesList() {
+ for (String name : compartmentTitleDefaultVisibilityMap.keySet()) {
+ this.compartmentTitlesList.add(name);
+ }
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/DependencyPreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/DependencyPreferencePage.java
new file mode 100755
index 0000000..7554972
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/DependencyPreferencePage.java
@@ -0,0 +1,37 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+
+public class DependencyPreferencePage extends BlockDefinitionDiagramLinkPreferencePage {
+
+ /** Constant key to access preferences */
+ public static String prefKey = ElementTypes.DIAGRAM_ID + "_" + UMLGraphicalTypes.LINK_UML_DEPENDENCY_ID; //$NON-NLS-1$
+
+ /** Constructor */
+ public DependencyPreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_" + UMLGraphicalTypes.LINK_UML_DEPENDENCY_ID); //$NON-NLS-1$
+ }
+
+ /** Default preferences initializer */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ // End of user code
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/DimensionPreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/DimensionPreferencePage.java
new file mode 100755
index 0000000..51d9265
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/DimensionPreferencePage.java
@@ -0,0 +1,43 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+
+public class DimensionPreferencePage extends BlockDefinitionDiagramNodePreferencePage {
+
+ /** Constant key to access preferences */
+ public static String prefKey = ElementTypes.DIAGRAM_ID + "_" + SysMLGraphicalTypes.SHAPE_SYSML_DIMENSION_AS_CLASSIFIER_ID; //$NON-NLS-1$
+
+
+ /** Constructor */
+ public DimensionPreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_" + SysMLGraphicalTypes.SHAPE_SYSML_DIMENSION_AS_CLASSIFIER_ID); //$NON-NLS-1$
+ }
+
+ /** Default preferences initializer */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.WIDTH), 100);
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.HEIGHT), 60);
+ // End of user code
+
+ }
+
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/EnumerationLiteralPreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/EnumerationLiteralPreferencePage.java
new file mode 100755
index 0000000..61824b4
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/EnumerationLiteralPreferencePage.java
@@ -0,0 +1,37 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+
+public class EnumerationLiteralPreferencePage extends BlockDefinitionDiagramNodePreferencePage {
+
+ /** Constant key to access preferences */
+ public static String prefKey = ElementTypes.DIAGRAM_ID + "_" + UMLGraphicalTypes.SHAPE_UML_ENUMERATIONLITERAL_AS_LABEL_ID; //$NON-NLS-1$
+
+ /** Constructor */
+ public EnumerationLiteralPreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_" + UMLGraphicalTypes.SHAPE_UML_ENUMERATIONLITERAL_AS_LABEL_ID); //$NON-NLS-1$
+ }
+
+ /** Default preferences initializer */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ // End of user code
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/EnumerationPreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/EnumerationPreferencePage.java
new file mode 100755
index 0000000..7a08df5
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/EnumerationPreferencePage.java
@@ -0,0 +1,96 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences;
+
+import java.util.Collections;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+
+public class EnumerationPreferencePage extends BlockDefinitionDiagramNodePreferencePage {
+
+ /** Constant key to access preferences */
+ public static String prefKey = ElementTypes.DIAGRAM_ID + "_" + UMLGraphicalTypes.SHAPE_UML_ENUMERATION_AS_CLASSIFIER_ID; //$NON-NLS-1$
+
+ /** The compartments default visibility for preferences */
+ public static final Map<String, Boolean> compartmentDefaultVisibilityMap;
+
+ /** The compartment titles default visibility for preferences */
+ public static final Map<String, Boolean> compartmentTitleDefaultVisibilityMap;
+
+ /** Static attribute initialization */
+ static {
+ compartmentDefaultVisibilityMap = new LinkedHashMap<String, Boolean>();
+ compartmentDefaultVisibilityMap.put("literals", Boolean.TRUE); //$NON-NLS-1$
+
+ compartmentTitleDefaultVisibilityMap = new LinkedHashMap<String, Boolean>();
+ compartmentTitleDefaultVisibilityMap.put("literals", Boolean.TRUE); //$NON-NLS-1$
+
+
+ // Start of user code custom static initializations
+ // End of user code
+
+ Collections.unmodifiableMap(compartmentDefaultVisibilityMap);
+ Collections.unmodifiableMap(compartmentTitleDefaultVisibilityMap);
+ }
+
+ /** Constructor */
+ public EnumerationPreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_" + UMLGraphicalTypes.SHAPE_UML_ENUMERATION_AS_CLASSIFIER_ID); //$NON-NLS-1$
+ }
+
+ /** Default preferences initializer */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ // End of user code
+
+ // Initialize default visibility for compartments in preference page.
+ for (String compartmentName : compartmentDefaultVisibilityMap.keySet()) {
+ String showCompartmentKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_VISIBILITY);
+ store.setDefault(showCompartmentKey, compartmentDefaultVisibilityMap.get(compartmentName));
+ }
+
+ // Initialize default title visibility for compartments in preference page.
+ for (String compartmentName : compartmentTitleDefaultVisibilityMap.keySet()) {
+ String showCompartmentTitleKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_NAME_VISIBILITY);
+ store.setDefault(showCompartmentTitleKey, compartmentTitleDefaultVisibilityMap.get(compartmentName));
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void initializeCompartmentNamesList() {
+ for (String name : compartmentDefaultVisibilityMap.keySet()) {
+ this.compartmentNamesList.add(name);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void initializeCompartmentTitlesList() {
+ for (String name : compartmentTitleDefaultVisibilityMap.keySet()) {
+ this.compartmentTitlesList.add(name);
+ }
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/FlowPortPreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/FlowPortPreferencePage.java
new file mode 100755
index 0000000..f978bca
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/FlowPortPreferencePage.java
@@ -0,0 +1,42 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences;
+
+import org.eclipse.gmf.runtime.common.ui.preferences.AbstractPreferencePage;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.swt.widgets.Composite;
+
+public class FlowPortPreferencePage extends AbstractPreferencePage {
+
+ /** Constructor */
+ public FlowPortPreferencePage() {
+ super();
+ }
+
+ /** Default preferences initializer */
+ public static void initDefaults(IPreferenceStore store) {
+ FlowPortAsBorderItemPreferencePage.initDefaults(store);
+ FlowPortAsCompartmentItemPreferencePage.initDefaults(store);
+ }
+
+ @Override
+ protected void addFields(Composite parent) {
+
+ }
+
+ @Override
+ protected void initHelp() {
+
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/FlowPropertyPreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/FlowPropertyPreferencePage.java
new file mode 100755
index 0000000..c1af80c
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/FlowPropertyPreferencePage.java
@@ -0,0 +1,37 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+
+public class FlowPropertyPreferencePage extends BlockDefinitionDiagramNodePreferencePage {
+
+ /** Constant key to access preferences */
+ public static String prefKey = ElementTypes.DIAGRAM_ID + "_" + SysMLGraphicalTypes.SHAPE_SYSML_FLOWPROPERTY_AS_LABEL_ID; //$NON-NLS-1$
+
+ /** Constructor */
+ public FlowPropertyPreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_" + SysMLGraphicalTypes.SHAPE_SYSML_FLOWPROPERTY_AS_LABEL_ID); //$NON-NLS-1$
+ }
+
+ /** Default preferences initializer */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ // End of user code
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/FlowSpecificationPreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/FlowSpecificationPreferencePage.java
new file mode 100755
index 0000000..e0e3b68
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/FlowSpecificationPreferencePage.java
@@ -0,0 +1,96 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences;
+
+import java.util.Collections;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+
+public class FlowSpecificationPreferencePage extends BlockDefinitionDiagramNodePreferencePage {
+
+ /** Constant key to access preferences */
+ public static String prefKey = ElementTypes.DIAGRAM_ID + "_" + SysMLGraphicalTypes.SHAPE_SYSML_FLOWSPECIFICATION_AS_CLASSIFIER_ID; //$NON-NLS-1$
+
+ /** The compartments default visibility for preferences */
+ public static final Map<String, Boolean> compartmentDefaultVisibilityMap;
+
+ /** The compartment titles default visibility for preferences */
+ public static final Map<String, Boolean> compartmentTitleDefaultVisibilityMap;
+
+ /** Static attribute initialization */
+ static {
+ compartmentDefaultVisibilityMap = new LinkedHashMap<String, Boolean>();
+ compartmentDefaultVisibilityMap.put("flow properties", Boolean.TRUE); //$NON-NLS-1$
+
+ compartmentTitleDefaultVisibilityMap = new LinkedHashMap<String, Boolean>();
+ compartmentTitleDefaultVisibilityMap.put("flow properties", Boolean.TRUE); //$NON-NLS-1$
+
+
+ // Start of user code custom static initializations
+ // End of user code
+
+ Collections.unmodifiableMap(compartmentDefaultVisibilityMap);
+ Collections.unmodifiableMap(compartmentTitleDefaultVisibilityMap);
+ }
+
+ /** Constructor */
+ public FlowSpecificationPreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_" + SysMLGraphicalTypes.SHAPE_SYSML_FLOWSPECIFICATION_AS_CLASSIFIER_ID); //$NON-NLS-1$
+ }
+
+ /** Default preferences initializer */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ // End of user code
+
+ // Initialize default visibility for compartments in preference page.
+ for (String compartmentName : compartmentDefaultVisibilityMap.keySet()) {
+ String showCompartmentKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_VISIBILITY);
+ store.setDefault(showCompartmentKey, compartmentDefaultVisibilityMap.get(compartmentName));
+ }
+
+ // Initialize default title visibility for compartments in preference page.
+ for (String compartmentName : compartmentTitleDefaultVisibilityMap.keySet()) {
+ String showCompartmentTitleKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_NAME_VISIBILITY);
+ store.setDefault(showCompartmentTitleKey, compartmentTitleDefaultVisibilityMap.get(compartmentName));
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void initializeCompartmentNamesList() {
+ for (String name : compartmentDefaultVisibilityMap.keySet()) {
+ this.compartmentNamesList.add(name);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void initializeCompartmentTitlesList() {
+ for (String name : compartmentTitleDefaultVisibilityMap.keySet()) {
+ this.compartmentTitlesList.add(name);
+ }
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/GeneralizationPreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/GeneralizationPreferencePage.java
new file mode 100755
index 0000000..ea7559f
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/GeneralizationPreferencePage.java
@@ -0,0 +1,37 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+
+public class GeneralizationPreferencePage extends BlockDefinitionDiagramLinkPreferencePage {
+
+ /** Constant key to access preferences */
+ public static String prefKey = ElementTypes.DIAGRAM_ID + "_" + UMLGraphicalTypes.LINK_UML_GENERALIZATION_ID; //$NON-NLS-1$
+
+ /** Constructor */
+ public GeneralizationPreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_" + UMLGraphicalTypes.LINK_UML_GENERALIZATION_ID); //$NON-NLS-1$
+ }
+
+ /** Default preferences initializer */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ // End of user code
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/InstanceSpecificationPreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/InstanceSpecificationPreferencePage.java
new file mode 100755
index 0000000..e9ac4e3
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/InstanceSpecificationPreferencePage.java
@@ -0,0 +1,102 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences;
+
+import java.util.Collections;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+
+public class InstanceSpecificationPreferencePage extends BlockDefinitionDiagramNodePreferencePage {
+
+ /** Constant key to access preferences */
+ protected static String prefKey = ElementTypes.DIAGRAM_ID + "_InstanceSpecification"; //$NON-NLS-1$
+
+ /** The compartments default visibility for preferences */
+ public static final Map<String, Boolean> compartmentDefaultVisibilityMap;
+
+ /** The compartment titles default visibility for preferences */
+ public static final Map<String, Boolean> compartmentTitleDefaultVisibilityMap;
+
+ /** Static attribute initialization */
+ static {
+ compartmentDefaultVisibilityMap = new LinkedHashMap<String, Boolean>();
+ compartmentDefaultVisibilityMap.put("SlotCompartment", Boolean.TRUE); //$NON-NLS-1$
+
+ compartmentTitleDefaultVisibilityMap = new LinkedHashMap<String, Boolean>();
+ compartmentTitleDefaultVisibilityMap.put("SlotCompartment", Boolean.TRUE); //$NON-NLS-1$
+
+
+ // Start of user code custom static initializations
+ // End of user code
+
+ Collections.unmodifiableMap(compartmentDefaultVisibilityMap);
+ Collections.unmodifiableMap(compartmentTitleDefaultVisibilityMap);
+ }
+
+ /** Default constructor */
+ public InstanceSpecificationPreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_InstanceSpecification"); //$NON-NLS-1$
+ }
+
+ /**
+ * Initialize defaults using a specified {@link IPreferenceStore}
+ *
+ * @param store
+ * the preference store.
+ */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ // End of user code
+
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.WIDTH), 100);
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.HEIGHT), 100);
+ // Initialize default visibility for compartments in preference page.
+ for (String compartmentName : compartmentDefaultVisibilityMap.keySet()) {
+ String showCompartmentKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_VISIBILITY);
+ store.setDefault(showCompartmentKey, compartmentDefaultVisibilityMap.get(compartmentName));
+ }
+
+ // Initialize default title visibility for compartments in preference page.
+ for (String compartmentName : compartmentTitleDefaultVisibilityMap.keySet()) {
+ String showCompartmentTitleKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_NAME_VISIBILITY);
+ store.setDefault(showCompartmentTitleKey, compartmentTitleDefaultVisibilityMap.get(compartmentName));
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void initializeCompartmentNamesList() {
+ for (String name : compartmentDefaultVisibilityMap.keySet()) {
+ this.compartmentNamesList.add(name);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void initializeCompartmentTitlesList() {
+ for (String name : compartmentTitleDefaultVisibilityMap.keySet()) {
+ this.compartmentTitlesList.add(name);
+ }
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/InterfacePreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/InterfacePreferencePage.java
new file mode 100755
index 0000000..4726710
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/InterfacePreferencePage.java
@@ -0,0 +1,98 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences;
+
+import java.util.Collections;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+
+public class InterfacePreferencePage extends BlockDefinitionDiagramNodePreferencePage {
+
+ /** Constant key to access preferences */
+ public static String prefKey = ElementTypes.DIAGRAM_ID + "_" + UMLGraphicalTypes.SHAPE_UML_INTERFACE_AS_CLASSIFIER_ID; //$NON-NLS-1$
+
+ /** The compartments default visibility for preferences */
+ public static final Map<String, Boolean> compartmentDefaultVisibilityMap;
+
+ /** The compartment titles default visibility for preferences */
+ public static final Map<String, Boolean> compartmentTitleDefaultVisibilityMap;
+
+ /** Static attribute initialization */
+ static {
+ compartmentDefaultVisibilityMap = new LinkedHashMap<String, Boolean>();
+ compartmentDefaultVisibilityMap.put("properties", Boolean.TRUE); //$NON-NLS-1$
+ compartmentDefaultVisibilityMap.put("operations", Boolean.TRUE); //$NON-NLS-1$
+
+ compartmentTitleDefaultVisibilityMap = new LinkedHashMap<String, Boolean>();
+ compartmentTitleDefaultVisibilityMap.put("properties", Boolean.TRUE); //$NON-NLS-1$
+ compartmentTitleDefaultVisibilityMap.put("operations", Boolean.TRUE); //$NON-NLS-1$
+
+
+ // Start of user code custom static initializations
+ // End of user code
+
+ Collections.unmodifiableMap(compartmentDefaultVisibilityMap);
+ Collections.unmodifiableMap(compartmentTitleDefaultVisibilityMap);
+ }
+
+ /** Constructor */
+ public InterfacePreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_" + UMLGraphicalTypes.SHAPE_UML_INTERFACE_AS_CLASSIFIER_ID); //$NON-NLS-1$
+ }
+
+ /** Default preferences initializer */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ // End of user code
+
+ // Initialize default visibility for compartments in preference page.
+ for (String compartmentName : compartmentDefaultVisibilityMap.keySet()) {
+ String showCompartmentKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_VISIBILITY);
+ store.setDefault(showCompartmentKey, compartmentDefaultVisibilityMap.get(compartmentName));
+ }
+
+ // Initialize default title visibility for compartments in preference page.
+ for (String compartmentName : compartmentTitleDefaultVisibilityMap.keySet()) {
+ String showCompartmentTitleKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_NAME_VISIBILITY);
+ store.setDefault(showCompartmentTitleKey, compartmentTitleDefaultVisibilityMap.get(compartmentName));
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void initializeCompartmentNamesList() {
+ for (String name : compartmentDefaultVisibilityMap.keySet()) {
+ this.compartmentNamesList.add(name);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void initializeCompartmentTitlesList() {
+ for (String name : compartmentTitleDefaultVisibilityMap.keySet()) {
+ this.compartmentTitlesList.add(name);
+ }
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/InterfaceRealizationPreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/InterfaceRealizationPreferencePage.java
new file mode 100755
index 0000000..fe5f3f7
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/InterfaceRealizationPreferencePage.java
@@ -0,0 +1,36 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+
+public class InterfaceRealizationPreferencePage extends BlockDefinitionDiagramLinkPreferencePage {
+
+ /** Constant key to access preferences */
+ public static String prefKey = ElementTypes.DIAGRAM_ID + "_" + UMLGraphicalTypes.LINK_UML_INTERFACEREALIZATION_ID; //$NON-NLS-1$
+
+ /** Constructor */
+ public InterfaceRealizationPreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_" + UMLGraphicalTypes.LINK_UML_INTERFACEREALIZATION_ID); //$NON-NLS-1$
+ }
+
+ /** Default preferences initializer */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ // End of user code
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/ModelPreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/ModelPreferencePage.java
new file mode 100755
index 0000000..98898e1
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/ModelPreferencePage.java
@@ -0,0 +1,102 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences;
+
+import java.util.Collections;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+
+public class ModelPreferencePage extends BlockDefinitionDiagramNodePreferencePage {
+
+ /** Constant key to access preferences */
+ protected static String prefKey = ElementTypes.DIAGRAM_ID + "_Model"; //$NON-NLS-1$
+
+ /** The compartments default visibility for preferences */
+ public static final Map<String, Boolean> compartmentDefaultVisibilityMap;
+
+ /** The compartment titles default visibility for preferences */
+ public static final Map<String, Boolean> compartmentTitleDefaultVisibilityMap;
+
+ /** Static attribute initialization */
+ static {
+ compartmentDefaultVisibilityMap = new LinkedHashMap<String, Boolean>();
+ compartmentDefaultVisibilityMap.put("PackageableElementCompartment", Boolean.TRUE); //$NON-NLS-1$
+
+ compartmentTitleDefaultVisibilityMap = new LinkedHashMap<String, Boolean>();
+ compartmentTitleDefaultVisibilityMap.put("PackageableElementCompartment", Boolean.FALSE); //$NON-NLS-1$
+
+
+ // Start of user code custom static initializations
+ // End of user code
+
+ Collections.unmodifiableMap(compartmentDefaultVisibilityMap);
+ Collections.unmodifiableMap(compartmentTitleDefaultVisibilityMap);
+ }
+
+ /** Default constructor */
+ public ModelPreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_Model"); //$NON-NLS-1$
+ }
+
+ /**
+ * Initialize defaults using a specified {@link IPreferenceStore}
+ *
+ * @param store
+ * the preference store.
+ */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ // End of user code
+
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.WIDTH), 200);
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.HEIGHT), 100);
+ // Initialize default visibility for compartments in preference page.
+ for (String compartmentName : compartmentDefaultVisibilityMap.keySet()) {
+ String showCompartmentKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_VISIBILITY);
+ store.setDefault(showCompartmentKey, compartmentDefaultVisibilityMap.get(compartmentName));
+ }
+
+ // Initialize default title visibility for compartments in preference page.
+ for (String compartmentName : compartmentTitleDefaultVisibilityMap.keySet()) {
+ String showCompartmentTitleKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_NAME_VISIBILITY);
+ store.setDefault(showCompartmentTitleKey, compartmentTitleDefaultVisibilityMap.get(compartmentName));
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void initializeCompartmentNamesList() {
+ for (String name : compartmentDefaultVisibilityMap.keySet()) {
+ this.compartmentNamesList.add(name);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void initializeCompartmentTitlesList() {
+ for (String name : compartmentTitleDefaultVisibilityMap.keySet()) {
+ this.compartmentTitlesList.add(name);
+ }
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/OperationPreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/OperationPreferencePage.java
new file mode 100755
index 0000000..3057a24
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/OperationPreferencePage.java
@@ -0,0 +1,36 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+
+public class OperationPreferencePage extends BlockDefinitionDiagramNodePreferencePage {
+
+ /** Constant key to access preferences */
+ public static String prefKey = ElementTypes.DIAGRAM_ID + "_" + UMLGraphicalTypes.SHAPE_UML_OPERATION_AS_LABEL_ID; //$NON-NLS-1$
+
+ /** Constructor */
+ public OperationPreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_" + UMLGraphicalTypes.SHAPE_UML_OPERATION_AS_LABEL_ID); //$NON-NLS-1$
+ }
+
+ /** Default preferences initializer */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ // End of user code
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/PackagePreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/PackagePreferencePage.java
new file mode 100755
index 0000000..5db4fd9
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/PackagePreferencePage.java
@@ -0,0 +1,102 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences;
+
+import java.util.Collections;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+
+public class PackagePreferencePage extends BlockDefinitionDiagramNodePreferencePage {
+
+ /** Constant key to access preferences */
+ protected static String prefKey = ElementTypes.DIAGRAM_ID + "_Package"; //$NON-NLS-1$
+
+ /** The compartments default visibility for preferences */
+ public static final Map<String, Boolean> compartmentDefaultVisibilityMap;
+
+ /** The compartment titles default visibility for preferences */
+ public static final Map<String, Boolean> compartmentTitleDefaultVisibilityMap;
+
+ /** Static attribute initialization */
+ static {
+ compartmentDefaultVisibilityMap = new LinkedHashMap<String, Boolean>();
+ compartmentDefaultVisibilityMap.put("PackageableElementCompartment", Boolean.TRUE); //$NON-NLS-1$
+
+ compartmentTitleDefaultVisibilityMap = new LinkedHashMap<String, Boolean>();
+ compartmentTitleDefaultVisibilityMap.put("PackageableElementCompartment", Boolean.FALSE); //$NON-NLS-1$
+
+
+ // Start of user code custom static initializations
+ // End of user code
+
+ Collections.unmodifiableMap(compartmentDefaultVisibilityMap);
+ Collections.unmodifiableMap(compartmentTitleDefaultVisibilityMap);
+ }
+
+ /** Default constructor */
+ public PackagePreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_Package"); //$NON-NLS-1$
+ }
+
+ /**
+ * Initialize defaults using a specified {@link IPreferenceStore}
+ *
+ * @param store
+ * the preference store.
+ */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ // End of user code
+
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.WIDTH), 200);
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.HEIGHT), 100);
+ // Initialize default visibility for compartments in preference page.
+ for (String compartmentName : compartmentDefaultVisibilityMap.keySet()) {
+ String showCompartmentKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_VISIBILITY);
+ store.setDefault(showCompartmentKey, compartmentDefaultVisibilityMap.get(compartmentName));
+ }
+
+ // Initialize default title visibility for compartments in preference page.
+ for (String compartmentName : compartmentTitleDefaultVisibilityMap.keySet()) {
+ String showCompartmentTitleKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_NAME_VISIBILITY);
+ store.setDefault(showCompartmentTitleKey, compartmentTitleDefaultVisibilityMap.get(compartmentName));
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void initializeCompartmentNamesList() {
+ for (String name : compartmentDefaultVisibilityMap.keySet()) {
+ this.compartmentNamesList.add(name);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void initializeCompartmentTitlesList() {
+ for (String name : compartmentTitleDefaultVisibilityMap.keySet()) {
+ this.compartmentTitlesList.add(name);
+ }
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/PartPreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/PartPreferencePage.java
new file mode 100755
index 0000000..6bb00d0
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/PartPreferencePage.java
@@ -0,0 +1,36 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+
+public class PartPreferencePage extends BlockDefinitionDiagramNodePreferencePage {
+
+ /** Constant key to access preferences */
+ public static String prefKey = ElementTypes.DIAGRAM_ID + "_" + SysMLGraphicalTypes.SHAPE_SYSML_PART_AS_LABEL_ID; //$NON-NLS-1$
+
+ /** Constructor */
+ public PartPreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_" + SysMLGraphicalTypes.SHAPE_SYSML_PART_AS_LABEL_ID); //$NON-NLS-1$
+ }
+
+ /** Default preferences initializer */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ // End of user code
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/PortPreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/PortPreferencePage.java
new file mode 100755
index 0000000..84028b2
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/PortPreferencePage.java
@@ -0,0 +1,43 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences;
+
+import org.eclipse.gmf.runtime.common.ui.preferences.AbstractPreferencePage;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.swt.widgets.Composite;
+
+public class PortPreferencePage extends AbstractPreferencePage {
+
+ /** Constructor */
+ public PortPreferencePage() {
+ super();
+ }
+
+ /** Default preferences initializer */
+ public static void initDefaults(IPreferenceStore store) {
+ PortAsBorderItemPreferencePage.initDefaults(store);
+ PortAsCompartmentItemPreferencePage.initDefaults(store);
+ }
+
+ @Override
+ protected void addFields(Composite parent) {
+
+ }
+
+ @Override
+ protected void initHelp() {
+
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/PrimitiveTypePreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/PrimitiveTypePreferencePage.java
new file mode 100755
index 0000000..d759b98
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/PrimitiveTypePreferencePage.java
@@ -0,0 +1,40 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+
+public class PrimitiveTypePreferencePage extends BlockDefinitionDiagramNodePreferencePage {
+
+ /** Constant key to access preferences */
+ public static String prefKey = ElementTypes.DIAGRAM_ID + "_" + UMLGraphicalTypes.SHAPE_UML_PRIMITIVETYPE_AS_CLASSIFIER_ID; //$NON-NLS-1$
+
+
+ /** Constructor */
+ public PrimitiveTypePreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_" + UMLGraphicalTypes.SHAPE_UML_PRIMITIVETYPE_AS_CLASSIFIER_ID); //$NON-NLS-1$
+ }
+
+ /** Default preferences initializer */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ // End of user code
+
+ }
+
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/PropertyPreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/PropertyPreferencePage.java
new file mode 100755
index 0000000..53241d2
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/PropertyPreferencePage.java
@@ -0,0 +1,36 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+
+public class PropertyPreferencePage extends BlockDefinitionDiagramNodePreferencePage {
+
+ /** Constant key to access preferences */
+ public static String prefKey = ElementTypes.DIAGRAM_ID + "_" + UMLGraphicalTypes.SHAPE_UML_PROPERTY_AS_LABEL_ID; //$NON-NLS-1$
+
+ /** Constructor */
+ public PropertyPreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_" + UMLGraphicalTypes.SHAPE_UML_PROPERTY_AS_LABEL_ID); //$NON-NLS-1$
+ }
+
+ /** Default preferences initializer */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ // End of user code
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/ReceptionPreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/ReceptionPreferencePage.java
new file mode 100755
index 0000000..c8a297f
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/ReceptionPreferencePage.java
@@ -0,0 +1,36 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+
+public class ReceptionPreferencePage extends BlockDefinitionDiagramNodePreferencePage {
+
+ /** Constant key to access preferences */
+ public static String prefKey = ElementTypes.DIAGRAM_ID + "_" + UMLGraphicalTypes.SHAPE_UML_RECEPTION_AS_LABEL_ID; //$NON-NLS-1$
+
+ /** Constructor */
+ public ReceptionPreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_" + UMLGraphicalTypes.SHAPE_UML_RECEPTION_AS_LABEL_ID); //$NON-NLS-1$
+ }
+
+ /** Default preferences initializer */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ // End of user code
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/ReferencePreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/ReferencePreferencePage.java
new file mode 100755
index 0000000..b4b6edd
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/ReferencePreferencePage.java
@@ -0,0 +1,36 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+
+public class ReferencePreferencePage extends BlockDefinitionDiagramNodePreferencePage {
+
+ /** Constant key to access preferences */
+ public static String prefKey = ElementTypes.DIAGRAM_ID + "_" + SysMLGraphicalTypes.SHAPE_SYSML_REFERENCE_AS_LABEL_ID; //$NON-NLS-1$
+
+ /** Constructor */
+ public ReferencePreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_" + SysMLGraphicalTypes.SHAPE_SYSML_REFERENCE_AS_LABEL_ID); //$NON-NLS-1$
+ }
+
+ /** Default preferences initializer */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ // End of user code
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/SignalPreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/SignalPreferencePage.java
new file mode 100755
index 0000000..4be6d9e
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/SignalPreferencePage.java
@@ -0,0 +1,100 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences;
+
+import java.util.Collections;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+
+public class SignalPreferencePage extends BlockDefinitionDiagramNodePreferencePage {
+
+ /** Constant key to access preferences */
+ public static String prefKey = ElementTypes.DIAGRAM_ID + "_" + UMLGraphicalTypes.SHAPE_UML_SIGNAL_AS_CLASSIFIER_ID; //$NON-NLS-1$
+
+ /** The compartments default visibility for preferences */
+ public static final Map<String, Boolean> compartmentDefaultVisibilityMap;
+
+ /** The compartment titles default visibility for preferences */
+ public static final Map<String, Boolean> compartmentTitleDefaultVisibilityMap;
+
+ /** Static attribute initialization */
+ static {
+ compartmentDefaultVisibilityMap = new LinkedHashMap<String, Boolean>();
+ compartmentDefaultVisibilityMap.put("properties", Boolean.FALSE); //$NON-NLS-1$
+ compartmentDefaultVisibilityMap.put("operations", Boolean.FALSE); //$NON-NLS-1$
+
+ compartmentTitleDefaultVisibilityMap = new LinkedHashMap<String, Boolean>();
+ compartmentTitleDefaultVisibilityMap.put("properties", Boolean.TRUE); //$NON-NLS-1$
+ compartmentTitleDefaultVisibilityMap.put("operations", Boolean.TRUE); //$NON-NLS-1$
+
+
+ // Start of user code custom static initializations
+ // End of user code
+
+ Collections.unmodifiableMap(compartmentDefaultVisibilityMap);
+ Collections.unmodifiableMap(compartmentTitleDefaultVisibilityMap);
+ }
+
+ /** Constructor */
+ public SignalPreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_" + UMLGraphicalTypes.SHAPE_UML_SIGNAL_AS_CLASSIFIER_ID); //$NON-NLS-1$
+ }
+
+ /** Default preferences initializer */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.WIDTH), 100);
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.HEIGHT), 60);
+ // End of user code
+
+ // Initialize default visibility for compartments in preference page.
+ for (String compartmentName : compartmentDefaultVisibilityMap.keySet()) {
+ String showCompartmentKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_VISIBILITY);
+ store.setDefault(showCompartmentKey, compartmentDefaultVisibilityMap.get(compartmentName));
+ }
+
+ // Initialize default title visibility for compartments in preference page.
+ for (String compartmentName : compartmentTitleDefaultVisibilityMap.keySet()) {
+ String showCompartmentTitleKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_NAME_VISIBILITY);
+ store.setDefault(showCompartmentTitleKey, compartmentTitleDefaultVisibilityMap.get(compartmentName));
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void initializeCompartmentNamesList() {
+ for (String name : compartmentDefaultVisibilityMap.keySet()) {
+ this.compartmentNamesList.add(name);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void initializeCompartmentTitlesList() {
+ for (String name : compartmentTitleDefaultVisibilityMap.keySet()) {
+ this.compartmentTitlesList.add(name);
+ }
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/SlotPreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/SlotPreferencePage.java
new file mode 100755
index 0000000..610f512
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/SlotPreferencePage.java
@@ -0,0 +1,40 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+
+public class SlotPreferencePage extends BlockDefinitionDiagramNodePreferencePage {
+
+ /** Constant key to access preferences */
+ protected static String prefKey = ElementTypes.DIAGRAM_ID + "_Slot"; //$NON-NLS-1$
+
+ /** Default constructor */
+ public SlotPreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_Slot"); //$NON-NLS-1$
+ }
+
+ /**
+ * Initialize defaults using a specified {@link IPreferenceStore}
+ *
+ * @param store
+ * the preference store.
+ */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ // End of user code
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/UnitPreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/UnitPreferencePage.java
new file mode 100755
index 0000000..5222afd
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/UnitPreferencePage.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+
+public class UnitPreferencePage extends BlockDefinitionDiagramNodePreferencePage {
+
+ /** Constant key to access preferences */
+ public static String prefKey = ElementTypes.DIAGRAM_ID + "_" + SysMLGraphicalTypes.SHAPE_SYSML_UNIT_AS_CLASSIFIER_ID; //$NON-NLS-1$
+
+
+ /** Constructor */
+ public UnitPreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_" + SysMLGraphicalTypes.SHAPE_SYSML_UNIT_AS_CLASSIFIER_ID); //$NON-NLS-1$
+ }
+
+ /** Default preferences initializer */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.WIDTH), 100);
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.HEIGHT), 60);
+ // End of user code
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/UsagePreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/UsagePreferencePage.java
new file mode 100755
index 0000000..e854a9f
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/UsagePreferencePage.java
@@ -0,0 +1,36 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+
+public class UsagePreferencePage extends BlockDefinitionDiagramLinkPreferencePage {
+
+ /** Constant key to access preferences */
+ public static String prefKey = ElementTypes.DIAGRAM_ID + "_" + UMLGraphicalTypes.LINK_UML_USAGE_ID; //$NON-NLS-1$
+
+ /** Constructor */
+ public UsagePreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_" + UMLGraphicalTypes.LINK_UML_USAGE_ID); //$NON-NLS-1$
+ }
+
+ /** Default preferences initializer */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ // End of user code
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/ValuePreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/ValuePreferencePage.java
new file mode 100755
index 0000000..0790ebd
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/ValuePreferencePage.java
@@ -0,0 +1,36 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+
+public class ValuePreferencePage extends BlockDefinitionDiagramNodePreferencePage {
+
+ /** Constant key to access preferences */
+ public static String prefKey = ElementTypes.DIAGRAM_ID + "_" + SysMLGraphicalTypes.SHAPE_SYSML_VALUE_AS_LABEL_ID; //$NON-NLS-1$
+
+ /** Constructor */
+ public ValuePreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_" + SysMLGraphicalTypes.SHAPE_SYSML_VALUE_AS_LABEL_ID); //$NON-NLS-1$
+ }
+
+ /** Default preferences initializer */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ // End of user code
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/ValueTypePreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/ValueTypePreferencePage.java
new file mode 100755
index 0000000..565645b
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/ValueTypePreferencePage.java
@@ -0,0 +1,98 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences;
+
+import java.util.Collections;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+
+public class ValueTypePreferencePage extends BlockDefinitionDiagramNodePreferencePage {
+
+ /** Constant key to access preferences */
+ public static String prefKey = ElementTypes.DIAGRAM_ID + "_" + SysMLGraphicalTypes.SHAPE_SYSML_VALUETYPE_AS_CLASSIFIER_ID; //$NON-NLS-1$
+
+ /** The compartments default visibility for preferences */
+ public static final Map<String, Boolean> compartmentDefaultVisibilityMap;
+
+ /** The compartment titles default visibility for preferences */
+ public static final Map<String, Boolean> compartmentTitleDefaultVisibilityMap;
+
+ /** Static attribute initialization */
+ static {
+ compartmentDefaultVisibilityMap = new LinkedHashMap<String, Boolean>();
+ compartmentDefaultVisibilityMap.put("properties", Boolean.TRUE); //$NON-NLS-1$
+ compartmentDefaultVisibilityMap.put("operations", Boolean.TRUE); //$NON-NLS-1$
+
+ compartmentTitleDefaultVisibilityMap = new LinkedHashMap<String, Boolean>();
+ compartmentTitleDefaultVisibilityMap.put("properties", Boolean.TRUE); //$NON-NLS-1$
+ compartmentTitleDefaultVisibilityMap.put("operations", Boolean.TRUE); //$NON-NLS-1$
+
+
+ // Start of user code custom static initializations
+ // End of user code
+
+ Collections.unmodifiableMap(compartmentDefaultVisibilityMap);
+ Collections.unmodifiableMap(compartmentTitleDefaultVisibilityMap);
+ }
+
+ /** Constructor */
+ public ValueTypePreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_" + SysMLGraphicalTypes.SHAPE_SYSML_VALUETYPE_AS_CLASSIFIER_ID); //$NON-NLS-1$
+ }
+
+ /** Default preferences initializer */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ // End of user code
+
+ // Initialize default visibility for compartments in preference page.
+ for (String compartmentName : compartmentDefaultVisibilityMap.keySet()) {
+ String showCompartmentKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_VISIBILITY);
+ store.setDefault(showCompartmentKey, compartmentDefaultVisibilityMap.get(compartmentName));
+ }
+
+ // Initialize default title visibility for compartments in preference page.
+ for (String compartmentName : compartmentTitleDefaultVisibilityMap.keySet()) {
+ String showCompartmentTitleKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_NAME_VISIBILITY);
+ store.setDefault(showCompartmentTitleKey, compartmentTitleDefaultVisibilityMap.get(compartmentName));
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void initializeCompartmentNamesList() {
+ for (String name : compartmentDefaultVisibilityMap.keySet()) {
+ this.compartmentNamesList.add(name);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void initializeCompartmentTitlesList() {
+ for (String name : compartmentTitleDefaultVisibilityMap.keySet()) {
+ this.compartmentTitlesList.add(name);
+ }
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/provider/BlockDefinitionDiagramEditPartProvider.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/provider/BlockDefinitionDiagramEditPartProvider.java
new file mode 100755
index 0000000..e6cffd7
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/provider/BlockDefinitionDiagramEditPartProvider.java
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.provider;
+
+import static org.eclipse.papyrus.infra.core.Activator.log;
+
+import org.eclipse.gmf.runtime.common.core.service.IOperation;
+import org.eclipse.gmf.runtime.diagram.ui.services.editpart.AbstractEditPartProvider;
+import org.eclipse.gmf.runtime.diagram.ui.services.editpart.CreateGraphicEditPartOperation;
+import org.eclipse.gmf.runtime.diagram.ui.services.editpart.IEditPartOperation;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.edit.part.BlockDefinitionDiagramEditPart;
+
+public class BlockDefinitionDiagramEditPartProvider extends AbstractEditPartProvider {
+
+ @Override
+ public boolean provides(IOperation operation) {
+ if (operation instanceof CreateGraphicEditPartOperation) {
+ View view = ((IEditPartOperation) operation).getView();
+
+ // Ensure current diagram is BlockDefinition Diagram
+ if (ElementTypes.DIAGRAM_ID.equals(view.getType())) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ @Override
+ protected Class<?> getDiagramEditPartClass(View view) {
+ if (ElementTypes.DIAGRAM_ID.equals(view.getType())) {
+ return BlockDefinitionDiagramEditPart.class;
+ }
+
+ log.error(new Exception("Could not create EditPart."));
+ return null;
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/provider/BlockDefinitionDiagramEditPolicyProvider.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/provider/BlockDefinitionDiagramEditPolicyProvider.java
new file mode 100755
index 0000000..db0c7e1
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/provider/BlockDefinitionDiagramEditPolicyProvider.java
@@ -0,0 +1,95 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.provider;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.common.core.service.AbstractProvider;
+import org.eclipse.gmf.runtime.common.core.service.IOperation;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.services.editpolicy.CreateEditPoliciesOperation;
+import org.eclipse.gmf.runtime.diagram.ui.services.editpolicy.IEditPolicyProvider;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.edit.policy.CustomDiagramDragDropEditPolicy;
+
+public class BlockDefinitionDiagramEditPolicyProvider extends AbstractProvider implements IEditPolicyProvider {
+
+ public boolean provides(IOperation operation) {
+
+ CreateEditPoliciesOperation epOperation = (CreateEditPoliciesOperation) operation;
+ if (!(epOperation.getEditPart() instanceof GraphicalEditPart)) {
+ return false;
+ }
+ GraphicalEditPart gep = (GraphicalEditPart) epOperation.getEditPart();
+ String diagramType = gep.getNotationView().getDiagram().getType();
+ if (!ElementTypes.DIAGRAM_ID.equals(diagramType)) {
+ return false;
+ }
+
+ if (gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ModelEditPartTN) {
+ return true;
+ }
+ if (gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ModelPackageableElementCompartmentEditPartTN) {
+ return true;
+ }
+ if (gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ModelEditPartCN) {
+ return true;
+ }
+ if (gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ModelPackageableElementCompartmentEditPartCN) {
+ return true;
+ }
+ if (gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PackageEditPart) {
+ return true;
+ }
+ if (gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PackagePackageableElementCompartmentEditPart) {
+ return true;
+ }
+ if (gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PackageEditPartCN) {
+ return true;
+ }
+ if (gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PackagePackageableElementCompartmentEditPartCN) {
+ return true;
+ }
+ if (gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InstanceSpecificationEditPart) {
+ return true;
+ }
+ if (gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InstanceSpecificationSlotCompartmentEditPart) {
+ return true;
+ }
+ if (gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InstanceSpecificationEditPartCN) {
+ return true;
+ }
+ if (gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InstanceSpecificationSlotCompartmentEditPartCN) {
+ return true;
+ }
+ if (gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ConstraintEditPart) {
+ return true;
+ }
+ if (gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ConstraintEditPartCN) {
+ return true;
+ }
+ if (gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.CommentEditPart) {
+ return true;
+ }
+ if (gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.CommentEditPartCN) {
+ return true;
+ }
+
+ return false;
+ }
+
+ public void createEditPolicies(EditPart editPart) {
+ editPart.installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/provider/BlockDefinitionDiagramViewProvider.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/provider/BlockDefinitionDiagramViewProvider.java
new file mode 100755
index 0000000..f0c7462
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/provider/BlockDefinitionDiagramViewProvider.java
@@ -0,0 +1,44 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.provider;
+
+import static org.eclipse.papyrus.infra.core.Activator.log;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.gmf.runtime.diagram.core.providers.AbstractViewProvider;
+import org.eclipse.gmf.runtime.diagram.core.services.view.CreateDiagramViewOperation;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.factory.BlockDefinitionDiagramViewFactory;
+
+public class BlockDefinitionDiagramViewProvider extends AbstractViewProvider {
+
+ @Override
+ protected boolean provides(CreateDiagramViewOperation operation) {
+
+ if (ElementTypes.DIAGRAM_ID.equals(operation.getSemanticHint())) {
+ return true;
+ }
+
+ return false;
+ }
+
+ @Override
+ protected Class<?> getDiagramViewClass(IAdaptable semanticAdapter, String diagramKind) {
+ if (ElementTypes.DIAGRAM_ID.equals(diagramKind)) {
+ return BlockDefinitionDiagramViewFactory.class;
+ }
+
+ log.error(new Exception("Could not create View."));
+ return null;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/provider/CustomEditPartProvider.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/provider/CustomEditPartProvider.java
new file mode 100755
index 0000000..b681046
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/provider/CustomEditPartProvider.java
@@ -0,0 +1,202 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.provider;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.gmf.runtime.common.core.service.IOperation;
+import org.eclipse.gmf.runtime.diagram.ui.services.editpart.CreateGraphicEditPartOperation;
+import org.eclipse.gmf.runtime.diagram.ui.services.editpart.IEditPartOperation;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.gmf.diagram.common.provider.CustomAbstractEditPartProvider;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.AssociationEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.BlockConstraintCompartmentEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.BlockEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.BlockLabelNameEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.BlockPropertyCompartmentEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.ConstraintBlockEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.ConstraintBlockLabelNameEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.ConstraintPropertyChildLabelEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.DimensionEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.DimensionLabelNameEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.FlowPortAffixedLabelNameEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.FlowPortAffixedNodeEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.FlowPortChildLabelEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.FlowPortCompartmentEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.FlowPropertyChildLabelEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.FlowPropertyCompartmentEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.FlowSpecificationEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.FlowSpecificationLabelNameEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.ParameterCompartmentEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.PartPropertyCompartmentEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.ReferencePropertyCompartmentEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.UnitEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.UnitLabelNameEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.ValuePropertyCompartmentEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.ValueTypeEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.ValueTypeLabelNameEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.ActorEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.AppliedStereotypeAffixedLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.AppliedStereotypeLinkLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.AssociationLinkLabelSourceMultiplicityEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.AssociationLinkLabelSourceRoleEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.AssociationLinkLabelTargetMultiplicityEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.AssociationLinkLabelTargetRoleEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.DataTypeEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.DefaultChildLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.DependencyEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.EnumerationEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.EnumerationLiteralCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.GeneralizationEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.InterfaceEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.InterfaceRealizationEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.NamedElementAffixedLabelNameEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.NamedElementLinkLabelNameEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.NamedElementNodeLabelNameEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.OperationCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.PortAffixedLabelNameEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.PortAffixedNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.PortCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.PrimitiveTypeEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.PropertyCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.SignalEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.UsageEditPart;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+
+public class CustomEditPartProvider extends CustomAbstractEditPartProvider {
+
+ /** Map containing node view types supported by this provider */
+ protected Map<String, Class<?>> nodeMap = new HashMap<String, Class<?>>();
+
+ /** Map containing edge view types supported by this provider */
+ protected Map<String, Class<?>> edgeMap = new HashMap<String, Class<?>>();
+
+ /** Default constructor */
+ public CustomEditPartProvider() {
+ super();
+
+ diagramType = ElementTypes.DIAGRAM_ID;
+
+ // Nodes
+ nodeMap.put(SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_CLASSIFIER_ID, BlockEditPart.class);
+ nodeMap.put(SysMLGraphicalTypes.SHAPE_SYSML_CONSTRAINTBLOCK_AS_CLASSIFIER_ID, ConstraintBlockEditPart.class);
+ nodeMap.put(SysMLGraphicalTypes.SHAPE_SYSML_CONSTRAINTPROPERTY_AS_LABEL_ID, ConstraintPropertyChildLabelEditPart.class);
+ nodeMap.put(SysMLGraphicalTypes.SHAPE_SYSML_DIMENSION_AS_CLASSIFIER_ID, DimensionEditPart.class);
+ nodeMap.put(SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID, FlowPortAffixedNodeEditPart.class);
+ nodeMap.put(SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_LABEL_ID, FlowPortChildLabelEditPart.class);
+ nodeMap.put(SysMLGraphicalTypes.SHAPE_SYSML_FLOWPROPERTY_AS_LABEL_ID, FlowPropertyChildLabelEditPart.class);
+ nodeMap.put(SysMLGraphicalTypes.SHAPE_SYSML_FLOWSPECIFICATION_AS_CLASSIFIER_ID, FlowSpecificationEditPart.class);
+ nodeMap.put(SysMLGraphicalTypes.SHAPE_SYSML_PART_AS_LABEL_ID, DefaultChildLabelEditPart.class);
+ nodeMap.put(SysMLGraphicalTypes.SHAPE_SYSML_REFERENCE_AS_LABEL_ID, DefaultChildLabelEditPart.class);
+ nodeMap.put(SysMLGraphicalTypes.SHAPE_SYSML_UNIT_AS_CLASSIFIER_ID, UnitEditPart.class);
+ nodeMap.put(SysMLGraphicalTypes.SHAPE_SYSML_VALUETYPE_AS_CLASSIFIER_ID, ValueTypeEditPart.class);
+ nodeMap.put(SysMLGraphicalTypes.SHAPE_SYSML_VALUE_AS_LABEL_ID, DefaultChildLabelEditPart.class);
+ nodeMap.put(UMLGraphicalTypes.SHAPE_UML_ACTOR_AS_CLASSIFIER_ID, ActorEditPart.class);
+ nodeMap.put(UMLGraphicalTypes.SHAPE_UML_CONSTRAINT_AS_LABEL_ID, DefaultChildLabelEditPart.class);
+ nodeMap.put(UMLGraphicalTypes.SHAPE_UML_DATATYPE_AS_CLASSIFIER_ID, DataTypeEditPart.class);
+ nodeMap.put(UMLGraphicalTypes.SHAPE_UML_ENUMERATIONLITERAL_AS_LABEL_ID, DefaultChildLabelEditPart.class);
+ nodeMap.put(UMLGraphicalTypes.SHAPE_UML_ENUMERATION_AS_CLASSIFIER_ID, EnumerationEditPart.class);
+ nodeMap.put(UMLGraphicalTypes.SHAPE_UML_INTERFACE_AS_CLASSIFIER_ID, InterfaceEditPart.class);
+ nodeMap.put(UMLGraphicalTypes.SHAPE_UML_OPERATION_AS_LABEL_ID, DefaultChildLabelEditPart.class);
+ nodeMap.put(UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID, PortAffixedNodeEditPart.class);
+ nodeMap.put(UMLGraphicalTypes.SHAPE_UML_PORT_AS_LABEL_ID, DefaultChildLabelEditPart.class);
+ nodeMap.put(UMLGraphicalTypes.SHAPE_UML_PRIMITIVETYPE_AS_CLASSIFIER_ID, PrimitiveTypeEditPart.class);
+ nodeMap.put(UMLGraphicalTypes.SHAPE_UML_PROPERTY_AS_LABEL_ID, DefaultChildLabelEditPart.class);
+ nodeMap.put(UMLGraphicalTypes.SHAPE_UML_RECEPTION_AS_LABEL_ID, DefaultChildLabelEditPart.class);
+ nodeMap.put(UMLGraphicalTypes.SHAPE_UML_SIGNAL_AS_CLASSIFIER_ID, SignalEditPart.class);
+
+ // Decorations
+ nodeMap.put(SysMLGraphicalTypes.AFFIXEDLABEL_SYSML_FLOWPORT_LABEL_ID, FlowPortAffixedLabelNameEditPart.class);
+ nodeMap.put(SysMLGraphicalTypes.COMPARTMENT_SYSML_CONSTRAINT_AS_LIST_ID, BlockConstraintCompartmentEditPart.class);
+ nodeMap.put(SysMLGraphicalTypes.COMPARTMENT_SYSML_FLOWPORT_AS_LIST_ID, FlowPortCompartmentEditPart.class);
+ nodeMap.put(SysMLGraphicalTypes.COMPARTMENT_SYSML_FLOWPROPERTY_AS_LIST_ID, FlowPropertyCompartmentEditPart.class);
+ nodeMap.put(SysMLGraphicalTypes.COMPARTMENT_SYSML_PARAMETER_AS_LIST_ID, ParameterCompartmentEditPart.class);
+ nodeMap.put(SysMLGraphicalTypes.COMPARTMENT_SYSML_PART_AS_LIST_ID, PartPropertyCompartmentEditPart.class);
+ nodeMap.put(SysMLGraphicalTypes.COMPARTMENT_SYSML_PROPERTY_AS_LIST_ID, BlockPropertyCompartmentEditPart.class);
+ nodeMap.put(SysMLGraphicalTypes.COMPARTMENT_SYSML_REFERENCE_AS_LIST_ID, ReferencePropertyCompartmentEditPart.class);
+ nodeMap.put(SysMLGraphicalTypes.COMPARTMENT_SYSML_VALUE_AS_LIST_ID, ValuePropertyCompartmentEditPart.class);
+ nodeMap.put(SysMLGraphicalTypes.LABEL_SYSML_BLOCK_NAME_ID, BlockLabelNameEditPart.class);
+ nodeMap.put(SysMLGraphicalTypes.LABEL_SYSML_CONSTRAINTBLOCK_NAME_ID, ConstraintBlockLabelNameEditPart.class);
+ nodeMap.put(SysMLGraphicalTypes.LABEL_SYSML_DIMENSION_NAME_ID, DimensionLabelNameEditPart.class);
+ nodeMap.put(SysMLGraphicalTypes.LABEL_SYSML_FLOWSPECIFICATION_NAME_ID, FlowSpecificationLabelNameEditPart.class);
+ nodeMap.put(SysMLGraphicalTypes.LABEL_SYSML_UNIT_NAME_ID, UnitLabelNameEditPart.class);
+ nodeMap.put(SysMLGraphicalTypes.LABEL_SYSML_VALUETYPE_NAME_ID, ValueTypeLabelNameEditPart.class);
+ nodeMap.put(UMLGraphicalTypes.AFFIXEDLABEL_UML_APPLIEDSTEREOTYPE_ID, AppliedStereotypeAffixedLabelEditPart.class);
+ nodeMap.put(UMLGraphicalTypes.AFFIXEDLABEL_UML_NAMEDELEMENT_NAME_ID, NamedElementAffixedLabelNameEditPart.class);
+ nodeMap.put(UMLGraphicalTypes.AFFIXEDLABEL_UML_PORT_LABEL_ID, PortAffixedLabelNameEditPart.class);
+ nodeMap.put(UMLGraphicalTypes.COMPARTMENT_UML_ENUMERATIONLITERAL_AS_LIST_ID, EnumerationLiteralCompartmentEditPart.class);
+ nodeMap.put(UMLGraphicalTypes.COMPARTMENT_UML_OPERATION_AS_LIST_ID, OperationCompartmentEditPart.class);
+ nodeMap.put(UMLGraphicalTypes.COMPARTMENT_UML_PORT_AS_LIST_ID, PortCompartmentEditPart.class);
+ nodeMap.put(UMLGraphicalTypes.COMPARTMENT_UML_PROPERTY_AS_LIST_ID, PropertyCompartmentEditPart.class);
+ nodeMap.put(UMLGraphicalTypes.LABEL_UML_NAMEDELEMENT_NAME_ID, NamedElementNodeLabelNameEditPart.class);
+ nodeMap.put(UMLGraphicalTypes.LINKLABEL_UML_APPLIEDSTEREOTYPE_ID, AppliedStereotypeLinkLabelEditPart.class);
+ nodeMap.put(UMLGraphicalTypes.LINKLABEL_UML_ASSOCIATION_SOURCE_MULTIPLICITY_ID, AssociationLinkLabelSourceMultiplicityEditPart.class);
+ nodeMap.put(UMLGraphicalTypes.LINKLABEL_UML_ASSOCIATION_SOURCE_ROLE_ID, AssociationLinkLabelSourceRoleEditPart.class);
+ nodeMap.put(UMLGraphicalTypes.LINKLABEL_UML_ASSOCIATION_TARGET_MULTIPLICITY_ID, AssociationLinkLabelTargetMultiplicityEditPart.class);
+ nodeMap.put(UMLGraphicalTypes.LINKLABEL_UML_ASSOCIATION_TARGET_ROLE_ID, AssociationLinkLabelTargetRoleEditPart.class);
+ nodeMap.put(UMLGraphicalTypes.LINKLABEL_UML_NAMEDELEMENT_NAME_ID, NamedElementLinkLabelNameEditPart.class);
+
+ // Edges
+ edgeMap.put(SysMLGraphicalTypes.LINK_SYSML_ASSOCIATION_ID, AssociationEditPart.class);
+ edgeMap.put(UMLGraphicalTypes.LINK_UML_DEPENDENCY_ID, DependencyEditPart.class);
+ edgeMap.put(UMLGraphicalTypes.LINK_UML_GENERALIZATION_ID, GeneralizationEditPart.class);
+ edgeMap.put(UMLGraphicalTypes.LINK_UML_INTERFACEREALIZATION_ID, InterfaceRealizationEditPart.class);
+ edgeMap.put(UMLGraphicalTypes.LINK_UML_USAGE_ID, UsageEditPart.class);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean provides(IOperation operation) {
+ if (operation instanceof CreateGraphicEditPartOperation) {
+ View newView = ((IEditPartOperation) operation).getView();
+ if (newView == null) {
+ return false;
+ }
+
+ String graphicalType = newView.getType();
+
+ if ((newView instanceof Node) && (!nodeMap.containsKey(graphicalType))) {
+ return false;
+ }
+
+ if ((newView instanceof Edge) && (!edgeMap.containsKey(graphicalType))) {
+ return false;
+ }
+ }
+
+ return super.provides(operation);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Class<?> getNodeEditPartClass(View view) {
+ return nodeMap.get(view.getType());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Class<?> getEdgeEditPartClass(View view) {
+ return edgeMap.get(view.getType());
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/provider/CustomGraphicalTypeRegistry.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/provider/CustomGraphicalTypeRegistry.java
new file mode 100755
index 0000000..060bd06
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/provider/CustomGraphicalTypeRegistry.java
@@ -0,0 +1,862 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.provider;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.emf.type.core.ISpecializationType;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+
+public class CustomGraphicalTypeRegistry extends GraphicalTypeRegistry {
+
+ /** Default constructor */
+ public CustomGraphicalTypeRegistry() {
+
+ super();
+
+ // Nodes
+ knownNodes.add(SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_CLASSIFIER_ID);
+ knownNodes.add(SysMLGraphicalTypes.SHAPE_SYSML_CONSTRAINTBLOCK_AS_CLASSIFIER_ID);
+ knownNodes.add(SysMLGraphicalTypes.SHAPE_SYSML_CONSTRAINTPROPERTY_AS_LABEL_ID);
+ knownNodes.add(SysMLGraphicalTypes.SHAPE_SYSML_DIMENSION_AS_CLASSIFIER_ID);
+ knownNodes.add(SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID);
+ knownNodes.add(SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_LABEL_ID);
+ knownNodes.add(SysMLGraphicalTypes.SHAPE_SYSML_FLOWPROPERTY_AS_LABEL_ID);
+ knownNodes.add(SysMLGraphicalTypes.SHAPE_SYSML_FLOWSPECIFICATION_AS_CLASSIFIER_ID);
+ knownNodes.add(SysMLGraphicalTypes.SHAPE_SYSML_PART_AS_LABEL_ID);
+ knownNodes.add(SysMLGraphicalTypes.SHAPE_SYSML_REFERENCE_AS_LABEL_ID);
+ knownNodes.add(SysMLGraphicalTypes.SHAPE_SYSML_UNIT_AS_CLASSIFIER_ID);
+ knownNodes.add(SysMLGraphicalTypes.SHAPE_SYSML_VALUETYPE_AS_CLASSIFIER_ID);
+ knownNodes.add(SysMLGraphicalTypes.SHAPE_SYSML_VALUE_AS_LABEL_ID);
+ knownNodes.add(UMLGraphicalTypes.SHAPE_UML_ACTOR_AS_CLASSIFIER_ID);
+ knownNodes.add(UMLGraphicalTypes.SHAPE_UML_CONSTRAINT_AS_LABEL_ID);
+ knownNodes.add(UMLGraphicalTypes.SHAPE_UML_DATATYPE_AS_CLASSIFIER_ID);
+ knownNodes.add(UMLGraphicalTypes.SHAPE_UML_ENUMERATIONLITERAL_AS_LABEL_ID);
+ knownNodes.add(UMLGraphicalTypes.SHAPE_UML_ENUMERATION_AS_CLASSIFIER_ID);
+ knownNodes.add(UMLGraphicalTypes.SHAPE_UML_INTERFACE_AS_CLASSIFIER_ID);
+ knownNodes.add(UMLGraphicalTypes.SHAPE_UML_OPERATION_AS_LABEL_ID);
+ knownNodes.add(UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID);
+ knownNodes.add(UMLGraphicalTypes.SHAPE_UML_PORT_AS_LABEL_ID);
+ knownNodes.add(UMLGraphicalTypes.SHAPE_UML_PRIMITIVETYPE_AS_CLASSIFIER_ID);
+ knownNodes.add(UMLGraphicalTypes.SHAPE_UML_PROPERTY_AS_LABEL_ID);
+ knownNodes.add(UMLGraphicalTypes.SHAPE_UML_RECEPTION_AS_LABEL_ID);
+ knownNodes.add(UMLGraphicalTypes.SHAPE_UML_SIGNAL_AS_CLASSIFIER_ID);
+ // Decorations
+ knownNodes.add(SysMLGraphicalTypes.AFFIXEDLABEL_SYSML_FLOWPORT_LABEL_ID);
+ knownNodes.add(SysMLGraphicalTypes.COMPARTMENT_SYSML_CONSTRAINT_AS_LIST_ID);
+ knownNodes.add(SysMLGraphicalTypes.COMPARTMENT_SYSML_FLOWPORT_AS_LIST_ID);
+ knownNodes.add(SysMLGraphicalTypes.COMPARTMENT_SYSML_FLOWPROPERTY_AS_LIST_ID);
+ knownNodes.add(SysMLGraphicalTypes.COMPARTMENT_SYSML_PARAMETER_AS_LIST_ID);
+ knownNodes.add(SysMLGraphicalTypes.COMPARTMENT_SYSML_PART_AS_LIST_ID);
+ knownNodes.add(SysMLGraphicalTypes.COMPARTMENT_SYSML_PROPERTY_AS_LIST_ID);
+ knownNodes.add(SysMLGraphicalTypes.COMPARTMENT_SYSML_REFERENCE_AS_LIST_ID);
+ knownNodes.add(SysMLGraphicalTypes.COMPARTMENT_SYSML_VALUE_AS_LIST_ID);
+ knownNodes.add(SysMLGraphicalTypes.LABEL_SYSML_BLOCK_NAME_ID);
+ knownNodes.add(SysMLGraphicalTypes.LABEL_SYSML_CONSTRAINTBLOCK_NAME_ID);
+ knownNodes.add(SysMLGraphicalTypes.LABEL_SYSML_DIMENSION_NAME_ID);
+ knownNodes.add(SysMLGraphicalTypes.LABEL_SYSML_FLOWSPECIFICATION_NAME_ID);
+ knownNodes.add(SysMLGraphicalTypes.LABEL_SYSML_UNIT_NAME_ID);
+ knownNodes.add(SysMLGraphicalTypes.LABEL_SYSML_VALUETYPE_NAME_ID);
+ knownNodes.add(UMLGraphicalTypes.AFFIXEDLABEL_UML_APPLIEDSTEREOTYPE_ID);
+ knownNodes.add(UMLGraphicalTypes.AFFIXEDLABEL_UML_NAMEDELEMENT_NAME_ID);
+ knownNodes.add(UMLGraphicalTypes.AFFIXEDLABEL_UML_PORT_LABEL_ID);
+ knownNodes.add(UMLGraphicalTypes.COMPARTMENT_UML_ENUMERATIONLITERAL_AS_LIST_ID);
+ knownNodes.add(UMLGraphicalTypes.COMPARTMENT_UML_OPERATION_AS_LIST_ID);
+ knownNodes.add(UMLGraphicalTypes.COMPARTMENT_UML_PORT_AS_LIST_ID);
+ knownNodes.add(UMLGraphicalTypes.COMPARTMENT_UML_PROPERTY_AS_LIST_ID);
+ knownNodes.add(UMLGraphicalTypes.LABEL_UML_NAMEDELEMENT_NAME_ID);
+ knownNodes.add(UMLGraphicalTypes.LINKLABEL_UML_APPLIEDSTEREOTYPE_ID);
+ knownNodes.add(UMLGraphicalTypes.LINKLABEL_UML_ASSOCIATION_SOURCE_MULTIPLICITY_ID);
+ knownNodes.add(UMLGraphicalTypes.LINKLABEL_UML_ASSOCIATION_SOURCE_ROLE_ID);
+ knownNodes.add(UMLGraphicalTypes.LINKLABEL_UML_ASSOCIATION_TARGET_MULTIPLICITY_ID);
+ knownNodes.add(UMLGraphicalTypes.LINKLABEL_UML_ASSOCIATION_TARGET_ROLE_ID);
+ knownNodes.add(UMLGraphicalTypes.LINKLABEL_UML_NAMEDELEMENT_NAME_ID);
+
+ // Edges
+ knownEdges.add(SysMLGraphicalTypes.LINK_SYSML_ASSOCIATION_ID);
+ knownEdges.add(UMLGraphicalTypes.LINK_UML_DEPENDENCY_ID);
+ knownEdges.add(UMLGraphicalTypes.LINK_UML_GENERALIZATION_ID);
+ knownEdges.add(UMLGraphicalTypes.LINK_UML_INTERFACEREALIZATION_ID);
+ knownEdges.add(UMLGraphicalTypes.LINK_UML_USAGE_ID);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getNodeGraphicalType(EObject domainElement, String containerType) {
+ // Start of user code getNodeGraphicalType(EObject domainElement, String containerType)
+
+ // For legacy reuse of Class Diagram Constraint in BDD (DnD especially)
+ if (UMLElementTypes.CONSTRAINT.getEClass().isInstance(domainElement)) {
+
+ if (ElementTypes.DIAGRAM_ID.equals(containerType)) {
+ return super.getNodeGraphicalType(domainElement, containerType);
+ }
+
+ if (ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType) || ElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return super.getNodeGraphicalType(domainElement, containerType);
+ }
+
+ if (ElementTypes.MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType) || ElementTypes.MODEL_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return super.getNodeGraphicalType(domainElement, containerType);
+ }
+
+ // else : managed below...
+ }
+
+ // End of user code
+
+ if (UMLElementTypes.CONSTRAINT.getEClass().isInstance(domainElement)) {
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_CONSTRAINT_AS_LIST_ID.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_CONSTRAINT_AS_LABEL_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+ if (UMLElementTypes.ENUMERATION_LITERAL.getEClass().isInstance(domainElement)) {
+ if (UMLGraphicalTypes.COMPARTMENT_UML_ENUMERATIONLITERAL_AS_LIST_ID.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_ENUMERATIONLITERAL_AS_LABEL_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+ if (UMLElementTypes.OPERATION.getEClass().isInstance(domainElement)) {
+ if (UMLGraphicalTypes.COMPARTMENT_UML_OPERATION_AS_LIST_ID.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_OPERATION_AS_LABEL_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+ if (((ISpecializationType) SysMLElementTypes.FLOW_PORT).getMatcher().matches(domainElement)) {
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_FLOWPORT_AS_LIST_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_LABEL_ID;
+ }
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_PROPERTY_AS_LIST_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_LABEL_ID;
+ }
+ if (SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_CLASSIFIER_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+ if (UMLElementTypes.PORT.getEClass().isInstance(domainElement)) {
+ if (UMLGraphicalTypes.COMPARTMENT_UML_PROPERTY_AS_LIST_ID.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_PORT_AS_LABEL_ID;
+ }
+ if (UMLGraphicalTypes.COMPARTMENT_UML_PORT_AS_LIST_ID.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_PORT_AS_LABEL_ID;
+ }
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_PROPERTY_AS_LIST_ID.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_PORT_AS_LABEL_ID;
+ }
+ if (SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_CLASSIFIER_ID.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+ if (((ISpecializationType) SysMLElementTypes.CONSTRAINT_PROPERTY).getMatcher().matches(domainElement)) {
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_CONSTRAINT_AS_LIST_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_CONSTRAINTPROPERTY_AS_LABEL_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+ if (((ISpecializationType) SysMLElementTypes.FLOW_PROPERTY).getMatcher().matches(domainElement)) {
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_FLOWPROPERTY_AS_LIST_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_FLOWPROPERTY_AS_LABEL_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+ if (((ISpecializationType) SysMLElementTypes.PART_PROPERTY).getMatcher().matches(domainElement)) {
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_PROPERTY_AS_LIST_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_PART_AS_LABEL_ID;
+ }
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_PART_AS_LIST_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_PART_AS_LABEL_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+ if (((ISpecializationType) SysMLElementTypes.REFERENCE_PROPERTY).getMatcher().matches(domainElement)) {
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_PROPERTY_AS_LIST_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_REFERENCE_AS_LABEL_ID;
+ }
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_REFERENCE_AS_LIST_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_REFERENCE_AS_LABEL_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+ if (((ISpecializationType) SysMLElementTypes.VALUE_PROPERTY).getMatcher().matches(domainElement)) {
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_PROPERTY_AS_LIST_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_VALUE_AS_LABEL_ID;
+ }
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_VALUE_AS_LIST_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_VALUE_AS_LABEL_ID;
+ }
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_PARAMETER_AS_LIST_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_VALUE_AS_LABEL_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+ if (((ISpecializationType) SysMLElementTypes.ACTOR_PART_PROPERTY).getMatcher().matches(domainElement)) {
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_PROPERTY_AS_LIST_ID.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_PROPERTY_AS_LABEL_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+ if (UMLElementTypes.PROPERTY.getEClass().isInstance(domainElement)) {
+ if (UMLGraphicalTypes.COMPARTMENT_UML_PROPERTY_AS_LIST_ID.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_PROPERTY_AS_LABEL_ID;
+ }
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_PARAMETER_AS_LIST_ID.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_PROPERTY_AS_LABEL_ID;
+ }
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_PROPERTY_AS_LIST_ID.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_PROPERTY_AS_LABEL_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+ if (UMLElementTypes.RECEPTION.getEClass().isInstance(domainElement)) {
+ if (UMLGraphicalTypes.COMPARTMENT_UML_OPERATION_AS_LIST_ID.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_RECEPTION_AS_LABEL_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+ if (UMLElementTypes.ACTOR.getEClass().isInstance(domainElement)) {
+ if (ElementTypes.DIAGRAM_ID.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_ACTOR_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_ACTOR_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_ACTOR_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_ACTOR_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.MODEL_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_ACTOR_AS_CLASSIFIER_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+ if (UMLElementTypes.ENUMERATION.getEClass().isInstance(domainElement)) {
+ if (ElementTypes.DIAGRAM_ID.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_ENUMERATION_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_ENUMERATION_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_ENUMERATION_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_ENUMERATION_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.MODEL_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_ENUMERATION_AS_CLASSIFIER_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+ if (UMLElementTypes.PRIMITIVE_TYPE.getEClass().isInstance(domainElement)) {
+ if (ElementTypes.DIAGRAM_ID.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_PRIMITIVETYPE_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_PRIMITIVETYPE_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_PRIMITIVETYPE_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_PRIMITIVETYPE_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.MODEL_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_PRIMITIVETYPE_AS_CLASSIFIER_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+ if (((ISpecializationType) SysMLElementTypes.VALUE_TYPE).getMatcher().matches(domainElement)) {
+ if (ElementTypes.DIAGRAM_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_VALUETYPE_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_VALUETYPE_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_VALUETYPE_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_VALUETYPE_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.MODEL_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_VALUETYPE_AS_CLASSIFIER_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+ if (UMLElementTypes.DATA_TYPE.getEClass().isInstance(domainElement)) {
+ if (ElementTypes.DIAGRAM_ID.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_DATATYPE_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_DATATYPE_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_DATATYPE_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_DATATYPE_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.MODEL_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_DATATYPE_AS_CLASSIFIER_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+ if (((ISpecializationType) SysMLElementTypes.FLOW_SPECIFICATION).getMatcher().matches(domainElement)) {
+ if (ElementTypes.DIAGRAM_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_FLOWSPECIFICATION_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_FLOWSPECIFICATION_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_FLOWSPECIFICATION_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_FLOWSPECIFICATION_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.MODEL_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_FLOWSPECIFICATION_AS_CLASSIFIER_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+ if (UMLElementTypes.INTERFACE.getEClass().isInstance(domainElement)) {
+ if (ElementTypes.DIAGRAM_ID.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_INTERFACE_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_INTERFACE_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_INTERFACE_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_INTERFACE_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.MODEL_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_INTERFACE_AS_CLASSIFIER_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+ if (UMLElementTypes.SIGNAL.getEClass().isInstance(domainElement)) {
+ if (ElementTypes.DIAGRAM_ID.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_SIGNAL_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_SIGNAL_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_SIGNAL_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_SIGNAL_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.MODEL_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_SIGNAL_AS_CLASSIFIER_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+ if (((ISpecializationType) SysMLElementTypes.CONSTRAINT_BLOCK).getMatcher().matches(domainElement)) {
+ if (ElementTypes.DIAGRAM_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_CONSTRAINTBLOCK_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_CONSTRAINTBLOCK_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_CONSTRAINTBLOCK_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_CONSTRAINTBLOCK_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.MODEL_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_CONSTRAINTBLOCK_AS_CLASSIFIER_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+ if (((ISpecializationType) SysMLElementTypes.BLOCK).getMatcher().matches(domainElement)) {
+ if (ElementTypes.DIAGRAM_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.MODEL_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_CLASSIFIER_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+ if (((ISpecializationType) SysMLElementTypes.DIMENSION).getMatcher().matches(domainElement)) {
+ if (ElementTypes.DIAGRAM_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_DIMENSION_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_DIMENSION_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_DIMENSION_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_DIMENSION_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.MODEL_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_DIMENSION_AS_CLASSIFIER_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+ if (((ISpecializationType) SysMLElementTypes.UNIT).getMatcher().matches(domainElement)) {
+ if (ElementTypes.DIAGRAM_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_UNIT_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_UNIT_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_UNIT_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_UNIT_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.MODEL_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_UNIT_AS_CLASSIFIER_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+ return super.getNodeGraphicalType(domainElement, containerType);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getNodeGraphicalType(String proposedType, String containerType) {
+ // Start of user code getNodeGraphicalType(String proposedType, String containerType)
+ // End of user code
+
+ if (UMLElementTypes.CONSTRAINT.getSemanticHint().equals(proposedType)) {
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_CONSTRAINT_AS_LIST_ID.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_CONSTRAINT_AS_LABEL_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+ if (UMLElementTypes.ENUMERATION_LITERAL.getSemanticHint().equals(proposedType)) {
+ if (UMLGraphicalTypes.COMPARTMENT_UML_ENUMERATIONLITERAL_AS_LIST_ID.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_ENUMERATIONLITERAL_AS_LABEL_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+ if (UMLElementTypes.OPERATION.getSemanticHint().equals(proposedType)) {
+ if (UMLGraphicalTypes.COMPARTMENT_UML_OPERATION_AS_LIST_ID.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_OPERATION_AS_LABEL_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+ if (SysMLElementTypes.FLOW_PORT.getSemanticHint().equals(proposedType)) {
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_FLOWPORT_AS_LIST_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_LABEL_ID;
+ }
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_PROPERTY_AS_LIST_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_LABEL_ID;
+ }
+ if (SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_CLASSIFIER_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+ if (UMLElementTypes.PORT.getSemanticHint().equals(proposedType)) {
+ if (UMLGraphicalTypes.COMPARTMENT_UML_PROPERTY_AS_LIST_ID.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_PORT_AS_LABEL_ID;
+ }
+ if (UMLGraphicalTypes.COMPARTMENT_UML_PORT_AS_LIST_ID.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_PORT_AS_LABEL_ID;
+ }
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_PROPERTY_AS_LIST_ID.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_PORT_AS_LABEL_ID;
+ }
+ if (SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_CLASSIFIER_ID.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+ if (SysMLElementTypes.CONSTRAINT_PROPERTY.getSemanticHint().equals(proposedType)) {
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_CONSTRAINT_AS_LIST_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_CONSTRAINTPROPERTY_AS_LABEL_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+ if (SysMLElementTypes.FLOW_PROPERTY.getSemanticHint().equals(proposedType)) {
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_FLOWPROPERTY_AS_LIST_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_FLOWPROPERTY_AS_LABEL_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+ if (SysMLElementTypes.PART_PROPERTY.getSemanticHint().equals(proposedType)) {
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_PROPERTY_AS_LIST_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_PART_AS_LABEL_ID;
+ }
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_PART_AS_LIST_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_PART_AS_LABEL_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+ if (SysMLElementTypes.REFERENCE_PROPERTY.getSemanticHint().equals(proposedType)) {
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_PROPERTY_AS_LIST_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_REFERENCE_AS_LABEL_ID;
+ }
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_REFERENCE_AS_LIST_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_REFERENCE_AS_LABEL_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+ if (SysMLElementTypes.VALUE_PROPERTY.getSemanticHint().equals(proposedType)) {
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_PROPERTY_AS_LIST_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_VALUE_AS_LABEL_ID;
+ }
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_VALUE_AS_LIST_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_VALUE_AS_LABEL_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+ if (SysMLElementTypes.ACTOR_PART_PROPERTY.getSemanticHint().equals(proposedType)) {
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_PROPERTY_AS_LIST_ID.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_PROPERTY_AS_LABEL_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+ if (UMLElementTypes.PROPERTY.getSemanticHint().equals(proposedType)) {
+ if (UMLGraphicalTypes.COMPARTMENT_UML_PROPERTY_AS_LIST_ID.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_PROPERTY_AS_LABEL_ID;
+ }
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_PARAMETER_AS_LIST_ID.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_PROPERTY_AS_LABEL_ID;
+ }
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_PROPERTY_AS_LIST_ID.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_PROPERTY_AS_LABEL_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+ if (UMLElementTypes.RECEPTION.getSemanticHint().equals(proposedType)) {
+ if (UMLGraphicalTypes.COMPARTMENT_UML_OPERATION_AS_LIST_ID.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_RECEPTION_AS_LABEL_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+ if (UMLElementTypes.ACTOR.getSemanticHint().equals(proposedType)) {
+ if (ElementTypes.DIAGRAM_ID.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_ACTOR_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_ACTOR_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_ACTOR_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_ACTOR_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.MODEL_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_ACTOR_AS_CLASSIFIER_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+ if (UMLElementTypes.ENUMERATION.getSemanticHint().equals(proposedType)) {
+ if (ElementTypes.DIAGRAM_ID.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_ENUMERATION_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_ENUMERATION_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_ENUMERATION_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_ENUMERATION_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.MODEL_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_ENUMERATION_AS_CLASSIFIER_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+ if (UMLElementTypes.PRIMITIVE_TYPE.getSemanticHint().equals(proposedType)) {
+ if (ElementTypes.DIAGRAM_ID.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_PRIMITIVETYPE_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_PRIMITIVETYPE_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_PRIMITIVETYPE_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_PRIMITIVETYPE_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.MODEL_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_PRIMITIVETYPE_AS_CLASSIFIER_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+ if (SysMLElementTypes.VALUE_TYPE.getSemanticHint().equals(proposedType)) {
+ if (ElementTypes.DIAGRAM_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_VALUETYPE_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_VALUETYPE_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_VALUETYPE_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_VALUETYPE_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.MODEL_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_VALUETYPE_AS_CLASSIFIER_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+ if (UMLElementTypes.DATA_TYPE.getSemanticHint().equals(proposedType)) {
+ if (ElementTypes.DIAGRAM_ID.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_DATATYPE_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_DATATYPE_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_DATATYPE_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_DATATYPE_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.MODEL_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_DATATYPE_AS_CLASSIFIER_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+ if (SysMLElementTypes.FLOW_SPECIFICATION.getSemanticHint().equals(proposedType)) {
+ if (ElementTypes.DIAGRAM_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_FLOWSPECIFICATION_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_FLOWSPECIFICATION_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_FLOWSPECIFICATION_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_FLOWSPECIFICATION_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.MODEL_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_FLOWSPECIFICATION_AS_CLASSIFIER_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+ if (UMLElementTypes.INTERFACE.getSemanticHint().equals(proposedType)) {
+ if (ElementTypes.DIAGRAM_ID.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_INTERFACE_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_INTERFACE_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_INTERFACE_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_INTERFACE_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.MODEL_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_INTERFACE_AS_CLASSIFIER_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+ if (UMLElementTypes.SIGNAL.getSemanticHint().equals(proposedType)) {
+ if (ElementTypes.DIAGRAM_ID.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_SIGNAL_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_SIGNAL_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_SIGNAL_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_SIGNAL_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.MODEL_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_SIGNAL_AS_CLASSIFIER_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+ if (SysMLElementTypes.CONSTRAINT_BLOCK.getSemanticHint().equals(proposedType)) {
+ if (ElementTypes.DIAGRAM_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_CONSTRAINTBLOCK_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_CONSTRAINTBLOCK_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_CONSTRAINTBLOCK_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_CONSTRAINTBLOCK_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.MODEL_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_CONSTRAINTBLOCK_AS_CLASSIFIER_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+ if (SysMLElementTypes.BLOCK.getSemanticHint().equals(proposedType)) {
+ if (ElementTypes.DIAGRAM_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.MODEL_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_CLASSIFIER_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+ if (SysMLElementTypes.DIMENSION.getSemanticHint().equals(proposedType)) {
+ if (ElementTypes.DIAGRAM_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_DIMENSION_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_DIMENSION_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_DIMENSION_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_DIMENSION_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.MODEL_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_DIMENSION_AS_CLASSIFIER_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+ if (SysMLElementTypes.UNIT.getSemanticHint().equals(proposedType)) {
+ if (ElementTypes.DIAGRAM_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_UNIT_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_UNIT_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_UNIT_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_UNIT_AS_CLASSIFIER_ID;
+ }
+ if (ElementTypes.MODEL_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_UNIT_AS_CLASSIFIER_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+ return super.getNodeGraphicalType(proposedType, containerType);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getEdgeGraphicalType(EObject domainElement) {
+ // Start of user code getEdgeGraphicalType(EObject domainElement)
+
+ // End of user code
+
+ if (((ISpecializationType) SysMLElementTypes.ASSOCIATION).getMatcher().matches(domainElement)) {
+ return SysMLGraphicalTypes.LINK_SYSML_ASSOCIATION_ID;
+ }
+ if (UMLElementTypes.USAGE.getEClass().isInstance(domainElement)) {
+ return UMLGraphicalTypes.LINK_UML_USAGE_ID;
+ }
+ if (UMLElementTypes.INTERFACE_REALIZATION.getEClass().isInstance(domainElement)) {
+ return UMLGraphicalTypes.LINK_UML_INTERFACEREALIZATION_ID;
+ }
+ if (UMLElementTypes.DEPENDENCY.getEClass().isInstance(domainElement)) {
+ return UMLGraphicalTypes.LINK_UML_DEPENDENCY_ID;
+ }
+ if (UMLElementTypes.GENERALIZATION.getEClass().isInstance(domainElement)) {
+ return UMLGraphicalTypes.LINK_UML_GENERALIZATION_ID;
+ }
+ if (UMLElementTypes.INSTANCE_SPECIFICATION.getEClass().isInstance(domainElement)) {
+ return ElementTypes.INSTANCE_SPECIFICATION_LINK.getSemanticHint();
+ }
+
+ return super.getEdgeGraphicalType(domainElement);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getEdgeGraphicalType(String proposedType) {
+ // Start of user code getEdgeGraphicalType(String proposedType)
+ if (SysMLElementTypes.ASSOCIATION_NONE.getSemanticHint().equals(proposedType)) {
+ return SysMLGraphicalTypes.LINK_SYSML_ASSOCIATION_ID;
+ }
+ if (SysMLElementTypes.ASSOCIATION_NONE_DIRECTED.getSemanticHint().equals(proposedType)) {
+ return SysMLGraphicalTypes.LINK_SYSML_ASSOCIATION_ID;
+ }
+ if (SysMLElementTypes.ASSOCIATION_COMPOSITE.getSemanticHint().equals(proposedType)) {
+ return SysMLGraphicalTypes.LINK_SYSML_ASSOCIATION_ID;
+ }
+ if (SysMLElementTypes.ASSOCIATION_COMPOSITE_DIRECTED.getSemanticHint().equals(proposedType)) {
+ return SysMLGraphicalTypes.LINK_SYSML_ASSOCIATION_ID;
+ }
+ if (SysMLElementTypes.ASSOCIATION_SHARED.getSemanticHint().equals(proposedType)) {
+ return SysMLGraphicalTypes.LINK_SYSML_ASSOCIATION_ID;
+ }
+ if (SysMLElementTypes.ASSOCIATION_SHARED_DIRECTED.getSemanticHint().equals(proposedType)) {
+ return SysMLGraphicalTypes.LINK_SYSML_ASSOCIATION_ID;
+ }
+ // End of user code
+
+ if (SysMLElementTypes.ASSOCIATION.getSemanticHint().equals(proposedType)) {
+ return SysMLGraphicalTypes.LINK_SYSML_ASSOCIATION_ID;
+ }
+ if (UMLElementTypes.USAGE.getSemanticHint().equals(proposedType)) {
+ return UMLGraphicalTypes.LINK_UML_USAGE_ID;
+ }
+ if (UMLElementTypes.INTERFACE_REALIZATION.getSemanticHint().equals(proposedType)) {
+ return UMLGraphicalTypes.LINK_UML_INTERFACEREALIZATION_ID;
+ }
+ if (UMLElementTypes.DEPENDENCY.getSemanticHint().equals(proposedType)) {
+ return UMLGraphicalTypes.LINK_UML_DEPENDENCY_ID;
+ }
+ if (UMLElementTypes.GENERALIZATION.getSemanticHint().equals(proposedType)) {
+ return UMLGraphicalTypes.LINK_UML_GENERALIZATION_ID;
+ }
+ return super.getEdgeGraphicalType(proposedType);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/provider/CustomViewProvider.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/provider/CustomViewProvider.java
new file mode 100755
index 0000000..d271616
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/provider/CustomViewProvider.java
@@ -0,0 +1,148 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.provider;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.gmf.diagram.common.factory.AffixedLabelViewFactory;
+import org.eclipse.papyrus.gmf.diagram.common.factory.CompartmentListViewFactory;
+import org.eclipse.papyrus.gmf.diagram.common.factory.ConnectorLabelViewFactory;
+import org.eclipse.papyrus.gmf.diagram.common.factory.InnerLabelViewFactory;
+import org.eclipse.papyrus.gmf.diagram.common.factory.ShapeChildLabelViewFactory;
+import org.eclipse.papyrus.gmf.diagram.common.provider.CustomAbstractViewProvider;
+import org.eclipse.papyrus.sysml.diagram.common.factory.BlockClassifierViewFactory;
+import org.eclipse.papyrus.sysml.diagram.common.factory.ConstraintBlockClassifierViewFactory;
+import org.eclipse.papyrus.sysml.diagram.common.factory.DimensionClassifierViewFactory;
+import org.eclipse.papyrus.sysml.diagram.common.factory.FlowPortAffixedNodeViewFactory;
+import org.eclipse.papyrus.sysml.diagram.common.factory.FlowSpecificationClassifierViewFactory;
+import org.eclipse.papyrus.sysml.diagram.common.factory.UnitClassifierViewFactory;
+import org.eclipse.papyrus.sysml.diagram.common.factory.ValueTypeClassifierViewFactory;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.uml.diagram.common.factory.AssociationLinkViewFactory;
+import org.eclipse.papyrus.uml.diagram.common.factory.ClassifierViewFactory;
+import org.eclipse.papyrus.uml.diagram.common.factory.DependencyLinkViewFactory;
+import org.eclipse.papyrus.uml.diagram.common.factory.EnumerationClassifierViewFactory;
+import org.eclipse.papyrus.uml.diagram.common.factory.GeneralizationLinkViewFactory;
+import org.eclipse.papyrus.uml.diagram.common.factory.InterfaceRealizationLinkViewFactory;
+import org.eclipse.papyrus.uml.diagram.common.factory.PortAffixedNodeViewFactory;
+import org.eclipse.papyrus.uml.diagram.common.factory.PrimitiveTypeClassifierViewFactory;
+import org.eclipse.papyrus.uml.diagram.common.factory.UsageLinkViewFactory;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+
+public class CustomViewProvider extends CustomAbstractViewProvider {
+
+ /** Map containing node view types supported by this provider */
+ protected Map<String, Class<?>> nodeMap = new HashMap<String, Class<?>>();
+
+ /** Map containing edge view types supported by this provider */
+ protected Map<String, Class<?>> edgeMap = new HashMap<String, Class<?>>();
+
+ /** Default constructor */
+ public CustomViewProvider() {
+ super();
+ this.registry = new CustomGraphicalTypeRegistry();
+
+ diagramType = ElementTypes.DIAGRAM_ID;
+
+ // Custom classifier nodes
+ nodeMap.put(UMLGraphicalTypes.SHAPE_UML_ENUMERATION_AS_CLASSIFIER_ID, EnumerationClassifierViewFactory.class);
+ nodeMap.put(UMLGraphicalTypes.SHAPE_UML_PRIMITIVETYPE_AS_CLASSIFIER_ID, PrimitiveTypeClassifierViewFactory.class);
+ nodeMap.put(SysMLGraphicalTypes.SHAPE_SYSML_VALUETYPE_AS_CLASSIFIER_ID, ValueTypeClassifierViewFactory.class);
+ nodeMap.put(SysMLGraphicalTypes.SHAPE_SYSML_FLOWSPECIFICATION_AS_CLASSIFIER_ID, FlowSpecificationClassifierViewFactory.class);
+ nodeMap.put(SysMLGraphicalTypes.SHAPE_SYSML_CONSTRAINTBLOCK_AS_CLASSIFIER_ID, ConstraintBlockClassifierViewFactory.class);
+ nodeMap.put(SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_CLASSIFIER_ID, BlockClassifierViewFactory.class);
+ nodeMap.put(SysMLGraphicalTypes.SHAPE_SYSML_DIMENSION_AS_CLASSIFIER_ID, DimensionClassifierViewFactory.class);
+ nodeMap.put(SysMLGraphicalTypes.SHAPE_SYSML_UNIT_AS_CLASSIFIER_ID, UnitClassifierViewFactory.class);
+ nodeMap.put(UMLGraphicalTypes.SHAPE_UML_ACTOR_AS_CLASSIFIER_ID, ClassifierViewFactory.class);
+ nodeMap.put(UMLGraphicalTypes.SHAPE_UML_DATATYPE_AS_CLASSIFIER_ID, ClassifierViewFactory.class);
+ nodeMap.put(UMLGraphicalTypes.SHAPE_UML_INTERFACE_AS_CLASSIFIER_ID, ClassifierViewFactory.class);
+ nodeMap.put(UMLGraphicalTypes.SHAPE_UML_SIGNAL_AS_CLASSIFIER_ID, ClassifierViewFactory.class);
+ // Custom affixed nodes
+ nodeMap.put(SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID, FlowPortAffixedNodeViewFactory.class);
+ nodeMap.put(UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID, PortAffixedNodeViewFactory.class);
+ // Custom child node labels
+ nodeMap.put(UMLGraphicalTypes.SHAPE_UML_CONSTRAINT_AS_LABEL_ID, ShapeChildLabelViewFactory.class);
+ nodeMap.put(UMLGraphicalTypes.SHAPE_UML_ENUMERATIONLITERAL_AS_LABEL_ID, ShapeChildLabelViewFactory.class);
+ nodeMap.put(UMLGraphicalTypes.SHAPE_UML_OPERATION_AS_LABEL_ID, ShapeChildLabelViewFactory.class);
+ nodeMap.put(SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_LABEL_ID, ShapeChildLabelViewFactory.class);
+ nodeMap.put(UMLGraphicalTypes.SHAPE_UML_PORT_AS_LABEL_ID, ShapeChildLabelViewFactory.class);
+ nodeMap.put(SysMLGraphicalTypes.SHAPE_SYSML_CONSTRAINTPROPERTY_AS_LABEL_ID, ShapeChildLabelViewFactory.class);
+ nodeMap.put(SysMLGraphicalTypes.SHAPE_SYSML_FLOWPROPERTY_AS_LABEL_ID, ShapeChildLabelViewFactory.class);
+ nodeMap.put(SysMLGraphicalTypes.SHAPE_SYSML_PART_AS_LABEL_ID, ShapeChildLabelViewFactory.class);
+ nodeMap.put(SysMLGraphicalTypes.SHAPE_SYSML_REFERENCE_AS_LABEL_ID, ShapeChildLabelViewFactory.class);
+ nodeMap.put(SysMLGraphicalTypes.SHAPE_SYSML_VALUE_AS_LABEL_ID, ShapeChildLabelViewFactory.class);
+ nodeMap.put(UMLGraphicalTypes.SHAPE_UML_PROPERTY_AS_LABEL_ID, ShapeChildLabelViewFactory.class);
+ nodeMap.put(UMLGraphicalTypes.SHAPE_UML_RECEPTION_AS_LABEL_ID, ShapeChildLabelViewFactory.class);
+ // Custom inner labels
+ nodeMap.put(UMLGraphicalTypes.LABEL_UML_NAMEDELEMENT_NAME_ID, InnerLabelViewFactory.class);
+ nodeMap.put(SysMLGraphicalTypes.LABEL_SYSML_BLOCK_NAME_ID, InnerLabelViewFactory.class);
+ nodeMap.put(SysMLGraphicalTypes.LABEL_SYSML_CONSTRAINTBLOCK_NAME_ID, InnerLabelViewFactory.class);
+ nodeMap.put(SysMLGraphicalTypes.LABEL_SYSML_DIMENSION_NAME_ID, InnerLabelViewFactory.class);
+ nodeMap.put(SysMLGraphicalTypes.LABEL_SYSML_FLOWSPECIFICATION_NAME_ID, InnerLabelViewFactory.class);
+ nodeMap.put(SysMLGraphicalTypes.LABEL_SYSML_UNIT_NAME_ID, InnerLabelViewFactory.class);
+ nodeMap.put(SysMLGraphicalTypes.LABEL_SYSML_VALUETYPE_NAME_ID, InnerLabelViewFactory.class);
+ // Custom compartments
+ nodeMap.put(UMLGraphicalTypes.COMPARTMENT_UML_ENUMERATIONLITERAL_AS_LIST_ID, CompartmentListViewFactory.class);
+ nodeMap.put(UMLGraphicalTypes.COMPARTMENT_UML_OPERATION_AS_LIST_ID, CompartmentListViewFactory.class);
+ nodeMap.put(UMLGraphicalTypes.COMPARTMENT_UML_PORT_AS_LIST_ID, CompartmentListViewFactory.class);
+ nodeMap.put(UMLGraphicalTypes.COMPARTMENT_UML_PROPERTY_AS_LIST_ID, CompartmentListViewFactory.class);
+ nodeMap.put(SysMLGraphicalTypes.COMPARTMENT_SYSML_CONSTRAINT_AS_LIST_ID, CompartmentListViewFactory.class);
+ nodeMap.put(SysMLGraphicalTypes.COMPARTMENT_SYSML_FLOWPORT_AS_LIST_ID, CompartmentListViewFactory.class);
+ nodeMap.put(SysMLGraphicalTypes.COMPARTMENT_SYSML_FLOWPROPERTY_AS_LIST_ID, CompartmentListViewFactory.class);
+ nodeMap.put(SysMLGraphicalTypes.COMPARTMENT_SYSML_PARAMETER_AS_LIST_ID, CompartmentListViewFactory.class);
+ nodeMap.put(SysMLGraphicalTypes.COMPARTMENT_SYSML_PART_AS_LIST_ID, CompartmentListViewFactory.class);
+ nodeMap.put(SysMLGraphicalTypes.COMPARTMENT_SYSML_REFERENCE_AS_LIST_ID, CompartmentListViewFactory.class);
+ nodeMap.put(SysMLGraphicalTypes.COMPARTMENT_SYSML_VALUE_AS_LIST_ID, CompartmentListViewFactory.class);
+ nodeMap.put(SysMLGraphicalTypes.COMPARTMENT_SYSML_PROPERTY_AS_LIST_ID, CompartmentListViewFactory.class);
+ // Custom affixed labels
+ nodeMap.put(UMLGraphicalTypes.AFFIXEDLABEL_UML_NAMEDELEMENT_NAME_ID, AffixedLabelViewFactory.class);
+ nodeMap.put(UMLGraphicalTypes.AFFIXEDLABEL_UML_APPLIEDSTEREOTYPE_ID, AffixedLabelViewFactory.class);
+ nodeMap.put(UMLGraphicalTypes.AFFIXEDLABEL_UML_PORT_LABEL_ID, AffixedLabelViewFactory.class);
+ nodeMap.put(SysMLGraphicalTypes.AFFIXEDLABEL_SYSML_FLOWPORT_LABEL_ID, AffixedLabelViewFactory.class);
+
+ // Custom edges
+ edgeMap.put(UMLGraphicalTypes.LINK_UML_USAGE_ID, UsageLinkViewFactory.class);
+ edgeMap.put(UMLGraphicalTypes.LINK_UML_INTERFACEREALIZATION_ID, InterfaceRealizationLinkViewFactory.class);
+ edgeMap.put(UMLGraphicalTypes.LINK_UML_DEPENDENCY_ID, DependencyLinkViewFactory.class);
+ edgeMap.put(UMLGraphicalTypes.LINK_UML_GENERALIZATION_ID, GeneralizationLinkViewFactory.class);
+ edgeMap.put(SysMLGraphicalTypes.LINK_SYSML_ASSOCIATION_ID, AssociationLinkViewFactory.class);
+
+ // Custom edge labels
+ nodeMap.put(UMLGraphicalTypes.LINKLABEL_UML_APPLIEDSTEREOTYPE_ID, ConnectorLabelViewFactory.class);
+ nodeMap.put(UMLGraphicalTypes.LINKLABEL_UML_NAMEDELEMENT_NAME_ID, ConnectorLabelViewFactory.class);
+ nodeMap.put(UMLGraphicalTypes.LINKLABEL_UML_ASSOCIATION_SOURCE_MULTIPLICITY_ID, ConnectorLabelViewFactory.class);
+ nodeMap.put(UMLGraphicalTypes.LINKLABEL_UML_ASSOCIATION_SOURCE_ROLE_ID, ConnectorLabelViewFactory.class);
+ nodeMap.put(UMLGraphicalTypes.LINKLABEL_UML_ASSOCIATION_TARGET_MULTIPLICITY_ID, ConnectorLabelViewFactory.class);
+ nodeMap.put(UMLGraphicalTypes.LINKLABEL_UML_ASSOCIATION_TARGET_ROLE_ID, ConnectorLabelViewFactory.class);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Class<?> getNodeViewClass(IAdaptable semanticAdapter, View containerView, String graphicalType) {
+ return nodeMap.get(graphicalType);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Class<?> getEdgeViewClass(IAdaptable semanticAdapter, View containerView, String graphicalType) {
+ return edgeMap.get(graphicalType);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/provider/ElementTypes.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/provider/ElementTypes.java
new file mode 100755
index 0000000..1791880
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/provider/ElementTypes.java
@@ -0,0 +1,142 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.provider;
+
+import org.eclipse.gmf.runtime.emf.type.core.AbstractElementTypeEnumerator;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.CommentBodyEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.CommentBodyEditPartCN;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ConstraintBodyEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ConstraintBodyEditPartCN;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ConstraintNameEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ConstraintNameEditPartCN;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InstanceSpecificationNameEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InstanceSpecificationNameEditPartCN;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InstanceSpecificationSlotCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InstanceSpecificationSlotCompartmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ModelNameEditPartCN;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ModelNameEditPartTN;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ModelPackageableElementCompartmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ModelPackageableElementCompartmentEditPartTN;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PackageNameEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PackageNameEditPartCN;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PackagePackageableElementCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PackagePackageableElementCompartmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+
+public class ElementTypes extends AbstractElementTypeEnumerator {
+
+ /** ********************************************************* */
+ /** SysML Block Definition Diagram specific elements **************** */
+ /** ********************************************************* */
+
+ /** SysML Block Definition Diagram :: Diagram */
+ public static final String DIAGRAM_ID = "BlockDefinition"; //$NON-NLS-1$
+
+
+
+
+ /** ********************************************************* */
+ /** SysML Block Definition Diagram - ClassDiagram related elements */
+ /** ********************************************************* */
+
+
+ /** ClassDiagram :: MODEL */
+ public static final IHintedType MODEL = (IHintedType) UMLElementTypes.Model_Shape;
+
+ public static final String MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT = ModelPackageableElementCompartmentEditPartTN.VISUAL_ID;
+
+ public static final String MODEL_LABEL_NAME_TN_HINT = ModelNameEditPartTN.VISUAL_ID;
+
+ /** ClassDiagram :: MODEL_CN */
+ public static final IHintedType MODEL_CN = (IHintedType) UMLElementTypes.Model_Shape_CN;
+
+ public static final String MODEL_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT = ModelPackageableElementCompartmentEditPartCN.VISUAL_ID;
+
+ public static final String MODEL_CN_LABEL_NAME_HINT = ModelNameEditPartCN.VISUAL_ID;
+
+ /** ClassDiagram :: PACKAGE */
+ public static final IHintedType PACKAGE = (IHintedType) UMLElementTypes.Package_Shape;
+
+ public static final String PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT = PackagePackageableElementCompartmentEditPart.VISUAL_ID;
+
+ public static final String PACKAGE_LABEL_NAME_HINT = PackageNameEditPart.VISUAL_ID;
+
+ /** ClassDiagram :: PACKAGE_CN */
+ public static final IHintedType PACKAGE_CN = (IHintedType) UMLElementTypes.Package_Shape_CN;
+
+ public static final String PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT = PackagePackageableElementCompartmentEditPartCN.VISUAL_ID;
+
+ public static final String PACKAGE_CN_LABEL_NAME_HINT = PackageNameEditPartCN.VISUAL_ID;
+
+ /** ClassDiagram :: INSTANCE_SPECIFICATION */
+ public static final IHintedType INSTANCE_SPECIFICATION = (IHintedType) UMLElementTypes.InstanceSpecification_Shape;
+
+ /** ClassDiagram :: INSTANCE_SPECIFICATION_LINK */
+ public static final IHintedType INSTANCE_SPECIFICATION_LINK = (IHintedType) UMLElementTypes.InstanceSpecification_Edge;
+
+ public static final String INSTANCE_SPECIFICATION_COMPARTMENT_SLOT_HINT = InstanceSpecificationSlotCompartmentEditPart.VISUAL_ID;
+
+ public static final String INSTANCE_SPECIFICATION_LABEL_NAME_HINT = InstanceSpecificationNameEditPart.VISUAL_ID;
+
+ /** ClassDiagram :: INSTANCE_SPECIFICATION_CN */
+ public static final IHintedType INSTANCE_SPECIFICATION_CN = (IHintedType) UMLElementTypes.InstanceSpecification_Shape_CN;
+
+ public static final String INSTANCE_SPECIFICATION_CN_COMPARTMENT_SLOT_HINT = InstanceSpecificationSlotCompartmentEditPartCN.VISUAL_ID;
+
+ public static final String INSTANCE_SPECIFICATION_CN_LABEL_NAME_HINT = InstanceSpecificationNameEditPartCN.VISUAL_ID;
+
+ /** ClassDiagram :: CONSTRAINT */
+ public static final IHintedType CONSTRAINT = (IHintedType) UMLElementTypes.Constraint_PackagedElementShape;
+
+ public static final String CONSTRAINT_LABEL_NAME_HINT = ConstraintNameEditPart.VISUAL_ID;
+
+ public static final String CONSTRAINT_LABEL_BODY_HINT = ConstraintBodyEditPart.VISUAL_ID;
+
+ /** ClassDiagram :: CONSTRAINT_CN */
+ public static final IHintedType CONSTRAINT_CN = (IHintedType) UMLElementTypes.Constraint_PackagedElementShape_CN;
+
+ public static final String CONSTRAINT_CN_LABEL_NAME_HINT = ConstraintNameEditPartCN.VISUAL_ID;
+
+ public static final String CONSTRAINT_CN_LABEL_BODY_HINT = ConstraintBodyEditPartCN.VISUAL_ID;
+
+ /** ClassDiagram :: COMMENT */
+ public static final IHintedType COMMENT = (IHintedType) UMLElementTypes.Comment_Shape;
+
+ public static final String COMMENT_LABEL_BODY_HINT = CommentBodyEditPart.VISUAL_ID;
+
+ /** ClassDiagram :: COMMENT_CN */
+ public static final IHintedType COMMENT_CN = (IHintedType) UMLElementTypes.Comment_Shape_CN;
+
+ public static final String COMMENT_CN_LABEL_BODY_HINT = CommentBodyEditPartCN.VISUAL_ID;
+
+
+ /** ClassDiagram :: COMMENT_ANNOTATED_ELEMENT */
+ public static final IHintedType COMMENT_ANNOTATED_ELEMENT = (IHintedType) UMLElementTypes.Comment_AnnotatedElementEdge;
+
+ /** ClassDiagram :: CONSTRAINT_CONSTRAINED_ELEMENT */
+ public static final IHintedType CONSTRAINT_CONSTRAINED_ELEMENT = (IHintedType) UMLElementTypes.Constraint_ConstrainedElementEdge;
+
+ /** ClassDiagram :: ChildLabelNodes */
+ public static final IHintedType INSTANCE_SPECIFICATION_SLOT_CLN = (IHintedType) UMLElementTypes.Slot_SlotLabel;
+
+
+ public static IElementType getElementTypeByID(String visualID) {
+ if (ElementTypes.INSTANCE_SPECIFICATION_LINK.getSemanticHint().equalsIgnoreCase(visualID)) {
+ return ElementTypes.INSTANCE_SPECIFICATION_LINK;
+ }
+ return null;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/provider/GraphicalTypeRegistry.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/provider/GraphicalTypeRegistry.java
new file mode 100755
index 0000000..8aaeab4
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/provider/GraphicalTypeRegistry.java
@@ -0,0 +1,382 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.provider;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
+import org.eclipse.papyrus.gmf.diagram.common.provider.IGraphicalTypeRegistry;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+
+/**
+ * <pre>
+ * This class provides graphical type id (used as View type) for
+ * domain element according to their actual or expected graphical
+ * container type.
+ * </pre>
+ */
+public class GraphicalTypeRegistry implements IGraphicalTypeRegistry {
+
+ /** A Set containing all known node graphical types */
+ protected Set<String> knownNodes = new HashSet<String>();
+
+ /** A Set containing all known edge graphical types */
+ protected Set<String> knownEdges = new HashSet<String>();
+
+ /** Default constructor */
+ public GraphicalTypeRegistry() {
+
+ // Fill known edges set
+ knownEdges.add(ElementTypes.COMMENT_ANNOTATED_ELEMENT.getSemanticHint());
+ knownEdges.add(ElementTypes.CONSTRAINT_CONSTRAINED_ELEMENT.getSemanticHint());
+ knownEdges.add(ElementTypes.INSTANCE_SPECIFICATION_LINK.getSemanticHint());
+
+ // Fill known nodes set (primary nodes)
+ knownNodes.add(UMLElementTypes.MODEL.getSemanticHint());
+ knownNodes.add(UMLElementTypes.PACKAGE.getSemanticHint());
+ knownNodes.add(UMLElementTypes.INSTANCE_SPECIFICATION.getSemanticHint());
+ knownNodes.add(UMLElementTypes.CONSTRAINT.getSemanticHint());
+ knownNodes.add(UMLElementTypes.COMMENT.getSemanticHint());
+
+ knownNodes.add(ElementTypes.MODEL.getSemanticHint());
+ knownNodes.add(ElementTypes.MODEL_CN.getSemanticHint());
+ knownNodes.add(ElementTypes.PACKAGE.getSemanticHint());
+ knownNodes.add(ElementTypes.PACKAGE_CN.getSemanticHint());
+ knownNodes.add(ElementTypes.INSTANCE_SPECIFICATION.getSemanticHint());
+ knownNodes.add(ElementTypes.INSTANCE_SPECIFICATION_CN.getSemanticHint());
+ knownNodes.add(ElementTypes.CONSTRAINT.getSemanticHint());
+ knownNodes.add(ElementTypes.CONSTRAINT_CN.getSemanticHint());
+ knownNodes.add(ElementTypes.COMMENT.getSemanticHint());
+ knownNodes.add(ElementTypes.COMMENT_CN.getSemanticHint());
+
+ // Fill known nodes set (child label nodes)
+ knownNodes.add(UMLElementTypes.SLOT.getSemanticHint());
+ knownNodes.add(ElementTypes.INSTANCE_SPECIFICATION_SLOT_CLN.getSemanticHint());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getEdgeGraphicalType(EObject domainElement) {
+
+ String graphicalType = UNDEFINED_TYPE;
+ if (domainElement == null) {
+ return UNDEFINED_TYPE;
+ }
+ return graphicalType;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getEdgeGraphicalType(IElementType elementType) {
+ if (elementType instanceof IHintedType) {
+ String semanticHint = ((IHintedType) elementType).getSemanticHint();
+ return getEdgeGraphicalType(semanticHint);
+ }
+
+ return UNDEFINED_TYPE;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getEdgeGraphicalType(String proposedType) {
+ if (isKnownEdgeType(proposedType)) {
+ return proposedType;
+ }
+
+ return UNDEFINED_TYPE;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getNodeGraphicalType(EObject domainElement, String containerType) {
+
+ String graphicalType = UNDEFINED_TYPE;
+ if ((containerType == null) || (domainElement == null)) {
+ return UNDEFINED_TYPE;
+ }
+
+ if (domainElement instanceof org.eclipse.uml2.uml.Model) {
+ if (ElementTypes.DIAGRAM_ID.equals(containerType)) { // Model TopNode
+ graphicalType = ElementTypes.MODEL.getSemanticHint();
+ }
+ if (ElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Model ChildNode
+ graphicalType = ElementTypes.MODEL_CN.getSemanticHint();
+ }
+ if (ElementTypes.MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Model ChildNode
+ graphicalType = ElementTypes.MODEL_CN.getSemanticHint();
+ }
+ if (ElementTypes.MODEL_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Model ChildNode
+ graphicalType = ElementTypes.MODEL_CN.getSemanticHint();
+ }
+ if (ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Model ChildNode
+ graphicalType = ElementTypes.MODEL_CN.getSemanticHint();
+ }
+
+ }
+
+ if (domainElement instanceof org.eclipse.uml2.uml.Package) {
+ if (ElementTypes.DIAGRAM_ID.equals(containerType)) { // Package TopNode
+ graphicalType = ElementTypes.PACKAGE.getSemanticHint();
+ }
+ if (ElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Package ChildNode
+ graphicalType = ElementTypes.PACKAGE_CN.getSemanticHint();
+ }
+ if (ElementTypes.MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Package ChildNode
+ graphicalType = ElementTypes.PACKAGE_CN.getSemanticHint();
+ }
+ if (ElementTypes.MODEL_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Package ChildNode
+ graphicalType = ElementTypes.PACKAGE_CN.getSemanticHint();
+ }
+ if (ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Package ChildNode
+ graphicalType = ElementTypes.PACKAGE_CN.getSemanticHint();
+ }
+
+ }
+
+ if (domainElement instanceof org.eclipse.uml2.uml.InstanceSpecification) {
+ if (ElementTypes.DIAGRAM_ID.equals(containerType)) { // InstanceSpecification TopNode
+ graphicalType = ElementTypes.INSTANCE_SPECIFICATION.getSemanticHint();
+ }
+ if (ElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // InstanceSpecification ChildNode
+ graphicalType = ElementTypes.INSTANCE_SPECIFICATION_CN.getSemanticHint();
+ }
+ if (ElementTypes.MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // InstanceSpecification ChildNode
+ graphicalType = ElementTypes.INSTANCE_SPECIFICATION_CN.getSemanticHint();
+ }
+ if (ElementTypes.MODEL_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // InstanceSpecification ChildNode
+ graphicalType = ElementTypes.INSTANCE_SPECIFICATION_CN.getSemanticHint();
+ }
+ if (ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // InstanceSpecification ChildNode
+ graphicalType = ElementTypes.INSTANCE_SPECIFICATION_CN.getSemanticHint();
+ }
+
+ }
+
+ if (domainElement instanceof org.eclipse.uml2.uml.Constraint) {
+ if (ElementTypes.DIAGRAM_ID.equals(containerType)) { // Constraint TopNode
+ graphicalType = ElementTypes.CONSTRAINT.getSemanticHint();
+ }
+ if (ElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Constraint ChildNode
+ graphicalType = ElementTypes.CONSTRAINT_CN.getSemanticHint();
+ }
+ if (ElementTypes.MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Constraint ChildNode
+ graphicalType = ElementTypes.CONSTRAINT_CN.getSemanticHint();
+ }
+ if (ElementTypes.MODEL_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Constraint ChildNode
+ graphicalType = ElementTypes.CONSTRAINT_CN.getSemanticHint();
+ }
+ if (ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Constraint ChildNode
+ graphicalType = ElementTypes.CONSTRAINT_CN.getSemanticHint();
+ }
+
+ }
+
+ if (domainElement instanceof org.eclipse.uml2.uml.Comment) {
+ if (ElementTypes.DIAGRAM_ID.equals(containerType)) { // Comment TopNode
+ graphicalType = ElementTypes.COMMENT.getSemanticHint();
+ }
+ if (ElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Comment ChildNode
+ graphicalType = ElementTypes.COMMENT_CN.getSemanticHint();
+ }
+ if (ElementTypes.MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Comment ChildNode
+ graphicalType = ElementTypes.COMMENT_CN.getSemanticHint();
+ }
+ if (ElementTypes.MODEL_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Comment ChildNode
+ graphicalType = ElementTypes.COMMENT_CN.getSemanticHint();
+ }
+ if (ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Comment ChildNode
+ graphicalType = ElementTypes.COMMENT_CN.getSemanticHint();
+ }
+
+ }
+
+ if (domainElement instanceof org.eclipse.uml2.uml.Slot) {
+
+ if (ElementTypes.INSTANCE_SPECIFICATION_COMPARTMENT_SLOT_HINT.equals(containerType)) { // Slot ChildLabelNode
+ graphicalType = ElementTypes.INSTANCE_SPECIFICATION_SLOT_CLN.getSemanticHint();
+ }
+ if (ElementTypes.INSTANCE_SPECIFICATION_CN_COMPARTMENT_SLOT_HINT.equals(containerType)) { // Slot ChildLabelNode
+ graphicalType = ElementTypes.INSTANCE_SPECIFICATION_SLOT_CLN.getSemanticHint();
+ }
+ }
+
+ return graphicalType;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getNodeGraphicalType(IElementType elementType, String containerType) {
+ if (elementType instanceof IHintedType) {
+ String semanticHint = ((IHintedType) elementType).getSemanticHint();
+ return getNodeGraphicalType(semanticHint, containerType);
+ }
+
+ return UNDEFINED_TYPE;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getNodeGraphicalType(String proposedType, String containerType) {
+
+ // Explicitly forbid Comment or Constraint creation using ElementType defined in Class Diagram
+ // A better implementation should be provided, this one is not subtle but should have minimal side effect
+ // (see bug #348550)
+
+ if (UMLElementTypes.MODEL.getSemanticHint().equals(proposedType)) {
+
+ if (ElementTypes.DIAGRAM_ID.equals(containerType)) { // Constraint TopNode
+ return ElementTypes.MODEL.getSemanticHint();
+ }
+ if (ElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Constraint ChildNode
+ return ElementTypes.MODEL_CN.getSemanticHint();
+ }
+ if (ElementTypes.MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Constraint ChildNode
+ return ElementTypes.MODEL_CN.getSemanticHint();
+ }
+ if (ElementTypes.MODEL_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Constraint ChildNode
+ return ElementTypes.MODEL_CN.getSemanticHint();
+ }
+ if (ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Constraint ChildNode
+ return ElementTypes.MODEL_CN.getSemanticHint();
+ }
+
+ return UNDEFINED_TYPE;
+ }
+
+ if (UMLElementTypes.PACKAGE.getSemanticHint().equals(proposedType)) {
+
+ if (ElementTypes.DIAGRAM_ID.equals(containerType)) { // Constraint TopNode
+ return ElementTypes.PACKAGE.getSemanticHint();
+ }
+ if (ElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Constraint ChildNode
+ return ElementTypes.PACKAGE_CN.getSemanticHint();
+ }
+ if (ElementTypes.MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Constraint ChildNode
+ return ElementTypes.PACKAGE_CN.getSemanticHint();
+ }
+ if (ElementTypes.MODEL_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Constraint ChildNode
+ return ElementTypes.PACKAGE_CN.getSemanticHint();
+ }
+ if (ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Constraint ChildNode
+ return ElementTypes.PACKAGE_CN.getSemanticHint();
+ }
+
+ return UNDEFINED_TYPE;
+ }
+
+ if ((UMLElementTypes.COMMENT.getSemanticHint().equals(proposedType))) {
+
+ if (ElementTypes.DIAGRAM_ID.equals(containerType)) { // Constraint TopNode
+ return ElementTypes.COMMENT.getSemanticHint();
+ }
+ if (ElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Constraint ChildNode
+ return ElementTypes.COMMENT_CN.getSemanticHint();
+ }
+ if (ElementTypes.MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Constraint ChildNode
+ return ElementTypes.COMMENT_CN.getSemanticHint();
+ }
+ if (ElementTypes.MODEL_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Constraint ChildNode
+ return ElementTypes.COMMENT_CN.getSemanticHint();
+ }
+ if (ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Constraint ChildNode
+ return ElementTypes.COMMENT_CN.getSemanticHint();
+ }
+
+ return UNDEFINED_TYPE;
+ }
+
+ if (UMLElementTypes.CONSTRAINT.getSemanticHint().equals(proposedType)) {
+
+ if (ElementTypes.DIAGRAM_ID.equals(containerType)) { // Constraint TopNode
+ return ElementTypes.CONSTRAINT.getSemanticHint();
+ }
+ if (ElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Constraint ChildNode
+ return ElementTypes.CONSTRAINT_CN.getSemanticHint();
+ }
+ if (ElementTypes.MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Constraint ChildNode
+ return ElementTypes.CONSTRAINT_CN.getSemanticHint();
+ }
+ if (ElementTypes.MODEL_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Constraint ChildNode
+ return ElementTypes.CONSTRAINT_CN.getSemanticHint();
+ }
+ if (ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Constraint ChildNode
+ return ElementTypes.CONSTRAINT_CN.getSemanticHint();
+ }
+
+ return UNDEFINED_TYPE;
+ }
+
+ if (UMLElementTypes.INSTANCE_SPECIFICATION.getSemanticHint().equals(proposedType)) {
+
+ if (ElementTypes.DIAGRAM_ID.equals(containerType)) { // Constraint TopNode
+ return ElementTypes.INSTANCE_SPECIFICATION.getSemanticHint();
+ }
+ if (ElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Constraint ChildNode
+ return ElementTypes.INSTANCE_SPECIFICATION_CN.getSemanticHint();
+ }
+ if (ElementTypes.MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Constraint ChildNode
+ return ElementTypes.INSTANCE_SPECIFICATION_CN.getSemanticHint();
+ }
+ if (ElementTypes.MODEL_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Constraint ChildNode
+ return ElementTypes.INSTANCE_SPECIFICATION_CN.getSemanticHint();
+ }
+ if (ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Constraint ChildNode
+ return ElementTypes.INSTANCE_SPECIFICATION_CN.getSemanticHint();
+ }
+
+ return UNDEFINED_TYPE;
+ }
+
+ if (UMLElementTypes.SLOT.getSemanticHint().equals(proposedType)) {
+
+ if (ElementTypes.INSTANCE_SPECIFICATION_CN_COMPARTMENT_SLOT_HINT.equals(containerType)) { // Constraint ChildNode
+ return ElementTypes.INSTANCE_SPECIFICATION_SLOT_CLN.getSemanticHint();
+ }
+ if (ElementTypes.INSTANCE_SPECIFICATION_COMPARTMENT_SLOT_HINT.equals(containerType)) { // Constraint ChildNode
+ return ElementTypes.INSTANCE_SPECIFICATION_SLOT_CLN.getSemanticHint();
+ }
+
+ return UNDEFINED_TYPE;
+ }
+ // Initial implementation (to be improved - see : getNodeGraphicalType(EObject domainElement, String containerType))
+ if (isKnownNodeType(proposedType)) {
+ return proposedType;
+ }
+
+ return UNDEFINED_TYPE;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isKnownEdgeType(String type) {
+ return knownEdges.contains(type);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isKnownNodeType(String type) {
+ return knownNodes.contains(type);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/provider/InheritedClassDiagramEditPartProvider.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/provider/InheritedClassDiagramEditPartProvider.java
new file mode 100755
index 0000000..f361f5b
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/provider/InheritedClassDiagramEditPartProvider.java
@@ -0,0 +1,93 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.provider;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.service.IOperation;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.services.editpart.CreateGraphicEditPartOperation;
+import org.eclipse.gmf.runtime.diagram.ui.services.editpart.IEditPartOperation;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.providers.CustomUMLEditPartProvider;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.SlotChildLabelEditPart;
+
+public class InheritedClassDiagramEditPartProvider extends CustomUMLEditPartProvider {
+
+ @Override
+ public synchronized boolean provides(IOperation operation) {
+ if (operation instanceof CreateGraphicEditPartOperation) {
+ View view = ((IEditPartOperation) operation).getView();
+
+ // Ensure current diagram is a BlockDefinition Diagram
+ if (!ElementTypes.DIAGRAM_ID.equals(view.getDiagram().getType())) {
+ return false;
+ }
+
+ // Test supported inherited types
+ EObject eobject = view.getElement();
+
+ /** Nodes (and ChildLabelNodes) *********** */
+ if (eobject instanceof org.eclipse.uml2.uml.Model) {
+ return true;
+ }
+ if (eobject instanceof org.eclipse.uml2.uml.Package) {
+ return true;
+ }
+ if (eobject instanceof org.eclipse.uml2.uml.InstanceSpecification) {
+ return true;
+ }
+ if (eobject instanceof org.eclipse.uml2.uml.Constraint) {
+ return true;
+ }
+ if (eobject instanceof org.eclipse.uml2.uml.Comment) {
+ return true;
+ }
+ if (eobject instanceof org.eclipse.uml2.uml.Slot) {
+ return true;
+ }
+
+
+ // Additional test needed here to decide whether to support Feature type links.
+ // As feature type link are not related to a MetaClass from the domain model
+ // they are not already handled by previous tests.
+ // Also concerns NotationType.
+ String hint = view.getType();
+
+ /** Edges (Feature) : COMMENT_ANNOTATED_ELEMENT *********** */
+ if (ElementTypes.COMMENT_ANNOTATED_ELEMENT.getSemanticHint().equals(hint)) {
+ return true;
+ }
+ /** Edges (Feature) : CONSTRAINT_CONSTRAINED_ELEMENT *********** */
+ if (ElementTypes.CONSTRAINT_CONSTRAINED_ELEMENT.getSemanticHint().equals(hint)) {
+ return true;
+ }
+
+
+
+ }
+ return false;
+ }
+
+ /**
+ * EditPart replacement for ChildLabelNodes from inherited diagram.
+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=351433
+ */
+ @Override
+ protected IGraphicalEditPart createEditPart(View view) {
+ if (ElementTypes.INSTANCE_SPECIFICATION_SLOT_CLN.getSemanticHint().equals(view.getType())) {
+ return new SlotChildLabelEditPart(view);
+ }
+ return super.createEditPart(view);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/provider/InheritedClassDiagramViewProvider.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/provider/InheritedClassDiagramViewProvider.java
new file mode 100755
index 0000000..0a1c51f
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/provider/InheritedClassDiagramViewProvider.java
@@ -0,0 +1,287 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.provider;
+
+import static org.eclipse.papyrus.infra.core.Activator.log;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EcoreFactory;
+import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
+import org.eclipse.gmf.runtime.diagram.core.services.view.CreateEdgeViewOperation;
+import org.eclipse.gmf.runtime.diagram.core.services.view.CreateNodeViewOperation;
+import org.eclipse.gmf.runtime.diagram.core.services.view.CreateViewForKindOperation;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.gmf.diagram.common.provider.IGraphicalTypeRegistry;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLViewProvider;
+import org.eclipse.papyrus.uml.diagram.common.commands.SemanticAdapter;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+
+public class InheritedClassDiagramViewProvider extends UMLViewProvider {
+
+ /** Local graphical type registry */
+ protected IGraphicalTypeRegistry registry = new GraphicalTypeRegistry();
+
+ @Override
+ public Edge createEdge(IAdaptable semanticAdapter, View containerView, String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Edge createdEdge = null;
+ IElementType elementType = (IElementType) semanticAdapter.getAdapter(IElementType.class);
+ if (elementType != null) {
+ createdEdge = super.createEdge(semanticAdapter, containerView, semanticHint, index, persisted, preferencesHint);
+ } else {
+ EObject domainElement = (EObject) semanticAdapter.getAdapter(EObject.class);
+ String domainElementGraphicalType = semanticHint;
+ if (domainElementGraphicalType == null) {
+ domainElementGraphicalType = registry.getEdgeGraphicalType(domainElement);
+ }
+ if ((!org.eclipse.papyrus.infra.gmfdiag.common.providers.IGraphicalTypeRegistry.UNDEFINED_TYPE.equals(domainElementGraphicalType)) && (registry.isKnownEdgeType(domainElementGraphicalType))) {
+ // Cannot use createEdge from super class as it never take the graphical type (semanticHint) into account.
+ // createdEdge = super.createEdge(semanticAdapter, containerView, domainElementGraphicalType, index, persisted, preferencesHint);
+ if (ElementTypes.COMMENT_ANNOTATED_ELEMENT.getSemanticHint().equals(domainElementGraphicalType)) {
+ createdEdge = createComment_AnnotatedElementEdge(containerView, index, persisted, preferencesHint);
+ }
+ if (ElementTypes.CONSTRAINT_CONSTRAINED_ELEMENT.getSemanticHint().equals(domainElementGraphicalType)) {
+ createdEdge = createConstraint_ConstrainedElementEdge(containerView, index, persisted, preferencesHint);
+ }
+ }
+ }
+ if (createdEdge == null) {
+ log.error(new Exception("Could not create Edge."));
+ }
+ return createdEdge;
+ }
+
+ @Override
+ protected boolean provides(CreateViewForKindOperation op) {
+ // Never use this method (often incorrectly implemented due to GMF Tooling choices).
+ String diagramType = op.getContainerView().getDiagram().getType();
+ if (!ElementTypes.DIAGRAM_ID.equals(diagramType)) {
+ return false;
+ }
+ throw new UnsupportedOperationException("Should never be called by the " + diagramType + " diagram.");
+ }
+
+ @Override
+ protected boolean provides(CreateEdgeViewOperation op) {
+ // Must have a container
+ if (op.getContainerView() == null) {
+ return false;
+ }
+ // This provider is registered for BlockDefinition Diagram only
+ String diagramType = op.getContainerView().getDiagram().getType();
+ if (!ElementTypes.DIAGRAM_ID.equals(diagramType)) {
+ return false;
+ }
+ IElementType elementType = getSemanticElementType(op.getSemanticAdapter());
+ if (elementType == ElementTypes.COMMENT_ANNOTATED_ELEMENT) {
+ return true;
+ }
+ if (elementType == ElementTypes.CONSTRAINT_CONSTRAINED_ELEMENT) {
+ return true;
+ }
+
+ // IElementType may be null (especially when drop from ModelExplorer).
+ // In such a case, test the semantic EObject instead.
+ if (elementType == null) {
+ EObject domainElement = (EObject) op.getSemanticAdapter().getAdapter(EObject.class);
+ String domainElementGraphicalType = op.getSemanticHint();
+ if (domainElementGraphicalType == null) {
+ domainElementGraphicalType = registry.getEdgeGraphicalType(domainElement);
+ }
+ if ((!org.eclipse.papyrus.infra.gmfdiag.common.providers.IGraphicalTypeRegistry.UNDEFINED_TYPE.equals(domainElementGraphicalType)) && (registry.isKnownEdgeType(domainElementGraphicalType))) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ @Override
+ protected boolean provides(CreateNodeViewOperation op) {
+ // Must have a container
+ if (op.getContainerView() == null) {
+ return false;
+ }
+ // Get the type of the container
+ String containerGraphicalType = op.getContainerView().getType();
+ // This provider is registered for BlockDefinition Diagram only
+ String diagramType = op.getContainerView().getDiagram().getType();
+ if (!ElementTypes.DIAGRAM_ID.equals(diagramType)) {
+ return false;
+ }
+ // /////////////////////////////////////////////////////////////////////
+ // Test possibility to provide a view based on the ElementType and its expected container.
+ // /////////////////////////////////////////////////////////////////////
+ IElementType elementType = (IElementType) op.getSemanticAdapter().getAdapter(IElementType.class);
+ if (elementType == UMLElementTypes.MODEL) {
+ if (ElementTypes.DIAGRAM_ID.equals(containerGraphicalType)) {
+ return true;
+ }
+ if (ElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) {
+ return true;
+ }
+ if (ElementTypes.MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) {
+ return true;
+ }
+ if (ElementTypes.MODEL_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) {
+ return true;
+ }
+ if (ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) {
+ return true;
+ }
+ return false;
+ }
+ if (elementType == UMLElementTypes.PACKAGE) {
+ if (ElementTypes.DIAGRAM_ID.equals(containerGraphicalType)) {
+ return true;
+ }
+ if (ElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) {
+ return true;
+ }
+ if (ElementTypes.MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) {
+ return true;
+ }
+ if (ElementTypes.MODEL_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) {
+ return true;
+ }
+ if (ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) {
+ return true;
+ }
+ return false;
+ }
+ if (elementType == UMLElementTypes.INSTANCE_SPECIFICATION) {
+ if (ElementTypes.DIAGRAM_ID.equals(containerGraphicalType)) {
+ return true;
+ }
+ if (ElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) {
+ return true;
+ }
+ if (ElementTypes.MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) {
+ return true;
+ }
+ if (ElementTypes.MODEL_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) {
+ return true;
+ }
+ if (ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) {
+ return true;
+ }
+ return false;
+ }
+ if (elementType == UMLElementTypes.CONSTRAINT) {
+ if (ElementTypes.DIAGRAM_ID.equals(containerGraphicalType)) {
+ return true;
+ }
+ if (ElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) {
+ return true;
+ }
+ if (ElementTypes.MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) {
+ return true;
+ }
+ if (ElementTypes.MODEL_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) {
+ return true;
+ }
+ if (ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) {
+ return true;
+ }
+ return false;
+ }
+ if (elementType == UMLElementTypes.COMMENT) {
+ if (ElementTypes.DIAGRAM_ID.equals(containerGraphicalType)) {
+ return true;
+ }
+ if (ElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) {
+ return true;
+ }
+ if (ElementTypes.MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) {
+ return true;
+ }
+ if (ElementTypes.MODEL_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) {
+ return true;
+ }
+ if (ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) {
+ return true;
+ }
+ return false;
+ }
+ if (elementType == UMLElementTypes.SLOT) {
+ if (ElementTypes.INSTANCE_SPECIFICATION_COMPARTMENT_SLOT_HINT.equals(containerGraphicalType)) {
+ return true;
+ }
+ if (ElementTypes.INSTANCE_SPECIFICATION_CN_COMPARTMENT_SLOT_HINT.equals(containerGraphicalType)) {
+ return true;
+ }
+ return false;
+ }
+
+ // IElementType may be null (especially when drop from ModelExplorer).
+ // In such a case, test the semantic EObject instead.
+ if (elementType == null) {
+ EObject domainElement = (EObject) op.getSemanticAdapter().getAdapter(EObject.class);
+ String domainElementGraphicalType = op.getSemanticHint();
+ if (domainElementGraphicalType == null) {
+ domainElementGraphicalType = registry.getNodeGraphicalType(domainElement, containerGraphicalType);
+ } else {
+ domainElementGraphicalType = registry.getNodeGraphicalType(domainElementGraphicalType, containerGraphicalType);
+ }
+ if ((!org.eclipse.papyrus.infra.gmfdiag.common.providers.IGraphicalTypeRegistry.UNDEFINED_TYPE.equals(domainElementGraphicalType)) && (registry.isKnownNodeType(domainElementGraphicalType))) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ @Override
+ public Node createNode(IAdaptable semanticAdapter, View containerView, String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) {
+ // Use the GraphicalTypeRegistry to find the expected type for a domain element
+ // Get the type of the container
+ String containerGraphicalType = containerView.getType();
+ // Get the type of the domain element
+ EObject domainElement = (EObject) semanticAdapter.getAdapter(EObject.class);
+ if (semanticHint != null) {
+ // Look for a possible graphicalType replacement
+ String graphicalType = registry.getNodeGraphicalType(semanticHint, containerGraphicalType);
+ return super.createNode(new SemanticAdapter(domainElement, null), containerView, graphicalType, index, persisted, preferencesHint);
+ }
+ String domainElementGraphicalType = registry.getNodeGraphicalType(domainElement, containerGraphicalType);
+ // if(semanticHint != null) {
+ // return super.createNode(semanticAdapter, containerView, semanticHint, index, persisted, preferencesHint);
+ // }
+ //
+ // // Use the GraphicalTypeRegistry to find the expected type for a domain element
+ // // Get the type of the container
+ // String containerGraphicalType = containerView.getType();
+ // // Get the type of the domain element
+ // EObject domainElement = (EObject)semanticAdapter.getAdapter(EObject.class);
+ // String domainElementGraphicalType = registry.getNodeGraphicalType(domainElement, containerGraphicalType);
+ // Create the expected node
+ if (!org.eclipse.papyrus.infra.gmfdiag.common.providers.IGraphicalTypeRegistry.UNDEFINED_TYPE.equals(domainElementGraphicalType)) {
+ return super.createNode(semanticAdapter, containerView, domainElementGraphicalType, index, persisted, preferencesHint);
+ }
+ log.error(new Exception("Could not create Node."));
+ return null;
+ }
+
+ @Override
+ protected void stampShortcut(View containerView, Node target) {
+ if (!ElementTypes.DIAGRAM_ID.equals(containerView.getDiagram().getType())) {
+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation();
+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$
+ shortcutAnnotation.getDetails().put("modelID", ElementTypes.DIAGRAM_ID); //$NON-NLS-1$
+ target.getEAnnotations().add(shortcutAnnotation);
+ }
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/BlockDefinitionDiagramCondition.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/BlockDefinitionDiagramCondition.java
new file mode 100755
index 0000000..0e2f1d6
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/BlockDefinitionDiagramCondition.java
@@ -0,0 +1,32 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Laurent Wouters (CEA LIST) laurent.wouters@cea.fr - Viewpoints application
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.infra.ui.extension.commands.PerspectiveContextDependence;
+
+/**
+ * BlockDefinitionDiagramCondition to set conditions for the diagram creation
+ */
+public class BlockDefinitionDiagramCondition extends PerspectiveContextDependence {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean create(EObject selectedElement) {
+ return false;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/command/CustomDeleteCommand.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/command/CustomDeleteCommand.java
new file mode 100755
index 0000000..d3db6c1
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/command/CustomDeleteCommand.java
@@ -0,0 +1,59 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.command;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+
+/**
+ *
+ * <UL>
+ * The purpose of this command is to delete view by taking following situation:
+ * <LI>if the view is placed direclty on the diagram, do nothing
+ * <LI>if the view is placed into another container, the semantic of the container must be the parent of the semantic view
+ * </UL>
+ */
+public class CustomDeleteCommand extends DeleteCommand {
+
+ public CustomDeleteCommand(TransactionalEditingDomain editingDomain, View view) {
+ super(editingDomain, view);
+ }
+
+ @Override
+ protected IStatus doExecute(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ String containerType = ViewUtil.getViewContainer(getView()) != null ? ViewUtil.getViewContainer(getView()).getType() : null;
+ if ((containerType != null) && !ElementTypes.DIAGRAM_ID.equals(containerType)) {
+ // if the associated element is different of null
+ if (getView().getElement() != null) {
+ // if the container is different of null
+ if (ViewUtil.getContainerView(getView()) != null && ViewUtil.getContainerView(getView()).getElement() != null) {
+ // if the parent of the current element is different of the semantic element of the parent view we have to destroy
+ if (!getView().getElement().eContainer().equals(ViewUtil.getContainerView(getView()).getElement())) {
+ return super.doExecute(monitor, info);
+ }
+
+ }
+ }
+ }
+ return Status.OK_STATUS;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/dnd/helper/CustomLinkMappingHelper.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/dnd/helper/CustomLinkMappingHelper.java
new file mode 100755
index 0000000..1aeb7e1
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/dnd/helper/CustomLinkMappingHelper.java
@@ -0,0 +1,140 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.dnd.helper;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.gmf.diagram.common.edit.policy.ILinkMappingHelper;
+import org.eclipse.papyrus.uml.diagram.common.dnd.helper.LinkMappingHelper.CommonSourceUMLSwitch;
+import org.eclipse.papyrus.uml.diagram.common.dnd.helper.LinkMappingHelper.CommonTargetUMLSwitch;
+import org.eclipse.uml2.uml.Classifier;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Type;
+
+/**
+ * The Class LinkMappingHelper is specialization of the link mapping helper for the Class diagram
+ */
+public class CustomLinkMappingHelper implements ILinkMappingHelper {
+
+ /**
+ * {@inheritDoc}
+ */
+ public Collection<?> getSource(Element link) {
+ CommonSourceUMLSwitch umlSwitch = new CommonSourceUMLSwitch() {
+
+ @Override
+ public java.util.Collection<?> caseAssociation(org.eclipse.uml2.uml.Association object) {
+
+ java.util.Collection<?> ends = Collections.emptySet();
+
+ // Binary associations only in this diagram.
+ // Other expectation:
+ // - property ends are typed by Classifiers
+ // - property ends are type is not null
+
+ if (object.getMemberEnds().size() == 2) {
+
+ Property semanticTarget = object.getMemberEnds().get(1);
+
+ // The proposed graphical target is a representation of the type of
+ // the semantic source.
+ Type sourceType = semanticTarget.getType();
+ if ((sourceType != null) && (sourceType instanceof Classifier)) {
+ ends = Arrays.asList(new EObject[] { sourceType });
+ }
+
+ } else {
+ // TODO: log warning here - can only drop binary associations in this diagram...
+ }
+
+ return ends;
+ };
+
+ // public java.util.Collection<?> caseAssociationClass(org.eclipse.uml2.uml.AssociationClass object) {
+ // return object.getEndTypes();
+ // };
+
+ // public java.util.Collection<?> caseGeneralizationSet(org.eclipse.uml2.uml.GeneralizationSet object) {
+ // return object.getGeneralizations();
+ // };
+
+ @Override
+ public java.util.Collection<?> caseInterfaceRealization(org.eclipse.uml2.uml.InterfaceRealization object) {
+ ArrayList<EObject> result = new ArrayList<EObject>();
+ result.add(object.getImplementingClassifier());
+ return result;
+ };
+
+ };
+ return umlSwitch.doSwitch(link);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Collection<?> getTarget(Element link) {
+ CommonTargetUMLSwitch umlSwitch = new CommonTargetUMLSwitch() {
+
+ @Override
+ public java.util.Collection<?> caseAssociation(org.eclipse.uml2.uml.Association object) {
+
+ java.util.Collection<?> ends = Collections.emptySet();
+
+ // Binary associations only in this diagram.
+ // Other expectation:
+ // - property ends are typed by Classifiers
+ // - property ends are type is not null
+
+ if (object.getMemberEnds().size() == 2) {
+
+ Property semanticSource = object.getMemberEnds().get(0);
+
+ // The proposed graphical target is a representation of the type of
+ // the semantic source.
+ Type sourceType = semanticSource.getType();
+ if ((sourceType != null) && (sourceType instanceof Classifier)) {
+ ends = Arrays.asList(new EObject[] { sourceType });
+ }
+
+ } else {
+ // TODO: log warning here - can only drop binary associations in this diagram...
+ }
+
+ return ends;
+ };
+
+ // public java.util.Collection<?> caseAssociationClass(org.eclipse.uml2.uml.AssociationClass object) {
+ // return object.getEndTypes();
+ // };
+
+ // public java.util.Collection<?> caseGeneralizationSet(org.eclipse.uml2.uml.GeneralizationSet object) {
+ // return object.getGeneralizations();
+ // };
+
+ @Override
+ public java.util.Collection<?> caseInterfaceRealization(org.eclipse.uml2.uml.InterfaceRealization object) {
+ ArrayList<EObject> result = new ArrayList<EObject>();
+ result.add(object.getContract());
+ return result;
+ };
+
+ };
+ return umlSwitch.doSwitch(link);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/edit/policy/CustomBlockCompositeSemanticEditPolicy.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/edit/policy/CustomBlockCompositeSemanticEditPolicy.java
new file mode 100755
index 0000000..64186cf
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/edit/policy/CustomBlockCompositeSemanticEditPolicy.java
@@ -0,0 +1,114 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Gabriel Pascual (ALL4TEC) gabriel.pascual@all4tec.net - Bug 446668
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.edit.policy;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.gmf.diagram.common.provider.IGraphicalTypeRegistry;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.CustomGraphicalTypeRegistry;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.GraphicalTypeRegistry;
+import org.eclipse.papyrus.sysml.diagram.common.edit.policy.BlockCompositeSemanticEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLCreateOrShowExistingElementHelper;
+import org.eclipse.papyrus.uml.diagram.common.helper.CreateOrShowExistingElementHelper;
+import org.eclipse.papyrus.uml.service.types.command.CommentAnnotatedElementsCreateCommand;
+import org.eclipse.papyrus.uml.service.types.command.CommentAnnotatedElementsReorientCommand;
+import org.eclipse.papyrus.uml.service.types.command.ConstraintConstrainedElementsCreateCommand;
+import org.eclipse.papyrus.uml.service.types.command.ConstraintConstrainedElementsReorientCommand;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * <pre>
+ * Custom semantic edit policy that replace DefaultSemanticEditPolicy
+ * in order to manage Class Diagram specific elements (reference
+ * relationships COMMENT_ANNOTATED_ELEMENT and CONSTRAINT_CONSTRAINED_ELEMENT).
+ * </pre>
+ */
+public class CustomBlockCompositeSemanticEditPolicy extends BlockCompositeSemanticEditPolicy {
+
+ /** Local graphical type registry for graphical elements */
+ private IGraphicalTypeRegistry registry = new CustomGraphicalTypeRegistry();
+
+ /** Local graphical type registry for inherited graphical elements */
+ private IGraphicalTypeRegistry inheritedRegistry = new GraphicalTypeRegistry();
+
+ private CreateOrShowExistingElementHelper existingElementHelper = new SysMLCreateOrShowExistingElementHelper();
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+
+ if (ElementTypes.COMMENT_ANNOTATED_ELEMENT == req.getElementType()) {
+ return getGEFWrapper(new CommentAnnotatedElementsCreateCommand(req));
+ }
+
+ if (ElementTypes.CONSTRAINT_CONSTRAINED_ELEMENT == req.getElementType()) {
+ return getGEFWrapper(new ConstraintConstrainedElementsCreateCommand(req));
+ }
+
+ String newEdgeGraphicalType = registry.getEdgeGraphicalType(req.getElementType());
+
+ if (inheritedRegistry.isKnownEdgeType(newEdgeGraphicalType)) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ if (!registry.isKnownEdgeType(newEdgeGraphicalType)) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ final Command defaultCommand = super.getCreateRelationshipCommand(req);
+ final IElementType elementType = req.getElementType();
+ final EClass eClass = elementType.getEClass();
+ if (defaultCommand.canExecute()) {
+ if (elementType.getEClass() == UMLPackage.eINSTANCE.getAssociation()) {
+ return this.existingElementHelper.getCreateOrRestoreElementCommand(req, defaultCommand, elementType);
+ } else if (eClass == UMLPackage.eINSTANCE.getDependency()) {
+ return this.existingElementHelper.getCreateOrRestoreElementCommand(req, defaultCommand, elementType);
+ } else if (eClass == UMLPackage.eINSTANCE.getGeneralization()) {
+ return this.existingElementHelper.getCreateOrRestoreElementCommand(req, defaultCommand, elementType);
+ } else if (eClass == UMLPackage.eINSTANCE.getUsage()) {
+ return this.existingElementHelper.getCreateOrRestoreElementCommand(req, defaultCommand, elementType);
+ }
+ }
+ return defaultCommand;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
+
+ View reconnectedView = (View) req.getParameter(org.eclipse.papyrus.infra.services.edit.utils.RequestParameterConstants.GRAPHICAL_RECONNECTED_EDGE);
+ String reconnectedViewType = (reconnectedView != null) ? reconnectedView.getType() : org.eclipse.papyrus.infra.gmfdiag.common.providers.IGraphicalTypeRegistry.UNDEFINED_TYPE;
+
+ if (ElementTypes.COMMENT_ANNOTATED_ELEMENT.getSemanticHint().equals(reconnectedViewType)) {
+ return getGEFWrapper(new CommentAnnotatedElementsReorientCommand(req));
+ }
+
+ if (ElementTypes.CONSTRAINT_CONSTRAINED_ELEMENT.getSemanticHint().equals(reconnectedViewType)) {
+ return getGEFWrapper(new ConstraintConstrainedElementsReorientCommand(req));
+ }
+
+ return super.getReorientReferenceRelationshipCommand(req);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/edit/policy/CustomDefaultSemanticEditPolicy.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/edit/policy/CustomDefaultSemanticEditPolicy.java
new file mode 100755
index 0000000..2f02cec
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/edit/policy/CustomDefaultSemanticEditPolicy.java
@@ -0,0 +1,115 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.edit.policy;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.gmf.diagram.common.provider.IGraphicalTypeRegistry;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.CustomGraphicalTypeRegistry;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.GraphicalTypeRegistry;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLCreateOrShowExistingElementHelper;
+import org.eclipse.papyrus.uml.diagram.common.helper.CreateOrShowExistingElementHelper;
+import org.eclipse.papyrus.uml.service.types.command.CommentAnnotatedElementsCreateCommand;
+import org.eclipse.papyrus.uml.service.types.command.CommentAnnotatedElementsReorientCommand;
+import org.eclipse.papyrus.uml.service.types.command.ConstraintConstrainedElementsCreateCommand;
+import org.eclipse.papyrus.uml.service.types.command.ConstraintConstrainedElementsReorientCommand;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * <pre>
+ * Custom semantic edit policy that replace DefaultSemanticEditPolicy
+ * in order to manage Class Diagram specific elements (reference
+ * relationships COMMENT_ANNOTATED_ELEMENT and CONSTRAINT_CONSTRAINED_ELEMENT).
+ * </pre>
+ */
+public class CustomDefaultSemanticEditPolicy extends DefaultSemanticEditPolicy {
+
+ /** Local graphical type registry for graphical elements */
+ private IGraphicalTypeRegistry registry = new CustomGraphicalTypeRegistry();
+
+ /** Local graphical type registry for inherited graphical elements */
+ private IGraphicalTypeRegistry inheritedRegistry = new GraphicalTypeRegistry();
+
+ private CreateOrShowExistingElementHelper existingElementHelper = new SysMLCreateOrShowExistingElementHelper();
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+
+ if (ElementTypes.COMMENT_ANNOTATED_ELEMENT == req.getElementType()) {
+ return getGEFWrapper(new CommentAnnotatedElementsCreateCommand(req));
+ }
+
+ if (ElementTypes.CONSTRAINT_CONSTRAINED_ELEMENT == req.getElementType()) {
+ return getGEFWrapper(new ConstraintConstrainedElementsCreateCommand(req));
+ }
+
+ String newEdgeGraphicalType = registry.getEdgeGraphicalType(req.getElementType());
+
+ if (inheritedRegistry.isKnownEdgeType(newEdgeGraphicalType)) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ if (!registry.isKnownEdgeType(newEdgeGraphicalType)) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ final Command defaultCommand = super.getCreateRelationshipCommand(req);
+ if (defaultCommand.canExecute() && req.getSource() != null && req.getTarget() != null) {
+ final EClass eClass = req.getElementType().getEClass();
+ final IElementType elementType = req.getElementType();
+ if (UMLPackage.eINSTANCE.getInterfaceRealization() == eClass) {
+ return this.existingElementHelper.getCreateOrRestoreElementCommand(req, defaultCommand, elementType);
+ } else if (elementType.getEClass() == UMLPackage.eINSTANCE.getAssociation()) {
+ return this.existingElementHelper.getCreateOrRestoreElementCommand(req, defaultCommand, elementType);
+ } else if (eClass == UMLPackage.eINSTANCE.getDependency()) {
+ return this.existingElementHelper.getCreateOrRestoreElementCommand(req, defaultCommand, elementType);
+ } else if (eClass == UMLPackage.eINSTANCE.getGeneralization()) {
+ return this.existingElementHelper.getCreateOrRestoreElementCommand(req, defaultCommand, elementType);
+ } else if (eClass == UMLPackage.eINSTANCE.getUsage()) {
+ return this.existingElementHelper.getCreateOrRestoreElementCommand(req, defaultCommand, elementType);
+ }
+ }
+ return defaultCommand;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
+
+ View reconnectedView = (View) req.getParameter(org.eclipse.papyrus.infra.services.edit.utils.RequestParameterConstants.GRAPHICAL_RECONNECTED_EDGE);
+ String reconnectedViewType = (reconnectedView != null) ? reconnectedView.getType() : org.eclipse.papyrus.infra.gmfdiag.common.providers.IGraphicalTypeRegistry.UNDEFINED_TYPE;
+
+ if (ElementTypes.COMMENT_ANNOTATED_ELEMENT.getSemanticHint().equals(reconnectedViewType)) {
+ return getGEFWrapper(new CommentAnnotatedElementsReorientCommand(req));
+ }
+
+ if (ElementTypes.CONSTRAINT_CONSTRAINED_ELEMENT.getSemanticHint().equals(reconnectedViewType)) {
+ return getGEFWrapper(new ConstraintConstrainedElementsReorientCommand(req));
+ }
+
+ return super.getReorientReferenceRelationshipCommand(req);
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/edit/policy/CustomDiagramDragDropEditPolicy.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/edit/policy/CustomDiagramDragDropEditPolicy.java
new file mode 100755
index 0000000..a715b26
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/edit/policy/CustomDiagramDragDropEditPolicy.java
@@ -0,0 +1,316 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.edit.policy;
+
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.CommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest;
+import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.ISpecializationType;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.gmf.diagram.common.commands.IdentityCommandWithNotification;
+import org.eclipse.papyrus.gmf.diagram.common.edit.policy.CommonDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.infra.widgets.toolbox.notification.Type;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.dnd.helper.CustomLinkMappingHelper;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.messages.Messages;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.CustomGraphicalTypeRegistry;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.helper.InstanceSpecificationLinkHelper;
+import org.eclipse.papyrus.uml.diagram.common.commands.CommonDeferredCreateConnectionViewCommand;
+import org.eclipse.papyrus.uml.diagram.common.commands.SemanticAdapter;
+import org.eclipse.uml2.uml.Association;
+import org.eclipse.uml2.uml.AssociationClass;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.InstanceSpecification;
+import org.eclipse.uml2.uml.TypedElement;
+
+/**
+ * Custom diagram drag drop edit policy for elements handling drop in the Block Definition Diagram.
+ */
+public class CustomDiagramDragDropEditPolicy extends CommonDiagramDragDropEditPolicy {
+
+ /** Default constructor. */
+ public CustomDiagramDragDropEditPolicy() {
+ super(new CustomLinkMappingHelper());
+ registry = new CustomGraphicalTypeRegistry();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Set<String> getSpecificDropBehaviorTypes() {
+ Set<String> result = new HashSet<String>();
+ result.add(ElementTypes.INSTANCE_SPECIFICATION.getSemanticHint());
+ result.add(ElementTypes.INSTANCE_SPECIFICATION_LINK.getSemanticHint());
+ return result;
+ }
+
+ @Override
+ protected ICommand getSpecificDropCommand(DropObjectsRequest dropRequest, EObject droppedEObject, String nodeType, String edgeType) {
+ if (ElementTypes.INSTANCE_SPECIFICATION.getSemanticHint().equalsIgnoreCase(nodeType) ||
+ ElementTypes.INSTANCE_SPECIFICATION_LINK.getSemanticHint().equalsIgnoreCase(edgeType)) {
+ return new CommandProxy(dropInstanceSpecification(nodeType, dropRequest, droppedEObject));
+ }
+ return super.getSpecificDropCommand(dropRequest, droppedEObject, nodeType, edgeType);
+ }
+
+ /**
+ * drop a instance specification as a link or as a node
+ *
+ * @param dropRequest
+ * the drop request
+ * @param droppedEObject
+ * the element
+ * @param edgeType
+ * the edge type
+ * @return the command in charge of the drop
+ */
+ protected Command dropInstanceSpecification(String droppedNodeType, DropObjectsRequest dropRequest, EObject droppedEObject) {
+ if (false == droppedEObject instanceof InstanceSpecification) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ // Drop as link
+ List<InstanceSpecification> endTypes = InstanceSpecificationLinkHelper.getEnds(((InstanceSpecification) droppedEObject));
+ if (endTypes.size() > 0) {
+ Element source = endTypes.get(0);
+ Element target = endTypes.get(1);
+ return new ICommandProxy(dropBinaryLink(new CompositeCommand("drop InstanceSpecification link"), source, target, ElementTypes.INSTANCE_SPECIFICATION_LINK.getSemanticHint(), dropRequest.getLocation(), (Element) droppedEObject));
+ }
+ // Drop as node
+ return new ICommandProxy(getDefaultDropNodeCommand(droppedNodeType, droppedEObject, dropRequest.getLocation()));
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected ICommand getUnknownDropCommand(DropObjectsRequest dropRequest, EObject droppedEObject) {
+
+ // Add a notification message in case an attempt to drop a UML Association in this diagram occurs.
+ if ((droppedEObject instanceof Association) && !(droppedEObject instanceof AssociationClass)) {
+ if (!((ISpecializationType) SysMLElementTypes.ASSOCIATION).getMatcher().matches(droppedEObject)) {
+ return new IdentityCommandWithNotification(Messages.Notification_Drop_Title, NLS.bind(Messages.Notification_Drop_UMLAssociationWarning, EMFCoreUtil.getQualifiedName(droppedEObject, true)), Type.WARNING);
+ }
+ }
+
+ return super.getUnknownDropCommand(dropRequest, droppedEObject);
+ }
+
+ /**
+ * the method provides command to create the binary link into the diagram.
+ * If the source and the target views do not exist, these views will be
+ * created.
+ *
+ * @param cc
+ * the composite command that will contain the set of command to
+ * create the binary link
+ * @param source
+ * the source the element source of the link
+ * @param target
+ * the target the element target of the link
+ * @param edgeType
+ * the edge type used to create the view
+ * @param location
+ * the location the location where the view will be be created
+ * @param semanticLink
+ * the semantic link that will be attached to the view
+ *
+ * @return the composite command
+ */
+ protected CompositeCommand dropBinaryLink(CompositeCommand cc, Element source, Element target, String edgeType, Point absoluteLocation, Element semanticLink) {
+ IAdaptable sourceViewAdapter = findAdapter(cc, source, getLinkSourceDropLocation(absoluteLocation, source, target), edgeType);
+ IAdaptable targetViewAdapter = findAdapter(cc, target, getLinkTargetDropLocation(absoluteLocation, source, target), edgeType);
+
+ CreateConnectionViewRequest.ConnectionViewDescriptor linkdescriptor = new CreateConnectionViewRequest.ConnectionViewDescriptor(getElementType(edgeType, semanticLink), edgeType, getDiagramPreferencesHint());
+ CommonDeferredCreateConnectionViewCommand createConnectionViewCommand = new CommonDeferredCreateConnectionViewCommand(getEditingDomain(), edgeType, sourceViewAdapter, targetViewAdapter, getViewer(), getDiagramPreferencesHint(), linkdescriptor, null);
+ createConnectionViewCommand.setElement(semanticLink);
+ cc.compose(createConnectionViewCommand);
+ return cc;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ protected IAdaptable getElementType(String elementID, Element semanticLink) {
+ IElementType result = ElementTypes.getElementTypeByID(elementID);
+ return result == null ? new SemanticAdapter(semanticLink, null) : result;
+ }
+
+ /**
+ * This method allows to specify a location for the creation of a node at
+ * the source of a dropped link. Overriding implementations must not modify
+ * the absoluteLocation parameter (use {@link Point#getCopy()})
+ *
+ * @param absoluteLocation
+ * the request's drop location
+ * @param source
+ * the source of the dropped link
+ * @param target
+ * the target of the dropped link
+ * @return the new location for the node
+ */
+ protected Point getLinkSourceDropLocation(Point absoluteLocation, Element source, Element target) {
+ return absoluteLocation;
+ }
+
+ /**
+ * This method allows to specify a location for the creation of a node at
+ * the target of a dropped link. Overriding implementations must not modify
+ * the absoluteLocation parameter (use {@link Point#getCopy()})
+ *
+ * @param absoluteLocation
+ * the request's drop location
+ * @param source
+ * the source of the dropped link
+ * @param target
+ * the target of the dropped link
+ * @return the new location for the node
+ */
+ protected Point getLinkTargetDropLocation(Point absoluteLocation, Element source, Element target) {
+ if (lookForEditPart(source) == null && lookForEditPart(target) == null) {
+ return absoluteLocation.getTranslated(100, 0);
+ }
+ return absoluteLocation;
+ }
+
+ /**
+ * the method provides command to create the binary link into the diagram.
+ * Find source/target adapter
+ * If the source and the target views do not exist, these views will be
+ * created.
+ *
+ * @see dropBinaryLink(CompositeCommand cc, Element source, Element target, int linkVISUALID
+ * , Point absoluteLocation, Element semanticLink)
+ *
+ * @param cc
+ * the composite command that will contain the set of command to
+ * create the binary link
+ * @param source
+ * source/target link node
+ * @param point
+ * source/target node location
+ */
+ private IAdaptable findAdapter(CompositeCommand cc, Element source, Point dropLocation, String edgeType) {
+ GraphicalEditPart editPart = (GraphicalEditPart) lookForEditPart(source);
+ if (editPart != null) {
+ return new SemanticAdapter(null, editPart.getModel());
+ }
+ ICommand createCommand = getDefaultDropNodeCommand(edgeType, dropLocation, source);
+ cc.add(createCommand);
+ return (IAdaptable) createCommand.getCommandResult().getReturnValue();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ protected EditPart lookForEditPart(EObject semantic) {
+ return lookForEditPart(semantic, false);
+ }
+
+ /**
+ * Look for editPart from his semantic.
+ *
+ * @param semantic
+ * the semantic
+ *
+ * @return the edits the part or null if not found
+ */
+ protected EditPart lookForEditPart(EObject semantic, boolean byType) {
+ Collection<EditPart> editPartSet = getHost().getViewer().getEditPartRegistry().values();
+ Iterator<EditPart> editPartIterator = editPartSet.iterator();
+ while (editPartIterator.hasNext()) {
+ EditPart nextEditPart = editPartIterator.next();
+ if (false == isEditPartTypeAdapted(nextEditPart.getClass(), semantic.eClass())) {
+ continue;
+ }
+ EObject nextSemantic = ((GraphicalEditPart) nextEditPart).resolveSemanticElement();
+ if (semantic.equals(nextSemantic)) {
+ return nextEditPart;
+ }
+ if (byType && nextSemantic instanceof TypedElement && ((TypedElement) nextSemantic).getType() != null) {
+ EObject nextSemanticType = ((TypedElement) nextSemantic).getType();
+ if (semantic.equals(nextSemanticType)) {
+ return nextEditPart;
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Check if the edit part type is the best one to represent an object of the
+ * given EClass type
+ *
+ * @param editPartClass
+ * the type of EditPart which may represent a semantic element
+ * @param eClass
+ * the EClass type of the represented semantic element
+ * @return true if an edit part of this type should be selected
+ */
+ private boolean isEditPartTypeAdapted(Class<? extends EditPart> editPartClass, EClass eClass) {
+ if (DiagramEditPart.class.isAssignableFrom(editPartClass) || CompartmentEditPart.class.isAssignableFrom(editPartClass)) {
+ // the edit part is disqualified, as a compartment or a diagram can
+ // not be dropped
+ return false;
+ } else if (GraphicalEditPart.class.isAssignableFrom(editPartClass)) {
+ // check the edit part type against advised ones
+ return isEditPartTypeSuitableForEClass(editPartClass.asSubclass(GraphicalEditPart.class), eClass);
+ } else {
+ // only a GraphicalEditPart must be selected
+ return false;
+ }
+ }
+
+ /**
+ * Check if an edit part type correctly represent a semantic element of the
+ * given EClass. Subclasses should implement this method to restrict the
+ * possibilities during drop of a link. If an edit part is not of a suitable
+ * type, returning false will eliminate it to represent the element as a
+ * source or target edit part. This can be used for example to disable label
+ * edit parts, which may represent the same model element as the main node.
+ *
+ * @param editPartClass
+ * the type of EditPart which must be checked
+ * @param eClass
+ * the EClass type of the element which the edit part must
+ * represent
+ * @return the only edit part type which can be selected (return a common
+ * super type if several edit parts can be chosen)
+ */
+ protected boolean isEditPartTypeSuitableForEClass(Class<? extends GraphicalEditPart> editPartClass, EClass eClass) {
+ return true;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/edit/policy/PackageCreationEditPolicy.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/edit/policy/PackageCreationEditPolicy.java
new file mode 100755
index 0000000..6242c6f
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/edit/policy/PackageCreationEditPolicy.java
@@ -0,0 +1,115 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.edit.policy;
+
+import java.util.Iterator;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.requests.ChangeBoundsRequest;
+import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.diagram.ui.commands.CommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GroupEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.LabelEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramUIMessages;
+import org.eclipse.gmf.runtime.diagram.ui.requests.EditCommandRequestWrapper;
+import org.eclipse.gmf.runtime.emf.type.core.requests.MoveRequest;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
+
+/**
+ * this editpolicy allow graphical and semantic reparent for contained elements
+ *
+ */
+
+public class PackageCreationEditPolicy extends DefaultCreationEditPolicy {
+
+ /**
+ * return a command to reparent both the semantic and view elements.
+ *
+ * @param request
+ * the request
+ * @return command
+ */
+ @Override
+ protected Command getReparentCommand(ChangeBoundsRequest request) {
+ Iterator<EditPart> editParts = request.getEditParts().iterator();
+ View container = (View) getHost().getAdapter(View.class);
+ EObject context = container == null ? null : ViewUtil.resolveSemanticElement(container);
+ CompositeCommand cc = new CompositeCommand(DiagramUIMessages.AddCommand_Label);
+ while (editParts.hasNext()) {
+ EditPart ep = editParts.next();
+ if (ep instanceof LabelEditPart) {
+ continue;
+ }
+ if (ep instanceof GroupEditPart) {
+ cc.compose(getReparentGroupCommand((GroupEditPart) ep));
+ }
+ View view = (View) ep.getAdapter(View.class);
+ if (view == null) {
+ continue;
+ }
+
+ EObject semantic = ViewUtil.resolveSemanticElement(view);
+ if (semantic == null) {
+ cc.compose(getReparentViewCommand((IGraphicalEditPart) ep));
+ }
+ else if (context != null && shouldReparent(semantic, context)) {
+ cc.compose(getReparentCommand((IGraphicalEditPart) ep));
+ }
+ }
+ return cc.isEmpty() ? null : new ICommandProxy(cc.reduce());
+ }
+
+
+ /**
+ * change the order of the move, first graphical, then semantic to launch behavior about editservice {@inheritDoc}
+ */
+ @Override
+ protected ICommand getReparentCommand(IGraphicalEditPart gep) {
+ CompositeCommand cc = new CompositeCommand(DiagramUIMessages.AddCommand_Label);
+ View container = (View) getHost().getModel();
+ EObject context = ViewUtil.resolveSemanticElement(container);
+ View view = (View) gep.getModel();
+ EObject element = ViewUtil.resolveSemanticElement(view);
+
+ TransactionalEditingDomain editingDomain = ((IGraphicalEditPart) getHost())
+ .getEditingDomain();
+ //
+ // notation
+ cc.compose(getReparentViewCommand(gep));
+ //
+ // semantic
+ if (element != null) {
+ Command moveSemanticCmd =
+ getHost().getCommand(
+ new EditCommandRequestWrapper(
+ new MoveRequest(editingDomain, context, element)));
+
+ if (moveSemanticCmd == null) {
+ return org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand.INSTANCE;
+ }
+
+ cc.compose(new CommandProxy(moveSemanticCmd));
+ }
+
+ return cc;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/edit/policy/PackageSemanticEditPolicy.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/edit/policy/PackageSemanticEditPolicy.java
new file mode 100755
index 0000000..8b8ba57
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/edit/policy/PackageSemanticEditPolicy.java
@@ -0,0 +1,53 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.edit.policy;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.emf.type.core.commands.MoveElementsCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.MoveRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+
+/**
+ * this editpolicy allow the move command between semantic element
+ *
+ */
+
+public class PackageSemanticEditPolicy extends DefaultSemanticEditPolicy {
+
+ /**
+ * allow the move command between elements
+ */
+ @Override
+ protected Command getMoveCommand(MoveRequest req) {
+ EObject targetCEObject = req.getTargetContainer();
+ if (targetCEObject != null) {
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(targetCEObject);
+ if (provider != null) {
+ ICommand moveCommand = provider.getEditCommand(req);
+ if (moveCommand != null) {
+ return new ICommandProxy(moveCommand);
+ }
+ }
+ return UnexecutableCommand.INSTANCE;
+ } else {
+ return getGEFWrapper(new MoveElementsCommand(req));
+ }
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/edit/policy/ShowHideRelatedLinkEditPolicy.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/edit/policy/ShowHideRelatedLinkEditPolicy.java
new file mode 100755
index 0000000..94ba577
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/edit/policy/ShowHideRelatedLinkEditPolicy.java
@@ -0,0 +1,292 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.edit.policy;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.structure.DiagramStructure;
+import org.eclipse.papyrus.infra.gmfdiag.common.updater.DiagramUpdater;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.part.SysMLDiagramUpdater;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.part.SysMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractUMLShowHideRelatedLinkEditPolicy;
+
+/**
+ *
+ * The edit policy to use in the IBD diagram to restore existing links
+ *
+ */
+public class ShowHideRelatedLinkEditPolicy extends AbstractUMLShowHideRelatedLinkEditPolicy {
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param host
+ */
+ public ShowHideRelatedLinkEditPolicy(DiagramEditPart host) {
+ super(host);
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IDiagramInformationProviderEditPolicy#getDiagramUpdater()
+ *
+ * @return
+ */
+ public DiagramUpdater getDiagramUpdater() {
+ return SysMLDiagramUpdater.TYPED_INSTANCE;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IDiagramInformationProviderEditPolicy#getDiagramStructure()
+ *
+ * @return
+ */
+ public DiagramStructure getDiagramStructure() {
+ return SysMLVisualIDRegistry.TYPED_INSTANCE;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.AbstractShowHideRelatedLinkEditPolicy#getSemanticHint(org.eclipse.emf.ecore.EObject)
+ *
+ * @param eobject
+ * @return
+ */
+ @Override
+ protected String getSemanticHint(final EObject eobject) {
+ return SysMLVisualIDRegistry.getLinkWithClassVisualID(eobject);
+ }
+
+ // /**
+ // *
+ // * @see org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.AbstractShowHideRelatedLinkEditPolicy#cleanAdd(java.util.Collection,
+ // * org.eclipse.gmf.runtime.notation.View, java.util.List, java.util.Map)
+ // *
+ // * @param result
+ // * @param view
+ // * @param descriptors
+ // * @param domain2NotationMap
+ // */
+ // @Override
+ // protected void cleanAdd(final Collection<UpdaterLinkDescriptor> result, final View view, final List<?> descriptors, final Map<EObject, View> domain2NotationMap) {
+ // cleanAddForConnector(result, view, descriptors, domain2NotationMap);
+ // super.cleanAdd(result, view, descriptors, domain2NotationMap);
+ // }
+ //
+ // /**
+ // * This method manages descriptors representing Connector to verify that it
+ // * can be displayed according to the nestedPath of the {@link ConnectorEnd} If the connector can be displayed :
+ // * <ul>
+ // * <li>
+ // * the link descriptor is removed from descriptors and added to result</li>
+ // * <li>
+ // * the view associated to the role of the connector are added to domain2NotationMap (using the ConnectorEnd as key)</li>
+ // * </ul>
+ // *
+ // *
+ // *
+ // * @param result
+ // * the result of the method
+ // * @param view
+ // * a view
+ // * @param descriptors
+ // * the link descriptors
+ // * @param domain2NotationMap
+ // * the map between model element and views
+ // *
+ // *
+ // */
+ // protected void cleanAddForConnector(final Collection<UpdaterLinkDescriptor> result, final View view, final List<?> descriptors, final Map<EObject, View> domain2NotationMap) {
+ // final List<UpdaterLinkDescriptor> toRemove = new ArrayList<UpdaterLinkDescriptor>();
+ // for(final Object current : descriptors) {
+ // if(current instanceof UpdaterLinkDescriptor) {
+ // final UpdaterLinkDescriptor descriptor = (UpdaterLinkDescriptor)current;
+ // final EObject element = descriptor.getModelElement();
+ // if(element instanceof Connector) {
+ // if(canBeDisplayed((Connector)element, view, domain2NotationMap)) {
+ // result.add((UpdaterLinkDescriptor)current);
+ // }
+ // toRemove.add((UpdaterLinkDescriptor)current);
+ // }
+ // }
+ // }
+ // descriptors.removeAll(toRemove);
+ // }
+
+ // /**
+ // *
+ // * @param end
+ // * a connector end
+ // * @param view
+ // * a view
+ // * @return <code>true</code> if the view represents the role of the
+ // * connector AND if the view is encapsulated as required by the
+ // * nested path of the connector end
+ // */
+ // protected boolean isCorrectGraphicalView(final ConnectorEnd end, final View view) {
+ // final NestedConnectorEnd nestedConnectorEnd = org.eclipse.uml2.uml.util.UMLUtil.getStereotypeApplication(end, NestedConnectorEnd.class);
+ // final Property partWithPort = end.getPartWithPort();
+ // // final ConnectableElement role = end.getRole();
+ // // 1. we get the top view of this view with the same semantic element
+ // View localView = getTopViewWithSameSemanticElement(view);
+ //
+ // // 2. we verify the part with port
+ // if(partWithPort != null) {
+ // View parent = getTopViewWithSameSemanticElement(ViewUtil.getViewContainer(localView));
+ // if(parent.getElement() != partWithPort) {
+ // return false;
+ // }
+ // }
+ //
+ // // 3. we verify the nested path
+ // if(nestedConnectorEnd != null && nestedConnectorEnd.getPropertyPath().size() > 0) {
+ // View parent = view;
+ // final List<Property> paths = nestedConnectorEnd.getPropertyPath();
+ // for(int i = paths.size() - 1; i >= 0; i--) {
+ // final Property currentProperty = paths.get(i);
+ // parent = getTopViewWithSameSemanticElement(ViewUtil.getViewContainer(parent));
+ // if(parent.getElement() != currentProperty) {
+ // return false;
+ // }
+ // }
+ // }
+ // return true;
+ // }
+
+ // /**
+ // *
+ // * @param connector
+ // * a connector
+ // * @param selectedView
+ // * a view used as source or target for the connector to display
+ // * @param domain2NotationMap
+ // * the map to complete if we found source and target View on the
+ // * diagram to diplsay the connector
+ // * @return <code>true</code> if the view can be used as source/target for
+ // * the connector according to the nested path AND if we found a
+ // * second view for the 2nd connector end according to the nested
+ // * path
+ // */
+ // protected boolean canBeDisplayed(final Connector connector, final View selectedView, final Map<EObject, View> domain2NotationMap) {
+ // // we need to verify the selected view
+ // final EObject semanticElement = selectedView.getElement();
+ // ConnectorEnd endForView = null;
+ //
+ // // 1. look for the connector end represented by the selected view
+ // for(final ConnectorEnd current : connector.getEnds()) {
+ // if(current.getRole() == semanticElement) {
+ // endForView = current;
+ // break;
+ // }
+ // }
+ // Assert.isNotNull(endForView);
+ // // 2. verify the view of the selected connector end
+ // if(!isCorrectGraphicalView(endForView, selectedView)) {
+ // return false;
+ // }
+ //
+ // // 3. try to find a view for the second connector end
+ // View secondView = null;
+ // for(final ConnectorEnd end : connector.getEnds()) {
+ // final ConnectableElement role = end.getRole();
+ // if(role==null){
+ // return false;
+ // }
+ // if(end == endForView) {
+ // continue;
+ // }
+ //
+ // final Set<View> views = CrossReferencerUtil.getCrossReferencingViewsInDiagram(role, getCurrentDiagram());
+ // final Iterator<View> iterOnView = views.iterator();
+ // while(secondView == null && iterOnView.hasNext()) {
+ // final View currentView = iterOnView.next();
+ // if(isCorrectGraphicalView(end, currentView)) {
+ // domain2NotationMap.put(endForView, selectedView);
+ // domain2NotationMap.put(end, currentView);
+ // secondView = currentView;
+ // }
+ // }
+ // }
+ // return secondView != null;
+ // }
+
+ // /**
+ // *
+ // * @param domain
+ // * the editing domain to use for this command
+ // * @param linkToShow
+ // * a link to show
+ // * @param domain2NotationMap
+ // * @param linkDescriptors
+ // * @return the command to display the link on the diagram
+ // */
+ // protected ICommand getShowLinkCommand(final TransactionalEditingDomain domain, final EObject linkToShow, final Map<EObject, View> domain2NotationMap, final Collection<? extends UpdaterLinkDescriptor> linkDescriptors) {
+ // if(!(linkToShow instanceof Connector)) {
+ // return super.getShowLinkCommand(domain, linkToShow, domain2NotationMap, linkDescriptors);
+ // }
+ // mapModel((View)getHost().getAdapter(View.class), domain2NotationMap);
+ // final View view = domain2NotationMap.get(linkToShow);
+ // if(view != null) {
+ // return new SetPropertyCommand(domain, "Restore related linksCommand show view", new EObjectAdapter(view), Properties.ID_ISVISIBLE, Boolean.TRUE);//$NON-NLS-1$
+ // } else {// we need to recreate the view
+ //
+ // // we look for the link descriptor
+ // UpdaterLinkDescriptor descriptor = getLinkDescriptor(linkToShow, linkDescriptors);
+ //
+ // if(descriptor != null) {
+ // // we override the way to find the source and the target edit
+ // // part
+ // EditPart sourceEditPart = getEditPart(((Connector)linkToShow).getEnds().get(0), domain2NotationMap);
+ // EditPart targetEditPart = getEditPart(((Connector)linkToShow).getEnds().get(1), domain2NotationMap);
+ //
+ // // If the parts are still null...
+ // if(sourceEditPart == null || targetEditPart == null) {
+ // return null;
+ // }
+ // String semanticHint = getSemanticHint(linkToShow);
+ // CreateConnectionViewRequest.ConnectionViewDescriptor viewDescriptor = new CreateConnectionViewRequest.ConnectionViewDescriptor(descriptor.getSemanticAdapter(), semanticHint, ViewUtil.APPEND, false,
+ // ((GraphicalEditPart)getHost()).getDiagramPreferencesHint());
+ // CreateConnectionViewRequest ccr = new CreateConnectionViewRequest(viewDescriptor);
+ // ccr.setType(RequestConstants.REQ_CONNECTION_START);
+ // ccr.setSourceEditPart(sourceEditPart);
+ // sourceEditPart.getCommand(ccr);
+ // ccr.setTargetEditPart(targetEditPart);
+ // ccr.setType(RequestConstants.REQ_CONNECTION_END);
+ // return new CommandProxy(targetEditPart.getCommand(ccr));
+ // }
+ // }
+ // return null;
+ // }
+
+ // /**
+ // *
+ // * @param view
+ // * a view
+ // * @return the last parent of this view referencing the same semantic
+ // * element
+ // */
+ // protected View getTopViewWithSameSemanticElement(final View view) {
+ // final EObject semanticElement = view.getElement();
+ // View parent = view;
+ // View lastParent = view;
+ // while(parent.getElement() == semanticElement) {
+ // lastParent = parent;
+ // parent = (View)parent.eContainer();
+ // }
+ // return lastParent;
+ // }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/handler/BlockDefinitionManageInterfacesHandler.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/handler/BlockDefinitionManageInterfacesHandler.java
new file mode 100755
index 0000000..066c614
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/handler/BlockDefinitionManageInterfacesHandler.java
@@ -0,0 +1,38 @@
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Gabriel Pascual (ALL4TEC) gabriel.pascual@all4tec.net - Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.handler;
+
+import org.eclipse.gmf.runtime.common.ui.util.DisplayUtils;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.ui.BlockDefinitionInterfaceManagerDialog;
+import org.eclipse.papyrus.uml.diagram.common.actions.handlers.ManagePortInterfacesHandler;
+import org.eclipse.papyrus.uml.diagram.common.dialogs.InterfaceManagerDialog;
+import org.eclipse.uml2.uml.Port;
+
+/**
+ * Manage Interface handler for Block Definition diagram.
+ *
+ * @author Gabriel Pascual
+ */
+public class BlockDefinitionManageInterfacesHandler extends ManagePortInterfacesHandler {
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.common.actions.handlers.ManagePortInterfacesHandler#getInterfaceManagerDialog(org.eclipse.uml2.uml.Port)
+ *
+ * @param port
+ * @return
+ */
+ @Override
+ public InterfaceManagerDialog getInterfaceManagerDialog(Port port) {
+ return new BlockDefinitionInterfaceManagerDialog(DisplayUtils.getDefaultShell(), port);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/helper/advice/DeleteViewDuringBlockDeleteHelperAdvice.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/helper/advice/DeleteViewDuringBlockDeleteHelperAdvice.java
new file mode 100755
index 0000000..88e78dc
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/helper/advice/DeleteViewDuringBlockDeleteHelperAdvice.java
@@ -0,0 +1,127 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.helper.advice;
+
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
+import org.eclipse.gmf.runtime.emf.type.core.ISpecializationType;
+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.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.util.CrossReferencerUtil;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * <pre>
+ * Edit helper advice that delete Part or Reference views from diagram when its type (Block) is deleted.
+ * @unused - The Part or Ref are deleted when their Block type is deleted (done in Service Edit).
+ * </pre>
+ */
+public class DeleteViewDuringBlockDeleteHelperAdvice extends AbstractEditHelperAdvice {
+
+ @Override
+ protected ICommand getBeforeDestroyDependentsCommand(DestroyDependentsRequest request) {
+
+
+ EObject elementToEdit = request.getElementToDestroy();
+ Set<View> viewsToDestroy = new HashSet<View>();
+
+ // Get all Part or Reference typed by this deleted Block
+ Iterator<?> references = EMFCoreUtil.getReferencers(elementToEdit, new EReference[] { UMLPackage.eINSTANCE.getTypedElement_Type() }).iterator();
+ while (references.hasNext()) {
+ Object current = references.next();
+
+ if (!(current instanceof EObject)) {
+ continue;
+ }
+
+ EObject property = (EObject) current;
+
+ // Search inconsistent views if the reference is a Part or a Reference
+ if (((ISpecializationType) SysMLElementTypes.PART_PROPERTY).getMatcher().matches(property)) {
+ viewsToDestroy.addAll(getPartViewsToDestroy(property));
+ }
+ if (((ISpecializationType) SysMLElementTypes.REFERENCE_PROPERTY).getMatcher().matches(property)) {
+ viewsToDestroy.addAll(getReferenceViewsToDestroy(property));
+ }
+ }
+
+ if (!(viewsToDestroy.isEmpty())) {
+ DestroyDependentsRequest req = new DestroyDependentsRequest(request.getEditingDomain(), elementToEdit, false);
+ req.setClientContext(request.getClientContext());
+ req.addParameters(request.getParameters());
+ return req.getDestroyDependentsCommand(viewsToDestroy);
+ }
+
+ return super.getBeforeDestroyDependentsCommand(request);
+ }
+
+ /**
+ * This methods looks for inconsistent Part views to delete.
+ *
+ * @param modifiedObject
+ * the modified {@link EObject}
+ * @return the list of {@link View} to delete
+ */
+ private Set<View> getPartViewsToDestroy(EObject modifiedObject) {
+ Set<View> viewsToDestroy = new HashSet<View>();
+
+ Iterator<View> viewIt = CrossReferencerUtil.getCrossReferencingViews(modifiedObject, ElementTypes.DIAGRAM_ID).iterator();
+ while (viewIt.hasNext()) {
+ View view = viewIt.next();
+
+ String containerType = ViewUtil.getViewContainer(view) != null ? ViewUtil.getViewContainer(view).getType() : null;
+
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_PART_AS_LIST_ID.equals(containerType)) {
+ viewsToDestroy.add(view);
+ }
+ }
+
+ return viewsToDestroy;
+ }
+
+ /**
+ * This methods looks for inconsistent Reference views to delete.
+ *
+ * @param modifiedObject
+ * the modified {@link EObject}
+ * @return the list of {@link View} to delete
+ */
+ private Set<View> getReferenceViewsToDestroy(EObject modifiedObject) {
+ Set<View> viewsToDestroy = new HashSet<View>();
+
+ Iterator<View> viewIt = CrossReferencerUtil.getCrossReferencingViews(modifiedObject, ElementTypes.DIAGRAM_ID).iterator();
+ while (viewIt.hasNext()) {
+ View view = viewIt.next();
+
+ String containerType = ViewUtil.getViewContainer(view) != null ? ViewUtil.getViewContainer(view).getType() : null;
+
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_REFERENCE_AS_LIST_ID.equals(containerType)) {
+ viewsToDestroy.add(view);
+ }
+ }
+
+ return viewsToDestroy;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/helper/advice/DeleteViewDuringDataTypeDeleteHelperAdvice.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/helper/advice/DeleteViewDuringDataTypeDeleteHelperAdvice.java
new file mode 100755
index 0000000..69f496d
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/helper/advice/DeleteViewDuringDataTypeDeleteHelperAdvice.java
@@ -0,0 +1,100 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.helper.advice;
+
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
+import org.eclipse.gmf.runtime.emf.type.core.ISpecializationType;
+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.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.util.CrossReferencerUtil;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * <pre>
+ * Edit helper advice that delete Part or Reference views from diagram when its type (Block) is deleted.
+ * </pre>
+ */
+public class DeleteViewDuringDataTypeDeleteHelperAdvice extends AbstractEditHelperAdvice {
+
+ @Override
+ protected ICommand getBeforeDestroyDependentsCommand(DestroyDependentsRequest request) {
+
+
+ EObject elementToEdit = request.getElementToDestroy();
+ Set<View> viewsToDestroy = new HashSet<View>();
+
+ // Get all Value (property) typed by this deleted DataType
+ Iterator<?> references = EMFCoreUtil.getReferencers(elementToEdit, new EReference[] { UMLPackage.eINSTANCE.getTypedElement_Type() }).iterator();
+ while (references.hasNext()) {
+ Object current = references.next();
+
+ if (!(current instanceof EObject)) {
+ continue;
+ }
+
+ EObject property = (EObject) current;
+
+ // Search inconsistent views if the property is a Value
+ if (((ISpecializationType) SysMLElementTypes.VALUE_PROPERTY).getMatcher().matches(property)) {
+ viewsToDestroy.addAll(getValueViewsToDestroy(property));
+ }
+ }
+
+ if (!(viewsToDestroy.isEmpty())) {
+ DestroyDependentsRequest req = new DestroyDependentsRequest(request.getEditingDomain(), elementToEdit, false);
+ req.setClientContext(request.getClientContext());
+ req.addParameters(request.getParameters());
+ return req.getDestroyDependentsCommand(viewsToDestroy);
+ }
+
+ return super.getBeforeDestroyDependentsCommand(request);
+ }
+
+ /**
+ * This methods looks for inconsistent Value views to delete.
+ *
+ * @param modifiedObject
+ * the modified {@link EObject}
+ * @return the list of {@link View} to delete
+ */
+ private Set<View> getValueViewsToDestroy(EObject modifiedObject) {
+ Set<View> viewsToDestroy = new HashSet<View>();
+
+ Iterator<View> viewIt = CrossReferencerUtil.getCrossReferencingViews(modifiedObject, ElementTypes.DIAGRAM_ID).iterator();
+ while (viewIt.hasNext()) {
+ View view = viewIt.next();
+
+ String containerType = ViewUtil.getViewContainer(view) != null ? ViewUtil.getViewContainer(view).getType() : null;
+
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_VALUE_AS_LIST_ID.equals(containerType)) {
+ viewsToDestroy.add(view);
+ }
+ }
+
+ return viewsToDestroy;
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/helper/advice/DeleteViewDuringMoveHelperAdvice.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/helper/advice/DeleteViewDuringMoveHelperAdvice.java
new file mode 100755
index 0000000..a270482
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/helper/advice/DeleteViewDuringMoveHelperAdvice.java
@@ -0,0 +1,90 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.helper.advice;
+
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice;
+import org.eclipse.gmf.runtime.emf.type.core.requests.MoveRequest;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.command.CustomDeleteCommand;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.util.CrossReferencerUtil;
+
+/**
+ * <pre>
+ * Edit helper advice that delete views from diagram when an element is
+ * moved in a new container (in the model explorer).
+ * this is a post advice
+ * </pre>
+ */
+public class DeleteViewDuringMoveHelperAdvice extends AbstractEditHelperAdvice {
+
+
+ @Override
+ protected ICommand getAfterMoveCommand(MoveRequest request) {
+
+ ICommand moveCommand = super.getBeforeMoveCommand(request);
+
+ Set<View> viewsToDestroy = new HashSet<View>();
+
+ @SuppressWarnings("unchecked")
+ Iterator<EObject> it = request.getElementsToMove().keySet().iterator();
+ while (it.hasNext()) {
+ EObject eObject = it.next();
+ viewsToDestroy.addAll(getViewsToDestroy(eObject));
+ }
+ Iterator<View> viewToDestroyIterator = viewsToDestroy.iterator();
+ while (viewToDestroyIterator.hasNext()) {
+ View view = viewToDestroyIterator.next();
+ CustomDeleteCommand destroyViewsCommand = new CustomDeleteCommand(request.getEditingDomain(), view);
+ moveCommand = CompositeCommand.compose(moveCommand, destroyViewsCommand);
+ }
+
+ return moveCommand;
+ }
+
+ /**
+ * This methods looks for inconsistent views to delete in case a semantic move done in the model explorer.
+ *
+ * @param movedObject
+ * the moved {@link EObject}
+ * @return the list of {@link View} to delete
+ */
+ protected Set<View> getViewsToDestroy(EObject movedObject) {
+ Set<View> viewsToDestroy = new HashSet<View>();
+
+ Iterator<View> viewIt = CrossReferencerUtil.getCrossReferencingViews(movedObject, ElementTypes.DIAGRAM_ID).iterator();
+ while (viewIt.hasNext()) {
+ View view = viewIt.next();
+
+ // Views are to be destroyed if they are not the diagram itself (containerType == null)
+ // and not a view directly owned by the diagram (the current policy in Papyrus allows
+ // to drop nearly anything in the diagram whatever the semantic container).
+ String containerType = ViewUtil.getViewContainer(view) != null ? ViewUtil.getViewContainer(view).getType() : null;
+ if ((containerType != null) && !ElementTypes.DIAGRAM_ID.equals(containerType)) {
+ viewsToDestroy.add(view);
+ }
+ }
+
+
+ return viewsToDestroy;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/helper/advice/DeleteViewDuringPartEditHelperAdvice.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/helper/advice/DeleteViewDuringPartEditHelperAdvice.java
new file mode 100755
index 0000000..d29aa64
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/helper/advice/DeleteViewDuringPartEditHelperAdvice.java
@@ -0,0 +1,104 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.helper.advice;
+
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.emf.type.core.ISpecializationType;
+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.SetRequest;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.util.CrossReferencerUtil;
+import org.eclipse.uml2.uml.AggregationKind;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Type;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * <pre>
+ * Edit helper advice that delete Part views from diagram when its aggregation kind
+ * is modified and turns it into Reference.
+ * </pre>
+ */
+public class DeleteViewDuringPartEditHelperAdvice extends AbstractEditHelperAdvice {
+
+ @Override
+ protected ICommand getBeforeSetCommand(SetRequest request) {
+
+ ICommand setCommand = super.getBeforeSetCommand(request);
+
+ Set<View> viewsToDestroy = new HashSet<View>();
+
+ // Get modified object and retrieve inconsistent view
+ EObject modifiedObject = request.getElementToEdit();
+ if ((modifiedObject != null) && (modifiedObject instanceof Property)
+ && (request.getFeature() == UMLPackage.eINSTANCE.getProperty_Aggregation())
+ && (request.getValue() != AggregationKind.COMPOSITE_LITERAL)) {
+
+ viewsToDestroy.addAll(getViewsToDestroy(modifiedObject));
+ }
+
+ if ((modifiedObject != null) && (modifiedObject instanceof Property)
+ && (request.getFeature() == UMLPackage.eINSTANCE.getTypedElement_Type())
+ && (request.getValue() instanceof Type)
+ && !((ISpecializationType) SysMLElementTypes.BLOCK).getMatcher().matches((Type) request.getValue())) {
+
+ viewsToDestroy.addAll(getViewsToDestroy(modifiedObject));
+ }
+
+ if (!viewsToDestroy.isEmpty()) {
+ DestroyDependentsRequest ddr = new DestroyDependentsRequest(request.getEditingDomain(), request.getElementToEdit(), false);
+ ddr.setClientContext(request.getClientContext());
+ ddr.addParameters(request.getParameters());
+ ICommand destroyViewsCommand = ddr.getDestroyDependentsCommand(viewsToDestroy);
+ setCommand = CompositeCommand.compose(setCommand, destroyViewsCommand);
+ }
+
+ return setCommand;
+ }
+
+ /**
+ * This methods looks for inconsistent views to delete in case a Part aggregation kind changes.
+ *
+ * @param modifiedObject
+ * the modified {@link EObject}
+ * @return the list of {@link View} to delete
+ */
+ protected Set<View> getViewsToDestroy(EObject modifiedObject) {
+ Set<View> viewsToDestroy = new HashSet<View>();
+
+ Iterator<View> viewIt = CrossReferencerUtil.getCrossReferencingViews(modifiedObject, ElementTypes.DIAGRAM_ID).iterator();
+ while (viewIt.hasNext()) {
+ View view = viewIt.next();
+
+ String containerType = ViewUtil.getViewContainer(view) != null ? ViewUtil.getViewContainer(view).getType() : null;
+
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_PART_AS_LIST_ID.equals(containerType)) {
+ viewsToDestroy.add(view);
+ }
+ }
+
+ return viewsToDestroy;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/helper/advice/DeleteViewDuringReferenceEditHelperAdvice.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/helper/advice/DeleteViewDuringReferenceEditHelperAdvice.java
new file mode 100755
index 0000000..21c2d45
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/helper/advice/DeleteViewDuringReferenceEditHelperAdvice.java
@@ -0,0 +1,104 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.helper.advice;
+
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.emf.type.core.ISpecializationType;
+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.SetRequest;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.util.CrossReferencerUtil;
+import org.eclipse.uml2.uml.AggregationKind;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Type;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * <pre>
+ * Edit helper advice that delete Reference views from diagram when its aggregation kind
+ * is modified and turns it into Part.
+ * </pre>
+ */
+public class DeleteViewDuringReferenceEditHelperAdvice extends AbstractEditHelperAdvice {
+
+ @Override
+ protected ICommand getBeforeSetCommand(SetRequest request) {
+
+ ICommand setCommand = super.getBeforeSetCommand(request);
+
+ Set<View> viewsToDestroy = new HashSet<View>();
+
+ // Get modified object and retrieve inconsistent view
+ EObject modifiedObject = request.getElementToEdit();
+ if ((modifiedObject != null) && (modifiedObject instanceof Property)
+ && (request.getFeature() == UMLPackage.eINSTANCE.getProperty_Aggregation())
+ && (request.getValue() == AggregationKind.COMPOSITE_LITERAL)) {
+
+ viewsToDestroy.addAll(getViewsToDestroy(modifiedObject));
+ }
+
+ if ((modifiedObject != null) && (modifiedObject instanceof Property)
+ && (request.getFeature() == UMLPackage.eINSTANCE.getTypedElement_Type())
+ && (request.getValue() instanceof Type)
+ && !((ISpecializationType) SysMLElementTypes.BLOCK).getMatcher().matches((Type) request.getValue())) {
+
+ viewsToDestroy.addAll(getViewsToDestroy(modifiedObject));
+ }
+
+ if (!viewsToDestroy.isEmpty()) {
+ DestroyDependentsRequest ddr = new DestroyDependentsRequest(request.getEditingDomain(), request.getElementToEdit(), false);
+ ddr.setClientContext(request.getClientContext());
+ ddr.addParameters(request.getParameters());
+ ICommand destroyViewsCommand = ddr.getDestroyDependentsCommand(viewsToDestroy);
+ setCommand = CompositeCommand.compose(setCommand, destroyViewsCommand);
+ }
+
+ return setCommand;
+ }
+
+ /**
+ * This methods looks for inconsistent views to delete in case a Reference aggregation kind changes.
+ *
+ * @param modifiedObject
+ * the modified {@link EObject}
+ * @return the list of {@link View} to delete
+ */
+ protected Set<View> getViewsToDestroy(EObject modifiedObject) {
+ Set<View> viewsToDestroy = new HashSet<View>();
+
+ Iterator<View> viewIt = CrossReferencerUtil.getCrossReferencingViews(modifiedObject, ElementTypes.DIAGRAM_ID).iterator();
+ while (viewIt.hasNext()) {
+ View view = viewIt.next();
+
+ String containerType = ViewUtil.getViewContainer(view) != null ? ViewUtil.getViewContainer(view).getType() : null;
+
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_REFERENCE_AS_LIST_ID.equals(containerType)) {
+ viewsToDestroy.add(view);
+ }
+ }
+
+ return viewsToDestroy;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/helper/advice/DeleteViewDuringValueEditHelperAdvice.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/helper/advice/DeleteViewDuringValueEditHelperAdvice.java
new file mode 100755
index 0000000..37d2baf
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/helper/advice/DeleteViewDuringValueEditHelperAdvice.java
@@ -0,0 +1,106 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.helper.advice;
+
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+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.SetRequest;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.uml.diagram.common.util.CrossReferencerUtil;
+import org.eclipse.uml2.uml.AggregationKind;
+import org.eclipse.uml2.uml.DataType;
+import org.eclipse.uml2.uml.Port;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * <pre>
+ * Edit helper advice that delete Value views from diagram when its aggregation kind
+ * is modified, or when the type is set to anything but DataType or ValueType.
+ * </pre>
+ */
+public class DeleteViewDuringValueEditHelperAdvice extends AbstractEditHelperAdvice {
+
+ @Override
+ protected ICommand getBeforeSetCommand(SetRequest request) {
+
+ ICommand setCommand = super.getBeforeSetCommand(request);
+
+ Set<View> viewsToDestroy = new HashSet<View>();
+
+ // Get modified object and retrieve inconsistent view
+ EObject modifiedObject = request.getElementToEdit();
+ if ((modifiedObject != null) && (modifiedObject instanceof Property) && !(modifiedObject instanceof Port)) {
+
+ // Aggregation modified
+ if ((request.getFeature() == UMLPackage.eINSTANCE.getProperty_Aggregation()) && (request.getValue() != AggregationKind.COMPOSITE_LITERAL)) {
+ viewsToDestroy.addAll(getViewsToDestroy(modifiedObject));
+ }
+
+ // Type modified
+ if ((request.getFeature() == UMLPackage.eINSTANCE.getTypedElement_Type()) && (request.getValue() != modifiedObject.eGet(UMLPackage.eINSTANCE.getTypedElement_Type()))) {
+
+ EObject newType = (request.getValue() instanceof EObject) ? (EObject) request.getValue() : null;
+ if ((newType == null) || !(newType instanceof DataType)) {
+ viewsToDestroy.addAll(getViewsToDestroy(modifiedObject));
+ }
+
+ }
+ }
+
+ if (!viewsToDestroy.isEmpty()) {
+ DestroyDependentsRequest ddr = new DestroyDependentsRequest(request.getEditingDomain(), request.getElementToEdit(), false);
+ ddr.setClientContext(request.getClientContext());
+ ddr.addParameters(request.getParameters());
+ ICommand destroyViewsCommand = ddr.getDestroyDependentsCommand(viewsToDestroy);
+ setCommand = CompositeCommand.compose(setCommand, destroyViewsCommand);
+ }
+
+ return setCommand;
+ }
+
+ /**
+ * This methods looks for inconsistent views to delete in case a Reference aggregation kind changes.
+ *
+ * @param modifiedObject
+ * the modified {@link EObject}
+ * @return the list of {@link View} to delete
+ */
+ protected Set<View> getViewsToDestroy(EObject modifiedObject) {
+ Set<View> viewsToDestroy = new HashSet<View>();
+
+ Iterator<View> viewIt = CrossReferencerUtil.getCrossReferencingViews(modifiedObject, ElementTypes.DIAGRAM_ID).iterator();
+ while (viewIt.hasNext()) {
+ View view = viewIt.next();
+
+ String containerType = ViewUtil.getViewContainer(view) != null ? ViewUtil.getViewContainer(view).getType() : null;
+
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_VALUE_AS_LIST_ID.equals(containerType)) {
+ viewsToDestroy.add(view);
+ }
+ }
+
+ return viewsToDestroy;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/helper/advice/GeneralizationHelperAdvice.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/helper/advice/GeneralizationHelperAdvice.java
new file mode 100755
index 0000000..538a297
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/helper/advice/GeneralizationHelperAdvice.java
@@ -0,0 +1,118 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Fanch Bonnabesse (ALL4TEC) fanch.bonnabesse@alltec.net - Bug 481317
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.helper.advice;
+
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+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.ReorientRelationshipRequest;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.util.CrossReferencerUtil;
+import org.eclipse.papyrus.uml.diagram.common.util.GeneralizationUtil;
+import org.eclipse.uml2.uml.Classifier;
+import org.eclipse.uml2.uml.Generalization;
+import org.eclipse.uml2.uml.NamedElement;
+
+/**
+ * <pre>
+ * This HelperAdvice completes {@link Generalization} edit commands with diagram specific
+ * commands in order to remove inconsistent views (e.g. inherited Port or Property
+ * in case a {@link Generalization} is deleted or re-oriented.
+ * </pre>
+ */
+public class GeneralizationHelperAdvice extends AbstractEditHelperAdvice {
+
+ @Override
+ protected ICommand getBeforeReorientRelationshipCommand(ReorientRelationshipRequest request) {
+
+ // The list of member views becoming inconsistent after re-orient that should be deleted.
+ Set<View> viewsToDestroy = new HashSet<View>();
+
+ if (request.getRelationship() instanceof Generalization) {
+ viewsToDestroy.addAll(getMemberViewsToDestroy((Generalization) request.getRelationship()));
+ }
+
+ // return the command to destroy all these views
+ if (!viewsToDestroy.isEmpty()) {
+
+ DestroyDependentsRequest ddr = new DestroyDependentsRequest(request.getEditingDomain(), request.getRelationship(), false);
+ ddr.setClientContext(request.getClientContext());
+ ddr.addParameters(request.getParameters());
+ return ddr.getDestroyDependentsCommand(viewsToDestroy);
+
+ }
+ return null;
+ }
+
+ @Override
+ protected ICommand getBeforeDestroyDependentsCommand(DestroyDependentsRequest request) {
+
+ EObject destructee = request.getElementToDestroy();
+
+ Set<View> viewsToDestroy = new HashSet<View>();
+
+ if (destructee instanceof Generalization) {
+ viewsToDestroy = getMemberViewsToDestroy((Generalization) destructee);
+ }
+
+ // return the command to destroy all these views
+ if (!viewsToDestroy.isEmpty()) {
+ return request.getDestroyDependentsCommand(viewsToDestroy);
+ }
+ return null;
+ }
+
+ /**
+ * This methods looks for inconsistent views to delete in case the generalization is deleted or
+ * re-oriented.
+ *
+ * @param generalization
+ * the modified generalization
+ * @return the list of {@link View} to delete
+ */
+ protected Set<View> getMemberViewsToDestroy(Generalization generalization) {
+ Set<View> viewsToDestroy = new HashSet<View>();
+
+ Classifier general = generalization.getGeneral();
+ if (general != null) {
+
+ // Parse members
+ EList<NamedElement> members = general.getMembers();
+ for (NamedElement member : members) {
+
+ // Find Views in Composite Structure Diagram that are referencing current member
+ Iterator<View> viewIt = CrossReferencerUtil.getCrossReferencingViews(member, ElementTypes.DIAGRAM_ID).iterator();
+ while (viewIt.hasNext()) {
+ View view = viewIt.next();
+
+ // Test if current view (member) is concerned by the deletion (re-orientation) of the generalization
+ GeneralizationUtil util = new GeneralizationUtil();
+ if (util.isConcernedByGeneralizationChanges(generalization, view)) {
+ viewsToDestroy.add(view);
+ }
+ }
+ }
+ }
+
+ return viewsToDestroy;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/messages/Messages.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/messages/Messages.java
new file mode 100755
index 0000000..17c30bc
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/messages/Messages.java
@@ -0,0 +1,30 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.messages;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+
+ public static String Notification_Drop_Title;
+
+ public static String Notification_Drop_UMLAssociationWarning;
+
+ static {
+ NLS.initializeMessages("messages", Messages.class); //$NON-NLS-1$
+ }
+
+ private Messages() {
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/migration/BDDReconciler.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/migration/BDDReconciler.java
new file mode 100755
index 0000000..b0c80cc
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/migration/BDDReconciler.java
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Benoit Maggi (CEA LIST) benoit.maggi@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.migration;
+
+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.gmf.runtime.common.core.command.AbstractCommand;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.papyrus.infra.gmfdiag.common.reconciler.DiagramReconciler;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
+
+/**
+ * Block Definition Diagram Reconciler from 0.9.1 to 1.0.0
+ */
+public class BDDReconciler extends DiagramReconciler {
+
+ @Override
+ public ICommand getReconcileCommand(Diagram diagram) {
+ return new BDDReconcileCommand(diagram);
+ }
+
+ /**
+ * change the root to the parent (Package), because BBD root can't be a Block see
+ * #439094
+ */
+ protected class BDDReconcileCommand extends AbstractCommand {
+
+ protected final Diagram diagram;
+
+ public BDDReconcileCommand(Diagram diagram) {
+ super("Migrate BDD Diagram");
+ this.diagram = diagram;
+ }
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ EObject element = diagram.getElement();
+ if (element instanceof org.eclipse.uml2.uml.Class) { // Block
+ org.eclipse.uml2.uml.Class clazz = (org.eclipse.uml2.uml.Class) element;
+ diagram.setElement(clazz.getNearestPackage());
+ DiagramUtils.setOwner(diagram, element);
+ }
+ return CommandResult.newOKCommandResult();
+ }
+
+ @Override
+ public boolean canUndo() {
+ return false;
+ }
+
+ @Override
+ public boolean canRedo() {
+ return false;
+ }
+
+ @Override
+ protected CommandResult doRedoWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ throw new ExecutionException("Should not be called, canRedo false");
+ }
+
+ @Override
+ protected CommandResult doUndoWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ throw new ExecutionException("Should not be called, canUndo false");
+ }
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/part/SysMLDiagramUpdater.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/part/SysMLDiagramUpdater.java
new file mode 100755
index 0000000..609e8f5
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/part/SysMLDiagramUpdater.java
@@ -0,0 +1,1305 @@
+/*****************************************************************************
+ * Copyright (c) 2011, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 410909
+ * Fanch Bonnabesse (ALL4TEC) fanch.bonnabesse@alltec.net - Bug 480510
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.part;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.emf.core.util.CrossReferenceAdapter;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.updater.DiagramUpdater;
+import org.eclipse.papyrus.infra.gmfdiag.common.updater.UpdaterLinkDescriptor;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.CommentAnnotatedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.CommentEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.CommentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ConstraintConstrainedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ConstraintEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ConstraintEditPartCN;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InstanceSpecificationEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InstanceSpecificationEditPartCN;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InterfaceRealizationEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PackageEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PackageEditPartCN;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.SlotEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLLinkDescriptor;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.eclipse.uml2.uml.Actor;
+import org.eclipse.uml2.uml.Association;
+import org.eclipse.uml2.uml.BehavioredClassifier;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.Classifier;
+import org.eclipse.uml2.uml.Comment;
+import org.eclipse.uml2.uml.Constraint;
+import org.eclipse.uml2.uml.DataType;
+import org.eclipse.uml2.uml.Dependency;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Enumeration;
+import org.eclipse.uml2.uml.EnumerationLiteral;
+import org.eclipse.uml2.uml.Generalization;
+import org.eclipse.uml2.uml.InstanceSpecification;
+import org.eclipse.uml2.uml.Interface;
+import org.eclipse.uml2.uml.InterfaceRealization;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.Operation;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.PackageableElement;
+import org.eclipse.uml2.uml.PrimitiveType;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Reception;
+import org.eclipse.uml2.uml.Signal;
+import org.eclipse.uml2.uml.Slot;
+import org.eclipse.uml2.uml.Type;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.eclipse.uml2.uml.Usage;
+
+
+/**
+ *
+ * @author vl222926
+ * Adapted code from generated code for UML Diagram
+ * The name of the methods are not java compliant, but it is done to be consistent with the generated classes which use the id of the elements
+ */
+public class SysMLDiagramUpdater {
+
+ /**
+ * @generated
+ */
+ public static final DiagramUpdater TYPED_INSTANCE = new DiagramUpdater() {
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.updater.DiagramUpdater#getSemanticChildren(org.eclipse.gmf.runtime.notation.View)
+ *
+ * @param view
+ * @return
+ */
+ public List<UpdaterLinkDescriptor> getSemanticChildren(View view) {
+ return SysMLDiagramUpdater.getSemanticChildren(view);
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.updater.DiagramUpdater#getContainedLinks(org.eclipse.gmf.runtime.notation.View)
+ *
+ * @param view
+ * @return
+ */
+ public List<UpdaterLinkDescriptor> getContainedLinks(View view) {
+ return SysMLDiagramUpdater.getContainedLinks(view);
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.updater.DiagramUpdater#getIncomingLinks(org.eclipse.gmf.runtime.notation.View)
+ *
+ * @param view
+ * @return
+ */
+ public List<UpdaterLinkDescriptor> getIncomingLinks(View view) {
+ return SysMLDiagramUpdater.getIncomingLinks(view);
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.updater.DiagramUpdater#getOutgoingLinks(org.eclipse.gmf.runtime.notation.View)
+ *
+ * @param view
+ * @return
+ */
+ public List<UpdaterLinkDescriptor> getOutgoingLinks(View view) {
+ return SysMLDiagramUpdater.getOutgoingLinks(view);
+ }
+ };
+
+ public static List<UpdaterLinkDescriptor> getContainedLinks(final View view) {
+ throw new UnsupportedOperationException("Not yet implemented"); //$NON-NLS-1$
+ }
+
+ public static List<UpdaterLinkDescriptor> getSemanticChildren(final View view) {
+ throw new UnsupportedOperationException("Not yet implemented"); //$NON-NLS-1$
+ }
+
+ /**
+ *
+ * @param view
+ * a view
+ * @return
+ * the list of the incoming links for this view
+ */
+ public static List<UpdaterLinkDescriptor> getIncomingLinks(final View view) {
+ final String id = view.getType();
+ if (id.equals(SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_CLASSIFIER_ID)) {
+ return getBlock_shape_sysml_block_as_classifier_IncomingLink(view);
+ }
+ if (id.equals(SysMLGraphicalTypes.LINK_SYSML_ASSOCIATION_ID)) {
+ return getAssociation_link_sysml_association_IncomingLink(view);
+ }
+ if (id.equals(PackageEditPart.VISUAL_ID) || id.equals(PackageEditPartCN.VISUAL_ID)) {
+ return getPackage_Shape_IncomingLinks(view);
+ }
+ if (id.equals(UMLGraphicalTypes.SHAPE_UML_ACTOR_AS_CLASSIFIER_ID)) {
+ return getActor_shape_uml_actor_as_classifier_IncomingLinks(view);
+ }
+ if (id.equals(UMLGraphicalTypes.SHAPE_UML_SIGNAL_AS_CLASSIFIER_ID)) {
+ return getSignal_shape_uml_signal_as_classifier_IncomingLinks(view);
+ }
+ if (id.equals(UMLGraphicalTypes.SHAPE_UML_PROPERTY_AS_LABEL_ID)) {
+ return getProperty_shape_uml_property_as_label_IncomingLinks(view);
+ }
+ if (id.equals(SysMLGraphicalTypes.SHAPE_SYSML_PART_AS_LABEL_ID)) {
+ return getPart_shape_sysml_part_as_label_IncomingLinks(view);
+ }
+ if (id.equals(SysMLGraphicalTypes.SHAPE_SYSML_REFERENCE_AS_LABEL_ID)) {
+ return getReference_shape_sysml_reference_as_label_IncomingLinks(view);
+ }
+ if (id.equals(SysMLGraphicalTypes.SHAPE_SYSML_VALUE_AS_LABEL_ID)) {
+ return getValue_shape_sysml_value_as_label_IncomingLinks(view);
+ }
+ if (id.equals(UMLGraphicalTypes.SHAPE_UML_OPERATION_AS_LABEL_ID)) {
+ return getOperation_shape_uml_operation_as_label_IncomingLinks(view);
+ }
+ if (id.equals(UMLGraphicalTypes.SHAPE_UML_RECEPTION_AS_LABEL_ID)) {
+ return getReception_shape_uml_reception_as_label_IncomingLinks(view);
+ }
+ if (id.equals(InstanceSpecificationEditPart.VISUAL_ID) || id.equals(InstanceSpecificationEditPartCN.VISUAL_ID)) {
+ return getInstanceSpecification_Shape_IncomingLinks(view);
+ }
+ if (id.equals(SlotEditPart.VISUAL_ID)) {
+ return getSlot_SlotLabel_IncomingLinks(view);
+ }
+ if (id.equals(UMLGraphicalTypes.LINK_UML_DEPENDENCY_ID)) {
+ return getDependency_link_uml_dependency_IncomingLinks(view);
+ }
+ if (id.equals(UMLGraphicalTypes.LINK_UML_GENERALIZATION_ID)) {
+ return getGeneralization_link_uml_generalization_IncomingLinks(view);
+ }
+ if (id.equals(UMLGraphicalTypes.SHAPE_UML_PORT_AS_LABEL_ID)) {
+ return getPort_shape_uml_port_as_label_IncomingLinks(view);
+ }
+ if (id.equals(SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_LABEL_ID)) {
+ return getFlowPort_shape_sysml_flowport_as_label_IncomingLinks(view);
+ }
+ if (id.equals(UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID)) {
+ return getPort_shape_uml_port_as_affixed_IncomingLinks(view);
+ }
+ if (id.equals(SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID)) {
+ return getFlowPort_shape_sysml_flowport_as_affixed_IncomingLinks(view);
+ }
+ if (id.equals(SysMLGraphicalTypes.SHAPE_SYSML_FLOWSPECIFICATION_AS_CLASSIFIER_ID)) {
+ return getFlowSpecification_shape_sysml_flowspecification_as_classifier_IncomingLinks(view);
+ }
+ if (id.equals(UMLGraphicalTypes.SHAPE_UML_INTERFACE_AS_CLASSIFIER_ID)) {
+ return getInterface_shape_uml_interface_as_classifier_IncomingLinks(view);
+ }
+ if (id.equals(SysMLGraphicalTypes.SHAPE_SYSML_FLOWPROPERTY_AS_LABEL_ID)) {
+ return getFlowProperty_shape_sysml_flowproperty_as_label_IncomingLinks(view);
+ }
+ if (id.equals(UMLGraphicalTypes.LINK_UML_INTERFACEREALIZATION_ID)) {
+ return getInterfaceRealization_link_uml_interfacerealization_IncomingLinks(view);
+ }
+ if (id.equals(UMLGraphicalTypes.LINK_UML_USAGE_ID)) {
+ return getUsage_link_uml_usage_IncomingLinks(view);
+ }
+ if (id.equals(UMLGraphicalTypes.SHAPE_UML_DATATYPE_AS_CLASSIFIER_ID)) {
+ return getDataType_shape_uml_data_type_as_classifier_IncomingLinks(view);
+ }
+ if (id.equals(UMLGraphicalTypes.SHAPE_UML_ENUMERATION_AS_CLASSIFIER_ID)) {
+ return getEnumeration_shape_uml_enumeration_as_classifier_IncomingLinks(view);
+ }
+ if (id.equals(UMLGraphicalTypes.SHAPE_UML_ENUMERATIONLITERAL_AS_LABEL_ID)) {
+ return getEnumerationLiteral_shape_uml_enumerationliteral_as_classifier_IncomingLinks(view);
+ }
+ if (id.equals(UMLGraphicalTypes.SHAPE_UML_PRIMITIVETYPE_AS_CLASSIFIER_ID)) {
+ return getPrimitiveType_shape_uml_primitivetype_as_classifier_IncomingLinks(view);
+ }
+ if (id.equals(SysMLGraphicalTypes.SHAPE_SYSML_DIMENSION_AS_CLASSIFIER_ID)) {
+ return getDimension_shape_sysml_dimension_as_classifier_IncomingLinks(view);
+ }
+ if (id.equals(SysMLGraphicalTypes.SHAPE_SYSML_UNIT_AS_CLASSIFIER_ID)) {
+ return getUnit_shape_sysml_unit_as_classifier_IncomingLinks(view);
+ }
+ if (id.equals(SysMLGraphicalTypes.SHAPE_SYSML_VALUETYPE_AS_CLASSIFIER_ID)) {
+ return getValueType_shape_sysml_valuetype_as_classifier_IncommingLinks(view);
+ }
+ if (id.equals(SysMLGraphicalTypes.SHAPE_SYSML_CONSTRAINTBLOCK_AS_CLASSIFIER_ID)) {
+ return getConstraintBlock_shape_sysml_constraintblock_as_classifier_IncomingLinks(view);
+ }
+ if (id.equals(SysMLGraphicalTypes.SHAPE_SYSML_CONSTRAINTPROPERTY_AS_LABEL_ID)) {
+ return getConstraintProperty_shape_sysml_constraintproperty_as_label_IncomingLinks(view);
+ }
+ if (id.equals(CommentEditPart.VISUAL_ID) || id.equals(CommentEditPartCN.VISUAL_ID)) {
+ return getComment_IncominkLinks(view);
+ }
+ if (id.equals(ConstraintEditPart.VISUAL_ID) || id.equals(ConstraintEditPartCN.VISUAL_ID)) {
+ return getConstraint_IncomingLinks(view);
+ }
+
+ return Collections.emptyList();
+ }
+
+
+
+
+
+ /**
+ *
+ * @param view
+ * a view
+ * @return
+ * the list of the outgoing links for this view
+ */
+ public static List<UpdaterLinkDescriptor> getOutgoingLinks(final View view) {
+ final String id = view.getType();
+ if (id.equals(SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_CLASSIFIER_ID)) {
+ return getBlock_shape_sysml_block_as_classifier_OutgoingLink(view);
+ }
+ if (id.equals(SysMLGraphicalTypes.LINK_SYSML_ASSOCIATION_ID)) {
+ return getAssociation_link_sysml_association_OutgoingLink(view);
+ }
+ if (id.equals(PackageEditPart.VISUAL_ID) || id.equals(PackageEditPartCN.VISUAL_ID)) {
+ return getPackage_Shape_OutgoingLinks(view);
+ }
+ if (id.equals(UMLGraphicalTypes.SHAPE_UML_ACTOR_AS_CLASSIFIER_ID)) {
+ return getActor_shape_uml_actor_as_classifier_OutgoingLinks(view);
+ }
+ if (id.equals(UMLGraphicalTypes.SHAPE_UML_SIGNAL_AS_CLASSIFIER_ID)) {
+ return getSignal_shape_uml_signal_as_classifier_OutgoingLinks(view);
+ }
+ if (id.equals(UMLGraphicalTypes.SHAPE_UML_PROPERTY_AS_LABEL_ID)) {
+ return getProperty_shape_uml_property_as_label_OutgoingLinks(view);
+ }
+ if (id.equals(SysMLGraphicalTypes.SHAPE_SYSML_PART_AS_LABEL_ID)) {
+ return getPart_shape_sysml_part_as_label_OutgoingLinks(view);
+ }
+ if (id.equals(SysMLGraphicalTypes.SHAPE_SYSML_REFERENCE_AS_LABEL_ID)) {
+ return getReference_shape_sysml_reference_as_label_OutgoingLinks(view);
+ }
+ if (id.equals(SysMLGraphicalTypes.SHAPE_SYSML_VALUE_AS_LABEL_ID)) {
+ return getValue_shape_sysml_value_as_label_OutgoingLinks(view);
+ }
+ if (id.equals(UMLGraphicalTypes.SHAPE_UML_OPERATION_AS_LABEL_ID)) {
+ return getOperation_shape_uml_operation_as_label_OutgoingLinks(view);
+ }
+ if (id.equals(UMLGraphicalTypes.SHAPE_UML_RECEPTION_AS_LABEL_ID)) {
+ return getReception_shape_uml_reception_as_label_OutgoingLinks(view);
+ }
+ if (id.equals(InstanceSpecificationEditPart.VISUAL_ID) || id.equals(InstanceSpecificationEditPartCN.VISUAL_ID)) {
+ return getInstanceSpecification_Shape_OutgoingLinks(view);
+ }
+ if (id.equals(SlotEditPart.VISUAL_ID)) {
+ return getSlot_SlotLabel_OutgoingLinks(view);
+ }
+ if (id.equals(UMLGraphicalTypes.LINK_UML_DEPENDENCY_ID)) {
+ return getDependency_link_uml_dependency_OutgoingLinks(view);
+ }
+ if (id.equals(UMLGraphicalTypes.LINK_UML_GENERALIZATION_ID)) {
+ return getGeneralization_link_uml_generalization_OutgoingLinks(view);
+ }
+ if (id.equals(UMLGraphicalTypes.SHAPE_UML_PORT_AS_LABEL_ID)) {
+ return getPort_shape_uml_port_as_label_OutgoingLinks(view);
+ }
+ if (id.equals(SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_LABEL_ID)) {
+ return getFlowPort_shape_sysml_flowport_as_label_OutgoingLinks(view);
+ }
+ if (id.equals(UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID)) {
+ return getPort_shape_uml_port_as_affixed_OutgoingLinks(view);
+ }
+ if (id.equals(SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID)) {
+ return getFlowPort_shape_sysml_flowport_as_affixed_OutgoingLinks(view);
+ }
+ if (id.equals(SysMLGraphicalTypes.SHAPE_SYSML_FLOWSPECIFICATION_AS_CLASSIFIER_ID)) {
+ return getFlowSpecification_shape_sysml_flowspecification_as_classifier_OutgoingLinks(view);
+ }
+ if (id.equals(UMLGraphicalTypes.SHAPE_UML_INTERFACE_AS_CLASSIFIER_ID)) {
+ return getInterface_shape_uml_interface_as_classifier_OutgoingLinks(view);
+ }
+ if (id.equals(SysMLGraphicalTypes.SHAPE_SYSML_FLOWPROPERTY_AS_LABEL_ID)) {
+ return getFlowProperty_shape_sysml_flowproperty_as_label_OutgoingLinks(view);
+ }
+ if (id.equals(UMLGraphicalTypes.LINK_UML_INTERFACEREALIZATION_ID)) {
+ return getInterfaceRealization_link_uml_interfacerealization_OutgoingLinks(view);
+ }
+ if (id.equals(UMLGraphicalTypes.LINK_UML_USAGE_ID)) {
+ return getUsage_link_uml_usage_OutgoingLinks(view);
+ }
+ if (id.equals(UMLGraphicalTypes.SHAPE_UML_DATATYPE_AS_CLASSIFIER_ID)) {
+ return getDataType_shape_uml_data_type_as_classifier_OutgoingLinks(view);
+ }
+ if (id.equals(UMLGraphicalTypes.SHAPE_UML_ENUMERATION_AS_CLASSIFIER_ID)) {
+ return getEnumeration_shape_uml_enumeration_as_classifier_OutgoingLinks(view);
+ }
+ if (id.equals(UMLGraphicalTypes.SHAPE_UML_ENUMERATIONLITERAL_AS_LABEL_ID)) {
+ return getEnumerationLiteral_shape_uml_enumerationliteral_as_classifier_OutgoingLinks(view);
+ }
+ if (id.equals(UMLGraphicalTypes.SHAPE_UML_PRIMITIVETYPE_AS_CLASSIFIER_ID)) {
+ return getPrimitiveType_shape_uml_primitivetype_as_classifier_OutgoingLinks(view);
+ }
+ if (id.equals(SysMLGraphicalTypes.SHAPE_SYSML_DIMENSION_AS_CLASSIFIER_ID)) {
+ return getDimension_shape_sysml_dimension_as_classifier_OutgoingLinks(view);
+ }
+ if (id.equals(SysMLGraphicalTypes.SHAPE_SYSML_UNIT_AS_CLASSIFIER_ID)) {
+ return getUnit_shape_sysml_unit_as_classifier_OutgoingLinks(view);
+ }
+ if (id.equals(SysMLGraphicalTypes.SHAPE_SYSML_VALUETYPE_AS_CLASSIFIER_ID)) {
+ return getValueType_shape_sysml_valuetype_as_classifier_OutgoingLinks(view);
+ }
+ if (id.equals(SysMLGraphicalTypes.SHAPE_SYSML_CONSTRAINTBLOCK_AS_CLASSIFIER_ID)) {
+ return getConstraintBlock_shape_sysml_constraintblock_as_classifier_OutgoingLinks(view);
+ }
+ if (id.equals(SysMLGraphicalTypes.SHAPE_SYSML_CONSTRAINTPROPERTY_AS_LABEL_ID)) {
+ return getConstraintProperty_shape_sysml_constraintproperty_as_label_OutgoingLinks(view);
+ }
+ if (id.equals(CommentEditPart.VISUAL_ID) || id.equals(CommentEditPartCN.VISUAL_ID)) {
+ return getComment_OutgoingLinks(view);
+ }
+ if (id.equals(ConstraintEditPart.VISUAL_ID) || id.equals(ConstraintEditPartCN.VISUAL_ID)) {
+ return getConstraint_OutgoingLinks(view);
+ }
+ return Collections.emptyList();
+ }
+
+ private static List<UpdaterLinkDescriptor> getConstraint_IncomingLinks(View view) {
+ Constraint modelElement = (Constraint) view.getElement();
+ CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
+ LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_link_uml_dependency(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_link_uml_usage(modelElement, crossReferencer));
+ return result;
+ }
+
+ private static List<UpdaterLinkDescriptor> getConstraint_OutgoingLinks(View view) {
+ Constraint modelElement = (Constraint) view.getElement();
+ LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_link_uml_dependency(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_link_uml_usage(modelElement));
+ return result;
+ }
+
+ private static List<UpdaterLinkDescriptor> getComment_IncominkLinks(View view) {
+ Comment modelElement = (Comment) view.getElement();
+ CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
+ LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
+ return result;
+ }
+
+ private static List<UpdaterLinkDescriptor> getComment_OutgoingLinks(View view) {
+ Comment modelElement = (Comment) view.getElement();
+ LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ result.addAll(getOutgoingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(modelElement));
+ return result;
+ }
+
+ private static List<UpdaterLinkDescriptor> getConstraintProperty_shape_sysml_constraintproperty_as_label_IncomingLinks(View view) {
+ return getProperty_IncomingLinks(view);
+ }
+
+ private static List<UpdaterLinkDescriptor> getConstraintProperty_shape_sysml_constraintproperty_as_label_OutgoingLinks(View view) {
+ return getProperty_OutgoingLinks(view);
+ }
+
+ private static List<UpdaterLinkDescriptor> getConstraintBlock_shape_sysml_constraintblock_as_classifier_IncomingLinks(View view) {
+ return getBlock_shape_sysml_block_as_classifier_IncomingLink(view);
+ }
+
+ private static List<UpdaterLinkDescriptor> getConstraintBlock_shape_sysml_constraintblock_as_classifier_OutgoingLinks(View view) {
+ return getBlock_shape_sysml_block_as_classifier_OutgoingLink(view);
+ }
+
+
+
+
+ private static List<UpdaterLinkDescriptor> getValueType_shape_sysml_valuetype_as_classifier_IncommingLinks(View view) {
+ return getDataType_shape_uml_data_type_as_classifier_IncomingLinks(view);
+ }
+
+
+ private static List<UpdaterLinkDescriptor> getValueType_shape_sysml_valuetype_as_classifier_OutgoingLinks(View view) {
+ return getDataType_shape_uml_data_type_as_classifier_OutgoingLinks(view);
+ }
+
+ private static List<UpdaterLinkDescriptor> getDimension_shape_sysml_dimension_as_classifier_OutgoingLinks(View view) {
+ return getInstanceSpecification_Shape_IncomingLinks(view);
+ }
+
+ private static List<UpdaterLinkDescriptor> getDimension_shape_sysml_dimension_as_classifier_IncomingLinks(View view) {
+ return getInstanceSpecification_Shape_OutgoingLinks(view);
+ }
+
+ private static List<UpdaterLinkDescriptor> getUnit_shape_sysml_unit_as_classifier_OutgoingLinks(View view) {
+ return getInstanceSpecification_Shape_IncomingLinks(view);
+ }
+
+ private static List<UpdaterLinkDescriptor> getUnit_shape_sysml_unit_as_classifier_IncomingLinks(View view) {
+ return getInstanceSpecification_Shape_OutgoingLinks(view);
+ }
+
+ private static List<UpdaterLinkDescriptor> getPrimitiveType_shape_uml_primitivetype_as_classifier_IncomingLinks(View view) {
+ PrimitiveType modelElement = (PrimitiveType) view.getElement();
+ CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
+ LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_link_uml_dependency(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_link_uml_usage(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Association_link_sysml_association(modelElement));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_link_uml_generalization(modelElement, crossReferencer));
+ return result;
+ }
+
+ private static List<UpdaterLinkDescriptor> getPrimitiveType_shape_uml_primitivetype_as_classifier_OutgoingLinks(View view) {
+ PrimitiveType modelElement = (PrimitiveType) view.getElement();
+ LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_link_uml_dependency(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_link_uml_usage(modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_link_uml_generalization(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Association_link_sysml_association(modelElement));
+ return result;
+ }
+
+
+
+ private static List<UpdaterLinkDescriptor> getEnumerationLiteral_shape_uml_enumerationliteral_as_classifier_IncomingLinks(View view) {
+ EnumerationLiteral modelElement = (EnumerationLiteral) view.getElement();
+ CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
+ LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_link_uml_usage(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_link_uml_dependency(modelElement, crossReferencer));
+ return result;
+ }
+
+ private static List<UpdaterLinkDescriptor> getEnumerationLiteral_shape_uml_enumerationliteral_as_classifier_OutgoingLinks(View view) {
+ EnumerationLiteral modelElement = (EnumerationLiteral) view.getElement();
+ LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_link_uml_dependency(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_link_uml_usage(modelElement));
+ return result;
+ }
+
+ private static List<UpdaterLinkDescriptor> getEnumeration_shape_uml_enumeration_as_classifier_IncomingLinks(View view) {
+ Enumeration modelElement = (Enumeration) view.getElement();
+ CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
+ LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_link_uml_dependency(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_link_uml_usage(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Association_link_sysml_association(modelElement));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_link_uml_generalization(modelElement, crossReferencer));
+ return result;
+ }
+
+ private static List<UpdaterLinkDescriptor> getEnumeration_shape_uml_enumeration_as_classifier_OutgoingLinks(View view) {
+ Enumeration modelElement = (Enumeration) view.getElement();
+ LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_link_uml_dependency(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_link_uml_usage(modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_link_uml_generalization(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Association_link_sysml_association(modelElement));
+ return result;
+ }
+
+ private static List<UpdaterLinkDescriptor> getDataType_shape_uml_data_type_as_classifier_IncomingLinks(View view) {
+ DataType modelElement = (DataType) view.getElement();
+ CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
+ LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_link_uml_dependency(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_link_uml_usage(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Association_link_sysml_association(modelElement));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_link_uml_generalization(modelElement, crossReferencer));
+ return result;
+ }
+
+ private static List<UpdaterLinkDescriptor> getDataType_shape_uml_data_type_as_classifier_OutgoingLinks(View view) {
+ DataType modelElement = (DataType) view.getElement();
+ LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_link_uml_dependency(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_link_uml_usage(modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_link_uml_generalization(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Association_link_sysml_association(modelElement));
+ return result;
+ }
+
+ private static List<UpdaterLinkDescriptor> getUsage_link_uml_usage_IncomingLinks(View view) {
+ Usage modelElement = (Usage) view.getElement();
+ CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
+ LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_link_uml_dependency(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_link_uml_usage(modelElement, crossReferencer));
+ return result;
+ }
+
+ private static List<UpdaterLinkDescriptor> getUsage_link_uml_usage_OutgoingLinks(View view) {
+ InterfaceRealization modelElement = (InterfaceRealization) view.getElement();
+ LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_link_uml_dependency(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_link_uml_usage(modelElement));
+ return result;
+ }
+
+ private static List<UpdaterLinkDescriptor> getInterfaceRealization_link_uml_interfacerealization_IncomingLinks(View view) {
+ InterfaceRealization modelElement = (InterfaceRealization) view.getElement();
+ CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
+ LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_link_uml_dependency(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_link_uml_usage(modelElement, crossReferencer));
+ return result;
+ }
+
+ private static List<UpdaterLinkDescriptor> getInterfaceRealization_link_uml_interfacerealization_OutgoingLinks(View view) {
+ InterfaceRealization modelElement = (InterfaceRealization) view.getElement();
+ LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_link_uml_dependency(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_link_uml_usage(modelElement));
+ return result;
+ }
+
+ private static List<UpdaterLinkDescriptor> getFlowProperty_shape_sysml_flowproperty_as_label_IncomingLinks(View view) {
+ return getProperty_IncomingLinks(view);
+ }
+
+ private static List<UpdaterLinkDescriptor> getFlowProperty_shape_sysml_flowproperty_as_label_OutgoingLinks(View view) {
+ return getProperty_OutgoingLinks(view);
+ }
+
+ private static List<UpdaterLinkDescriptor> getInterface_shape_uml_interface_as_classifier_IncomingLinks(View view) {
+ return getInterface_IncomingLinks(view);
+ }
+
+ private static List<UpdaterLinkDescriptor> getInterface_shape_uml_interface_as_classifier_OutgoingLinks(View view) {
+ return getInterface_OutgoingLinks(view);
+ }
+
+ private static List<UpdaterLinkDescriptor> getFlowSpecification_shape_sysml_flowspecification_as_classifier_IncomingLinks(View view) {
+ return getInterface_IncomingLinks(view);
+ }
+
+ private static List<UpdaterLinkDescriptor> getFlowSpecification_shape_sysml_flowspecification_as_classifier_OutgoingLinks(View view) {
+ return getInterface_OutgoingLinks(view);
+ }
+
+ private static List<UpdaterLinkDescriptor> getInterface_IncomingLinks(View view) {
+ Interface modelElement = (Interface) view.getElement();
+ CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
+ LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_link_uml_usage(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_link_uml_dependency(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Association_link_sysml_association(modelElement));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_link_uml_generalization(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_InterfaceRealization_Edge(modelElement, crossReferencer));
+ return result;
+ }
+
+ private static List<UpdaterLinkDescriptor> getInterface_OutgoingLinks(View view) {
+ Interface modelElement = (Interface) view.getElement();
+ LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_link_uml_dependency(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_link_uml_usage(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Association_link_sysml_association(modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_link_uml_generalization(modelElement));
+ return result;
+ }
+
+ private static List<UpdaterLinkDescriptor> getPort_shape_uml_port_as_affixed_IncomingLinks(View view) {
+ return getProperty_IncomingLinks(view);
+ }
+
+ private static List<UpdaterLinkDescriptor> getPort_shape_uml_port_as_affixed_OutgoingLinks(View view) {
+ return getProperty_OutgoingLinks(view);
+ }
+
+ private static List<UpdaterLinkDescriptor> getFlowPort_shape_sysml_flowport_as_affixed_IncomingLinks(View view) {
+ return getProperty_IncomingLinks(view);
+ }
+
+ private static List<UpdaterLinkDescriptor> getFlowPort_shape_sysml_flowport_as_affixed_OutgoingLinks(View view) {
+ return getProperty_OutgoingLinks(view);
+ }
+
+ private static List<UpdaterLinkDescriptor> getFlowPort_shape_sysml_flowport_as_label_IncomingLinks(View view) {
+ return getProperty_IncomingLinks(view);
+ }
+
+ private static List<UpdaterLinkDescriptor> getFlowPort_shape_sysml_flowport_as_label_OutgoingLinks(View view) {
+ return getProperty_IncomingLinks(view);
+ }
+
+ private static List<UpdaterLinkDescriptor> getPort_shape_uml_port_as_label_IncomingLinks(View view) {
+ return getProperty_OutgoingLinks(view);
+ }
+
+ private static List<UpdaterLinkDescriptor> getPort_shape_uml_port_as_label_OutgoingLinks(View view) {
+ return getProperty_OutgoingLinks(view);
+ }
+
+ private static List<UpdaterLinkDescriptor> getDependency_link_uml_dependency_IncomingLinks(View view) {
+ Dependency modelElement = (Dependency) view.getElement();
+ CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
+ LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_link_uml_usage(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_link_uml_dependency(modelElement, crossReferencer));
+ return result;
+ }
+
+ private static List<UpdaterLinkDescriptor> getDependency_link_uml_dependency_OutgoingLinks(View view) {
+ Dependency modelElement = (Dependency) view.getElement();
+ LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_link_uml_dependency(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_link_uml_usage(modelElement));
+ return result;
+ }
+
+ private static List<UpdaterLinkDescriptor> getGeneralization_link_uml_generalization_IncomingLinks(View view) {
+ Generalization modelElement = (Generalization) view.getElement();
+ CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
+ LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
+ return result;
+ }
+
+ private static List<UpdaterLinkDescriptor> getGeneralization_link_uml_generalization_OutgoingLinks(View view) {
+ return Collections.emptyList();
+ }
+
+ private static List<UpdaterLinkDescriptor> getSlot_SlotLabel_IncomingLinks(View view) {
+ Slot modelElement = (Slot) view.getElement();
+ CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
+ LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
+ return result;
+ }
+
+ private static List<UpdaterLinkDescriptor> getSlot_SlotLabel_OutgoingLinks(View view) {
+ return Collections.emptyList();
+ }
+
+ private static List<UpdaterLinkDescriptor> getInstanceSpecification_Shape_IncomingLinks(View view) {
+ InstanceSpecification modelElement = (InstanceSpecification) view.getElement();
+ CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
+ LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_link_uml_dependency(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_link_uml_usage(modelElement, crossReferencer));
+ return result;
+ }
+
+ private static List<UpdaterLinkDescriptor> getInstanceSpecification_Shape_OutgoingLinks(View view) {
+ InstanceSpecification modelElement = (InstanceSpecification) view.getElement();
+ LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_link_uml_dependency(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_link_uml_usage(modelElement));
+ return result;
+ }
+
+ private static List<UpdaterLinkDescriptor> getReception_shape_uml_reception_as_label_IncomingLinks(View view) {
+ Reception modelElement = (Reception) view.getElement();
+ CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
+ LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_link_uml_dependency(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_link_uml_usage(modelElement, crossReferencer));
+ return result;
+ }
+
+ private static List<UpdaterLinkDescriptor> getReception_shape_uml_reception_as_label_OutgoingLinks(View view) {
+ Reception modelElement = (Reception) view.getElement();
+ LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_link_uml_dependency(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_link_uml_usage(modelElement));
+ return result;
+ }
+
+ private static List<UpdaterLinkDescriptor> getOperation_shape_uml_operation_as_label_IncomingLinks(View view) {
+ Operation modelElement = (Operation) view.getElement();
+ CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
+ LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_link_uml_dependency(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_link_uml_usage(modelElement, crossReferencer));
+ return result;
+ }
+
+ private static List<UpdaterLinkDescriptor> getOperation_shape_uml_operation_as_label_OutgoingLinks(View view) {
+ Operation modelElement = (Operation) view.getElement();
+ LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_link_uml_dependency(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_link_uml_usage(modelElement));
+ return result;
+ }
+
+
+ private static List<UpdaterLinkDescriptor> getValue_shape_sysml_value_as_label_IncomingLinks(View view) {
+ return getProperty_IncomingLinks(view);
+ }
+
+ private static List<UpdaterLinkDescriptor> getValue_shape_sysml_value_as_label_OutgoingLinks(View view) {
+ return getProperty_OutgoingLinks(view);
+ }
+
+ private static List<UpdaterLinkDescriptor> getReference_shape_sysml_reference_as_label_IncomingLinks(View view) {
+ return getProperty_IncomingLinks(view);
+ }
+
+ private static List<UpdaterLinkDescriptor> getReference_shape_sysml_reference_as_label_OutgoingLinks(View view) {
+ return getProperty_IncomingLinks(view);
+ }
+
+ private static List<UpdaterLinkDescriptor> getPart_shape_sysml_part_as_label_IncomingLinks(View view) {
+ return getProperty_OutgoingLinks(view);
+ }
+
+ private static List<UpdaterLinkDescriptor> getPart_shape_sysml_part_as_label_OutgoingLinks(View view) {
+ return getProperty_OutgoingLinks(view);
+ }
+
+ private static List<UpdaterLinkDescriptor> getProperty_shape_uml_property_as_label_IncomingLinks(View view) {
+ return getProperty_IncomingLinks(view);
+ }
+
+ private static List<UpdaterLinkDescriptor> getProperty_shape_uml_property_as_label_OutgoingLinks(View view) {
+ return getProperty_OutgoingLinks(view);
+ }
+
+ private static Collection<UMLLinkDescriptor> getIncomingTypeModelFacetLinks_InterfaceRealization_Edge(Interface target, CrossReferenceAdapter crossReferencer) {
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ Collection<EStructuralFeature.Setting> settings = crossReferencer.getInverseReferences(target);
+ for (EStructuralFeature.Setting setting : settings) {
+ if (setting.getEStructuralFeature() != UMLPackage.eINSTANCE.getInterfaceRealization_Contract() || false == setting.getEObject() instanceof InterfaceRealization) {
+ continue;
+ }
+ InterfaceRealization link = (InterfaceRealization) setting.getEObject();
+ if (InterfaceRealizationEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
+ continue;
+ }
+ if (false == link.eContainer() instanceof BehavioredClassifier) {
+ continue;
+ }
+ BehavioredClassifier container = (BehavioredClassifier) link.eContainer();
+ result.add(new UMLLinkDescriptor(container, target, link, UMLElementTypes.InterfaceRealization_Edge, InterfaceRealizationEditPart.VISUAL_ID));
+ }
+ return result;
+ }
+
+ private static List<UpdaterLinkDescriptor> getProperty_IncomingLinks(View view) {
+ Property modelElement = (Property) view.getElement();
+ CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
+ LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_link_uml_dependency(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_link_uml_usage(modelElement, crossReferencer));
+ return result;
+ }
+
+ private static List<UpdaterLinkDescriptor> getProperty_OutgoingLinks(View view) {
+ Property modelElement = (Property) view.getElement();
+ LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_link_uml_dependency(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_link_uml_usage(modelElement));
+ return result;
+ }
+
+
+ private static List<UpdaterLinkDescriptor> getSignal_shape_uml_signal_as_classifier_IncomingLinks(View view) {
+ Signal modelElement = (Signal) view.getElement();
+ CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
+ LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_link_uml_dependency(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_link_uml_generalization(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_link_uml_usage(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Association_link_sysml_association(modelElement));
+ return result;
+ }
+
+ private static List<UpdaterLinkDescriptor> getSignal_shape_uml_signal_as_classifier_OutgoingLinks(View view) {
+ Signal modelElement = (Signal) view.getElement();
+ LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_link_uml_dependency(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_link_uml_usage(modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_link_uml_generalization(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Association_link_sysml_association(modelElement));
+ return result;
+
+ }
+
+ private static List<UpdaterLinkDescriptor> getActor_shape_uml_actor_as_classifier_IncomingLinks(View view) {
+ Actor modelElement = (Actor) view.getElement();
+ CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
+ LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_link_uml_dependency(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_link_uml_generalization(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_link_uml_usage(modelElement, crossReferencer));
+ return result;
+ }
+
+ private static List<UpdaterLinkDescriptor> getActor_shape_uml_actor_as_classifier_OutgoingLinks(View view) {
+ Actor modelElement = (Actor) view.getElement();
+ LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_link_uml_dependency(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_link_uml_usage(modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_link_uml_generalization(modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_InterfaceRealization_link_uml_interfacerealization(modelElement));
+ return result;
+ }
+
+ public static List<UpdaterLinkDescriptor> getPackage_Shape_IncomingLinks(View view) {
+ Package modelElement = (Package) view.getElement();
+ CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
+ LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_link_uml_usage(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_link_uml_dependency(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
+ return result;
+ }
+
+ public static List<UpdaterLinkDescriptor> getPackage_Shape_OutgoingLinks(View view) {
+ Package modelElement = (Package) view.getElement();
+ LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_link_uml_usage(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_link_uml_dependency(modelElement));
+ return result;
+ }
+
+
+ private static List<UpdaterLinkDescriptor> getBlock_shape_sysml_block_as_classifier_IncomingLink(View view) {
+ final Class modelElement = (Class) view.getElement();
+ final CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
+ final LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ result.addAll(getIncomingTypeModelFacetLinks_Association_link_sysml_association(modelElement));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_link_uml_generalization(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_link_uml_dependency(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_link_uml_usage(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
+ return result;
+ }
+
+ private static List<UpdaterLinkDescriptor> getBlock_shape_sysml_block_as_classifier_OutgoingLink(final View view) {
+ final Class modelElement = (Class) view.getElement();
+ final LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_Association_link_sysml_association(modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_link_uml_generalization(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_link_uml_dependency(modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_InterfaceRealization_link_uml_interfacerealization(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_link_uml_usage(modelElement));
+ return result;
+ }
+
+ private static List<UpdaterLinkDescriptor> getAssociation_link_sysml_association_IncomingLink(final View view) {
+ final Association modelElement = (Association) view.getElement();
+ final LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ final CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_link_uml_generalization(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Association_link_sysml_association(modelElement));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_link_uml_dependency(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Usage_link_uml_usage(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
+ return result;
+ }
+
+ private static List<UpdaterLinkDescriptor> getAssociation_link_sysml_association_OutgoingLink(final View view) {
+ final Association modelElement = (Association) view.getElement();
+ final LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_link_uml_generalization(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Association_link_sysml_association(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_link_uml_dependency(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Usage_link_uml_usage(modelElement));
+ return result;
+ }
+
+ private static Collection<UpdaterLinkDescriptor> getIncomingTypeModelFacetLinks_Dependency_link_uml_dependency(NamedElement target, CrossReferenceAdapter crossReferencer) {
+ LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ Collection<EStructuralFeature.Setting> settings = crossReferencer.getInverseReferences(target);
+ for (EStructuralFeature.Setting setting : settings) {
+ if (setting.getEStructuralFeature() != UMLPackage.eINSTANCE.getDependency_Supplier() || false == setting.getEObject() instanceof Dependency) {
+ continue;
+ }
+ Dependency link = (Dependency) setting.getEObject();
+ if (!UMLGraphicalTypes.LINK_UML_DEPENDENCY_ID.equals(SysMLVisualIDRegistry.getLinkWithClassVisualID(link))) {
+ continue;
+ }
+ List<NamedElement> sources = link.getClients();
+ Object theSource = sources.size() >= 1 ? sources.get(0) : null;
+ if (false == theSource instanceof NamedElement) {
+ continue;
+ }
+ NamedElement src = (NamedElement) theSource;
+ result.add(new UMLLinkDescriptor(src, target, link, UMLElementTypes.Dependency_Edge, null));
+ }
+ return result;
+ }
+
+ private static Collection<UpdaterLinkDescriptor> getContainedTypeModelFacetLinks_InterfaceRealization_link_uml_interfacerealization(BehavioredClassifier container) {
+ Collection<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ for (Iterator<InterfaceRealization> links = container.getInterfaceRealizations().iterator(); links.hasNext();) {
+ EObject linkObject = links.next();
+ if (false == linkObject instanceof InterfaceRealization) {
+ continue;
+ }
+ InterfaceRealization link = (InterfaceRealization) linkObject;
+ if (!UMLGraphicalTypes.LINK_UML_INTERFACEREALIZATION_ID.equals(SysMLVisualIDRegistry.getLinkWithClassVisualID(link))) {
+ continue;
+ }
+ Interface dst = link.getContract();
+ result.add(new UpdaterLinkDescriptor(container, dst, link, UMLElementTypes.InterfaceRealization_Edge, null));
+ }
+ return result;
+ }
+
+ private static Collection<UpdaterLinkDescriptor> getIncomingTypeModelFacetLinks_Usage_link_uml_usage(NamedElement target, CrossReferenceAdapter crossReferencer) {
+ LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ Collection<EStructuralFeature.Setting> settings = crossReferencer.getInverseReferences(target);
+ for (EStructuralFeature.Setting setting : settings) {
+ if (setting.getEStructuralFeature() != UMLPackage.eINSTANCE.getDependency_Supplier() || false == setting.getEObject() instanceof Usage) {
+ continue;
+ }
+ Usage link = (Usage) setting.getEObject();
+ if (!UMLGraphicalTypes.LINK_UML_USAGE_ID.equals(SysMLVisualIDRegistry.getLinkWithClassVisualID(link))) {
+ continue;
+ }
+ List<NamedElement> sources = link.getClients();
+ Object theSource = sources.size() >= 1 ? sources.get(0) : null;
+ if (false == theSource instanceof NamedElement) {
+ continue;
+ }
+ NamedElement src = (NamedElement) theSource;
+ result.add(new UpdaterLinkDescriptor(src, target, link, UMLElementTypes.Usage_Edge, null));
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ private static Collection<UpdaterLinkDescriptor> getOutgoingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(Comment source) {
+ LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ for (Iterator<?> destinations = source.getAnnotatedElements().iterator(); destinations.hasNext();) {
+ Element destination = (Element) destinations.next();
+ result.add(new UpdaterLinkDescriptor(source, destination, UMLElementTypes.Comment_AnnotatedElementEdge, CommentAnnotatedElementEditPart.VISUAL_ID));
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ private static Collection<UpdaterLinkDescriptor> getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(Constraint source) {
+ LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ for (Iterator<?> destinations = source.getConstrainedElements().iterator(); destinations.hasNext();) {
+ Element destination = (Element) destinations.next();
+ result.add(new UpdaterLinkDescriptor(source, destination, UMLElementTypes.Constraint_ConstrainedElementEdge, ConstraintConstrainedElementEditPart.VISUAL_ID));
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ private static Collection<UpdaterLinkDescriptor> getIncomingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(Element target, CrossReferenceAdapter crossReferencer) {
+ LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ Collection<EStructuralFeature.Setting> settings = crossReferencer.getInverseReferences(target);
+ for (EStructuralFeature.Setting setting : settings) {
+ if (setting.getEStructuralFeature() == UMLPackage.eINSTANCE.getComment_AnnotatedElement()) {
+ result.add(new UpdaterLinkDescriptor(setting.getEObject(), target, UMLElementTypes.Comment_AnnotatedElementEdge, CommentAnnotatedElementEditPart.VISUAL_ID));
+ }
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ private static Collection<UpdaterLinkDescriptor> getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(Element target, CrossReferenceAdapter crossReferencer) {
+ LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ Collection<EStructuralFeature.Setting> settings = crossReferencer.getInverseReferences(target);
+ for (EStructuralFeature.Setting setting : settings) {
+ if (setting.getEStructuralFeature() == UMLPackage.eINSTANCE.getConstraint_ConstrainedElement()) {
+ result.add(new UpdaterLinkDescriptor(setting.getEObject(), target, UMLElementTypes.Constraint_ConstrainedElementEdge, ConstraintConstrainedElementEditPart.VISUAL_ID));
+ }
+ }
+ return result;
+ }
+
+
+ private static Collection<UpdaterLinkDescriptor> getOutgoingTypeModelFacetLinks_Usage_link_uml_usage(NamedElement source) {
+ Package container = null;
+ // Find container element for the link.
+ // Climb up by containment hierarchy starting from the source
+ // and return the first element that is instance of the container class.
+ for (EObject element = source; element != null && container == null; element = element.eContainer()) {
+ if (element instanceof Package) {
+ container = (Package) element;
+ }
+ }
+ if (container == null) {
+ return Collections.emptyList();
+ }
+ Collection<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ for (Iterator<PackageableElement> links = container.getPackagedElements().iterator(); links.hasNext();) {
+ EObject linkObject = links.next();
+ if (false == linkObject instanceof Usage) {
+ continue;
+ }
+ Usage link = (Usage) linkObject;
+ if (!UMLGraphicalTypes.LINK_UML_USAGE_ID.equals(SysMLVisualIDRegistry.getLinkWithClassVisualID(linkObject))) {
+ continue;
+ }
+ List<NamedElement> targets = link.getSuppliers();
+ Object theTarget = targets.size() == 1 ? targets.get(0) : null;
+ if (false == theTarget instanceof NamedElement) {
+ continue;
+ }
+ NamedElement dst = (NamedElement) theTarget;
+ List<NamedElement> sources = link.getClients();
+ Object theSource = sources.size() >= 1 ? sources.get(0) : null;
+ if (false == theSource instanceof NamedElement) {
+ continue;
+ }
+ NamedElement src = (NamedElement) theSource;
+ if (src != source) {
+ continue;
+ }
+ result.add(new UMLLinkDescriptor(src, dst, link, UMLElementTypes.Usage_Edge, null));
+ }
+ return result;
+ }
+
+ private static Collection<UpdaterLinkDescriptor> getOutgoingTypeModelFacetLinks_Dependency_link_uml_dependency(NamedElement source) {
+ Package container = null;
+ // Find container element for the link.
+ // Climb up by containment hierarchy starting from the source
+ // and return the first element that is instance of the container class.
+ for (EObject element = source; element != null && container == null; element = element.eContainer()) {
+ if (element instanceof Package) {
+ container = (Package) element;
+ }
+ }
+ if (container == null) {
+ return Collections.emptyList();
+ }
+ Collection<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ for (Iterator<PackageableElement> links = container.getPackagedElements().iterator(); links.hasNext();) {
+ EObject linkObject = links.next();
+ if (false == linkObject instanceof Dependency) {
+ continue;
+ }
+ Dependency link = (Dependency) linkObject;
+ if (!UMLGraphicalTypes.LINK_UML_DEPENDENCY_ID.equals(SysMLVisualIDRegistry.getLinkWithClassVisualID(link))) {
+ continue;
+ }
+ List<NamedElement> targets = link.getSuppliers();
+ Object theTarget = targets.size() == 1 ? targets.get(0) : null;
+ if (false == theTarget instanceof NamedElement) {
+ continue;
+ }
+ NamedElement dst = (NamedElement) theTarget;
+ List<NamedElement> sources = link.getClients();
+ Object theSource = sources.size() >= 1 ? sources.get(0) : null;
+ if (false == theSource instanceof NamedElement) {
+ continue;
+ }
+ NamedElement src = (NamedElement) theSource;
+ if (src != source) {
+ continue;
+ }
+ result.add(new UpdaterLinkDescriptor(src, dst, link, UMLElementTypes.Dependency_Edge, null));
+ }
+ return result;
+ }
+
+ private static Collection<UpdaterLinkDescriptor> getContainedTypeModelFacetLinks_Generalization_link_uml_generalization(Classifier container) {
+ Collection<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ for (Iterator<Generalization> links = container.getGeneralizations().iterator(); links.hasNext();) {
+ EObject linkObject = links.next();
+ if (false == linkObject instanceof Generalization) {
+ continue;
+ }
+ Generalization link = (Generalization) linkObject;
+ if (!UMLGraphicalTypes.LINK_UML_GENERALIZATION_ID.equals(SysMLVisualIDRegistry.getLinkWithClassVisualID(link))) {
+ continue;
+ }
+ Classifier dst = link.getGeneral();
+ result.add(new UpdaterLinkDescriptor(container, dst, link, UMLElementTypes.Generalization_Edge, null));
+ }
+ return result;
+ }
+
+ private static Collection<UpdaterLinkDescriptor> getIncomingTypeModelFacetLinks_Generalization_link_uml_generalization(Classifier target, CrossReferenceAdapter crossReferencer) {
+ LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ Collection<EStructuralFeature.Setting> settings = crossReferencer.getInverseReferences(target);
+ for (EStructuralFeature.Setting setting : settings) {
+ if (setting.getEStructuralFeature() != UMLPackage.eINSTANCE.getGeneralization_General() || false == setting.getEObject() instanceof Generalization) {
+ continue;
+ }
+ Generalization link = (Generalization) setting.getEObject();
+ if (!UMLGraphicalTypes.LINK_UML_GENERALIZATION_ID.equals(SysMLVisualIDRegistry.getLinkWithClassVisualID(link))) {
+ continue;
+ }
+ if (false == link.eContainer() instanceof Classifier) {
+ continue;
+ }
+ Classifier container = (Classifier) link.eContainer();
+ result.add(new UpdaterLinkDescriptor(container, target, link, UMLElementTypes.Generalization_Edge, null));
+ }
+ return result;
+ }
+
+ /**
+ * This returns the collection of the incoming associations of a model element.
+ *
+ * @param target
+ * The model element.
+ * @return The list of the incoming associations of the model element.
+ */
+ private static Collection<? extends UpdaterLinkDescriptor> getIncomingTypeModelFacetLinks_Association_link_sysml_association(Type target) {
+ Package container = null;
+ // Find container element for the link.
+ // Climb up by containment hierarchy starting from the source
+ // and return the first element that is instance of the container class.
+ EObject element = target;
+
+ while (null != element && null == container) {
+ element = element.eContainer();
+
+ if (element instanceof Package) {
+ container = (Package) element;
+ }
+ }
+
+ if (null == container) {
+ return Collections.emptyList();
+ }
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ for (Iterator<?> links = container.getPackagedElements().iterator(); links.hasNext();) {
+ EObject linkObject = (EObject) links.next();
+ if (!(linkObject instanceof Association)) {
+ continue;
+ }
+ Association link = (Association) linkObject;
+ if (!SysMLGraphicalTypes.LINK_SYSML_ASSOCIATION_ID.equals(SysMLVisualIDRegistry.getLinkWithClassVisualID(link))) {
+ continue;
+ }
+ EList<Type> endTypes = link.getEndTypes();
+ if (null == endTypes || endTypes.isEmpty()) {
+ continue;
+ }
+
+ Object theSource = endTypes.size() >= 2 ? endTypes.get(1) : endTypes.get(0);// source and target are inverted in BDD // If only one source : same target and source for the link
+ if (!(theSource instanceof Type)) {
+ continue;
+ }
+ Type src = (Type) theSource;
+
+ Object theTarget = endTypes.get(0);// source and target are inverted in BDD
+ if (!(theTarget instanceof Type)) {
+ continue;
+ }
+ Type trgt = (Type) theTarget;
+
+ if (trgt != target) {
+ continue;
+ }
+
+ result.add(new UMLLinkDescriptor(src, trgt, link, SysMLElementTypes.ASSOCIATION, null));
+ }
+ return result;
+ }
+
+ private static Collection<? extends UpdaterLinkDescriptor> getOutgoingTypeModelFacetLinks_Association_link_sysml_association(final Type source) {
+ Package container = null;
+ // Find container element for the link.
+ // Climb up by containment hierarchy starting from the source
+ // and return the first element that is instance of the container class.
+ for (EObject element = source; element != null && container == null; element = element.eContainer()) {
+ if (element instanceof Package) {
+ container = (Package) element;
+ }
+ }
+ if (container == null) {
+ return Collections.emptyList();
+ }
+ Collection<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ for (Iterator<PackageableElement> links = container.getPackagedElements().iterator(); links.hasNext();) {
+ EObject linkObject = links.next();
+ if (false == linkObject instanceof Association) {
+ continue;
+ }
+ Association link = (Association) linkObject;
+ if (!SysMLGraphicalTypes.LINK_SYSML_ASSOCIATION_ID.equals(SysMLVisualIDRegistry.getLinkWithClassVisualID(link))) {
+ continue;
+ }
+ // Papyrus GenCode
+ List<Type> targets = link.getEndTypes();
+ // Object theTarget = targets.size() >= 2 ? targets.get(1) : null;
+ Object theTarget = targets.size() >= 1 ? targets.get(0) : null;// source and target are inverted in BDD
+ if (false == theTarget instanceof Type) {
+ continue;
+ }
+ Type dst = (Type) theTarget;
+ List<Type> sources = link.getEndTypes();
+ // Object theSource = sources.size() >= 1 ? sources.get(0) : null;
+ Object theSource = sources.size() >= 2 ? sources.get(1) : null;// source and target are inverted in BDD
+ if (false == theSource instanceof Type) {
+ continue;
+ }
+ Type src = (Type) theSource;
+ if (src != source) {
+ continue;
+ }
+ result.add(new UMLLinkDescriptor(src, dst, link, SysMLElementTypes.ASSOCIATION, null));
+ }
+ return result;
+ }
+
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/part/SysMLVisualIDRegistry.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/part/SysMLVisualIDRegistry.java
new file mode 100755
index 0000000..de2408f
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/part/SysMLVisualIDRegistry.java
@@ -0,0 +1,177 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.part;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.structure.DiagramStructure;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ *
+ * @author vl222926
+ * Adapted code for the code generated for the UML Diagrams
+ */
+public class SysMLVisualIDRegistry {
+
+ private static final String UNKNOWN = "-1"; //$NON-NLS-1$
+
+ public static String getLinkWithClassVisualID(EObject domainElement) {
+ if (domainElement == null) {
+ return UNKNOWN;
+ }
+ final EClass eClass = domainElement.eClass();
+ if (UMLPackage.eINSTANCE.getGeneralization().isSuperTypeOf(eClass)) {
+ return UMLGraphicalTypes.LINK_UML_GENERALIZATION_ID;
+ }
+ if (UMLPackage.eINSTANCE.getInterfaceRealization().isSuperTypeOf(eClass)) {
+ return UMLGraphicalTypes.LINK_UML_INTERFACEREALIZATION_ID;
+ }
+ if (UMLPackage.eINSTANCE.getAssociation().isSuperTypeOf(eClass)) {
+ return SysMLGraphicalTypes.LINK_SYSML_ASSOCIATION_ID;
+ }
+ if (UMLPackage.eINSTANCE.getConnector().isSuperTypeOf(eClass)) {
+ return UMLGraphicalTypes.LINK_UML_CONNECTOR_ID;
+ }
+ // if(UMLPackage.eINSTANCE.getAssociationClass().isSuperTypeOf(domainElement.eClass())) {
+ // return AssociationClassLinkEditPart.VISUAL_ID;
+ // }
+ // if(UMLPackage.eINSTANCE.getAssociation().isSuperTypeOf(domainElement.eClass())) {
+ // return AssociationEditPart.VISUAL_ID;
+ // }
+ // if(UMLPackage.eINSTANCE.getAssociation().isSuperTypeOf(domainElement.eClass())) {
+ // return AssociationBranchEditPart.VISUAL_ID;
+ // }
+ // if(UMLPackage.eINSTANCE.getGeneralization().isSuperTypeOf(domainElement.eClass())) {
+ // return GeneralizationEditPart.VISUAL_ID;
+ // }
+ // if(UMLPackage.eINSTANCE.getInterfaceRealization().isSuperTypeOf(domainElement.eClass())) {
+ // return InterfaceRealizationEditPart.VISUAL_ID;
+ // }
+ // if(UMLPackage.eINSTANCE.getSubstitution().isSuperTypeOf(domainElement.eClass())) {
+ // return SubstitutionEditPart.VISUAL_ID;
+ // }
+ // if(UMLPackage.eINSTANCE.getRealization().isSuperTypeOf(domainElement.eClass())) {
+ // return RealizationEditPart.VISUAL_ID;
+ // }
+ // if(UMLPackage.eINSTANCE.getAbstraction().isSuperTypeOf(domainElement.eClass())) {
+ // return AbstractionEditPart.VISUAL_ID;
+ // }
+ // if(UMLPackage.eINSTANCE.getUsage().isSuperTypeOf(domainElement.eClass())) {
+ // return UsageEditPart.VISUAL_ID;
+ // }
+ if (UMLPackage.eINSTANCE.getDependency().isSuperTypeOf(domainElement.eClass())) {
+ return UMLGraphicalTypes.LINK_UML_DEPENDENCY_ID;
+ }
+ // if(UMLPackage.eINSTANCE.getDependency().isSuperTypeOf(domainElement.eClass())) {
+ // return DependencyBranchEditPart.VISUAL_ID;
+ // }
+ // if(UMLPackage.eINSTANCE.getElementImport().isSuperTypeOf(domainElement.eClass())) {
+ // return ElementImportEditPart.VISUAL_ID;
+ // }
+ // if(UMLPackage.eINSTANCE.getPackageImport().isSuperTypeOf(domainElement.eClass())) {
+ // return PackageImportEditPart.VISUAL_ID;
+ // }
+ // if(UMLPackage.eINSTANCE.getPackageMerge().isSuperTypeOf(domainElement.eClass())) {
+ // return PackageMergeEditPart.VISUAL_ID;
+ // }
+ // if(UMLPackage.eINSTANCE.getProfileApplication().isSuperTypeOf(domainElement.eClass())) {
+ // return ProfileApplicationEditPart.VISUAL_ID;
+ // }
+ // if(UMLPackage.eINSTANCE.getTemplateBinding().isSuperTypeOf(domainElement.eClass())) {
+ // return TemplateBindingEditPart.VISUAL_ID;
+ // }
+ // if(UMLPackage.eINSTANCE.getGeneralizationSet().isSuperTypeOf(domainElement.eClass())) {
+ // return GeneralizationSetEditPart.VISUAL_ID;
+ // }
+ // if(UMLPackage.eINSTANCE.getInstanceSpecification().isSuperTypeOf(domainElement.eClass())) {
+ // return InstanceSpecificationLinkEditPart.VISUAL_ID;
+ // }
+ // if(UMLPackage.eINSTANCE.getInformationFlow().isSuperTypeOf(domainElement.eClass())) {
+ // return InformationFlowEditPart.VISUAL_ID;
+ // }
+ return UNKNOWN;
+ }
+
+ // //TODO : this class as not been tested...
+ public static final DiagramStructure TYPED_INSTANCE = new DiagramStructure() {
+
+ @Override
+ public String getVisualID(View view) {
+ return null;
+ }
+
+ @Override
+ public String getModelID(View view) {
+ return null;
+ }
+
+ @Override
+ public String getNodeVisualID(View containerView, EObject domainElement) {
+ return null;
+ }
+
+ @Override
+ public boolean checkNodeVisualID(View containerView, EObject domainElement, String candidate) {
+ return false;
+ }
+
+ @Override
+ public boolean isCompartmentVisualID(String visualID) {
+ return false;
+ }
+
+ @Override
+ public boolean isSemanticLeafVisualID(String visualID) {
+ return false;
+ }
+
+ // public String getVisualIDAsString(final View view) {
+ // return view.getType();
+ // }
+ //
+ // public int getVisualID(View view) {//TODO : not useful with sysml, because we are using String!
+ // final String type = view.getType();
+ // return org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry.getVisualID(view);
+ // }
+ //
+ //
+ // public String getModelID(View view) {
+ // return org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry.getModelID(view);
+ // }
+ //
+ //
+ // public int getNodeVisualID(View containerView, EObject domainElement) {
+ // return org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry.getNodeVisualID(containerView, domainElement);
+ // }
+ //
+ //
+ // public boolean checkNodeVisualID(View containerView, EObject domainElement, int candidate) {
+ // return org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry.checkNodeVisualID(containerView, domainElement, candidate);
+ // }
+ //
+ //
+ // public boolean isCompartmentVisualID(int visualID) {
+ // return org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry.isCompartmentVisualID(visualID);
+ // }
+ //
+ //
+ // public boolean isSemanticLeafVisualID(int visualID) {
+ // return org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry.isSemanticLeafVisualID(visualID);
+ // }
+ };
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/CustomPreferenceInitializer.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/CustomPreferenceInitializer.java
new file mode 100755
index 0000000..271d328
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/CustomPreferenceInitializer.java
@@ -0,0 +1,79 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+
+/**
+ * Custom preferences initializer.
+ */
+public class CustomPreferenceInitializer extends BlockDefinitionDiagramPreferenceInitializer {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void initializeDefaultPreferences() {
+ super.initializeDefaultPreferences();
+
+ // Initialize default positions for labels.
+ initDefaultPosition(UMLGraphicalTypes.LINK_UML_DEPENDENCY_ID, UMLGraphicalTypes.LINKLABEL_UML_NAMEDELEMENT_NAME_ID, 0, -10);
+ initDefaultPosition(UMLGraphicalTypes.LINK_UML_DEPENDENCY_ID, UMLGraphicalTypes.LINKLABEL_UML_APPLIEDSTEREOTYPE_ID, 0, -30);
+
+ initDefaultPosition(UMLGraphicalTypes.LINK_UML_INTERFACEREALIZATION_ID, UMLGraphicalTypes.LINKLABEL_UML_NAMEDELEMENT_NAME_ID, 0, -10);
+ initDefaultPosition(UMLGraphicalTypes.LINK_UML_INTERFACEREALIZATION_ID, UMLGraphicalTypes.LINKLABEL_UML_APPLIEDSTEREOTYPE_ID, 0, -30);
+
+ initDefaultPosition(UMLGraphicalTypes.LINK_UML_USAGE_ID, UMLGraphicalTypes.LINKLABEL_UML_NAMEDELEMENT_NAME_ID, 0, -10);
+ initDefaultPosition(UMLGraphicalTypes.LINK_UML_USAGE_ID, UMLGraphicalTypes.LINKLABEL_UML_APPLIEDSTEREOTYPE_ID, 0, -30);
+
+ initDefaultPosition(UMLGraphicalTypes.LINK_UML_GENERALIZATION_ID, UMLGraphicalTypes.LINKLABEL_UML_APPLIEDSTEREOTYPE_ID, 0, -30);
+
+ initDefaultPosition(SysMLGraphicalTypes.LINK_SYSML_ASSOCIATION_ID, UMLGraphicalTypes.LINKLABEL_UML_NAMEDELEMENT_NAME_ID, 0, -10);
+ initDefaultPosition(SysMLGraphicalTypes.LINK_SYSML_ASSOCIATION_ID, UMLGraphicalTypes.LINKLABEL_UML_APPLIEDSTEREOTYPE_ID, 0, -30);
+ initDefaultPosition(SysMLGraphicalTypes.LINK_SYSML_ASSOCIATION_ID, UMLGraphicalTypes.LINKLABEL_UML_ASSOCIATION_SOURCE_ROLE_ID, 0, -10);
+ initDefaultPosition(SysMLGraphicalTypes.LINK_SYSML_ASSOCIATION_ID, UMLGraphicalTypes.LINKLABEL_UML_ASSOCIATION_SOURCE_MULTIPLICITY_ID, 0, 10);
+ initDefaultPosition(SysMLGraphicalTypes.LINK_SYSML_ASSOCIATION_ID, UMLGraphicalTypes.LINKLABEL_UML_ASSOCIATION_TARGET_ROLE_ID, 0, -10);
+ initDefaultPosition(SysMLGraphicalTypes.LINK_SYSML_ASSOCIATION_ID, UMLGraphicalTypes.LINKLABEL_UML_ASSOCIATION_TARGET_MULTIPLICITY_ID, 0, 10);
+
+ initDefaultPosition(UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID, UMLGraphicalTypes.AFFIXEDLABEL_UML_PORT_LABEL_ID, 30, 0);
+ initDefaultPosition(UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID, UMLGraphicalTypes.AFFIXEDLABEL_UML_APPLIEDSTEREOTYPE_ID, 30, -20);
+
+ initDefaultPosition(SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID, SysMLGraphicalTypes.AFFIXEDLABEL_SYSML_FLOWPORT_LABEL_ID, 30, 0);
+ initDefaultPosition(SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID, UMLGraphicalTypes.AFFIXEDLABEL_UML_APPLIEDSTEREOTYPE_ID, 30, -20);
+ }
+
+ /**
+ * Initialize default position of a link label in preferences.
+ *
+ * @param parentGraphicalType
+ * the graphical type of the view owning the label
+ * @param graphicalType
+ * the graphical type of the label
+ * @param x
+ * @param y
+ */
+ protected void initDefaultPosition(String parentGraphicalType, String graphicalType, int x, int y) {
+ IPreferenceStore store = getPreferenceStore();
+
+ String xKey = PreferencesConstantsHelper.getElementConstant(ElementTypes.DIAGRAM_ID + "_" + parentGraphicalType + "-" + graphicalType, PreferencesConstantsHelper.LOCATION_X);
+ String yKey = PreferencesConstantsHelper.getElementConstant(ElementTypes.DIAGRAM_ID + "_" + parentGraphicalType + "-" + graphicalType, PreferencesConstantsHelper.LOCATION_Y);
+
+ store.setDefault(xKey, x);
+ store.setDefault(yKey, y);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/FlowPortAsBorderItemPreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/FlowPortAsBorderItemPreferencePage.java
new file mode 100755
index 0000000..a7f8d59
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/FlowPortAsBorderItemPreferencePage.java
@@ -0,0 +1,40 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+
+public class FlowPortAsBorderItemPreferencePage extends BlockDefinitionDiagramNodePreferencePage {
+
+ /** Constant key to access preferences */
+ public static String prefKey = ElementTypes.DIAGRAM_ID + "_" + SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID; //$NON-NLS-1$
+
+ public static String prefLabelKey = prefKey + "-" + SysMLGraphicalTypes.AFFIXEDLABEL_SYSML_FLOWPORT_LABEL_ID; //$NON-NLS-1$
+
+ /** Constructor */
+ public FlowPortAsBorderItemPreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_" + SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID); //$NON-NLS-1$
+ }
+
+ /** Default preferences initializer */
+ public static void initDefaults(IPreferenceStore store) {
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.WIDTH), 20);
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.HEIGHT), 20);
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/FlowPortAsCompartmentItemPreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/FlowPortAsCompartmentItemPreferencePage.java
new file mode 100755
index 0000000..273a95d
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/FlowPortAsCompartmentItemPreferencePage.java
@@ -0,0 +1,34 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+
+public class FlowPortAsCompartmentItemPreferencePage extends BlockDefinitionDiagramNodePreferencePage {
+
+ /** Constant key to access preferences */
+ public static String prefKey = ElementTypes.DIAGRAM_ID + "_" + SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_LABEL_ID; //$NON-NLS-1$
+
+ /** Constructor */
+ public FlowPortAsCompartmentItemPreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_" + SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_LABEL_ID); //$NON-NLS-1$
+ }
+
+ /** Default preferences initializer */
+ public static void initDefaults(IPreferenceStore store) {
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/PortAsBorderItemPreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/PortAsBorderItemPreferencePage.java
new file mode 100755
index 0000000..a11ac22
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/PortAsBorderItemPreferencePage.java
@@ -0,0 +1,40 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+
+public class PortAsBorderItemPreferencePage extends BlockDefinitionDiagramNodePreferencePage {
+
+ /** Constant key to access preferences */
+ public static String prefKey = ElementTypes.DIAGRAM_ID + "_" + UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID; //$NON-NLS-1$
+
+ public static String prefLabelKey = prefKey + "-" + UMLGraphicalTypes.AFFIXEDLABEL_UML_PORT_LABEL_ID; //$NON-NLS-1$
+
+ /** Constructor */
+ public PortAsBorderItemPreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_" + UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID); //$NON-NLS-1$
+ }
+
+ /** Default preferences initializer */
+ public static void initDefaults(IPreferenceStore store) {
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.WIDTH), 20);
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.HEIGHT), 20);
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/PortAsCompartmentItemPreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/PortAsCompartmentItemPreferencePage.java
new file mode 100755
index 0000000..cca7a47
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/PortAsCompartmentItemPreferencePage.java
@@ -0,0 +1,35 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+
+public class PortAsCompartmentItemPreferencePage extends BlockDefinitionDiagramNodePreferencePage {
+
+ /** Constant key to access preferences */
+ public static String prefKey = ElementTypes.DIAGRAM_ID + "_" + UMLGraphicalTypes.SHAPE_UML_PORT_AS_LABEL_ID; //$NON-NLS-1$
+
+ /** Constructor */
+ public PortAsCompartmentItemPreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_" + UMLGraphicalTypes.SHAPE_UML_PORT_AS_LABEL_ID); //$NON-NLS-1$
+ }
+
+ /** Default preferences initializer */
+ public static void initDefaults(IPreferenceStore store) {
+
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/provider/BlockDefinitionVisualTypeProvider.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/provider/BlockDefinitionVisualTypeProvider.java
new file mode 100755
index 0000000..9692593
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/provider/BlockDefinitionVisualTypeProvider.java
@@ -0,0 +1,34 @@
+/*****************************************************************************
+ * Copyright (c) 2015 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.provider;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.gmf.diagram.common.provider.SysMLVisualTypeProvider;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLVisualTypeProvider;
+
+/**
+ * Visual type provider for the SysML Block Diagram.
+ */
+public class BlockDefinitionVisualTypeProvider extends SysMLVisualTypeProvider {
+
+ public BlockDefinitionVisualTypeProvider() {
+ super(new CustomGraphicalTypeRegistry(), new UMLVisualTypeProvider());
+ }
+
+ @Override
+ protected IElementType getCustomElementType(String viewType) {
+ return ElementTypes.getElementTypeByID(viewType);
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/provider/CustomEditPolicyProvider.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/provider/CustomEditPolicyProvider.java
new file mode 100755
index 0000000..89cfe47
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/provider/CustomEditPolicyProvider.java
@@ -0,0 +1,264 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.provider;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gmf.runtime.common.core.service.IOperation;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.services.editpolicy.CreateEditPoliciesOperation;
+import org.eclipse.papyrus.gmf.diagram.common.edit.policy.DefaultXYLayoutEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.ResizeableListCompartmentEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.edit.part.BlockDefinitionDiagramEditPart;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.edit.policy.CustomBlockCompositeSemanticEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.edit.policy.CustomDefaultSemanticEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.edit.policy.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.edit.policy.PackageCreationEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.edit.policy.PackageSemanticEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.AssociationEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.BlockEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.ConstraintBlockEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.DimensionEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.FlowPortAffixedNodeEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.FlowPortChildLabelEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.FlowSpecificationEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.UnitEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.ValueTypeEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.edit.policy.CustomDuplicatePasteEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.CommentEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.CommentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ConstraintEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ConstraintEditPartCN;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InstanceSpecificationEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InstanceSpecificationEditPartCN;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InstanceSpecificationSlotCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InstanceSpecificationSlotCompartmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ModelEditPartCN;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ModelEditPartTN;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ModelPackageableElementCompartmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ModelPackageableElementCompartmentEditPartTN;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PackageEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PackageEditPartCN;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PackagePackageableElementCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PackagePackageableElementCompartmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.AbstractElementChildLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.AbstractElementEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.AbstractElementLinkEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.ActorEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.DataTypeEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.DependencyEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.EnumerationEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.GeneralizationEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.InterfaceEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.InterfaceRealizationEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.PortAffixedNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.PrimitiveTypeEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.SignalEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.UsageEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
+
+/**
+ * Edit policy provider for the Block definition diagram (install or remove policies on edit part creation).
+ */
+public class CustomEditPolicyProvider extends BlockDefinitionDiagramEditPolicyProvider {
+
+ public boolean provides(IOperation operation) {
+
+ CreateEditPoliciesOperation epOperation = (CreateEditPoliciesOperation) operation;
+ if (!(epOperation.getEditPart() instanceof IGraphicalEditPart)) {
+ return false;
+ }
+
+ // Make sure this concern Block Definition Diagram only
+ IGraphicalEditPart gep = (IGraphicalEditPart) epOperation.getEditPart();
+ String diagramType = gep.getNotationView().getDiagram().getType();
+ if (!ElementTypes.DIAGRAM_ID.equals(diagramType)) {
+ return false;
+ }
+
+ // Provides for edit parts that represent nodes in Block Definition diagram
+ if (gep instanceof AbstractElementEditPart) {
+ return true;
+ }
+
+ // Provides for edit parts that represent edges in Block Definition diagram
+ if (gep instanceof AbstractElementLinkEditPart) {
+ return true;
+ }
+
+ if (gep instanceof ResizeableListCompartmentEditPart) {
+ return true;
+ }
+
+ if (gep instanceof AbstractElementChildLabelEditPart) {
+ return true;
+ }
+
+ if (gep instanceof BlockDefinitionDiagramEditPart) {
+ return true;
+ }
+
+ return super.provides(operation);
+ }
+
+ public void createEditPolicies(EditPart editPart) {
+ super.createEditPolicies(editPart);
+
+ if (editPart instanceof BlockDefinitionDiagramEditPart) {
+ editPart.installEditPolicy(PasteEditPolicy.PASTE_ROLE, new CustomDuplicatePasteEditPolicy());
+ // no installation of other policies.
+ return;
+ }
+
+ editPart.installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+
+ // Legacy management of new Nodes / Edges with nodes from Class Diagram and navigation support (installed by edit policy provider in Class Diagram)
+ if ((editPart instanceof PackagePackageableElementCompartmentEditPartCN) || (editPart instanceof PackagePackageableElementCompartmentEditPart)) {
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new PackageSemanticEditPolicy());// replace DefaultCreationEditPolicy to let reparent
+ editPart.installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PackageCreationEditPolicy());// replace DefaultCreationEditPolicy to let reparent
+ editPart.installEditPolicy(EditPolicy.LAYOUT_ROLE, new DefaultXYLayoutEditPolicy());
+ editPart.installEditPolicy(PasteEditPolicy.PASTE_ROLE, new CustomDuplicatePasteEditPolicy());
+
+ }
+
+ if ((editPart instanceof ModelPackageableElementCompartmentEditPartCN) || (editPart instanceof ModelPackageableElementCompartmentEditPartTN)) {
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new PackageSemanticEditPolicy());// replace DefaultCreationEditPolicy to let reparent
+ editPart.installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PackageCreationEditPolicy());// replace DefaultCreationEditPolicy to let reparent
+ editPart.installEditPolicy(EditPolicy.LAYOUT_ROLE, new DefaultXYLayoutEditPolicy());
+ editPart.installEditPolicy(PasteEditPolicy.PASTE_ROLE, new CustomDuplicatePasteEditPolicy());
+
+ }
+
+ if ((editPart instanceof PackageEditPart) || (editPart instanceof PackageEditPartCN)) {
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomDefaultSemanticEditPolicy());
+ editPart.installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PackageCreationEditPolicy());// replace DefaultCreationEditPolicy to let reparent
+ editPart.installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
+ }
+
+ if ((editPart instanceof ModelEditPartTN) || (editPart instanceof ModelEditPartCN)) {
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomDefaultSemanticEditPolicy());
+ editPart.installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PackageCreationEditPolicy());// replace DefaultCreationEditPolicy to let reparent
+ editPart.installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
+ }
+
+ if ((editPart instanceof InstanceSpecificationEditPart) || (editPart instanceof InstanceSpecificationEditPartCN)) {
+ editPart.installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
+ editPart.installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
+ }
+
+ if ((editPart instanceof InstanceSpecificationSlotCompartmentEditPart) || (editPart instanceof InstanceSpecificationSlotCompartmentEditPartCN)) {
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ editPart.installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
+ }
+
+ if ((editPart instanceof ConstraintEditPart) || (editPart instanceof ConstraintEditPartCN)) {
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomDefaultSemanticEditPolicy());
+ editPart.installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
+ editPart.installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
+ }
+
+ if ((editPart instanceof CommentEditPart) || (editPart instanceof CommentEditPartCN)) {
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomDefaultSemanticEditPolicy());
+ editPart.installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
+ editPart.installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
+ }
+
+ // Legacy management of Comment / Constraint links
+ if (editPart instanceof ActorEditPart) {
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomDefaultSemanticEditPolicy());
+ }
+
+ if (editPart instanceof EnumerationEditPart) {
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomDefaultSemanticEditPolicy());
+ }
+
+ if (editPart instanceof PrimitiveTypeEditPart) {
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomDefaultSemanticEditPolicy());
+ }
+
+ if (editPart instanceof ValueTypeEditPart) {
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomDefaultSemanticEditPolicy());
+ }
+
+ if (editPart instanceof DataTypeEditPart) {
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomDefaultSemanticEditPolicy());
+ }
+
+ if (editPart instanceof FlowSpecificationEditPart) {
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomDefaultSemanticEditPolicy());
+ }
+
+ if (editPart instanceof InterfaceEditPart) {
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomDefaultSemanticEditPolicy());
+ }
+
+ if (editPart instanceof SignalEditPart) {
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomDefaultSemanticEditPolicy());
+ }
+
+ if (editPart instanceof ConstraintBlockEditPart) {
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomDefaultSemanticEditPolicy());
+ }
+
+ if (editPart instanceof BlockEditPart) {
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomBlockCompositeSemanticEditPolicy());
+ }
+
+ if (editPart instanceof DimensionEditPart) {
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomDefaultSemanticEditPolicy());
+ }
+
+ if (editPart instanceof UnitEditPart) {
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomDefaultSemanticEditPolicy());
+ }
+
+ if (editPart instanceof DependencyEditPart) {
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomDefaultSemanticEditPolicy());
+ }
+
+ if (editPart instanceof GeneralizationEditPart) {
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomDefaultSemanticEditPolicy());
+ }
+
+ if (editPart instanceof UsageEditPart) {
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomDefaultSemanticEditPolicy());
+ }
+
+ if (editPart instanceof AssociationEditPart) {
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomDefaultSemanticEditPolicy());
+ }
+
+ if (editPart instanceof InterfaceRealizationEditPart) {
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomDefaultSemanticEditPolicy());
+ }
+
+ if (editPart instanceof FlowPortChildLabelEditPart) {
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomDefaultSemanticEditPolicy());
+ }
+
+ if (editPart instanceof FlowPortAffixedNodeEditPart || editPart instanceof PortAffixedNodeEditPart) {
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomDefaultSemanticEditPolicy());
+ }
+
+ if (editPart instanceof AbstractElementChildLabelEditPart) {
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomDefaultSemanticEditPolicy());
+ }
+
+
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/provider/ParserProvider.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/provider/ParserProvider.java
new file mode 100755
index 0000000..4eb5ba7
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/provider/ParserProvider.java
@@ -0,0 +1,137 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.provider;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.gmf.runtime.common.core.service.AbstractProvider;
+import org.eclipse.gmf.runtime.common.core.service.IOperation;
+import org.eclipse.gmf.runtime.common.ui.services.parser.GetParserOperation;
+import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
+import org.eclipse.gmf.runtime.common.ui.services.parser.IParserProvider;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.parser.FlowPortLabelParser;
+import org.eclipse.papyrus.sysml.diagram.common.parser.FlowPropertyLabelParser;
+import org.eclipse.papyrus.sysml.diagram.common.parser.UnitLabelParser;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.SlotEditPart;
+import org.eclipse.papyrus.uml.diagram.common.parser.AssociationEndLabelParser;
+import org.eclipse.papyrus.uml.diagram.common.parser.ConstraintLabelParser;
+import org.eclipse.papyrus.uml.diagram.common.parser.NamedElementLabelParser;
+import org.eclipse.papyrus.uml.diagram.common.parser.OperationLabelParser;
+import org.eclipse.papyrus.uml.diagram.common.parser.PropertyLabelParser;
+import org.eclipse.papyrus.uml.diagram.common.parser.ReceptionLabelParser;
+import org.eclipse.papyrus.uml.diagram.common.parser.SlotLabelParser;
+import org.eclipse.papyrus.uml.diagram.common.parser.stereotype.AppliedStereotypeParser;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+
+/**
+ * Parser provider for labels used by this diagram.
+ */
+public class ParserProvider extends AbstractProvider implements IParserProvider {
+
+ /** map from graphical hint to parsers */
+ private static final Map<String, IParser> graphicalHintToParser = new HashMap<String, IParser>();
+
+ static {
+ graphicalHintToParser.put(UMLGraphicalTypes.LABEL_UML_NAMEDELEMENT_NAME_ID, new NamedElementLabelParser());
+ graphicalHintToParser.put(UMLGraphicalTypes.AFFIXEDLABEL_UML_NAMEDELEMENT_NAME_ID, new NamedElementLabelParser());
+ graphicalHintToParser.put(SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_LABEL_ID, new FlowPortLabelParser());
+ graphicalHintToParser.put(SysMLGraphicalTypes.SHAPE_SYSML_FLOWPROPERTY_AS_LABEL_ID, new FlowPropertyLabelParser());
+ graphicalHintToParser.put(SysMLGraphicalTypes.SHAPE_SYSML_CONSTRAINTPROPERTY_AS_LABEL_ID, new PropertyLabelParser());
+ graphicalHintToParser.put(UMLGraphicalTypes.SHAPE_UML_CONSTRAINT_AS_LABEL_ID, new ConstraintLabelParser());
+ graphicalHintToParser.put(SysMLGraphicalTypes.SHAPE_SYSML_PART_AS_LABEL_ID, new PropertyLabelParser());
+ graphicalHintToParser.put(SysMLGraphicalTypes.SHAPE_SYSML_REFERENCE_AS_LABEL_ID, new PropertyLabelParser());
+ graphicalHintToParser.put(SysMLGraphicalTypes.SHAPE_SYSML_VALUE_AS_LABEL_ID, new PropertyLabelParser());
+ graphicalHintToParser.put(UMLGraphicalTypes.SHAPE_UML_PORT_AS_LABEL_ID, new PropertyLabelParser());
+ graphicalHintToParser.put(UMLGraphicalTypes.SHAPE_UML_PROPERTY_AS_LABEL_ID, new PropertyLabelParser());
+ graphicalHintToParser.put(UMLGraphicalTypes.SHAPE_UML_OPERATION_AS_LABEL_ID, new OperationLabelParser());
+ graphicalHintToParser.put(UMLGraphicalTypes.SHAPE_UML_RECEPTION_AS_LABEL_ID, new ReceptionLabelParser());
+ graphicalHintToParser.put(UMLGraphicalTypes.SHAPE_UML_ENUMERATIONLITERAL_AS_LABEL_ID, new NamedElementLabelParser());
+
+ graphicalHintToParser.put(SysMLGraphicalTypes.LABEL_SYSML_BLOCK_NAME_ID, new NamedElementLabelParser());
+ graphicalHintToParser.put(SysMLGraphicalTypes.LABEL_SYSML_CONSTRAINTBLOCK_NAME_ID, new NamedElementLabelParser());
+ graphicalHintToParser.put(SysMLGraphicalTypes.LABEL_SYSML_DIMENSION_NAME_ID, new NamedElementLabelParser());
+ graphicalHintToParser.put(SysMLGraphicalTypes.LABEL_SYSML_FLOWSPECIFICATION_NAME_ID, new NamedElementLabelParser());
+ graphicalHintToParser.put(SysMLGraphicalTypes.LABEL_SYSML_VALUETYPE_NAME_ID, new NamedElementLabelParser());
+
+ graphicalHintToParser.put(SysMLGraphicalTypes.LABEL_SYSML_UNIT_NAME_ID, new UnitLabelParser());
+
+ graphicalHintToParser.put(UMLGraphicalTypes.LINKLABEL_UML_NAMEDELEMENT_NAME_ID, new NamedElementLabelParser());
+ graphicalHintToParser.put(UMLGraphicalTypes.LINKLABEL_UML_ASSOCIATION_SOURCE_ROLE_ID, new AssociationEndLabelParser());
+ graphicalHintToParser.put(UMLGraphicalTypes.LINKLABEL_UML_ASSOCIATION_SOURCE_MULTIPLICITY_ID, new AssociationEndLabelParser());
+ graphicalHintToParser.put(UMLGraphicalTypes.LINKLABEL_UML_ASSOCIATION_TARGET_ROLE_ID, new AssociationEndLabelParser());
+ graphicalHintToParser.put(UMLGraphicalTypes.LINKLABEL_UML_ASSOCIATION_TARGET_MULTIPLICITY_ID, new AssociationEndLabelParser());
+ graphicalHintToParser.put(UMLGraphicalTypes.LINKLABEL_UML_APPLIEDSTEREOTYPE_ID, new AppliedStereotypeParser());
+
+ graphicalHintToParser.put(SlotEditPart.VISUAL_ID, new SlotLabelParser());
+
+ graphicalHintToParser.put(UMLGraphicalTypes.AFFIXEDLABEL_UML_PORT_LABEL_ID, new PropertyLabelParser());
+ graphicalHintToParser.put(SysMLGraphicalTypes.AFFIXEDLABEL_SYSML_FLOWPORT_LABEL_ID, new FlowPortLabelParser());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean provides(IOperation operation) {
+ if (operation instanceof GetParserOperation) {
+ IAdaptable hint = ((GetParserOperation) operation).getHint();
+
+ if (!ElementTypes.DIAGRAM_ID.equals(getDiagramType(hint))) {
+ return false;
+ }
+
+ return getParser(hint) != null;
+ }
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public IParser getParser(IAdaptable hint) {
+ String parserHint = hint.getAdapter(String.class);
+ if (parserHint != null) {
+ IParser parser = graphicalHintToParser.get(parserHint);
+ if (parser != null) {
+ return parser;
+ }
+ }
+
+ View view = hint.getAdapter(View.class);
+ if (view != null) {
+ IParser parser = graphicalHintToParser.get(view.getType());
+ if (parser != null) {
+ return parser;
+ }
+ }
+
+ return null;
+ }
+
+ private String getDiagramType(IAdaptable hint) {
+ Diagram diagram = hint.getAdapter(Diagram.class);
+ if (diagram != null) {
+ return diagram.getType();
+ }
+
+ return "undefined";
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/provider/ValidationDecoratorProvider.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/provider/ValidationDecoratorProvider.java
new file mode 100755
index 0000000..9eca831
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/provider/ValidationDecoratorProvider.java
@@ -0,0 +1,62 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.provider;
+
+import org.eclipse.gef.EditDomain;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.editparts.AbstractConnectionEditPart;
+import org.eclipse.gmf.runtime.common.core.service.IOperation;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditDomain;
+import org.eclipse.gmf.runtime.diagram.ui.services.decorator.CreateDecoratorsOperation;
+import org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecoratorProvider;
+import org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecoratorTarget;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.common.part.UmlGmfDiagramEditor;
+
+public class ValidationDecoratorProvider extends org.eclipse.papyrus.uml.diagram.common.providers.ValidationDecoratorProvider implements IDecoratorProvider {
+
+ @Override
+ public void createDecorators(IDecoratorTarget decoratorTarget) {
+ EditPart editPart = (EditPart) decoratorTarget.getAdapter(EditPart.class);
+ if (editPart instanceof GraphicalEditPart || editPart instanceof AbstractConnectionEditPart) {
+ Object model = editPart.getModel();
+ if ((model instanceof View)) {
+ View view = (View) model;
+ if (!(view instanceof Edge) && !view.isSetElement()) {
+ return;
+ }
+ }
+ EditDomain ed = editPart.getViewer().getEditDomain();
+ if (!(ed instanceof DiagramEditDomain)) {
+ return;
+ }
+ if (((DiagramEditDomain) ed).getEditorPart() instanceof UmlGmfDiagramEditor) {
+ decoratorTarget.installDecorator(KEY, new StatusDecorator(decoratorTarget));
+ }
+ }
+ }
+
+ @Override
+ public boolean provides(IOperation operation) {
+ if (!(operation instanceof CreateDecoratorsOperation)) {
+ return false;
+ }
+ IDecoratorTarget decoratorTarget = ((CreateDecoratorsOperation) operation).getDecoratorTarget();
+ View view = (View) decoratorTarget.getAdapter(View.class);
+ return view != null && ElementTypes.DIAGRAM_ID.equals(view.getDiagram().getType());
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/provider/ValidationProvider.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/provider/ValidationProvider.java
new file mode 100755
index 0000000..a6057bc
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/provider/ValidationProvider.java
@@ -0,0 +1,62 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.provider;
+
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.Activator;
+
+public class ValidationProvider {
+
+ private static boolean constraintsActive = false;
+
+ public static boolean shouldConstraintsBePrivate() {
+ return false;
+ }
+
+ public static void runWithConstraints(TransactionalEditingDomain editingDomain, Runnable operation) {
+ final Runnable op = operation;
+ Runnable task = new Runnable() {
+
+ public void run() {
+ try {
+ constraintsActive = true;
+ op.run();
+ } finally {
+ constraintsActive = false;
+ }
+ }
+ };
+ if (editingDomain != null) {
+ try {
+ editingDomain.runExclusive(task);
+ } catch (Exception e) {
+ Activator.log.error("Validation failed", e); //$NON-NLS-1$
+ }
+ } else {
+ task.run();
+ }
+ }
+
+ static boolean isInDefaultEditorContext(Object object) {
+ if (shouldConstraintsBePrivate() && !constraintsActive) {
+ return false;
+ }
+ if (object instanceof View) {
+ return constraintsActive && ElementTypes.DIAGRAM_ID.equals(((View) object).getDiagram().getType());
+ }
+ return true;
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/ui/BlockDefinitionInterfaceManagerDialog.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/ui/BlockDefinitionInterfaceManagerDialog.java
new file mode 100755
index 0000000..bc88eda
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/ui/BlockDefinitionInterfaceManagerDialog.java
@@ -0,0 +1,83 @@
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Gabriel Pascual (ALL4TEC) gabriel.pascual@all4tec.net - Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.ui;
+
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.papyrus.sysml.portandflows.FlowSpecification;
+import org.eclipse.papyrus.uml.diagram.common.dialogs.InterfaceManagerDialog;
+import org.eclipse.papyrus.uml.diagram.common.util.Visitor;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Interface;
+import org.eclipse.uml2.uml.Namespace;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.Port;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+/**
+ * <pre>
+ * This class provides a Dialog to manage easily the provided and
+ * the required Interfaces for a {@link Port}.
+ * </pre>
+ */
+public class BlockDefinitionInterfaceManagerDialog extends InterfaceManagerDialog {
+
+
+ /**
+ * Instantiates a new block definition interface manager dialog.
+ *
+ * @param parentShell
+ * the parent shell
+ * @param port
+ * the port
+ */
+ public BlockDefinitionInterfaceManagerDialog(Shell parentShell, Port port) {
+ super(parentShell, port);
+
+ }
+
+
+ /**
+ * Gets the all available interfaces.
+ *
+ * @param pack
+ * the pack
+ * @return the all available interfaces
+ * @see org.eclipse.papyrus.uml.diagram.common.dialogs.InterfaceManagerDialog#getAllAvailableInterfaces(org.eclipse.uml2.uml.Package)
+ */
+ @Override
+ protected List<Interface> getAllAvailableInterfaces(Package pack) {
+ Set<Interface> otherInterfaces = new HashSet<Interface>();
+ List<Element> interfaces = Visitor.getOwnedAndImportedElement(pack, Interface.class);
+ for (Namespace namespace : Visitor.getOwnedAndImportedNamespaces(pack)) {
+ interfaces.addAll(Visitor.getOwnedAndImportedElement(namespace, Interface.class));
+
+ }
+
+ for (Element element : interfaces) {
+ // Test if the interface is a FlowSpecification
+ FlowSpecification flowSpec = UMLUtil.getStereotypeApplication(element, FlowSpecification.class);
+ if (flowSpec == null) {
+ otherInterfaces.add((Interface) element);
+ }
+ }
+
+ return Arrays.asList(otherInterfaces.toArray(new Interface[otherInterfaces.size()]));
+ }
+
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/utils/FixPortsLocationOnOpening.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/utils/FixPortsLocationOnOpening.java
new file mode 100755
index 0000000..3c21d40
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/utils/FixPortsLocationOnOpening.java
@@ -0,0 +1,128 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.utils;
+
+import java.util.Iterator;
+
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.emf.transaction.util.TransactionUtil;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.Bounds;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.Shape;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.Activator;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.uml.diagram.common.locator.PortPositionLocatorUtils;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+
+/**
+ * This class fix Port and FlowPort location during diagram opening (no edit part exists yet).
+ */
+public class FixPortsLocationOnOpening {
+
+ /**
+ * This method fix the diagram Port and FlowPort locations.
+ *
+ * @param diagram
+ * the diagram
+ */
+ public void fix(Diagram diagram) {
+
+ // Parse diagram content
+ Iterator<EObject> it = diagram.eAllContents();
+ while (it.hasNext()) {
+ EObject current = it.next();
+
+ // Select Port and FlowPorts
+ if (!(current instanceof Shape)) {
+ continue;
+ }
+ Shape portView = (Shape) current;
+ String currentType = (portView).getType();
+ if (SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID.equals(currentType) || UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID.equals(currentType)) {
+
+ int borderItemOffset = 10;
+ View parentView = ViewUtil.getViewContainer(portView);
+
+ if (parentView instanceof Shape) {
+ Shape parentShape = (Shape) parentView;
+ Bounds portViewBounds = (Bounds) portView.getLayoutConstraint();
+ Bounds parentViewBounds = (Bounds) parentShape.getLayoutConstraint();
+
+ final Rectangle portBounds = new Rectangle(portViewBounds.getX(), portViewBounds.getY(), portViewBounds.getWidth(), portViewBounds.getHeight());
+
+ int parentWidth = parentViewBounds.getWidth();
+ int parentHeight = parentViewBounds.getHeight();
+ if ((parentWidth == -1) && (parentHeight == -1)) {
+ // warning the size may not be set in notation (default size), in such a case get default size from preferences.
+ String parentPrefKey = ElementTypes.DIAGRAM_ID + "_" + parentShape.getType();
+ parentWidth = Activator.getInstance().getPreferenceStore().getInt(PreferencesConstantsHelper.getElementConstant(parentPrefKey, PreferencesConstantsHelper.WIDTH));
+ parentHeight = Activator.getInstance().getPreferenceStore().getInt(PreferencesConstantsHelper.getElementConstant(parentPrefKey, PreferencesConstantsHelper.HEIGHT));
+ }
+ final Rectangle parentBounds = new Rectangle(parentViewBounds.getX(), parentViewBounds.getY(), parentWidth, parentHeight);
+
+ // Calculate the valid location based on currently stored location and parent bounds
+ final Rectangle validLocation = PortPositionLocatorUtils.getBorderLocation(parentBounds, portBounds, borderItemOffset);
+
+ // Fix when current location is not the valid location (only possible if parent size is set)
+ if (!portBounds.equals(validLocation)) {
+
+ TransactionalEditingDomain editingDomain = TransactionUtil.getEditingDomain(diagram);
+ Command fixCommand = new FixLocationCommand(editingDomain, "Fix Port location on opening", portViewBounds, validLocation);
+ editingDomain.getCommandStack().execute(fixCommand);
+ }
+ }
+
+ }
+ }
+ }
+
+ /**
+ * This command set the Port view with valid locations.
+ */
+ public class FixLocationCommand extends RecordingCommand {
+
+ /** Port view bounds. */
+ private Bounds portViewBounds;
+
+ /** Port valid bounds (only the location is used here). */
+ private Rectangle portValidBounds;
+
+ /** Constructor. */
+ public FixLocationCommand(TransactionalEditingDomain domain, String label, Bounds portViewBounds, Rectangle portValidBounds) {
+ super(domain, label);
+ this.portViewBounds = portViewBounds;
+ this.portValidBounds = portValidBounds;
+ }
+
+ @Override
+ protected void doExecute() {
+ portViewBounds.setX(portValidBounds.x());
+ portViewBounds.setY(portValidBounds.y());
+ }
+
+ @Override
+ public boolean canUndo() {
+ return false;
+ }
+
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/.classpath b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/.classpath
new file mode 100755
index 0000000..beb405d
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/.classpath
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="src-gen"/>
+ <classpathentry kind="src" path="src-common-sysml"/>
+ <classpathentry kind="src" path="src-common-uml"/>
+ <classpathentry kind="src" path="src-common-gmf"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/.project b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/.project
new file mode 100755
index 0000000..9f75f3a
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/.project
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.sysml.diagram.common</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>
+ <buildCommand>
+ <name>org.eclipse.oomph.version.VersionBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>check.maven.pom</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>ignore.lower.bound.dependency.ranges</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>release.path</key>
+ <value>/org.eclipse.papyrus.releng.main.release/release.xml</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.oomph.version.VersionNature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/.settings/net.sf.jautodoc.prefs b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/.settings/net.sf.jautodoc.prefs
new file mode 100755
index 0000000..f03f980
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/.settings/net.sf.jautodoc.prefs
@@ -0,0 +1,7 @@
+#Fri Aug 19 13:56:17 CEST 2011
+add_header=true
+eclipse.preferences.version=1
+header_text=/*****************************************************************************\r\n * Copyright (c) 2011 CEA LIST.\r\n *\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http\://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors\:\r\n *\t\t\r\n *\t\tCEA LIST - Initial API and implementation\r\n *\r\n *****************************************************************************/
+project_specific_settings=true
+replace_header=true
+replacements=<?xml version\="1.0" standalone\="yes"?>\n\n<replacements>\n<replacement key\="get" scope\="1" mode\="0">Gets the</replacement>\n<replacement key\="set" scope\="1" mode\="0">Sets the</replacement>\n<replacement key\="add" scope\="1" mode\="0">Adds the</replacement>\n<replacement key\="edit" scope\="1" mode\="0">Edits the</replacement>\n<replacement key\="remove" scope\="1" mode\="0">Removes the</replacement>\n<replacement key\="init" scope\="1" mode\="0">Inits the</replacement>\n<replacement key\="parse" scope\="1" mode\="0">Parses the</replacement>\n<replacement key\="create" scope\="1" mode\="0">Creates the</replacement>\n<replacement key\="build" scope\="1" mode\="0">Builds the</replacement>\n<replacement key\="is" scope\="1" mode\="0">Checks if is</replacement>\n<replacement key\="print" scope\="1" mode\="0">Prints the</replacement>\n<replacement key\="has" scope\="1" mode\="0">Checks for</replacement>\n</replacements>\n\n
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/.settings/org.eclipse.jdt.core.prefs b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 0000000..6285ded
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,295 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/.settings/org.eclipse.jdt.ui.prefs b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/.settings/org.eclipse.jdt.ui.prefs
new file mode 100755
index 0000000..954281d
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,68 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+formatter_profile=_Papyrus
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/.settings/org.eclipse.pde.api.tools.prefs b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100755
index 0000000..23fb95e
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/.settings/org.eclipse.pde.api.tools.prefs
@@ -0,0 +1,98 @@
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+API_USE_SCAN_FIELD_SEVERITY=Error
+API_USE_SCAN_METHOD_SEVERITY=Error
+API_USE_SCAN_TYPE_SEVERITY=Error
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Ignore
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_ANNOTATION=Ignore
+INVALID_JAVADOC_TAG=Ignore
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Ignore
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+MISSING_EE_DESCRIPTIONS=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=Enabled
+eclipse.preferences.version=1
+incompatible_api_component_version=Error
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Warning
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/META-INF/MANIFEST.MF b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/META-INF/MANIFEST.MF
new file mode 100755
index 0000000..133ad4a
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/META-INF/MANIFEST.MF
@@ -0,0 +1,47 @@
+Manifest-Version: 1.0
+Export-Package: org.eclipse.papyrus.gmf.diagram.common.commands,
+ org.eclipse.papyrus.gmf.diagram.common.compatibility,
+ org.eclipse.papyrus.gmf.diagram.common.edit.part,
+ org.eclipse.papyrus.gmf.diagram.common.edit.policy,
+ org.eclipse.papyrus.gmf.diagram.common.factory,
+ org.eclipse.papyrus.gmf.diagram.common.locator,
+ org.eclipse.papyrus.gmf.diagram.common.parser,
+ org.eclipse.papyrus.gmf.diagram.common.provider,
+ org.eclipse.papyrus.sysml.diagram.common,
+ org.eclipse.papyrus.sysml.diagram.common.commands,
+ org.eclipse.papyrus.sysml.diagram.common.dialogs,
+ org.eclipse.papyrus.sysml.diagram.common.edit.part,
+ org.eclipse.papyrus.sysml.diagram.common.edit.policy,
+ org.eclipse.papyrus.sysml.diagram.common.factory,
+ org.eclipse.papyrus.sysml.diagram.common.figure,
+ org.eclipse.papyrus.sysml.diagram.common.messages,
+ org.eclipse.papyrus.sysml.diagram.common.parser,
+ org.eclipse.papyrus.sysml.diagram.common.preferences,
+ org.eclipse.papyrus.sysml.diagram.common.strategy.paste,
+ org.eclipse.papyrus.sysml.diagram.common.utils,
+ org.eclipse.papyrus.uml.diagram.common.dnd.helper,
+ org.eclipse.papyrus.uml.diagram.common.edit.part,
+ org.eclipse.papyrus.uml.diagram.common.edit.policy,
+ org.eclipse.papyrus.uml.diagram.common.factory,
+ org.eclipse.papyrus.uml.diagram.common.figure,
+ org.eclipse.papyrus.uml.diagram.common.parser,
+ org.eclipse.papyrus.uml.diagram.common.utils
+Require-Bundle: org.eclipse.emf;bundle-version="[2.6.0,3.0.0)",
+ org.eclipse.papyrus.sysml;bundle-version="[1.2.0,2.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.editor;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.sysml.service.types;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.infra.widgets.toolbox;bundle-version="[2.0.0,3.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.uml.modelexplorer.widgets;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.uml.diagram.composite;bundle-version="[3.0.0,4.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.uml.diagram.clazz;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.uml.internationalization.edit;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.papyrus.uml.internationalization.utils;bundle-version="[1.0.0,2.0.0)"
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 2.0.0.qualifier
+Bundle-Localization: plugin
+Bundle-Name: %pluginName
+Bundle-Activator: org.eclipse.papyrus.sysml.diagram.common.Activator
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.papyrus.sysml.diagram.common;singleton:=true
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/about.html b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/about.html
new file mode 100755
index 0000000..d35d5ae
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/build.properties b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/build.properties
new file mode 100755
index 0000000..5832166
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/build.properties
@@ -0,0 +1,11 @@
+bin.includes = META-INF/,\
+ .,\
+ icons/,\
+ about.html,\
+ plugin.properties,\
+ plugin.xml
+output..=bin/
+src.includes = icons/,\
+ about.html
+source..=src/,src-gen/,src-common-uml/,src-common-sysml/,src-common-gmf/
+bin..=bin/
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/category_sysml.gif b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/category_sysml.gif
new file mode 100755
index 0000000..ecc0b71
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/category_sysml.gif
Binary files differ
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_INOUT_A_EAST.gif b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_INOUT_A_EAST.gif
new file mode 100755
index 0000000..c33d123
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_INOUT_A_EAST.gif
Binary files differ
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_INOUT_A_NORTH.gif b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_INOUT_A_NORTH.gif
new file mode 100755
index 0000000..52a2cb6
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_INOUT_A_NORTH.gif
Binary files differ
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_INOUT_A_NORTH_EAST.gif b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_INOUT_A_NORTH_EAST.gif
new file mode 100755
index 0000000..6c51895
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_INOUT_A_NORTH_EAST.gif
Binary files differ
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_INOUT_A_NORTH_WEST.gif b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_INOUT_A_NORTH_WEST.gif
new file mode 100755
index 0000000..f798e34
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_INOUT_A_NORTH_WEST.gif
Binary files differ
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_INOUT_A_SOUTH.gif b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_INOUT_A_SOUTH.gif
new file mode 100755
index 0000000..52a2cb6
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_INOUT_A_SOUTH.gif
Binary files differ
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_INOUT_A_SOUTH_EAST.gif b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_INOUT_A_SOUTH_EAST.gif
new file mode 100755
index 0000000..f798e34
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_INOUT_A_SOUTH_EAST.gif
Binary files differ
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_INOUT_A_SOUTH_WEST.gif b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_INOUT_A_SOUTH_WEST.gif
new file mode 100755
index 0000000..6c51895
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_INOUT_A_SOUTH_WEST.gif
Binary files differ
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_INOUT_A_WEST.gif b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_INOUT_A_WEST.gif
new file mode 100755
index 0000000..c33d123
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_INOUT_A_WEST.gif
Binary files differ
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_IN_A_EAST.gif b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_IN_A_EAST.gif
new file mode 100755
index 0000000..273f7c6
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_IN_A_EAST.gif
Binary files differ
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_IN_A_NORTH.gif b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_IN_A_NORTH.gif
new file mode 100755
index 0000000..0947953
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_IN_A_NORTH.gif
Binary files differ
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_IN_A_NORTH_EAST.gif b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_IN_A_NORTH_EAST.gif
new file mode 100755
index 0000000..dfb4021
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_IN_A_NORTH_EAST.gif
Binary files differ
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_IN_A_NORTH_WEST.gif b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_IN_A_NORTH_WEST.gif
new file mode 100755
index 0000000..9ad7d3d
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_IN_A_NORTH_WEST.gif
Binary files differ
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_IN_A_SOUTH.gif b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_IN_A_SOUTH.gif
new file mode 100755
index 0000000..8040967
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_IN_A_SOUTH.gif
Binary files differ
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_IN_A_SOUTH_EAST.gif b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_IN_A_SOUTH_EAST.gif
new file mode 100755
index 0000000..3fe4ebf
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_IN_A_SOUTH_EAST.gif
Binary files differ
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_IN_A_SOUTH_WEST.gif b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_IN_A_SOUTH_WEST.gif
new file mode 100755
index 0000000..f9beebd
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_IN_A_SOUTH_WEST.gif
Binary files differ
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_IN_A_WEST.gif b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_IN_A_WEST.gif
new file mode 100755
index 0000000..259d142
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_IN_A_WEST.gif
Binary files differ
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_NA_EAST.gif b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_NA_EAST.gif
new file mode 100755
index 0000000..d08bfd9
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_NA_EAST.gif
Binary files differ
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_NA_NORTH.gif b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_NA_NORTH.gif
new file mode 100755
index 0000000..b888cee
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_NA_NORTH.gif
Binary files differ
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_NA_NORTH_EAST.gif b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_NA_NORTH_EAST.gif
new file mode 100755
index 0000000..48925af
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_NA_NORTH_EAST.gif
Binary files differ
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_NA_NORTH_WEST.gif b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_NA_NORTH_WEST.gif
new file mode 100755
index 0000000..21c7e97
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_NA_NORTH_WEST.gif
Binary files differ
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_NA_SOUTH.gif b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_NA_SOUTH.gif
new file mode 100755
index 0000000..b888cee
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_NA_SOUTH.gif
Binary files differ
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_NA_SOUTH_EAST.gif b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_NA_SOUTH_EAST.gif
new file mode 100755
index 0000000..21c7e97
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_NA_SOUTH_EAST.gif
Binary files differ
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_NA_SOUTH_WEST.gif b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_NA_SOUTH_WEST.gif
new file mode 100755
index 0000000..48925af
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_NA_SOUTH_WEST.gif
Binary files differ
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_NA_WEST.gif b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_NA_WEST.gif
new file mode 100755
index 0000000..d08bfd9
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_NA_WEST.gif
Binary files differ
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_OUT_A_EAST.gif b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_OUT_A_EAST.gif
new file mode 100755
index 0000000..259d142
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_OUT_A_EAST.gif
Binary files differ
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_OUT_A_NORTH.gif b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_OUT_A_NORTH.gif
new file mode 100755
index 0000000..8040967
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_OUT_A_NORTH.gif
Binary files differ
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_OUT_A_NORTH_EAST.gif b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_OUT_A_NORTH_EAST.gif
new file mode 100755
index 0000000..f9beebd
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_OUT_A_NORTH_EAST.gif
Binary files differ
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_OUT_A_NORTH_WEST.gif b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_OUT_A_NORTH_WEST.gif
new file mode 100755
index 0000000..3fe4ebf
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_OUT_A_NORTH_WEST.gif
Binary files differ
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_OUT_A_SOUTH.gif b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_OUT_A_SOUTH.gif
new file mode 100755
index 0000000..0947953
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_OUT_A_SOUTH.gif
Binary files differ
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_OUT_A_SOUTH_EAST.gif b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_OUT_A_SOUTH_EAST.gif
new file mode 100755
index 0000000..9ad7d3d
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_OUT_A_SOUTH_EAST.gif
Binary files differ
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_OUT_A_SOUTH_WEST.gif b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_OUT_A_SOUTH_WEST.gif
new file mode 100755
index 0000000..dfb4021
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_OUT_A_SOUTH_WEST.gif
Binary files differ
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_OUT_A_WEST.gif b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_OUT_A_WEST.gif
new file mode 100755
index 0000000..273f7c6
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/icons/flowports/FlowPort_OUT_A_WEST.gif
Binary files differ
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen
new file mode 100755
index 0000000..91aeb00
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen
@@ -0,0 +1,139 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<idgen:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:idgen="http://www.eclipse.org/papyrus/0.7.0/idgen" name="SysML Reusable Parts" type="" icon="" label="" language="" javaPackagePrefix="org.eclipse.papyrus.sysml.diagram.common" javaClassPrefix="SysML" createCommandLabel="">
+ <customNodes xsi:type="idgen:CustomLabelNode" id="shape_sysml_constraintproperty_as_label" label="ConstraintProperty" editPart="org.eclipse.papyrus.sysml.diagram.common.edit.part.ConstraintPropertyChildLabelEditPart" semanticType="org.eclipse.papyrus.sysml.ConstraintProperty" labelMask="Visibility, Derive, Name, Type, Undefined_Type, Multiplicity, Default_Multiplicity, DefaultValue, Modifiers"/>
+ <customNodes xsi:type="idgen:CustomLabelNode" id="shape_sysml_flowport_as_label" label="FlowPort" editPart="org.eclipse.papyrus.sysml.diagram.common.edit.part.FlowPortChildLabelEditPart" semanticType="org.eclipse.papyrus.sysml.FlowPort" labelMask="Direction, Visibility, Derive, Name, Type, Undefined_Type, Multiplicity, Default_Multiplicity, DefaultValue, Modifiers"/>
+ <customNodes xsi:type="idgen:CustomLabelNode" id="shape_sysml_flowproperty_as_label" label="FlowProperty" editPart="org.eclipse.papyrus.sysml.diagram.common.edit.part.FlowPropertyChildLabelEditPart" semanticType="org.eclipse.papyrus.sysml.FlowProperty" labelMask="Direction, Visibility, Derive, Name, Type, Undefined_Type, Multiplicity, Default_Multiplicity, DefaultValue, Modifiers"/>
+ <customNodes xsi:type="idgen:CustomLabelNode" id="shape_sysml_part_as_label" label="Part" semanticType="org.eclipse.papyrus.sysml.PartProperty" labelMask="Visibility, Derive, Name, Type, Undefined_Type, Multiplicity, Default_Multiplicity, DefaultValue, Modifiers">
+ <editPart href="UML.ReusableParts.idgen#org.eclipse.papyrus.uml.diagram.common.edit.part.DefaultChildLabelEditPart"/>
+ </customNodes>
+ <customNodes xsi:type="idgen:CustomLabelNode" id="shape_sysml_reference_as_label" label="Reference" semanticType="org.eclipse.papyrus.sysml.ReferenceProperty" labelMask="Visibility, Derive, Name, Type, Undefined_Type, Multiplicity, Default_Multiplicity, DefaultValue, Modifiers">
+ <editPart href="UML.ReusableParts.idgen#org.eclipse.papyrus.uml.diagram.common.edit.part.DefaultChildLabelEditPart"/>
+ </customNodes>
+ <customNodes xsi:type="idgen:CustomLabelNode" id="shape_sysml_value_as_label" label="Value" semanticType="org.eclipse.papyrus.sysml.ValueProperty" labelMask="Visibility, Derive, Name, Type, Undefined_Type, Multiplicity, Default_Multiplicity, DefaultValue, Modifiers">
+ <editPart href="UML.ReusableParts.idgen#org.eclipse.papyrus.uml.diagram.common.edit.part.DefaultChildLabelEditPart"/>
+ </customNodes>
+ <customNodes xsi:type="idgen:CustomClassifierNode" id="shape_sysml_block_as_classifier" label="Block" semanticPolicy="org.eclipse.papyrus.sysml.diagram.common.edit.policy.BlockCompositeSemanticEditPolicy" creationPolicy="org.eclipse.papyrus.uml.diagram.common.edit.policy.StructuredClassifierCreationEditPolicy" semanticType="org.eclipse.papyrus.sysml.Block" tag="block" labels="label_sysml_block_name">
+ <affixedNodes href="#shape_sysml_flowport_as_affixed"/>
+ <affixedNodes href="UML.ReusableParts.idgen#shape_uml_port_as_affixed"/>
+ <borderedNodeFigure href="UML.ReusableParts.idgen#org.eclipse.papyrus.gmf.diagram.common.figure.SelectableBorderedNodeFigure"/>
+ <compartments href="#compartment_sysml_property_as_list"/>
+ <compartments href="#compartment_sysml_part_as_list"/>
+ <compartments href="#compartment_sysml_reference_as_list"/>
+ <compartments href="UML.ReusableParts.idgen#compartment_uml_port_as_list"/>
+ <compartments href="#compartment_sysml_flowport_as_list"/>
+ <compartments href="UML.ReusableParts.idgen#compartment_uml_operation_as_list"/>
+ <compartments href="#compartment_sysml_constraint_as_list"/>
+ <compartments href="#compartment_sysml_value_as_list"/>
+ <visibleCompartments href="#compartment_sysml_property_as_list"/>
+ <visibleCompartments href="UML.ReusableParts.idgen#compartment_uml_operation_as_list"/>
+ <visibleCompartments href="#compartment_sysml_constraint_as_list"/>
+ </customNodes>
+ <customNodes xsi:type="idgen:CustomClassifierNode" id="shape_sysml_block_as_composite" label="BlockComposite" semanticPolicy="org.eclipse.papyrus.sysml.diagram.common.edit.policy.BlockCompositeSemanticEditPolicy" creationPolicy="org.eclipse.papyrus.uml.diagram.common.edit.policy.StructuredClassifierCreationEditPolicy" semanticType="org.eclipse.papyrus.sysml.Block" tag="block" labels="label_sysml_block_name" compartments="compartment_sysml_structure" visibleCompartments="compartment_sysml_structure">
+ <affixedNodes href="#shape_sysml_flowport_as_affixed"/>
+ <affixedNodes href="UML.ReusableParts.idgen#shape_uml_port_as_affixed"/>
+ <borderedNodeFigure href="UML.ReusableParts.idgen#org.eclipse.papyrus.gmf.diagram.common.figure.SelectableBorderedNodeFigure"/>
+ </customNodes>
+ <customNodes xsi:type="idgen:CustomClassifierNode" id="shape_sysml_blockproperty_as_composite" label="BlockPropertyComposite" editPart="org.eclipse.papyrus.sysml.diagram.common.edit.part.BlockPropertyCompositeEditPart" semanticType="org.eclipse.papyrus.sysml.PartProperty" altSemanticTypes="org.eclipse.papyrus.sysml.ReferenceProperty" tag="[#runtime-defined]" compartments="compartment_sysml_blockproperty_structure" visibleCompartments="compartment_sysml_blockproperty_structure">
+ <labels href="UML.ReusableParts.idgen#label_uml_property_label"/>
+ <affixedNodes href="#shape_sysml_flowport_as_affixed"/>
+ <affixedNodes href="UML.ReusableParts.idgen#shape_uml_port_as_affixed"/>
+ <borderedNodeFigure href="UML.ReusableParts.idgen#org.eclipse.papyrus.gmf.diagram.common.figure.SelectableBorderedNodeFigure"/>
+ </customNodes>
+ <customNodes xsi:type="idgen:CustomClassifierNode" id="shape_sysml_constraintblockproperty_as_composite" label="ConstraintBlockPropertyComposite" editPart="org.eclipse.papyrus.sysml.diagram.common.edit.part.ConstraintBlockPropertyCompositeEditPart" semanticType="org.eclipse.papyrus.sysml.PartProperty" altSemanticTypes="org.eclipse.papyrus.sysml.ReferenceProperty" tag="[#runtime-defined]" compartments="compartment_sysml_blockproperty_structure" visibleCompartments="compartment_sysml_blockproperty_structure">
+ <labels href="UML.ReusableParts.idgen#label_uml_property_label"/>
+ <affixedNodes href="#shape_sysml_flowport_as_affixed"/>
+ <affixedNodes href="UML.ReusableParts.idgen#shape_uml_port_as_affixed"/>
+ <affixedNodes href="UML.ReusableParts.idgen#shape_uml_property_as_affixed"/>
+ <borderedNodeFigure href="UML.ReusableParts.idgen#org.eclipse.papyrus.gmf.diagram.common.figure.SelectableBorderedNodeFigure"/>
+ </customNodes>
+ <customNodes xsi:type="idgen:CustomClassifierNode" id="shape_sysml_dimension_as_classifier" label="Dimension" semanticType="org.eclipse.papyrus.sysml.Dimension" tag="dimension" labels="label_sysml_dimension_name"/>
+ <customNodes xsi:type="idgen:CustomClassifierNode" id="shape_sysml_constraintblock_as_classifier" label="ConstraintBlock" semanticType="org.eclipse.papyrus.sysml.ConstraintBlock" tag="constraint" labels="label_sysml_constraintblock_name" compartments="compartment_sysml_parameter_as_list compartment_sysml_constraint_as_list" visibleCompartments="compartment_sysml_parameter_as_list compartment_sysml_constraint_as_list"/>
+ <customNodes xsi:type="idgen:CustomClassifierNode" id="shape_sysml_flowspecification_as_classifier" label="FlowSpecification" semanticType="org.eclipse.papyrus.sysml.FlowSpecification" tag="flowSpecification" labels="label_sysml_flowspecification_name" compartments="compartment_sysml_flowproperty_as_list" visibleCompartments="compartment_sysml_flowproperty_as_list"/>
+ <customNodes xsi:type="idgen:CustomClassifierNode" id="shape_sysml_unit_as_classifier" label="Unit" semanticType="org.eclipse.papyrus.sysml.Unit" labelMask="Name, Dimension" tag="unit" labels="label_sysml_unit_name"/>
+ <customNodes xsi:type="idgen:CustomClassifierNode" id="shape_sysml_valuetype_as_classifier" label="ValueType" semanticType="org.eclipse.papyrus.sysml.ValueType" tag="valuetype" labels="label_sysml_valuetype_name">
+ <compartments href="UML.ReusableParts.idgen#compartment_uml_property_as_list"/>
+ <compartments href="UML.ReusableParts.idgen#compartment_uml_operation_as_list"/>
+ <visibleCompartments href="UML.ReusableParts.idgen#compartment_uml_property_as_list"/>
+ <visibleCompartments href="UML.ReusableParts.idgen#compartment_uml_operation_as_list"/>
+ </customNodes>
+ <customNodes xsi:type="idgen:CustomAffixedNode" id="shape_sysml_flowport_as_affixed" label="FlowPort" editPart="org.eclipse.papyrus.sysml.diagram.common.edit.part.FlowPortAffixedNodeEditPart" semanticType="org.eclipse.papyrus.sysml.FlowPort" altSemanticTypes="org.eclipse.papyrus.sysml.FlowPort_In org.eclipse.papyrus.sysml.FlowPort_Out org.eclipse.papyrus.sysml.FlowPort_InOut">
+ <affixedLabels href="#affixedlabel_sysml_flowport_label"/>
+ <affixedLabels href="UML.ReusableParts.idgen#affixedlabel_uml_appliedstereotype"/>
+ <locator href="UML.ReusableParts.idgen#org.eclipse.papyrus.uml.diagram.common.locator.PortPositionLocator"/>
+ </customNodes>
+ <customNodes xsi:type="idgen:CustomClassifierNode" id="shape_sysml_nestedblockproperty_as_composite" label="NestedBlockPropertyComposite" editPart="org.eclipse.papyrus.sysml.diagram.common.edit.part.NestedBlockPropertyCompositeEditPart" semanticType="org.eclipse.papyrus.sysml.PartProperty" altSemanticTypes="org.eclipse.papyrus.sysml.ReferenceProperty" tag="[#runtime-defined]">
+ <labels href="UML.ReusableParts.idgen#label_uml_property_label"/>
+ <affixedNodes href="#shape_sysml_flowport_as_affixed"/>
+ <affixedNodes href="UML.ReusableParts.idgen#shape_uml_port_as_affixed"/>
+ <borderedNodeFigure href="UML.ReusableParts.idgen#org.eclipse.papyrus.gmf.diagram.common.figure.SelectableBorderedNodeFigure"/>
+ </customNodes>
+ <customEdges xsi:type="idgen:CustomLink" id="link_sysml_association" label="Association" editPart="org.eclipse.papyrus.sysml.diagram.common.edit.part.AssociationEditPart" semanticType="org.eclipse.papyrus.sysml.Association" altSemanticTypes="org.eclipse.papyrus.sysml.AssociationComposite org.eclipse.papyrus.sysml.AssociationCompositeDirected org.eclipse.papyrus.sysml.AssociationNone org.eclipse.papyrus.sysml.AssociationNoneDirected org.eclipse.papyrus.sysml.AssociationShared org.eclipse.papyrus.sysml.AssociationSharedDirected" figure="org.eclipse.papyrus.sysml.diagram.common.figure.AssociationFigure">
+ <viewFactory href="UML.ReusableParts.idgen#org.eclipse.papyrus.uml.diagram.common.factory.AssociationLinkViewFactory"/>
+ <labels href="UML.ReusableParts.idgen#linklabel_uml_namedelement_name"/>
+ <labels href="UML.ReusableParts.idgen#linklabel_uml_association_source_role"/>
+ <labels href="UML.ReusableParts.idgen#linklabel_uml_association_source_multiplicity"/>
+ <labels href="UML.ReusableParts.idgen#linklabel_uml_association_target_role"/>
+ <labels href="UML.ReusableParts.idgen#linklabel_uml_association_target_multiplicity"/>
+ </customEdges>
+ <customDecorations xsi:type="idgen:CustomCompartment" id="compartment_sysml_constraint_as_list" label="BlockConstraint" title="constraints"/>
+ <customDecorations xsi:type="idgen:CustomCompartment" id="compartment_sysml_flowport_as_list" label="FlowPort" semanticPolicy="org.eclipse.papyrus.sysml.diagram.common.edit.policy.FlowPortDefaultCompartmentSemanticEditPolicy" title="flow ports"/>
+ <customDecorations xsi:type="idgen:CustomCompartment" id="compartment_sysml_flowproperty_as_list" label="FlowProperty" title="flow properties"/>
+ <customDecorations xsi:type="idgen:CustomCompartment" id="compartment_sysml_parameter_as_list" label="Parameter" semanticPolicy="org.eclipse.papyrus.sysml.diagram.common.edit.policy.ConstraintParameterDefaultCompartmentSemanticEditPolicy" title="parameters"/>
+ <customDecorations xsi:type="idgen:CustomCompartment" id="compartment_sysml_part_as_list" label="PartProperty" semanticPolicy="org.eclipse.papyrus.sysml.diagram.common.edit.policy.PartDefaultCompartmentSemanticEditPolicy" title="parts"/>
+ <customDecorations xsi:type="idgen:CustomCompartment" id="compartment_sysml_property_as_list" label="BlockProperty" semanticPolicy="org.eclipse.papyrus.sysml.diagram.common.edit.policy.PropertyDefaultCompartmentSemanticEditPolicy" title="properties"/>
+ <customDecorations xsi:type="idgen:CustomCompartment" id="compartment_sysml_reference_as_list" label="ReferenceProperty" semanticPolicy="org.eclipse.papyrus.sysml.diagram.common.edit.policy.ReferenceDefaultCompartmentSemanticEditPolicy" title="references"/>
+ <customDecorations xsi:type="idgen:CustomCompartment" id="compartment_sysml_structure" label="Structure" semanticPolicy="org.eclipse.papyrus.sysml.diagram.common.edit.policy.StructureDefaultCompartmentSemanticEditPolicy" title="structure" list="false"/>
+ <customDecorations xsi:type="idgen:CustomCompartment" id="compartment_sysml_blockproperty_structure" label="BlockPropertyStructure" semanticPolicy="org.eclipse.papyrus.sysml.diagram.common.edit.policy.BlockPropertyStructureDefaultCompartmentSemanticEditPolicy" title="structure" list="false"/>
+ <customDecorations xsi:type="idgen:CustomCompartment" id="compartment_sysml_value_as_list" label="ValueProperty" semanticPolicy="org.eclipse.papyrus.sysml.diagram.common.edit.policy.ValueDefaultCompartmentSemanticEditPolicy" title="values"/>
+ <customDecorations xsi:type="idgen:CustomAffixedLabel" id="affixedlabel_sysml_flowport_label" label="FlowPortAffixedLabel" editPart="org.eclipse.papyrus.sysml.diagram.common.edit.part.FlowPortAffixedLabelNameEditPart" role="Label">
+ <locator href="UML.ReusableParts.idgen#org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator"/>
+ </customDecorations>
+ <customDecorations xsi:type="idgen:CustomClassifierInnerLabel" id="label_sysml_block_name" label="BlockLabelName" specificIconKey=""/>
+ <customDecorations xsi:type="idgen:CustomClassifierInnerLabel" id="label_sysml_constraintblock_name" label="ConstraintBlockLabelName" specificIconKey=""/>
+ <customDecorations xsi:type="idgen:CustomClassifierInnerLabel" id="label_sysml_dimension_name" label="DimensionLabelName" specificIconKey=""/>
+ <customDecorations xsi:type="idgen:CustomClassifierInnerLabel" id="label_sysml_flowspecification_name" label="FlowSpecificationLabelName" specificIconKey=""/>
+ <customDecorations xsi:type="idgen:CustomClassifierInnerLabel" id="label_sysml_unit_name" label="UnitLabelName" specificIconKey=""/>
+ <customDecorations xsi:type="idgen:CustomClassifierInnerLabel" id="label_sysml_valuetype_name" label="ValueTypeLabelName" specificIconKey=""/>
+ <semanticTypes id="org.eclipse.papyrus.sysml.Block" name="Block" constantTypePackage="org.eclipse.papyrus.sysml.service.types.element" constantTypeClass="SysMLElementTypes" icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/blocks/Block.gif"/>
+ <semanticTypes id="org.eclipse.papyrus.sysml.ConstraintBlock" name="ConstraintBlock" constantTypePackage="org.eclipse.papyrus.sysml.service.types.element" constantTypeClass="SysMLElementTypes" icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/constraints/ConstraintBlock.gif"/>
+ <semanticTypes id="org.eclipse.papyrus.sysml.ConstraintProperty" name="ConstraintProperty" constantTypePackage="org.eclipse.papyrus.sysml.service.types.element" constantTypeClass="SysMLElementTypes" icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/constraints/ConstraintProperty.gif"/>
+ <semanticTypes id="org.eclipse.papyrus.sysml.Dimension" name="Dimension" constantTypePackage="org.eclipse.papyrus.sysml.service.types.element" constantTypeClass="SysMLElementTypes" icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/blocks/Dimension.gif"/>
+ <semanticTypes id="org.eclipse.papyrus.sysml.FlowPort" name="FlowPort" constantTypePackage="org.eclipse.papyrus.sysml.service.types.element" constantTypeClass="SysMLElementTypes" icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/portandflows/FlowPort.gif"/>
+ <semanticTypes id="org.eclipse.papyrus.sysml.FlowPort_In" name="FlowPort_In" constantTypePackage="org.eclipse.papyrus.sysml.service.types.element" constantTypeClass="SysMLElementTypes" icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/portandflows/FlowPort.gif"/>
+ <semanticTypes id="org.eclipse.papyrus.sysml.FlowPort_Out" name="FlowPort_Out" constantTypePackage="org.eclipse.papyrus.sysml.service.types.element" constantTypeClass="SysMLElementTypes" icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/portandflows/FlowPort.gif"/>
+ <semanticTypes id="org.eclipse.papyrus.sysml.FlowPort_InOut" name="FlowPort_InOut" constantTypePackage="org.eclipse.papyrus.sysml.service.types.element" constantTypeClass="SysMLElementTypes" icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/portandflows/FlowPort.gif"/>
+ <semanticTypes id="org.eclipse.papyrus.sysml.FlowProperty" name="FlowProperty" constantTypePackage="org.eclipse.papyrus.sysml.service.types.element" constantTypeClass="SysMLElementTypes" icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/portandflows/FlowProperty.gif"/>
+ <semanticTypes id="org.eclipse.papyrus.sysml.FlowSpecification" name="FlowSpecification" constantTypePackage="org.eclipse.papyrus.sysml.service.types.element" constantTypeClass="SysMLElementTypes" icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/portandflows/FlowSpecification.gif"/>
+ <semanticTypes id="org.eclipse.papyrus.sysml.PartProperty" name="PartProperty" constantTypePackage="org.eclipse.papyrus.sysml.service.types.element" constantTypeClass="SysMLElementTypes" icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif"/>
+ <semanticTypes id="org.eclipse.papyrus.sysml.ReferenceProperty" name="ReferenceProperty" constantTypePackage="org.eclipse.papyrus.sysml.service.types.element" constantTypeClass="SysMLElementTypes" icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif"/>
+ <semanticTypes id="org.eclipse.papyrus.sysml.Unit" name="Unit" constantTypePackage="org.eclipse.papyrus.sysml.service.types.element" constantTypeClass="SysMLElementTypes" icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/blocks/Unit.gif"/>
+ <semanticTypes id="org.eclipse.papyrus.sysml.ValueProperty" name="ValueProperty" constantTypePackage="org.eclipse.papyrus.sysml.service.types.element" constantTypeClass="SysMLElementTypes" icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif"/>
+ <semanticTypes id="org.eclipse.papyrus.sysml.ValueType" name="ValueType" constantTypePackage="org.eclipse.papyrus.sysml.service.types.element" constantTypeClass="SysMLElementTypes" icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/blocks/ValueType.gif"/>
+ <semanticTypes id="org.eclipse.papyrus.sysml.Association" name="Association" constantTypePackage="org.eclipse.papyrus.sysml.service.types.element" constantTypeClass="SysMLElementTypes" icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif"/>
+ <semanticTypes id="org.eclipse.papyrus.sysml.AssociationNone" name="AssociationNone" constantTypePackage="org.eclipse.papyrus.sysml.service.types.element" constantTypeClass="SysMLElementTypes" icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif"/>
+ <semanticTypes id="org.eclipse.papyrus.sysml.AssociationNoneDirected" name="AssociationNoneDirected" constantTypePackage="org.eclipse.papyrus.sysml.service.types.element" constantTypeClass="SysMLElementTypes" icon="platform:/plugin/org.eclipse.papyrus.uml.service.types/icons/Association_none_directed.gif"/>
+ <semanticTypes id="org.eclipse.papyrus.sysml.AssociationComposite" name="AssociationComposite" constantTypePackage="org.eclipse.papyrus.sysml.service.types.element" constantTypeClass="SysMLElementTypes" icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association_composite.gif"/>
+ <semanticTypes id="org.eclipse.papyrus.sysml.AssociationCompositeDirected" name="AssociationCompositeDirected" constantTypePackage="org.eclipse.papyrus.sysml.service.types.element" constantTypeClass="SysMLElementTypes" icon="platform:/plugin/org.eclipse.papyrus.uml.service.types/icons/Association_composite_directed.gif"/>
+ <semanticTypes id="org.eclipse.papyrus.sysml.AssociationShared" name="AssociationShared" constantTypePackage="org.eclipse.papyrus.sysml.service.types.element" constantTypeClass="SysMLElementTypes" icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association_shared.gif"/>
+ <semanticTypes id="org.eclipse.papyrus.sysml.AssociationSharedDirected" name="AssociationSharedDirected" constantTypePackage="org.eclipse.papyrus.sysml.service.types.element" constantTypeClass="SysMLElementTypes" icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association_shared_directed.gif"/>
+ <javaClasses qualifiedName="org.eclipse.papyrus.sysml.diagram.common.edit.part.NestedBlockPropertyCompositeEditPart"/>
+ <javaClasses qualifiedName="org.eclipse.papyrus.uml.diagram.common.edit.policy.StructuredClassifierCreationEditPolicy"/>
+ <javaClasses qualifiedName="org.eclipse.papyrus.sysml.diagram.common.edit.part.ConstraintPropertyChildLabelEditPart"/>
+ <javaClasses qualifiedName="org.eclipse.papyrus.sysml.diagram.common.edit.part.FlowPortAffixedLabelNameEditPart"/>
+ <javaClasses qualifiedName="org.eclipse.papyrus.sysml.diagram.common.edit.part.FlowPortAffixedNodeEditPart"/>
+ <javaClasses qualifiedName="org.eclipse.papyrus.sysml.diagram.common.edit.part.FlowPropertyChildLabelEditPart"/>
+ <javaClasses qualifiedName="org.eclipse.papyrus.sysml.diagram.common.edit.part.FlowPortChildLabelEditPart"/>
+ <javaClasses qualifiedName="org.eclipse.papyrus.sysml.diagram.common.edit.part.BlockPropertyCompositeEditPart"/>
+ <javaClasses qualifiedName="org.eclipse.papyrus.sysml.diagram.common.edit.part.ConstraintBlockPropertyCompositeEditPart"/>
+ <javaClasses qualifiedName="org.eclipse.papyrus.sysml.diagram.common.edit.part.AssociationEditPart"/>
+ <javaClasses qualifiedName="org.eclipse.papyrus.sysml.diagram.common.figure.AssociationFigure"/>
+ <javaClasses qualifiedName="org.eclipse.papyrus.sysml.diagram.common.edit.policy.ConstraintParameterDefaultCompartmentSemanticEditPolicy"/>
+ <javaClasses qualifiedName="org.eclipse.papyrus.sysml.diagram.common.edit.policy.PartDefaultCompartmentSemanticEditPolicy"/>
+ <javaClasses qualifiedName="org.eclipse.papyrus.sysml.diagram.common.edit.policy.PropertyDefaultCompartmentSemanticEditPolicy"/>
+ <javaClasses qualifiedName="org.eclipse.papyrus.sysml.diagram.common.edit.policy.ReferenceDefaultCompartmentSemanticEditPolicy"/>
+ <javaClasses qualifiedName="org.eclipse.papyrus.sysml.diagram.common.edit.policy.StructureDefaultCompartmentSemanticEditPolicy"/>
+ <javaClasses qualifiedName="org.eclipse.papyrus.sysml.diagram.common.edit.policy.ValueDefaultCompartmentSemanticEditPolicy"/>
+ <javaClasses qualifiedName="org.eclipse.papyrus.sysml.diagram.common.edit.policy.BlockPropertyStructureDefaultCompartmentSemanticEditPolicy"/>
+ <javaClasses qualifiedName="org.eclipse.papyrus.sysml.diagram.common.edit.policy.BlockCompositeSemanticEditPolicy"/>
+ <javaClasses qualifiedName="org.eclipse.papyrus.sysml.diagram.common.edit.policy.FlowPortDefaultCompartmentSemanticEditPolicy"/>
+</idgen:Diagram>
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen
new file mode 100755
index 0000000..5047ade
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<idgen:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:idgen="http://www.eclipse.org/papyrus/0.7.0/idgen" name="UML Reusable Parts" type="" icon="" label="" language="" javaPackagePrefix="org.eclipse.papyrus.uml.diagram.common" javaClassPrefix="UML" createCommandLabel="">
+ <customNodes xsi:type="idgen:CustomLabelNode" id="shape_uml_constraint_as_label" label="Constraint" editPart="org.eclipse.papyrus.uml.diagram.common.edit.part.DefaultChildLabelEditPart" semanticType="org.eclipse.papyrus.uml.Constraint" labelMask="Name, Specification"/>
+ <customNodes xsi:type="idgen:CustomLabelNode" id="shape_uml_enumerationliteral_as_label" label="EnumerationLiteral" editPart="org.eclipse.papyrus.uml.diagram.common.edit.part.DefaultChildLabelEditPart" semanticType="org.eclipse.papyrus.uml.EnumerationLiteral" labelMask=""/>
+ <customNodes xsi:type="idgen:CustomLabelNode" id="shape_uml_operation_as_label" label="Operation" editPart="org.eclipse.papyrus.uml.diagram.common.edit.part.DefaultChildLabelEditPart" semanticType="org.eclipse.papyrus.uml.Operation" labelMask="Visibility, Name, Type, Modifiers, Param_Direction, Param_Name, Param_Type, Param_Multiplicity, Param_DefaultValue, Param_Modifiers"/>
+ <customNodes xsi:type="idgen:CustomLabelNode" id="shape_uml_port_as_label" label="Port" editPart="org.eclipse.papyrus.uml.diagram.common.edit.part.DefaultChildLabelEditPart" semanticType="org.eclipse.papyrus.uml.Port" labelMask="Visibility, Derive, Name, Type, Undefined_Type, Multiplicity, Default_Multiplicity, DefaultValue, Modifiers"/>
+ <customNodes xsi:type="idgen:CustomLabelNode" id="shape_uml_property_as_label" label="Property" editPart="org.eclipse.papyrus.uml.diagram.common.edit.part.DefaultChildLabelEditPart" semanticType="org.eclipse.papyrus.uml.Property" labelMask="Visibility, Derive, Name, Type, Undefined_Type, Multiplicity, Default_Multiplicity, DefaultValue, Modifiers"/>
+ <customNodes xsi:type="idgen:CustomLabelNode" id="shape_uml_reception_as_label" label="Reception" editPart="org.eclipse.papyrus.uml.diagram.common.edit.part.DefaultChildLabelEditPart" semanticType="org.eclipse.papyrus.uml.Reception" labelMask="Name, Signal"/>
+ <customNodes xsi:type="idgen:CustomClassifierNode" id="shape_uml_actor_as_classifier" label="Actor" viewFactory="org.eclipse.papyrus.uml.diagram.common.factory.ClassifierViewFactory" semanticType="org.eclipse.papyrus.uml.Actor" labels="label_uml_namedelement_name" compartments="compartment_uml_property_as_list compartment_uml_operation_as_list"/>
+ <customNodes xsi:type="idgen:CustomClassifierNode" id="shape_uml_datatype_as_classifier" label="DataType" viewFactory="org.eclipse.papyrus.uml.diagram.common.factory.ClassifierViewFactory" semanticType="org.eclipse.papyrus.uml.DataType" tag="datatype" labels="label_uml_namedelement_name" compartments="compartment_uml_property_as_list compartment_uml_operation_as_list" visibleCompartments="compartment_uml_property_as_list"/>
+ <customNodes xsi:type="idgen:CustomClassifierNode" id="shape_uml_enumeration_as_classifier" label="Enumeration" semanticType="org.eclipse.papyrus.uml.Enumeration" labels="label_uml_namedelement_name" compartments="compartment_uml_enumerationliteral_as_list" visibleCompartments="compartment_uml_enumerationliteral_as_list"/>
+ <customNodes xsi:type="idgen:CustomClassifierNode" id="shape_uml_interface_as_classifier" label="Interface" viewFactory="org.eclipse.papyrus.uml.diagram.common.factory.ClassifierViewFactory" semanticType="org.eclipse.papyrus.uml.Interface" tag="" labels="label_uml_namedelement_name" compartments="compartment_uml_property_as_list compartment_uml_operation_as_list" visibleCompartments="compartment_uml_property_as_list compartment_uml_operation_as_list"/>
+ <customNodes xsi:type="idgen:CustomClassifierNode" id="shape_uml_primitivetype_as_classifier" label="PrimitiveType" semanticType="org.eclipse.papyrus.uml.PrimitiveType" tag="primitive" labels="label_uml_namedelement_name"/>
+ <customNodes xsi:type="idgen:CustomClassifierNode" id="shape_uml_signal_as_classifier" label="Signal" viewFactory="org.eclipse.papyrus.uml.diagram.common.factory.ClassifierViewFactory" semanticType="org.eclipse.papyrus.uml.Signal" tag="" labels="label_uml_namedelement_name" compartments="compartment_uml_property_as_list compartment_uml_operation_as_list"/>
+ <customNodes xsi:type="idgen:CustomAffixedNode" id="shape_uml_port_as_affixed" label="Port" semanticType="org.eclipse.papyrus.uml.Port" affixedLabels="affixedlabel_uml_port_label affixedlabel_uml_appliedstereotype" locator="org.eclipse.papyrus.uml.diagram.common.locator.PortPositionLocator"/>
+ <customNodes xsi:type="idgen:CustomAffixedNode" id="shape_uml_property_as_affixed" label="Property" semanticType="org.eclipse.papyrus.uml.Property" affixedLabels="affixedlabel_uml_port_label affixedlabel_uml_appliedstereotype"/>
+ <customEdges xsi:type="idgen:CustomLink" id="link_uml_dependency" label="Dependency" semanticType="org.eclipse.papyrus.uml.Dependency" labels="linklabel_uml_namedelement_name" figure="org.eclipse.papyrus.uml.diagram.common.figure.NamedElementEdgeFigure"/>
+ <customEdges xsi:type="idgen:CustomLink" id="link_uml_connector" label="Connector" semanticType="org.eclipse.papyrus.uml.Connector" labels="linklabel_uml_connector_label linklabel_uml_connector_source_multiplicity linklabel_uml_connector_target_multiplicity" figure="org.eclipse.papyrus.uml.diagram.common.figure.ConnectorEdgeFigure"/>
+ <customEdges xsi:type="idgen:CustomLink" id="link_uml_generalization" label="Generalization" semanticType="org.eclipse.papyrus.uml.Generalization" figure="org.eclipse.papyrus.uml.diagram.common.figure.GeneralizationFigure"/>
+ <customEdges xsi:type="idgen:CustomLink" id="link_uml_interfacerealization" label="InterfaceRealization" semanticType="org.eclipse.papyrus.uml.InterfaceRealization" labels="linklabel_uml_namedelement_name" figure="org.eclipse.papyrus.uml.diagram.common.figure.InterfaceRealizationFigure"/>
+ <customEdges xsi:type="idgen:CustomLink" id="link_uml_usage" label="Usage" semanticType="org.eclipse.papyrus.uml.Usage" tag="use" labels="linklabel_uml_namedelement_name" figure="org.eclipse.papyrus.uml.diagram.common.figure.NamedElementEdgeFigure"/>
+ <customDecorations xsi:type="idgen:CustomCompartment" id="compartment_uml_constraint_as_list" label="Constraint" title="constraints" children="shape_uml_constraint_as_label"/>
+ <customDecorations xsi:type="idgen:CustomCompartment" id="compartment_uml_enumerationliteral_as_list" label="EnumerationLiteral" title="literals" children="shape_uml_enumerationliteral_as_label"/>
+ <customDecorations xsi:type="idgen:CustomCompartment" id="compartment_uml_operation_as_list" label="Operation" title="operations" children="shape_uml_operation_as_label shape_uml_reception_as_label"/>
+ <customDecorations xsi:type="idgen:CustomCompartment" id="compartment_uml_port_as_list" label="Port" title="standard ports" children="shape_uml_port_as_label"/>
+ <customDecorations xsi:type="idgen:CustomCompartment" id="compartment_uml_property_as_list" label="Property" title="properties" children="shape_uml_property_as_label shape_uml_port_as_label"/>
+ <customDecorations xsi:type="idgen:CustomAffixedLabel" id="affixedlabel_uml_appliedstereotype" label="CustomFlowPortAppliedStereotypeEditPart" editPart="org.eclipse.papyrus.sysml.diagram.common.edit.part.CustomFlowPortAppliedStereotypeEditPart" locator="org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator" role="Stereotype"/>
+ <customDecorations xsi:type="idgen:CustomAffixedLabel" id="affixedlabel_uml_namedelement_name" label="NamedElementAffixedLabelName" editPart="org.eclipse.papyrus.uml.diagram.common.edit.part.NamedElementAffixedLabelNameEditPart" locator="org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator" role="Name"/>
+ <customDecorations xsi:type="idgen:CustomAffixedLabel" id="affixedlabel_uml_port_label" label="PortAffixedLabel" editPart="org.eclipse.papyrus.uml.diagram.common.edit.part.PortAffixedLabelNameEditPart" locator="org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator" role="Label"/>
+ <customDecorations xsi:type="idgen:CustomInnerLabel" id="label_uml_namedelement_name" label="NamedElementNodeLabel" editPart="org.eclipse.papyrus.uml.diagram.common.edit.part.NamedElementNodeLabelNameEditPart"/>
+ <customDecorations xsi:type="idgen:CustomInnerLabel" id="label_uml_property_label" label="PropertyNodeLabel" editPart="org.eclipse.papyrus.uml.diagram.common.edit.part.PropertyNodeLabelEditPart"/>
+ <customDecorations xsi:type="idgen:CustomLinkLabel" id="linklabel_uml_connector_label" label="ConnectorLinkLabel" editPart="org.eclipse.papyrus.uml.diagram.common.edit.part.ConnectorLinkLabelEditPart" role="Name"/>
+ <customDecorations xsi:type="idgen:CustomLinkLabel" id="linklabel_uml_namedelement_name" label="NamedElementLinkLabelName" editPart="org.eclipse.papyrus.uml.diagram.common.edit.part.NamedElementLinkLabelNameEditPart" role="Name"/>
+ <customDecorations xsi:type="idgen:CustomLinkLabel" id="linklabel_uml_appliedstereotype" label="AppliedStereotypeLinkLabel" editPart="org.eclipse.papyrus.uml.diagram.common.edit.part.AppliedStereotypeLinkLabelEditPart" role="Stereotype"/>
+ <customDecorations xsi:type="idgen:CustomLinkLabel" id="linklabel_uml_association_source_role" label="AssociationLinkLabelSourceRole" editPart="org.eclipse.papyrus.uml.diagram.common.edit.part.AssociationLinkLabelSourceRoleEditPart" role="SourceRole"/>
+ <customDecorations xsi:type="idgen:CustomLinkLabel" id="linklabel_uml_association_source_multiplicity" label="AssociationLinkLabelSourceMultiplicity" editPart="org.eclipse.papyrus.uml.diagram.common.edit.part.AssociationLinkLabelSourceMultiplicityEditPart" role="SourceMultiplicity"/>
+ <customDecorations xsi:type="idgen:CustomLinkLabel" id="linklabel_uml_association_target_role" label="AssociationLinkLabelTargetRole" editPart="org.eclipse.papyrus.uml.diagram.common.edit.part.AssociationLinkLabelTargetRoleEditPart" role="TargetRole"/>
+ <customDecorations xsi:type="idgen:CustomLinkLabel" id="linklabel_uml_association_target_multiplicity" label="AssociationLinkLabelTargetMultiplicity" editPart="org.eclipse.papyrus.uml.diagram.common.edit.part.AssociationLinkLabelTargetMultiplicityEditPart" role="TargetMultiplicity"/>
+ <customDecorations xsi:type="idgen:CustomLinkLabel" id="linklabel_uml_connector_source_multiplicity" label="ConnectorLinkLabelSourceMultiplicity" editPart="org.eclipse.papyrus.uml.diagram.common.edit.part.ConnectorLinkLabelSourceMultiplicityEditPart" role="SourceMultiplicity"/>
+ <customDecorations xsi:type="idgen:CustomLinkLabel" id="linklabel_uml_connector_target_multiplicity" label="ConnectorLinkLabelTargetMultiplicity" editPart="org.eclipse.papyrus.uml.diagram.common.edit.part.ConnectorLinkLabelTargetMultiplicityEditPart" role="TargetMultiplicity"/>
+ <semanticTypes id="org.eclipse.papyrus.uml.Actor" name="Actor" constantTypePackage="org.eclipse.papyrus.uml.service.types.element" constantTypeClass="UMLElementTypes" icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Actor.gif"/>
+ <semanticTypes id="org.eclipse.papyrus.uml.Comment" name="Comment" constantTypePackage="org.eclipse.papyrus.uml.service.types.element" constantTypeClass="UMLElementTypes" icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif"/>
+ <semanticTypes id="org.eclipse.papyrus.uml.Connector" name="Connector" constantTypePackage="org.eclipse.papyrus.uml.service.types.element" constantTypeClass="UMLElementTypes" icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Connector.gif"/>
+ <semanticTypes id="org.eclipse.papyrus.uml.Constraint" name="Constraint" constantTypePackage="org.eclipse.papyrus.uml.service.types.element" constantTypeClass="UMLElementTypes" icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"/>
+ <semanticTypes id="org.eclipse.papyrus.uml.DataType" name="DataType" constantTypePackage="org.eclipse.papyrus.uml.service.types.element" constantTypeClass="UMLElementTypes" icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DataType.gif"/>
+ <semanticTypes id="org.eclipse.papyrus.uml.Dependency" name="Dependency" constantTypePackage="org.eclipse.papyrus.uml.service.types.element" constantTypeClass="UMLElementTypes" icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Dependency.gif"/>
+ <semanticTypes id="org.eclipse.papyrus.uml.Enumeration" name="Enumeration" constantTypePackage="org.eclipse.papyrus.uml.service.types.element" constantTypeClass="UMLElementTypes" icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Enumeration.gif"/>
+ <semanticTypes id="org.eclipse.papyrus.uml.EnumerationLiteral" name="EnumerationLiteral" constantTypePackage="org.eclipse.papyrus.uml.service.types.element" constantTypeClass="UMLElementTypes" icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/EnumerationLiteral.gif"/>
+ <semanticTypes id="org.eclipse.papyrus.uml.Generalization" name="Generalization" constantTypePackage="org.eclipse.papyrus.uml.service.types.element" constantTypeClass="UMLElementTypes" icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Generalization.gif"/>
+ <semanticTypes id="org.eclipse.papyrus.uml.InstanceSpecification" name="InstanceSpecification" constantTypePackage="org.eclipse.papyrus.uml.service.types.element" constantTypeClass="UMLElementTypes" icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InstanceSpecification.gif"/>
+ <semanticTypes id="org.eclipse.papyrus.uml.Interface" name="Interface" constantTypePackage="org.eclipse.papyrus.uml.service.types.element" constantTypeClass="UMLElementTypes" icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Interface.gif"/>
+ <semanticTypes id="org.eclipse.papyrus.uml.InterfaceRealization" name="InterfaceRealization" constantTypePackage="org.eclipse.papyrus.uml.service.types.element" constantTypeClass="UMLElementTypes" icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InterfaceRealization.gif"/>
+ <semanticTypes id="org.eclipse.papyrus.uml.Model" name="Model" constantTypePackage="org.eclipse.papyrus.uml.service.types.element" constantTypeClass="UMLElementTypes" icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Model.gif"/>
+ <semanticTypes id="org.eclipse.papyrus.uml.Operation" name="Operation" constantTypePackage="org.eclipse.papyrus.uml.service.types.element" constantTypeClass="UMLElementTypes" icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Operation.gif"/>
+ <semanticTypes id="org.eclipse.papyrus.uml.Package" name="Package" constantTypePackage="org.eclipse.papyrus.uml.service.types.element" constantTypeClass="UMLElementTypes" icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Package.gif"/>
+ <semanticTypes id="org.eclipse.papyrus.uml.Port" name="Port" constantTypePackage="org.eclipse.papyrus.uml.service.types.element" constantTypeClass="UMLElementTypes" icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Port.gif"/>
+ <semanticTypes id="org.eclipse.papyrus.uml.PrimitiveType" name="PrimitiveType" constantTypePackage="org.eclipse.papyrus.uml.service.types.element" constantTypeClass="UMLElementTypes" icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/PrimitiveType.gif"/>
+ <semanticTypes id="org.eclipse.papyrus.uml.Property" name="Property" constantTypePackage="org.eclipse.papyrus.uml.service.types.element" constantTypeClass="UMLElementTypes" icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif"/>
+ <semanticTypes id="org.eclipse.papyrus.uml.Reception" name="Reception" constantTypePackage="org.eclipse.papyrus.uml.service.types.element" constantTypeClass="UMLElementTypes" icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Reception.gif"/>
+ <semanticTypes id="org.eclipse.papyrus.uml.Signal" name="Signal" constantTypePackage="org.eclipse.papyrus.uml.service.types.element" constantTypeClass="UMLElementTypes" icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Signal.gif"/>
+ <semanticTypes id="org.eclipse.papyrus.uml.Slot" name="Slot" constantTypePackage="org.eclipse.papyrus.uml.service.types.element" constantTypeClass="UMLElementTypes" icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Slot.gif"/>
+ <semanticTypes id="org.eclipse.papyrus.uml.Usage" name="Usage" constantTypePackage="org.eclipse.papyrus.uml.service.types.element" constantTypeClass="UMLElementTypes" icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Usage.gif"/>
+ <javaClasses qualifiedName="org.eclipse.papyrus.uml.diagram.common.edit.part.AppliedStereotypeAffixedLabelEditPart"/>
+ <javaClasses qualifiedName="org.eclipse.papyrus.uml.diagram.common.edit.part.AppliedStereotypeLinkLabelEditPart"/>
+ <javaClasses qualifiedName="org.eclipse.papyrus.uml.diagram.common.edit.part.DefaultChildLabelEditPart"/>
+ <javaClasses qualifiedName="org.eclipse.papyrus.uml.diagram.common.edit.part.NamedElementAffixedLabelNameEditPart"/>
+ <javaClasses qualifiedName="org.eclipse.papyrus.uml.diagram.common.edit.part.NamedElementLinkLabelNameEditPart"/>
+ <javaClasses qualifiedName="org.eclipse.papyrus.uml.diagram.common.edit.part.NamedElementNodeLabelNameEditPart"/>
+ <javaClasses qualifiedName="org.eclipse.papyrus.uml.diagram.common.edit.part.PropertyNodeLabelEditPart"/>
+ <javaClasses qualifiedName="org.eclipse.papyrus.uml.diagram.common.edit.part.PortAffixedLabelNameEditPart"/>
+ <javaClasses qualifiedName="org.eclipse.papyrus.uml.diagram.common.edit.part.AssociationLinkLabelSourceRoleEditPart"/>
+ <javaClasses qualifiedName="org.eclipse.papyrus.uml.diagram.common.edit.part.AssociationLinkLabelSourceMultiplicityEditPart"/>
+ <javaClasses qualifiedName="org.eclipse.papyrus.uml.diagram.common.edit.part.AssociationLinkLabelTargetRoleEditPart"/>
+ <javaClasses qualifiedName="org.eclipse.papyrus.uml.diagram.common.edit.part.AssociationLinkLabelTargetMultiplicityEditPart"/>
+ <javaClasses qualifiedName="org.eclipse.papyrus.uml.diagram.common.edit.part.ConnectorLinkLabelEditPart"/>
+ <javaClasses qualifiedName="org.eclipse.papyrus.uml.diagram.common.edit.part.ConnectorLinkLabelSourceMultiplicityEditPart"/>
+ <javaClasses qualifiedName="org.eclipse.papyrus.uml.diagram.common.edit.part.ConnectorLinkLabelTargetMultiplicityEditPart"/>
+ <javaClasses qualifiedName="org.eclipse.papyrus.uml.diagram.common.locator.PortPositionLocator"/>
+ <javaClasses qualifiedName="org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator"/>
+ <javaClasses qualifiedName="org.eclipse.papyrus.uml.diagram.common.factory.ClassifierViewFactory"/>
+ <javaClasses qualifiedName="org.eclipse.papyrus.uml.diagram.common.factory.AssociationLinkViewFactory"/>
+ <javaClasses qualifiedName="org.eclipse.papyrus.uml.diagram.common.figure.GeneralizationFigure"/>
+ <javaClasses qualifiedName="org.eclipse.papyrus.uml.diagram.common.figure.InterfaceRealizationFigure"/>
+ <javaClasses qualifiedName="org.eclipse.papyrus.uml.diagram.common.figure.NamedElementEdgeFigure"/>
+ <javaClasses qualifiedName="org.eclipse.papyrus.uml.diagram.common.figure.ConnectorEdgeFigure"/>
+ <javaClasses qualifiedName="org.eclipse.papyrus.gmf.diagram.common.figure.SelectableBorderedNodeFigure"/>
+</idgen:Diagram>
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/org.eclipse.papyrus.sysml.diagram.common.iml b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/org.eclipse.papyrus.sysml.diagram.common.iml
new file mode 100755
index 0000000..737c4ef
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/org.eclipse.papyrus.sysml.diagram.common.iml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+ <component name="NewModuleRootManager" inherit-compiler-output="false">
+ <output url="file://$MODULE_DIR$/bin" />
+ <exclude-output />
+ <content url="file://$MODULE_DIR$">
+ <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/src-gen" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/src-common-sysml" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/src-common-uml" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/src-common-gmf" isTestSource="false" />
+ </content>
+ <orderEntry type="jdk" jdkName="JavaSE-1.6" jdkType="JavaSDK" />
+ <orderEntry type="module" module-name="org.eclipse.papyrus.sysml" />
+ <orderEntry type="module" module-name="org.eclipse.papyrus.editor" />
+ <orderEntry type="module" module-name="org.eclipse.papyrus.sysml.service.types" />
+ <orderEntry type="module" module-name="org.eclipse.papyrus.infra.widgets.toolbox" />
+ <orderEntry type="module" module-name="org.eclipse.papyrus.uml.modelexplorer.widgets" />
+ <orderEntry type="module" module-name="org.eclipse.papyrus.uml.diagram.composite" />
+ <orderEntry type="module" module-name="org.eclipse.papyrus.uml.diagram.clazz" />
+ <orderEntry type="module" module-name="org.eclipse.papyrus.uml.internationalization.edit" />
+ <orderEntry type="module" module-name="org.eclipse.papyrus.uml.internationalization.utils" />
+ <orderEntry type="library" name="ECLIPSE" level="application" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ </component>
+</module>
\ No newline at end of file
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/plugin.properties b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/plugin.properties
new file mode 100755
index 0000000..c67df5e
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/plugin.properties
@@ -0,0 +1,12 @@
+#################################################################################
+# Copyright (c) 2010 CEA LIST.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - initial API and implementation
+##################################################################################
+pluginName=UML Common diagram for SysML
+providerName=Eclipse Modeling Project
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/plugin.xml b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/plugin.xml
new file mode 100755
index 0000000..af2a317
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/plugin.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+
+<extension point="org.eclipse.core.expressions.propertyTesters">
+ <propertyTester class="org.eclipse.papyrus.sysml.diagram.common.utils.SysMLSelectionTester" id="org.eclipse.papyrus.SysMLSelectionTester" namespace="org.eclipse.papyrus.SysMLSelectionTester" properties="isSysMLModel, isSysMLRequirementsModel, isSysMLBlocksModel" type="org.eclipse.jface.viewers.ISelection">
+ </propertyTester>
+</extension>
+
+<extension point="org.eclipse.core.expressions.definitions">
+ <definition id="org.eclipse.papyrus.sysml.diagram.common.IsPapyrusActiveWithSysML">
+ <and>
+ <with variable="activeEditorId">
+ <equals value="org.eclipse.papyrus.infra.core.papyrusEditor"></equals>
+ </with>
+ <with variable="selection">
+ <test forcePluginActivation="true" property="org.eclipse.papyrus.SysMLSelectionTester.isSysMLModel" value="true"></test>
+ </with>
+ </and>
+ </definition>
+ <definition id="org.eclipse.papyrus.sysml.diagram.common.IsPapyrusActiveWithSysMLBlocks">
+ <and>
+ <with variable="activeEditorId">
+ <equals value="org.eclipse.papyrus.infra.core.papyrusEditor"></equals>
+ </with>
+ <with variable="selection">
+ <test forcePluginActivation="true" property="org.eclipse.papyrus.SysMLSelectionTester.isSysMLBlocksModel" value="true"></test>
+ </with>
+ </and>
+ </definition>
+ <definition id="org.eclipse.papyrus.sysml.diagram.common.IsPapyrusActiveWithSysMLRequirements">
+ <and>
+ <with variable="activeEditorId">
+ <equals value="org.eclipse.papyrus.infra.core.papyrusEditor"></equals>
+ </with>
+ <with variable="selection">
+ <test forcePluginActivation="true" property="org.eclipse.papyrus.SysMLSelectionTester.isSysMLRequirementsModel" value="true"></test>
+ </with>
+ </and>
+ </definition>
+</extension>
+<extension
+ point="org.eclipse.papyrus.infra.gmfdiag.common.pasteStrategy">
+ <strategy
+ strategy="org.eclipse.papyrus.sysml.diagram.common.strategy.paste.PartPasteStrategy">
+ </strategy>
+</extension>
+
+</plugin>
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/pom.xml b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/pom.xml
new file mode 100755
index 0000000..21324ed
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/pom.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.papyrus.sysml</groupId>
+ <artifactId>org.eclipse.papyrus.sysml-diagram</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.papyrus.sysml.diagram.common</artifactId>
+ <version>2.0.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project>
\ No newline at end of file
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/commands/CreateViewCommand.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/commands/CreateViewCommand.java
new file mode 100755
index 0000000..612d3c0
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/commands/CreateViewCommand.java
@@ -0,0 +1,60 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.gmf.diagram.common.commands;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.diagram.core.services.ViewService;
+import org.eclipse.gmf.runtime.diagram.ui.commands.CreateCommand;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest.ViewDescriptor;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.notation.View;
+
+/**
+ * A replacement for CreateCommand that avoids that takes into account the incorrect
+ * generation of ViewProvider by GMFTooling and modifies SemanticAdapter in call to {@link ViewService#provides(Class, org.eclipse.core.runtime.IAdaptable, View, String, int, boolean, org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint)} .
+ */
+public class CreateViewCommand extends CreateCommand {
+
+ /** Constructor */
+ public CreateViewCommand(TransactionalEditingDomain editingDomain, ViewDescriptor viewDescriptor, View containerView) {
+ super(editingDomain, viewDescriptor, containerView);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean canExecute() {
+
+ // Warning the element adapter can possibly be null (see: https://bugs.eclipse.org/bugs/show_bug.cgi?id=353129)
+ if (viewDescriptor.getElementAdapter() == null) {
+ return false;
+ }
+
+ // Try to adapt the descriptor ElementAdapter in EObject
+ EObject element = (EObject) viewDescriptor.getElementAdapter().getAdapter(EObject.class);
+ IElementType elementType = (IElementType) viewDescriptor.getElementAdapter().getAdapter(IElementType.class);
+
+ SemanticElementAdapter semanticAdapter = new SemanticElementAdapter(element, elementType);
+
+ // Use the semanticAdapter instead of view descriptor element adapter to avoid the use of provides(ViewForKind) method
+ // from ViewProvider which is incorrectly implemented in GMF Tooling generated editors (other editors may have undesired side-effect on each-other).
+
+ return ViewService.getInstance().provides(viewDescriptor.getViewKind(), semanticAdapter, containerView, viewDescriptor.getSemanticHint(), viewDescriptor.getIndex(), viewDescriptor.isPersisted(), viewDescriptor.getPreferencesHint());
+ }
+
+
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/commands/ISemanticHintAdapter.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/commands/ISemanticHintAdapter.java
new file mode 100755
index 0000000..fba3a47
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/commands/ISemanticHintAdapter.java
@@ -0,0 +1,28 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.gmf.diagram.common.commands;
+
+
+/**
+ * Interface for an adapter that can give a semantic hint
+ */
+public interface ISemanticHintAdapter {
+
+ /**
+ * Returns the semantic hint for this adapter
+ *
+ * @return the semantic hint for this adapter
+ */
+ public String getSemanticHint();
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/commands/IdentityCommandWithNotification.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/commands/IdentityCommandWithNotification.java
new file mode 100755
index 0000000..5410455
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/commands/IdentityCommandWithNotification.java
@@ -0,0 +1,94 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.gmf.diagram.common.commands;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.gmf.runtime.common.core.command.AbstractCommand;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.util.StringStatics;
+import org.eclipse.papyrus.infra.widgets.toolbox.notification.Type;
+import org.eclipse.papyrus.infra.widgets.toolbox.notification.builders.CombinedPopupAndViewBuilder;
+import org.eclipse.papyrus.infra.widgets.toolbox.notification.builders.NotificationBuilder;
+
+/**
+ * A command that is always executable, undoable and redoable, but does nothing.
+ * It always returns the same OK command result.
+ *
+ * @author ldamus
+ */
+public class IdentityCommandWithNotification extends AbstractCommand {
+
+ protected String title = "Papyrus notification";
+
+ protected String message = "No message.";
+
+ protected Type type = Type.INFO;
+
+ /**
+ * Public constructor.
+ */
+ public IdentityCommandWithNotification(String message) {
+ this();
+ this.message = message;
+ }
+
+ /**
+ * Public constructor.
+ */
+ public IdentityCommandWithNotification(String title, String message, Type type) {
+ this(message);
+ this.title = title;
+ this.type = type;
+ }
+
+ /**
+ * Private constructor.
+ */
+ private IdentityCommandWithNotification() {
+ super(StringStatics.BLANK, null);
+ setResult(CommandResult.newOKCommandResult());
+ }
+
+ /**
+ * Does nothing and returns an OK command result.
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+
+ new NotificationBuilder().setBuilderClass(CombinedPopupAndViewBuilder.class).setType(type).setTitle(title).setMessage(message).run();
+
+ return getCommandResult();
+ }
+
+ /**
+ * Does nothing and returns an OK command result.
+ */
+ @Override
+ protected CommandResult doRedoWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+
+ return getCommandResult();
+ }
+
+ /**
+ * Does nothing and returns an OK command result.
+ */
+ @Override
+ protected CommandResult doUndoWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+
+ return getCommandResult();
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/commands/SemanticElementAdapter.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/commands/SemanticElementAdapter.java
new file mode 100755
index 0000000..c7787e7
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/commands/SemanticElementAdapter.java
@@ -0,0 +1,88 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.gmf.diagram.common.commands;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.emf.core.util.PackageUtil;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
+import org.eclipse.papyrus.uml.diagram.common.commands.SemanticAdapter;
+
+/**
+ * An adapter for {@link IElementType}, {@link EObject} or {@link View}.
+ */
+public class SemanticElementAdapter extends SemanticAdapter implements ISemanticHintAdapter {
+
+ /** The elementType. */
+ private Object elementType;
+
+ /** Constructor from EObject */
+ public SemanticElementAdapter(EObject element) {
+ super(element, null);
+ this.elementType = null;
+ }
+
+ /** Constructor from IElementType */
+ public SemanticElementAdapter(IElementType elementType) {
+ super(null, null);
+ this.elementType = elementType;
+ }
+
+ /** Constructor from EObject and IElementType */
+ public SemanticElementAdapter(EObject element, IElementType elementType) {
+ super(element, null);
+ this.elementType = elementType;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @SuppressWarnings("rawtypes")
+ @Override
+ public Object getAdapter(Class adapter) {
+ if (adapter.equals(IHintedType.class)) {
+ if (elementType instanceof IHintedType) {
+ return elementType;
+ }
+ }
+
+ if (adapter.equals(IElementType.class)) {
+ return elementType;
+ }
+ return super.getAdapter(adapter);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Object getProxyClassID() {
+ if (elementType != null) {
+ return PackageUtil.getID(((IElementType) elementType).getEClass());
+ }
+ return super.getProxyClassID();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getSemanticHint() {
+ if (elementType instanceof IHintedType) {
+ return ((IHintedType) elementType).getSemanticHint();
+ }
+ return null;
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/compatibility/DiagramVersioningUtils.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/compatibility/DiagramVersioningUtils.java
new file mode 100755
index 0000000..cd8cc7b
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/compatibility/DiagramVersioningUtils.java
@@ -0,0 +1,24 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.gmf.diagram.common.compatibility;
+
+
+/**
+ * @deprecated This class is repackaged as {@link org.eclipse.papyrus.infra.gmfdiag.common.reconciler.DiagramVersioningUtils}, this old version is
+ * deprecated and left for binary compatibility only
+ */
+@Deprecated
+public class DiagramVersioningUtils extends org.eclipse.papyrus.infra.gmfdiag.common.reconciler.DiagramVersioningUtils {
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/compatibility/IDiagramVersionUpdater.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/compatibility/IDiagramVersionUpdater.java
new file mode 100755
index 0000000..35bc65a
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/compatibility/IDiagramVersionUpdater.java
@@ -0,0 +1,35 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.gmf.diagram.common.compatibility;
+
+import org.eclipse.gmf.runtime.notation.Diagram;
+
+/**
+ * This interface provides an API for migration of diagram from a version to another.
+ */
+public interface IDiagramVersionUpdater {
+
+ /**
+ * Update a diagram to a new version.
+ *
+ * @param diagram
+ * the diagram to update
+ * @param oldVersion
+ * the old version of the diagram
+ * @param newVersion
+ * the new version of the diagram
+ * @return TODO : should return a status, not int.
+ */
+ public int update(Diagram diagram, String oldVersion, String newVersion);
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/edit/part/ITextAwareEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/edit/part/ITextAwareEditPart.java
new file mode 100755
index 0000000..b532c97
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/edit/part/ITextAwareEditPart.java
@@ -0,0 +1,37 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.gmf.diagram.common.edit.part;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
+
+/**
+ * Edit Part that contains editable text.
+ */
+public interface ITextAwareEditPart extends org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart {
+
+ /**
+ * Get the parser elements.
+ *
+ * @return the element being parsed.
+ */
+ public EObject getParserElement();
+
+ /**
+ * Gets the default parser options (meaning parser options stored in preferences).
+ *
+ * @return ParserOptions the parser options
+ */
+ public ParserOptions getDefaultParserOptions();
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/edit/policy/CommonDiagramDragDropEditPolicy.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/edit/policy/CommonDiagramDragDropEditPolicy.java
new file mode 100755
index 0000000..16c8723
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/edit/policy/CommonDiagramDragDropEditPolicy.java
@@ -0,0 +1,414 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.gmf.diagram.common.edit.policy;
+
+import static org.eclipse.papyrus.infra.gmfdiag.common.providers.IGraphicalTypeRegistry.UNDEFINED_TYPE;
+
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPartViewer;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.CompoundCommand;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gef.requests.ChangeBoundsRequest;
+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.diagram.core.preferences.PreferencesHint;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DiagramDragDropEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.requests.ArrangeRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest.ViewDescriptor;
+import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RefreshConnectionsRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.commands.wrappers.CommandProxyWithResult;
+import org.eclipse.papyrus.gmf.diagram.common.provider.IGraphicalTypeRegistry;
+import org.eclipse.papyrus.infra.gmfdiag.common.commands.DeferredSnapToGridCommand;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.ViewDescriptorUtil;
+import org.eclipse.papyrus.uml.diagram.common.commands.CommonDeferredCreateConnectionViewCommand;
+import org.eclipse.papyrus.uml.diagram.common.commands.SemanticAdapter;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.AbstractElementBorderEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.AbstractElementLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.helper.Element2IAdaptableRegistryHelper;
+import org.eclipse.papyrus.uml.diagram.common.util.CrossReferencerUtil;
+import org.eclipse.uml2.uml.Classifier;
+import org.eclipse.uml2.uml.Element;
+
+/**
+ * Abstract DND edit policy delegating the choice of the view to create for an EObject to a local
+ * graphical type registry.
+ */
+public abstract class CommonDiagramDragDropEditPolicy extends DiagramDragDropEditPolicy {
+
+ private Element2IAdaptableRegistryHelper myElement2IAdaptableRegistryHelper;
+
+ /** The graphical type registry. */
+ protected IGraphicalTypeRegistry registry;
+
+ /** The list of element types that require a specific drop command. */
+ private Set<String> specificDropList = null;
+
+ /** The specified link mapping helper depending on the diagram */
+ protected ILinkMappingHelper linkMappingHelper;
+
+ /** Constructor */
+ public CommonDiagramDragDropEditPolicy(ILinkMappingHelper linkMappingHelper) {
+ this.linkMappingHelper = linkMappingHelper;
+ }
+
+ private Set<String> getSpecificDropList() {
+ if (specificDropList == null) {
+ specificDropList = getSpecificDropBehaviorTypes();
+ }
+ return specificDropList;
+ }
+
+ /**
+ * Gets composite command adapters
+ */
+ protected Element2IAdaptableRegistryHelper getElement2IAdaptableRegistryHelper() {
+ if (myElement2IAdaptableRegistryHelper == null) {
+ myElement2IAdaptableRegistryHelper = new Element2IAdaptableRegistryHelper();
+ }
+ return myElement2IAdaptableRegistryHelper;
+ }
+
+ protected abstract Set<String> getSpecificDropBehaviorTypes();
+
+ /**
+ * <pre>
+ * {@inheritedDoc}.
+ *
+ * Overridden method to fix some exception occurring while moving affixed element (nodes or labels)
+ * (https://bugs.eclipse.org/bugs/show_bug.cgi?id=350680).
+ * </pre>
+ */
+ @Override
+ protected Command getDropCommand(ChangeBoundsRequest request) {
+
+ Iterator<?> iter = request.getEditParts().iterator();
+ EObject graphicalParentObject = ((GraphicalEditPart) getHost()).resolveSemanticElement();
+ while ((graphicalParentObject != null) && (iter.hasNext())) {
+ EditPart droppedEditPart = (EditPart) iter.next();
+ if (droppedEditPart instanceof AbstractElementBorderEditPart) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ if (droppedEditPart instanceof AbstractElementLabelEditPart) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ }
+ return super.getDropCommand(request);
+ }
+
+ /**
+ * {@inheritedDoc}.
+ */
+ @Override
+ public Command getDropObjectsCommand(DropObjectsRequest dropRequest) {
+
+ CompoundCommand completeDropCommand = new CompoundCommand("DropObjectsAndArrange"); //$NON-NLS-1$
+
+ // Detect file drop
+ if ((dropRequest.getObjects().size() > 0) && (dropRequest.getObjects().get(0) instanceof String)) {
+ return getDropFileCommand(dropRequest);
+ }
+
+ // Create the drop command by composite drop command for each dropped elements
+ CompositeCommand gmfDropCommand = new CompositeCommand("DropObjects"); //$NON-NLS-1$
+ Iterator<?> iter = dropRequest.getObjects().iterator();
+ while (iter.hasNext()) {
+ EObject droppedObject = (EObject) iter.next();
+ gmfDropCommand.add(getDropObjectCommand(dropRequest, droppedObject));
+ }
+
+ // Create the complete drop command by adding an arrange command after drop
+ if (!gmfDropCommand.isEmpty()) {
+
+ // Retrieve drop result (most probably created view but not necessarily) and update the request
+ CommandResult result = gmfDropCommand.getCommandResult();
+ List<?> newValues = (List<?>) result.getReturnValue();
+ dropRequest.setResult(newValues);
+
+ // Prepare refresh command
+ RefreshConnectionsRequest refreshRequest = new RefreshConnectionsRequest(newValues);
+ Command refreshCommand = getHost().getCommand(refreshRequest);
+
+ // Prepare an arrange command to avoid every dropped view to appear at the same location only if newValues contains at least one node, not when you just drag a link
+ boolean isOneNode = false;
+ for(Object o : newValues){
+ if(o instanceof Node){
+ isOneNode=true;
+ break;
+ }
+ }
+
+ ArrangeRequest arrangeRequest = new ArrangeRequest(RequestConstants.REQ_ARRANGE_DEFERRED);
+ arrangeRequest.setViewAdaptersToArrange(newValues);
+ Command arrangeCommand = getHost().getCommand(arrangeRequest);
+
+ // Update the complete drop command (drop - refresh - arrange)
+ Command dropCommand = new ICommandProxy(gmfDropCommand);
+ completeDropCommand.add(dropCommand.chain(refreshCommand));
+ if(isOneNode){
+ completeDropCommand.add(arrangeCommand);
+ }
+
+ // add snap command if required
+ // 430099: [Diagram] Snap to Grid for elements dropped from the ModelExplorer is ignored
+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=430099
+ final Object value = dropRequest.getExtendedData().get(PreferencesConstantsHelper.SNAP_TO_GRID_CONSTANT);
+ if (value instanceof Boolean && Boolean.TRUE.equals(value)) {
+ DeferredSnapToGridCommand snapCommand = new DeferredSnapToGridCommand(getEditingDomain(), newValues, (IGraphicalEditPart) getHost());
+ completeDropCommand.add(new ICommandProxy(snapCommand));
+ }
+
+ }
+
+ return completeDropCommand;
+ }
+
+ protected ICommand getDropObjectCommand(DropObjectsRequest dropRequest, EObject droppedObject) {
+
+ Point location = dropRequest.getLocation().getCopy();
+
+ View dropTargetView = ((IGraphicalEditPart) getHost()).getNotationView();
+
+ String droppedNodeType = registry.getNodeGraphicalType(droppedObject, dropTargetView.getType());
+ String droppedEdgeType = registry.getEdgeGraphicalType(droppedObject);
+
+ // Test if a specific drop command should be used
+ if (getSpecificDropList().contains(droppedNodeType) || getSpecificDropList().contains(droppedEdgeType)) {
+ return getSpecificDropCommand(dropRequest, droppedObject, droppedNodeType, droppedEdgeType);
+ }
+
+ // Decide unknown type handling
+ if (UNDEFINED_TYPE.equals(droppedNodeType) && UNDEFINED_TYPE.equals(droppedEdgeType)) {
+ return getUnknownDropCommand(dropRequest, droppedObject);
+ }
+
+ // The dropped element is a node
+ if (!UNDEFINED_TYPE.equals(droppedNodeType)) {
+ return getDefaultDropNodeCommand(droppedNodeType, droppedObject, location);
+ }
+
+ // The dropped element is a edge
+ if (!UNDEFINED_TYPE.equals(droppedEdgeType)) {
+
+ Collection<?> sources = linkMappingHelper.getSource((Element) droppedObject);
+ Collection<?> targets = linkMappingHelper.getTarget((Element) droppedObject);
+
+ // Only manage binary link during drop
+ if ((sources.size() > 0) && (targets.size() > 0)) {
+ EObject source = (EObject) sources.toArray()[0];
+ EObject target = (EObject) targets.toArray()[0];
+ return getDefaultDropEdgeCommand(droppedObject, source, target, droppedEdgeType, location);
+ }
+
+ return org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand.INSTANCE;
+ }
+
+ return org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand.INSTANCE;
+ }
+
+ protected ICommand getDefaultDropNodeCommand(String droppedNodeType, EObject droppedObject, Point location) {
+ View dropTargetView = ((IGraphicalEditPart) getHost()).getNotationView();
+ EObject dropTargetElement = dropTargetView.getElement();
+ // Drop restriction:
+ // - no restriction when dropped on diagram
+ // - require containment when dropped on any other EObject
+ if ((dropTargetView instanceof Diagram) || dropTargetElement.eContents().contains(droppedObject)) {
+ return getDefaultDropNodeCommand(droppedNodeType, location, droppedObject);
+ }
+
+ // Allow drop for inherited elements
+ if (dropTargetElement instanceof Classifier && ((Classifier) dropTargetElement).getAllAttributes().contains(droppedObject)) {
+ return getDefaultDropNodeCommand(droppedNodeType, location, droppedObject);
+ }
+ return org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand.INSTANCE;
+ }
+
+ protected ICommand getDefaultDropNodeCommand(String droppedObjectGraphicalType, Point absoluteLocation, EObject droppedObject) {
+
+ IAdaptable elementAdapter = new EObjectAdapter(droppedObject);
+
+ ViewDescriptor descriptor = new ViewDescriptor(elementAdapter, Node.class, droppedObjectGraphicalType, ViewUtil.APPEND, ViewDescriptorUtil.PERSISTED, getDiagramPreferencesHint());
+ CreateViewRequest createViewRequest = new CreateViewRequest(descriptor);
+ createViewRequest.setLocation(absoluteLocation);
+
+ // Get view creation command for the dropped object
+ Command command = getHost().getCommand(createViewRequest);
+
+ // Use the ViewDescriptor as command result, it then can be used as an adaptable to retrieve the View
+ return new CommandProxyWithResult(command, descriptor);
+ }
+
+ protected ICommand getDefaultDropEdgeCommand(EObject droppedObject, EObject source, EObject target, String droppedEdgeType, Point absoluteLocation) {
+
+ CompositeCommand completeDropCommand = new CompositeCommand("CompleteDropEdge"); //$NON-NLS-1$
+
+ // Find views in current diagram representing source and target
+ Collection<View> sourceViews = getViews(source);
+ Collection<View> targetViews = getViews(target);
+
+ IAdaptable sourceViewAdapter = null;
+ IAdaptable targetViewAdapter = null;
+
+ // If either a source or target lacks create view for these elements
+ // - using defaultDrop command (assumed to be a view creation)
+ // - try to create view on host
+ if (sourceViews.isEmpty() || targetViews.isEmpty()) {
+
+ CompositeCommand createEndViewsCommand = new CompositeCommand("CreateSourceTargetViews"); //$NON-NLS-1$
+
+ View dropContainerView = ((IGraphicalEditPart) getHost()).getNotationView();
+ EObject dropContainerElement = dropContainerView.getElement();
+
+ if (sourceViews.isEmpty()) {
+ if (dropContainerElement.eContents().contains(source)) {
+ ICommand dropSourceCommand = getDefaultDropNodeCommand(registry.getNodeGraphicalType(source, dropContainerView.getType()), absoluteLocation.getCopy(), source);
+ CompositeCommand.compose(createEndViewsCommand, dropSourceCommand);
+ sourceViewAdapter = (IAdaptable) dropSourceCommand.getCommandResult().getReturnValue();
+ } else {
+ return org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand.INSTANCE;
+ }
+ }
+
+ if (targetViews.isEmpty()) {
+ if (dropContainerElement.eContents().contains(target)) {
+ ICommand dropTargetCommand = getDefaultDropNodeCommand(registry.getNodeGraphicalType(target, dropContainerView.getType()), absoluteLocation.getCopy(), target);
+ CompositeCommand.compose(createEndViewsCommand, dropTargetCommand);
+ targetViewAdapter = (IAdaptable) dropTargetCommand.getCommandResult().getReturnValue();
+ } else {
+ return org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand.INSTANCE;
+ }
+ }
+
+ CompositeCommand.compose(completeDropCommand, createEndViewsCommand);
+ }
+
+ // Create source adapter
+ if (!sourceViews.isEmpty()) { // sourceViewAdapter should still be null in this case
+ sourceViewAdapter = new SemanticAdapter(null, sourceViews.toArray()[0]);
+ }
+
+ // Create target adapter
+ if (!targetViews.isEmpty()) { // targetViewAdapter should still be null in this case
+ targetViewAdapter = new SemanticAdapter(null, targetViews.toArray()[0]);
+ }
+
+ // Create a view for the dropped link between the source and target view adapters
+ IAdaptable droppedObjectAdapter = new SemanticAdapter(droppedObject, null);
+
+ CreateConnectionViewRequest.ConnectionViewDescriptor linkdescriptor = new CreateConnectionViewRequest.ConnectionViewDescriptor(droppedObjectAdapter, droppedEdgeType, getDiagramPreferencesHint());
+
+ CommonDeferredCreateConnectionViewCommand createConnectionViewCommand = new CommonDeferredCreateConnectionViewCommand(getEditingDomain(), droppedEdgeType, sourceViewAdapter, targetViewAdapter, getViewer(), getDiagramPreferencesHint(), linkdescriptor,
+ null);
+ createConnectionViewCommand.setElement(droppedObject);
+
+ CompositeCommand.compose(completeDropCommand, createConnectionViewCommand);
+
+ return completeDropCommand.reduce();
+ }
+
+ /**
+ * <pre>
+ * Sub-classes have to implement this method in order to provides specific drop command for
+ * element which require a specific treatment.
+ *
+ * @param dropRequest current drop request
+ * @param droppedEObject the dropped object
+ * @param nodeType the graphical type of the dropped element (node representation)
+ * @param edgeType the graphical type of the dropped element (edge representation)
+ * @return the drop command
+ * </pre>
+ */
+ protected ICommand getSpecificDropCommand(DropObjectsRequest dropRequest, EObject droppedEObject, String nodeType, String edgeType) {
+ return org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand.INSTANCE;
+ }
+
+ /**
+ * <pre>
+ * Sub-classes have to implement this method in order to provides drop command for
+ * elements that are not natively known by the diagram.
+ *
+ * @param dropRequest current drop request
+ * @param droppedEObject the dropped object
+ * @return the drop command
+ * </pre>
+ */
+ protected ICommand getUnknownDropCommand(DropObjectsRequest dropRequest, EObject droppedEObject) {
+ return org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand.INSTANCE;
+ }
+
+ protected EditPartViewer getViewer() {
+ return ((IGraphicalEditPart) getHost()).getViewer();
+ }
+
+ protected TransactionalEditingDomain getEditingDomain() {
+ return ((IGraphicalEditPart) getHost()).getEditingDomain();
+ }
+
+ protected PreferencesHint getDiagramPreferencesHint() {
+ return ((IGraphicalEditPart) getHost()).getDiagramPreferencesHint();
+ }
+
+ /**
+ * This methods looks for views representing a given EObject in the host diagram.
+ *
+ * @param eObject
+ * the {@link EObject} to look for.
+ * @return the list of {@link View} representing the eObject.
+ */
+ private Set<View> getViews(EObject eObject) {
+ Set<View> views = new HashSet<View>();
+
+ // Retrieve host diagram
+ View hostView = ((IGraphicalEditPart) getHost()).getNotationView();
+ View hostDiagram = (hostView instanceof Diagram) ? hostView : hostView.getDiagram();
+
+ // Retrieve all views for the eObject
+ Collection<View> relatedViews = CrossReferencerUtil.getCrossReferencingViews(eObject, hostDiagram.getType());
+
+ // Parse and select views from host diagram only
+ Iterator<View> it = relatedViews.iterator();
+ while (it.hasNext()) {
+ View currentView = it.next();
+ if (!(currentView instanceof Diagram) && (currentView.getDiagram() == hostDiagram)) {
+ views.add(currentView);
+ }
+ }
+
+ return views;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/edit/policy/DefaultContainerNodeEditPolicy.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/edit/policy/DefaultContainerNodeEditPolicy.java
new file mode 100755
index 0000000..663d811
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/edit/policy/DefaultContainerNodeEditPolicy.java
@@ -0,0 +1,86 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.gmf.diagram.common.edit.policy;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.draw2d.ConnectionAnchor;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.requests.CreateConnectionRequest;
+import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
+import org.eclipse.gmf.runtime.common.core.util.StringStatics;
+import org.eclipse.gmf.runtime.diagram.core.commands.SetConnectionAnchorsCommand;
+import org.eclipse.gmf.runtime.diagram.core.commands.SetConnectionEndsCommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.CreateCommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ContainerNodeEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.internal.commands.SetConnectionBendpointsCommand;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramUIMessages;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.gmf.diagram.common.commands.CreateViewCommand;
+
+/**
+ * Default container node edit policy replacement used to replace {@link CreateCommand} by {@link CreateViewCommand},
+ * different implementation of the canExecute() method.
+ * See https://bugs.eclipse.org/bugs/show_bug.cgi?id=346739.
+ */
+public class DefaultContainerNodeEditPolicy extends ContainerNodeEditPolicy {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getConnectionCreateCommand(CreateConnectionRequest request) {
+ if (!(request instanceof CreateConnectionViewRequest)) {
+ return null;
+ }
+ CreateConnectionViewRequest req = (CreateConnectionViewRequest) request;
+ CompositeCommand cc = new CompositeCommand(
+ DiagramUIMessages.Commands_CreateCommand_Connection_Label);
+ Diagram diagramView = ((View) getHost().getModel())
+ .getDiagram();
+
+ // TransactionalEditingDomain editingDomain = getEditingDomain();
+ TransactionalEditingDomain editingDomain = ((IGraphicalEditPart) getHost()).getEditingDomain();
+ CreateCommand createCommand = new CreateViewCommand(editingDomain, req
+ .getConnectionViewDescriptor(), diagramView.getDiagram());
+ //
+ setViewAdapter((IAdaptable) createCommand.getCommandResult()
+ .getReturnValue());
+
+
+ SetConnectionEndsCommand sceCommand = new SetConnectionEndsCommand(editingDomain, StringStatics.BLANK);
+ sceCommand.setEdgeAdaptor(getViewAdapter());
+ sceCommand.setNewSourceAdaptor(new EObjectAdapter(getView()));
+ ConnectionAnchor sourceAnchor = getConnectableEditPart()
+ .getSourceConnectionAnchor(request);
+ SetConnectionAnchorsCommand scaCommand = new SetConnectionAnchorsCommand(editingDomain, StringStatics.BLANK);
+ scaCommand.setEdgeAdaptor(getViewAdapter());
+ scaCommand.setNewSourceTerminal(getConnectableEditPart()
+ .mapConnectionAnchorToTerminal(sourceAnchor));
+ SetConnectionBendpointsCommand sbbCommand = new SetConnectionBendpointsCommand(editingDomain);
+ sbbCommand.setEdgeAdapter(getViewAdapter());
+ cc.compose(createCommand);
+ cc.compose(sceCommand);
+ cc.compose(scaCommand);
+ cc.compose(sbbCommand);
+ Command c = new ICommandProxy(cc);
+ request.setStartCommand(c);
+ return c;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/edit/policy/DefaultSnapBackEditPolicy.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/edit/policy/DefaultSnapBackEditPolicy.java
new file mode 100755
index 0000000..c84a050
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/edit/policy/DefaultSnapBackEditPolicy.java
@@ -0,0 +1,114 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.gmf.diagram.common.edit.policy;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.commands.SetBoundsCommand;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.LabelEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.GraphicalNodeEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramUIMessages;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.notation.View;
+
+
+/**
+ * <pre>
+ * EditPolicy which support the RequestConstants.REQ_SNAP_BACK request type.
+ *
+ * Returns a command to position a label's offset to it default set at creation.
+ *
+ * This edit policy is a copy of LabelSnapBackEditPolicy, which does not only use the label view type
+ * to find the snap back position (also takes into account the diagram and parent view type).
+ *
+ * @see org.eclipse.gmf.runtime.diagram.ui.internal.editpolicies.LabelSnapBackEditPolicy
+ * </pre>
+ */
+@SuppressWarnings("restriction")
+public class DefaultSnapBackEditPolicy extends GraphicalNodeEditPolicy {
+
+
+ /**
+ * Understands RequestConstants.REQ_SNAP_BACK request types
+ *
+ * @param request
+ * @return boolean
+ */
+ @Override
+ public boolean understandsRequest(Request request) {
+ return RequestConstants.REQ_SNAP_BACK.equals(request.getType());
+ }
+
+ /**
+ * Returns a <code>Command</code> which sets the label's offset to its
+ * original position.
+ *
+ * @param request
+ * the request
+ * @return the command
+ */
+ @Override
+ public Command getCommand(Request request) {
+ if (RequestConstants.REQ_SNAP_BACK.equals(request.getType())) {
+ View view = (View) getHost().getModel();
+
+ // YT - Use a snap back hint that takes into account the diagram
+ // and parent view type.
+ String hint = getSnapBackHint(view);
+
+ Point offset = LabelEditPart.getSnapBackPosition(hint);
+ if (offset == null) {
+ return null;
+ }
+
+ TransactionalEditingDomain editingDomain = ((IGraphicalEditPart) getHost()).getEditingDomain();
+
+ ICommand moveCommand = new SetBoundsCommand(editingDomain, DiagramUIMessages.SetLocationCommand_Label_Resize, new EObjectAdapter(view), offset);
+ return new ICommandProxy(moveCommand);
+ }
+ return null;
+ }
+
+ @Override
+ public EditPart getTargetEditPart(Request request) {
+ if (understandsRequest(request)) {
+ return getHost();
+ }
+ return super.getTargetEditPart(request);
+ }
+
+ /**
+ * Get the snap back hint for the view.
+ *
+ * @param view
+ * the view to snap back.
+ * @return the snap back hint.
+ */
+ private String getSnapBackHint(View view) {
+
+ String diagramType = view.getDiagram().getType();
+ String parentType = ViewUtil.getViewContainer(view).getType();
+ String labelType = view.getType();
+
+ return diagramType + "_" + parentType + "-" + labelType;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/edit/policy/DefaultXYLayoutEditPolicy.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/edit/policy/DefaultXYLayoutEditPolicy.java
new file mode 100755
index 0000000..30aafed
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/edit/policy/DefaultXYLayoutEditPolicy.java
@@ -0,0 +1,116 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.gmf.diagram.common.edit.policy;
+
+import java.util.Iterator;
+
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.PrecisionPoint;
+import org.eclipse.draw2d.geometry.PrecisionRectangle;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.SnapToHelper;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.commands.SetBoundsCommand;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramRootEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.figures.LayoutHelper;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramUIMessages;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.XYLayoutWithConstrainedResizedEditPolicy;
+
+/**
+ * Avoid forcing (-1, -1) dimension in set bounds command (let the view factories deal with
+ * size initialization if needed).
+ */
+public class DefaultXYLayoutEditPolicy extends XYLayoutWithConstrainedResizedEditPolicy {
+
+ /**
+ * Called in response to a <tt>REQ_CREATE</tt> request. Returns a command
+ * to set each created element bounds and auto-size properties.
+ *
+ * @param request
+ * a create request (understands instances of {@link CreateViewRequest}).
+ * @return a command to satisfy the request; <tt>null</tt> if the request is not
+ * understood.
+ */
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ CreateViewRequest req = (CreateViewRequest) request;
+
+
+ TransactionalEditingDomain editingDomain = ((IGraphicalEditPart) getHost()).getEditingDomain();
+
+ CompositeTransactionalCommand cc = new CompositeTransactionalCommand(editingDomain, DiagramUIMessages.AddCommand_Label);
+ Iterator<?> iter = req.getViewDescriptors().iterator();
+ final Rectangle BOUNDS = (Rectangle) getConstraintFor(request);
+ boolean couldBeSnaped = request.getLocation().equals(LayoutHelper.UNDEFINED.getLocation()) && req.isSnapToEnabled();
+ while (iter.hasNext()) {
+ CreateViewRequest.ViewDescriptor viewDescriptor = (CreateViewRequest.ViewDescriptor) iter.next();
+ Rectangle rect = getBoundsOffest(req, BOUNDS, viewDescriptor);
+
+ // see bug 427129: Figures newly created via the palette should be snapped to grid if "snap to grid" is activated
+ if (couldBeSnaped) {
+ // this code fix the bug in some case...
+ int add = 0;
+ DiagramRootEditPart drep = (DiagramRootEditPart) getHost().getRoot();
+ double spacing = drep.getGridSpacing();
+ final double max_value = spacing * 20;
+ final SnapToHelper helper = (SnapToHelper) getHost().getAdapter(SnapToHelper.class);
+ if (helper != null) {
+ final LayoutHelper layoutHelper = new LayoutHelper();
+ while (add < max_value) {// we define a max value to do test
+ Rectangle LOCAL_BOUNDS = BOUNDS.getCopy();
+ LOCAL_BOUNDS.translate(add, add);
+ Rectangle tmp_rect = getBoundsOffest(req, LOCAL_BOUNDS, viewDescriptor);
+ final PrecisionRectangle resultRect = new PrecisionRectangle(tmp_rect);
+ resultRect.setWidth(-1);
+ resultRect.setHeight(-1);
+ PrecisionPoint res1 = new PrecisionPoint(tmp_rect.getLocation());
+ helper.snapPoint(request, PositionConstants.NORTH_WEST, res1.getPreciseCopy(), res1);
+ final Point pt = layoutHelper.validatePosition(getHostFigure(), resultRect.setLocation(res1));
+ if (couldBeSnaped) {
+ if (pt.equals(resultRect.getLocation())) {
+ rect.setLocation(resultRect.getLocation());
+ break;
+ } else {
+ add += spacing;
+ continue;
+ }
+ }
+ }
+ }
+ }
+ if (rect.getSize().isEmpty()) {
+ // Only set location and let the ViewFactory deal with dimension.
+ cc.compose(new SetBoundsCommand(editingDomain, DiagramUIMessages.SetLocationCommand_Label_Resize, viewDescriptor, rect.getLocation().getCopy()));
+
+ } else {
+ // Default set bounds command.
+ cc.compose(new SetBoundsCommand(editingDomain, DiagramUIMessages.SetLocationCommand_Label_Resize, viewDescriptor, rect));
+ }
+ break;
+
+ }
+
+ if (cc.reduce() == null) {
+ return null;
+ }
+ return chainGuideAttachmentCommands(request, new ICommandProxy(cc.reduce()));
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/edit/policy/ExternalLabelPrimaryDragRoleEditPolicy.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/edit/policy/ExternalLabelPrimaryDragRoleEditPolicy.java
new file mode 100755
index 0000000..0b30513
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/edit/policy/ExternalLabelPrimaryDragRoleEditPolicy.java
@@ -0,0 +1,93 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.gmf.diagram.common.edit.policy;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.geometry.PrecisionRectangle;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.handles.MoveHandle;
+import org.eclipse.gef.requests.ChangeBoundsRequest;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.commands.SetBoundsCommand;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.LabelEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.NonResizableLabelEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramUIMessages;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusLabelEditPart;
+
+/**
+ * This policy provides the selection handles, feedback and move command for
+ * external node label.
+ * The expected behavior is to provide an external label that can freely move and with a link feedback
+ * towards its parent figure during the move.
+ */
+public class ExternalLabelPrimaryDragRoleEditPolicy extends NonResizableLabelEditPolicy {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected List createSelectionHandles() {
+ MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ mh.setBorder(null);
+ return Collections.singletonList(mh);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getMoveCommand(ChangeBoundsRequest request) {
+ LabelEditPart editPart = (LabelEditPart) getHost();
+
+ // FeedBack - Parent + Delta
+ Rectangle updatedRect = new Rectangle();
+ PrecisionRectangle initialRect = new PrecisionRectangle(getInitialFeedbackBounds().getCopy());
+ updatedRect = initialRect.getTranslated(getHostFigure().getParent().getBounds().getLocation().getNegated());
+ updatedRect = updatedRect.getTranslated(request.getMoveDelta());
+
+ // translate the feedback figure
+ PrecisionRectangle rect = new PrecisionRectangle(getInitialFeedbackBounds().getCopy());
+ getHostFigure().translateToAbsolute(rect);
+ rect.translate(request.getMoveDelta());
+ rect.resize(request.getSizeDelta());
+ getHostFigure().translateToRelative(rect);
+
+ // translate according to the text alignments
+ if (editPart instanceof PapyrusLabelEditPart) {
+ switch (((PapyrusLabelEditPart) editPart).getTextAlignment()) {
+ case PositionConstants.LEFT:
+ break;
+ case PositionConstants.CENTER:
+ updatedRect.translate(getHostFigure().getBounds().width / 2, 0);
+ break;
+ case PositionConstants.RIGHT:
+ updatedRect.translate(getHostFigure().getBounds().width, 0);
+ break;
+ default:
+ break;
+ }
+ }
+
+ ICommand moveCommand = new SetBoundsCommand(editPart.getEditingDomain(), DiagramUIMessages.MoveLabelCommand_Label_Location, new EObjectAdapter((View) editPart.getModel()), updatedRect);
+ return new ICommandProxy(moveCommand);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/edit/policy/ILinkMappingHelper.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/edit/policy/ILinkMappingHelper.java
new file mode 100755
index 0000000..445f045
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/edit/policy/ILinkMappingHelper.java
@@ -0,0 +1,39 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.gmf.diagram.common.edit.policy;
+
+/**
+ * Interface to map links at semantic level.
+ */
+@Deprecated
+public interface ILinkMappingHelper extends org.eclipse.papyrus.uml.diagram.common.helper.ILinkMappingHelper {
+
+ // /**
+ // * Get the sources.
+ // *
+ // * @param link
+ // * the link.
+ // * @return the sources.
+ // */
+ // public Collection<?> getSource(EObject link);
+ //
+ // /**
+ // * Get the targets.
+ // *
+ // * @param link
+ // * the link.
+ // * @return the targets.
+ // */
+ // public Collection<?> getTarget(EObject link);
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/edit/policy/LabelDefaultSemanticEditPolicy.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/edit/policy/LabelDefaultSemanticEditPolicy.java
new file mode 100755
index 0000000..2eaea78
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/edit/policy/LabelDefaultSemanticEditPolicy.java
@@ -0,0 +1,85 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.gmf.diagram.common.edit.policy;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DuplicateElementsRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.MoveRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
+
+/**
+ * Semantic edit policy for label (affixed labels mainly), that allow correct destroy,
+ * but forbid other edit actions.
+ */
+public class LabelDefaultSemanticEditPolicy extends DefaultSemanticEditPolicy {
+
+ @Override
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ return super.getDestroyElementCommand(req);
+ }
+
+ @Override
+ protected Command getConfigureCommand(ConfigureRequest req) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ @Override
+ protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateElementRequest req) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ @Override
+ protected Command getSetCommand(SetRequest req) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ @Override
+ protected Command getDestroyReferenceCommand(DestroyReferenceRequest req) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ @Override
+ protected Command getDuplicateCommand(DuplicateElementsRequest req) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ @Override
+ protected Command getMoveCommand(MoveRequest req) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ @Override
+ protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ @Override
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
+ return UnexecutableCommand.INSTANCE;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/edit/policy/LabelDirectEditPolicy.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/edit/policy/LabelDirectEditPolicy.java
new file mode 100755
index 0000000..41e6046
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/edit/policy/LabelDirectEditPolicy.java
@@ -0,0 +1,115 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.gmf.diagram.common.edit.policy;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.DirectEditPolicy;
+import org.eclipse.gef.requests.DirectEditRequest;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.gef.ui.internal.parts.TextCellEditorEx;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.gmf.diagram.common.edit.part.ITextAwareEditPart;
+
+/**
+ * Overrides {@link org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy} in
+ * order to pass parser options to the method that returns the modification command.
+ * (always pass 0 - ParserOptions.NONE in the original class).
+ *
+ * Also this uses (or tries to) the EObject given by {@link org.eclipse.papyrus.gmf.diagram.common.edit.part.ITextAwareEditPart#getParserElement()} to
+ * get the edit command instead of using the EObject associated to the edited edit part.
+ */
+public class LabelDirectEditPolicy extends org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy {
+
+ /**
+ * We need an adapter that will be able to hold both a model
+ * and an view
+ */
+ class EObjectAdapterEx extends EObjectAdapter {
+
+ private View view = null;
+
+ /**
+ * constructor
+ *
+ * @param element
+ * element to be wrapped
+ * @param view
+ * view to be wrapped
+ */
+ public EObjectAdapterEx(EObject element, View view) {
+ super(element);
+ this.view = view;
+ }
+
+ @Override
+ @SuppressWarnings("rawtypes")
+ public Object getAdapter(Class adapter) {
+ Object o = super.getAdapter(adapter);
+ if (o != null) {
+ return o;
+ }
+ if (adapter.equals(View.class)) {
+ return view;
+ }
+ return null;
+ }
+ }
+
+ /**
+ * @see DirectEditPolicy#getDirectEditCommand(DirectEditRequest)
+ */
+ @Override
+ protected Command getDirectEditCommand(DirectEditRequest edit) {
+ if (edit.getCellEditor() instanceof TextCellEditorEx) {
+ if (!((TextCellEditorEx) edit.getCellEditor()).hasValueChanged()) {
+ return null;
+ }
+ }
+
+ String labelText = (String) edit.getCellEditor().getValue();
+
+ // for CellEditor, null is always returned for invalid values
+ if (labelText == null) {
+ return null;
+ }
+
+ // Papyrus - using org.eclipse.papyrus.gmf.diagram.common.edit.part.ITextAwareEditPart here
+ ITextAwareEditPart compartment = (ITextAwareEditPart) getHost();
+ EObjectAdapter elementAdapter = new EObjectAdapterEx(compartment.getParserElement(), null);
+ //
+
+ // Papyrus - elementAdapter created with compartment.getParserElement(), no need to use the view here.
+ // EObject model = (EObject)compartment.getModel();
+ // EObjectAdapter elementAdapter = null;
+ // if(model instanceof View) {
+ // View view = (View)model;
+ // elementAdapter = new EObjectAdapterEx(ViewUtil.resolveSemanticElement(view), view);
+ // } else
+ // elementAdapter = new EObjectAdapterEx(model, null);
+
+ // check to make sure an edit has occurred before returning a command.
+ String prevText = compartment.getParser().getEditString(elementAdapter, compartment.getParserOptions().intValue());
+ if (!prevText.equals(labelText)) {
+ ICommand iCommand = compartment.getParser().getParseCommand(elementAdapter, labelText, compartment.getParserOptions().intValue());
+ // Papyrus - use parser options to build command
+ // compartment.getParser().getParseCommand(elementAdapter, labelText, 0);
+ return new ICommandProxy(iCommand);
+ }
+
+ return null;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/edit/policy/LinkLabelDragEditPolicy.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/edit/policy/LinkLabelDragEditPolicy.java
new file mode 100755
index 0000000..3ba01b4
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/edit/policy/LinkLabelDragEditPolicy.java
@@ -0,0 +1,42 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.gmf.diagram.common.edit.policy;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.handles.MoveHandle;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.NonResizableLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+
+/**
+ * Abstract non-diagram specific drag edit policy for link labels.
+ * This class is adapted from edit parts generated by GMF Tooling.
+ * Deprecated: use {@link PapyrusLinkLabelDragPolicy} instead.
+ */
+@Deprecated
+public class LinkLabelDragEditPolicy extends NonResizableLabelEditPolicy {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ @SuppressWarnings("rawtypes")
+ protected List createSelectionHandles() {
+ MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ mh.setBorder(null);
+ return Collections.singletonList(mh);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/edit/policy/TextNonResizableEditPolicy.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/edit/policy/TextNonResizableEditPolicy.java
new file mode 100755
index 0000000..766f156
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/edit/policy/TextNonResizableEditPolicy.java
@@ -0,0 +1,211 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.gmf.diagram.common.edit.policy;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ColorConstants;
+import org.eclipse.draw2d.Figure;
+import org.eclipse.draw2d.FigureListener;
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.Label;
+import org.eclipse.draw2d.RectangleFigure;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.handles.MoveHandle;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.NonResizableEditPolicyEx;
+import org.eclipse.gmf.runtime.diagram.ui.tools.DragEditPartsTrackerEx;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+
+/**
+ * Non diagram-specific class generated by GMF Tooling.
+ */
+public class TextNonResizableEditPolicy extends NonResizableEditPolicyEx {
+
+ private IFigure selectionFeedbackFigure;
+
+ private IFigure focusFeedbackFigure;
+
+ private FigureListener hostPositionListener;
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void showPrimarySelection() {
+ if (getHostFigure() instanceof WrappingLabel) {
+ ((WrappingLabel) getHostFigure()).setSelected(true);
+ ((WrappingLabel) getHostFigure()).setFocus(true);
+ } else {
+ showSelection();
+ showFocus();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void showSelection() {
+ if (getHostFigure() instanceof WrappingLabel) {
+ ((WrappingLabel) getHostFigure()).setSelected(true);
+ ((WrappingLabel) getHostFigure()).setFocus(false);
+ } else {
+ hideSelection();
+ addFeedback(selectionFeedbackFigure = createSelectionFeedbackFigure());
+ getHostFigure().addFigureListener(getHostPositionListener());
+ refreshSelectionFeedback();
+ hideFocus();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void hideSelection() {
+ if (getHostFigure() instanceof WrappingLabel) {
+ ((WrappingLabel) getHostFigure()).setSelected(false);
+ ((WrappingLabel) getHostFigure()).setFocus(false);
+ } else {
+ if (selectionFeedbackFigure != null) {
+ removeFeedback(selectionFeedbackFigure);
+ getHostFigure().removeFigureListener(getHostPositionListener());
+ selectionFeedbackFigure = null;
+ }
+ hideFocus();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void showFocus() {
+ if (getHostFigure() instanceof WrappingLabel) {
+ ((WrappingLabel) getHostFigure()).setFocus(true);
+ } else {
+ hideFocus();
+ addFeedback(focusFeedbackFigure = createFocusFeedbackFigure());
+ refreshFocusFeedback();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void hideFocus() {
+ if (getHostFigure() instanceof WrappingLabel) {
+ ((WrappingLabel) getHostFigure()).setFocus(false);
+ } else {
+ if (focusFeedbackFigure != null) {
+ removeFeedback(focusFeedbackFigure);
+ focusFeedbackFigure = null;
+ }
+ }
+ }
+
+ protected Rectangle getFeedbackBounds() {
+ Rectangle bounds;
+ if (getHostFigure() instanceof Label) {
+ bounds = ((Label) getHostFigure()).getTextBounds();
+ bounds.intersect(getHostFigure().getBounds());
+ } else {
+ bounds = getHostFigure().getBounds().getCopy();
+ }
+ getHostFigure().getParent().translateToAbsolute(bounds);
+ getFeedbackLayer().translateToRelative(bounds);
+ return bounds;
+ }
+
+ protected IFigure createSelectionFeedbackFigure() {
+ if (getHostFigure() instanceof Label) {
+ Label feedbackFigure = new Label();
+ feedbackFigure.setOpaque(true);
+ feedbackFigure.setBackgroundColor(ColorConstants.menuBackgroundSelected);
+ feedbackFigure.setForegroundColor(ColorConstants.menuForegroundSelected);
+ return feedbackFigure;
+ } else {
+ RectangleFigure feedbackFigure = new RectangleFigure();
+ feedbackFigure.setFill(false);
+ return feedbackFigure;
+ }
+ }
+
+ protected IFigure createFocusFeedbackFigure() {
+ return new Figure() {
+
+ @Override
+ protected void paintFigure(Graphics graphics) {
+ graphics.drawFocus(getBounds().getResized(-1, -1));
+ }
+ };
+ }
+
+ protected void updateLabel(Label target) {
+ Label source = (Label) getHostFigure();
+ target.setText(source.getText());
+ target.setTextAlignment(source.getTextAlignment());
+ target.setFont(source.getFont());
+ }
+
+ protected void refreshSelectionFeedback() {
+ if (selectionFeedbackFigure != null) {
+ if (selectionFeedbackFigure instanceof Label) {
+ updateLabel((Label) selectionFeedbackFigure);
+ selectionFeedbackFigure.setBounds(getFeedbackBounds());
+ } else {
+ selectionFeedbackFigure.setBounds(getFeedbackBounds().expand(5, 5));
+ }
+ }
+ }
+
+ protected void refreshFocusFeedback() {
+ if (focusFeedbackFigure != null) {
+ focusFeedbackFigure.setBounds(getFeedbackBounds());
+ }
+ }
+
+ public void refreshFeedback() {
+ refreshSelectionFeedback();
+ refreshFocusFeedback();
+ }
+
+ private FigureListener getHostPositionListener() {
+ if (hostPositionListener == null) {
+ hostPositionListener = new FigureListener() {
+
+ @Override
+ public void figureMoved(IFigure source) {
+ refreshFeedback();
+ }
+ };
+ }
+ return hostPositionListener;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected List createSelectionHandles() {
+ MoveHandle moveHandle = new MoveHandle((GraphicalEditPart) getHost());
+ moveHandle.setBorder(null);
+ moveHandle.setDragTracker(new DragEditPartsTrackerEx(getHost()));
+ return Collections.singletonList(moveHandle);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/edit/policy/TextSelectionEditPolicy.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/edit/policy/TextSelectionEditPolicy.java
new file mode 100755
index 0000000..9952e69
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/edit/policy/TextSelectionEditPolicy.java
@@ -0,0 +1,194 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.gmf.diagram.common.edit.policy;
+
+import org.eclipse.draw2d.ColorConstants;
+import org.eclipse.draw2d.Figure;
+import org.eclipse.draw2d.FigureListener;
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.Label;
+import org.eclipse.draw2d.RectangleFigure;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.editpolicies.SelectionEditPolicy;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+
+/**
+ * Non diagram-specific class generated by GMF Tooling.
+ */
+public class TextSelectionEditPolicy extends SelectionEditPolicy {
+
+ private IFigure selectionFeedbackFigure;
+
+ private IFigure focusFeedbackFigure;
+
+ private FigureListener hostPositionListener;
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void showPrimarySelection() {
+ if (getHostFigure() instanceof WrappingLabel) {
+ ((WrappingLabel) getHostFigure()).setSelected(true);
+ ((WrappingLabel) getHostFigure()).setFocus(true);
+ } else {
+ showSelection();
+ showFocus();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void showSelection() {
+ if (getHostFigure() instanceof WrappingLabel) {
+ ((WrappingLabel) getHostFigure()).setSelected(true);
+ ((WrappingLabel) getHostFigure()).setFocus(false);
+ } else {
+ hideSelection();
+ addFeedback(selectionFeedbackFigure = createSelectionFeedbackFigure());
+ getHostFigure().addFigureListener(getHostPositionListener());
+ refreshSelectionFeedback();
+ hideFocus();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void hideSelection() {
+ if (getHostFigure() instanceof WrappingLabel) {
+ ((WrappingLabel) getHostFigure()).setSelected(false);
+ ((WrappingLabel) getHostFigure()).setFocus(false);
+ } else {
+ if (selectionFeedbackFigure != null) {
+ removeFeedback(selectionFeedbackFigure);
+ getHostFigure().removeFigureListener(getHostPositionListener());
+ selectionFeedbackFigure = null;
+ }
+ hideFocus();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void showFocus() {
+ if (getHostFigure() instanceof WrappingLabel) {
+ ((WrappingLabel) getHostFigure()).setFocus(true);
+ } else {
+ hideFocus();
+ addFeedback(focusFeedbackFigure = createFocusFeedbackFigure());
+ refreshFocusFeedback();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void hideFocus() {
+ if (getHostFigure() instanceof WrappingLabel) {
+ ((WrappingLabel) getHostFigure()).setFocus(false);
+ } else {
+ if (focusFeedbackFigure != null) {
+ removeFeedback(focusFeedbackFigure);
+ focusFeedbackFigure = null;
+ }
+ }
+ }
+
+ protected Rectangle getFeedbackBounds() {
+ Rectangle bounds;
+ if (getHostFigure() instanceof Label) {
+ bounds = ((Label) getHostFigure()).getTextBounds();
+ bounds.intersect(getHostFigure().getBounds());
+ } else {
+ bounds = getHostFigure().getBounds().getCopy();
+ }
+ getHostFigure().getParent().translateToAbsolute(bounds);
+ getFeedbackLayer().translateToRelative(bounds);
+ return bounds;
+ }
+
+ protected IFigure createSelectionFeedbackFigure() {
+ if (getHostFigure() instanceof Label) {
+ Label feedbackFigure = new Label();
+ feedbackFigure.setOpaque(true);
+ feedbackFigure.setBackgroundColor(ColorConstants.menuBackgroundSelected);
+ feedbackFigure.setForegroundColor(ColorConstants.menuForegroundSelected);
+ return feedbackFigure;
+ } else {
+ RectangleFigure feedbackFigure = new RectangleFigure();
+ feedbackFigure.setFill(false);
+ return feedbackFigure;
+ }
+ }
+
+ protected IFigure createFocusFeedbackFigure() {
+ return new Figure() {
+
+ @Override
+ protected void paintFigure(Graphics graphics) {
+ graphics.drawFocus(getBounds().getResized(-1, -1));
+ }
+ };
+ }
+
+ protected void updateLabel(Label target) {
+ Label source = (Label) getHostFigure();
+ target.setText(source.getText());
+ target.setTextAlignment(source.getTextAlignment());
+ target.setFont(source.getFont());
+ }
+
+ protected void refreshSelectionFeedback() {
+ if (selectionFeedbackFigure != null) {
+ if (selectionFeedbackFigure instanceof Label) {
+ updateLabel((Label) selectionFeedbackFigure);
+ selectionFeedbackFigure.setBounds(getFeedbackBounds());
+ } else {
+ selectionFeedbackFigure.setBounds(getFeedbackBounds().expand(5, 5));
+ }
+ }
+ }
+
+ protected void refreshFocusFeedback() {
+ if (focusFeedbackFigure != null) {
+ focusFeedbackFigure.setBounds(getFeedbackBounds());
+ }
+ }
+
+ public void refreshFeedback() {
+ refreshSelectionFeedback();
+ refreshFocusFeedback();
+ }
+
+ private FigureListener getHostPositionListener() {
+ if (hostPositionListener == null) {
+ hostPositionListener = new FigureListener() {
+
+ @Override
+ public void figureMoved(IFigure source) {
+ refreshFeedback();
+ }
+ };
+ }
+ return hostPositionListener;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/factory/AbstractLabelViewFactory.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/factory/AbstractLabelViewFactory.java
new file mode 100755
index 0000000..3ba1890
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/factory/AbstractLabelViewFactory.java
@@ -0,0 +1,32 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.gmf.diagram.common.factory;
+
+import org.eclipse.gmf.runtime.diagram.ui.view.factories.optimal.DecorationNodeViewFactory;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.providers.ThemeInitializerManager;
+
+/**
+ * Default view Factory for Papyrus custom labels.
+ */
+public abstract class AbstractLabelViewFactory extends DecorationNodeViewFactory {
+
+ @Override
+ protected void initializeFromPreferences(View view) {
+ // Do not call initializeFromPreferences when the preference initializer is disabled (Typical use case: CSS are installed)
+ if (ThemeInitializerManager.instance.usePreferenceInitializer(view)) {
+ super.initializeFromPreferences(view);
+ }
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/factory/AffixedLabelViewFactory.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/factory/AffixedLabelViewFactory.java
new file mode 100755
index 0000000..1a458a7
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/factory/AffixedLabelViewFactory.java
@@ -0,0 +1,52 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.gmf.diagram.common.factory;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.LayoutConstraint;
+import org.eclipse.gmf.runtime.notation.NotationFactory;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
+
+/**
+ * Default view Factory for Papyrus custom affixed labels.
+ */
+public class AffixedLabelViewFactory extends AbstractLabelViewFactory {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected LayoutConstraint createLayoutConstraint() {
+ return NotationFactory.eINSTANCE.createLocation();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void initializeFromPreferences(View view) {
+
+ super.initializeFromPreferences(view);
+
+ IPreferenceStore store = (IPreferenceStore) getPreferencesHint().getPreferenceStore();
+ if (store == null) {
+ return;
+ }
+
+ String preferenceKey = ViewUtil.getViewContainer(view).getType() + "-" + view.getType();
+ PreferenceInitializerForElementHelper.initLabelLocationFromPrefs(view, store, preferenceKey);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/factory/CompartmentListViewFactory.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/factory/CompartmentListViewFactory.java
new file mode 100755
index 0000000..cd23139
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/factory/CompartmentListViewFactory.java
@@ -0,0 +1,33 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.gmf.diagram.common.factory;
+
+import org.eclipse.gmf.runtime.diagram.ui.view.factories.ListCompartmentViewFactory;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.NotationFactory;
+
+/**
+ * Default compartment view Factory for custom list compartments.
+ */
+public class CompartmentListViewFactory extends ListCompartmentViewFactory {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Node createNode() {
+ return NotationFactory.eINSTANCE.createListCompartment();
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/factory/CompartmentShapeViewFactory.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/factory/CompartmentShapeViewFactory.java
new file mode 100755
index 0000000..9fd448a
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/factory/CompartmentShapeViewFactory.java
@@ -0,0 +1,37 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.gmf.diagram.common.factory;
+
+import java.util.List;
+
+import org.eclipse.gmf.runtime.diagram.ui.view.factories.optimal.BasicCompartmentViewFactory;
+import org.eclipse.gmf.runtime.notation.NotationFactory;
+import org.eclipse.gmf.runtime.notation.View;
+
+/**
+ * Default compartment view Factory for custom shape compartments.
+ */
+public class CompartmentShapeViewFactory extends BasicCompartmentViewFactory {
+
+ /**
+ * {@inheritDoc}
+ */
+ @SuppressWarnings({ "rawtypes", "unchecked" })
+ @Override
+ protected List createStyles(View view) {
+ List styles = super.createStyles(view);
+ styles.add(NotationFactory.eINSTANCE.createTitleStyle());
+ return styles;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/factory/ConnectorLabelViewFactory.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/factory/ConnectorLabelViewFactory.java
new file mode 100755
index 0000000..eb1e0ea
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/factory/ConnectorLabelViewFactory.java
@@ -0,0 +1,52 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.gmf.diagram.common.factory;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.LayoutConstraint;
+import org.eclipse.gmf.runtime.notation.NotationFactory;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
+
+/**
+ * Default view Factory for Papyrus custom affixed labels.
+ */
+public class ConnectorLabelViewFactory extends AbstractLabelViewFactory {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected LayoutConstraint createLayoutConstraint() {
+ return NotationFactory.eINSTANCE.createLocation();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void initializeFromPreferences(View view) {
+
+ super.initializeFromPreferences(view);
+
+ IPreferenceStore store = (IPreferenceStore) getPreferencesHint().getPreferenceStore();
+ if (store == null) {
+ return;
+ }
+
+ String preferenceKey = ViewUtil.getViewContainer(view).getType() + "-" + view.getType();
+ PreferenceInitializerForElementHelper.initLabelLocationFromPrefs(view, store, preferenceKey);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/factory/ConnectorViewFactory.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/factory/ConnectorViewFactory.java
new file mode 100755
index 0000000..7386f3f
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/factory/ConnectorViewFactory.java
@@ -0,0 +1,62 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.gmf.diagram.common.factory;
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.gmf.runtime.notation.NotationFactory;
+import org.eclipse.gmf.runtime.notation.Style;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.providers.ThemeInitializerManager;
+import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
+
+/**
+ * Default connector view Factory for Papyrus custom edges.
+ */
+public class ConnectorViewFactory extends org.eclipse.gmf.runtime.diagram.ui.view.factories.optimal.ConnectorViewFactory {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected List createStyles(View view) {
+ return Arrays.asList(new Style[] { NotationFactory.eINSTANCE.createFontStyle() });
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void initializeFromPreferences(View view) {
+ // Do not call initializeFromPreferences when the preference initializer is disabled (Typical use case: CSS are installed)
+ if (ThemeInitializerManager.instance.usePreferenceInitializer(view)) {
+ super.initializeFromPreferences(view);
+ }
+
+ IPreferenceStore store = (IPreferenceStore) getPreferencesHint().getPreferenceStore();
+ if (store == null) {
+ return;
+ }
+
+ // The PreferenceInitializerForElementHelper already checks for usePreferenceInitializer() (When required)
+ String elementName = view.getType();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(view, store, elementName);
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(view, store, elementName);
+ PreferenceInitializerForElementHelper.initRoutingFromPrefs(view, store, elementName);
+ PreferenceInitializerForElementHelper.initLabelVisibilityFromPrefs(view, store, elementName);
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/factory/InnerLabelViewFactory.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/factory/InnerLabelViewFactory.java
new file mode 100755
index 0000000..c4d0a29
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/factory/InnerLabelViewFactory.java
@@ -0,0 +1,21 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.gmf.diagram.common.factory;
+
+/**
+ * Default label view Factory for Papyrus custom inner labels.
+ */
+public class InnerLabelViewFactory extends AbstractLabelViewFactory {
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/factory/ShapeChildLabelViewFactory.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/factory/ShapeChildLabelViewFactory.java
new file mode 100755
index 0000000..3a2c5a7
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/factory/ShapeChildLabelViewFactory.java
@@ -0,0 +1,59 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.gmf.diagram.common.factory;
+
+import org.eclipse.gmf.runtime.diagram.ui.view.factories.AbstractShapeViewFactory;
+import org.eclipse.gmf.runtime.notation.LayoutConstraint;
+import org.eclipse.gmf.runtime.notation.NotationFactory;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.providers.ThemeInitializerManager;
+import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
+
+/**
+ * Default Shape view Factory for Papyrus custom child label nodes.
+ */
+public class ShapeChildLabelViewFactory extends AbstractShapeViewFactory {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected LayoutConstraint createLayoutConstraint() {
+ return NotationFactory.eINSTANCE.createLocation();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void initializeFromPreferences(View view) {
+ // Do not call initializeFromPreferences when the preference initializer is disabled (Typical use case: CSS are installed)
+ if (ThemeInitializerManager.instance.usePreferenceInitializer(view)) {
+ super.initializeFromPreferences(view);
+ }
+
+ IPreferenceStore store = (IPreferenceStore) getPreferencesHint().getPreferenceStore();
+ if (store == null) {
+ return;
+ }
+
+ // The PreferenceInitializerForElementHelper already checks for usePreferenceInitializer() (When required)
+ String preferenceKey = view.getType();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(view, store, preferenceKey);
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(view, store, preferenceKey);
+
+ PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(view, store, preferenceKey);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/factory/ShapeViewFactory.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/factory/ShapeViewFactory.java
new file mode 100755
index 0000000..78669c3
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/factory/ShapeViewFactory.java
@@ -0,0 +1,59 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.gmf.diagram.common.factory;
+
+import org.eclipse.gmf.runtime.notation.NotationFactory;
+import org.eclipse.gmf.runtime.notation.Shape;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.providers.ThemeInitializerManager;
+import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
+
+/**
+ * Default Shape view Factory for Papyrus custom nodes.
+ */
+public class ShapeViewFactory extends org.eclipse.gmf.runtime.diagram.ui.view.factories.optimal.ShapeViewFactory {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Shape createNode() {
+ return NotationFactory.eINSTANCE.createShape();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void initializeFromPreferences(View view) {
+ // Do not call initializeFromPreferences when the preference initializer is disabled (Typical use case: CSS are installed)
+ if (ThemeInitializerManager.instance.usePreferenceInitializer(view)) {
+ super.initializeFromPreferences(view);
+ }
+
+ IPreferenceStore store = (IPreferenceStore) getPreferencesHint().getPreferenceStore();
+ if (store == null) {
+ return;
+ }
+
+ // The PreferenceInitializerForElementHelper already checks for usePreferenceInitializer() (When required)
+ String elementName = view.getType();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(view, store, elementName);
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(view, store, elementName);
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(view, store, elementName);
+
+ PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(view, store, elementName);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/locator/CellEditorLocatorUtil.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/locator/CellEditorLocatorUtil.java
new file mode 100755
index 0000000..f057c8c
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/locator/CellEditorLocatorUtil.java
@@ -0,0 +1,36 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.gmf.diagram.common.locator;
+
+import org.eclipse.draw2d.Label;
+import org.eclipse.gef.tools.CellEditorLocator;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.IMultilineEditableFigure;
+
+/**
+ * Non diagram-specific class generated by GMF Tooling.
+ */
+public class CellEditorLocatorUtil {
+
+ public static CellEditorLocator getTextCellEditorLocator(ITextAwareEditPart source) {
+ if (source.getFigure() instanceof IMultilineEditableFigure) {
+ return new MultilineCellEditorLocator((IMultilineEditableFigure) source.getFigure());
+ } else if (source.getFigure() instanceof WrappingLabel) {
+ return new TextCellEditorLocator((WrappingLabel) source.getFigure());
+ } else {
+ return new LabelCellEditorLocator((Label) source.getFigure());
+ }
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/locator/LabelCellEditorLocator.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/locator/LabelCellEditorLocator.java
new file mode 100755
index 0000000..410406f
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/locator/LabelCellEditorLocator.java
@@ -0,0 +1,53 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.gmf.diagram.common.locator;
+
+import org.eclipse.draw2d.FigureUtilities;
+import org.eclipse.draw2d.Label;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.tools.CellEditorLocator;
+import org.eclipse.jface.viewers.CellEditor;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Text;
+
+/**
+ * Non diagram-specific class generated by GMF Tooling.
+ */
+public class LabelCellEditorLocator implements CellEditorLocator {
+
+ private Label label;
+
+ public LabelCellEditorLocator(Label label) {
+ this.label = label;
+ }
+
+ public Label getLabel() {
+ return label;
+ }
+
+ @Override
+ public void relocate(CellEditor celleditor) {
+ Text text = (Text) celleditor.getControl();
+ Rectangle rect = getLabel().getTextBounds().getCopy();
+ getLabel().translateToAbsolute(rect);
+ if (!text.getFont().isDisposed()) {
+ int avr = FigureUtilities.getFontMetrics(text.getFont()).getAverageCharWidth();
+ rect.setSize(new Dimension(text.computeSize(SWT.DEFAULT, SWT.DEFAULT)).expand(avr * 2, 0));
+ }
+ if (!rect.equals(new Rectangle(text.getBounds()))) {
+ text.setBounds(rect.x, rect.y, rect.width, rect.height);
+ }
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/locator/MultilineCellEditorLocator.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/locator/MultilineCellEditorLocator.java
new file mode 100755
index 0000000..c3cb6a6
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/locator/MultilineCellEditorLocator.java
@@ -0,0 +1,53 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.gmf.diagram.common.locator;
+
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.tools.CellEditorLocator;
+import org.eclipse.jface.viewers.CellEditor;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.IMultilineEditableFigure;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Text;
+
+/**
+ * Non diagram-specific class generated by GMF Tooling.
+ */
+public class MultilineCellEditorLocator implements CellEditorLocator {
+
+ private IMultilineEditableFigure multilineEditableFigure;
+
+ public MultilineCellEditorLocator(IMultilineEditableFigure figure) {
+ this.multilineEditableFigure = figure;
+ }
+
+ public IMultilineEditableFigure getMultilineEditableFigure() {
+ return multilineEditableFigure;
+ }
+
+ @Override
+ public void relocate(CellEditor celleditor) {
+ Text text = (Text) celleditor.getControl();
+ Rectangle rect = getMultilineEditableFigure().getBounds().getCopy();
+ rect.x = getMultilineEditableFigure().getEditionLocation().x;
+ rect.y = getMultilineEditableFigure().getEditionLocation().y;
+ getMultilineEditableFigure().translateToAbsolute(rect);
+ if (getMultilineEditableFigure().getText().length() > 0) {
+ rect.setSize(new Dimension(text.computeSize(rect.width, SWT.DEFAULT)));
+ }
+ if (!rect.equals(new Rectangle(text.getBounds()))) {
+ text.setBounds(rect.x, rect.y, rect.width, rect.height);
+ }
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/locator/TextCellEditorLocator.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/locator/TextCellEditorLocator.java
new file mode 100755
index 0000000..1a4a7d5
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/locator/TextCellEditorLocator.java
@@ -0,0 +1,57 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.gmf.diagram.common.locator;
+
+import org.eclipse.draw2d.FigureUtilities;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.tools.CellEditorLocator;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.jface.viewers.CellEditor;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Text;
+
+/**
+ * Non diagram-specific class generated by GMF Tooling.
+ */
+public class TextCellEditorLocator implements CellEditorLocator {
+
+ private WrappingLabel wrapLabel;
+
+ public TextCellEditorLocator(WrappingLabel wrapLabel) {
+ this.wrapLabel = wrapLabel;
+ }
+
+ public WrappingLabel getWrapLabel() {
+ return wrapLabel;
+ }
+
+ @Override
+ public void relocate(CellEditor celleditor) {
+ Text text = (Text) celleditor.getControl();
+ Rectangle rect = getWrapLabel().getTextBounds().getCopy();
+ getWrapLabel().translateToAbsolute(rect);
+ if (!text.getFont().isDisposed()) {
+ if (getWrapLabel().isTextWrapOn() && getWrapLabel().getText().length() > 0) {
+ rect.setSize(new Dimension(text.computeSize(rect.width, SWT.DEFAULT)));
+ } else {
+ int avr = FigureUtilities.getFontMetrics(text.getFont()).getAverageCharWidth();
+ rect.setSize(new Dimension(text.computeSize(SWT.DEFAULT, SWT.DEFAULT)).expand(avr * 2, 0));
+ }
+ }
+ if (!rect.equals(new Rectangle(text.getBounds()))) {
+ text.setBounds(rect.x, rect.y, rect.width, rect.height);
+ }
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/parser/IMaskManagedSemanticParser.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/parser/IMaskManagedSemanticParser.java
new file mode 100755
index 0000000..6513381
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/parser/IMaskManagedSemanticParser.java
@@ -0,0 +1,47 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.gmf.diagram.common.parser;
+
+import java.util.Collection;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+
+/**
+ * Interface for semantic parsers that support mask options.
+ *
+ * @deprecated since Eclipse Mars SR1. Use {@link org.eclipse.papyrus.uml.diagram.common.parser.IMaskManagedSemanticParser} instead
+ */
+@Deprecated
+public interface IMaskManagedSemanticParser extends ISemanticParser {
+
+ /** The label to show in case ParserOptions.None is passed as flag (avoid a fully masked label) */
+ public static final String MaskedLabel = "<empty label>";
+
+ /**
+ * Get the {@link Map} of masks
+ *
+ * @return the {@link Map} of masks
+ */
+ public Map<String, String> getMasks();
+
+ /**
+ * Gets the default mask configuration for this parser
+ *
+ * @return
+ * The default mask configuration for this parser
+ */
+ public Collection<String> getDefaultValue(IAdaptable element);
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/provider/AbstractViewProvider.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/provider/AbstractViewProvider.java
new file mode 100755
index 0000000..3c3d811
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/provider/AbstractViewProvider.java
@@ -0,0 +1,328 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.gmf.diagram.common.provider;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Method;
+import java.util.HashMap;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.emf.transaction.util.TransactionUtil;
+import org.eclipse.gmf.runtime.common.core.service.AbstractProvider;
+import org.eclipse.gmf.runtime.common.core.service.IOperation;
+import org.eclipse.gmf.runtime.common.core.util.Log;
+import org.eclipse.gmf.runtime.diagram.core.internal.DiagramPlugin;
+import org.eclipse.gmf.runtime.diagram.core.internal.DiagramStatusCodes;
+import org.eclipse.gmf.runtime.diagram.core.internal.l10n.DiagramCoreMessages;
+import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
+import org.eclipse.gmf.runtime.diagram.core.providers.IViewProvider;
+import org.eclipse.gmf.runtime.diagram.core.services.view.CreateDiagramViewOperation;
+import org.eclipse.gmf.runtime.diagram.core.services.view.CreateEdgeViewOperation;
+import org.eclipse.gmf.runtime.diagram.core.services.view.CreateNodeViewOperation;
+import org.eclipse.gmf.runtime.diagram.core.services.view.CreateViewForKindOperation;
+import org.eclipse.gmf.runtime.diagram.core.services.view.CreateViewOperation;
+import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * Implements of the <code>IViewProvider</code> interface. This
+ * implementations invokes the appropriate factory method by inspecting the
+ * supplied operation and provides the actual view creation functionality.
+ */
+public class AbstractViewProvider extends AbstractProvider implements IViewProvider {
+
+ private static String viewCreationMethodName = "createView"; //$NON-NLS-1$
+
+ private static String diagramCreationMethodName = "createDiagram"; //$NON-NLS-1$
+
+ static protected class ClassToCreationMethodMap extends HashMap {
+
+ static final long serialVersionUID = 1;
+
+ public void addMethod(Class clazz, Method method) {
+ if (get(clazz) == null) {
+ put(clazz, method);
+ }
+ }
+
+ public Method getCreationMethod(Class clazz) {
+ return (Method) get(clazz);
+ }
+ }
+
+ public static ClassToCreationMethodMap classToCreateMethod = new ClassToCreationMethodMap();
+
+ /**
+ * Determines whether this view provider can provide for the required
+ * operation It inspects the type of view operation and calls the
+ * corresponding <code>provides</code> method.
+ *
+ * @see org.eclipse.gmf.runtime.common.core.service.IProvider#provides(IOperation)
+ */
+ @Override
+ public final boolean provides(IOperation operation) {
+ /* if this is the CreateViewForKindOperation operation */
+ if (operation instanceof CreateViewForKindOperation) {
+ return provides((CreateViewForKindOperation) operation);
+ }
+
+ /* Make sure it is a view operation */
+ assert operation instanceof CreateViewOperation : "operation is not CreateViewOperation in AbstractViewProvider";//$NON-NLS-1$
+
+ /* call the specific provides method */
+ if (operation instanceof CreateDiagramViewOperation) {
+ return provides((CreateDiagramViewOperation) operation);
+ } else if (operation instanceof CreateEdgeViewOperation) {
+ return provides((CreateEdgeViewOperation) operation);
+ } else if (operation instanceof CreateNodeViewOperation) {
+ return provides((CreateNodeViewOperation) operation);
+ }
+ return false;
+ }
+
+ @Override
+ public final Diagram createDiagram(IAdaptable contextElement, String diagramKind, PreferencesHint preferencesHint) {
+ return (Diagram) createNewView(getDiagramViewClass(contextElement, diagramKind), new Object[] { contextElement, diagramKind, preferencesHint });
+ }
+
+ // Papyrus - final statement removed
+ @Override
+ public Edge createEdge(IAdaptable semanticAdapter, View containerView, String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) {
+
+ return (Edge) createNewView(getEdgeViewClass(semanticAdapter, containerView, semanticHint), new Object[] { semanticAdapter, containerView, semanticHint, new Integer(index), Boolean.valueOf(persisted), preferencesHint });
+ }
+
+ // Papyrus - final statement removed
+ @Override
+ public Node createNode(IAdaptable semanticAdapter, View containerView, String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) {
+
+ return (Node) createNewView(getNodeViewClass(semanticAdapter, containerView, semanticHint), new Object[] { semanticAdapter, containerView, semanticHint, new Integer(index), Boolean.valueOf(persisted), preferencesHint });
+ }
+
+ /**
+ * Determines whether this provider can provide for the specified view
+ * creation operation
+ *
+ * @param operation
+ * Contains a semantic kind and a containerView
+ * @return boolean
+ */
+ protected boolean provides(CreateViewForKindOperation op) {
+ if (op.getViewKind() == Node.class) {
+ return getNodeViewClass(op.getSemanticAdapter(), op.getContainerView(), op.getSemanticHint()) != null;
+ }
+ if (op.getViewKind() == Edge.class) {
+ return getEdgeViewClass(op.getSemanticAdapter(), op.getContainerView(), op.getSemanticHint()) != null;
+ }
+ return true;
+ }
+
+ /**
+ * Determines whether this provider can provide for the specified diagram
+ * view operation
+ *
+ * @param operation
+ * @return boolean
+ */
+ protected boolean provides(CreateDiagramViewOperation operation) {
+ return getDiagramViewClass(operation.getSemanticAdapter(), operation.getSemanticHint()) != null;
+ }
+
+ /**
+ * Determines whether this provider can provide for the specified edge view
+ * operation
+ *
+ * @param operation
+ * @return boolean
+ */
+ protected boolean provides(CreateEdgeViewOperation operation) {
+ return (getEdgeViewClass(operation.getSemanticAdapter(), operation.getContainerView(), operation.getSemanticHint()) != null);
+ }
+
+ /**
+ * Determines whether this provider can provide for the specified node view
+ * operation
+ *
+ * @param operation
+ * @return boolean
+ */
+ protected boolean provides(CreateNodeViewOperation operation) {
+ return (getNodeViewClass(operation.getSemanticAdapter(), operation.getContainerView(), operation.getSemanticHint()) != null);
+ }
+
+ /**
+ * Returns the diagram view class to instantiate based on the passed params
+ *
+ * @param semanticAdapter
+ * TODO
+ * @param semanticAdapter
+ * @return Class
+ */
+ protected Class getDiagramViewClass(IAdaptable semanticAdapter, String diagramKind) {
+ return null;
+ }
+
+ /**
+ * Returns the edge view class to instantiate based on the passed params
+ *
+ * @param semanticAdapter
+ * @param containerView
+ * @param semanticHint
+ * @return Class
+ */
+ protected Class getEdgeViewClass(IAdaptable semanticAdapter, View containerView, String semanticHint) {
+ return null;
+ }
+
+ /**
+ * Returns the node view class to instantiate based on the passed params
+ *
+ * @param semanticAdapter
+ * @param containerView
+ * @param semanticHint
+ * @return Class
+ */
+ protected Class getNodeViewClass(IAdaptable semanticAdapter, View containerView, String semanticHint) {
+ return null;
+ }
+
+ /**
+ * creates a view instance via reflection.
+ *
+ * @param constructorParams
+ * the view's constructor parameters.
+ */
+ private View createNewView(Class viewClass, Object[] constructorParams) {
+ try {
+ assert null != viewClass : "Null viewClass in AbstractProvider";//$NON-NLS-1$
+ assert null != constructorParams : "Null constructorParams in AbstractProvider";//$NON-NLS-1$
+
+ Constructor constructor = getFactoryConstructor(viewClass);
+ if (constructor == null) {
+ Log.error(DiagramPlugin.getInstance(), DiagramStatusCodes.SERVICE_FAILURE, "View (" + viewClass + ") is missing a proper creation Factory"); //$NON-NLS-1$//$NON-NLS-2$
+ return null;
+ }
+
+ Object factory = constructor.newInstance(new Object[] {});
+ Method method = getCreationMethod(viewClass, constructorParams);
+ if (method == null) {
+ Log.error(DiagramPlugin.getInstance(), DiagramStatusCodes.SERVICE_FAILURE, "View (" + viewClass + ") is missing a proper creation Factory"); //$NON-NLS-1$//$NON-NLS-2$
+ return null;
+ }
+ return (View) method.invoke(factory, constructorParams);
+ } catch (Throwable e) {
+ String eMsg = NLS.bind(DiagramCoreMessages.AbstractViewProvider_create_view_failed_ERROR_, viewClass.getName());
+ Log.warning(DiagramPlugin.getInstance(), IStatus.WARNING, eMsg, e);
+ return null;
+ }
+ }
+
+ private Constructor getFactoryConstructor(Class viewClass) {
+ if (viewClass != null) {
+ Constructor[] ctors = viewClass.getConstructors();
+ for (int i = 0; i < ctors.length; i++) {
+ if (ctors[i].getParameterTypes().length == 0) {
+ return ctors[i];
+ }
+ }
+ }
+ return null;
+ }
+
+ /** Return the <i>creation</i> constructor for the cached view class. */
+ private Method getCreationMethod(Class viewClass, Object[] params) {
+ if (viewClass != null) {
+ Method method = classToCreateMethod.getCreationMethod(viewClass);
+ if (method != null) {
+ return method;
+ }
+
+ Method[] methods = viewClass.getMethods();
+ for (int i = 0; i < methods.length; i++) {
+ method = methods[i];
+ String methodName = method.getName();
+ if (methodName.equals(viewCreationMethodName) || methodName.equals(diagramCreationMethodName)) {
+ classToCreateMethod.addMethod(viewClass, method);
+ return method;
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the EClass associated with the semantic adapter
+ *
+ * @param semanticAdapter
+ * @return EClass
+ */
+ protected EClass getSemanticEClass(IAdaptable semanticAdapter) {
+ if (semanticAdapter == null) {
+ return null;
+ }
+ EObject eObject = (EObject) semanticAdapter.getAdapter(EObject.class);
+ if (eObject != null) {
+ return EMFCoreUtil.getProxyClass(eObject);
+ }
+ IElementType type = (IElementType) semanticAdapter.getAdapter(IElementType.class);
+ if (type != null) {
+ return type.getEClass();
+ }
+ return null;
+ }
+
+ /**
+ * Returns the semantic element associated with the semantic adapter
+ *
+ * @param semanticAdapter
+ * @return EClass
+ */
+ protected EObject getSemanticElement(IAdaptable semanticAdapter) {
+ if (semanticAdapter == null) {
+ return null;
+ }
+ EObject eObject = (EObject) semanticAdapter.getAdapter(EObject.class);
+ if (eObject != null) {
+ return EMFCoreUtil.resolve(TransactionUtil.getEditingDomain(eObject), eObject);
+ }
+ return null;
+ }
+
+ /**
+ * Returns the semantic element associated with the semantic adapter
+ *
+ * @param semanticAdapter
+ * @return EClass
+ */
+ protected EObject getSemanticElement(IAdaptable semanticAdapter, TransactionalEditingDomain domain) {
+ if (semanticAdapter == null) {
+ return null;
+ }
+ EObject eObject = (EObject) semanticAdapter.getAdapter(EObject.class);
+ if (eObject != null) {
+ return EMFCoreUtil.resolve(domain, eObject);
+ }
+ return null;
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/provider/CustomAbstractEditPartProvider.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/provider/CustomAbstractEditPartProvider.java
new file mode 100755
index 0000000..bea81c4
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/provider/CustomAbstractEditPartProvider.java
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.gmf.diagram.common.provider;
+
+import org.eclipse.gmf.runtime.common.core.service.IOperation;
+import org.eclipse.gmf.runtime.diagram.ui.services.editpart.AbstractEditPartProvider;
+import org.eclipse.gmf.runtime.diagram.ui.services.editpart.CreateGraphicEditPartOperation;
+import org.eclipse.gmf.runtime.diagram.ui.services.editpart.IEditPartOperation;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ModelEditPart;
+
+/**
+ * This abstract edit part provider restricts its contribution to view that are owned by
+ * a given type of diagram.
+ */
+public abstract class CustomAbstractEditPartProvider extends AbstractEditPartProvider {
+
+ /** The provides only provides for this diagram type */
+ protected String diagramType= org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ModelEditPart.MODEL_ID;
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean provides(IOperation operation) {
+ if (operation instanceof CreateGraphicEditPartOperation) {
+ String currentDiagramType = ((IEditPartOperation) operation).getView().getDiagram().getType();
+
+ if ((diagramType == null) || (!diagramType.equals(currentDiagramType))) {
+ return false;
+ }
+ }
+
+ return super.provides(operation);
+ }
+
+
+
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/provider/CustomAbstractViewProvider.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/provider/CustomAbstractViewProvider.java
new file mode 100755
index 0000000..8958a36
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/provider/CustomAbstractViewProvider.java
@@ -0,0 +1,154 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.gmf.diagram.common.provider;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
+import org.eclipse.gmf.runtime.diagram.core.services.view.CreateEdgeViewOperation;
+import org.eclipse.gmf.runtime.diagram.core.services.view.CreateNodeViewOperation;
+import org.eclipse.gmf.runtime.diagram.core.services.view.CreateViewForKindOperation;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.View;
+
+/**
+ * This abstract view provider retrieve the view type from the graphical type
+ * registry and use it in edge and node view creation.
+ */
+public abstract class CustomAbstractViewProvider extends AbstractViewProvider {
+
+ /** Local graphical type registry */
+ protected IGraphicalTypeRegistry registry;
+
+ /** The provides only provides for this diagram type */
+ protected String diagramType;
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Edge createEdge(IAdaptable semanticAdapter, View containerView, String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) {
+ String graphicalType = getEdgeGraphicalType(semanticAdapter, containerView, semanticHint);
+ return super.createEdge(semanticAdapter, containerView, graphicalType, index, persisted, preferencesHint);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Node createNode(IAdaptable semanticAdapter, View containerView, String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) {
+ String graphicalType = getNodeGraphicalType(semanticAdapter, containerView, semanticHint);
+ return super.createNode(semanticAdapter, containerView, graphicalType, index, persisted, preferencesHint);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected boolean provides(CreateViewForKindOperation op) {
+
+ // This method should generally not be called (https://bugs.eclipse.org/bugs/show_bug.cgi?id=346739).
+
+ if ((diagramType == null) || (!diagramType.equals(op.getContainerView().getDiagram().getType()))) {
+ return false;
+ }
+
+ // if(op.getViewKind() == Node.class) {
+ // String graphicalType = getNodeGraphicalType(op.getSemanticAdapter(), op.getContainerView(), op.getSemanticHint());
+ // return getNodeViewClass(op.getSemanticAdapter(), op.getContainerView(), graphicalType) != null;
+ // }
+ //
+ // if(op.getViewKind() == Edge.class) {
+ // String graphicalType = getEdgeGraphicalType(op.getSemanticAdapter(), op.getContainerView(), op.getSemanticHint());
+ // return getEdgeViewClass(op.getSemanticAdapter(), op.getContainerView(), graphicalType) != null;
+ // }
+
+ throw new UnsupportedOperationException("Should never be called by the " + diagramType + " diagram.");
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected boolean provides(CreateEdgeViewOperation operation) {
+
+ if ((diagramType == null) || (!diagramType.equals(operation.getContainerView().getDiagram().getType()))) {
+ return false;
+ }
+
+ String graphicalType = getEdgeGraphicalType(operation.getSemanticAdapter(), operation.getContainerView(), operation.getSemanticHint());
+ return (getEdgeViewClass(operation.getSemanticAdapter(), operation.getContainerView(), graphicalType) != null);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected boolean provides(CreateNodeViewOperation operation) {
+
+ if ((diagramType == null) || (!diagramType.equals(operation.getContainerView().getDiagram().getType()))) {
+ return false;
+ }
+
+ String graphicalType = getNodeGraphicalType(operation.getSemanticAdapter(), operation.getContainerView(), operation.getSemanticHint());
+ return (getNodeViewClass(operation.getSemanticAdapter(), operation.getContainerView(), graphicalType) != null);
+ }
+
+ private String getNodeGraphicalType(IAdaptable semanticAdapter, View containerView, String semanticHint) {
+ String graphicalType = null;
+
+ // Some ViewDescriptor constructors initialize unspecified semanticHint with ""
+ if ((semanticHint != null) && (!"".equals(semanticHint))) {
+ graphicalType = registry.getNodeGraphicalType(semanticHint, containerView.getType());
+
+ } else if (semanticAdapter != null) {
+
+ EObject domainElement = (EObject) semanticAdapter.getAdapter(EObject.class);
+ if (domainElement != null) {
+ graphicalType = registry.getNodeGraphicalType(domainElement, containerView.getType());
+ }
+
+ IElementType elementType = (IElementType) semanticAdapter.getAdapter(IElementType.class);
+ if (elementType != null) {
+ graphicalType = registry.getNodeGraphicalType(elementType, containerView.getType());
+
+ }
+ }
+ return graphicalType;
+ }
+
+ private String getEdgeGraphicalType(IAdaptable semanticAdapter, View containerView, String semanticHint) {
+ String graphicalType = null;
+ // Some ViewDescriptor constructors initialize unspecified semanticHint with ""
+ if ((semanticHint != null) && (!"".equals(semanticHint))) {
+ graphicalType = registry.getEdgeGraphicalType(semanticHint);
+
+ } else {
+
+ EObject domainElement = (EObject) semanticAdapter.getAdapter(EObject.class);
+ if (domainElement != null) {
+ graphicalType = registry.getEdgeGraphicalType(domainElement);
+ }
+
+ IElementType elementType = (IElementType) semanticAdapter.getAdapter(IElementType.class);
+ if (elementType != null) {
+ graphicalType = registry.getEdgeGraphicalType(elementType);
+
+ }
+ }
+ return graphicalType;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/provider/DiagramEditorUtil.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/provider/DiagramEditorUtil.java
new file mode 100755
index 0000000..948e40f
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/provider/DiagramEditorUtil.java
@@ -0,0 +1,42 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.gmf.diagram.common.provider;
+
+import java.util.List;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IPrimaryEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramWorkbenchPart;
+
+/**
+ * Non diagram-specific class generated by GMF Tooling.
+ */
+public class DiagramEditorUtil {
+
+ public static void selectElementsInDiagram(IDiagramWorkbenchPart diagramPart, List<EditPart> editParts) {
+ diagramPart.getDiagramGraphicalViewer().deselectAll();
+
+ EditPart firstPrimary = null;
+ for (EditPart nextPart : editParts) {
+ diagramPart.getDiagramGraphicalViewer().appendSelection(nextPart);
+ if (firstPrimary == null && nextPart instanceof IPrimaryEditPart) {
+ firstPrimary = nextPart;
+ }
+ }
+
+ if (!editParts.isEmpty()) {
+ diagramPart.getDiagramGraphicalViewer().reveal(firstPrimary != null ? firstPrimary : (EditPart) editParts.get(0));
+ }
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/provider/ElementTypeLabelProvider.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/provider/ElementTypeLabelProvider.java
new file mode 100755
index 0000000..421bcc1
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/provider/ElementTypeLabelProvider.java
@@ -0,0 +1,55 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.gmf.diagram.common.provider;
+
+import org.eclipse.gmf.runtime.common.ui.services.icon.IconService;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.graphics.Image;
+
+/**
+ * A label provider that provides the name and image for <code>IElementType</code> objects.
+ *
+ * @author cmahoney
+ */
+public class ElementTypeLabelProvider extends LabelProvider {
+
+ /**
+ * Retrieves the image for <code>IElementType</code> objects using
+ * the <code>IconService</code>.
+ *
+ * @see org.eclipse.jface.viewers.ILabelProvider#getImage(java.lang.Object)
+ */
+ @Override
+ public Image getImage(Object object) {
+ if (object instanceof IElementType) {
+ return IconService.getInstance().getIcon((IElementType) object);
+ }
+ return null;
+ }
+
+ /**
+ * Uses <code>IElementType.getDisplayName()</code> for the text.
+ *
+ * @see org.eclipse.jface.viewers.ILabelProvider#getText(java.lang.Object)
+ */
+ @Override
+ public String getText(Object object) {
+ if (object instanceof IElementType) {
+ return ((IElementType) object).getDisplayName();
+ } else {
+ return object.toString();
+ }
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/provider/IGraphicalTypeRegistry.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/provider/IGraphicalTypeRegistry.java
new file mode 100755
index 0000000..4f7b043
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/provider/IGraphicalTypeRegistry.java
@@ -0,0 +1,108 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.gmf.diagram.common.provider;
+
+
+/**
+ * This interface provides an API for accessing the local graphical type registry.
+ * This registry provides a graphical type for existing model elements.
+ */
+public interface IGraphicalTypeRegistry extends org.eclipse.papyrus.infra.gmfdiag.common.providers.IGraphicalTypeRegistry {
+
+ // /** Constant for undefined graphical type */
+ // public static final String UNDEFINED_TYPE = "undefined_type";
+ //
+ // /**
+ // * Get a valid edge graphical type for the domain element.
+ // *
+ // * @param domainElement
+ // * the domain element.
+ // * @return the domain element graphical type.
+ // */
+ // public String getEdgeGraphicalType(EObject domainElement);
+ //
+ // /**
+ // * Get a valid edge graphical type for the element type.
+ // *
+ // * @param elementType
+ // * the element type.
+ // * @param containerType
+ // * the type of the graphical owner of the domain element.
+ // * @return the domain element graphical type.
+ // */
+ // public String getEdgeGraphicalType(IElementType elementType);
+ //
+ // /**
+ // * Get a valid edge graphical type for the proposed type.
+ // *
+ // * @param proposedType
+ // * the proposed type.
+ // * @param containerType
+ // * the type of the graphical owner of the domain element.
+ // * @return the domain element graphical type.
+ // */
+ // public String getEdgeGraphicalType(String proposedType);
+ //
+ // /**
+ // * Get a valid node graphical type for the domain element.
+ // *
+ // * @param domainElement
+ // * the domain element.
+ // * @param containerType
+ // * the type of the graphical owner of the domain element.
+ // * @return the domain element graphical type.
+ // */
+ // public String getNodeGraphicalType(EObject domainElement, String containerType);
+ //
+ // /**
+ // * Get a valid node graphical type for the element type.
+ // *
+ // * @param elementType
+ // * the element type.
+ // * @param containerType
+ // * the type of the graphical owner of the domain element.
+ // * @return the domain element graphical type.
+ // */
+ // public String getNodeGraphicalType(IElementType elementType, String containerType);
+ //
+ // /**
+ // * Get a valid node graphical type for the proposed type.
+ // *
+ // * @param proposedType
+ // * the proposed type.
+ // * @param containerType
+ // * the type of the graphical owner of the domain element.
+ // * @return the domain element graphical type.
+ // */
+ // public String getNodeGraphicalType(String proposedType, String containerType);
+ //
+ // /**
+ // * Test if the type is a known edge graphical type in this diagram
+ // *
+ // * @param type
+ // * the type to test
+ // * @return true if the type is known
+ // */
+ // public boolean isKnownEdgeType(String type);
+ //
+ // /**
+ // * Test if the type is a known node graphical type in this diagram
+ // *
+ // * @param type
+ // * the type to test
+ // * @return true if the type is known
+ // */
+ // public boolean isKnownNodeType(String type);
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/provider/MarkerNavigationProvider.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/provider/MarkerNavigationProvider.java
new file mode 100755
index 0000000..8ad96a3
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/provider/MarkerNavigationProvider.java
@@ -0,0 +1,91 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.gmf.diagram.common.provider;
+
+import java.util.Arrays;
+import java.util.Map;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor;
+import org.eclipse.gmf.runtime.emf.ui.providers.marker.AbstractModelMarkerNavigationProvider;
+import org.eclipse.papyrus.sysml.diagram.common.Activator;
+
+/**
+ * Non diagram-specific class generated by GMF Tooling.
+ */
+public class MarkerNavigationProvider extends AbstractModelMarkerNavigationProvider {
+
+ public static final String MARKER_TYPE = Activator.PLUGIN_ID + ".diagnostic"; //$NON-NLS-1$
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void doGotoMarker(IMarker marker) {
+ String elementId = marker.getAttribute(org.eclipse.gmf.runtime.common.core.resources.IMarker.ELEMENT_ID, null);
+ if (elementId == null || !(getEditor() instanceof DiagramEditor)) {
+ return;
+ }
+ DiagramEditor editor = (DiagramEditor) getEditor();
+ Map editPartRegistry = editor.getDiagramGraphicalViewer().getEditPartRegistry();
+ EObject targetView = editor.getDiagram().eResource().getEObject(elementId);
+ if (targetView == null) {
+ return;
+ }
+ EditPart targetEditPart = (EditPart) editPartRegistry.get(targetView);
+ if (targetEditPart != null) {
+ DiagramEditorUtil.selectElementsInDiagram(editor, Arrays.asList(new EditPart[] { targetEditPart }));
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public static void deleteMarkers(IResource resource) {
+ try {
+ resource.deleteMarkers(MARKER_TYPE, true, IResource.DEPTH_ZERO);
+ } catch (CoreException e) {
+ Activator.log.error("Failed to delete validation markers", e); //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public static IMarker addMarker(IFile file, String elementId, String location, String message, int statusSeverity) {
+ IMarker marker = null;
+ try {
+ marker = file.createMarker(MARKER_TYPE);
+ marker.setAttribute(IMarker.MESSAGE, message);
+ marker.setAttribute(IMarker.LOCATION, location);
+ marker.setAttribute(org.eclipse.gmf.runtime.common.core.resources.IMarker.ELEMENT_ID, elementId);
+ int markerSeverity = IMarker.SEVERITY_INFO;
+ if (statusSeverity == IStatus.WARNING) {
+ markerSeverity = IMarker.SEVERITY_WARNING;
+ } else if (statusSeverity == IStatus.ERROR || statusSeverity == IStatus.CANCEL) {
+ markerSeverity = IMarker.SEVERITY_ERROR;
+ }
+ marker.setAttribute(IMarker.SEVERITY, markerSeverity);
+ } catch (CoreException e) {
+ Activator.log.error("Failed to create validation marker", e); //$NON-NLS-1$
+ }
+ return marker;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/provider/SysMLVisualTypeProvider.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/provider/SysMLVisualTypeProvider.java
new file mode 100755
index 0000000..302adcb
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/provider/SysMLVisualTypeProvider.java
@@ -0,0 +1,120 @@
+/*****************************************************************************
+ * Copyright (c) 2015 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.gmf.diagram.common.provider;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.Modifier;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.service.visualtype.AbstractVisualTypeProvider;
+import org.eclipse.papyrus.infra.gmfdiag.common.service.visualtype.IVisualTypeProvider;
+import org.eclipse.papyrus.sysml.diagram.common.Activator;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * Generic visual type provider for SysML diagrams that, for the most part, delegates
+ * to the diagram's specific {@link IGraphicalTypeRegistry} and the {@link IVisualTypeProvider}
+ * of the UML diagram that it extends.
+ */
+public class SysMLVisualTypeProvider extends AbstractVisualTypeProvider {
+
+ private final IGraphicalTypeRegistry types;
+ private final IVisualTypeProvider uml;
+
+ /**
+ * Initializes me with my delegates.
+ *
+ * @param types
+ * the graphical type registry to which I delegate SysML-specific queries
+ * @param uml
+ * the visual type provider of the UML diagram that the SysML diagram extends
+ */
+ protected SysMLVisualTypeProvider(IGraphicalTypeRegistry types, IVisualTypeProvider uml) {
+ super();
+
+ this.types = types;
+ this.uml = uml;
+ }
+
+ @Override
+ public IElementType getElementType(Diagram diagram, String viewType) {
+ IElementType result = getCustomElementType(viewType);
+
+ if ((result == null) && (viewType != null)) {
+ // Look for a standard SysML element type
+ for (Field field : SysMLElementTypes.class.getDeclaredFields()) {
+ if (IElementType.class.isAssignableFrom(field.getType()) && Modifier.isStatic(field.getModifiers()) && Modifier.isPublic(field.getModifiers())) {
+ try {
+ IElementType candidate = (IElementType) field.get(null);
+ if ((candidate instanceof IHintedType) && viewType.equals(((IHintedType) candidate).getSemanticHint())) {
+ result = candidate;
+ break;
+ }
+ } catch (Exception e) {
+ // Reflection problems on this class shouldn't happen
+ Activator.log.error(e);
+ }
+ }
+ }
+
+ if (result == null) {
+ // Still null? Try the UML diagram
+ result = uml.getElementType(diagram, viewType);
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * Overridden by subclasses in diagrams that provide custom SysML visual element types
+ * in their {@code ElementTypes} enumerations.
+ *
+ * @param viewType
+ * the view type to look up
+ * @return the corresponding element type, or {@code null} if none
+ */
+ protected IElementType getCustomElementType(String viewType) {
+ return null;
+ }
+
+ @Override
+ public String getNodeType(View parentView, EObject element) {
+ String result = types.getNodeGraphicalType(element, parentView.getType());
+
+ if (result == null) {
+ // Try the UML diagram
+ result = uml.getNodeType(parentView, element);
+ }
+
+ return result;
+ }
+
+ @Override
+ public String getLinkType(Diagram diagram, EObject element) {
+ String result = types.getEdgeGraphicalType(element);
+
+ if (result == null) {
+ // Try the UML diagram
+ result = uml.getLinkType(diagram, element);
+ }
+
+ return result;
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/commands/ConstraintExtendedDirectEditionDialog.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/commands/ConstraintExtendedDirectEditionDialog.java
new file mode 100755
index 0000000..828b17e
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/commands/ConstraintExtendedDirectEditionDialog.java
@@ -0,0 +1,29 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.commands;
+
+import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration;
+import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog;
+import org.eclipse.swt.widgets.Shell;
+
+public class ConstraintExtendedDirectEditionDialog extends ExtendedDirectEditionDialog {
+
+ public ConstraintExtendedDirectEditionDialog(Shell parentShell,
+ Object object, String initialValue,
+ IDirectEditorConfiguration configuration) {
+ super(parentShell, object, initialValue, configuration);
+ this.title = "Edit Constraint specification";
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/commands/CreateActorPartWithTypeConfigureCommandFactory.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/commands/CreateActorPartWithTypeConfigureCommandFactory.java
new file mode 100755
index 0000000..149116b
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/commands/CreateActorPartWithTypeConfigureCommandFactory.java
@@ -0,0 +1,91 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.commands;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.gmf.runtime.common.core.command.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.type.core.commands.ConfigureElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.infra.services.edit.commands.AbstractConfigureCommandFactory;
+import org.eclipse.papyrus.infra.services.edit.utils.GMFCommandUtils;
+import org.eclipse.papyrus.sysml.diagram.common.dialogs.CreateOrSelectActorPartTypeDialog;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Type;
+
+/**
+ * This command factory provides a command that enable ActorPart type to be selected or created during creation.
+ */
+public class CreateActorPartWithTypeConfigureCommandFactory extends AbstractConfigureCommandFactory {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ICommand create(ConfigureRequest request) {
+
+ ICommand configureCommand = null;
+
+ Shell shell = Display.getDefault().getActiveShell();
+ // Start dialog to identify the new part type
+ Property part = (Property) request.getElementToConfigure();
+ Package partPkg = part.getNearestPackage();
+
+ CreateOrSelectActorPartTypeDialog dialog = new CreateOrSelectActorPartTypeDialog(shell, partPkg);
+ dialog.open();
+ if (dialog.getReturnCode() == Window.OK) {
+
+ final ICommand typeCreationCommand = dialog.getNewTypeCreateCommand();
+ final Type actorPartType = (Type) dialog.getExistingType();
+
+ // Abort if type creation command exists but is not executable
+ if ((typeCreationCommand != null) && (!typeCreationCommand.canExecute())) {
+ return cancelCommand(request);
+ } else {
+ configureCommand = CompositeCommand.compose(configureCommand, typeCreationCommand);
+ }
+
+ // Create the configure command that will set the ActorPart type
+ ICommand setTypeCommand = new ConfigureElementCommand(request) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+
+ Property actorPart = (Property) getElementToEdit();
+ if (actorPartType != null) {
+ actorPart.setType(actorPartType);
+ } else {
+ Type newType = (Type) GMFCommandUtils.getCommandEObjectResult(typeCreationCommand);
+ actorPart.setType(newType);
+ }
+
+ return CommandResult.newOKCommandResult(actorPart);
+ }
+
+ };
+
+ configureCommand = CompositeCommand.compose(configureCommand, setTypeCommand);
+ return configureCommand;
+ }
+
+ return cancelCommand(request);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/commands/CreateConstraintPropertyWithTypeConfigureCommandFactory.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/commands/CreateConstraintPropertyWithTypeConfigureCommandFactory.java
new file mode 100755
index 0000000..27fa06e
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/commands/CreateConstraintPropertyWithTypeConfigureCommandFactory.java
@@ -0,0 +1,111 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.commands;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.gmf.runtime.common.core.command.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.type.core.commands.ConfigureElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.infra.services.edit.commands.AbstractConfigureCommandFactory;
+import org.eclipse.papyrus.infra.services.edit.commands.ConfigureFeatureCommandFactory;
+import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.infra.services.edit.utils.GMFCommandUtils;
+import org.eclipse.papyrus.sysml.diagram.common.dialogs.CreateOrSelectConstraintPropertyTypeDialog;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Type;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * This command factory provides a command that enable Part type to be selected or created during creation.
+ */
+public class CreateConstraintPropertyWithTypeConfigureCommandFactory extends AbstractConfigureCommandFactory {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ICommand create(ConfigureRequest request) {
+
+ ICommand configureCommand = null;
+
+ Shell shell = Display.getDefault().getActiveShell();
+ // Start dialog to identify the new part type
+ Property part = (Property) request.getElementToConfigure();
+ Package partPkg = part.getNearestPackage();
+
+ CreateOrSelectConstraintPropertyTypeDialog dialog = new CreateOrSelectConstraintPropertyTypeDialog(shell, partPkg);
+ dialog.open();
+ if (dialog.getReturnCode() == Window.OK) {
+
+ final ICommand typeCreationCommand = dialog.getNewTypeCreateCommand();
+ final Type partType = (Type) dialog.getExistingType();
+
+ // Abort if type creation command exists but is not executable
+ if ((typeCreationCommand != null) && (!typeCreationCommand.canExecute())) {
+ return cancelCommand(request);
+ } else {
+ configureCommand = CompositeCommand.compose(configureCommand, typeCreationCommand);
+ }
+
+ // Create the configure command that will set the constraint property type
+ ICommand setTypeCommand = new ConfigureElementCommand(request) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+
+ Property part = (Property) getElementToEdit();
+ if (partType != null) {
+ part.setType(partType);
+ } else {
+ Type newType = (Type) GMFCommandUtils.getCommandEObjectResult(typeCreationCommand);
+ createConstraintBlockConstraint(newType, monitor, info);
+ part.setType(newType);
+ }
+ return CommandResult.newOKCommandResult(part);
+ }
+
+ private void createConstraintBlockConstraint(Type newType, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ // Create the constraint attached to the ConstraintBlock
+ IElementEditService commandService = ElementEditServiceUtils.getCommandProvider(newType);
+ if (commandService != null) {
+ CreateElementRequest createTypeRequest = new CreateElementRequest(newType, UMLElementTypes.CONSTRAINT);
+ createTypeRequest.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID,
+ new ConfigureFeatureCommandFactory(UMLPackage.eINSTANCE.getNamedElement_Name(), newType.getName() + "Specification"));
+ ICommand newConstraintCreateCommand = commandService.getEditCommand(createTypeRequest);
+ if (newConstraintCreateCommand.canExecute()) {
+ newConstraintCreateCommand.execute(monitor, info);
+ }
+ }
+ }
+ };
+
+ configureCommand = CompositeCommand.compose(configureCommand, setTypeCommand);
+ return configureCommand;
+ }
+
+ return cancelCommand(request);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/commands/CreateConstraintPropertyWithTypeConfigureCommandFactory.java.rej b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/commands/CreateConstraintPropertyWithTypeConfigureCommandFactory.java.rej
new file mode 100755
index 0000000..b38fb2c
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/commands/CreateConstraintPropertyWithTypeConfigureCommandFactory.java.rej
@@ -0,0 +1,30 @@
+@@ -105,29 +99,6 @@
+ ICommand newConstraintCreateCommand = commandService.getEditCommand(createTypeRequest);
+ if (newConstraintCreateCommand.canExecute()) {
+ newConstraintCreateCommand.execute(monitor, info);
+- Object newObject = newConstraintCreateCommand.getCommandResult().getReturnValue();
+- // Create the constraint specification
+- if (newObject instanceof EObject) {
+- final EObject newElement = (EObject)newObject;
+- final IDirectEditorConfiguration configuration = initExtendedEditorConfiguration(newElement);
+- try {
+- Dialog dialog = new ConstraintExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), newElement, configuration.getTextToEdit(newElement), configuration);
+- final Dialog finalDialog = dialog;
+- if(Window.OK == dialog.open()) {
+- TransactionalEditingDomain domain = getEditingDomain();
+- RecordingCommand command = new RecordingCommand(domain, "Edit Constraint specification") {
+- @Override
+- protected void doExecute() {
+- configuration.postEditAction(newElement, ((ILabelEditorDialog)finalDialog).getValue());
+- }
+- };
+- domain.getCommandStack().execute(command);
+- }
+- } catch (Exception e) {
+- Activator.log.error("Problem during editing Constaint", e);
+- }
+- }
+-
+ }
+ }
+ }
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/commands/CreateFlowPortWithFlowSpecificationConfigureCommandFactory.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/commands/CreateFlowPortWithFlowSpecificationConfigureCommandFactory.java
new file mode 100755
index 0000000..afb8cff
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/commands/CreateFlowPortWithFlowSpecificationConfigureCommandFactory.java
@@ -0,0 +1,90 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.commands;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.gmf.runtime.common.core.command.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.type.core.commands.ConfigureElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.infra.services.edit.commands.AbstractConfigureCommandFactory;
+import org.eclipse.papyrus.infra.services.edit.utils.GMFCommandUtils;
+import org.eclipse.papyrus.sysml.diagram.common.dialogs.CreateOrSelectNonAtomicFlowPortTypeDialog;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.Port;
+import org.eclipse.uml2.uml.Type;
+
+/**
+ * This command factory provides a command that enable FlowPort type (FlowSpecification) to be selected or created during creation.
+ */
+public class CreateFlowPortWithFlowSpecificationConfigureCommandFactory extends AbstractConfigureCommandFactory {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ICommand create(ConfigureRequest request) {
+
+ ICommand configureCommand = null;
+
+ Shell shell = Display.getDefault().getActiveShell();
+ // Start dialog to identify the new port type
+ Port port = (Port) request.getElementToConfigure();
+ Package partPkg = port.getNearestPackage();
+
+ CreateOrSelectNonAtomicFlowPortTypeDialog dialog = new CreateOrSelectNonAtomicFlowPortTypeDialog(shell, partPkg);
+ dialog.open();
+ if (dialog.getReturnCode() == Window.OK) {
+
+ final ICommand typeCreationCommand = dialog.getNewTypeCreateCommand();
+ final Type portType = (Type) dialog.getExistingType();
+
+ // Abort if type creation command exists but is not executable
+ if ((typeCreationCommand != null) && (!typeCreationCommand.canExecute())) {
+ return cancelCommand(request);
+ } else {
+ configureCommand = CompositeCommand.compose(configureCommand, typeCreationCommand);
+ }
+
+ // Create the configure command that will set the part type
+ ICommand setTypeCommand = new ConfigureElementCommand(request) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+
+ Port port = (Port) getElementToEdit();
+ if (portType != null) {
+ port.setType(portType);
+ } else {
+ Type newType = (Type) GMFCommandUtils.getCommandEObjectResult(typeCreationCommand);
+ port.setType(newType);
+ }
+ return CommandResult.newOKCommandResult(port);
+ }
+
+ };
+
+ configureCommand = CompositeCommand.compose(configureCommand, setTypeCommand);
+ return configureCommand;
+ }
+
+ return cancelCommand(request);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/commands/CreatePartWithTypeConfigureCommandFactory.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/commands/CreatePartWithTypeConfigureCommandFactory.java
new file mode 100755
index 0000000..f0d0c85
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/commands/CreatePartWithTypeConfigureCommandFactory.java
@@ -0,0 +1,90 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.commands;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.gmf.runtime.common.core.command.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.type.core.commands.ConfigureElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.infra.services.edit.commands.AbstractConfigureCommandFactory;
+import org.eclipse.papyrus.infra.services.edit.utils.GMFCommandUtils;
+import org.eclipse.papyrus.sysml.diagram.common.dialogs.CreateOrSelectBlockPropertyTypeDialog;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Type;
+
+/**
+ * This command factory provides a command that enable Part type to be selected or created during creation.
+ */
+public class CreatePartWithTypeConfigureCommandFactory extends AbstractConfigureCommandFactory {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ICommand create(ConfigureRequest request) {
+
+ ICommand configureCommand = null;
+
+ Shell shell = Display.getDefault().getActiveShell();
+ // Start dialog to identify the new part type
+ Property part = (Property) request.getElementToConfigure();
+ Package partPkg = part.getNearestPackage();
+
+ CreateOrSelectBlockPropertyTypeDialog dialog = new CreateOrSelectBlockPropertyTypeDialog(shell, partPkg);
+ dialog.open();
+ if (dialog.getReturnCode() == Window.OK) {
+
+ final ICommand typeCreationCommand = dialog.getNewTypeCreateCommand();
+ final Type partType = (Type) dialog.getExistingType();
+
+ // Abort if type creation command exists but is not executable
+ if ((typeCreationCommand != null) && (!typeCreationCommand.canExecute())) {
+ return cancelCommand(request);
+ } else {
+ configureCommand = CompositeCommand.compose(configureCommand, typeCreationCommand);
+ }
+
+ // Create the configure command that will set the part type
+ ICommand setTypeCommand = new ConfigureElementCommand(request) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+
+ Property part = (Property) getElementToEdit();
+ if (partType != null) {
+ part.setType(partType);
+ } else {
+ Type newType = (Type) GMFCommandUtils.getCommandEObjectResult(typeCreationCommand);
+ part.setType(newType);
+ }
+ return CommandResult.newOKCommandResult(part);
+ }
+
+ };
+
+ configureCommand = CompositeCommand.compose(configureCommand, setTypeCommand);
+ return configureCommand;
+ }
+
+ return cancelCommand(request);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/commands/CreateReferenceWithTypeConfigureCommandFactory.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/commands/CreateReferenceWithTypeConfigureCommandFactory.java
new file mode 100755
index 0000000..646689f
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/commands/CreateReferenceWithTypeConfigureCommandFactory.java
@@ -0,0 +1,90 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.commands;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.gmf.runtime.common.core.command.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.type.core.commands.ConfigureElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.infra.services.edit.commands.AbstractConfigureCommandFactory;
+import org.eclipse.papyrus.infra.services.edit.utils.GMFCommandUtils;
+import org.eclipse.papyrus.sysml.diagram.common.dialogs.CreateOrSelectBlockPropertyTypeDialog;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Type;
+
+/**
+ * This command factory provides a command that enable Reference type to be selected or created during creation.
+ */
+public class CreateReferenceWithTypeConfigureCommandFactory extends AbstractConfigureCommandFactory {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ICommand create(ConfigureRequest request) {
+
+ ICommand configureCommand = null;
+
+ Shell shell = Display.getDefault().getActiveShell();
+ // Start dialog to identify the new part type
+ Property part = (Property) request.getElementToConfigure();
+ Package partPkg = part.getNearestPackage();
+
+ CreateOrSelectBlockPropertyTypeDialog dialog = new CreateOrSelectBlockPropertyTypeDialog(shell, partPkg);
+ dialog.open();
+ if (dialog.getReturnCode() == Window.OK) {
+
+ final ICommand typeCreationCommand = dialog.getNewTypeCreateCommand();
+ final Type partType = (Type) dialog.getExistingType();
+
+ // Abort if type creation command exists but is not executable
+ if ((typeCreationCommand != null) && (!typeCreationCommand.canExecute())) {
+ return cancelCommand(request);
+ } else {
+ configureCommand = CompositeCommand.compose(configureCommand, typeCreationCommand);
+ }
+
+ // Create the configure command that will set the part type
+ ICommand setTypeCommand = new ConfigureElementCommand(request) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+
+ Property part = (Property) getElementToEdit();
+ if (partType != null) {
+ part.setType(partType);
+ } else {
+ Type newType = (Type) GMFCommandUtils.getCommandEObjectResult(typeCreationCommand);
+ part.setType(newType);
+ }
+ return CommandResult.newOKCommandResult(part);
+ }
+
+ };
+
+ configureCommand = CompositeCommand.compose(configureCommand, setTypeCommand);
+ return configureCommand;
+ }
+
+ return cancelCommand(request);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/commands/CreateValueWithTypeConfigureCommandFactory.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/commands/CreateValueWithTypeConfigureCommandFactory.java
new file mode 100755
index 0000000..46a2c3d
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/commands/CreateValueWithTypeConfigureCommandFactory.java
@@ -0,0 +1,90 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.commands;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.gmf.runtime.common.core.command.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.type.core.commands.ConfigureElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.infra.services.edit.commands.AbstractConfigureCommandFactory;
+import org.eclipse.papyrus.infra.services.edit.utils.GMFCommandUtils;
+import org.eclipse.papyrus.sysml.diagram.common.dialogs.CreateOrSelectValuePropertyTypeDialog;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Type;
+
+/**
+ * This command factory provides a command that enable Value type to be selected or created during creation.
+ */
+public class CreateValueWithTypeConfigureCommandFactory extends AbstractConfigureCommandFactory {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ICommand create(ConfigureRequest request) {
+
+ ICommand configureCommand = null;
+
+ Shell shell = Display.getDefault().getActiveShell();
+ // Start dialog to identify the new part type
+ Property part = (Property) request.getElementToConfigure();
+ Package partPkg = part.getNearestPackage();
+
+ CreateOrSelectValuePropertyTypeDialog dialog = new CreateOrSelectValuePropertyTypeDialog(shell, partPkg);
+ dialog.open();
+ if (dialog.getReturnCode() == Window.OK) {
+
+ final ICommand typeCreationCommand = dialog.getNewTypeCreateCommand();
+ final Type partType = (Type) dialog.getExistingType();
+
+ // Abort if type creation command exists but is not executable
+ if ((typeCreationCommand != null) && (!typeCreationCommand.canExecute())) {
+ return cancelCommand(request);
+ } else {
+ configureCommand = CompositeCommand.compose(configureCommand, typeCreationCommand);
+ }
+
+ // Create the configure command that will set the part type
+ ICommand setTypeCommand = new ConfigureElementCommand(request) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+
+ Property part = (Property) getElementToEdit();
+ if (partType != null) {
+ part.setType(partType);
+ } else {
+ Type newType = (Type) GMFCommandUtils.getCommandEObjectResult(typeCreationCommand);
+ part.setType(newType);
+ }
+ return CommandResult.newOKCommandResult(part);
+ }
+
+ };
+
+ configureCommand = CompositeCommand.compose(configureCommand, setTypeCommand);
+ return configureCommand;
+ }
+
+ return cancelCommand(request);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/dialogs/CreateOrSelectActorPartTypeDialog.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/dialogs/CreateOrSelectActorPartTypeDialog.java
new file mode 100755
index 0000000..8e0340d
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/dialogs/CreateOrSelectActorPartTypeDialog.java
@@ -0,0 +1,119 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.dialogs;
+
+import org.eclipse.papyrus.sysml.diagram.common.messages.Messages;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * Dialog for initialization of ActorPart (Property) type (the type is either selected or created).
+ */
+public class CreateOrSelectActorPartTypeDialog extends CreateOrSelectTypeDialog {
+
+ /** Constructor */
+ public CreateOrSelectActorPartTypeDialog(Shell shell, NamedElement owner) {
+ super(shell, owner, UMLElementTypes.ACTOR, UMLPackage.eINSTANCE.getTypedElement_Type(), UMLPackage.eINSTANCE.getActor(), UMLElementTypes.PACKAGE, UMLPackage.eINSTANCE.getPackage_PackagedElement(), null);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getDialogTitle() {
+ return Messages.CreateOrSelectActorPartTypeDialog_DialogTitle;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getSelectionSectionTitle() {
+ return Messages.CreateOrSelectActorPartTypeDialog_SelectionSectionTitle;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getSelectionSectionRadioLabel() {
+ return Messages.CreateOrSelectActorPartTypeDialog_SelectionSectionRadioLabel;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getCreationSectionTitle() {
+ return Messages.CreateOrSelectActorPartTypeDialog_CreationSectionTitle;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getCreationSectionRadioLabel() {
+ return Messages.CreateOrSelectActorPartTypeDialog_CreationSectionRadioLabel;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getNewTypeNameLabel() {
+ return Messages.CreateOrSelectActorPartTypeDialog_NewTypeNameLabel;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getNewTypeContainerNameLabel() {
+ return Messages.CreateOrSelectActorPartTypeDialog_NewTypeContainerNameLabel;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getNewTypeContainerDialogTitle() {
+ return Messages.CreateOrSelectActorPartTypeDialog_SelectNewTypeContainerDialogTitle;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getNewTypeContainerDialogMessage() {
+ return Messages.CreateOrSelectActorPartTypeDialog_SelectNewTypeContainerDialogMessage;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getTypeDialogTitle() {
+ return Messages.CreateOrSelectActorPartTypeDialog_SelectTypeDialogTitle;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getTypeDialogMessage() {
+ return Messages.CreateOrSelectActorPartTypeDialog_SelectTypeDialogMessage;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/dialogs/CreateOrSelectBlockPropertyTypeDialog.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/dialogs/CreateOrSelectBlockPropertyTypeDialog.java
new file mode 100755
index 0000000..a7a541d
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/dialogs/CreateOrSelectBlockPropertyTypeDialog.java
@@ -0,0 +1,142 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.dialogs;
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.papyrus.sysml.blocks.BlocksPackage;
+import org.eclipse.papyrus.sysml.diagram.common.messages.Messages;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.sysml.util.SysmlResource;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.Stereotype;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * Dialog for initialization of Part (Property) type (the type is either selected or created).
+ */
+public class CreateOrSelectBlockPropertyTypeDialog extends CreateOrSelectTypeDialog {
+
+ /** Constructor */
+ public CreateOrSelectBlockPropertyTypeDialog(Shell shell, NamedElement owner) {
+ super(shell, owner, SysMLElementTypes.BLOCK, UMLPackage.eINSTANCE.getTypedElement_Type(), BlocksPackage.eINSTANCE.getBlock(), UMLElementTypes.PACKAGE, UMLPackage.eINSTANCE.getPackage_PackagedElement(), null, getConstraintBlockAsStereotype());
+ }
+
+ /**
+ * If we create a Part type by a ConstraintBlock, thisPart will become a ConstraintProperty and representation will immediately disappear.
+ * So we filter ConstraintBlock type => Only strict Block are allowed
+ *
+ * @return
+ */
+ @SuppressWarnings("deprecation")
+ private static List<?> getConstraintBlockAsStereotype() {
+ // We create a mock Stereotype to pass in the good code section of SemanticUMLContentProvider.isCompatibleMetaclass (bad gestion of static stereotypes)
+ Stereotype mockStereotype = UMLFactory.eINSTANCE.createStereotype();
+ // We use this stereotype with namespace instead of ConstraintsPackage.eINSTANCE.getConstraintBlock()
+ mockStereotype.setName(SysmlResource.CONSTRAINT_BLOCK_ID);
+ return Arrays.asList(mockStereotype);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getDialogTitle() {
+ return Messages.CreateOrSelectBlockPropertyTypeDialog_DialogTitle;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getSelectionSectionTitle() {
+ return Messages.CreateOrSelectBlockPropertyTypeDialog_SelectionSectionTitle;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getSelectionSectionRadioLabel() {
+ return Messages.CreateOrSelectBlockPropertyTypeDialog_SelectionSectionRadioLabel;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getCreationSectionTitle() {
+ return Messages.CreateOrSelectBlockPropertyTypeDialog_CreationSectionTitle;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getCreationSectionRadioLabel() {
+ return Messages.CreateOrSelectBlockPropertyTypeDialog_CreationSectionRadioLabel;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getNewTypeNameLabel() {
+ return Messages.CreateOrSelectBlockPropertyTypeDialog_NewTypeNameLabel;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getNewTypeContainerNameLabel() {
+ return Messages.CreateOrSelectBlockPropertyTypeDialog_NewTypeContainerNameLabel;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getNewTypeContainerDialogTitle() {
+ return Messages.CreateOrSelectBlockPropertyTypeDialog_SelectNewTypeContainerDialogTitle;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getNewTypeContainerDialogMessage() {
+ return Messages.CreateOrSelectBlockPropertyTypeDialog_SelectNewTypeContainerDialogMessage;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getTypeDialogTitle() {
+ return Messages.CreateOrSelectBlockPropertyTypeDialog_SelectTypeDialogTitle;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getTypeDialogMessage() {
+ return Messages.CreateOrSelectBlockPropertyTypeDialog_SelectTypeDialogMessage;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/dialogs/CreateOrSelectConstraintPropertyTypeDialog.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/dialogs/CreateOrSelectConstraintPropertyTypeDialog.java
new file mode 100755
index 0000000..48f9501
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/dialogs/CreateOrSelectConstraintPropertyTypeDialog.java
@@ -0,0 +1,122 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.dialogs;
+
+import org.eclipse.papyrus.sysml.constraints.ConstraintsPackage;
+import org.eclipse.papyrus.sysml.diagram.common.messages.Messages;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * Dialog for initialization of Part (Property) type (the type is either selected or created).
+ */
+public class CreateOrSelectConstraintPropertyTypeDialog extends CreateOrSelectTypeDialog {
+
+ /** Constructor */
+ public CreateOrSelectConstraintPropertyTypeDialog(Shell shell, NamedElement owner) {
+ super(shell, owner, SysMLElementTypes.CONSTRAINT_BLOCK, UMLPackage.eINSTANCE.getTypedElement_Type(), ConstraintsPackage.eINSTANCE.getConstraintBlock(), UMLElementTypes.PACKAGE, UMLPackage.eINSTANCE.getPackage_PackagedElement(), null);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getDialogTitle() {
+ return Messages.CreateOrSelectConstraintPropertyTypeDialog_DialogTitle;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getSelectionSectionTitle() {
+ return Messages.CreateOrSelectConstraintPropertyTypeDialog_SelectionSectionTitle;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getSelectionSectionRadioLabel() {
+ return Messages.CreateOrSelectConstraintPropertyTypeDialog_SelectionSectionRadioLabel;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getCreationSectionTitle() {
+ return Messages.CreateOrSelectConstraintPropertyTypeDialog_CreationSectionTitle;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getCreationSectionRadioLabel() {
+ return Messages.CreateOrSelectConstraintPropertyTypeDialog_CreationSectionRadioLabel;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getNewTypeNameLabel() {
+ return Messages.CreateOrSelectConstraintPropertyTypeDialog_NewTypeNameLabel;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getNewTypeContainerNameLabel() {
+ return Messages.CreateOrSelectConstraintPropertyTypeDialog_NewTypeContainerNameLabel;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getNewTypeContainerDialogTitle() {
+ return Messages.CreateOrSelectConstraintPropertyTypeDialog_SelectNewTypeContainerDialogTitle;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getNewTypeContainerDialogMessage() {
+ return Messages.CreateOrSelectConstraintPropertyTypeDialog_SelectNewTypeContainerDialogMessage;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getTypeDialogTitle() {
+ return Messages.CreateOrSelectConstraintPropertyTypeDialog_SelectTypeDialogTitle;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getTypeDialogMessage() {
+ return Messages.CreateOrSelectConstraintPropertyTypeDialog_SelectTypeDialogMessage;
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/dialogs/CreateOrSelectNonAtomicFlowPortTypeDialog.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/dialogs/CreateOrSelectNonAtomicFlowPortTypeDialog.java
new file mode 100755
index 0000000..50fa0e1
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/dialogs/CreateOrSelectNonAtomicFlowPortTypeDialog.java
@@ -0,0 +1,121 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.dialogs;
+
+import org.eclipse.papyrus.sysml.diagram.common.messages.Messages;
+import org.eclipse.papyrus.sysml.portandflows.PortandflowsPackage;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * Dialog for initialization of non atomic FlowPort type (the type is a FlowSpecification either selected or created).
+ */
+public class CreateOrSelectNonAtomicFlowPortTypeDialog extends CreateOrSelectTypeDialog {
+
+ /** Constructor */
+ public CreateOrSelectNonAtomicFlowPortTypeDialog(Shell shell, NamedElement owner) {
+ super(shell, owner, SysMLElementTypes.FLOW_SPECIFICATION, UMLPackage.eINSTANCE.getTypedElement_Type(), PortandflowsPackage.eINSTANCE.getFlowSpecification(), UMLElementTypes.PACKAGE, UMLPackage.eINSTANCE.getPackage_PackagedElement(), null);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getDialogTitle() {
+ return Messages.CreateOrSelectNonAtomicFlowPortTypeDialog_DialogTitle;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getSelectionSectionTitle() {
+ return Messages.CreateOrSelectNonAtomicFlowPortTypeDialog_SelectionSectionTitle;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getSelectionSectionRadioLabel() {
+ return Messages.CreateOrSelectNonAtomicFlowPortTypeDialog_SelectionSectionRadioLabel;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getCreationSectionTitle() {
+ return Messages.CreateOrSelectNonAtomicFlowPortTypeDialog_CreationSectionTitle;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getCreationSectionRadioLabel() {
+ return Messages.CreateOrSelectNonAtomicFlowPortTypeDialog_CreationSectionRadioLabel;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getNewTypeNameLabel() {
+ return Messages.CreateOrSelectNonAtomicFlowPortTypeDialog_NewTypeNameLabel;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getNewTypeContainerNameLabel() {
+ return Messages.CreateOrSelectNonAtomicFlowPortTypeDialog_NewTypeContainerNameLabel;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getNewTypeContainerDialogTitle() {
+ return Messages.CreateOrSelectNonAtomicFlowPortTypeDialog_SelectNewTypeContainerDialogTitle;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getNewTypeContainerDialogMessage() {
+ return Messages.CreateOrSelectNonAtomicFlowPortTypeDialog_SelectNewTypeContainerDialogMessage;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getTypeDialogTitle() {
+ return Messages.CreateOrSelectNonAtomicFlowPortTypeDialog_SelectTypeDialogTitle;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getTypeDialogMessage() {
+ return Messages.CreateOrSelectNonAtomicFlowPortTypeDialog_SelectTypeDialogMessage;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/dialogs/CreateOrSelectTypeDialog.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/dialogs/CreateOrSelectTypeDialog.java
new file mode 100755
index 0000000..79a4e92
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/dialogs/CreateOrSelectTypeDialog.java
@@ -0,0 +1,630 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.dialogs;
+
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.ISpecializationType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.infra.services.edit.commands.ConfigureFeatureCommandFactory;
+import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.infra.widgets.editors.TreeSelectorDialog;
+import org.eclipse.papyrus.sysml.diagram.common.Activator;
+import org.eclipse.papyrus.sysml.diagram.common.messages.Messages;
+import org.eclipse.papyrus.uml.tools.providers.UMLLabelProvider;
+import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.forms.FormDialog;
+import org.eclipse.ui.forms.IManagedForm;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.eclipse.ui.forms.widgets.Section;
+import org.eclipse.uml2.uml.Namespace;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * Dialog for initialization of Property type (the type is either selected or created).
+ */
+public class CreateOrSelectTypeDialog extends FormDialog {
+
+ protected Button creationRadio;
+
+ protected Button selectionRadio;
+
+ protected Text newTypeNameText;
+
+ protected Text newTypeContainerNameText;
+
+ protected Button newTypeContainerButton;
+
+ protected String newTypeName = null;
+
+ protected ICommand newTypeCreateCommand = null;
+
+ protected EObject newTypeContainer = null;
+
+ protected Text existingTypeNameText;
+
+ protected Button existingTypeButton;
+
+ protected EObject existingType = null;
+
+ protected EObject defaultContainer;
+
+ protected ILabelProvider labelProvider;
+
+ protected IElementType elementType;
+
+ protected EStructuralFeature editedFeature;
+
+ protected EClass elementEClass;
+
+ protected IElementType containerType;
+
+ protected EStructuralFeature containerFeature;
+
+ protected EClass containerEClass;
+
+ protected List<?> notWantedMetaclasses;
+
+ /**
+ * Create a new dialog to initialize an ActivityParameterNode.
+ *
+ * @param shell
+ * parent shell
+ * @param owner
+ * the activity that owns the action
+ */
+ public CreateOrSelectTypeDialog(Shell shell, EObject defaultContainer, IElementType elementType, EStructuralFeature editedFeature, EClass elementEClass, IElementType containerType, EStructuralFeature containerFeature, EClass containerEClass) {
+ super(shell);
+ this.defaultContainer = defaultContainer;
+ this.elementType = elementType;
+ this.editedFeature = editedFeature;
+ this.elementEClass = elementEClass;
+ this.containerType = containerType;
+ this.containerFeature = containerFeature;
+ this.containerEClass = containerEClass;
+ this.labelProvider = new UMLLabelProvider();
+ this.notWantedMetaclasses = new LinkedList<Object>();
+ }
+
+ /**
+ * Create a new dialog to initialize an ActivityParameterNode.
+ * This dialog will filter certain Stereotypes
+ *
+ * @param shell
+ * parent shell
+ * @param owner
+ * the activity that owns the action
+ */
+ public CreateOrSelectTypeDialog(Shell shell, EObject defaultContainer, IElementType elementType, EStructuralFeature editedFeature, EClass elementEClass, IElementType containerType, EStructuralFeature containerFeature, EClass containerEClass,
+ List<?> notWantedMetaclasses) {
+ this(shell, defaultContainer, elementType, editedFeature, elementEClass, containerType, containerFeature, containerEClass);
+ this.notWantedMetaclasses = notWantedMetaclasses;
+ }
+
+ protected String getDialogTitle() {
+ return Messages.CreateOrSelectTypeDialog_DialogTitle;
+ }
+
+ protected String getSelectionSectionTitle() {
+ return Messages.CreateOrSelectTypeDialog_SelectionSectionTitle;
+ }
+
+ protected String getSelectionSectionRadioLabel() {
+ return Messages.CreateOrSelectTypeDialog_SelectionSectionRadioLabel;
+ }
+
+ protected String getCreationSectionTitle() {
+ return Messages.CreateOrSelectTypeDialog_CreationSectionTitle;
+ }
+
+ protected String getCreationSectionRadioLabel() {
+ return Messages.CreateOrSelectTypeDialog_CreationSectionRadioLabel;
+ }
+
+ protected String getNewTypeNameLabel() {
+ return Messages.CreateOrSelectTypeDialog_NewTypeNameLabel;
+ }
+
+ protected String getNewTypeContainerNameLabel() {
+ return Messages.CreateOrSelectTypeDialog_NewTypeContainerNameLabel;
+ }
+
+ protected String getNewTypeContainerDialogTitle() {
+ return Messages.CreateOrSelectTypeDialog_SelectNewTypeContainerDialogTitle;
+ }
+
+ protected String getNewTypeContainerDialogMessage() {
+ return Messages.CreateOrSelectTypeDialog_SelectNewTypeContainerDialogMessage;
+ }
+
+ protected String getTypeDialogTitle() {
+ return Messages.CreateOrSelectTypeDialog_SelectTypeDialogTitle;
+ }
+
+ protected String getTypeDialogMessage() {
+ return Messages.CreateOrSelectTypeDialog_SelectTypeDialogMessage;
+ }
+
+ /**
+ * Create the form to :
+ *
+ * - ask the user to choose or create an existing element.
+ *
+ * @see org.eclipse.ui.forms.FormDialog#createFormContent(org.eclipse.ui.forms.IManagedForm)
+ */
+ @Override
+ protected void createFormContent(IManagedForm pForm) {
+ pForm.getForm().setText(getDialogTitle());
+ ScrolledForm scrolledForm = pForm.getForm();
+ FormToolkit toolkit = pForm.getToolkit();
+ Composite parent = scrolledForm.getBody();
+ parent.setLayout(new GridLayout());
+
+ createFormCreationSection(scrolledForm.getBody(), toolkit);
+ createFormSelectionSection(scrolledForm.getBody(), toolkit);
+
+ refreshSectionsEnable(false);
+ hookListeners();
+ // invoked name is set after listeners, since we count on listener to update it properly
+ setNewTypeContainer(defaultContainer);
+ setNewTypeName(null);
+
+ scrolledForm.reflow(true);
+ }
+
+ /**
+ * Adds buttons to this dialog's button bar.
+ *
+ * @param parent
+ * the button bar composite
+ */
+ @Override
+ protected void createButtonsForButtonBar(Composite parent) {
+ super.createButtonsForButtonBar(parent);
+ refreshOkButton();
+ }
+
+ /**
+ * Create the section to ask the user to choose an existing element.
+ *
+ * @param pParent
+ * the section's parent widget
+ * @param pToolkit
+ * the form toolkit
+ */
+ protected void createFormSelectionSection(Composite pParent, FormToolkit pToolkit) {
+ // create the section
+ String lSectionTitle = getSelectionSectionTitle();
+ Section lSection = pToolkit.createSection(pParent, ExpandableComposite.EXPANDED | ExpandableComposite.TITLE_BAR);
+ lSection.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ if (lSectionTitle != null) {
+ lSection.setText(lSectionTitle);
+ }
+
+ ScrolledForm lInsideScrolledForm = pToolkit.createScrolledForm(lSection);
+ lInsideScrolledForm.setExpandHorizontal(true);
+ lInsideScrolledForm.setExpandVertical(true);
+ Composite lBody = lInsideScrolledForm.getBody();
+
+ GridLayout lLayout = new GridLayout();
+ lLayout.numColumns = 3;
+ lBody.setLayout(lLayout);
+
+ // content of the section
+ selectionRadio = pToolkit.createButton(lBody, getSelectionSectionRadioLabel(), SWT.RADIO);
+ selectionRadio.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 3, 1));
+
+ // manage elementType selection
+ pToolkit.createLabel(lBody, elementType.getDisplayName(), SWT.NONE);
+ existingTypeNameText = pToolkit.createText(lBody, "", SWT.BORDER | SWT.READ_ONLY);
+ existingTypeNameText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ existingTypeButton = pToolkit.createButton(lBody, "...", SWT.FLAT);
+
+ Image image = Activator.getInstance().getImage(elementType.getEClass());
+ if (elementEClass != null) {
+ image = Activator.getInstance().getImage(elementEClass);
+ }
+
+ existingTypeButton.setImage(image);
+ existingTypeButton.setLayoutData(new GridData(SWT.NONE));
+
+ lInsideScrolledForm.reflow(true);
+ lSection.setClient(lInsideScrolledForm);
+ }
+
+ /**
+ * Create the section to ask the user to create an invoked element.
+ *
+ * @param pParent
+ * the section's parent widget
+ * @param pToolkit
+ * the form toolkit
+ */
+ protected void createFormCreationSection(Composite pParent, FormToolkit pToolkit) {
+ // create the section
+ String lSectionTitle = getCreationSectionTitle();
+ Section lSection = pToolkit.createSection(pParent, ExpandableComposite.EXPANDED | ExpandableComposite.TITLE_BAR);
+ lSection.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ if (lSectionTitle != null) {
+ lSection.setText(lSectionTitle);
+ }
+
+ ScrolledForm lInsideScrolledForm = pToolkit.createScrolledForm(lSection);
+ lInsideScrolledForm.setExpandHorizontal(true);
+ lInsideScrolledForm.setExpandVertical(true);
+ Composite lBody = lInsideScrolledForm.getBody();
+
+ GridLayout lLayout = new GridLayout();
+ lLayout.numColumns = 3;
+ lBody.setLayout(lLayout);
+
+ // content of the section
+ creationRadio = pToolkit.createButton(lBody, getCreationSectionRadioLabel(), SWT.RADIO);
+ creationRadio.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 3, 1));
+
+ pToolkit.createLabel(lBody, getNewTypeNameLabel(), SWT.NONE);
+ newTypeNameText = pToolkit.createText(lBody, "", SWT.BORDER);
+ newTypeNameText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
+ newTypeNameText.setFocus();
+
+ // manage type selection
+ pToolkit.createLabel(lBody, getNewTypeContainerNameLabel(), SWT.NONE);
+ newTypeContainerNameText = pToolkit.createText(lBody, labelProvider.getText(newTypeContainer), SWT.BORDER | SWT.READ_ONLY);
+ newTypeContainerNameText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ newTypeContainerButton = pToolkit.createButton(lBody, "...", SWT.FLAT);
+ Image image = Activator.getInstance().getImage(containerType.getEClass());
+ if (containerEClass != null) {
+ image = Activator.getInstance().getImage(containerEClass);
+ }
+ newTypeContainerButton.setImage(image);
+ newTypeContainerButton.setLayoutData(new GridData(SWT.NONE));
+
+ lInsideScrolledForm.reflow(true);
+ lSection.setClient(lInsideScrolledForm);
+ }
+
+
+ @Override
+ protected void okPressed() {
+
+ // Build type creation command if needed
+ boolean isSelectionMode = selectionRadio.getSelection();
+ if (!isSelectionMode) {
+ // Creation mode - Prepare type creation command and set existing type to null.
+ existingType = null;
+ buildNewTypeCreateCommand();
+
+ } else {
+ // Selection mode - Set the type creation command to null.
+ newTypeCreateCommand = null;
+ }
+
+ super.okPressed();
+ }
+
+ protected void buildNewTypeCreateCommand() {
+ // The new element is expected to be a NamedElement.
+ IElementEditService commandService = ElementEditServiceUtils.getCommandProvider(newTypeContainer);
+ if (commandService != null) {
+ CreateElementRequest createTypeRequest = new CreateElementRequest(newTypeContainer, elementType);
+ createTypeRequest.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new ConfigureFeatureCommandFactory(UMLPackage.eINSTANCE.getNamedElement_Name(), newTypeNameText.getText()));
+ newTypeCreateCommand = commandService.getEditCommand(createTypeRequest);
+ }
+ }
+
+ public ICommand getNewTypeCreateCommand() {
+ return newTypeCreateCommand;
+ }
+
+ public String getNewTypeName() {
+ return newTypeNameText.getText();
+ }
+
+ public EObject getExistingType() {
+ return existingType;
+ }
+
+ /**
+ * Add listeners to widgets
+ */
+ protected void hookListeners() {
+ // listener to choose active section
+ SelectionListener selectCreateListener = new SelectionAdapter() {
+
+ /**
+ * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+ */
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ if (creationRadio.equals(e.getSource())) {
+ refreshSectionsEnable(false);
+ } else {
+ refreshSectionsEnable(true);
+ }
+ refreshOkButton();
+ }
+ };
+ selectionRadio.addSelectionListener(selectCreateListener);
+ creationRadio.addSelectionListener(selectCreateListener);
+
+ // listener to select existing element
+ SelectionListener selectBtnListener = new SelectionAdapter() {
+
+ /**
+ * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+ */
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ handleChooseType();
+ refreshOkButton();
+ }
+ };
+ existingTypeButton.addSelectionListener(selectBtnListener);
+
+ // listener to existing element name
+ ModifyListener lNameListener = new ModifyListener() {
+
+ /**
+ * @see org.eclipse.swt.events.ModifyListener#modifyText(org.eclipse.swt.events.ModifyEvent)
+ */
+ @Override
+ public void modifyText(ModifyEvent e) {
+ setNewTypeName(existingTypeNameText.getText());
+ }
+ };
+ existingTypeNameText.addModifyListener(lNameListener);
+
+ // listener to select new element type container
+ SelectionListener selectTypeBtnListener = new SelectionAdapter() {
+
+ /**
+ * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+ */
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ handleChooseNewTypeContainer();
+ // reset name if not set
+ if (newTypeName == null) {
+ setNewTypeName(null);
+ }
+ refreshOkButton();
+ }
+ };
+ newTypeContainerButton.addSelectionListener(selectTypeBtnListener);
+
+ // listener to new element name
+ ModifyListener lNewNameListener = new ModifyListener() {
+
+ /**
+ * @see org.eclipse.swt.events.ModifyListener#modifyText(org.eclipse.swt.events.ModifyEvent)
+ */
+ @Override
+ public void modifyText(ModifyEvent e) {
+ validateNewTypeName();
+ refreshOkButton();
+ }
+ };
+ newTypeNameText.addModifyListener(lNewNameListener);
+ }
+
+ /**
+ * Set the name of the new type
+ *
+ * @param text
+ * the text string or null for auto-initialization
+ */
+ protected void setNewTypeName(String text) {
+ String name = text;
+ if (text == null) {
+ name = NamedElementUtil.getDefaultNameWithIncrementFromBase(elementType.getEClass().getName(), newTypeContainer.eContents());
+ if (elementEClass != null) {
+ name = NamedElementUtil.getDefaultNameWithIncrementFromBase(elementEClass.getName(), newTypeContainer.eContents());
+ }
+ newTypeNameText.setText(name);
+
+ } else {
+ newTypeNameText.setText(name);
+ newTypeName = name;
+ }
+
+ validateNewTypeName();
+ refreshOkButton();
+ }
+
+ protected void validateNewTypeName() {
+ if (isValidName(newTypeContainer, newTypeNameText.getText())) {
+ Color black = newTypeNameText.getDisplay().getSystemColor(SWT.COLOR_BLACK);
+ newTypeNameText.setForeground(black);
+
+ } else {
+ Color red = newTypeNameText.getDisplay().getSystemColor(SWT.COLOR_RED);
+ newTypeNameText.setForeground(red);
+ }
+ }
+
+ protected boolean isValidName(EObject container, String newName) {
+ boolean isValid = true;
+ if (container instanceof Namespace) {
+ if (((Namespace) container).getOwnedMember(newName) != null) {
+ isValid = false;
+ }
+ }
+
+ return isValid;
+ }
+
+ /** Open the dialog to choose an existing type */
+ protected void handleChooseType() {
+
+ TreeSelectorDialog dialog = new TreeSelectorDialog(getShell());
+
+ dialog.setMessage(getTypeDialogMessage());
+ dialog.setTitle(getTypeDialogTitle());
+ dialog.setInput(EcoreUtil.getRootContainer(defaultContainer));
+
+ ServiceEditContentProvider provider = new ServiceEditContentProvider(elementType, editedFeature, EcoreUtil.getRootContainer(defaultContainer));
+ provider.setNotWantedMetaclasses(notWantedMetaclasses);
+
+ dialog.setContentProvider(provider);
+ dialog.setLabelProvider(labelProvider);
+
+ if (dialog.open() == Window.OK) {
+ Object result = dialog.getResult()[0];
+ if (result instanceof IAdaptable) {
+ result = EMFHelper.getEObject(result);
+ }
+
+ if (result instanceof EObject) {
+ setExistingTypeSelection((EObject) result);
+ } else {
+ setExistingTypeSelection(null);
+ }
+ }
+ }
+
+ /**
+ * Set the existing type selected (if selection mode is chosen)
+ *
+ * @param invokedElement
+ * the selected element
+ */
+ protected void setExistingTypeSelection(EObject type) {
+ if (type == null) {
+ existingTypeNameText.setText("");
+ } else {
+ existingType = type;
+ existingTypeNameText.setText(labelProvider.getText(existingType));
+ }
+ }
+
+ /** Open the dialog to choose new type container */
+ protected void handleChooseNewTypeContainer() {
+
+ TreeSelectorDialog dialog = new TreeSelectorDialog(getShell());
+
+ dialog.setMessage(getNewTypeContainerDialogMessage());
+ dialog.setTitle(getNewTypeContainerDialogTitle());
+ dialog.setInput(EcoreUtil.getRootContainer(defaultContainer));
+
+ ServiceEditContentProvider provider = new ServiceEditContentProvider(containerType, containerFeature, EcoreUtil.getRootContainer(defaultContainer));
+ dialog.setContentProvider(provider);
+ dialog.setLabelProvider(labelProvider);
+
+ if (dialog.open() == Window.OK) {
+ Object result = dialog.getResult()[0];
+ if (result instanceof IAdaptable) {
+ result = EMFHelper.getEObject(result);
+ }
+
+ if (result instanceof EObject) {
+ setNewTypeContainer((EObject) result);
+ } else {
+ setNewTypeContainer(null);
+ }
+ }
+ }
+
+ /**
+ * Define the type of the object that will be created (if creation mode is chosen)
+ *
+ * @param the
+ * selected parent
+ */
+ protected void setNewTypeContainer(EObject container) {
+
+ if ((containerType instanceof ISpecializationType) && ((ISpecializationType) containerType).getMatcher().matches(container)) {
+ newTypeContainer = container;
+ newTypeContainerNameText.setText(labelProvider.getText(newTypeContainer));
+
+ } else if (containerType.getEClass().isInstance(container)) {
+ newTypeContainer = container;
+ newTypeContainerNameText.setText(labelProvider.getText(newTypeContainer));
+
+ } else {
+ newTypeContainer = null;
+ newTypeContainerNameText.setText("");
+ }
+ }
+
+ /**
+ * Refresh the enabled and disabled elements in various sections
+ *
+ * @param isSelectionSelected
+ * true if we choose to select an existing element, false if we choose to create an element
+ */
+ private void refreshSectionsEnable(boolean isSelectionSelected) {
+ // handle radio button value
+ if (isSelectionSelected) {
+ creationRadio.setSelection(false);
+ if (!selectionRadio.getSelection()) {
+ selectionRadio.setSelection(true);
+ }
+ } else {
+ selectionRadio.setSelection(false);
+ if (!creationRadio.getSelection()) {
+ creationRadio.setSelection(true);
+ }
+ }
+ // handle disabled section
+ existingTypeNameText.setEnabled(isSelectionSelected);
+ existingTypeButton.setEnabled(isSelectionSelected);
+ newTypeNameText.setEnabled(!isSelectionSelected);
+ newTypeNameText.setFocus();
+ newTypeContainerNameText.setEnabled(!isSelectionSelected);
+ newTypeContainerButton.setEnabled(!isSelectionSelected);
+ }
+
+
+ /** Refresh the OK button activation */
+ protected void refreshOkButton() {
+ boolean isSelectionSelected = selectionRadio.getSelection();
+ if (getButton(IDialogConstants.OK_ID) != null && !getButton(IDialogConstants.OK_ID).isDisposed()) {
+ if (isSelectionSelected) {
+ getButton(IDialogConstants.OK_ID).setEnabled(existingType != null);
+ } else {
+ getButton(IDialogConstants.OK_ID).setEnabled((newTypeContainer != null) && (isValidName(newTypeContainer, newTypeNameText.getText())));
+ }
+ }
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/dialogs/CreateOrSelectValuePropertyTypeDialog.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/dialogs/CreateOrSelectValuePropertyTypeDialog.java
new file mode 100755
index 0000000..16503d2
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/dialogs/CreateOrSelectValuePropertyTypeDialog.java
@@ -0,0 +1,286 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.dialogs;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.jface.viewers.ComboViewer;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.papyrus.gmf.diagram.common.provider.ElementTypeLabelProvider;
+import org.eclipse.papyrus.infra.services.edit.commands.ConfigureFeatureCommandFactory;
+import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.sysml.blocks.BlocksPackage;
+import org.eclipse.papyrus.sysml.diagram.common.Activator;
+import org.eclipse.papyrus.sysml.diagram.common.messages.Messages;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.eclipse.ui.forms.widgets.Section;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * Dialog for initialization of Value (Property) type (the type is either selected or created).
+ */
+public class CreateOrSelectValuePropertyTypeDialog extends CreateOrSelectTypeDialog {
+
+ protected ComboViewer newTypeKindComboViewer = null;
+
+ protected Combo newTypeKindCombo = null;
+
+ protected IElementType[] valueTypeKind = { UMLElementTypes.DATA_TYPE, SysMLElementTypes.VALUE_TYPE, UMLElementTypes.PRIMITIVE_TYPE, UMLElementTypes.ENUMERATION };
+
+ protected IElementType newTypeKind = UMLElementTypes.DATA_TYPE;
+
+ /** Constructor */
+ public CreateOrSelectValuePropertyTypeDialog(Shell shell, NamedElement owner) {
+ super(shell, owner, UMLElementTypes.DATA_TYPE, UMLPackage.eINSTANCE.getTypedElement_Type(), null, UMLElementTypes.PACKAGE, UMLPackage.eINSTANCE.getPackage_PackagedElement(), null);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void createFormCreationSection(Composite pParent, FormToolkit pToolkit) {
+ // create the section
+ String lSectionTitle = getCreationSectionTitle();
+ Section lSection = pToolkit.createSection(pParent, ExpandableComposite.EXPANDED | ExpandableComposite.TITLE_BAR);
+ lSection.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ if (lSectionTitle != null) {
+ lSection.setText(lSectionTitle);
+ }
+
+ ScrolledForm lInsideScrolledForm = pToolkit.createScrolledForm(lSection);
+ lInsideScrolledForm.setExpandHorizontal(true);
+ lInsideScrolledForm.setExpandVertical(true);
+ Composite lBody = lInsideScrolledForm.getBody();
+
+ GridLayout lLayout = new GridLayout();
+ lLayout.numColumns = 3;
+ lBody.setLayout(lLayout);
+
+ // content of the section
+ creationRadio = pToolkit.createButton(lBody, getCreationSectionRadioLabel(), SWT.RADIO);
+ creationRadio.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 3, 1));
+
+ pToolkit.createLabel(lBody, getNewTypeNameLabel(), SWT.NONE);
+ newTypeNameText = pToolkit.createText(lBody, "", SWT.BORDER);
+ newTypeNameText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
+ newTypeNameText.setFocus();
+
+ // manage type selection
+ pToolkit.createLabel(lBody, getNewTypeContainerNameLabel(), SWT.NONE);
+ newTypeContainerNameText = pToolkit.createText(lBody, labelProvider.getText(newTypeContainer), SWT.BORDER | SWT.READ_ONLY);
+ newTypeContainerNameText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ newTypeContainerButton = pToolkit.createButton(lBody, "...", SWT.FLAT);
+ Image image = Activator.getInstance().getImage(containerType.getEClass());
+ if (containerEClass != null) {
+ image = Activator.getInstance().getImage(containerEClass);
+ }
+ newTypeContainerButton.setImage(image);
+ newTypeContainerButton.setLayoutData(new GridData(SWT.NONE));
+
+ pToolkit.createLabel(lBody, getNewTypeKindLabel(), SWT.NONE);
+ newTypeKindCombo = new Combo(lBody, SWT.DROP_DOWN | SWT.READ_ONLY);
+ newTypeKindComboViewer = new ComboViewer(newTypeKindCombo);
+ pToolkit.adapt(newTypeKindCombo);
+ newTypeKindCombo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
+ newTypeKindComboViewer.setLabelProvider(new ElementTypeLabelProvider());
+ newTypeKindComboViewer.add(valueTypeKind);
+ newTypeKindComboViewer.setSelection(new StructuredSelection(valueTypeKind[0]));
+
+ lInsideScrolledForm.reflow(true);
+ lSection.setClient(lInsideScrolledForm);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void buildNewTypeCreateCommand() {
+ // The new element is expected to be a NamedElement.
+ IElementEditService commandService = ElementEditServiceUtils.getCommandProvider(newTypeContainer);
+ if (commandService != null) {
+ CreateElementRequest createTypeRequest = new CreateElementRequest(newTypeContainer, newTypeKind);
+ createTypeRequest.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new ConfigureFeatureCommandFactory(UMLPackage.eINSTANCE.getNamedElement_Name(), newTypeNameText.getText()));
+ newTypeCreateCommand = commandService.getEditCommand(createTypeRequest);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void hookListeners() {
+ super.hookListeners();
+
+ // listener to select invocation type
+ ModifyListener newTypeKindListener = new ModifyListener() {
+
+ /**
+ * @see org.eclipse.swt.events.ModifyListener#modifyText(org.eclipse.swt.events.ModifyEvent)
+ */
+ @Override
+ public void modifyText(ModifyEvent e) {
+ ISelection sel = newTypeKindComboViewer.getSelection();
+ if (sel instanceof StructuredSelection) {
+ Object type = ((StructuredSelection) sel).getFirstElement();
+ if (type instanceof IElementType) {
+ newTypeKind = (IElementType) type;
+ } else {
+ newTypeKind = null;
+ }
+
+ // reset name
+ setNewTypeName(null);
+ }
+ }
+ };
+ newTypeKindCombo.addModifyListener(newTypeKindListener);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void setNewTypeName(String text) {
+ String name = text;
+ if (text == null) {
+ name = NamedElementUtil.getDefaultNameWithIncrementFromBase(newTypeKind.getEClass().getName(), newTypeContainer.eContents());
+ if (newTypeKind == SysMLElementTypes.VALUE_TYPE) {
+ name = NamedElementUtil.getDefaultNameWithIncrementFromBase(BlocksPackage.eINSTANCE.getValueType().getName(), newTypeContainer.eContents());
+ }
+ newTypeNameText.setText(name);
+
+ } else {
+ newTypeNameText.setText(name);
+ newTypeName = name;
+ }
+
+ validateNewTypeName();
+ refreshOkButton();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getDialogTitle() {
+ return Messages.CreateOrSelectValuePropertyTypeDialog_DialogTitle;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getSelectionSectionTitle() {
+ return Messages.CreateOrSelectValuePropertyTypeDialog_SelectionSectionTitle;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getSelectionSectionRadioLabel() {
+ return Messages.CreateOrSelectValuePropertyTypeDialog_SelectionSectionRadioLabel;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getCreationSectionTitle() {
+ return Messages.CreateOrSelectValuePropertyTypeDialog_CreationSectionTitle;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getCreationSectionRadioLabel() {
+ return Messages.CreateOrSelectValuePropertyTypeDialog_CreationSectionRadioLabel;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getNewTypeNameLabel() {
+ return Messages.CreateOrSelectValuePropertyTypeDialog_NewTypeNameLabel;
+ }
+
+ /**
+ * Get the newTypeKind label.
+ *
+ * @return the label
+ */
+ protected String getNewTypeKindLabel() {
+ return Messages.CreateOrSelectValuePropertyTypeDialog_NewTypeKindLabel;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getNewTypeContainerNameLabel() {
+ return Messages.CreateOrSelectValuePropertyTypeDialog_NewTypeContainerNameLabel;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getNewTypeContainerDialogTitle() {
+ return Messages.CreateOrSelectValuePropertyTypeDialog_SelectNewTypeContainerDialogTitle;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getNewTypeContainerDialogMessage() {
+ return Messages.CreateOrSelectValuePropertyTypeDialog_SelectNewTypeContainerDialogMessage;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getTypeDialogTitle() {
+ return Messages.CreateOrSelectValuePropertyTypeDialog_SelectTypeDialogTitle;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getTypeDialogMessage() {
+ return Messages.CreateOrSelectValuePropertyTypeDialog_SelectTypeDialogMessage;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/dialogs/ServiceEditContentProvider.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/dialogs/ServiceEditContentProvider.java
new file mode 100755
index 0000000..7a6975c
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/dialogs/ServiceEditContentProvider.java
@@ -0,0 +1,42 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.dialogs;
+
+import java.util.Collections;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.infra.services.edit.ui.dialogs.ElementTypeValidator;
+import org.eclipse.papyrus.uml.tools.providers.SemanticUMLContentProvider;
+
+/**
+ * A content provider that takes into account the nature of the searched element
+ * (org.eclipse.papyrus.uml.tools.providers.ServiceEditFilteredContentProvider).
+ */
+public class ServiceEditContentProvider extends SemanticUMLContentProvider {
+
+ private ElementTypeValidator validator;
+
+ public ServiceEditContentProvider(IElementType elementType, EStructuralFeature feature, EObject semanticRoot) {
+ super(semanticRoot.eResource().getResourceSet());
+ setWantedMetaclasses(Collections.singletonList(feature.getEType()));
+ validator = new ElementTypeValidator(elementType);
+ }
+
+ @Override
+ public boolean isValidValue(Object element) {
+ return super.isValidValue(element) && validator.validate(new Object[] { getAdaptedValue(element) }).isOK();
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/part/AssociationEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/part/AssociationEditPart.java
new file mode 100755
index 0000000..aa80e04
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/part/AssociationEditPart.java
@@ -0,0 +1,308 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.edit.part;
+
+import org.eclipse.draw2d.Connection;
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.common.figure.AssociationFigure;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.AbstractElementLinkEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.AssociationLinkLabelSourceMultiplicityEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.AssociationLinkLabelSourceRoleEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.AssociationLinkLabelTargetMultiplicityEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.AssociationLinkLabelTargetRoleEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.NamedElementLinkLabelNameEditPart;
+import org.eclipse.papyrus.uml.diagram.common.figure.EdgeDecorationType;
+import org.eclipse.papyrus.uml.diagram.common.utils.AssociationViewUtils;
+import org.eclipse.uml2.uml.AggregationKind;
+import org.eclipse.uml2.uml.Association;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Property;
+
+/**
+ * Edit Part for SysML {@link Association}
+ */
+public class AssociationEditPart extends AbstractElementLinkEditPart {
+
+ protected static final String ASSOCIATION_END_LISTENERS_SOURCE = "AssociationEndListenersSource";
+
+ protected static final String ASSOCIATION_END_LISTENERS_TARGET = "AssociationEndListenersTarget";
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void activate() {
+ super.activate();
+ addAssociationEndListeners();
+ }
+
+ /**
+ * this methods add listeners on targets and sources
+ */
+ protected void addAssociationEndListeners() {
+ EObject semanticElement = resolveSemanticElement();
+ if (semanticElement instanceof Association) {
+
+ Association association = (Association) semanticElement;
+
+ if (association.getMemberEnds().size() >= 2) {
+
+ EObject sourceEnd = AssociationViewUtils.getSourceSemanticEnd(getNotationView());
+ EObject targetEnd = AssociationViewUtils.getTargetSemanticEnd(getNotationView());
+
+ addListenerFilter(ASSOCIATION_END_LISTENERS_SOURCE, this, sourceEnd);
+ addListenerFilter(ASSOCIATION_END_LISTENERS_TARGET, this, targetEnd);
+
+ }
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void deactivate() {
+ removeAssociationEndListeners();
+ super.deactivate();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ super.handleNotificationEvent(event);
+
+ // Set association ends appearance (aggregation diamond, navigable arrow, etc...)
+ if (resolveSemanticElement() != null) {
+ refreshVisuals();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+
+ if (resolveSemanticElement() != null) {
+ if (getSource() == null || getTarget() == null) {
+ return;
+ }
+ if (((GraphicalEditPart) getSource()).resolveSemanticElement() == null || ((GraphicalEditPart) getTarget()).resolveSemanticElement() == null) {
+ return;
+ }
+
+ Property source = AssociationViewUtils.getSourceSemanticEnd(getNotationView());
+ Property target = AssociationViewUtils.getTargetSemanticEnd(getNotationView());
+ if (source == null || target == null) {
+ return;
+ }
+
+ // Get the association
+ Element umlElement = getUMLElement();
+ if (umlElement instanceof Association) {
+ Association association = (Association) getUMLElement();
+
+ // Show navigable arrow if either source or target is navigable
+ // not when both are navigable.
+ if (isNavigable(association, source) && isNavigable(association, target)) {
+
+ // No navigable mark shown on figure.
+ if (source.getAggregation() == AggregationKind.NONE_LITERAL) {
+ setArrowSource(getArrowDecoration(EdgeDecorationType.NONE));
+ }
+ if (target.getAggregation() == AggregationKind.NONE_LITERAL) {
+ setArrowTarget(getArrowDecoration(EdgeDecorationType.NONE));
+ }
+
+ } else {
+
+ if (isNavigable(association, source)) {
+ setArrowTarget(getArrowDecoration(EdgeDecorationType.OPEN_ARROW));
+ if (source.getAggregation() == AggregationKind.NONE_LITERAL) {
+ setArrowSource(getArrowDecoration(EdgeDecorationType.NONE));
+ }
+ }
+
+ if (isNavigable(association, target)) {
+ setArrowSource(getArrowDecoration(EdgeDecorationType.OPEN_ARROW));
+ if (target.getAggregation() == AggregationKind.NONE_LITERAL) {
+ setArrowTarget(getArrowDecoration(EdgeDecorationType.NONE));
+ }
+ }
+
+ }
+
+ if (source.getAggregation() == AggregationKind.SHARED_LITERAL) {
+ setArrowSource(getArrowDecoration(EdgeDecorationType.SOLID_DIAMOND_EMPTY));
+ }
+ if (target.getAggregation() == AggregationKind.SHARED_LITERAL) {
+ setArrowTarget(getArrowDecoration(EdgeDecorationType.SOLID_DIAMOND_EMPTY));
+ }
+
+ if (source.getAggregation() == AggregationKind.COMPOSITE_LITERAL) {
+ setArrowSource(getArrowDecoration(EdgeDecorationType.SOLID_DIAMOND_FILLED));
+ }
+ if (target.getAggregation() == AggregationKind.COMPOSITE_LITERAL) {
+ setArrowTarget(getArrowDecoration(EdgeDecorationType.SOLID_DIAMOND_FILLED));
+ }
+
+ }
+ }
+ }
+
+ /**
+ * SysML implementation for isNavigable.
+ *
+ * @param end
+ * @return
+ */
+ private boolean isNavigable(Association association, Property end) {
+ boolean isNavigable = false;
+
+ if (association.getOwnedEnds().contains(end)) {
+ isNavigable = false;
+ } else {
+ isNavigable = true;
+ }
+
+ return isNavigable;
+ }
+
+ /**
+ * this method is used to remove listener on ends
+ */
+ protected void removeAssociationEndListeners() {
+ removeListenerFilter(ASSOCIATION_END_LISTENERS_SOURCE);
+ removeListenerFilter(ASSOCIATION_END_LISTENERS_TARGET);
+ }
+
+ /**
+ * Constructor.
+ */
+ public AssociationEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ // Start of user code custom policies
+ // End of user code
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof NamedElementLinkLabelNameEditPart) {
+ ((NamedElementLinkLabelNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+ if (childEditPart instanceof AssociationLinkLabelSourceRoleEditPart) {
+ ((AssociationLinkLabelSourceRoleEditPart) childEditPart).setLabel(getPrimaryShape().getSourceRoleLabel());
+ return true;
+ }
+ if (childEditPart instanceof AssociationLinkLabelSourceMultiplicityEditPart) {
+ ((AssociationLinkLabelSourceMultiplicityEditPart) childEditPart).setLabel(getPrimaryShape().getSourceMultiplicityLabel());
+ return true;
+ }
+ if (childEditPart instanceof AssociationLinkLabelTargetRoleEditPart) {
+ ((AssociationLinkLabelTargetRoleEditPart) childEditPart).setLabel(getPrimaryShape().getTargetRoleLabel());
+ return true;
+ }
+ if (childEditPart instanceof AssociationLinkLabelTargetMultiplicityEditPart) {
+ ((AssociationLinkLabelTargetMultiplicityEditPart) childEditPart).setLabel(getPrimaryShape().getTargetMultiplicityLabel());
+ return true;
+ }
+ return super.addFixedChild(childEditPart);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof NamedElementLinkLabelNameEditPart) {
+ return true;
+ }
+ if (childEditPart instanceof AssociationLinkLabelSourceRoleEditPart) {
+ return true;
+ }
+ if (childEditPart instanceof AssociationLinkLabelSourceMultiplicityEditPart) {
+ return true;
+ }
+ if (childEditPart instanceof AssociationLinkLabelTargetRoleEditPart) {
+ return true;
+ }
+ if (childEditPart instanceof AssociationLinkLabelTargetMultiplicityEditPart) {
+ return true;
+ }
+ return super.removeFixedChild(childEditPart);
+ }
+
+ /**
+ * Creates figure for this edit part.
+ */
+ @Override
+ protected Connection createConnectionFigure() {
+ return new AssociationFigure();
+ }
+
+ /**
+ * Creates primary shape for this edit part.
+ */
+ @Override
+ public AssociationFigure getPrimaryShape() {
+ return (AssociationFigure) getFigure();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void refreshLineType() {
+ setLineType(Graphics.LINE_SOLID);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void refreshArrowSource() {
+ // Not implemented, refreshVisuals currently implements this.
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void refreshArrowTarget() {
+ // Not implemented, refreshVisuals currently implements this.
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/part/BlockPropertyCompositeEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/part/BlockPropertyCompositeEditPart.java
new file mode 100755
index 0000000..5552486
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/part/BlockPropertyCompositeEditPart.java
@@ -0,0 +1,271 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.edit.part;
+
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.emf.type.core.ISpecializationType;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
+import org.eclipse.papyrus.sysml.diagram.common.edit.policy.BlockPropertyCompositeSemanticEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.common.figure.BlockPropertyCompositeFigure;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.AbstractElementEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.PortAffixedNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.PropertyNodeLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.policy.EncapsulatedClassifierResizableShapeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.edit.policy.StructuredClassifierCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.BorderItemResizableEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideRelatedContentsEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.locator.PortPositionLocator;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.UMLPackage;
+
+public class BlockPropertyCompositeEditPart extends AbstractElementEditPart {
+
+ public BlockPropertyCompositeEditPart(View view) {
+ super(view);
+ }
+
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new BlockPropertyCompositeSemanticEditPolicy());
+ installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
+ installEditPolicy(ShowHideRelatedContentsEditPolicy.SHOW_HIDE_RELATED_CONTENTS_POLICY, new ShowHideRelatedContentsEditPolicy());
+ installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ installEditPolicy(AffixedNodeAlignmentEditPolicy.AFFIXED_CHILD_ALIGNMENT_ROLE, new AffixedNodeAlignmentEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new StructuredClassifierCreationEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new EncapsulatedClassifierResizableShapeEditPolicy());
+ }
+
+ @Override
+ protected LayoutEditPolicy createLayoutEditPolicy() {
+ org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ if (child instanceof IBorderItemEditPart) {
+ return new BorderItemResizableEditPolicy();
+ }
+
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ @Override
+ protected boolean addFixedChild(EditPart childEditPart) {
+
+ if (childEditPart instanceof PropertyNodeLabelEditPart) {
+ ((PropertyNodeLabelEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+
+ if (childEditPart instanceof FlowPortAffixedNodeEditPart) {
+ IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
+ getBorderedFigure().getBorderItemContainer().add(((FlowPortAffixedNodeEditPart) childEditPart).getFigure(), locator);
+ return true;
+ }
+ if (childEditPart instanceof PortAffixedNodeEditPart) {
+ IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
+ getBorderedFigure().getBorderItemContainer().add(((PortAffixedNodeEditPart) childEditPart).getFigure(), locator);
+ return true;
+ }
+
+ if (childEditPart instanceof BlockPropertyStructureCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getBlockPropertyStructureCompartmentFigure();
+ setupContentPane(pane);
+ pane.add(((BlockPropertyStructureCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+
+ return false;
+ }
+
+ @Override
+ protected boolean removeFixedChild(EditPart childEditPart) {
+
+ if (childEditPart instanceof PropertyNodeLabelEditPart) {
+ return true;
+ }
+
+ if (childEditPart instanceof FlowPortAffixedNodeEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((FlowPortAffixedNodeEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof PortAffixedNodeEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((PortAffixedNodeEditPart) childEditPart).getFigure());
+ return true;
+ }
+
+ if (childEditPart instanceof BlockPropertyStructureCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getBlockPropertyStructureCompartmentFigure();
+ setupContentPane(pane);
+ pane.remove(((BlockPropertyStructureCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+
+ return false;
+ }
+
+ @Override
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ if (editPart instanceof BlockPropertyStructureCompartmentEditPart) {
+ return getPrimaryShape().getBlockPropertyStructureCompartmentFigure();
+ }
+ if (editPart instanceof IBorderItemEditPart) {
+ return getBorderedFigure().getBorderItemContainer();
+ }
+
+ return getContentPane();
+ }
+
+ // public EditPart getTargetEditPart(Request request) {
+ // if(request instanceof CreateViewAndElementRequest) {
+ // CreateElementRequestAdapter adapter = ((CreateViewAndElementRequest)request).getViewAndElementDescriptor().getCreateElementRequestAdapter();
+ // IElementType type = (IElementType)adapter.getAdapter(IElementType.class);
+ // if(type == CustomBlockDefinitionDiagramElementTypes.BLOCK_CONSTRAINT_CLN) {
+ // return getChildBySemanticHint(CustomBlockDefinitionDiagramElementTypes.BLOCK_CONSTRAINT_COMPARTMENT_HINT);
+ // }
+ // }
+ // return super.getTargetEditPart(request);
+ // }
+
+ @Override
+ protected NodeFigure createNodeFigure() {
+ return new SelectableBorderedNodeFigure(createMainFigure());
+ }
+
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new BlockPropertyCompositeFigure();
+ }
+
+ @Override
+ public BlockPropertyCompositeFigure getPrimaryShape() {
+ return (BlockPropertyCompositeFigure) primaryShape;
+ }
+
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLGraphicalTypes.LABEL_UML_PROPERTY_LABEL_ID);
+ }
+
+ /**
+ * <pre>
+ *
+ * {@inheritDoc}
+ * </pre>
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+
+ // A visual refresh may also be needed when the following properties are changing : aggregation, type, or the related association.
+ if (resolveSemanticElement() != null) {
+ EObject element = resolveSemanticElement();
+
+ if ((element != null) && (element.equals(event.getNotifier())) && (element instanceof Property)) {
+
+ if (UMLPackage.eINSTANCE.getProperty_Aggregation().equals(event.getFeature())) {
+ refreshVisuals();
+ }
+
+ if (UMLPackage.eINSTANCE.getTypedElement_Type().equals(event.getFeature())) {
+ refreshVisuals();
+ }
+
+ if (UMLPackage.eINSTANCE.getProperty_Association().equals(event.getFeature())) {
+ refreshVisuals();
+ }
+ }
+ }
+
+ super.handleNotificationEvent(event);
+ }
+
+ /**
+ * <pre>
+ *
+ * {@inheritDoc}
+ * </pre>
+ */
+ @Override
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+
+ String tag = "property";
+ int borderStyle = Graphics.LINE_SOLID;
+
+ if (resolveSemanticElement() != null) {
+ EObject eObject = resolveSemanticElement();
+ if (((ISpecializationType) SysMLElementTypes.PART_PROPERTY).getMatcher().matches(eObject)) {
+ tag = "part";
+
+ } else if (((ISpecializationType) SysMLElementTypes.REFERENCE_PROPERTY).getMatcher().matches(eObject)) {
+ tag = "reference";
+ borderStyle = Graphics.LINE_CUSTOM;
+
+ } else if (((ISpecializationType) SysMLElementTypes.ACTOR_PART_PROPERTY).getMatcher().matches(eObject)) {
+ tag = "actor part";
+
+ } else if (((ISpecializationType) SysMLElementTypes.VALUE_PROPERTY).getMatcher().matches(eObject)) {
+ tag = "value";
+
+ } else {
+ // Consider the element is a Property...
+ }
+ }
+
+ getPrimaryShape().setFigureTag(tag);
+ getPrimaryShape().setBorderStyle(borderStyle);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/part/ConstraintBlockPropertyCompositeEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/part/ConstraintBlockPropertyCompositeEditPart.java
new file mode 100755
index 0000000..56f04e7
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/part/ConstraintBlockPropertyCompositeEditPart.java
@@ -0,0 +1,291 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.edit.part;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.StringValueStyle;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
+import org.eclipse.papyrus.sysml.diagram.common.edit.policy.BlockPropertyCompositeSemanticEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.common.figure.ConstraintBlockPropertyCompositeFigure;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.AbstractElementEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.ConstraintNodeLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.ConstraintParameterAffixedNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.PropertyNodeLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.policy.EncapsulatedClassifierResizableShapeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.edit.policy.StructuredClassifierCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.BorderItemResizableEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideRelatedContentsEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.locator.FullInsidePortPositionLocator;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.UMLPackage;
+
+public class ConstraintBlockPropertyCompositeEditPart extends AbstractElementEditPart {
+
+ public static final String REPRESENTATION_MODE_STYLE = "representation_mode_style";
+ public static final String ROUNDED_REPRESENTATION = "rounded_representation";
+ public static final String SQUARE_REPRESENTATION_WITH_STRUCTURE = "square_representation_with_structure";
+
+ public Map<EditPart, FullInsidePortPositionLocator> constraintParameter2FullInsidePortPositionLocator = new HashMap<EditPart, FullInsidePortPositionLocator>();
+
+ public static String lastRepresentationKind;
+
+ public ConstraintBlockPropertyCompositeEditPart(View view) {
+ super(view);
+ }
+
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new BlockPropertyCompositeSemanticEditPolicy());
+ installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
+ installEditPolicy(ShowHideRelatedContentsEditPolicy.SHOW_HIDE_RELATED_CONTENTS_POLICY, new ShowHideRelatedContentsEditPolicy());
+ installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ installEditPolicy(AffixedNodeAlignmentEditPolicy.AFFIXED_CHILD_ALIGNMENT_ROLE, new AffixedNodeAlignmentEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new StructuredClassifierCreationEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new EncapsulatedClassifierResizableShapeEditPolicy());
+ }
+
+ @Override
+ protected LayoutEditPolicy createLayoutEditPolicy() {
+ org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ if (child instanceof IBorderItemEditPart) {
+ return new BorderItemResizableEditPolicy();
+ }
+
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ @Override
+ protected boolean addFixedChild(EditPart childEditPart) {
+
+ if (childEditPart instanceof PropertyNodeLabelEditPart) {
+ ((PropertyNodeLabelEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+ if (childEditPart instanceof ConstraintNodeLabelEditPart) {
+ ((ConstraintNodeLabelEditPart) childEditPart).setLabel(getPrimaryShape().getConstraintLabel());
+ return true;
+ }
+
+ if (childEditPart instanceof ConstraintParameterAffixedNodeEditPart) {
+ FullInsidePortPositionLocator locator = new FullInsidePortPositionLocator(getMainFigure(), PositionConstants.NONE, getPrimaryShape().getCorner());
+ constraintParameter2FullInsidePortPositionLocator.put(childEditPart, locator); // register the locator in order to reset the corner when changing ConstraintProeprty representation
+ getBorderedFigure().getBorderItemContainer().add(((ConstraintParameterAffixedNodeEditPart) childEditPart).getFigure(), locator);
+ return true;
+ }
+
+ return false;
+ }
+
+ @Override
+ protected boolean removeFixedChild(EditPart childEditPart) {
+
+ if (childEditPart instanceof PropertyNodeLabelEditPart) {
+ return true;
+ }
+
+ if (childEditPart instanceof ConstraintNodeLabelEditPart) {
+ return true;
+ }
+ if (childEditPart instanceof ConstraintParameterAffixedNodeEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((ConstraintParameterAffixedNodeEditPart) childEditPart).getFigure());
+ return true;
+ }
+
+ return false;
+ }
+
+ @Override
+ protected void removeChild(EditPart child) {
+ if (child instanceof ConstraintNodeLabelEditPart) {
+ return; // When hiding constraint expression, we want to keep the edit part in order to re-show it
+ }
+ super.removeChild(child);
+ }
+
+ @Override
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ if (editPart instanceof IBorderItemEditPart) {
+ return getBorderedFigure().getBorderItemContainer();
+ }
+
+ return getContentPane();
+ }
+
+ @Override
+ protected NodeFigure createNodeFigure() {
+ return new SelectableBorderedNodeFigure(createMainFigure());
+ }
+
+ @Override
+ protected IFigure createNodeShape() {
+ if (isSquareRepresentationWithStructure()) {
+ primaryShape = new ConstraintBlockPropertyCompositeFigure(SQUARE_REPRESENTATION_WITH_STRUCTURE);
+ }
+ else if (isRoundedRepresentation()) {
+ primaryShape = new ConstraintBlockPropertyCompositeFigure(ROUNDED_REPRESENTATION);
+ }
+ else {
+ if (lastRepresentationIsSquareWithStructure()) {
+ primaryShape = new ConstraintBlockPropertyCompositeFigure(SQUARE_REPRESENTATION_WITH_STRUCTURE);
+ }
+ else {
+ // default
+ if (this.getChildViewBySemanticHint(SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID) != null) {
+ // no style => if structure then square else rounded
+ primaryShape = new ConstraintBlockPropertyCompositeFigure(SQUARE_REPRESENTATION_WITH_STRUCTURE);
+ }
+ else {
+ primaryShape = new ConstraintBlockPropertyCompositeFigure(ROUNDED_REPRESENTATION);
+ }
+ }
+ }
+ return primaryShape;
+ }
+
+ @Override
+ public ConstraintBlockPropertyCompositeFigure getPrimaryShape() {
+ return (ConstraintBlockPropertyCompositeFigure) primaryShape;
+ }
+
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLGraphicalTypes.LABEL_UML_PROPERTY_LABEL_ID);
+ }
+
+ @SuppressWarnings("rawtypes")
+ @Override
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+
+ List children = getChildren();
+ for (Object editPart : children) {
+ if (editPart instanceof EditPart) {
+ ((EditPart) editPart).refresh();
+ }
+ }
+ }
+
+ public boolean isSquareRepresentationWithStructure() {
+ StringValueStyle style = (StringValueStyle) ((View) this.getModel()).getStyle(NotationPackage.eINSTANCE.getStringValueStyle());
+ if (style == null) {
+ return false;
+ }
+ return SQUARE_REPRESENTATION_WITH_STRUCTURE.equals(style.getStringValue());
+ }
+
+ public boolean isRoundedRepresentation() {
+ StringValueStyle style = (StringValueStyle) ((View) this.getModel()).getStyle(NotationPackage.eINSTANCE.getStringValueStyle());
+ if (style == null) {
+ return false;
+ }
+ return ROUNDED_REPRESENTATION.equals(style.getStringValue());
+ }
+
+ /**
+ * <pre>
+ *
+ * {@inheritDoc}
+ * </pre>
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+
+ // A visual refresh may also be needed when the following properties are changing : aggregation, type, or the related association.
+ if (resolveSemanticElement() != null) {
+ EObject element = resolveSemanticElement();
+
+ if ((element != null) && (element.equals(event.getNotifier())) && (element instanceof Property)) {
+
+ if (UMLPackage.eINSTANCE.getProperty_Aggregation().equals(event.getFeature())) {
+ refreshVisuals();
+ }
+
+ if (UMLPackage.eINSTANCE.getTypedElement_Type().equals(event.getFeature())) {
+ refreshVisuals();
+ }
+
+ if (UMLPackage.eINSTANCE.getProperty_Association().equals(event.getFeature())) {
+ refreshVisuals();
+ }
+ }
+ }
+ super.handleNotificationEvent(event);
+ refresh();
+ }
+
+ public static boolean lastRepresentationIsSquareWithStructure() {
+ return ConstraintBlockPropertyCompositeEditPart.SQUARE_REPRESENTATION_WITH_STRUCTURE.equals(ConstraintBlockPropertyCompositeEditPart.lastRepresentationKind);
+ }
+
+ public static void setLastRepresentation(String representationKind) {
+ ConstraintBlockPropertyCompositeEditPart.lastRepresentationKind = representationKind;
+ }
+
+ public void setCornerLocators(int corner) {
+ for (EditPart editPart : constraintParameter2FullInsidePortPositionLocator.keySet()) {
+ FullInsidePortPositionLocator locator = constraintParameter2FullInsidePortPositionLocator.get(editPart);
+ locator.setCorner(corner);
+ }
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/part/ConstraintPropertyChildLabelEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/part/ConstraintPropertyChildLabelEditPart.java
new file mode 100755
index 0000000..f75e5ed
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/part/ConstraintPropertyChildLabelEditPart.java
@@ -0,0 +1,57 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.edit.part;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.constraints.ConstraintProperty;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.AbstractElementChildLabelEditPart;
+
+/**
+ * Edit part for {@link ConstraintProperty} used as Child label node.
+ */
+public class ConstraintPropertyChildLabelEditPart extends AbstractElementChildLabelEditPart {
+
+ /** Constructor */
+ public ConstraintPropertyChildLabelEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ }
+
+ // /**
+ // * {@inheritDoc}
+ // */
+ // @Override
+ // protected Image getLabelIcon() {
+ // EObject parserElement = getParserElement();
+ // if(parserElement == null) {
+ // return null;
+ // }
+ //
+ // List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
+ // for(View view : views) {
+ // if(NameLabelIconHelper.showLabelIcon(view)) {
+ // return Activator.getInstance().getLabelProvider().getImage(parserElement);
+ // }
+ // }
+ //
+ // return null;
+ // }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/part/CustomFlowPortAppliedStereotypeEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/part/CustomFlowPortAppliedStereotypeEditPart.java
new file mode 100755
index 0000000..0063f30
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/part/CustomFlowPortAppliedStereotypeEditPart.java
@@ -0,0 +1,72 @@
+/**
+ * Copyright (c) 2015 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:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 472932
+ */
+package org.eclipse.papyrus.sysml.diagram.common.edit.part;
+
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.edit.parts.PortAppliedStereotypeEditPart;
+import org.eclipse.papyrus.uml.diagram.composite.edit.policies.UMLTextSelectionEditPolicy;
+
+/**
+ * The custom edit policy for the port applied stereotype.
+ */
+public class CustomFlowPortAppliedStereotypeEditPart extends PortAppliedStereotypeEditPart {
+
+ /**
+ * Constructor.
+ *
+ * @param view
+ * The view
+ */
+ public CustomFlowPortAppliedStereotypeEditPart(final View view) {
+ super(view);
+ }
+
+ /**
+ * Redefine the refresh label to get the STEREOTYPE_LABEL_POLICY if exist and don't recalculate the text.
+ *
+ * @see org.eclipse.papyrus.uml.diagram.composite.edit.parts.PortAppliedStereotypeEditPart#refreshLabel()
+ */
+ @Override
+ protected void refreshLabel() {
+ EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
+ if (maskLabelPolicy == null) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ // Bug 472932 : Stereotype is always displayed
+ if (maskLabelPolicy == null) {
+ maskLabelPolicy = getEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY);
+ }
+ if (maskLabelPolicy == null) {
+ final View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ } else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ final Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ final Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+}
+
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/part/FlowPortAffixedLabelNameEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/part/FlowPortAffixedLabelNameEditPart.java
new file mode 100755
index 0000000..f21cb9d
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/part/FlowPortAffixedLabelNameEditPart.java
@@ -0,0 +1,126 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.edit.part;
+
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.papyrus.infra.emf.appearance.helper.AppearanceHelper;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.sysml.diagram.common.Activator;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.AbstractElementLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.util.DiagramEditPartsUtil;
+import org.eclipse.swt.graphics.Image;
+
+/**
+ * This class implements a FlowPort affixed label edit part.
+ */
+public class FlowPortAffixedLabelNameEditPart extends AbstractElementLabelEditPart implements IBorderItemEditPart {
+
+ /** label provider for icons */
+ private final ILabelProvider labelProvider;
+
+ /** Constructor */
+ public FlowPortAffixedLabelNameEditPart(View view) {
+ super(view);
+ addSnapBackLocation();
+ labelProvider = Activator.getInstance().getLabelProvider();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ }
+
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return constraint instanceof IBorderItemLocator ? (IBorderItemLocator) constraint : null;
+ }
+ return null;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Image getLabelIcon() {
+ EObject parserElement = getParserElement();
+ if (parserElement == null) {
+ return null;
+ }
+
+ List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
+ for (View view : views) {
+ if (AppearanceHelper.showElementIcon(view)) {
+ return labelProvider.getImage(parserElement);
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+
+
+ /**
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusLabelEditPart#getDefaultTextAlignment()
+ *
+ * @return
+ */
+ @Override
+ protected int getDefaultTextAlignment() {
+ return PositionConstants.LEFT;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getLabelRole() {
+ return "Label"; //$NON-NLS-1$
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getIconPathRole() {
+ return ""; //$NON-NLS-1$
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/part/FlowPortAffixedNodeEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/part/FlowPortAffixedNodeEditPart.java
new file mode 100755
index 0000000..ce77cd9
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/part/FlowPortAffixedNodeEditPart.java
@@ -0,0 +1,336 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.edit.part;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.LayoutListener;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.LayoutEditPolicy;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.handles.MoveHandle;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.gmf.diagram.common.edit.policy.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IPapyrusEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.Activator;
+import org.eclipse.papyrus.sysml.diagram.common.figure.FlowPortFigure;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.portandflows.FlowPort;
+import org.eclipse.papyrus.sysml.portandflows.PortandflowsPackage;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.AbstractElementBorderEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.AbstractElementLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeIconlDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.IPapyrusUMLElementFigure;
+import org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+/**
+ * This class implements an edit part for FlowPort represented as border items.
+ */
+public class FlowPortAffixedNodeEditPart extends AbstractElementBorderEditPart {
+
+ private LayoutListener.Stub layoutInitializationListener;
+
+ public FlowPortAffixedNodeEditPart(View view) {
+ super(view);
+ }
+
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeIconlDisplayEditPolicy() {
+
+ /**
+ * <pre>
+ * {@inheritDoc}
+ *
+ * This modifies the edit policy in order to call refreshVisuals() whenever the stereotype image to show is null.
+ * (required to show the FlowPort default image correctly).
+ * </pre>
+ */
+ @Override
+ protected void refreshStereotypeDisplay() {
+ if (getHost() instanceof IPapyrusEditPart) {
+ IFigure figure = ((IPapyrusEditPart) getHost()).getPrimaryShape();
+
+ if ((figure instanceof IPapyrusUMLElementFigure) && (stereotypeIconToDisplay() != null)) {
+ ((IPapyrusUMLElementFigure) figure).setStereotypeDisplay(null, stereotypeIconToDisplay());
+ } else {
+ refreshVisuals();
+ }
+ }
+ }
+
+ });
+
+ installEditPolicy(ShowHideLabelEditPolicy.SHOW_HIDE_LABEL_ROLE, new ShowHideLabelEditPolicy());
+ }
+
+ @Override
+ protected LayoutEditPolicy createLayoutEditPolicy() {
+ org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ if (child instanceof IBorderItemEditPart) { // External labels
+ return new ExternalLabelPrimaryDragRoleEditPolicy() {
+
+ @Override
+ @SuppressWarnings("rawtypes")
+ protected List createSelectionHandles() {
+ MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ mh.setBorder(null);
+ return Collections.singletonList(mh);
+ }
+ };
+ }
+
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ @Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ return;
+ }
+
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(SysMLGraphicalTypes.AFFIXEDLABEL_SYSML_FLOWPORT_LABEL_ID);
+ }
+
+ @Override
+ protected void addSemanticListeners() {
+
+ if (resolveSemanticElement() != null) {
+
+ FlowPort flowPort = UMLUtil.getStereotypeApplication((Element) resolveSemanticElement(), FlowPort.class);
+ if (flowPort != null) {
+ addListenerFilter("FlowPort", this, flowPort); //$NON-NLS-1$
+ }
+ }
+
+ super.addSemanticListeners();
+ }
+
+ @Override
+ protected void removeSemanticListeners() {
+ removeListenerFilter("FlowPort"); //$NON-NLS-1$
+ super.removeSemanticListeners();
+ }
+
+ /**
+ * <pre>
+ * Calls the figure refresh when a change event is detected on
+ * UMLPackage.eINSTANCE.getProperty_Aggregation().
+ *
+ * {@inheritDoc}
+ * </pre>
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+
+ // When the flow port position changes, its position on parent side may change and requires a visual refresh.
+ Object feature = event.getFeature();
+ if (NotationPackage.eINSTANCE.getSize_Width().equals(feature) || NotationPackage.eINSTANCE.getSize_Height().equals(feature) || NotationPackage.eINSTANCE.getLocation_X().equals(feature) || NotationPackage.eINSTANCE.getLocation_Y().equals(feature)) {
+ refreshVisuals();
+ }
+
+ // A visual refresh may also be needed when the following properties are changing : isAtomic (depend on the type), direction, isConjugated.
+ if (resolveSemanticElement() != null) {
+ Element element = (Element) resolveSemanticElement();
+ FlowPort flowPort = UMLUtil.getStereotypeApplication(element, FlowPort.class);
+
+ if ((flowPort != null) && (flowPort.equals(event.getNotifier()))) {
+ if (PortandflowsPackage.eINSTANCE.getFlowPort_Direction().equals(event.getFeature())
+ // || PortandflowsPackage.eINSTANCE.getFlowPort_IsAtomic().equals(event.getFeature())
+ || PortandflowsPackage.eINSTANCE.getFlowPort_IsConjugated().equals(event.getFeature())) {
+ refreshVisuals();
+ }
+ }
+
+ // IsAtomic change is triggered by a type change
+ if (resolveSemanticElement().equals(event.getNotifier())) {
+ if (UMLPackage.eINSTANCE.getTypedElement_Type().equals(event.getFeature())) {
+ refreshVisuals();
+ }
+ }
+ }
+
+ super.handleNotificationEvent(event);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new FlowPortFigure();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public FlowPortFigure getPrimaryShape() {
+ return (FlowPortFigure) primaryShape;
+ }
+
+ /**
+ * <pre>
+ * Refresh the figure with the flow port image.
+ *
+ * {@inheritDoc}
+ * </pre>
+ */
+ @Override
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+
+ int side = getBorderItemLocator().getCurrentSideOfParent();
+ if (side == 0) {
+ getBorderItemLocator().getCurrentSideOfParent();
+ }
+
+ Element element = (Element) resolveSemanticElement();
+ FlowPort flowPort = UMLUtil.getStereotypeApplication(element, FlowPort.class);
+
+ Image image = Activator.getInstance().getFlowPortImage(flowPort, side);
+ getPrimaryShape().setImage(image);
+ }
+
+ /**
+ * <pre>
+ * A post layout listener is added during activate and remove the first time the layout occurs.
+ * This is required in order to be able to find the side of this border item on its parent when opening the model.
+ * Without this, the locator is unable to guess the parent side because the parent constraint is not set yet.
+ *
+ * Once the initialization is done, the listener become useless and can be removed.
+ *
+ * {@inheritDoc}
+ * </pre>
+ */
+ @Override
+ public void activate() {
+
+ layoutInitializationListener = new LayoutListener.Stub() {
+
+ @Override
+ public void postLayout(IFigure container) {
+ refreshVisuals();
+ // getBorderedFigure().getBorderItemContainer().removeLayoutListener(layoutInitializationListener);
+ layoutInitializationListener = null;
+ }
+ };
+ getBorderedFigure().getBorderItemContainer().addLayoutListener(layoutInitializationListener);
+
+ super.activate();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+
+ @Override
+ protected void addChildVisual(EditPart childEditPart, int index) {
+ if (addFixedChild(childEditPart)) {
+ return;
+ }
+ super.addChildVisual(childEditPart, -1);
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+
+ @Override
+ protected void removeChildVisual(EditPart childEditPart) {
+ if (removeFixedChild(childEditPart)) {
+ return;
+ }
+ super.removeChildVisual(childEditPart);
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof FlowPortAffixedLabelNameEditPart) {
+ ((FlowPortAffixedLabelNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ IFigure borderItemContainer = getContentPaneFor((IGraphicalEditPart) childEditPart);
+ addBorderItem(borderItemContainer, (IBorderItemEditPart) childEditPart);
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof FlowPortAffixedLabelNameEditPart) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void removeChild(EditPart child) {
+ if (child instanceof AbstractElementLabelEditPart) {
+ return;
+ }
+ super.removeChild(child);
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/part/FlowPortChildLabelEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/part/FlowPortChildLabelEditPart.java
new file mode 100755
index 0000000..707b790
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/part/FlowPortChildLabelEditPart.java
@@ -0,0 +1,57 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.edit.part;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.portandflows.FlowPort;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.AbstractElementChildLabelEditPart;
+
+/**
+ * Edit part for {@link FlowPort} used as Child label node.
+ */
+public class FlowPortChildLabelEditPart extends AbstractElementChildLabelEditPart {
+
+ /** Constructor */
+ public FlowPortChildLabelEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ }
+
+ // /**
+ // * {@inheritDoc}
+ // */
+ // @Override
+ // protected Image getLabelIcon() {
+ // EObject parserElement = getParserElement();
+ // if(parserElement == null) {
+ // return null;
+ // }
+ //
+ // List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
+ // for(View view : views) {
+ // if(NameLabelIconHelper.showLabelIcon(view)) {
+ // return labelProvider.getImage(parserElement);
+ // }
+ // }
+ //
+ // return null;
+ // }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/part/FlowPropertyChildLabelEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/part/FlowPropertyChildLabelEditPart.java
new file mode 100755
index 0000000..3143569
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/part/FlowPropertyChildLabelEditPart.java
@@ -0,0 +1,57 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.edit.part;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.portandflows.FlowProperty;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.AbstractElementChildLabelEditPart;
+
+/**
+ * Edit part for {@link FlowProperty} used as Child label node.
+ */
+public class FlowPropertyChildLabelEditPart extends AbstractElementChildLabelEditPart {
+
+ /** Constructor */
+ public FlowPropertyChildLabelEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ }
+
+ // /**
+ // * {@inheritDoc}
+ // */
+ // @Override
+ // protected Image getLabelIcon() {
+ // EObject parserElement = getParserElement();
+ // if(parserElement == null) {
+ // return null;
+ // }
+ //
+ // List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
+ // for(View view : views) {
+ // if(NameLabelIconHelper.showLabelIcon(view)) {
+ // return labelProvider.getImage(parserElement);
+ // }
+ // }
+ //
+ // return null;
+ // }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/part/NestedBlockPropertyCompositeEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/part/NestedBlockPropertyCompositeEditPart.java
new file mode 100755
index 0000000..366ca21
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/part/NestedBlockPropertyCompositeEditPart.java
@@ -0,0 +1,258 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.edit.part;
+
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.emf.type.core.ISpecializationType;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
+import org.eclipse.papyrus.sysml.diagram.common.edit.policy.NestedBlockPropertyCompositeSemanticEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.common.figure.NestedBlockPropertyCompositeFigure;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.AbstractElementEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.PortAffixedNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.PropertyNodeLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.policy.EncapsulatedClassifierResizableShapeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.edit.policy.StructuredClassifierCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.BorderItemResizableEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideRelatedContentsEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.locator.PortPositionLocator;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * Edit part for nested Block property shown as composite.
+ */
+@Deprecated
+public class NestedBlockPropertyCompositeEditPart extends AbstractElementEditPart {
+
+ public NestedBlockPropertyCompositeEditPart(View view) {
+ super(view);
+ }
+
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new NestedBlockPropertyCompositeSemanticEditPolicy());
+ installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
+ installEditPolicy(ShowHideRelatedContentsEditPolicy.SHOW_HIDE_RELATED_CONTENTS_POLICY, new ShowHideRelatedContentsEditPolicy());
+ installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ installEditPolicy(AffixedNodeAlignmentEditPolicy.AFFIXED_CHILD_ALIGNMENT_ROLE, new AffixedNodeAlignmentEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new StructuredClassifierCreationEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new EncapsulatedClassifierResizableShapeEditPolicy());
+ }
+
+ @Override
+ protected LayoutEditPolicy createLayoutEditPolicy() {
+ org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ if (child instanceof IBorderItemEditPart) {
+ return new BorderItemResizableEditPolicy();
+ }
+
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ @Override
+ protected boolean addFixedChild(EditPart childEditPart) {
+
+ if (childEditPart instanceof PropertyNodeLabelEditPart) {
+ ((PropertyNodeLabelEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+
+ if (childEditPart instanceof FlowPortAffixedNodeEditPart) {
+ IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
+ getBorderedFigure().getBorderItemContainer().add(((FlowPortAffixedNodeEditPart) childEditPart).getFigure(), locator);
+ return true;
+ }
+ if (childEditPart instanceof PortAffixedNodeEditPart) {
+ IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
+ getBorderedFigure().getBorderItemContainer().add(((PortAffixedNodeEditPart) childEditPart).getFigure(), locator);
+ return true;
+ }
+
+ return false;
+ }
+
+ @Override
+ protected boolean removeFixedChild(EditPart childEditPart) {
+
+ if (childEditPart instanceof PropertyNodeLabelEditPart) {
+ return true;
+ }
+
+ if (childEditPart instanceof FlowPortAffixedNodeEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((FlowPortAffixedNodeEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof PortAffixedNodeEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((PortAffixedNodeEditPart) childEditPart).getFigure());
+ return true;
+ }
+
+ return false;
+ }
+
+ @Override
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ if (editPart instanceof IBorderItemEditPart) {
+ return getBorderedFigure().getBorderItemContainer();
+ }
+
+ return getContentPane();
+ }
+
+ // public EditPart getTargetEditPart(Request request) {
+ // if(request instanceof CreateViewAndElementRequest) {
+ // CreateElementRequestAdapter adapter = ((CreateViewAndElementRequest)request).getViewAndElementDescriptor().getCreateElementRequestAdapter();
+ // IElementType type = (IElementType)adapter.getAdapter(IElementType.class);
+ // if(type == CustomBlockDefinitionDiagramElementTypes.BLOCK_CONSTRAINT_CLN) {
+ // return getChildBySemanticHint(CustomBlockDefinitionDiagramElementTypes.BLOCK_CONSTRAINT_COMPARTMENT_HINT);
+ // }
+ // }
+ // return super.getTargetEditPart(request);
+ // }
+
+ @Override
+ protected NodeFigure createNodeFigure() {
+ return new SelectableBorderedNodeFigure(createMainFigure());
+ }
+
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new NestedBlockPropertyCompositeFigure();
+ }
+
+ @Override
+ public NestedBlockPropertyCompositeFigure getPrimaryShape() {
+ return (NestedBlockPropertyCompositeFigure) primaryShape;
+ }
+
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLGraphicalTypes.LABEL_UML_PROPERTY_LABEL_ID);
+ }
+
+ /**
+ * <pre>
+ *
+ * {@inheritDoc}
+ * </pre>
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+
+ // A visual refresh may also be needed when the following properties are changing : aggregation, type, or the related association.
+ if (resolveSemanticElement() != null) {
+ EObject element = resolveSemanticElement();
+
+ if ((element != null) && (element.equals(event.getNotifier())) && (element instanceof Property)) {
+
+ if (UMLPackage.eINSTANCE.getProperty_Aggregation().equals(event.getFeature())) {
+ refreshVisuals();
+ }
+
+ if (UMLPackage.eINSTANCE.getTypedElement_Type().equals(event.getFeature())) {
+ refreshVisuals();
+ }
+
+ if (UMLPackage.eINSTANCE.getProperty_Association().equals(event.getFeature())) {
+ refreshVisuals();
+ }
+ }
+ }
+
+ super.handleNotificationEvent(event);
+ }
+
+ /**
+ * <pre>
+ *
+ * {@inheritDoc}
+ * </pre>
+ */
+ @Override
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+
+ String tag = "property";
+ int lineStyle = Graphics.LINE_SOLID;
+
+ if (resolveSemanticElement() != null) {
+ EObject eObject = resolveSemanticElement();
+ if (((ISpecializationType) SysMLElementTypes.PART_PROPERTY).getMatcher().matches(eObject)) {
+ tag = "part";
+
+ } else if (((ISpecializationType) SysMLElementTypes.REFERENCE_PROPERTY).getMatcher().matches(eObject)) {
+ tag = "reference";
+ lineStyle = Graphics.LINE_CUSTOM;
+
+ } else if (((ISpecializationType) SysMLElementTypes.ACTOR_PART_PROPERTY).getMatcher().matches(eObject)) {
+ tag = "actor part";
+
+ } else if (((ISpecializationType) SysMLElementTypes.VALUE_PROPERTY).getMatcher().matches(eObject)) {
+ tag = "value";
+
+ } else {
+ // Consider the element is a Property...
+ }
+ }
+
+ getPrimaryShape().setFigureTag(tag);
+ getPrimaryShape().setLineStyle(lineStyle);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/BlockCompositeSemanticEditPolicy.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/BlockCompositeSemanticEditPolicy.java
new file mode 100755
index 0000000..79e0021
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/BlockCompositeSemanticEditPolicy.java
@@ -0,0 +1,45 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.edit.policy;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory;
+import org.eclipse.papyrus.sysml.blocks.Block;
+import org.eclipse.papyrus.sysml.diagram.common.commands.CreateFlowPortWithFlowSpecificationConfigureCommandFactory;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * Semantic edit policy for {@link Block} structure compartment.
+ */
+public class BlockCompositeSemanticEditPolicy extends DefaultCompartmentSemanticEditPolicy {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getCreateCommand(CreateElementRequest req) {
+
+ IElementType elementTypeToCreate = req.getElementType();
+ IElementType baseType = elementTypeToCreate;
+
+ if (SysMLElementTypes.FLOW_PORT_NA == baseType) {
+ req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateFlowPortWithFlowSpecificationConfigureCommandFactory());
+ }
+
+ return super.getCreateCommand(req);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/BlockPropertyCompositeSemanticEditPolicy.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/BlockPropertyCompositeSemanticEditPolicy.java
new file mode 100755
index 0000000..617b70b
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/BlockPropertyCompositeSemanticEditPolicy.java
@@ -0,0 +1,68 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.edit.policy;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.ISpecializationType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
+import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory;
+import org.eclipse.papyrus.sysml.diagram.common.commands.CreateFlowPortWithFlowSpecificationConfigureCommandFactory;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Type;
+
+/**
+ * Semantic edit policy for Property owned by a Block (Part or Reference especially).
+ */
+public class BlockPropertyCompositeSemanticEditPolicy extends DefaultSemanticEditPolicy {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getCreateCommand(CreateElementRequest req) {
+
+ // Port - FlowPort creation is allowed if the semantic element is
+ // a Property typed by a Block, the new Port - FlowPort is created on this Block.
+ EObject eObject = req.getContainer();
+ if ((eObject != null) && (eObject instanceof Property)) {
+ Type type = ((Property) eObject).getType();
+ if ((type != null) && (((ISpecializationType) SysMLElementTypes.BLOCK).getMatcher().matches(type))) {
+
+ IElementType elementTypeToCreate = req.getElementType();
+ IElementType baseType = elementTypeToCreate;
+
+ if ((SysMLElementTypes.FLOW_PORT == baseType)
+ || (SysMLElementTypes.FLOW_PORT_IN == baseType)
+ || (SysMLElementTypes.FLOW_PORT_OUT == baseType)
+ || (SysMLElementTypes.FLOW_PORT_IN_OUT == baseType)
+ || (SysMLElementTypes.FLOW_PORT_NA == baseType)
+ || (UMLElementTypes.PORT == baseType)) {
+
+ req.setContainer(type);
+ }
+
+ if (SysMLElementTypes.FLOW_PORT_NA == baseType) {
+ req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateFlowPortWithFlowSpecificationConfigureCommandFactory());
+ }
+ }
+ }
+
+ return super.getCreateCommand(req);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/BlockPropertyStructureCompartmentSemanticEditPolicy.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/BlockPropertyStructureCompartmentSemanticEditPolicy.java
new file mode 100755
index 0000000..ddd9bde
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/BlockPropertyStructureCompartmentSemanticEditPolicy.java
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.edit.policy;
+
+import java.util.Arrays;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.ISpecializationType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory;
+import org.eclipse.papyrus.sysml.blocks.Block;
+import org.eclipse.papyrus.sysml.diagram.common.commands.CreateActorPartWithTypeConfigureCommandFactory;
+import org.eclipse.papyrus.sysml.diagram.common.commands.CreateConstraintPropertyWithTypeConfigureCommandFactory;
+import org.eclipse.papyrus.sysml.diagram.common.commands.CreatePartWithTypeConfigureCommandFactory;
+import org.eclipse.papyrus.sysml.diagram.common.commands.CreateReferenceWithTypeConfigureCommandFactory;
+import org.eclipse.papyrus.sysml.diagram.common.commands.CreateValueWithTypeConfigureCommandFactory;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Type;
+
+/**
+ * Semantic edit policy for {@link Block} structure compartment.
+ */
+public class BlockPropertyStructureCompartmentSemanticEditPolicy extends DefaultCompartmentSemanticEditPolicy {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getCreateCommand(CreateElementRequest req) {
+
+ // Property (and variants) creation is allowed if the semantic element is
+ // a Property typed by a Block, the Property is created on this Block.
+ EObject eObject = req.getContainer();
+ if ((eObject != null) && (eObject instanceof Property)) {
+ Type type = ((Property) eObject).getType();
+ if ((type != null) && (((ISpecializationType) SysMLElementTypes.BLOCK).getMatcher().matches(type))) {
+
+ IElementType elementTypeToCreate = req.getElementType();
+ IElementType baseType = elementTypeToCreate;
+
+ if (SysMLElementTypes.PART_PROPERTY == baseType) {
+ req.setContainer(type);
+ req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreatePartWithTypeConfigureCommandFactory());
+ } else if (SysMLElementTypes.REFERENCE_PROPERTY == baseType) {
+ req.setContainer(type);
+ req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateReferenceWithTypeConfigureCommandFactory());
+ } else if (SysMLElementTypes.ACTOR_PART_PROPERTY == baseType) {
+ req.setContainer(type);
+ req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateActorPartWithTypeConfigureCommandFactory());
+ } else if (SysMLElementTypes.VALUE_PROPERTY == baseType) {
+ req.setContainer(type);
+ req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateValueWithTypeConfigureCommandFactory());
+ } else if (UMLElementTypes.PROPERTY == baseType) {
+ req.setContainer(type);
+ } else if (SysMLElementTypes.CONSTRAINT_PROPERTY == req.getElementType()) {
+ req.setContainer(type);
+ req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateConstraintPropertyWithTypeConfigureCommandFactory());
+ }
+ } else if ((UMLElementTypes.PROPERTY == req.getElementType()) || (Arrays.asList(req.getElementType().getAllSuperTypes()).contains(UMLElementTypes.PROPERTY))) {
+ // Forbid Property::qualifier creation
+ return UnexecutableCommand.INSTANCE;
+ }
+ }
+
+ return super.getCreateCommand(req);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/ConstraintParameterCompartmentSemanticEditPolicy.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/ConstraintParameterCompartmentSemanticEditPolicy.java
new file mode 100755
index 0000000..8f02588
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/ConstraintParameterCompartmentSemanticEditPolicy.java
@@ -0,0 +1,48 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.edit.policy;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.services.edit.commands.ConfigureFeatureCommandFactory;
+import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory;
+import org.eclipse.papyrus.sysml.constraints.ConstraintBlock;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * Semantic edit policy for {@link ConstraintBlock} parameters (Property) compartment.
+ */
+public class ConstraintParameterCompartmentSemanticEditPolicy extends DefaultCompartmentSemanticEditPolicy {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getCreateCommand(CreateElementRequest req) {
+
+ IElementType elementTypeToCreate = req.getElementType();
+ IElementType baseType = elementTypeToCreate;
+
+ if (UMLElementTypes.PROPERTY == baseType) {
+ String name = NamedElementUtil.getDefaultNameWithIncrementFromBase("parameter", req.getContainer().eContents()); //$NON-NLS-1$
+ req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new ConfigureFeatureCommandFactory(UMLPackage.eINSTANCE.getNamedElement_Name(), name));
+ }
+
+ return super.getCreateCommand(req);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/CustomDuplicatePasteEditPolicy.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/CustomDuplicatePasteEditPolicy.java
new file mode 100755
index 0000000..7e7c830
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/CustomDuplicatePasteEditPolicy.java
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.edit.policy;
+
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.diagram.ui.requests.DuplicateRequest;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+
+
+/**
+ * Specific edit policy for compartment, to forbid the duplication of ports as affixed children.
+ *
+ * @see bug 375041
+ */
+public class CustomDuplicatePasteEditPolicy extends PasteEditPolicy {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command constructDuplicationCommand(List notationViewsToDuplicate, Set elementsToDuplicate, DuplicateRequest request, TransactionalEditingDomain editingDomain) {
+ if (notationViewsToDuplicate != null && !notationViewsToDuplicate.isEmpty()) {
+ for (Object o : notationViewsToDuplicate) {
+ if (o instanceof View) {
+ String type = ((View) o).getType();
+ if (SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID.equals(type) || UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID.equals(type)) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ }
+ }
+ }
+
+
+ return super.constructDuplicationCommand(notationViewsToDuplicate, elementsToDuplicate, request, editingDomain);
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/FlowPortCompartmentSemanticEditPolicy.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/FlowPortCompartmentSemanticEditPolicy.java
new file mode 100755
index 0000000..32d56b2
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/FlowPortCompartmentSemanticEditPolicy.java
@@ -0,0 +1,45 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.edit.policy;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory;
+import org.eclipse.papyrus.sysml.blocks.Block;
+import org.eclipse.papyrus.sysml.diagram.common.commands.CreateFlowPortWithFlowSpecificationConfigureCommandFactory;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * Semantic edit policy for {@link Block} structure compartment.
+ */
+public class FlowPortCompartmentSemanticEditPolicy extends DefaultCompartmentSemanticEditPolicy {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getCreateCommand(CreateElementRequest req) {
+
+ IElementType elementTypeToCreate = req.getElementType();
+ IElementType baseType = elementTypeToCreate;
+
+ if (SysMLElementTypes.FLOW_PORT_NA == baseType) {
+ req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateFlowPortWithFlowSpecificationConfigureCommandFactory());
+ }
+
+ return super.getCreateCommand(req);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/NestedBlockPropertyCompositeSemanticEditPolicy.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/NestedBlockPropertyCompositeSemanticEditPolicy.java
new file mode 100755
index 0000000..0e66162
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/NestedBlockPropertyCompositeSemanticEditPolicy.java
@@ -0,0 +1,70 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.edit.policy;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.ISpecializationType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
+import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory;
+import org.eclipse.papyrus.sysml.diagram.common.commands.CreateFlowPortWithFlowSpecificationConfigureCommandFactory;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Type;
+
+/**
+ * Semantic edit policy for Property owned by a Block (Part or Reference especially).
+ */
+@Deprecated
+public class NestedBlockPropertyCompositeSemanticEditPolicy extends DefaultSemanticEditPolicy {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getCreateCommand(CreateElementRequest req) {
+
+ // Port - FlowPort creation is allowed if the semantic element is
+ // a Property typed by a Block, the new Port - FlowPort is created on this Block.
+ EObject eObject = req.getContainer();
+ if ((eObject != null) && (eObject instanceof Property)) {
+ Type type = ((Property) eObject).getType();
+ if ((type != null) && (((ISpecializationType) SysMLElementTypes.BLOCK).getMatcher().matches(type))) {
+
+
+ IElementType elementTypeToCreate = req.getElementType();
+ IElementType baseType = elementTypeToCreate;
+
+ if ((SysMLElementTypes.FLOW_PORT == baseType)
+ || (SysMLElementTypes.FLOW_PORT_IN == baseType)
+ || (SysMLElementTypes.FLOW_PORT_OUT == baseType)
+ || (SysMLElementTypes.FLOW_PORT_IN_OUT == baseType)
+ || (SysMLElementTypes.FLOW_PORT_NA == baseType)
+ || (UMLElementTypes.PORT == baseType)) {
+
+ req.setContainer(type);
+ }
+
+ if (SysMLElementTypes.FLOW_PORT_NA == baseType) {
+ req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateFlowPortWithFlowSpecificationConfigureCommandFactory());
+ }
+ }
+ }
+
+ return super.getCreateCommand(req);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/PartCompartmentSemanticEditPolicy.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/PartCompartmentSemanticEditPolicy.java
new file mode 100755
index 0000000..0e4c2c9
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/PartCompartmentSemanticEditPolicy.java
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.edit.policy;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory;
+import org.eclipse.papyrus.sysml.blocks.Block;
+import org.eclipse.papyrus.sysml.diagram.common.commands.CreateConstraintPropertyWithTypeConfigureCommandFactory;
+import org.eclipse.papyrus.sysml.diagram.common.commands.CreatePartWithTypeConfigureCommandFactory;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * Semantic edit policy for {@link Block} part (Property) compartment.
+ */
+public class PartCompartmentSemanticEditPolicy extends DefaultCompartmentSemanticEditPolicy {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getCreateCommand(CreateElementRequest req) {
+
+ IElementType elementTypeToCreate = req.getElementType();
+ IElementType baseType = elementTypeToCreate;
+
+ if (SysMLElementTypes.PART_PROPERTY == baseType) {
+ req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreatePartWithTypeConfigureCommandFactory());
+ }
+
+ if (SysMLElementTypes.CONSTRAINT_PROPERTY == baseType) {
+ req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateConstraintPropertyWithTypeConfigureCommandFactory());
+ }
+
+ return super.getCreateCommand(req);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/PropertyCompartmentSemanticEditPolicy.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/PropertyCompartmentSemanticEditPolicy.java
new file mode 100755
index 0000000..13d12c9
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/PropertyCompartmentSemanticEditPolicy.java
@@ -0,0 +1,65 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.edit.policy;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory;
+import org.eclipse.papyrus.sysml.blocks.Block;
+import org.eclipse.papyrus.sysml.diagram.common.commands.CreateActorPartWithTypeConfigureCommandFactory;
+import org.eclipse.papyrus.sysml.diagram.common.commands.CreateConstraintPropertyWithTypeConfigureCommandFactory;
+import org.eclipse.papyrus.sysml.diagram.common.commands.CreateFlowPortWithFlowSpecificationConfigureCommandFactory;
+import org.eclipse.papyrus.sysml.diagram.common.commands.CreatePartWithTypeConfigureCommandFactory;
+import org.eclipse.papyrus.sysml.diagram.common.commands.CreateReferenceWithTypeConfigureCommandFactory;
+import org.eclipse.papyrus.sysml.diagram.common.commands.CreateValueWithTypeConfigureCommandFactory;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * Semantic edit policy for {@link Block} property compartment.
+ */
+public class PropertyCompartmentSemanticEditPolicy extends DefaultCompartmentSemanticEditPolicy {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getCreateCommand(CreateElementRequest req) {
+
+ IElementType elementTypeToCreate = req.getElementType();
+ IElementType baseType = elementTypeToCreate;
+
+ if (SysMLElementTypes.PART_PROPERTY == baseType) {
+ req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreatePartWithTypeConfigureCommandFactory());
+ }
+ if (SysMLElementTypes.REFERENCE_PROPERTY == baseType) {
+ req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateReferenceWithTypeConfigureCommandFactory());
+ }
+ if (SysMLElementTypes.ACTOR_PART_PROPERTY == baseType) {
+ req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateActorPartWithTypeConfigureCommandFactory());
+ }
+ if (SysMLElementTypes.VALUE_PROPERTY == baseType) {
+ req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateValueWithTypeConfigureCommandFactory());
+ }
+ if (SysMLElementTypes.FLOW_PORT_NA == baseType) {
+ req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateFlowPortWithFlowSpecificationConfigureCommandFactory());
+ }
+ if (SysMLElementTypes.CONSTRAINT_PROPERTY == baseType) {
+ req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateConstraintPropertyWithTypeConfigureCommandFactory());
+ }
+
+ return super.getCreateCommand(req);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/ReferenceCompartmentSemanticEditPolicy.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/ReferenceCompartmentSemanticEditPolicy.java
new file mode 100755
index 0000000..27d3bdd
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/ReferenceCompartmentSemanticEditPolicy.java
@@ -0,0 +1,45 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.edit.policy;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory;
+import org.eclipse.papyrus.sysml.blocks.Block;
+import org.eclipse.papyrus.sysml.diagram.common.commands.CreateReferenceWithTypeConfigureCommandFactory;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * Semantic edit policy for {@link Block} reference (Property) compartment.
+ */
+public class ReferenceCompartmentSemanticEditPolicy extends DefaultCompartmentSemanticEditPolicy {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getCreateCommand(CreateElementRequest req) {
+
+ IElementType elementTypeToCreate = req.getElementType();
+ IElementType baseType = elementTypeToCreate;
+
+ if (SysMLElementTypes.REFERENCE_PROPERTY == baseType) {
+ req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateReferenceWithTypeConfigureCommandFactory());
+ }
+
+ return super.getCreateCommand(req);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/StructureCompartmentSemanticEditPolicy.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/StructureCompartmentSemanticEditPolicy.java
new file mode 100755
index 0000000..7eaf6b6
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/StructureCompartmentSemanticEditPolicy.java
@@ -0,0 +1,65 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.edit.policy;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory;
+import org.eclipse.papyrus.sysml.blocks.Block;
+import org.eclipse.papyrus.sysml.diagram.common.commands.CreateActorPartWithTypeConfigureCommandFactory;
+import org.eclipse.papyrus.sysml.diagram.common.commands.CreateConstraintPropertyWithTypeConfigureCommandFactory;
+import org.eclipse.papyrus.sysml.diagram.common.commands.CreatePartWithTypeConfigureCommandFactory;
+import org.eclipse.papyrus.sysml.diagram.common.commands.CreateReferenceWithTypeConfigureCommandFactory;
+import org.eclipse.papyrus.sysml.diagram.common.commands.CreateValueWithTypeConfigureCommandFactory;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * Semantic edit policy for {@link Block} structure compartment.
+ */
+public class StructureCompartmentSemanticEditPolicy extends DefaultCompartmentSemanticEditPolicy {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getCreateCommand(CreateElementRequest req) {
+
+ IElementType elementTypeToCreate = req.getElementType();
+ IElementType baseType = elementTypeToCreate;
+
+ if (SysMLElementTypes.PART_PROPERTY == baseType) {
+ req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreatePartWithTypeConfigureCommandFactory());
+ }
+
+ if (SysMLElementTypes.REFERENCE_PROPERTY == baseType) {
+ req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateReferenceWithTypeConfigureCommandFactory());
+ }
+
+ if (SysMLElementTypes.ACTOR_PART_PROPERTY == baseType) {
+ req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateActorPartWithTypeConfigureCommandFactory());
+ }
+
+ if (SysMLElementTypes.VALUE_PROPERTY == baseType) {
+ req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateValueWithTypeConfigureCommandFactory());
+ }
+
+ if (SysMLElementTypes.CONSTRAINT_PROPERTY == baseType) {
+ req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateConstraintPropertyWithTypeConfigureCommandFactory());
+ }
+
+ return super.getCreateCommand(req);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/ValueCompartmentSemanticEditPolicy.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/ValueCompartmentSemanticEditPolicy.java
new file mode 100755
index 0000000..35e42a9
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/ValueCompartmentSemanticEditPolicy.java
@@ -0,0 +1,45 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.edit.policy;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory;
+import org.eclipse.papyrus.sysml.blocks.Block;
+import org.eclipse.papyrus.sysml.diagram.common.commands.CreateValueWithTypeConfigureCommandFactory;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * Semantic edit policy for {@link Block} value (Property) compartment.
+ */
+public class ValueCompartmentSemanticEditPolicy extends DefaultCompartmentSemanticEditPolicy {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getCreateCommand(CreateElementRequest req) {
+
+ IElementType elementTypeToCreate = req.getElementType();
+ IElementType baseType = elementTypeToCreate;
+
+ if (SysMLElementTypes.VALUE_PROPERTY == baseType) {
+ req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateValueWithTypeConfigureCommandFactory());
+ }
+
+ return super.getCreateCommand(req);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/figure/AssociationFigure.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/figure/AssociationFigure.java
new file mode 100755
index 0000000..9cd742a
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/figure/AssociationFigure.java
@@ -0,0 +1,120 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.figure;
+
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.papyrus.uml.diagram.common.figure.NamedElementEdgeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.uml2.uml.Association;
+
+/**
+ * This figure is used to represent {@link Association} in SysML diagrams.
+ */
+public class AssociationFigure extends NamedElementEdgeFigure {
+
+ /** The multiplicity source label. */
+ private WrappingLabel fSourceMultiplicityLabel;
+
+ /** The multiplicity target label. */
+ private WrappingLabel fTargetMultiplicityLabel;
+
+ /** The role source label. */
+ private WrappingLabel fSourceRoleLabel;
+
+ /** The role target label. */
+ private WrappingLabel fTargetRoleLabel;
+
+ /**
+ * Instantiates a new association figure.
+ */
+ public AssociationFigure() {
+ super();
+ createContents();
+ }
+
+ /**
+ * Creates the contents.
+ */
+ @Override
+ protected void createContents() {
+ super.createContents();
+
+ fSourceRoleLabel = new PapyrusWrappingLabel();
+ fSourceRoleLabel.setText("");
+
+ this.add(fSourceRoleLabel);
+
+ fSourceMultiplicityLabel = new PapyrusWrappingLabel();
+ fSourceMultiplicityLabel.setText("");
+
+ this.add(fSourceMultiplicityLabel);
+
+ fTargetRoleLabel = new PapyrusWrappingLabel();
+ fTargetRoleLabel.setText("");
+
+ this.add(fTargetRoleLabel);
+
+ fTargetMultiplicityLabel = new PapyrusWrappingLabel();
+ fTargetMultiplicityLabel.setText("");
+
+ this.add(fTargetMultiplicityLabel);
+
+ }
+
+ /**
+ * Gets the applied stereotype association label.
+ *
+ * @return the applied stereotype association label
+ */
+ @Override
+ public WrappingLabel getAppliedStereotypeLabel() {
+ return appliedStereotypeLabel;
+ }
+
+ /**
+ * Gets the multiplicity source label.
+ *
+ * @return the multiplicity source label
+ */
+ public WrappingLabel getSourceMultiplicityLabel() {
+ return fSourceMultiplicityLabel;
+ }
+
+ /**
+ * Gets the multiplicity target label.
+ *
+ * @return the multiplicity target label
+ */
+ public WrappingLabel getTargetMultiplicityLabel() {
+ return fTargetMultiplicityLabel;
+ }
+
+ /**
+ * Gets the role source label.
+ *
+ * @return the role source label
+ */
+ public WrappingLabel getSourceRoleLabel() {
+ return fSourceRoleLabel;
+ }
+
+ /**
+ * Gets the role target label.
+ *
+ * @return the role target label
+ */
+ public WrappingLabel getTargetRoleLabel() {
+ return fTargetRoleLabel;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/figure/FlowPortFigure.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/figure/FlowPortFigure.java
new file mode 100755
index 0000000..f26fbec
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/figure/FlowPortFigure.java
@@ -0,0 +1,34 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.figure;
+
+import org.eclipse.papyrus.uml.diagram.common.figure.node.AffixedNamedElementFigure;
+import org.eclipse.swt.graphics.Image;
+
+
+/**
+ * Figure for Port representation.
+ */
+public class FlowPortFigure extends AffixedNamedElementFigure {
+
+ /**
+ * Set the image in FlowPort figure.
+ *
+ * @param image
+ * the image to show in the FlowPort
+ */
+ public void setImage(Image image) {
+ setIcon(image);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/messages/Messages.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/messages/Messages.java
new file mode 100755
index 0000000..2f69592
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/messages/Messages.java
@@ -0,0 +1,160 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.messages;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+
+ public static String CreateOrSelectTypeDialog_DialogTitle;
+
+ public static String CreateOrSelectTypeDialog_SelectionSectionTitle;
+
+ public static String CreateOrSelectTypeDialog_SelectionSectionRadioLabel;
+
+ public static String CreateOrSelectTypeDialog_CreationSectionTitle;
+
+ public static String CreateOrSelectTypeDialog_CreationSectionRadioLabel;
+
+ public static String CreateOrSelectTypeDialog_NewTypeNameLabel;
+
+ public static String CreateOrSelectTypeDialog_NewTypeContainerNameLabel;
+
+ public static String CreateOrSelectTypeDialog_SelectTypeDialogTitle;
+
+ public static String CreateOrSelectTypeDialog_SelectTypeDialogMessage;
+
+ public static String CreateOrSelectTypeDialog_SelectNewTypeContainerDialogTitle;
+
+ public static String CreateOrSelectTypeDialog_SelectNewTypeContainerDialogMessage;
+
+ public static String CreateOrSelectBlockPropertyTypeDialog_DialogTitle;
+
+ public static String CreateOrSelectBlockPropertyTypeDialog_SelectionSectionTitle;
+
+ public static String CreateOrSelectBlockPropertyTypeDialog_SelectionSectionRadioLabel;
+
+ public static String CreateOrSelectBlockPropertyTypeDialog_CreationSectionTitle;
+
+ public static String CreateOrSelectBlockPropertyTypeDialog_CreationSectionRadioLabel;
+
+ public static String CreateOrSelectBlockPropertyTypeDialog_NewTypeNameLabel;
+
+ public static String CreateOrSelectBlockPropertyTypeDialog_NewTypeContainerNameLabel;
+
+ public static String CreateOrSelectBlockPropertyTypeDialog_SelectTypeDialogTitle;
+
+ public static String CreateOrSelectBlockPropertyTypeDialog_SelectTypeDialogMessage;
+
+ public static String CreateOrSelectBlockPropertyTypeDialog_SelectNewTypeContainerDialogTitle;
+
+ public static String CreateOrSelectBlockPropertyTypeDialog_SelectNewTypeContainerDialogMessage;
+
+ public static String CreateOrSelectConstraintPropertyTypeDialog_DialogTitle;
+
+ public static String CreateOrSelectConstraintPropertyTypeDialog_SelectionSectionTitle;
+
+ public static String CreateOrSelectConstraintPropertyTypeDialog_SelectionSectionRadioLabel;
+
+ public static String CreateOrSelectConstraintPropertyTypeDialog_CreationSectionTitle;
+
+ public static String CreateOrSelectConstraintPropertyTypeDialog_CreationSectionRadioLabel;
+
+ public static String CreateOrSelectConstraintPropertyTypeDialog_NewTypeNameLabel;
+
+ public static String CreateOrSelectConstraintPropertyTypeDialog_NewTypeContainerNameLabel;
+
+ public static String CreateOrSelectConstraintPropertyTypeDialog_SelectTypeDialogTitle;
+
+ public static String CreateOrSelectConstraintPropertyTypeDialog_SelectTypeDialogMessage;
+
+ public static String CreateOrSelectConstraintPropertyTypeDialog_SelectNewTypeContainerDialogTitle;
+
+ public static String CreateOrSelectConstraintPropertyTypeDialog_SelectNewTypeContainerDialogMessage;
+
+ public static String CreateOrSelectActorPartTypeDialog_DialogTitle;
+
+ public static String CreateOrSelectActorPartTypeDialog_SelectionSectionTitle;
+
+ public static String CreateOrSelectActorPartTypeDialog_SelectionSectionRadioLabel;
+
+ public static String CreateOrSelectActorPartTypeDialog_CreationSectionTitle;
+
+ public static String CreateOrSelectActorPartTypeDialog_CreationSectionRadioLabel;
+
+ public static String CreateOrSelectActorPartTypeDialog_NewTypeNameLabel;
+
+ public static String CreateOrSelectActorPartTypeDialog_NewTypeContainerNameLabel;
+
+ public static String CreateOrSelectActorPartTypeDialog_SelectTypeDialogTitle;
+
+ public static String CreateOrSelectActorPartTypeDialog_SelectTypeDialogMessage;
+
+ public static String CreateOrSelectActorPartTypeDialog_SelectNewTypeContainerDialogTitle;
+
+ public static String CreateOrSelectActorPartTypeDialog_SelectNewTypeContainerDialogMessage;
+
+ public static String CreateOrSelectValuePropertyTypeDialog_DialogTitle;
+
+ public static String CreateOrSelectValuePropertyTypeDialog_SelectionSectionTitle;
+
+ public static String CreateOrSelectValuePropertyTypeDialog_SelectionSectionRadioLabel;
+
+ public static String CreateOrSelectValuePropertyTypeDialog_CreationSectionTitle;
+
+ public static String CreateOrSelectValuePropertyTypeDialog_CreationSectionRadioLabel;
+
+ public static String CreateOrSelectValuePropertyTypeDialog_NewTypeNameLabel;
+
+ public static String CreateOrSelectValuePropertyTypeDialog_NewTypeContainerNameLabel;
+
+ public static String CreateOrSelectValuePropertyTypeDialog_SelectTypeDialogTitle;
+
+ public static String CreateOrSelectValuePropertyTypeDialog_SelectTypeDialogMessage;
+
+ public static String CreateOrSelectValuePropertyTypeDialog_SelectNewTypeContainerDialogTitle;
+
+ public static String CreateOrSelectValuePropertyTypeDialog_SelectNewTypeContainerDialogMessage;
+
+ public static String CreateOrSelectValuePropertyTypeDialog_NewTypeKindLabel;
+
+ public static String CreateOrSelectNonAtomicFlowPortTypeDialog_DialogTitle;
+
+ public static String CreateOrSelectNonAtomicFlowPortTypeDialog_SelectionSectionTitle;
+
+ public static String CreateOrSelectNonAtomicFlowPortTypeDialog_SelectionSectionRadioLabel;
+
+ public static String CreateOrSelectNonAtomicFlowPortTypeDialog_CreationSectionTitle;
+
+ public static String CreateOrSelectNonAtomicFlowPortTypeDialog_CreationSectionRadioLabel;
+
+ public static String CreateOrSelectNonAtomicFlowPortTypeDialog_NewTypeNameLabel;
+
+ public static String CreateOrSelectNonAtomicFlowPortTypeDialog_NewTypeContainerNameLabel;
+
+ public static String CreateOrSelectNonAtomicFlowPortTypeDialog_SelectTypeDialogTitle;
+
+ public static String CreateOrSelectNonAtomicFlowPortTypeDialog_SelectTypeDialogMessage;
+
+ public static String CreateOrSelectNonAtomicFlowPortTypeDialog_SelectNewTypeContainerDialogTitle;
+
+ public static String CreateOrSelectNonAtomicFlowPortTypeDialog_SelectNewTypeContainerDialogMessage;
+
+ static {
+ NLS.initializeMessages("org.eclipse.papyrus.sysml.diagram.common.messages.messages", Messages.class); //$NON-NLS-1$
+ }
+
+ private Messages() {
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/messages/messages.properties b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/messages/messages.properties
new file mode 100755
index 0000000..a5d917c
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/messages/messages.properties
@@ -0,0 +1,92 @@
+
+CreateOrSelectTypeDialog_DialogTitle=Type initialization
+CreateOrSelectTypeDialog_SelectionSectionTitle=Select an existing type
+CreateOrSelectTypeDialog_SelectionSectionRadioLabel=Type selection mode
+
+CreateOrSelectTypeDialog_CreationSectionTitle=Create a new type
+CreateOrSelectTypeDialog_CreationSectionRadioLabel=Type creation mode
+CreateOrSelectTypeDialog_NewTypeNameLabel=Select new type name
+CreateOrSelectTypeDialog_NewTypeContainerNameLabel=Select new type container
+
+CreateOrSelectTypeDialog_SelectTypeDialogTitle=Type selection
+CreateOrSelectTypeDialog_SelectTypeDialogMessage=Select a type
+
+CreateOrSelectTypeDialog_SelectNewTypeContainerDialogTitle=Type container selection
+CreateOrSelectTypeDialog_SelectNewTypeContainerDialogMessage=Select the container for the new type
+
+CreateOrSelectBlockPropertyTypeDialog_DialogTitle=Part or Reference type initialization
+CreateOrSelectBlockPropertyTypeDialog_SelectionSectionTitle=Select an existing type (Block)
+CreateOrSelectBlockPropertyTypeDialog_SelectionSectionRadioLabel=Block (type) selection mode
+
+CreateOrSelectBlockPropertyTypeDialog_CreationSectionTitle=Create a new type (Block)
+CreateOrSelectBlockPropertyTypeDialog_CreationSectionRadioLabel=Block (type) creation mode
+CreateOrSelectBlockPropertyTypeDialog_NewTypeNameLabel=Select new Block name
+CreateOrSelectBlockPropertyTypeDialog_NewTypeContainerNameLabel=Select new Block container
+
+CreateOrSelectBlockPropertyTypeDialog_SelectTypeDialogTitle=Type selection
+CreateOrSelectBlockPropertyTypeDialog_SelectTypeDialogMessage=Select a Block to use as new element type
+
+CreateOrSelectBlockPropertyTypeDialog_SelectNewTypeContainerDialogTitle=Type container selection
+CreateOrSelectBlockPropertyTypeDialog_SelectNewTypeContainerDialogMessage=Select the container for the new Block
+
+CreateOrSelectConstraintPropertyTypeDialog_DialogTitle=ConstraintProperty type initialization
+CreateOrSelectConstraintPropertyTypeDialog_SelectionSectionTitle=Select an existing type (ConstraintBlock)
+CreateOrSelectConstraintPropertyTypeDialog_SelectionSectionRadioLabel=ConstraintBlock (type) selection mode
+
+CreateOrSelectConstraintPropertyTypeDialog_CreationSectionTitle=Create a new type (ConstraintBlock)
+CreateOrSelectConstraintPropertyTypeDialog_CreationSectionRadioLabel=ConstraintBlock (type) creation mode
+CreateOrSelectConstraintPropertyTypeDialog_NewTypeNameLabel=Select new ConstraintBlock name
+CreateOrSelectConstraintPropertyTypeDialog_NewTypeContainerNameLabel=Select new ConstraintBlock container
+
+CreateOrSelectConstraintPropertyTypeDialog_SelectTypeDialogTitle=Type selection
+CreateOrSelectConstraintPropertyTypeDialog_SelectTypeDialogMessage=Select a ConstraintBlock to use as new element type
+
+CreateOrSelectConstraintPropertyTypeDialog_SelectNewTypeContainerDialogTitle=Type container selection
+CreateOrSelectConstraintPropertyTypeDialog_SelectNewTypeContainerDialogMessage=Select the container for the new ConstraintBlock
+
+
+CreateOrSelectActorPartTypeDialog_DialogTitle=ActorPart type initialization
+CreateOrSelectActorPartTypeDialog_SelectionSectionTitle=Select an existing type (Actor)
+CreateOrSelectActorPartTypeDialog_SelectionSectionRadioLabel=Actor (type) selection mode
+
+CreateOrSelectActorPartTypeDialog_CreationSectionTitle=Create a new type (Actor)
+CreateOrSelectActorPartTypeDialog_CreationSectionRadioLabel=Actor (type) creation mode
+CreateOrSelectActorPartTypeDialog_NewTypeNameLabel=Select new Actor name
+CreateOrSelectActorPartTypeDialog_NewTypeContainerNameLabel=Select new Actor container
+
+CreateOrSelectActorPartTypeDialog_SelectTypeDialogTitle=Type selection
+CreateOrSelectActorPartTypeDialog_SelectTypeDialogMessage=Select a Actor to use as new element type
+
+CreateOrSelectActorPartTypeDialog_SelectNewTypeContainerDialogTitle=Type container selection
+CreateOrSelectActorPartTypeDialog_SelectNewTypeContainerDialogMessage=Select the container for the new Actor
+
+CreateOrSelectValuePropertyTypeDialog_DialogTitle=Value type initialization
+CreateOrSelectValuePropertyTypeDialog_SelectionSectionTitle=Select an existing type (ValueType or DataType)
+CreateOrSelectValuePropertyTypeDialog_SelectionSectionRadioLabel=Type selection mode
+
+CreateOrSelectValuePropertyTypeDialog_CreationSectionTitle=Create a new type ((ValueType or DataType)
+CreateOrSelectValuePropertyTypeDialog_CreationSectionRadioLabel=Type creation mode
+CreateOrSelectValuePropertyTypeDialog_NewTypeNameLabel=Select new type name
+CreateOrSelectValuePropertyTypeDialog_NewTypeKindLabel=Select new type kind
+CreateOrSelectValuePropertyTypeDialog_NewTypeContainerNameLabel=Select new type container
+
+CreateOrSelectValuePropertyTypeDialog_SelectTypeDialogTitle=Type selection
+CreateOrSelectValuePropertyTypeDialog_SelectTypeDialogMessage=Select a DataType or Value type to use as new element type
+
+CreateOrSelectValuePropertyTypeDialog_SelectNewTypeContainerDialogTitle=Type container selection
+CreateOrSelectValuePropertyTypeDialog_SelectNewTypeContainerDialogMessage=Select the container for the new type
+
+CreateOrSelectNonAtomicFlowPortTypeDialog_DialogTitle=Non atomic FlowPort type initialization
+CreateOrSelectNonAtomicFlowPortTypeDialog_SelectionSectionTitle=Select an existing FlowSpecification
+CreateOrSelectNonAtomicFlowPortTypeDialog_SelectionSectionRadioLabel=FlowSpecification (type) selection mode
+
+CreateOrSelectNonAtomicFlowPortTypeDialog_CreationSectionTitle=Create a new FlowSpecification
+CreateOrSelectNonAtomicFlowPortTypeDialog_CreationSectionRadioLabel=FlowSpecification (type) creation mode
+CreateOrSelectNonAtomicFlowPortTypeDialog_NewTypeNameLabel=Select new FlowSpecification name
+CreateOrSelectNonAtomicFlowPortTypeDialog_NewTypeContainerNameLabel=Select new FlowSpecification container
+
+CreateOrSelectNonAtomicFlowPortTypeDialog_SelectTypeDialogTitle=Type selection
+CreateOrSelectNonAtomicFlowPortTypeDialog_SelectTypeDialogMessage=Select a FlowSpecification to use as new element type
+
+CreateOrSelectNonAtomicFlowPortTypeDialog_SelectNewTypeContainerDialogTitle=Type container selection
+CreateOrSelectNonAtomicFlowPortTypeDialog_SelectNewTypeContainerDialogMessage=Select the container for the new FlowSpecification
\ No newline at end of file
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/parser/FlowPortLabelParser.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/parser/FlowPortLabelParser.java
new file mode 100755
index 0000000..f332eb8
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/parser/FlowPortLabelParser.java
@@ -0,0 +1,256 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.parser;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.sysml.diagram.common.preferences.ILabelPreferenceConstants;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLMultiplicityElementUtil;
+import org.eclipse.papyrus.sysml.portandflows.FlowDirection;
+import org.eclipse.papyrus.sysml.portandflows.FlowPort;
+import org.eclipse.papyrus.sysml.portandflows.FlowSpecification;
+import org.eclipse.papyrus.sysml.portandflows.PortandflowsPackage;
+import org.eclipse.papyrus.uml.diagram.common.parser.PropertyLabelParser;
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
+import org.eclipse.papyrus.uml.tools.utils.ICustomAppearance;
+import org.eclipse.papyrus.uml.tools.utils.ValueSpecificationUtil;
+import org.eclipse.uml2.uml.InstanceValue;
+import org.eclipse.uml2.uml.Port;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.ValueSpecification;
+import org.eclipse.uml2.uml.VisibilityKind;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+/**
+ * Semantic Parser for {@link FlowPort}
+ */
+public class FlowPortLabelParser extends PropertyLabelParser {
+
+ /** The String format for displaying a FlowProperty with direction */
+ protected static final String DIRECTION_FORMAT = "%s %s";
+
+ /** The String format for displaying a FlowProperty with direction */
+ protected static final String CONJUGATED_FORMAT = "~%s";
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getPrintString(IAdaptable element, int flags) {
+
+ Collection<String> maskValues = getMaskValues(element);
+
+ if (maskValues.isEmpty()) {
+ return MaskedLabel;
+ }
+
+ String result = "";
+ EObject eObject = EMFHelper.getEObject(element);
+
+ if ((eObject != null) && (eObject instanceof Port)) {
+
+ Property property = (Property) eObject;
+
+ FlowPort flowPort = UMLUtil.getStereotypeApplication(property, FlowPort.class);
+ if (flowPort != null) {
+
+ // manage direction only if the FlowPort is type and type is not a FlowSpecification
+ if (maskValues.contains(ICustomAppearance.DISP_DIRECTION)) {
+ String direction;
+ switch (flowPort.getDirection().getValue()) {
+ case FlowDirection.IN_VALUE:
+ direction = "in";
+ break;
+ case FlowDirection.OUT_VALUE:
+ direction = "out";
+ break;
+ case FlowDirection.INOUT_VALUE:
+ direction = "inout";
+ break;
+ default:
+ direction = "inout";
+ break;
+ }
+
+ // manage direction only if the FlowPort is not a FlowSpecification
+ if ((property.getType() == null) || ((property.getType() != null) && (UMLUtil.getStereotypeApplication(property.getType(), FlowSpecification.class) == null))) {
+ result = String.format(DIRECTION_FORMAT, direction, result);
+ }
+ }
+ }
+
+ // manage visibility
+ if (maskValues.contains(ICustomAppearance.DISP_VISIBILITY)) {
+ String visibility;
+ switch (property.getVisibility().getValue()) {
+ case VisibilityKind.PACKAGE:
+ visibility = "~";
+ break;
+ case VisibilityKind.PUBLIC:
+ visibility = "+";
+ break;
+ case VisibilityKind.PROTECTED:
+ visibility = "#";
+ break;
+ case VisibilityKind.PRIVATE:
+ visibility = "-";
+ break;
+ default:
+ visibility = "+";
+ break;
+ }
+ result = String.format(VISIBILITY_FORMAT, visibility, result);
+ }
+
+ // manage derived modifier
+ if ((maskValues.contains(ICustomAppearance.DISP_DERIVE)) && (property.isDerived())) {
+ result = String.format(DERIVED_FORMAT, result);
+ }
+
+ // manage name
+ if ((maskValues.contains(ICustomAppearance.DISP_NAME)) && (property.isSetName())) {
+ String name = UMLLabelInternationalization.getInstance().getLabel(property);
+ result = String.format(NAME_FORMAT, result, name);
+ }
+
+ // manage type and conjugated property
+ if ((maskValues.contains(ICustomAppearance.DISP_TYPE))) {
+
+ String type = "<Undefined>";
+ if (property.getType() != null) {
+ type = UMLLabelInternationalization.getInstance().getLabel(property.getType());
+ }
+
+ // If type is undefined only show "<Undefined>" when explicitly asked.
+ if ((maskValues.contains(ILabelPreferenceConstants.DISP_UNDEFINED_TYPE)) || (!"<Undefined>".equals(type))) {
+ if ((flowPort != null) && (flowPort.isConjugated())) {
+ type = String.format(CONJUGATED_FORMAT, type);
+ }
+ result = String.format(TYPE_FORMAT, result, type);
+ }
+ }
+
+ // manage multiplicity
+ if ((maskValues.contains(ICustomAppearance.DISP_MULTIPLICITY))) {
+
+ // TODO : add a case for default with multiplicity not set.
+ String multiplicity = SysMLMultiplicityElementUtil.formatMultiplicity(property, maskValues);
+ if (multiplicity != null && !multiplicity.isEmpty()) {
+ result += " " + multiplicity;
+ }
+ }
+
+ // manage default value
+ if ((maskValues.contains(ICustomAppearance.DISP_DEFAULT_VALUE)) && ((property.getDefaultValue() != null))) {
+ ValueSpecification valueSpecification = property.getDefaultValue();
+ if (valueSpecification instanceof InstanceValue) {
+ result = String.format(DEFAULT_VALUE_FORMAT, result, ValueSpecificationUtil.getSpecificationValue(valueSpecification, true));
+ }
+ }
+
+ // manage modifier
+ if (maskValues.contains(ICustomAppearance.DISP_MODIFIERS)) {
+ StringBuffer sb = new StringBuffer();
+ if (property.isReadOnly()) {
+ sb.append(sb.length() == 0 ? "readOnly" : ", readOnly");
+ }
+ if (property.isOrdered()) {
+ sb.append(sb.length() == 0 ? "ordered" : ", ordered");
+ }
+ if (property.isUnique()) {
+ sb.append(sb.length() == 0 ? "unique" : ", unique");
+ }
+ if (property.isDerivedUnion()) {
+ sb.append(sb.length() == 0 ? "union" : ", union");
+ }
+ EList<Property> redefinedProperties = property.getRedefinedProperties();
+ if (redefinedProperties != null && !redefinedProperties.isEmpty()) {
+ for (Property p : redefinedProperties) {
+ sb.append(sb.length() == 0 ? UMLLabelInternationalization.getInstance().getLabel(p) : ", redefines " + UMLLabelInternationalization.getInstance().getLabel(p));
+ }
+ }
+ if (sb.length() != 0) {
+ result = String.format(MODIFIER_FORMAT, result, sb.toString());
+ }
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean isAffectingEvent(Object event, int flags) {
+
+ if (event instanceof Notification) {
+ Object feature = ((Notification) event).getFeature();
+ if (feature instanceof EStructuralFeature) {
+ return PortandflowsPackage.eINSTANCE.getFlowPort_Direction().equals(feature) || PortandflowsPackage.eINSTANCE.getFlowPort_IsConjugated().equals(feature) || super.isAffectingEvent(event, flags);
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public List<EObject> getSemanticElementsBeingParsed(EObject element) {
+ List<EObject> semanticElementsBeingParsed = super.getSemanticElementsBeingParsed(element);
+
+ if ((element != null) && (element instanceof Port)) {
+ Port semElement = (Port) element;
+
+ FlowPort flowPort = UMLUtil.getStereotypeApplication(semElement, FlowPort.class);
+ if (flowPort != null) {
+ semanticElementsBeingParsed.add(flowPort);
+ }
+ }
+ return semanticElementsBeingParsed;
+ }
+
+ @Override
+ public Map<String, String> getMasks() {
+ Map<String, String> masks = new HashMap<String, String>();
+ masks.put(ICustomAppearance.DISP_DIRECTION, "Direction");
+ masks.put(ICustomAppearance.DISP_VISIBILITY, "Visibility");
+ masks.put(ICustomAppearance.DISP_DERIVE, "Is Derived");
+ masks.put(ICustomAppearance.DISP_NAME, "Name");
+ masks.put(ICustomAppearance.DISP_TYPE, "Type");
+ masks.put(ILabelPreferenceConstants.DISP_UNDEFINED_TYPE, "Show <Undefined> type");
+ masks.put(ICustomAppearance.DISP_MULTIPLICITY, "Multiplicity");
+ masks.put(ILabelPreferenceConstants.DISP_DEFAULT_MULTIPLICITY, "Show default multiplicity");
+ masks.put(ICustomAppearance.DISP_DEFAULT_VALUE, "Default Value");
+ masks.put(ICustomAppearance.DISP_MODIFIERS, "Modifiers");
+ return masks;
+ }
+
+ @Override
+ public Collection<String> getDefaultValue(IAdaptable element) {
+ return Arrays.asList(ICustomAppearance.DISP_DIRECTION, ICustomAppearance.DISP_NAME, ICustomAppearance.DISP_TYPE, ILabelPreferenceConstants.DISP_UNDEFINED_TYPE);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/parser/FlowPropertyLabelParser.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/parser/FlowPropertyLabelParser.java
new file mode 100755
index 0000000..5c62407
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/parser/FlowPropertyLabelParser.java
@@ -0,0 +1,144 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.parser;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.sysml.diagram.common.preferences.ILabelPreferenceConstants;
+import org.eclipse.papyrus.sysml.portandflows.FlowDirection;
+import org.eclipse.papyrus.sysml.portandflows.FlowProperty;
+import org.eclipse.papyrus.sysml.portandflows.PortandflowsPackage;
+import org.eclipse.papyrus.uml.diagram.common.parser.PropertyLabelParser;
+import org.eclipse.papyrus.uml.tools.utils.ICustomAppearance;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+/**
+ * Semantic Parser for {@link FlowProperty}
+ */
+public class FlowPropertyLabelParser extends PropertyLabelParser {
+
+ /** The String format for displaying a FlowProperty with direction */
+ protected static final String DIRECTION_FORMAT = "%s %s";
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getPrintString(IAdaptable element, int flags) {
+
+ Collection<String> maskValues = getMaskValues(element);
+
+ if (maskValues.isEmpty()) {
+ return MaskedLabel;
+ }
+
+ String result = super.getPrintString(element, flags);
+
+ EObject eObject = EMFHelper.getEObject(element);
+ if ((eObject != null) && (eObject instanceof Property)) {
+
+ Property property = (Property) eObject;
+ FlowProperty flowProperty = UMLUtil.getStereotypeApplication(property, FlowProperty.class);
+ if (flowProperty != null) {
+
+ // manage direction
+ if (maskValues.contains(ICustomAppearance.DISP_DIRECTION)) {
+ String direction;
+ switch (flowProperty.getDirection().getValue()) {
+ case FlowDirection.IN_VALUE:
+ direction = "in";
+ break;
+ case FlowDirection.OUT_VALUE:
+ direction = "out";
+ break;
+ case FlowDirection.INOUT_VALUE:
+ direction = "inout";
+ break;
+ default:
+ direction = "inout";
+ break;
+ }
+ result = String.format(DIRECTION_FORMAT, direction, result);
+ }
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean isAffectingEvent(Object event, int flags) {
+
+ if (event instanceof Notification) {
+ Object feature = ((Notification) event).getFeature();
+ if (feature instanceof EStructuralFeature) {
+ return PortandflowsPackage.eINSTANCE.getFlowProperty_Direction().equals(feature) || super.isAffectingEvent(event, flags);
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public List<EObject> getSemanticElementsBeingParsed(EObject element) {
+ List<EObject> semanticElementsBeingParsed = super.getSemanticElementsBeingParsed(element);
+
+ if ((element != null) && (element instanceof Property)) {
+ Property semElement = (Property) element;
+
+ FlowProperty flowProperty = UMLUtil.getStereotypeApplication(semElement, FlowProperty.class);
+ if (flowProperty != null) {
+ semanticElementsBeingParsed.add(flowProperty);
+ }
+ }
+ return semanticElementsBeingParsed;
+ }
+
+ @Override
+ public Map<String, String> getMasks() {
+ Map<String, String> masks = new HashMap<String, String>(10);
+ masks.put(ICustomAppearance.DISP_DIRECTION, "Direction");
+ masks.put(ICustomAppearance.DISP_VISIBILITY, "Visibility");
+ masks.put(ICustomAppearance.DISP_DERIVE, "Is Derived");
+ masks.put(ICustomAppearance.DISP_NAME, "Name");
+ masks.put(ICustomAppearance.DISP_TYPE, "Type");
+ masks.put(ILabelPreferenceConstants.DISP_UNDEFINED_TYPE, "Show <Undefined> type");
+ masks.put(ICustomAppearance.DISP_MULTIPLICITY, "Multiplicity");
+ masks.put(ILabelPreferenceConstants.DISP_DEFAULT_MULTIPLICITY, "Show default multiplicity");
+ masks.put(ICustomAppearance.DISP_DEFAULT_VALUE, "Default Value");
+ masks.put(ICustomAppearance.DISP_MODIFIERS, "Modifiers");
+ return masks;
+ }
+
+ @Override
+ public Collection<String> getDefaultValue(IAdaptable element) {
+ return Arrays.asList(ICustomAppearance.DISP_DIRECTION, ICustomAppearance.DISP_NAME, ICustomAppearance.DISP_TYPE, ILabelPreferenceConstants.DISP_UNDEFINED_TYPE);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/parser/RequirementLabelParser.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/parser/RequirementLabelParser.java
new file mode 100755
index 0000000..c7984cb
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/parser/RequirementLabelParser.java
@@ -0,0 +1,117 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.parser;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.sysml.diagram.common.preferences.ILabelPreferenceConstants;
+import org.eclipse.papyrus.sysml.requirements.Requirement;
+import org.eclipse.papyrus.uml.diagram.common.parser.NamedElementLabelParser;
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
+import org.eclipse.papyrus.uml.tools.utils.ICustomAppearance;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+/**
+ * Semantic Parser for {@link Requirement}
+ */
+public class RequirementLabelParser extends NamedElementLabelParser {
+
+ /** The String format for displaying a Requirement name */
+ protected static final String NAME_FORMAT = "%s";
+
+ /** The String format for displaying a FlowProperty with direction */
+ protected static final String ID_FORMAT = "%s{id = %s}";
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getPrintString(IAdaptable element, int flags) {
+
+ Collection<String> maskValues = getMaskValues(element);
+
+ if (maskValues.isEmpty()) {
+ return MaskedLabel;
+ }
+
+ String result = "";
+ EObject eObject = EMFHelper.getEObject(element);
+
+ if ((eObject != null) && (eObject instanceof Class)) {
+
+ Class clazz = (Class) eObject;
+ Requirement requirement = UMLUtil.getStereotypeApplication(clazz, Requirement.class);
+
+ // manage name
+ if (maskValues.contains(ICustomAppearance.DISP_NAME)) {
+ String name = UMLLabelInternationalization.getInstance().getLabel(clazz);
+ result = String.format(NAME_FORMAT, name);
+ }
+
+
+ if (requirement != null) {
+
+ // manage id
+ if (maskValues.contains(ILabelPreferenceConstants.DISP_ID)) {
+ String id = requirement.getId();
+ result = String.format(ID_FORMAT, result, id);
+ }
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public List<EObject> getSemanticElementsBeingParsed(EObject element) {
+ List<EObject> semanticElementsBeingParsed = new ArrayList<EObject>();
+
+ if ((element != null) && (element instanceof Class)) {
+ Class semElement = (Class) element;
+
+ semanticElementsBeingParsed.add(semElement);
+
+ Requirement requirement = UMLUtil.getStereotypeApplication(semElement, Requirement.class);
+ if (requirement != null) {
+ semanticElementsBeingParsed.add(requirement);
+ }
+ }
+ return semanticElementsBeingParsed;
+ }
+
+ @Override
+ public Map<String, String> getMasks() {
+ Map<String, String> masks = new HashMap<String, String>();
+ masks.put(ICustomAppearance.DISP_NAME, "Name");
+ masks.put(ILabelPreferenceConstants.DISP_ID, "Id");
+ return masks;
+ }
+
+ @Override
+ public Collection<String> getDefaultValue(IAdaptable element) {
+ return Arrays.asList(ICustomAppearance.DISP_NAME, ILabelPreferenceConstants.DISP_ID);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/parser/UnitLabelParser.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/parser/UnitLabelParser.java
new file mode 100755
index 0000000..10242f8
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/parser/UnitLabelParser.java
@@ -0,0 +1,142 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.parser;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.sysml.blocks.BlocksPackage;
+import org.eclipse.papyrus.sysml.blocks.Dimension;
+import org.eclipse.papyrus.sysml.blocks.Unit;
+import org.eclipse.papyrus.sysml.diagram.common.preferences.ILabelPreferenceConstants;
+import org.eclipse.papyrus.uml.diagram.common.parser.NamedElementLabelParser;
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
+import org.eclipse.papyrus.uml.tools.utils.ICustomAppearance;
+import org.eclipse.uml2.uml.InstanceSpecification;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+/**
+ * Semantic Parser for {@link Unit}
+ */
+public class UnitLabelParser extends NamedElementLabelParser {
+
+ /** The String format for displaying a {@link Unit} label with its name */
+ protected static final String NAME_FORMAT = "%s";
+
+ /** The String format for displaying a {@link Unit} with direction */
+ protected static final String DIMENSION_FORMAT = "%s {%s}";
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getPrintString(IAdaptable element, int flags) {
+
+ Collection<String> maskValues = getMaskValues(element);
+
+ if (maskValues.isEmpty()) {
+ return MaskedLabel;
+ }
+
+ String result = "";
+ EObject eObject = EMFHelper.getEObject(element);
+
+ if ((eObject != null) && (eObject instanceof InstanceSpecification)) {
+
+ InstanceSpecification iSpec = (InstanceSpecification) eObject;
+
+ Unit unit = UMLUtil.getStereotypeApplication(iSpec, Unit.class);
+
+ // manage name
+ if ((maskValues.contains(ICustomAppearance.DISP_NAME)) && (iSpec.isSetName())) {
+ String name = UMLLabelInternationalization.getInstance().getLabel(iSpec);
+ result = String.format(NAME_FORMAT, name);
+ }
+
+ // manage dimension
+ if ((maskValues.contains(ILabelPreferenceConstants.DISP_DIMENSION))) {
+ String dimensionName = "<Undefined>";
+ if ((unit != null) && (unit.getDimension() != null)) {
+ Dimension dim = unit.getDimension();
+ if ((dim.getBase_InstanceSpecification() != null) && (dim.getBase_InstanceSpecification().isSetName())) {
+ dimensionName = UMLLabelInternationalization.getInstance().getLabel(dim.getBase_InstanceSpecification());
+ }
+ }
+ result = String.format(DIMENSION_FORMAT, result, dimensionName);
+ }
+
+ }
+
+ return result;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean isAffectingEvent(Object event, int flags) {
+
+ if (event instanceof Notification) {
+ Object feature = ((Notification) event).getFeature();
+ if (feature instanceof EStructuralFeature) {
+ return BlocksPackage.eINSTANCE.getUnit_Dimension().equals(feature) || super.isAffectingEvent(event, flags);
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public List<EObject> getSemanticElementsBeingParsed(EObject element) {
+ List<EObject> semanticElementsBeingParsed = new ArrayList<EObject>();
+
+ if ((element != null) && (element instanceof InstanceSpecification)) {
+ InstanceSpecification semElement = (InstanceSpecification) element;
+
+ semanticElementsBeingParsed.add(semElement);
+
+ Unit unit = UMLUtil.getStereotypeApplication(semElement, Unit.class);
+ if (unit != null) {
+ semanticElementsBeingParsed.add(unit);
+ }
+ }
+ return semanticElementsBeingParsed;
+ }
+
+
+ @Override
+ public Map<String, String> getMasks() {
+ Map<String, String> masks = new HashMap<String, String>();
+ masks.put(ICustomAppearance.DISP_NAME, "Name");
+ masks.put(ILabelPreferenceConstants.DISP_DIMENSION, "Dimension");
+ return masks;
+ }
+
+ @Override
+ public Collection<String> getDefaultValue(IAdaptable element) {
+ return Arrays.asList(ICustomAppearance.DISP_NAME, ILabelPreferenceConstants.DISP_DIMENSION);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/preferences/ILabelPreferenceConstants.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/preferences/ILabelPreferenceConstants.java
new file mode 100755
index 0000000..051fb3a
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/preferences/ILabelPreferenceConstants.java
@@ -0,0 +1,46 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.preferences;
+
+import org.eclipse.papyrus.uml.tools.utils.ICustomAppearance;
+
+/**
+ * Label constants for label mask preferences.
+ */
+public interface ILabelPreferenceConstants extends ICustomAppearance {
+
+ /** preference id for display labels */
+ public String LABEL_DISPLAY_PREFERENCE = "label.display"; //$NON-NLS-1$
+
+ /** Style constant for id info display in labels. */
+ public final static String DISP_ID = "id"; //$NON-NLS-1$
+
+ /** Style constant for dimension info display in labels. */
+ public final static String DISP_DIMENSION = "dimension"; //$NON-NLS-1$
+
+ /** Style constant for specification info display in labels. */
+ public final static String DISP_SPECIFICATION = "specification"; //$NON-NLS-1$
+
+ /** Style constant for signal info display in labels. */
+ public final static String DISP_SIGNAL = "signal"; //$NON-NLS-1$
+
+ /** Style constant forcing multiplicity display in labels. */
+ public final static String DISP_DEFAULT_MULTIPLICITY = "defaultMultiplicity"; //$NON-NLS-1$
+
+ /** Style constant forcing type display in labels. */
+ public final static String DISP_UNDEFINED_TYPE = "undefinedType"; //$NON-NLS-1$
+
+ /** Style constant forcing name display in labels. */
+ public final static String DISP_NON_NAVIGABLE_ROLE = "nonNavigableRole"; //$NON-NLS-1$
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/preferences/LabelPreferenceHelper.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/preferences/LabelPreferenceHelper.java
new file mode 100755
index 0000000..82cc7dd
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/preferences/LabelPreferenceHelper.java
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.preferences;
+
+/**
+ * Utility class for building label preference constants.
+ */
+public class LabelPreferenceHelper {
+
+ /**
+ * Create the preference constant for a label view.
+ *
+ * @param diagramType
+ * the type of diagram
+ * @param viewType
+ * the type of the view
+ * @param constantPreferenceKey
+ * the constant key of the preference to retrieve
+ * @return the complete preference key
+ * @deprecated see https://bugs.eclipse.org/bugs/show_bug.cgi?id=353193
+ */
+ @Deprecated
+ public static String getPreferenceConstant(String diagramType, String viewType, String constantPreferenceKey) {
+ return diagramType + '_' + viewType + '.' + constantPreferenceKey;
+ }
+
+ /**
+ * Create the preference constant for a label view.
+ *
+ * @param elementkey
+ * the element key (including diagram hint)
+ * @param constantPreferenceKey
+ * the constant key of the preference to retrieve
+ * @return the complete preference key
+ */
+ public static String getPreferenceConstant(String elementkey, String constantPreferenceKey) {
+ return elementkey + '.' + constantPreferenceKey;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/dnd/helper/LinkMappingHelper.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/dnd/helper/LinkMappingHelper.java
new file mode 100755
index 0000000..0f4f2fc
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/dnd/helper/LinkMappingHelper.java
@@ -0,0 +1,158 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.dnd.helper;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.gmf.diagram.common.edit.policy.ILinkMappingHelper;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.util.UMLSwitch;
+
+/**
+ * Original class {@link org.eclipse.papyrus.uml.diagram.common.helper.LinkMappingHelper} slightly
+ * modified to use EObject instead of UML Element in its interface.
+ */
+public class LinkMappingHelper implements ILinkMappingHelper {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Collection<?> getSource(Element link) {
+ CommonSourceUMLSwitch umlSwitch = new CommonSourceUMLSwitch();
+ return umlSwitch.doSwitch(link);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Collection<?> getTarget(Element link) {
+ CommonTargetUMLSwitch umlSwitch = new CommonTargetUMLSwitch();
+ return umlSwitch.doSwitch(link);
+ }
+
+ /**
+ * Contains diagrams common behavior that need to be redefined
+ *
+ * @author eperico
+ */
+ public static class CommonSourceUMLSwitch extends UMLSwitch<Collection<?>> {
+
+ @Override
+ public java.util.Collection<?> caseAssociation(org.eclipse.uml2.uml.Association object) {
+ return object.getEndTypes();
+ };
+
+ @Override
+ public java.util.Collection<?> caseComment(org.eclipse.uml2.uml.Comment object) {
+ ArrayList<EObject> result = new ArrayList<EObject>();
+ result.add(object);
+ return result;
+ };
+
+ @Override
+ public Collection<?> caseDependency(org.eclipse.uml2.uml.Dependency object) {
+ return object.getClients();
+ };
+
+ @Override
+ public java.util.Collection<?> caseGeneralization(org.eclipse.uml2.uml.Generalization object) {
+ ArrayList<EObject> result = new ArrayList<EObject>();
+ result.add(object.getOwner());
+ return result;
+ };
+
+ @Override
+ public java.util.Collection<?> casePackageMerge(org.eclipse.uml2.uml.PackageMerge object) {
+ ArrayList<EObject> result = new ArrayList<EObject>();
+ result.add(object.getReceivingPackage());
+ return result;
+ };
+
+ @Override
+ public java.util.Collection<?> casePackageImport(org.eclipse.uml2.uml.PackageImport object) {
+ ArrayList<EObject> result = new ArrayList<EObject>();
+ result.add(object.getImportingNamespace());
+ return result;
+ };
+
+ @Override
+ public Collection<?> caseInformationFlow(org.eclipse.uml2.uml.InformationFlow object) {
+ return object.getInformationSources();
+ };
+
+ @Override
+ public Collection<?> defaultCase(org.eclipse.emf.ecore.EObject object) {
+ return Collections.EMPTY_LIST;
+ };
+ }
+
+ /**
+ * Contains diagrams common behavior that need to be redefined
+ *
+ * @author eperico
+ */
+ public static class CommonTargetUMLSwitch extends UMLSwitch<Collection<?>> {
+
+ @Override
+ public java.util.Collection<?> caseAssociation(org.eclipse.uml2.uml.Association object) {
+ return object.getEndTypes();
+ };
+
+ @Override
+ public java.util.Collection<?> caseComment(org.eclipse.uml2.uml.Comment object) {
+ return object.getAnnotatedElements();
+ };
+
+ @Override
+ public Collection<?> caseDependency(org.eclipse.uml2.uml.Dependency object) {
+ return object.getSuppliers();
+ };
+
+ @Override
+ public java.util.Collection<?> caseGeneralization(org.eclipse.uml2.uml.Generalization object) {
+ ArrayList<EObject> result = new ArrayList<EObject>();
+ result.add(object.getGeneral());
+ return result;
+ };
+
+ @Override
+ public java.util.Collection<?> casePackageMerge(org.eclipse.uml2.uml.PackageMerge object) {
+ ArrayList<EObject> result = new ArrayList<EObject>();
+ result.add(object.getMergedPackage());
+ return result;
+ };
+
+ @Override
+ public java.util.Collection<?> casePackageImport(org.eclipse.uml2.uml.PackageImport object) {
+ ArrayList<EObject> result = new ArrayList<EObject>();
+ result.add(object.getImportedPackage());
+ return result;
+ };
+
+ @Override
+ public Collection<?> caseInformationFlow(org.eclipse.uml2.uml.InformationFlow object) {
+ return object.getInformationTargets();
+ };
+
+ @Override
+ public Collection<?> defaultCase(org.eclipse.emf.ecore.EObject object) {
+ return Collections.EMPTY_LIST;
+ };
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AbstractElementBorderEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AbstractElementBorderEditPart.java
new file mode 100755
index 0000000..64c394c
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AbstractElementBorderEditPart.java
@@ -0,0 +1,235 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Vincent Lorenzo (CEA-LIST) - vincent.lorenzo@cea.fr (bug 493876)
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.edit.part;
+
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.StackLayout;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.editpolicies.LayoutEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
+import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.tooling.runtime.linklf.LinkLFNodeFigure;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
+import org.eclipse.papyrus.sysml.diagram.common.Activator;
+import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractBorderEditPart;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.AffixedNamedElementFigure;
+import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * Abstract non-diagram specific edit part for border node.
+ * This class is adapted from edit parts generated by GMF Tooling.
+ */
+public abstract class AbstractElementBorderEditPart extends AbstractBorderEditPart {
+
+ protected IFigure contentPane;
+
+ protected IFigure primaryShape;
+
+ public AbstractElementBorderEditPart(View view) {
+ super(view);
+ }
+
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ }
+
+ protected abstract LayoutEditPolicy createLayoutEditPolicy();
+
+ protected IFigure createNodeShape() {
+ return primaryShape = new AffixedNamedElementFigure();
+ }
+
+ @Override
+ public AffixedNamedElementFigure getPrimaryShape() {
+ return (AffixedNamedElementFigure) primaryShape;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ // When a node has external node labels, the methods refreshChildren() removes the label's
+ // edit part from the registry. Once removed from the registry the visibility cannot be set back to visible.
+
+ // Copied from generated code for Affixed nodes to fix:
+ // 366504: [SysML Block Definition Diagram] Cannot make masked labels of border items (Port) visible
+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=366504
+ // 366503: [SysML Internal Block Diagram] Cannot make masked labels of border items (Port) visible
+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=366503
+
+ // (this sounds strange as the "Show all labels" manages to get labels back without trouble...).
+ if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
+ Object notifier = event.getNotifier();
+ List<?> modelChildren = ((View) getModel()).getChildren();
+ if (!(notifier instanceof Edge)) {
+ if (modelChildren.contains(event.getNotifier())) {
+ return;
+ }
+ }
+ }
+ super.handleNotificationEvent(event);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void refreshBounds() {
+ if (getBorderItemLocator() != null) {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ Point loc = new Point(x, y);
+
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ Dimension size = new Dimension(width, height);
+
+ // Update locator constraint
+ IBorderItemLocator locator = getBorderItemLocator();
+ locator.setConstraint(new Rectangle(loc, size));
+
+ // Set new constraint on parent figure
+ getFigure().getParent().setConstraint(getFigure(), locator);
+
+ } else {
+ super.refreshBounds();
+ }
+ }
+
+ protected NodeFigure createNodePlate() {
+ String prefElementId = getNotationView().getType();
+ IPreferenceStore store = Activator.getInstance().getPreferenceStore();
+ String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH);
+ String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT);
+ DefaultSizeNodeFigure result = new LinkLFNodeFigure(this,store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
+
+ // FIXME: workaround for #154536
+ result.getBounds().setSize(result.getPreferredSize());
+ return result;
+ }
+
+ @Override
+ protected NodeFigure createMainFigure() {
+ NodeFigure figure = createNodePlate();
+ figure.setLayoutManager(new StackLayout());
+ IFigure shape = createNodeShape();
+ figure.add(shape);
+ contentPane = setupContentPane(shape);
+ return figure;
+ }
+
+ protected IFigure setupContentPane(IFigure nodeShape) {
+ return nodeShape; // use nodeShape itself as contentPane
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IFigure getContentPane() {
+ if (contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ @Override
+ protected void setForegroundColor(Color color) {
+ if (primaryShape != null) {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+
+ @Override
+ public abstract EditPart getPrimaryChildEditPart();
+
+ @Override
+ public Object getPreferredValue(EStructuralFeature feature) {
+ String prefKey = getNotationView().getType();
+
+ IPreferenceStore store = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
+ Object result = null;
+
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+
+ String prefColor = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.COLOR_LINE);
+
+ } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.COLOR_FONT);
+
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.COLOR_FILL);
+
+ }
+ result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(store, prefColor));
+
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+
+ String prefGradient = PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.COLOR_GRADIENT);
+ GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(store.getString(prefGradient));
+ if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
+ result = new Integer(gradientPreferenceConverter.getTransparency());
+
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ result = gradientPreferenceConverter.getGradientData();
+
+ }
+ }
+
+ if (result == null) {
+ result = getStructuralFeatureValue(feature);
+ }
+ return result;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AbstractElementChildLabelEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AbstractElementChildLabelEditPart.java
new file mode 100755
index 0000000..6f7f077
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AbstractElementChildLabelEditPart.java
@@ -0,0 +1,889 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.edit.part;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionAnchor;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.Label;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.RunnableWithResult;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.AccessibleEditPart;
+import org.eclipse.gef.DragTracker;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.requests.DirectEditRequest;
+import org.eclipse.gef.requests.DropRequest;
+import org.eclipse.gef.requests.ReconnectRequest;
+import org.eclipse.gef.requests.SelectionRequest;
+import org.eclipse.gef.tools.DirectEditManager;
+import org.eclipse.gef.tools.SelectEditPartTracker;
+import org.eclipse.gmf.runtime.common.core.util.Log;
+import org.eclipse.gmf.runtime.common.core.util.Trace;
+import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
+import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
+import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
+import org.eclipse.gmf.runtime.common.ui.services.parser.ParserService;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.INodeEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IPrimaryEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ConnectionHandleEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ListItemComponentEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.internal.DiagramUIDebugOptions;
+import org.eclipse.gmf.runtime.diagram.ui.internal.DiagramUIPlugin;
+import org.eclipse.gmf.runtime.diagram.ui.internal.DiagramUIStatusCodes;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.IAnchorableFigure;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.Anchor;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.IdentityAnchor;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration;
+import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration;
+import org.eclipse.papyrus.extensionpoints.editors.configuration.IPopupEditorConfiguration;
+import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog;
+import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog;
+import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper;
+import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
+import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
+import org.eclipse.papyrus.gmf.diagram.common.edit.part.ITextAwareEditPart;
+import org.eclipse.papyrus.gmf.diagram.common.edit.policy.LabelDirectEditPolicy;
+import org.eclipse.papyrus.gmf.diagram.common.edit.policy.TextNonResizableEditPolicy;
+import org.eclipse.papyrus.gmf.diagram.common.edit.policy.TextSelectionEditPolicy;
+import org.eclipse.papyrus.gmf.diagram.common.locator.CellEditorLocatorUtil;
+import org.eclipse.papyrus.infra.emf.appearance.helper.NameLabelIconHelper;
+import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusConstants;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusAnchorableWrappingLabel;
+import org.eclipse.papyrus.sysml.diagram.common.Activator;
+import org.eclipse.papyrus.sysml.diagram.common.preferences.ILabelPreferenceConstants;
+import org.eclipse.papyrus.sysml.diagram.common.preferences.LabelPreferenceHelper;
+import org.eclipse.papyrus.uml.diagram.common.commands.SemanticAdapter;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.edit.policy.MaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+import org.eclipse.papyrus.uml.diagram.common.parser.DefaultParserHintAdapter;
+import org.eclipse.papyrus.uml.diagram.common.util.DiagramEditPartsUtil;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.accessibility.AccessibleEvent;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.FontData;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * Abstract non-diagram specific edit part for child label node.
+ * This class is adapted from edit parts generated by GMF Tooling.
+ */
+public class AbstractElementChildLabelEditPart extends GraphicalEditPart implements ITextAwareEditPart, IPrimaryEditPart, INodeEditPart {
+
+ private DirectEditManager manager;
+
+ protected IParser parser;
+
+ private List<?> parserElements;
+
+ private String defaultText;
+
+ protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
+
+ protected IDirectEditorConfiguration configuration;
+
+ /** Constructor */
+ public AbstractElementChildLabelEditPart(View view) {
+ super(view);
+ }
+
+ @Override
+ public DragTracker getDragTracker(Request request) {
+ if (request instanceof SelectionRequest && ((SelectionRequest) request).getLastButtonPressed() == 3) {
+ return null;
+ }
+ // return new DragEditPartsTrackerEx(this);
+ // Disable current child label DnD as this is not correctly handled by Papyrus.
+ return new SelectEditPartTracker(this);
+ }
+
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedLabelEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new TextNonResizableEditPolicy());
+ installEditPolicy(EditPolicy.COMPONENT_ROLE, new ListItemComponentEditPolicy());
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
+ installEditPolicy(EditPolicyRoles.CONNECTION_HANDLES_ROLE, new ConnectionHandleEditPolicy());
+ }
+
+ protected String getLabelTextHelper(IFigure figure) {
+ if (figure instanceof WrappingLabel) {
+ return ((WrappingLabel) figure).getText();
+ } else if (figure instanceof ILabelFigure) {
+ return ((ILabelFigure) figure).getText();
+ } else {
+ return ((Label) figure).getText();
+ }
+ }
+
+ protected void setLabelTextHelper(IFigure figure, String text) {
+ if (figure instanceof WrappingLabel) {
+ ((WrappingLabel) figure).setText(text);
+ } else if (figure instanceof ILabelFigure) {
+ ((ILabelFigure) figure).setText(text);
+ } else {
+ ((Label) figure).setText(text);
+ }
+ }
+
+ protected Image getLabelIconHelper(IFigure figure) {
+ if (figure instanceof WrappingLabel) {
+ return ((WrappingLabel) figure).getIcon();
+ } else if (figure instanceof ILabelFigure) {
+ return ((ILabelFigure) figure).getIcon();
+ } else {
+ return ((Label) figure).getIcon();
+ }
+ }
+
+ protected void setLabelIconHelper(IFigure figure, Image icon) {
+ if (figure instanceof WrappingLabel) {
+ ((WrappingLabel) figure).setIcon(icon);
+ } else if (figure instanceof ILabelFigure) {
+ ((ILabelFigure) figure).setIcon(icon);
+ } else {
+ ((Label) figure).setIcon(icon);
+ }
+ }
+
+ public void setLabel(IFigure figure) {
+ unregisterVisuals();
+ setFigure(figure);
+ defaultText = getLabelTextHelper(figure);
+ registerVisuals();
+ refreshVisuals();
+ }
+
+ @Override
+ protected List getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ @Override
+ public EObject getParserElement() {
+ return resolveSemanticElement();
+ }
+
+ protected Image getLabelIcon() {
+ EObject parserElement = getParserElement();
+ if (parserElement == null) {
+ return null;
+ }
+
+ List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
+ for (View view : views) {
+ if (NameLabelIconHelper.showLabelIcon(view)) {
+ return Activator.getInstance().getLabelProvider().getImage(parserElement);
+ }
+ }
+ return null;
+
+ }
+
+ protected String getLabelText() {
+ String text = null;
+ EObject parserElement = getParserElement();
+ if (parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new SemanticAdapter(parserElement, getNotationView()), getParserOptions().intValue());
+ }
+ if (text == null || text.length() == 0) {
+ text = defaultText;
+ }
+ return text;
+ }
+
+ @Override
+ public void setLabelText(String text) {
+ setLabelTextHelper(getFigure(), text);
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof TextSelectionEditPolicy) {
+ ((TextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof TextSelectionEditPolicy) {
+ ((TextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ @Override
+ public String getEditText() {
+ if (getParserElement() == null || getParser() == null) {
+ return ""; //$NON-NLS-1$
+ }
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
+ }
+
+ protected boolean isEditable() {
+ return getParser() != null;
+ }
+
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ public String isValid(final Object value) {
+ if (value instanceof String) {
+ final EObject element = getParserElement();
+ final IParser parser = getParser();
+ try {
+ IParserEditStatus valid = (IParserEditStatus) getEditingDomain().runExclusive(new RunnableWithResult.Impl() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ @Override
+ public ParserOptions getParserOptions() {
+ if (getNotationView() == null || getNotationView().getDiagram() == null) {
+ return ParserOptions.NONE;
+ }
+
+ // int displayOptions = AppearanceHelper.getLabelDisplay(getNotationView());
+
+ EAnnotation display = getNotationView().getEAnnotation(VisualInformationPapyrusConstants.CUSTOM_APPEARENCE_ANNOTATION);
+ if (display == null) {
+ return getDefaultParserOptions();
+ }
+
+ // display != null
+ int displayOptions = Integer.parseInt(display.getDetails().get(VisualInformationPapyrusConstants.CUSTOM_APPEARANCE_MASK_VALUE));
+ return new ParserOptions(displayOptions);
+ }
+
+ @Override
+ public ParserOptions getDefaultParserOptions() {
+
+ if (getNotationView() == null || getNotationView().getDiagram() == null) {
+ return ParserOptions.NONE;
+ }
+
+ IPreferenceStore store = org.eclipse.papyrus.infra.gmfdiag.preferences.Activator.getDefault().getPreferenceStore();
+ int displayOptions = store.getInt(LabelPreferenceHelper.getPreferenceConstant(getLabelPreferenceKey(), ILabelPreferenceConstants.LABEL_DISPLAY_PREFERENCE));
+ if (displayOptions == 0) {
+ return ParserOptions.NONE;
+ }
+
+ return new ParserOptions(displayOptions);
+ }
+
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = ParserService.getInstance().getParser(new DefaultParserHintAdapter(getNotationView().getDiagram(), resolveSemanticElement(), getNotationView().getType()));
+ }
+ return parser;
+ }
+
+ protected DirectEditManager getManager() {
+ if (manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), CellEditorLocatorUtil.getTextCellEditorLocator(this)));
+ }
+ return manager;
+ }
+
+ /**
+ * @generated
+ */
+ protected void setManager(DirectEditManager manager) {
+ this.manager = manager;
+ }
+
+ /**
+ * @generated
+ */
+ protected void performDirectEdit() {
+ getManager().show();
+ }
+
+ /**
+ * @generated
+ */
+ protected void performDirectEdit(Point eventLocation) {
+ if (getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ }
+ }
+
+ /**
+ * @generated
+ */
+ private void performDirectEdit(char initialCharacter) {
+ if (getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager) getManager()).show(initialCharacter);
+ } else {
+ performDirectEdit();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void performDirectEditRequest(Request request) {
+
+ final Request theRequest = request;
+
+ if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ directEditionMode = getDirectEditionType();
+ }
+ switch (directEditionMode) {
+ case IDirectEdition.NO_DIRECT_EDITION:
+ // no direct edition mode => does nothing
+ return;
+ case IDirectEdition.EXTENDED_DIRECT_EDITOR:
+ updateExtendedEditorConfiguration();
+ if (configuration == null || configuration.getLanguage() == null) {
+ performDefaultDirectEditorEdit(theRequest);
+ } else {
+ configuration.preEditAction(resolveSemanticElement());
+ Dialog dialog = null;
+ if (configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ helper.showEditor();
+ return;
+ } else if (configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if (configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
+ } else {
+ return;
+ }
+ final Dialog finalDialog = dialog;
+
+ if (Window.OK == dialog.open()) {
+ TransactionalEditingDomain domain = getEditingDomain();
+ RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
+
+ @Override
+ protected void doExecute() {
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
+
+ }
+ };
+ domain.getCommandStack().execute(command);
+ }
+ }
+ break;
+ case IDirectEdition.DEFAULT_DIRECT_EDITOR:
+
+ // initialize the direct edit manager
+ try {
+ getEditingDomain().runExclusive(new Runnable() {
+
+ @Override
+ public void run() {
+ if (isActive() && isEditable()) {
+ if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character) theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ performDirectEdit(initialChar.charValue());
+ } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ performDirectEdit(editRequest.getLocation());
+ } else {
+ performDirectEdit();
+ }
+ }
+ }
+ });
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ break;
+ default:
+ break;
+ }
+ }
+
+ @Override
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshLabel();
+ refreshFont();
+ refreshFontColor();
+ refreshUnderline();
+ refreshStrikeThrough();
+ }
+
+ protected void refreshLabel() {
+
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof TextSelectionEditPolicy) {
+ ((TextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof TextSelectionEditPolicy) {
+ ((TextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ protected void refreshUnderline() {
+ FontStyle style = (FontStyle) getView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if (style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
+ }
+ }
+
+ protected void refreshStrikeThrough() {
+ FontStyle style = (FontStyle) getView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if (style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ }
+ }
+
+ @Override
+ protected void refreshFont() {
+ FontStyle style = (FontStyle) getView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if (style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ setFont(fontData);
+ }
+ }
+
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ @Override
+ protected void addSemanticListeners() {
+ if (getParser() instanceof ISemanticParser) {
+ EObject element = resolveSemanticElement();
+ parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
+ for (int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ }
+ } else {
+ super.addSemanticListeners();
+ }
+ }
+
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ private View getView() {
+ return (View) getModel();
+ }
+
+ public int getDirectEditionType() {
+ if (checkExtendedEditor()) {
+ initExtendedEditorConfiguration();
+ return IDirectEdition.EXTENDED_DIRECT_EDITOR;
+ }
+ if (checkDefaultEdition()) {
+ return IDirectEdition.DEFAULT_DIRECT_EDITOR;
+ }
+
+ // not a named element. no specific editor => do nothing
+ return IDirectEdition.NO_DIRECT_EDITION;
+ }
+
+ protected boolean checkExtendedEditor() {
+ if (resolveSemanticElement() != null) {
+ return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
+ }
+ return false;
+ }
+
+ protected boolean checkDefaultEdition() {
+ return (getParser() != null);
+ }
+
+ protected void initExtendedEditorConfiguration() {
+ if (configuration == null) {
+ final String languagePreferred = Activator.getInstance().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if (languagePreferred != null && !languagePreferred.equals("")) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else {
+ configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
+ }
+ }
+ }
+
+ protected void updateExtendedEditorConfiguration() {
+ String languagePreferred = Activator.getInstance().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if (languagePreferred != null && !languagePreferred.equals("") && languagePreferred != configuration.getLanguage()) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ configuration = null;
+ }
+ }
+
+ protected void performDefaultDirectEditorEdit(final Request theRequest) {
+ // initialize the direct edit manager
+ try {
+ getEditingDomain().runExclusive(new Runnable() {
+
+ @Override
+ public void run() {
+ if (isActive() && isEditable()) {
+ if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character) theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ performDirectEdit(initialChar.charValue());
+ } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ performDirectEdit(editRequest.getLocation());
+ } else {
+ performDirectEdit();
+ }
+ }
+ }
+ });
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+
+ @Override
+ protected void addNotationalListeners() {
+ super.addNotationalListeners();
+ addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
+ }
+
+ @Override
+ protected void removeNotationalListeners() {
+ super.removeNotationalListeners();
+ removeListenerFilter("PrimaryView"); //$NON-NLS-1$
+ }
+
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ Object feature = event.getFeature();
+ if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer) event.getNewValue();
+ setFontColor(DiagramColorRegistry.getInstance().getColor(c));
+ } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ refreshUnderline();
+ } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ refreshStrikeThrough();
+ } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature)
+ || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ refreshFont();
+ } else if (NotationPackage.eINSTANCE.getView_SourceEdges().equals(feature)) {
+ refreshSourceConnections();
+ } else if (NotationPackage.eINSTANCE.getView_TargetEdges().equals(feature)) {
+ refreshTargetConnections();
+ } else {
+ if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ refreshLabel();
+ }
+ if (getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser) getParser();
+ if (modelParser.areSemanticElementsAffected(null, event)) {
+ removeSemanticListeners();
+ if (resolveSemanticElement() != null) {
+ addSemanticListeners();
+ }
+ refreshLabel();
+ }
+ }
+ }
+ super.handleNotificationEvent(event);
+ }
+
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ protected IFigure createFigurePrim() {
+ return new FigureDescriptor();
+ }
+
+ static final Font THIS_FONT = new Font(Display.getCurrent(), "Arial", 10, SWT.NORMAL);
+
+ public class FigureDescriptor extends PapyrusAnchorableWrappingLabel {
+
+ public FigureDescriptor() {
+ this.setText("");
+ this.setFont(THIS_FONT);
+ }
+ }
+
+ private String getLabelPreferenceKey() {
+ String diagramType = getNotationView().getDiagram().getType();
+ String labelType = getNotationView().getType();
+ return diagramType + "_" + labelType;
+ }
+
+ /*
+ * (non-Javadoc)
+ * Copied from @see org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart#getModelSourceConnections()
+ *
+ * @see org.eclipse.gef.editparts.AbstractGraphicalEditPart#getModelSourceConnections()
+ */
+ @Override
+ protected List getModelSourceConnections() {
+ return ViewUtil.getSourceConnectionsConnectingVisibleViews((View) getModel());
+ }
+
+ /*
+ * (non-Javadoc)
+ * Copied from @see org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart#getModelTargetConnections()
+ *
+ * @see org.eclipse.gef.editparts.AbstractGraphicalEditPart#getModelTargetConnections()
+ */
+ @Override
+ protected List getModelTargetConnections() {
+ return ViewUtil.getTargetConnectionsConnectingVisibleViews((View) getModel());
+ }
+
+
+ /*
+ * (non-Javadoc)
+ * Copied from @see org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart#getSourceConnectionAnchor()
+ *
+ * @see org.eclipse.gef.NodeEditPart#getSourceConnectionAnchor(org.eclipse.gef.ConnectionEditPart)
+ */
+ @Override
+ public ConnectionAnchor getSourceConnectionAnchor(org.eclipse.gef.ConnectionEditPart connEditPart) {
+ final org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditPart connection = (org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditPart) connEditPart;
+ String t = ""; //$NON-NLS-1$
+ try {
+ t = (String) getEditingDomain().runExclusive(new RunnableWithResult.Impl() {
+
+ @Override
+ public void run() {
+ Anchor a = ((Edge) connection.getModel()).getSourceAnchor();
+ if (a instanceof IdentityAnchor) {
+ setResult(((IdentityAnchor) a).getId());
+ } else {
+ setResult(""); //$NON-NLS-1$
+ }
+ }
+ });
+ } catch (InterruptedException e) {
+ Trace.catching(DiagramUIPlugin.getInstance(), DiagramUIDebugOptions.EXCEPTIONS_CATCHING, getClass(), "getSourceConnectionAnchor", e); //$NON-NLS-1$
+ Log.error(DiagramUIPlugin.getInstance(), DiagramUIStatusCodes.IGNORED_EXCEPTION_WARNING, "getSourceConnectionAnchor", e); //$NON-NLS-1$
+ }
+ return getAnchorableFigure().getConnectionAnchor(t);
+ }
+
+ /*
+ * (non-Javadoc)
+ * Copied from @see org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart#getAnchorableFigure()
+ *
+ * @see org.eclipse.gef.NodeEditPart#getSourceConnectionAnchor(org.eclipse.gef.Request)
+ */
+ protected IAnchorableFigure getAnchorableFigure() {
+ IFigure myFigure = getFigure();
+ if (myFigure instanceof IAnchorableFigure) {
+ return (IAnchorableFigure) myFigure;
+ }
+ throw new RuntimeException("The figure of this element should be an IAnchorable Figure");//
+ }
+
+
+ /*
+ * (non-Javadoc)
+ * Copied from @see org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart#getSourceConnectionAnchor()
+ *
+ * @see org.eclipse.gef.NodeEditPart#getSourceConnectionAnchor(org.eclipse.gef.Request)
+ */
+ @Override
+ public ConnectionAnchor getSourceConnectionAnchor(Request request) {
+ if (request instanceof ReconnectRequest) {
+ if (((DropRequest) request).getLocation() == null) {
+ return getAnchorableFigure().getSourceConnectionAnchorAt(null);
+ }
+ Point pt = ((DropRequest) request).getLocation().getCopy();
+ return getAnchorableFigure().getSourceConnectionAnchorAt(pt);
+ } else if (request instanceof DropRequest) {
+ return getAnchorableFigure().getSourceConnectionAnchorAt(((DropRequest) request).getLocation());
+ }
+ return getAnchorableFigure().getSourceConnectionAnchorAt(null);
+ }
+
+
+ /*
+ * (non-Javadoc)
+ * Copied from @see org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart#getTargetConnectionAnchor()
+ *
+ * @see org.eclipse.gef.NodeEditPart#getTargetConnectionAnchor(org.eclipse.gef.ConnectionEditPart)
+ */
+ @Override
+ public ConnectionAnchor getTargetConnectionAnchor(org.eclipse.gef.ConnectionEditPart connEditPart) {
+ final org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditPart connection = (org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditPart) connEditPart;
+
+ String t = ""; //$NON-NLS-1$
+ try {
+ t = (String) getEditingDomain().runExclusive(new RunnableWithResult.Impl() {
+
+ @Override
+ public void run() {
+ Anchor a = ((Edge) connection.getModel()).getTargetAnchor();
+ if (a instanceof IdentityAnchor) {
+ setResult(((IdentityAnchor) a).getId());
+ } else {
+ setResult(""); //$NON-NLS-1$
+ }
+ }
+ });
+ } catch (InterruptedException e) {
+ Trace.catching(DiagramUIPlugin.getInstance(), DiagramUIDebugOptions.EXCEPTIONS_CATCHING, getClass(), "getTargetConnectionAnchor", e); //$NON-NLS-1$
+ Log.error(DiagramUIPlugin.getInstance(), DiagramUIStatusCodes.IGNORED_EXCEPTION_WARNING, "getTargetConnectionAnchor", e); //$NON-NLS-1$
+ }
+
+ return getAnchorableFigure().getConnectionAnchor(t);
+ }
+
+
+
+
+ /*
+ * (non-Javadoc)
+ * Copied from @see org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart#getTargetConnectionAnchor()
+ *
+ * @see org.eclipse.gef.NodeEditPart#getTargetConnectionAnchor(org.eclipse.gef.Request)
+ */
+ @Override
+ public ConnectionAnchor getTargetConnectionAnchor(Request request) {
+ if (request instanceof ReconnectRequest) {
+ if (((DropRequest) request).getLocation() == null) {
+ return getAnchorableFigure().getTargetConnectionAnchorAt(null);
+ }
+ Point pt = ((DropRequest) request).getLocation().getCopy();
+ return getAnchorableFigure().getTargetConnectionAnchorAt(pt);
+ } else if (request instanceof DropRequest) {
+ return getAnchorableFigure().getTargetConnectionAnchorAt(((DropRequest) request).getLocation());
+ }
+ return getAnchorableFigure().getTargetConnectionAnchorAt(null);
+ }
+
+
+ /*
+ * (non-Javadoc)
+ * Copied from @see org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart#mapConnectionAnchorToTerminal()
+ *
+ * @see org.eclipse.gmf.runtime.diagram.ui.editparts.INodeEditPart#mapConnectionAnchorToTerminal(org.eclipse.draw2d.ConnectionAnchor)
+ */
+ @Override
+ final public String mapConnectionAnchorToTerminal(ConnectionAnchor c) {
+ return getAnchorableFigure().getConnectionAnchorTerminal(c);
+ }
+
+ /*
+ * (non-Javadoc)
+ * Copied from @see org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart#mapTerminalToConnectionAnchor()
+ *
+ * @see org.eclipse.gmf.runtime.diagram.ui.editparts.INodeEditPart#mapTerminalToConnectionAnchor(java.lang.String)
+ */
+ @Override
+ final public ConnectionAnchor mapTerminalToConnectionAnchor(String terminal) {
+ return getAnchorableFigure().getConnectionAnchor(terminal);
+ }
+
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.gmf.runtime.diagram.ui.editparts.INotableEditPart#canAttachNote()
+ * Copied from @see org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart#canAttachNote()
+ */
+ @Override
+ public boolean canAttachNote() {
+ return true;
+ }
+
+
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AbstractElementEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AbstractElementEditPart.java
new file mode 100755
index 0000000..2a8cb2f
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AbstractElementEditPart.java
@@ -0,0 +1,191 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.edit.part;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.editpolicies.LayoutEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
+import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
+import org.eclipse.papyrus.sysml.diagram.common.Activator;
+import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ClassifierFigure;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.NodeNamedElementFigure;
+import org.eclipse.papyrus.uml.diagram.common.helper.BasicClassifierCompartmentLayoutHelper;
+import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * Abstract non-diagram specific edit part for nodes.
+ * This class is adapted from edit parts generated by GMF Tooling.
+ */
+public abstract class AbstractElementEditPart extends NamedElementEditPart {
+
+ protected IFigure contentPane;
+
+ protected IFigure primaryShape;
+
+ public AbstractElementEditPart(View view) {
+ super(view);
+ setCompartmentLayoutHelper(BasicClassifierCompartmentLayoutHelper.getInstances());
+ }
+
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
+ }
+
+ protected abstract LayoutEditPolicy createLayoutEditPolicy();
+
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new ClassifierFigure();
+ }
+
+ @Override
+ public NodeNamedElementFigure getPrimaryShape() {
+ return (NodeNamedElementFigure) primaryShape;
+ }
+
+ protected abstract boolean addFixedChild(EditPart childEditPart);
+
+ protected abstract boolean removeFixedChild(EditPart childEditPart);
+
+ @Override
+ protected void addChildVisual(EditPart childEditPart, int index) {
+ if (addFixedChild(childEditPart)) {
+ return;
+ }
+ super.addChildVisual(childEditPart, -1);
+ }
+
+ @Override
+ protected void removeChildVisual(EditPart childEditPart) {
+ if (removeFixedChild(childEditPart)) {
+ return;
+ }
+ super.removeChildVisual(childEditPart);
+ }
+
+ @Override
+ protected abstract IFigure getContentPaneFor(IGraphicalEditPart editPart);
+
+
+ @Override
+ protected NodeFigure createNodePlate() {
+ String prefElementId = getNotationView().getType();
+ IPreferenceStore store = Activator.getInstance().getPreferenceStore();
+ String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH);
+ String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT);
+ DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
+
+ return result;
+ }
+
+ @Override
+ protected NodeFigure createMainFigure() {
+ return createMainFigureWithSVG();
+ }
+
+ @Override
+ protected IFigure setupContentPane(IFigure nodeShape) {
+ if (nodeShape.getLayoutManager() == null) {
+ ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
+ layout.setSpacing(5);
+ nodeShape.setLayoutManager(layout);
+ }
+ return nodeShape; // use nodeShape itself as contentPane
+ }
+
+ @Override
+ public IFigure getContentPane() {
+ if (contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ @Override
+ protected void setForegroundColor(Color color) {
+ if (primaryShape != null) {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+
+ @Override
+ public abstract EditPart getPrimaryChildEditPart();
+
+ @Override
+ public EditPart getTargetEditPart(Request request) {
+ return super.getTargetEditPart(request);
+ }
+
+ @Override
+ public Object getPreferredValue(EStructuralFeature feature) {
+ String prefKey = getNotationView().getType();
+
+ IPreferenceStore store = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
+ Object result = null;
+
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+
+ String prefColor = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.COLOR_LINE);
+
+ } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.COLOR_FONT);
+
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.COLOR_FILL);
+
+ }
+ result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(store, prefColor));
+
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+
+ String prefGradient = PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.COLOR_GRADIENT);
+ GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(store.getString(prefGradient));
+ if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
+ result = new Integer(gradientPreferenceConverter.getTransparency());
+
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ result = gradientPreferenceConverter.getGradientData();
+
+ }
+ }
+
+ if (result == null) {
+ result = getStructuralFeatureValue(feature);
+ }
+ return result;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AbstractElementLabelEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AbstractElementLabelEditPart.java
new file mode 100755
index 0000000..9269beb
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AbstractElementLabelEditPart.java
@@ -0,0 +1,688 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.edit.part;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.Label;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.RunnableWithResult;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.AccessibleEditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.requests.DirectEditRequest;
+import org.eclipse.gef.tools.DirectEditManager;
+import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
+import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
+import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
+import org.eclipse.gmf.runtime.common.ui.services.parser.ParserService;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.extensionpoints.editors.Activator;
+import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration;
+import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration;
+import org.eclipse.papyrus.extensionpoints.editors.configuration.IPopupEditorConfiguration;
+import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog;
+import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog;
+import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper;
+import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
+import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
+import org.eclipse.papyrus.gmf.diagram.common.edit.part.ITextAwareEditPart;
+import org.eclipse.papyrus.gmf.diagram.common.edit.policy.DefaultSnapBackEditPolicy;
+import org.eclipse.papyrus.gmf.diagram.common.edit.policy.LabelDefaultSemanticEditPolicy;
+import org.eclipse.papyrus.gmf.diagram.common.edit.policy.LabelDirectEditPolicy;
+import org.eclipse.papyrus.gmf.diagram.common.edit.policy.TextSelectionEditPolicy;
+import org.eclipse.papyrus.gmf.diagram.common.locator.TextCellEditorLocator;
+import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusConstants;
+import org.eclipse.papyrus.infra.gmfdiag.common.commands.SemanticAdapter;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.sysml.diagram.common.preferences.ILabelPreferenceConstants;
+import org.eclipse.papyrus.sysml.diagram.common.preferences.LabelPreferenceHelper;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.edit.policy.MaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editparts.ILabelRoleProvider;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+import org.eclipse.papyrus.uml.diagram.common.parser.DefaultParserHintAdapter;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.accessibility.AccessibleEvent;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.FontData;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * Abstract non-diagram specific edit part for labels.
+ * This class is adapted from edit parts generated by GMF Tooling.
+ */
+public abstract class AbstractElementLabelEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, ILabelRoleProvider {
+
+ private DirectEditManager manager;
+
+ private IParser parser;
+
+ private List<?> parserElements;
+
+ protected String defaultText;
+
+ /**
+ * direct edition mode (default, undefined, registered editor, etc.)
+ */
+ protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
+
+ /**
+ * configuration from a registered edit dialog
+ */
+ protected IDirectEditorConfiguration configuration;
+
+ /** Constructor */
+ public AbstractElementLabelEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedLabelEditPolicy());
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new TextSelectionEditPolicy());
+ installEditPolicy(EditPolicyRoles.SNAP_FEEDBACK_ROLE, new DefaultSnapBackEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new LabelDefaultSemanticEditPolicy());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ protected String getLabelTextHelper(IFigure figure) {
+ if (figure instanceof WrappingLabel) {
+ return ((WrappingLabel) figure).getText();
+ } else if (figure instanceof ILabelFigure) {
+ return ((ILabelFigure) figure).getText();
+ } else {
+ return ((Label) figure).getText();
+ }
+ }
+
+ protected void setLabelTextHelper(IFigure figure, String text) {
+ if (figure instanceof WrappingLabel) {
+ ((WrappingLabel) figure).setText(text);
+ } else if (figure instanceof ILabelFigure) {
+ ((ILabelFigure) figure).setText(text);
+ } else {
+ ((Label) figure).setText(text);
+ }
+ }
+
+ protected Image getLabelIconHelper(IFigure figure) {
+ if (figure instanceof WrappingLabel) {
+ return ((WrappingLabel) figure).getIcon();
+ } else if (figure instanceof ILabelFigure) {
+ return ((ILabelFigure) figure).getIcon();
+ } else {
+ return ((Label) figure).getIcon();
+ }
+ }
+
+ protected void setLabelIconHelper(IFigure figure, Image icon) {
+ if (figure instanceof WrappingLabel) {
+ ((WrappingLabel) figure).setIcon(icon);
+ } else if (figure instanceof ILabelFigure) {
+ ((ILabelFigure) figure).setIcon(icon);
+ } else {
+ ((Label) figure).setIcon(icon);
+ }
+ }
+
+ public void setLabel(WrappingLabel figure) {
+ unregisterVisuals();
+ setFigure(figure);
+ defaultText = getLabelTextHelper(figure);
+ registerVisuals();
+ refreshVisuals();
+ }
+
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ @Override
+ public EObject getParserElement() {
+ return resolveSemanticElement();
+ }
+
+ protected Image getLabelIcon() {
+ return null;
+ }
+
+ protected String getLabelText() {
+ String text = null;
+ EObject parserElement = getParserElement();
+ if (parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new SemanticAdapter(parserElement, getNotationView()), getParserOptions().intValue());
+ }
+ if (text == null || text.length() == 0) {
+ text = defaultText;
+ }
+ return text;
+ }
+
+ @Override
+ public void setLabelText(String text) {
+ setLabelTextHelper(getFigure(), text);
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof TextSelectionEditPolicy) {
+ ((TextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof TextSelectionEditPolicy) {
+ ((TextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ @Override
+ public String getEditText() {
+ if (getParserElement() == null || getParser() == null) {
+ return ""; //$NON-NLS-1$
+ }
+ return getParser().getEditString(new SemanticAdapter(getParserElement(), getNotationView()), getParserOptions().intValue());
+ }
+
+ protected boolean isEditable() {
+ return getParser() != null;
+ }
+
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ public String isValid(final Object value) {
+ if (value instanceof String) {
+ final EObject element = getParserElement();
+ final IParser parser = getParser();
+ try {
+ IParserEditStatus valid = (IParserEditStatus) getEditingDomain().runExclusive(new RunnableWithResult.Impl<IParserEditStatus>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ @Override
+ public ParserOptions getParserOptions() {
+
+ if (getNotationView() == null || getNotationView().getDiagram() == null) {
+ return ParserOptions.NONE;
+ }
+
+ EAnnotation display = getNotationView().getEAnnotation(VisualInformationPapyrusConstants.CUSTOM_APPEARENCE_ANNOTATION);
+ if (display == null) {
+ return getDefaultParserOptions();
+ }
+
+ // display != null
+ int displayOptions = Integer.parseInt(display.getDetails().get(VisualInformationPapyrusConstants.CUSTOM_APPEARANCE_MASK_VALUE));
+ return new ParserOptions(displayOptions);
+ }
+
+ @Override
+ public ParserOptions getDefaultParserOptions() {
+
+ if (getNotationView() == null || getNotationView().getDiagram() == null) {
+ return ParserOptions.NONE;
+ }
+
+ IPreferenceStore store = org.eclipse.papyrus.infra.gmfdiag.preferences.Activator.getDefault().getPreferenceStore();
+ int displayOptions = store.getInt(LabelPreferenceHelper.getPreferenceConstant(getLabelPreferenceKey(), ILabelPreferenceConstants.LABEL_DISPLAY_PREFERENCE));
+ if (displayOptions == 0) {
+ return ParserOptions.NONE;
+ }
+
+ return new ParserOptions(displayOptions);
+ }
+
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = ParserService.getInstance().getParser(new DefaultParserHintAdapter(getNotationView().getDiagram(), getParserElement(), getNotationView().getType()));
+ }
+ return parser;
+ }
+
+ protected DirectEditManager getManager() {
+ if (manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), new TextCellEditorLocator((WrappingLabel) this.getFigure())));
+ }
+ return manager;
+ }
+
+ protected void setManager(DirectEditManager manager) {
+ this.manager = manager;
+ }
+
+ protected void performDirectEdit() {
+ getManager().show();
+ }
+
+ protected void performDirectEdit(Point eventLocation) {
+ if (getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ }
+ }
+
+ private void performDirectEdit(char initialCharacter) {
+ if (getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager) getManager()).show(initialCharacter);
+ } else {
+ performDirectEdit();
+ }
+ }
+
+ @Override
+ protected void performDirectEditRequest(Request request) {
+
+ final Request theRequest = request;
+
+ if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ directEditionMode = getDirectEditionType();
+ }
+ switch (directEditionMode) {
+ case IDirectEdition.NO_DIRECT_EDITION:
+ // no direct edition mode => does nothing
+ return;
+ case IDirectEdition.EXTENDED_DIRECT_EDITOR:
+ updateExtendedEditorConfiguration();
+ if (configuration == null || configuration.getLanguage() == null) {
+ performDefaultDirectEditorEdit(theRequest);
+ } else {
+ configuration.preEditAction(resolveSemanticElement());
+ Dialog dialog = null;
+ if (configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ helper.showEditor();
+ return;
+ } else if (configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if (configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
+ } else {
+ return;
+ }
+ final Dialog finalDialog = dialog;
+
+ if (Window.OK == dialog.open()) {
+ TransactionalEditingDomain domain = getEditingDomain();
+ RecordingCommand command = new RecordingCommand(domain, "Edit Label") { //$NON-NLS-1$
+
+ @Override
+ protected void doExecute() {
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
+
+ }
+ };
+ domain.getCommandStack().execute(command);
+ }
+ }
+ break;
+ case IDirectEdition.DEFAULT_DIRECT_EDITOR:
+
+ // initialize the direct edit manager
+ try {
+ getEditingDomain().runExclusive(new Runnable() {
+
+ @Override
+ public void run() {
+ if (isActive() && isEditable()) {
+ if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character) theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ performDirectEdit(initialChar.charValue());
+ } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ performDirectEdit(editRequest.getLocation());
+ } else {
+ performDirectEdit();
+ }
+ }
+ }
+ });
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ break;
+ default:
+ break;
+ }
+ }
+
+ @Override
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshLabel();
+ refreshFont();
+ refreshFontColor();
+ refreshUnderline();
+ refreshStrikeThrough();
+ }
+
+ protected void refreshLabel() {
+
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof TextSelectionEditPolicy) {
+ ((TextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof TextSelectionEditPolicy) {
+ ((TextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ protected void refreshUnderline() {
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if (style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
+ }
+ }
+
+ protected void refreshStrikeThrough() {
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if (style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ }
+ }
+
+ @Override
+ protected void refreshFont() {
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if (style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ setFont(fontData);
+ }
+ }
+
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ @Override
+ protected void addSemanticListeners() {
+ if (getParser() instanceof ISemanticParser) {
+ EObject element = getParserElement();
+ parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
+ for (int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ }
+ } else {
+ super.addSemanticListeners();
+ }
+ }
+
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * Returns the kind of associated editor for direct edition.
+ *
+ * @return an <code>int</code> corresponding to the kind of direct editor, @see org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
+ */
+ public int getDirectEditionType() {
+ if (checkExtendedEditor()) {
+ initExtendedEditorConfiguration();
+ return IDirectEdition.EXTENDED_DIRECT_EDITOR;
+ }
+ if (checkDefaultEdition()) {
+ return IDirectEdition.DEFAULT_DIRECT_EDITOR;
+ }
+
+ // not a named element. no specific editor => do nothing
+ return IDirectEdition.NO_DIRECT_EDITION;
+ }
+
+ /**
+ * Checks if an extended editor is present.
+ *
+ * @return <code>true</code> if an extended editor is present.
+ */
+ protected boolean checkExtendedEditor() {
+ if (resolveSemanticElement() != null) {
+ return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
+ }
+ return false;
+ }
+
+ /**
+ * Checks if a default direct edition is available
+ *
+ * @return <code>true</code> if a default direct edition is available
+ */
+ protected boolean checkDefaultEdition() {
+ return (getParser() != null);
+ }
+
+ /**
+ * Initializes the extended editor configuration
+ */
+ protected void initExtendedEditorConfiguration() {
+ if (configuration == null) {
+ final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if (languagePreferred != null && !languagePreferred.equals("")) { //$NON-NLS-1$
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else {
+ configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
+ }
+ }
+ }
+
+ /**
+ * Updates the preference configuration
+ */
+ protected void updateExtendedEditorConfiguration() {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if (languagePreferred != null && !languagePreferred.equals("") && languagePreferred != configuration.getLanguage()) { //$NON-NLS-1$
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ configuration = null;
+ }
+ }
+
+ /**
+ * Performs the direct edit usually used by GMF editors.
+ *
+ * @param theRequest
+ * the direct edit request that starts the direct edit system
+ */
+ protected void performDefaultDirectEditorEdit(final Request theRequest) {
+ // initialize the direct edit manager
+ try {
+ getEditingDomain().runExclusive(new Runnable() {
+
+ @Override
+ public void run() {
+ if (isActive() && isEditable()) {
+ if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character) theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ performDirectEdit(initialChar.charValue());
+ } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ performDirectEdit(editRequest.getLocation());
+ } else {
+ performDirectEdit();
+ }
+ }
+ }
+ });
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ Object feature = event.getFeature();
+ if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer) event.getNewValue();
+ setFontColor(DiagramColorRegistry.getInstance().getColor(c));
+ } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ refreshUnderline();
+ } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ refreshStrikeThrough();
+ } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature)
+ || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ refreshFont();
+ } else {
+ if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ refreshLabel();
+ }
+ if (getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser) getParser();
+ if (modelParser.areSemanticElementsAffected(null, event)) {
+ removeSemanticListeners();
+ if (resolveSemanticElement() != null) {
+ addSemanticListeners();
+ }
+ // Bug 457470 : The label refreshment is not done if the following method is not called
+ // This call was comment to fix a text alignment issue (Bug 440226)
+ refreshLabel(); //Comment to fix text alignment issue
+ }
+ }
+ }
+
+ super.handleNotificationEvent(event);
+ }
+
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+
+ protected void addSnapBackLocation() {
+ // Use default view position as snap back position
+ IPreferenceStore store = org.eclipse.papyrus.infra.gmfdiag.preferences.Activator.getDefault().getPreferenceStore();
+
+ String xKey = PreferencesConstantsHelper.getElementConstant(getLabelPreferenceKey(), PreferencesConstantsHelper.LOCATION_X);
+ String yKey = PreferencesConstantsHelper.getElementConstant(getLabelPreferenceKey(), PreferencesConstantsHelper.LOCATION_Y);
+
+ Point snapBackPosition = new Point(store.getInt(xKey), store.getInt(yKey));
+
+ registerSnapBackPosition(getLabelPreferenceKey(), snapBackPosition);
+ }
+
+ private String getLabelPreferenceKey() {
+ String diagramType = getNotationView().getDiagram().getType();
+ String parentType = ViewUtil.getViewContainer(getNotationView()).getType();
+ String labelType = getNotationView().getType();
+ return diagramType + "_" + parentType + "-" + labelType; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public abstract String getLabelRole();
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public abstract String getIconPathRole();
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AbstractElementLinkEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AbstractElementLinkEditPart.java
new file mode 100755
index 0000000..126bb18
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AbstractElementLinkEditPart.java
@@ -0,0 +1,246 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.edit.part;
+
+import org.eclipse.draw2d.ColorConstants;
+import org.eclipse.draw2d.PolygonDecoration;
+import org.eclipse.draw2d.PolylineDecoration;
+import org.eclipse.draw2d.RotatableDecoration;
+import org.eclipse.draw2d.geometry.PointList;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gmf.runtime.draw2d.ui.mapmode.IMapMode;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editparts.UMLConnectionNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.figure.EdgeDecorationType;
+
+/**
+ * Abstract non-diagram specific edit part for links.
+ * This class is adapted from edit parts generated by GMF Tooling.
+ */
+public abstract class AbstractElementLinkEditPart extends UMLConnectionNodeEditPart {
+
+ /**
+ * Constructor.
+ */
+ public AbstractElementLinkEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeLinkLabelDisplayEditPolicy());
+ }
+
+ /**
+ * Add fixed child edit part.
+ */
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof AppliedStereotypeLinkLabelEditPart) {
+ ((AppliedStereotypeLinkLabelEditPart) childEditPart).setLabel(getPrimaryShape().getAppliedStereotypeLabel());
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Remove fixed child edit part.
+ */
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof AppliedStereotypeLinkLabelEditPart) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void addChildVisual(EditPart childEditPart, int index) {
+ if (addFixedChild(childEditPart)) {
+ return;
+ }
+ super.addChildVisual(childEditPart, -1);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void removeChildVisual(EditPart childEditPart) {
+ if (removeFixedChild(childEditPart)) {
+ return;
+ }
+ super.removeChildVisual(childEditPart);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ super.handleNotificationEvent(event);
+
+ // Update the figure when the line width changes
+ Object feature = event.getFeature();
+ if ((getModel() != null) && (getModel() == event.getNotifier())) {
+
+ if (NotationPackage.eINSTANCE.getLineStyle_LineWidth().equals(feature)) {
+ refreshLineWidth();
+ refreshArrowSource();
+ refreshArrowTarget();
+ } else if (NotationPackage.eINSTANCE.getLineTypeStyle_LineType().equals(feature)) {
+ refreshLineType();
+ }
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshLineType();
+ refreshLineWidth();
+ refreshArrowSource();
+ refreshArrowTarget();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void setLineWidth(int width) {
+ if (width < 0) {
+ width = 1;
+ }
+ getPrimaryShape().setLineWidth(width);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void setLineType(int style) {
+ getPrimaryShape().setLineStyle(style);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void setArrowSource(RotatableDecoration arrowDecoration) {
+ getPrimaryShape().setSourceDecoration(arrowDecoration);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void setArrowTarget(RotatableDecoration arrowDecoration) {
+ getPrimaryShape().setTargetDecoration(arrowDecoration);
+ }
+
+ /**
+ * <pre>
+ * {@inheritDoc}
+ *
+ * This method override parent implementation to add a new set of
+ * predefined decoration type.
+ *
+ * The arrowType available constants are given in {@link EdgeDecorationType}.
+ * </pre>
+ */
+ @Override
+ protected RotatableDecoration getArrowDecoration(int arrowType) {
+ RotatableDecoration decoration = null;
+ int width = getLineWidth();
+ if (width < 0) {
+ width = 1;
+ }
+ if (arrowType == EdgeDecorationType.OPEN_ARROW) {
+ IMapMode mm = getMapMode();
+ decoration = new PolylineDecoration();
+ ((PolylineDecoration) decoration).setScale(mm.DPtoLP(15 + width), mm.DPtoLP(5 + width));
+ ((PolylineDecoration) decoration).setTemplate(PolylineDecoration.TRIANGLE_TIP);
+ ((PolylineDecoration) decoration).setLineWidth(mm.DPtoLP(width));
+
+ } else if (arrowType == EdgeDecorationType.SOLID_ARROW_FILLED) {
+ IMapMode mm = getMapMode();
+ decoration = new PolygonDecoration();
+ ((PolygonDecoration) decoration).setScale(mm.DPtoLP(15 + width), mm.DPtoLP(5 + width));
+ ((PolygonDecoration) decoration).setTemplate(PolygonDecoration.TRIANGLE_TIP);
+ ((PolygonDecoration) decoration).setLineWidth(mm.DPtoLP(width));
+ ((PolygonDecoration) decoration).setFill(true);
+
+ } else if (arrowType == EdgeDecorationType.SOLID_ARROW_EMPTY) {
+ IMapMode mm = getMapMode();
+ decoration = new PolygonDecoration();
+ ((PolygonDecoration) decoration).setScale(mm.DPtoLP(15 + width), mm.DPtoLP(5 + width));
+ ((PolygonDecoration) decoration).setTemplate(PolygonDecoration.TRIANGLE_TIP);
+ ((PolygonDecoration) decoration).setLineWidth(mm.DPtoLP(width));
+
+ // Not really empty... filled with white color.
+ ((PolygonDecoration) decoration).setFill(true);
+ ((PolygonDecoration) decoration).setBackgroundColor(ColorConstants.white);
+
+ } else if (arrowType == EdgeDecorationType.SOLID_DIAMOND_FILLED) {
+ IMapMode mm = getMapMode();
+ decoration = new PolygonDecoration();
+ ((PolygonDecoration) decoration).setScale(mm.DPtoLP(12 + width), mm.DPtoLP(6 + width));
+
+ PointList diamondPointList = new PointList();
+ diamondPointList.addPoint(0, 0);
+ diamondPointList.addPoint(-1, 1);
+ diamondPointList.addPoint(-2, 0);
+ diamondPointList.addPoint(-1, -1);
+
+ ((PolygonDecoration) decoration).setTemplate(diamondPointList);
+ ((PolygonDecoration) decoration).setLineWidth(mm.DPtoLP(width));
+ ((PolygonDecoration) decoration).setFill(true);
+
+ } else if (arrowType == EdgeDecorationType.SOLID_DIAMOND_EMPTY) {
+ IMapMode mm = getMapMode();
+ decoration = new PolygonDecoration();
+ ((PolygonDecoration) decoration).setScale(mm.DPtoLP(12 + width), mm.DPtoLP(6 + width));
+
+ PointList diamondPointList = new PointList();
+ diamondPointList.addPoint(0, 0);
+ diamondPointList.addPoint(-1, 1);
+ diamondPointList.addPoint(-2, 0);
+ diamondPointList.addPoint(-1, -1);
+
+ ((PolygonDecoration) decoration).setTemplate(diamondPointList);
+ ((PolygonDecoration) decoration).setLineWidth(mm.DPtoLP(width));
+
+ // Not really empty... filled with white color.
+ ((PolygonDecoration) decoration).setFill(true);
+ ((PolygonDecoration) decoration).setBackgroundColor(ColorConstants.white);
+ }
+
+ return decoration;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AbstractElementNodeLabelEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AbstractElementNodeLabelEditPart.java
new file mode 100755
index 0000000..08ca11e
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AbstractElementNodeLabelEditPart.java
@@ -0,0 +1,744 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.edit.part;
+
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.Label;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.RunnableWithResult;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.AccessibleEditPart;
+import org.eclipse.gef.DragTracker;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.requests.DirectEditRequest;
+import org.eclipse.gef.requests.SelectionRequest;
+import org.eclipse.gef.tools.DirectEditManager;
+import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
+import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
+import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
+import org.eclipse.gmf.runtime.common.ui.services.parser.ParserService;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.TopGraphicEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.gef.ui.internal.tools.DelegatingDragEditPartsTracker;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.extensionpoints.editors.Activator;
+import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration;
+import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration;
+import org.eclipse.papyrus.extensionpoints.editors.configuration.IPopupEditorConfiguration;
+import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog;
+import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog;
+import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper;
+import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
+import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
+import org.eclipse.papyrus.gmf.diagram.common.edit.part.ITextAwareEditPart;
+import org.eclipse.papyrus.gmf.diagram.common.edit.policy.LabelDirectEditPolicy;
+import org.eclipse.papyrus.gmf.diagram.common.edit.policy.TextNonResizableEditPolicy;
+import org.eclipse.papyrus.gmf.diagram.common.edit.policy.TextSelectionEditPolicy;
+import org.eclipse.papyrus.gmf.diagram.common.locator.TextCellEditorLocator;
+import org.eclipse.papyrus.infra.emf.appearance.helper.AppearanceHelper;
+import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusConstants;
+import org.eclipse.papyrus.infra.gmfdiag.common.commands.SemanticAdapter;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.common.preferences.ILabelPreferenceConstants;
+import org.eclipse.papyrus.sysml.diagram.common.preferences.LabelPreferenceHelper;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.edit.policy.MaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editparts.ILabelRoleProvider;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+import org.eclipse.papyrus.uml.diagram.common.parser.DefaultParserHintAdapter;
+import org.eclipse.papyrus.uml.diagram.common.util.DiagramEditPartsUtil;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.accessibility.AccessibleEvent;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.FontData;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * Abstract non-diagram specific edit part for labels.
+ * This class is adapted from edit parts generated by GMF Tooling.
+ */
+public abstract class AbstractElementNodeLabelEditPart extends PapyrusCompartmentEditPart implements ITextAwareEditPart, ILabelRoleProvider {
+
+ private DirectEditManager manager;
+
+ private IParser parser;
+
+ private List<?> parserElements;
+
+ protected String defaultText;
+
+ /**
+ * direct edition mode (default, undefined, registered editor, etc.)
+ */
+ protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
+
+ /**
+ * configuration from a registered edit dialog
+ */
+ protected IDirectEditorConfiguration configuration;
+
+ /** Constructor */
+ public AbstractElementNodeLabelEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * Compartment-like isSelectable implementation.
+ *
+ * By default, the edit parts get selectable only if
+ * the compartment's top level container matches the top level
+ * container of the editpart that currently has the keyboard focus
+ * i.e: you need to select the shape first before selecting a this label.
+ *
+ * @see CompartmentEditPart#isSelectable()
+ */
+ @Override
+ public boolean isSelectable() {
+ if (super.isSelectable()) {
+ EditPart focusPart = getViewer().getFocusEditPart();
+ if (focusPart instanceof IGraphicalEditPart) {
+ TopGraphicEditPart focusTopEP = ((IGraphicalEditPart) focusPart).getTopGraphicEditPart();
+ TopGraphicEditPart myTopEP = getTopGraphicEditPart();
+ if (myTopEP == focusTopEP) {
+ // check if the selection contains only editparts belonging to
+ // the same top level editpart
+ Iterator<?> selection = getViewer().getSelectedEditParts().iterator();
+ while (selection.hasNext()) {
+ Object editPart = selection.next();
+ if (editPart instanceof IGraphicalEditPart && (((IGraphicalEditPart) editPart).getTopGraphicEditPart() != myTopEP)) {
+ return false;
+ }
+ }
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public DragTracker getDragTracker(Request request) {
+ if (request instanceof SelectionRequest && ((SelectionRequest) request).getLastButtonPressed() == 3) {
+ return null;
+ }
+ // Delegate to the main edit part.
+ return new DelegatingDragEditPartsTracker(this, getTopGraphicEditPart());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedLabelEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new TextNonResizableEditPolicy());
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ }
+
+ protected String getLabelTextHelper(IFigure figure) {
+ if (figure instanceof WrappingLabel) {
+ return ((WrappingLabel) figure).getText();
+ } else if (figure instanceof ILabelFigure) {
+ return ((ILabelFigure) figure).getText();
+ } else {
+ return ((Label) figure).getText();
+ }
+ }
+
+ protected void setLabelTextHelper(IFigure figure, String text) {
+ if (figure instanceof WrappingLabel) {
+ ((WrappingLabel) figure).setText(text);
+ } else if (figure instanceof ILabelFigure) {
+ ((ILabelFigure) figure).setText(text);
+ } else {
+ ((Label) figure).setText(text);
+ }
+ }
+
+ protected Image getLabelIconHelper(IFigure figure) {
+ if (figure instanceof WrappingLabel) {
+ return ((WrappingLabel) figure).getIcon();
+ } else if (figure instanceof ILabelFigure) {
+ return ((ILabelFigure) figure).getIcon();
+ } else {
+ return ((Label) figure).getIcon();
+ }
+ }
+
+ protected void setLabelIconHelper(IFigure figure, Image icon) {
+ if (figure instanceof WrappingLabel) {
+ ((WrappingLabel) figure).setIcon(icon);
+ } else if (figure instanceof ILabelFigure) {
+ ((ILabelFigure) figure).setIcon(icon);
+ } else {
+ ((Label) figure).setIcon(icon);
+ }
+ }
+
+ public void setLabel(WrappingLabel figure) {
+ unregisterVisuals();
+ setFigure(figure);
+ defaultText = getLabelTextHelper(figure);
+ registerVisuals();
+ refreshVisuals();
+ }
+
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.emptyList();
+ }
+
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ @Override
+ public EObject getParserElement() {
+ return resolveSemanticElement();
+ }
+
+ protected Image getLabelIcon() {
+ EObject parserElement = getParserElement();
+ if (parserElement == null) {
+ return null;
+ }
+
+ List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
+ for (View view : views) {
+ if (AppearanceHelper.showElementIcon(view)) {
+ return org.eclipse.papyrus.sysml.diagram.common.Activator.getInstance().getLabelProvider().getImage(parserElement);
+ }
+ }
+ return null;
+
+ }
+
+ protected String getLabelText() {
+ String text = null;
+ EObject parserElement = getParserElement();
+ if (parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new SemanticAdapter(parserElement, getNotationView()), getParserOptions().intValue());
+ }
+ if (text == null || text.length() == 0) {
+ text = defaultText;
+ }
+ return text;
+ }
+
+ @Override
+ public void setLabelText(String text) {
+ setLabelTextHelper(getFigure(), text);
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof TextSelectionEditPolicy) {
+ ((TextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof TextSelectionEditPolicy) {
+ ((TextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ @Override
+ public String getEditText() {
+ if (getParserElement() == null || getParser() == null) {
+ return ""; //$NON-NLS-1$
+ }
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
+ }
+
+ protected boolean isEditable() {
+ return getParser() != null;
+ }
+
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ public String isValid(final Object value) {
+ if (value instanceof String) {
+ final EObject element = getParserElement();
+ final IParser parser = getParser();
+ try {
+ IParserEditStatus valid = (IParserEditStatus) getEditingDomain().runExclusive(new RunnableWithResult.Impl<IParserEditStatus>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ @Override
+ public ParserOptions getParserOptions() {
+
+ if (getNotationView() == null || getNotationView().getDiagram() == null) {
+ return ParserOptions.NONE;
+ }
+
+ EAnnotation display = getNotationView().getEAnnotation(VisualInformationPapyrusConstants.CUSTOM_APPEARENCE_ANNOTATION);
+ if (display == null) {
+ return getDefaultParserOptions();
+ }
+
+ // display != null
+ int displayOptions = Integer.parseInt(display.getDetails().get(VisualInformationPapyrusConstants.CUSTOM_APPEARANCE_MASK_VALUE));
+ return new ParserOptions(displayOptions);
+ }
+
+ @Override
+ public ParserOptions getDefaultParserOptions() {
+
+ if (getNotationView() == null || getNotationView().getDiagram() == null) {
+ return ParserOptions.NONE;
+ }
+
+ IPreferenceStore store = org.eclipse.papyrus.infra.gmfdiag.preferences.Activator.getDefault().getPreferenceStore();
+ int displayOptions = store.getInt(LabelPreferenceHelper.getPreferenceConstant(getLabelPreferenceKey(), ILabelPreferenceConstants.LABEL_DISPLAY_PREFERENCE));
+ if (displayOptions == 0) {
+ return ParserOptions.NONE;
+ }
+
+ return new ParserOptions(displayOptions);
+ }
+
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = ParserService.getInstance().getParser(new DefaultParserHintAdapter(getNotationView().getDiagram(), getParserElement(), getNotationView().getType()));
+ }
+ return parser;
+ }
+
+ protected DirectEditManager getManager() {
+ if (manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), new TextCellEditorLocator((WrappingLabel) this.getFigure())));
+ }
+ return manager;
+ }
+
+ protected void setManager(DirectEditManager manager) {
+ this.manager = manager;
+ }
+
+ protected void performDirectEdit() {
+ getManager().show();
+ }
+
+ protected void performDirectEdit(Point eventLocation) {
+ if (getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ }
+ }
+
+ private void performDirectEdit(char initialCharacter) {
+ if (getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager) getManager()).show(initialCharacter);
+ } else {
+ performDirectEdit();
+ }
+ }
+
+ @Override
+ protected void performDirectEditRequest(Request request) {
+
+ final Request theRequest = request;
+
+ if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ directEditionMode = getDirectEditionType();
+ }
+ switch (directEditionMode) {
+ case IDirectEdition.NO_DIRECT_EDITION:
+ // no direct edition mode => does nothing
+ return;
+ case IDirectEdition.EXTENDED_DIRECT_EDITOR:
+ updateExtendedEditorConfiguration();
+ if (configuration == null || configuration.getLanguage() == null) {
+ performDefaultDirectEditorEdit(theRequest);
+ } else {
+ configuration.preEditAction(resolveSemanticElement());
+ Dialog dialog = null;
+ if (configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ helper.showEditor();
+ return;
+ } else if (configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if (configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
+ } else {
+ return;
+ }
+ final Dialog finalDialog = dialog;
+
+ if (Window.OK == dialog.open()) {
+ TransactionalEditingDomain domain = getEditingDomain();
+ RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
+
+ @Override
+ protected void doExecute() {
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
+
+ }
+ };
+ domain.getCommandStack().execute(command);
+ }
+ }
+ break;
+ case IDirectEdition.DEFAULT_DIRECT_EDITOR:
+
+ // initialize the direct edit manager
+ try {
+ getEditingDomain().runExclusive(new Runnable() {
+
+ @Override
+ public void run() {
+ if (isActive() && isEditable()) {
+ if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character) theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ performDirectEdit(initialChar.charValue());
+ } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ performDirectEdit(editRequest.getLocation());
+ } else {
+ performDirectEdit();
+ }
+ }
+ }
+ });
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ break;
+ default:
+ break;
+ }
+ }
+
+ @Override
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshLabel();
+ refreshFont();
+ refreshFontColor();
+ refreshUnderline();
+ refreshStrikeThrough();
+ }
+
+ protected void refreshLabel() {
+
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof TextSelectionEditPolicy) {
+ ((TextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof TextSelectionEditPolicy) {
+ ((TextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ protected void refreshUnderline() {
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if (style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
+ }
+ }
+
+ protected void refreshStrikeThrough() {
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if (style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ }
+ }
+
+ @Override
+ protected void refreshFont() {
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if (style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ setFont(fontData);
+ }
+ }
+
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ @Override
+ protected void addSemanticListeners() {
+ if (getParser() instanceof ISemanticParser) {
+ EObject element = getParserElement();
+ parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
+ for (int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ }
+ } else {
+ super.addSemanticListeners();
+ }
+ }
+
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * Returns the kind of associated editor for direct edition.
+ *
+ * @return an <code>int</code> corresponding to the kind of direct editor, @see org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
+ */
+ public int getDirectEditionType() {
+ if (checkExtendedEditor()) {
+ initExtendedEditorConfiguration();
+ return IDirectEdition.EXTENDED_DIRECT_EDITOR;
+ }
+ if (checkDefaultEdition()) {
+ return IDirectEdition.DEFAULT_DIRECT_EDITOR;
+ }
+
+ // not a named element. no specific editor => do nothing
+ return IDirectEdition.NO_DIRECT_EDITION;
+ }
+
+ /**
+ * Checks if an extended editor is present.
+ *
+ * @return <code>true</code> if an extended editor is present.
+ */
+ protected boolean checkExtendedEditor() {
+ if (resolveSemanticElement() != null) {
+ return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
+ }
+ return false;
+ }
+
+ /**
+ * Checks if a default direct edition is available
+ *
+ * @return <code>true</code> if a default direct edition is available
+ */
+ protected boolean checkDefaultEdition() {
+ return (getParser() != null);
+ }
+
+ /**
+ * Initializes the extended editor configuration
+ */
+ protected void initExtendedEditorConfiguration() {
+ if (configuration == null) {
+ final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if (languagePreferred != null && !languagePreferred.equals("")) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else {
+ configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
+ }
+ }
+ }
+
+ /**
+ * Updates the preference configuration
+ */
+ protected void updateExtendedEditorConfiguration() {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if (languagePreferred != null && !languagePreferred.equals("") && languagePreferred != configuration.getLanguage()) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ configuration = null;
+ }
+ }
+
+ /**
+ * Performs the direct edit usually used by GMF editors.
+ *
+ * @param theRequest
+ * the direct edit request that starts the direct edit system
+ */
+ protected void performDefaultDirectEditorEdit(final Request theRequest) {
+ // initialize the direct edit manager
+ try {
+ getEditingDomain().runExclusive(new Runnable() {
+
+ @Override
+ public void run() {
+ if (isActive() && isEditable()) {
+ if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character) theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ performDirectEdit(initialChar.charValue());
+ } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ performDirectEdit(editRequest.getLocation());
+ } else {
+ performDirectEdit();
+ }
+ }
+ }
+ });
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ Object feature = event.getFeature();
+ if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer) event.getNewValue();
+ setFontColor(DiagramColorRegistry.getInstance().getColor(c));
+ } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ refreshUnderline();
+ } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ refreshStrikeThrough();
+ } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature)
+ || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ refreshFont();
+ } else {
+ if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ refreshLabel();
+ }
+ if (getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser) getParser();
+ if (modelParser.areSemanticElementsAffected(null, event)) {
+ removeSemanticListeners();
+ if (resolveSemanticElement() != null) {
+ addSemanticListeners();
+ }
+ refreshLabel();
+ }
+ }
+ }
+
+ if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ refreshLabel();
+ }
+
+ super.handleNotificationEvent(event);
+ }
+
+ @Override
+ protected void addNotationalListeners() {
+ super.addNotationalListeners();
+ addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
+ }
+
+ @Override
+ protected void removeNotationalListeners() {
+ super.removeNotationalListeners();
+ removeListenerFilter("PrimaryView"); //$NON-NLS-1$
+ }
+
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+
+ public String getLabelPreferenceKey() {
+ String diagramType = getNotationView().getDiagram().getType();
+ String parentType = ViewUtil.getViewContainer(getNotationView()).getType();
+ String labelType = getNotationView().getType();
+ return diagramType + "_" + parentType + "-" + labelType;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public abstract String getLabelRole();
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public abstract String getIconPathRole();
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AbstractShapeCompartmentEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AbstractShapeCompartmentEditPart.java
new file mode 100755
index 0000000..8da57dd
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AbstractShapeCompartmentEditPart.java
@@ -0,0 +1,137 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.edit.part;
+
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.gef.DragTracker;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.RequestConstants;
+import org.eclipse.gef.requests.SelectionRequest;
+import org.eclipse.gef.tools.DeselectAllTracker;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ResizableCompartmentEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.internal.tools.RubberbandDragTracker;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.tooling.runtime.linklf.LinkLFShapeCompartmentEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
+
+/**
+ * Abstract non-diagram specific edit part for shape compartment.
+ * This class is adapted from edit parts generated by GMF Tooling.
+ */
+public abstract class AbstractShapeCompartmentEditPart extends LinkLFShapeCompartmentEditPart {
+
+ public AbstractShapeCompartmentEditPart(View view) {
+ super(view);
+ }
+
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultCompartmentSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
+ installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
+ }
+
+ @Override
+ protected void setRatio(Double ratio) {
+ if (getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+
+ @Override
+ protected void handleNotificationEvent(Notification notification) {
+ Object feature = notification.getFeature();
+ if (NotationPackage.eINSTANCE.getSize_Width().equals(feature) || NotationPackage.eINSTANCE.getSize_Height().equals(feature) || NotationPackage.eINSTANCE.getLocation_X().equals(feature) || NotationPackage.eINSTANCE.getLocation_Y().equals(feature)) {
+ refreshBounds();
+ }
+ super.handleNotificationEvent(notification);
+ }
+
+ protected void refreshBounds() {
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ Dimension size = new Dimension(width, height);
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ Point loc = new Point(x, y);
+ ((GraphicalEditPart) getParent()).setLayoutConstraint(this, getFigure(), new Rectangle(loc, size));
+ }
+
+ @Override
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshBounds();
+ }
+
+ /**
+ * Install a drag tracker supporting double click (necessary for navigation).
+ */
+ @Override
+ public DragTracker getDragTracker(Request req) {
+ if (!supportsDragSelection()) {
+ return super.getDragTracker(req);
+ }
+
+ if (req instanceof SelectionRequest
+ && ((SelectionRequest) req).getLastButtonPressed() == 3) {
+ return new DeselectAllTracker(this) {
+
+ @Override
+ protected boolean handleButtonDown(int button) {
+ getCurrentViewer().select(AbstractShapeCompartmentEditPart.this);
+ return true;
+ }
+ };
+ }
+
+ return new RubberbandDragTracker() {
+
+ /*
+ * this method has been respecified in order to allow double click
+ * on the compartment.
+ * hence it allows the navigation by double click
+ */
+ @Override
+ protected boolean handleDoubleClick(int button) {
+ SelectionRequest request = new SelectionRequest();
+ request.setLocation(getLocation());
+ request.setType(RequestConstants.REQ_OPEN);
+ performRequest(request);
+ return true;
+ }
+
+ @Override
+ protected void handleFinished() {
+ if (getViewer().getSelectedEditParts().isEmpty()) {
+ getViewer().select(AbstractShapeCompartmentEditPart.this);
+ }
+ }
+
+ };
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AppliedStereotypeAffixedLabelEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AppliedStereotypeAffixedLabelEditPart.java
new file mode 100755
index 0000000..fca5131
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AppliedStereotypeAffixedLabelEditPart.java
@@ -0,0 +1,116 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.edit.part;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IPapyrusEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure;
+
+/**
+ * This class implements an affixed label edit part for applied stereotype representation on border items.
+ */
+public class AppliedStereotypeAffixedLabelEditPart extends AbstractElementLabelEditPart implements IBorderItemEditPart, IPapyrusEditPart {
+
+ /** Constructor */
+ public AppliedStereotypeAffixedLabelEditPart(View view) {
+ super(view);
+ addSnapBackLocation();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeExternalNodeEditPolicy());
+ }
+
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return constraint instanceof IBorderItemLocator ? (IBorderItemLocator) constraint : null;
+ }
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ protected IFigure createFigurePrim() {
+ return new AppliedStereotypeWrappingLabelFigure();
+ }
+
+ @Override
+ public IFigure getPrimaryShape() {
+ return getFigure();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected boolean isEditable() {
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * Forbid direct edition on this label.
+ */
+ @Override
+ public int getDirectEditionType() {
+ // The label is read-only (defined in GMFGen model)
+ return IDirectEdition.NO_DIRECT_EDITION;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getLabelRole() {
+ return "Stereotype";//$NON-NLS-1$
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getIconPathRole() {
+ return "";//$NON-NLS-1$
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AppliedStereotypeLinkLabelEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AppliedStereotypeLinkLabelEditPart.java
new file mode 100755
index 0000000..ed7894b
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AppliedStereotypeLinkLabelEditPart.java
@@ -0,0 +1,83 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.edit.part;
+
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+
+/**
+ * Abstract non-diagram specific edit part for link label representing applied stereotypes.
+ * This class is adapted from edit parts generated by GMF Tooling.
+ */
+public class AppliedStereotypeLinkLabelEditPart extends AbstractElementLabelEditPart {
+
+ /** Constructor */
+ public AppliedStereotypeLinkLabelEditPart(View view) {
+ super(view);
+ addSnapBackLocation();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected boolean isEditable() {
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * Forbid direct edition on this label.
+ */
+ @Override
+ public int getDirectEditionType() {
+ // The label is read-only (defined in GMFGen model)
+ return IDirectEdition.NO_DIRECT_EDITION;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getLabelRole() {
+ return "Stereotype";//$NON-NLS-1$
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getIconPathRole() {
+ return "";//$NON-NLS-1$
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AssociationLinkLabelSourceMultiplicityEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AssociationLinkLabelSourceMultiplicityEditPart.java
new file mode 100755
index 0000000..9475db9
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AssociationLinkLabelSourceMultiplicityEditPart.java
@@ -0,0 +1,97 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.edit.part;
+
+import org.eclipse.draw2d.ConnectionLocator;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+import org.eclipse.papyrus.uml.diagram.common.utils.AssociationViewUtils;
+import org.eclipse.uml2.uml.Association;
+
+/**
+ * Edit Part for link label showing {@link Association} source multiplicity.
+ */
+public class AssociationLinkLabelSourceMultiplicityEditPart extends AbstractElementLabelEditPart {
+
+ /** Constructor */
+ public AssociationLinkLabelSourceMultiplicityEditPart(View view) {
+ super(view);
+ addSnapBackLocation();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.SOURCE;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public EObject getParserElement() {
+ EObject semanticElement = resolveSemanticElement();
+ if (!(semanticElement instanceof Association)) {
+ return null;
+ }
+ Association association = (Association) semanticElement;
+ if ((getNotationView() != null) && (ViewUtil.getContainerView(getNotationView()) != null)) {
+ View owner = ViewUtil.getContainerView(getNotationView());
+
+ if ((association != null) && (association.getMemberEnds().size() == 2)) {
+ return AssociationViewUtils.getSourceSemanticEnd(owner);
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected boolean isEditable() {
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getLabelRole() {
+ return "SourceMultiplicity"; //$NON-NLS-1$
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getIconPathRole() {
+ return ""; //$NON-NLS-1$
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AssociationLinkLabelSourceRoleEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AssociationLinkLabelSourceRoleEditPart.java
new file mode 100755
index 0000000..deff0c5
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AssociationLinkLabelSourceRoleEditPart.java
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.edit.part;
+
+import org.eclipse.draw2d.ConnectionLocator;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+import org.eclipse.papyrus.uml.diagram.common.utils.AssociationViewUtils;
+import org.eclipse.uml2.uml.Association;
+
+/**
+ * Edit Part for link label showing {@link Association} source role.
+ */
+public class AssociationLinkLabelSourceRoleEditPart extends AbstractElementLabelEditPart {
+
+ /** Constructor */
+ public AssociationLinkLabelSourceRoleEditPart(View view) {
+ super(view);
+ addSnapBackLocation();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.SOURCE;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public EObject getParserElement() {
+ EObject semanticElement = resolveSemanticElement();
+ if (!(semanticElement instanceof Association)) {
+ return null;
+ }
+ Association association = (Association) semanticElement;
+ if ((getNotationView() != null) && (ViewUtil.getContainerView(getNotationView()) != null)) {
+ View owner = ViewUtil.getContainerView(getNotationView());
+
+ if ((association != null) && (association.getMemberEnds().size() == 2)) {
+ return AssociationViewUtils.getSourceSemanticEnd(owner);
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getLabelRole() {
+ return "SourceRole"; //$NON-NLS-1$
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getIconPathRole() {
+ return ""; //$NON-NLS-1$
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AssociationLinkLabelTargetMultiplicityEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AssociationLinkLabelTargetMultiplicityEditPart.java
new file mode 100755
index 0000000..8a6ed49
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AssociationLinkLabelTargetMultiplicityEditPart.java
@@ -0,0 +1,97 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.edit.part;
+
+import org.eclipse.draw2d.ConnectionLocator;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+import org.eclipse.papyrus.uml.diagram.common.utils.AssociationViewUtils;
+import org.eclipse.uml2.uml.Association;
+
+/**
+ * Edit Part for link label showing {@link Association} target multiplicity.
+ */
+public class AssociationLinkLabelTargetMultiplicityEditPart extends AbstractElementLabelEditPart {
+
+ /** Constructor */
+ public AssociationLinkLabelTargetMultiplicityEditPart(View view) {
+ super(view);
+ addSnapBackLocation();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.TARGET;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public EObject getParserElement() {
+ EObject semanticElement = resolveSemanticElement();
+ if (!(semanticElement instanceof Association)) {
+ return null;
+ }
+ Association association = (Association) semanticElement;
+ if ((getNotationView() != null) && (ViewUtil.getContainerView(getNotationView()) != null)) {
+ View owner = ViewUtil.getContainerView(getNotationView());
+
+ if ((association != null) && (association.getMemberEnds().size() == 2)) {
+ return AssociationViewUtils.getTargetSemanticEnd(owner);
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected boolean isEditable() {
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getLabelRole() {
+ return "TargetMultiplicity"; //$NON-NLS-1$
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getIconPathRole() {
+ return ""; //$NON-NLS-1$
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AssociationLinkLabelTargetRoleEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AssociationLinkLabelTargetRoleEditPart.java
new file mode 100755
index 0000000..d87bef9
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AssociationLinkLabelTargetRoleEditPart.java
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.edit.part;
+
+import org.eclipse.draw2d.ConnectionLocator;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+import org.eclipse.papyrus.uml.diagram.common.utils.AssociationViewUtils;
+import org.eclipse.uml2.uml.Association;
+
+/**
+ * Edit Part for link label showing {@link Association} target role.
+ */
+public class AssociationLinkLabelTargetRoleEditPart extends AbstractElementLabelEditPart {
+
+ /** Constructor */
+ public AssociationLinkLabelTargetRoleEditPart(View view) {
+ super(view);
+ addSnapBackLocation();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.TARGET;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public EObject getParserElement() {
+ EObject semanticElement = resolveSemanticElement();
+ if (!(semanticElement instanceof Association)) {
+ return null;
+ }
+ Association association = (Association) semanticElement;
+ if ((getNotationView() != null) && (ViewUtil.getContainerView(getNotationView()) != null)) {
+ View owner = ViewUtil.getContainerView(getNotationView());
+
+ if ((association != null) && (association.getMemberEnds().size() == 2)) {
+ return AssociationViewUtils.getTargetSemanticEnd(owner);
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getLabelRole() {
+ return "TargetRole"; //$NON-NLS-1$
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getIconPathRole() {
+ return ""; //$NON-NLS-1$
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/ConnectorLinkLabelEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/ConnectorLinkLabelEditPart.java
new file mode 100755
index 0000000..2249fb4
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/ConnectorLinkLabelEditPart.java
@@ -0,0 +1,55 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.edit.part;
+
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+
+/**
+ * Edit Part for link label showing {@link Connector} label.
+ */
+public class ConnectorLinkLabelEditPart extends AbstractElementLabelEditPart {
+
+ /** Constructor */
+ public ConnectorLinkLabelEditPart(View view) {
+ super(view);
+ addSnapBackLocation();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getLabelRole() {
+ return "Label"; //$NON-NLS-1$
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getIconPathRole() {
+ return ""; //$NON-NLS-1$
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/ConnectorLinkLabelSourceMultiplicityEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/ConnectorLinkLabelSourceMultiplicityEditPart.java
new file mode 100755
index 0000000..e55d3f0
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/ConnectorLinkLabelSourceMultiplicityEditPart.java
@@ -0,0 +1,93 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.edit.part;
+
+import org.eclipse.draw2d.ConnectionLocator;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+import org.eclipse.uml2.uml.Connector;
+import org.eclipse.uml2.uml.ConnectorEnd;
+
+/**
+ * Edit Part for link label showing {@link Connector} source {@link ConnectorEnd} multiplicity.
+ */
+public class ConnectorLinkLabelSourceMultiplicityEditPart extends AbstractElementLabelEditPart {
+
+ /** Constructor */
+ public ConnectorLinkLabelSourceMultiplicityEditPart(View view) {
+ super(view);
+ addSnapBackLocation();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.SOURCE;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public EObject getParserElement() {
+ Connector connector = (Connector) resolveSemanticElement();
+ if ((getNotationView() != null) && (ViewUtil.getContainerView(getNotationView()) != null)) {
+ View owner = ViewUtil.getContainerView(getNotationView());
+
+ if ((connector != null) && (connector.getEnds().size() == 2)) {
+ return connector.getEnds().get(0);
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected boolean isEditable() {
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getLabelRole() {
+ return "SourceMultiplicity"; //$NON-NLS-1$
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getIconPathRole() {
+ return ""; //$NON-NLS-1$
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/ConnectorLinkLabelTargetMultiplicityEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/ConnectorLinkLabelTargetMultiplicityEditPart.java
new file mode 100755
index 0000000..e628c64
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/ConnectorLinkLabelTargetMultiplicityEditPart.java
@@ -0,0 +1,93 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.edit.part;
+
+import org.eclipse.draw2d.ConnectionLocator;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+import org.eclipse.uml2.uml.Connector;
+import org.eclipse.uml2.uml.ConnectorEnd;
+
+/**
+ * Edit Part for link label showing {@link Connector} target {@link ConnectorEnd} multiplicity.
+ */
+public class ConnectorLinkLabelTargetMultiplicityEditPart extends AbstractElementLabelEditPart {
+
+ /** Constructor */
+ public ConnectorLinkLabelTargetMultiplicityEditPart(View view) {
+ super(view);
+ addSnapBackLocation();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.TARGET;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public EObject getParserElement() {
+ Connector connector = (Connector) resolveSemanticElement();
+ if ((getNotationView() != null) && (ViewUtil.getContainerView(getNotationView()) != null)) {
+ View owner = ViewUtil.getContainerView(getNotationView());
+
+ if ((connector != null) && (connector.getEnds().size() == 2)) {
+ connector.getEnds().get(1);
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected boolean isEditable() {
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getLabelRole() {
+ return "TargetMultiplicity"; //$NON-NLS-1$
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getIconPathRole() {
+ return ""; //$NON-NLS-1$
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/ConstraintNodeLabelEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/ConstraintNodeLabelEditPart.java
new file mode 100755
index 0000000..9fec4da
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/ConstraintNodeLabelEditPart.java
@@ -0,0 +1,789 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.edit.part;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.Label;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.RunnableWithResult;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.AccessibleEditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.requests.DirectEditRequest;
+import org.eclipse.gef.tools.DirectEditManager;
+import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
+import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
+import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.tooling.runtime.edit.policies.DefaultNodeLabelDragPolicy;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.extensionpoints.editors.Activator;
+import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration;
+import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration;
+import org.eclipse.papyrus.extensionpoints.editors.configuration.IPopupEditorConfiguration;
+import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog;
+import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog;
+import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper;
+import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
+import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
+import org.eclipse.papyrus.infra.gmfdiag.common.commands.SemanticAdapter;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+import org.eclipse.papyrus.uml.diagram.composite.edit.parts.UMLEditPartFactory;
+import org.eclipse.papyrus.uml.diagram.composite.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.composite.providers.UMLParserProvider;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.accessibility.AccessibleEvent;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.FontData;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.uml2.uml.Constraint;
+import org.eclipse.uml2.uml.Feature;
+
+/**
+ * Abstract non-diagram specific edit part for node label representing {@link Constraint}.
+ * This class is adapted from edit parts generated by GMF Tooling.
+ */
+public class ConstraintNodeLabelEditPart extends PapyrusCompartmentEditPart implements ITextAwareEditPart {
+
+ /**
+ * @generated
+ */
+ private DirectEditManager manager;
+
+ /**
+ * @generated
+ */
+ private IParser parser;
+
+ /**
+ * @generated
+ */
+ private List<?> parserElements;
+
+ /**
+ * direct edition mode (default, undefined, registered editor, etc.)
+ *
+ * @generated
+ */
+ protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
+
+ /**
+ * configuration from a registered edit dialog
+ *
+ * @generated
+ */
+ protected IDirectEditorConfiguration configuration;
+
+ /**
+ * @generated
+ */
+ public ConstraintNodeLabelEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultNodeLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ protected String getLabelTextHelper(IFigure figure) {
+ if (figure instanceof WrappingLabel) {
+ return ((WrappingLabel) figure).getText();
+ } else if (figure instanceof ILabelFigure) {
+ return ((ILabelFigure) figure).getText();
+ } else {
+ return ((Label) figure).getText();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void setLabelTextHelper(IFigure figure, String text) {
+ if (figure instanceof WrappingLabel) {
+ ((WrappingLabel) figure).setText("{" + text + "}");
+ } else if (figure instanceof ILabelFigure) {
+ ((ILabelFigure) figure).setText(text);
+ } else {
+ ((Label) figure).setText(text);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected Image getLabelIconHelper(IFigure figure) {
+ if (figure instanceof WrappingLabel) {
+ return ((WrappingLabel) figure).getIcon();
+ } else if (figure instanceof ILabelFigure) {
+ return ((ILabelFigure) figure).getIcon();
+ } else {
+ return ((Label) figure).getIcon();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void setLabelIconHelper(IFigure figure, Image icon) {
+ if (figure instanceof WrappingLabel) {
+ ((WrappingLabel) figure).setIcon(icon);
+ } else if (figure instanceof ILabelFigure) {
+ ((ILabelFigure) figure).setIcon(icon);
+ } else {
+ ((Label) figure).setIcon(icon);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public void setLabel(WrappingLabel figure) {
+ unregisterVisuals();
+ setFigure(figure);
+ registerVisuals();
+ refreshVisuals();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ @SuppressWarnings("rawtypes")
+ protected List getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ protected EObject getParserElement() {
+ return resolveSemanticElement();
+ }
+
+ /**
+ * @generated
+ */
+ protected Image getLabelIcon() {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ protected String getLabelText() {
+ String text = null;
+ EObject parserElement = getParserElement();
+ if (parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new SemanticAdapter(parserElement, getNotationView()), getParserOptions().intValue());
+ }
+ if (text == null) {
+ text = "";
+ }
+ return text;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void setLabelText(String text) {
+ setLabelTextHelper(getFigure(), text);
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public String getEditText() {
+ if (getParserElement() == null || getParser() == null) {
+ return ""; //$NON-NLS-1$
+ }
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean isEditable() {
+ return getParser() != null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ @SuppressWarnings("rawtypes")
+ public String isValid(final Object value) {
+ if (value instanceof String) {
+ final EObject element = getParserElement();
+ final IParser parser = getParser();
+ try {
+ IParserEditStatus valid = (IParserEditStatus) getEditingDomain().runExclusive(new RunnableWithResult.Impl() {
+
+ @Override
+ @SuppressWarnings("unchecked")
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Constraint_Shape_CN, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintSpecificationEditPartCN.VISUAL_ID));
+ }
+ return parser;
+ }
+
+ /**
+ * @generated
+ */
+ protected DirectEditManager getManager() {
+ if (manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
+ }
+ return manager;
+ }
+
+ /**
+ * @generated
+ */
+ protected void setManager(DirectEditManager manager) {
+ this.manager = manager;
+ }
+
+ /**
+ * @generated
+ */
+ protected void performDirectEdit() {
+ getManager().show();
+ }
+
+ /**
+ * @generated
+ */
+ protected void performDirectEdit(Point eventLocation) {
+ if (getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ }
+ }
+
+ /**
+ * @generated
+ */
+ private void performDirectEdit(char initialCharacter) {
+ if (getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager) getManager()).show(initialCharacter);
+ } else {
+ performDirectEdit();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void performDirectEditRequest(Request request) {
+ final Request theRequest = request;
+ if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ directEditionMode = getDirectEditionType();
+ }
+ switch (directEditionMode) {
+ case IDirectEdition.NO_DIRECT_EDITION:
+ // no direct edition mode => does nothing
+ return;
+ case IDirectEdition.EXTENDED_DIRECT_EDITOR:
+ updateExtendedEditorConfiguration();
+ if (configuration == null || configuration.getLanguage() == null) {
+ performDefaultDirectEditorEdit(theRequest);
+ } else {
+ configuration.preEditAction(resolveSemanticElement());
+ Dialog dialog = null;
+ if (configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
+ helper.showEditor();
+ return;
+ } else if (configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if (configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
+ } else {
+ return;
+ }
+ final Dialog finalDialog = dialog;
+ if (Window.OK == dialog.open()) {
+ TransactionalEditingDomain domain = getEditingDomain();
+ RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
+
+ @Override
+ protected void doExecute() {
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
+ }
+ };
+ domain.getCommandStack().execute(command);
+ }
+ }
+ break;
+ case IDirectEdition.DEFAULT_DIRECT_EDITOR:
+ // initialize the direct edit manager
+ try {
+ getEditingDomain().runExclusive(new Runnable() {
+
+ @Override
+ public void run() {
+ if (isActive() && isEditable()) {
+ if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character) theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ performDirectEdit(initialChar.charValue());
+ } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ performDirectEdit(editRequest.getLocation());
+ } else {
+ performDirectEdit();
+ }
+ }
+ }
+ });
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ break;
+ default:
+ break;
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshLabel();
+ refreshFont();
+ refreshFontColor();
+ refreshUnderline();
+ refreshStrikeThrough();
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshLabel() {
+ EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
+ if (maskLabelPolicy == null) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshUnderline() {
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if (style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if (resolveSemanticElement() instanceof Feature) {
+ if (((Feature) resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel) getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel) getFigure()).setTextUnderline(false);
+ }
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshStrikeThrough() {
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if (style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void refreshFont() {
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if (style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ setFont(fontData);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ @Override
+ protected void addSemanticListeners() {
+ if (getParser() instanceof ISemanticParser) {
+ EObject element = resolveSemanticElement();
+ parserElements = ((ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
+ for (int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject) parserElements.get(i)); //$NON-NLS-1$
+ }
+ addListenerFilter("SemanticModelConstraintOwner", this, element); // in order to refresh label when ConstraintSpecification creation
+ } else {
+ super.addSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * Returns the kind of associated editor for direct edition.
+ *
+ * @return an <code>int</code> corresponding to the kind of direct editor, @see org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
+ * @generated
+ */
+ public int getDirectEditionType() {
+ if (checkExtendedEditor()) {
+ initExtendedEditorConfiguration();
+ return IDirectEdition.EXTENDED_DIRECT_EDITOR;
+ }
+ if (checkDefaultEdition()) {
+ return IDirectEdition.DEFAULT_DIRECT_EDITOR;
+ }
+ // not a named element. no specific editor => do nothing
+ return IDirectEdition.NO_DIRECT_EDITION;
+ }
+
+ /**
+ * Checks if an extended editor is present.
+ *
+ * @return <code>true</code> if an extended editor is present.
+ * @generated
+ */
+ protected boolean checkExtendedEditor() {
+ if (resolveSemanticElement() != null) {
+ return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
+ }
+ return false;
+ }
+
+ /**
+ * Checks if a default direct edition is available
+ *
+ * @return <code>true</code> if a default direct edition is available
+ * @generated
+ */
+ protected boolean checkDefaultEdition() {
+ return (getParser() != null);
+ }
+
+ /**
+ * Initializes the extended editor configuration
+ *
+ * @generated
+ */
+ protected void initExtendedEditorConfiguration() {
+ if (configuration == null) {
+ final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if (languagePreferred != null && !languagePreferred.equals("")) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else {
+ configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
+ }
+ }
+ }
+
+ /**
+ * Updates the preference configuration
+ *
+ * @generated
+ */
+ protected void updateExtendedEditorConfiguration() {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if (languagePreferred != null && !languagePreferred.equals("") && languagePreferred != configuration.getLanguage()) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ configuration = null;
+ }
+ }
+
+ /**
+ * Performs the direct edit usually used by GMF editors.
+ *
+ * @param theRequest
+ * the direct edit request that starts the direct edit system
+ * @generated
+ */
+ protected void performDefaultDirectEditorEdit(final Request theRequest) {
+ // initialize the direct edit manager
+ try {
+ getEditingDomain().runExclusive(new Runnable() {
+
+ @Override
+ public void run() {
+ if (isActive() && isEditable()) {
+ if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character) theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ performDirectEdit(initialChar.charValue());
+ } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ performDirectEdit(editRequest.getLocation());
+ } else {
+ performDirectEdit();
+ }
+ }
+ }
+ });
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addNotationalListeners() {
+ super.addNotationalListeners();
+ addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeNotationalListeners() {
+ super.removeNotationalListeners();
+ removeListenerFilter("PrimaryView"); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ refreshLabel();
+ Object feature = event.getFeature();
+ if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer) event.getNewValue();
+ setFontColor(DiagramColorRegistry.getInstance().getColor(c));
+ } else if (NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ refreshUnderline();
+ } else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ refreshStrikeThrough();
+ } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature)
+ || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ refreshFont();
+ } else {
+ if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ refreshLabel();
+ }
+ if (getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser) getParser();
+ if (modelParser.areSemanticElementsAffected(null, event)) {
+ removeSemanticListeners();
+ if (resolveSemanticElement() != null) {
+ addSemanticListeners();
+ }
+ refreshLabel();
+ }
+ }
+ }
+ super.handleNotificationEvent(event);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ private static final String ADD_PARENT_MODEL = "AddParentModel";
+
+ /**
+ * @generated
+ */
+ @Override
+ public void activate() {
+ super.activate();
+ addOwnerElementListeners();
+ }
+
+ /**
+ * @generated
+ */
+ protected void addOwnerElementListeners() {
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void deactivate() {
+ removeOwnerElementListeners();
+ super.deactivate();
+ }
+
+ /**
+ * @generated
+ */
+ protected void removeOwnerElementListeners() {
+ removeListenerFilter(ADD_PARENT_MODEL);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/DefaultChildLabelEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/DefaultChildLabelEditPart.java
new file mode 100755
index 0000000..f444f35
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/DefaultChildLabelEditPart.java
@@ -0,0 +1,35 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.edit.part;
+
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
+
+/**
+ * Default implementation for child label node.
+ */
+public class DefaultChildLabelEditPart extends AbstractElementChildLabelEditPart {
+
+ /** Constructor */
+ public DefaultChildLabelEditPart(View view) {
+ super(view);
+ }
+
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/NamedElementAffixedLabelNameEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/NamedElementAffixedLabelNameEditPart.java
new file mode 100755
index 0000000..be434b2
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/NamedElementAffixedLabelNameEditPart.java
@@ -0,0 +1,109 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.edit.part;
+
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.emf.appearance.helper.NameLabelIconHelper;
+import org.eclipse.papyrus.sysml.diagram.common.Activator;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.common.util.DiagramEditPartsUtil;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.uml2.uml.NamedElement;
+
+/**
+ * Abstract non-diagram specific edit part for border node label representing {@link NamedElement}.
+ * This class is adapted from edit parts generated by GMF Tooling.
+ */
+public class NamedElementAffixedLabelNameEditPart extends AbstractElementLabelEditPart implements IBorderItemEditPart {
+
+ /** Constructor */
+ public NamedElementAffixedLabelNameEditPart(View view) {
+ super(view);
+ addSnapBackLocation();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ }
+
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Image getLabelIcon() {
+ EObject parserElement = getParserElement();
+ if (parserElement == null) {
+ return null;
+ }
+
+ List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
+ for (View view : views) {
+ if (NameLabelIconHelper.showLabelIcon(view)) {
+ return Activator.getInstance().getImage(parserElement.eClass());
+ }
+ }
+ return null;
+
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getLabelRole() {
+ return "Name"; //$NON-NLS-1$
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getIconPathRole() {
+ return ""; //$NON-NLS-1$
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/NamedElementLinkLabelNameEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/NamedElementLinkLabelNameEditPart.java
new file mode 100755
index 0000000..9fd5a71
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/NamedElementLinkLabelNameEditPart.java
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.edit.part;
+
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+import org.eclipse.uml2.uml.NamedElement;
+
+/**
+ * Edit Part for link label showing {@link NamedElement} name.
+ */
+public class NamedElementLinkLabelNameEditPart extends AbstractElementLabelEditPart {
+
+ /** Constructor */
+ public NamedElementLinkLabelNameEditPart(View view) {
+ super(view);
+ addSnapBackLocation();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getLabelRole() {
+ return "Name"; //$NON-NLS-1$
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getIconPathRole() {
+ return ""; //$NON-NLS-1$
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/NamedElementNodeLabelNameEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/NamedElementNodeLabelNameEditPart.java
new file mode 100755
index 0000000..321bb2f
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/NamedElementNodeLabelNameEditPart.java
@@ -0,0 +1,52 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.edit.part;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.uml2.uml.NamedElement;
+
+/**
+ * Abstract non-diagram specific edit part for node label representing {@link NamedElement}.
+ * This class is adapted from edit parts generated by GMF Tooling.
+ */
+public class NamedElementNodeLabelNameEditPart extends AbstractElementNodeLabelEditPart {
+
+ public NamedElementNodeLabelNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getLabelRole() {
+ return "Name"; //$NON-NLS-1$
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getIconPathRole() {
+ return ""; //$NON-NLS-1$
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/PortAffixedLabelNameEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/PortAffixedLabelNameEditPart.java
new file mode 100755
index 0000000..70d3db8
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/PortAffixedLabelNameEditPart.java
@@ -0,0 +1,119 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.edit.part;
+
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.emf.appearance.helper.AppearanceHelper;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.sysml.diagram.common.Activator;
+import org.eclipse.papyrus.uml.diagram.common.util.DiagramEditPartsUtil;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.uml2.uml.Port;
+
+/**
+ * This class implements a {@link Port} affixed label edit part.
+ */
+public class PortAffixedLabelNameEditPart extends AbstractElementLabelEditPart implements IBorderItemEditPart {
+
+ /** Constructor */
+ public PortAffixedLabelNameEditPart(View view) {
+ super(view);
+ addSnapBackLocation();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusLabelEditPart#getDefaultTextAlignment()
+ *
+ * @return
+ */
+ @Override
+ protected int getDefaultTextAlignment() {
+ return PositionConstants.LEFT;
+ }
+
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return constraint instanceof IBorderItemLocator ? (IBorderItemLocator) constraint : null;
+ }
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Image getLabelIcon() {
+ EObject parserElement = getParserElement();
+ if (parserElement == null) {
+ return null;
+ }
+
+ List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
+ for (View view : views) {
+ if (AppearanceHelper.showElementIcon(view)) {
+ return Activator.getInstance().getLabelProvider().getImage(parserElement);
+ }
+ }
+ return null;
+
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getLabelRole() {
+ return "Label"; //$NON-NLS-1$
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getIconPathRole() {
+ return ""; //$NON-NLS-1$
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/PropertyNodeLabelEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/PropertyNodeLabelEditPart.java
new file mode 100755
index 0000000..05446ab
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/PropertyNodeLabelEditPart.java
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.edit.part;
+
+import org.eclipse.gmf.runtime.notation.View;
+
+/**
+ * Abstract non-diagram specific edit part for node label representing {@link Property}.
+ * This class is adapted from edit parts generated by GMF Tooling.
+ */
+public class PropertyNodeLabelEditPart extends AbstractElementNodeLabelEditPart {
+
+ public PropertyNodeLabelEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getLabelRole() {
+ return "Label"; //$NON-NLS-1$
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getIconPathRole() {
+ return ""; //$NON-NLS-1$
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/SlotChildLabelEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/SlotChildLabelEditPart.java
new file mode 100755
index 0000000..fce6493
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/SlotChildLabelEditPart.java
@@ -0,0 +1,36 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.edit.part;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.uml2.uml.Slot;
+
+/**
+ * Edit part for {@link Slot} used as Child label node.
+ */
+public class SlotChildLabelEditPart extends AbstractElementChildLabelEditPart {
+
+ /** Constructor */
+ public SlotChildLabelEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/policy/EncapsulatedClassifierResizableShapeEditPolicy.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/policy/EncapsulatedClassifierResizableShapeEditPolicy.java
new file mode 100755
index 0000000..683b933
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/policy/EncapsulatedClassifierResizableShapeEditPolicy.java
@@ -0,0 +1,45 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.edit.policy;
+
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+
+/**
+ * <pre>
+ * This class modifies EncapsulatedClassifier default resize command in order to move
+ * any Port IBorderItem possibly attached.
+ * See. bug. https://bugs.eclipse.org/bugs/show_bug.cgi?id=354814
+ * Could not find a more general way to do this without making any assumption about
+ * the kind of attached IBorderItem and that would only rely on its IBorderItemLocator.
+ * </pre>
+ */
+public class EncapsulatedClassifierResizableShapeEditPolicy extends org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.EncapsulatedClassifierResizableShapeEditPolicy {
+
+ /**
+ * <pre>
+ * {@inheritDoc}
+ *
+ * Forbid AutoSize for elements that can hold Port, it currently
+ * leads to Port (FlowPort) with incorrect location stored in notation,
+ * and possible incorrect visual representation (FlowPort).
+ * </pre>
+ */
+ @Override
+ protected Command getAutoSizeCommand(Request request) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/policy/MaskManagedLabelEditPolicy.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/policy/MaskManagedLabelEditPolicy.java
new file mode 100755
index 0000000..b8c3259
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/policy/MaskManagedLabelEditPolicy.java
@@ -0,0 +1,107 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.edit.policy;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.gef.editpolicies.GraphicalEditPolicy;
+import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.gmf.diagram.common.edit.part.ITextAwareEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.helper.MaskLabelHelper;
+import org.eclipse.papyrus.uml.diagram.common.parser.IMaskManagedSemanticParser;
+
+
+/**
+ * <pre>
+ * Generic mask manage edit policy for {@link ITextAwareEditPart}, managed masks are assumed to be given by the
+ * {@link ITextAwareEditPart} parser (must implement {@link IMaskManagedSemanticParser}).
+ * </pre>
+ */
+public class MaskManagedLabelEditPolicy extends GraphicalEditPolicy implements IMaskManagedLabelEditPolicy {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Map<String, String> getMasks() {
+ Map<String, String> masks = new HashMap<String, String>();
+
+ IParser parser = getHostLabelEditPart().getParser();
+ if (parser instanceof IMaskManagedSemanticParser) {
+ masks = ((IMaskManagedSemanticParser) parser).getMasks();
+ }
+
+ return masks;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Collection<String> getCurrentDisplayValue() {
+ Collection<String> result = MaskLabelHelper.getMaskValues(getView());
+ if (result == null) {
+ IParser parser = getHostLabelEditPart().getParser();
+ if (parser instanceof IMaskManagedSemanticParser) {
+ result = ((IMaskManagedSemanticParser) parser).getDefaultValue(getHost());
+ }
+ }
+
+ if (result == null) {
+ return Collections.emptySet();
+ }
+
+ return result;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void updateDisplayValue(Collection<String> maskValues) {
+ MaskLabelHelper.setMaskValues(getView(), maskValues);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void setDefaultDisplayValue() {
+ MaskLabelHelper.unsetMaskValues(getView());
+ }
+
+ // @unused.
+ @Override
+ public void refreshDisplay() {
+ // Not implemented.
+ }
+
+ /**
+ * Get the host label edit part (has to implement {@link ITextAwareEditPart}).
+ *
+ * @return the host label edit part.
+ */
+ private ITextAwareEditPart getHostLabelEditPart() {
+ return (ITextAwareEditPart) getHost();
+ }
+
+ private View getView() {
+ return (View) getHost().getModel();
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/policy/StructuredClassifierCreationEditPolicy.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/policy/StructuredClassifierCreationEditPolicy.java
new file mode 100755
index 0000000..08a6de6
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/policy/StructuredClassifierCreationEditPolicy.java
@@ -0,0 +1,191 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.edit.policy;
+
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.SnapToHelper;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gef.requests.ChangeBoundsRequest;
+import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.commands.SetBoundsCommand;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CreationEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramUIMessages;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest.ViewDescriptor;
+import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.gmf.diagram.common.commands.CreateViewCommand;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.service.palette.AspectUnspecifiedTypeCreationTool;
+import org.eclipse.papyrus.infra.gmfdiag.common.snap.NodeSnapHelper;
+import org.eclipse.papyrus.uml.diagram.common.locator.PortPositionLocator;
+
+/**
+ * Replaces the {@link DefaultCreationEditPolicy} in order to manage Affixed Port position on creation or on drop.
+ */
+public class StructuredClassifierCreationEditPolicy extends CreationEditPolicy {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getReparentCommand(ChangeBoundsRequest request) {
+ // Forbid re-parent in this edit policy (to be used by compartment)
+ // in order to avoid node to be moved in compartments.
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ /**
+ * <pre>
+ * {@inheritDoc}
+ *
+ * The goal here is to create the view and to move it at the mouse location,
+ * respecting a given locator. It is assumed that only affixed Port can be created on
+ * edit part that have this edit policy, and the locator is a {@link PortPositionLocator}.
+ *
+ * @see DefaultCreationEditPolicy#getCreateCommand().
+ * </pre>
+ */
+ @Override
+ protected Command getCreateCommand(CreateViewRequest request) {
+
+ // This overrides getCreateCommand in order to use a specific CreateViewCommand (instead of
+ // org.eclipse.gmf.runtime.diagram.ui.commands.CreateCommand.
+
+ // The original CreateCommand#canExecute() implementation rely on ViewProvider#provides(CreateViewForKindOperation op)
+ // method to know if a view can be created. The problem is that this method is incorrectly generated by GMF Tooling and should be avoided.
+
+ // CreateViewCommand replace the semantic adapter in its call to ViewService to know if a provider exists.
+
+ TransactionalEditingDomain editingDomain = ((IGraphicalEditPart) getHost()).getEditingDomain();
+ CompositeTransactionalCommand cc = new CompositeTransactionalCommand(editingDomain, DiagramUIMessages.AddCommand_Label);
+
+ Iterator<? extends ViewDescriptor> descriptors = request.getViewDescriptors().iterator();
+ while (descriptors.hasNext()) {
+
+ CreateViewRequest.ViewDescriptor descriptor = descriptors.next();
+ ICommand createCommand = new CreateViewCommand(editingDomain, descriptor, (View) (getHost().getModel()));
+
+ // Add SetBounds
+ createCommand = CompositeCommand.compose(createCommand, getSetBoundsCommand(request, descriptor));
+ //
+
+ cc.compose(createCommand);
+
+ }
+
+ return new ICommandProxy(cc.reduce());
+
+ }
+
+ /**
+ * Get a SetBoundsCommand to move a new view at current mouse position.
+ *
+ * @param request
+ * The creation request.
+ * @param descriptor
+ * The descriptor of the new element.
+ * @return The set bounds command.
+ */
+ private ICommand getSetBoundsCommand(CreateViewRequest request, CreateViewRequest.ViewDescriptor descriptor) {
+ ICommand setBoundsCommand = null;
+ TransactionalEditingDomain editingDomain = ((IGraphicalEditPart) getHost()).getEditingDomain();
+
+ // Retrieve parent location
+ Point parentLoc = getHostFigure().getBounds().getLocation().getCopy();
+
+
+ final Point realWantedLocation;
+ Map<?, ?> params = request.getExtendedData();
+ Point realLocation = (Point) params.get(AspectUnspecifiedTypeCreationTool.INITIAL_MOUSE_LOCATION_FOR_CREATION);
+ if (realLocation != null) {
+ realWantedLocation = realLocation.getCopy();
+ } else {
+ // we use this location to be able to create Port in the corners of the figure
+ realWantedLocation = request.getLocation().getCopy();
+ }
+
+ // Compute relative creation location
+ Point requestedLocation = realWantedLocation.getCopy();
+
+
+
+ getHostFigure().translateToRelative(requestedLocation);
+
+ // Create proposed creation bounds and use the locator to find the expected position
+ PortPositionLocator locator = new PortPositionLocator(getHostFigure(), PositionConstants.NONE);
+ final Rectangle preferredBounds = locator.getPreferredLocation(new Rectangle(requestedLocation, new Dimension(20, 20)));
+ Rectangle retainedBounds = preferredBounds.getCopy();
+
+ // find the current side of the wanted position
+ final Rectangle parentBounds = getHostFigure().getBounds().getCopy();
+ // break all!!! getHostFigure().translateToAbsolute(parentBounds);
+ locator.setConstraint(preferredBounds.getCopy().translate(parentBounds.getLocation().getNegated()));
+ int currentSide = locator.getCurrentSideOfParent();
+ if (request.isSnapToEnabled() && currentSide != PositionConstants.NORTH_EAST && currentSide != PositionConstants.NORTH_WEST && currentSide != PositionConstants.SOUTH_EAST && currentSide != PositionConstants.SOUTH_WEST) { // request for snap port at the
+ // creation
+ // we find the best location with snap
+ Point wantedPoint = preferredBounds.getLocation();
+ getHostFigure().translateToAbsolute(wantedPoint);
+ Rectangle portBounds = new Rectangle(wantedPoint, new Dimension(20, 20));
+ NodeSnapHelper helper = new NodeSnapHelper((SnapToHelper) getHost().getAdapter(SnapToHelper.class), portBounds, false, false, true);
+ final ChangeBoundsRequest tmpRequest = new ChangeBoundsRequest("move"); //$NON-NLS-1$
+ tmpRequest.setEditParts(Collections.emptyList());
+ tmpRequest.setSnapToEnabled(true);
+ tmpRequest.setLocation(portBounds.getLocation());
+ helper.snapPoint(tmpRequest);
+ preferredBounds.translate(tmpRequest.getMoveDelta());
+
+ switch (currentSide) {
+ case PositionConstants.NORTH:
+ case PositionConstants.SOUTH:
+ preferredBounds.y = retainedBounds.y;
+ break;
+ case PositionConstants.EAST:
+ case PositionConstants.WEST:
+ preferredBounds.x = retainedBounds.x;
+ break;
+ default:
+ break;
+ }
+ }
+ // Convert the calculated preferred bounds as relative to parent location
+ Rectangle creationBounds = preferredBounds.getTranslated(parentLoc.getNegated());
+ setBoundsCommand = new SetBoundsCommand(editingDomain, DiagramUIMessages.SetLocationCommand_Label_Resize, descriptor, creationBounds);
+ return setBoundsCommand;
+ }
+
+ /**
+ * Convenience method to return the host's Figure.
+ *
+ * @return The host GraphicalEditPart's Figure
+ */
+ private IFigure getHostFigure() {
+ return ((GraphicalEditPart) getHost()).getFigure();
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/factory/AssociationLinkViewFactory.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/factory/AssociationLinkViewFactory.java
new file mode 100755
index 0000000..8cedb0f
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/factory/AssociationLinkViewFactory.java
@@ -0,0 +1,100 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.factory;
+
+import java.util.List;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.EObjectValueStyle;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.NotationFactory;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.gmf.diagram.common.factory.ConnectorViewFactory;
+import org.eclipse.papyrus.uml.diagram.common.utils.AssociationViewUtils;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.eclipse.uml2.uml.Association;
+import org.eclipse.uml2.uml.Property;
+
+/**
+ * View factory for Association.
+ */
+public class AssociationLinkViewFactory extends ConnectorViewFactory {
+
+ /**
+ * <pre>
+ * {@inheritDoc}
+ *
+ * Add two EObjectValueStyle in order to store the Properties that are associated with
+ * the Graphical ends.
+ * </pre>
+ */
+ @Override
+ protected List createStyles(View view) {
+
+ EObjectValueStyle sourceStyle = NotationFactory.eINSTANCE.createEObjectValueStyle();
+ sourceStyle.setName(AssociationViewUtils.SEMANTIC_SOURCE_END);
+
+ EObjectValueStyle targetStyle = NotationFactory.eINSTANCE.createEObjectValueStyle();
+ targetStyle.setName(AssociationViewUtils.SEMANTIC_TARGET_END);
+
+ view.getStyles().add(sourceStyle);
+ view.getStyles().add(targetStyle);
+
+ return super.createStyles(view);
+ }
+
+ /**
+ * <pre>
+ * {@inheritDoc}
+ *
+ * Store {@link Association} semantic ends (Property) in dedicated styles.
+ * </pre>
+ */
+ @Override
+ public View createView(IAdaptable semanticAdapter, View containerView, String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Edge view = (Edge) super.createView(semanticAdapter, containerView, semanticHint, index, persisted, preferencesHint);
+
+ if ((view != null) && (view.getElement() != null) && (view.getElement() instanceof Association)) {
+ Association association = (Association) view.getElement();
+
+ assert (association.getMemberEnds().size() == 2);
+
+ Property propertySource = association.getMemberEnds().get(0);
+ Property propertyTarget = association.getMemberEnds().get(1);
+
+ AssociationViewUtils.setSourceSemanticEnd(view, propertySource);
+ AssociationViewUtils.setTargetSemanticEnd(view, propertyTarget);
+ }
+
+ return view;
+ }
+
+ /**
+ * Creates Association view and add Label nodes
+ */
+ @Override
+ protected void decorateView(View containerView, View view, IAdaptable element, String semanticHint, int index, boolean persisted) {
+
+ getViewService().createNode(element, view, UMLGraphicalTypes.LINKLABEL_UML_APPLIEDSTEREOTYPE_ID, ViewUtil.APPEND, persisted, getPreferencesHint());
+ getViewService().createNode(element, view, UMLGraphicalTypes.LINKLABEL_UML_NAMEDELEMENT_NAME_ID, ViewUtil.APPEND, persisted, getPreferencesHint());
+ getViewService().createNode(element, view, UMLGraphicalTypes.LINKLABEL_UML_ASSOCIATION_SOURCE_ROLE_ID, ViewUtil.APPEND, persisted, getPreferencesHint());
+ getViewService().createNode(element, view, UMLGraphicalTypes.LINKLABEL_UML_ASSOCIATION_SOURCE_MULTIPLICITY_ID, ViewUtil.APPEND, persisted, getPreferencesHint());
+ getViewService().createNode(element, view, UMLGraphicalTypes.LINKLABEL_UML_ASSOCIATION_TARGET_ROLE_ID, ViewUtil.APPEND, persisted, getPreferencesHint());
+ getViewService().createNode(element, view, UMLGraphicalTypes.LINKLABEL_UML_ASSOCIATION_TARGET_MULTIPLICITY_ID, ViewUtil.APPEND, persisted, getPreferencesHint());
+
+ super.decorateView(containerView, view, element, semanticHint, index, persisted);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/factory/ClassifierViewFactory.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/factory/ClassifierViewFactory.java
new file mode 100755
index 0000000..f52c3a7
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/factory/ClassifierViewFactory.java
@@ -0,0 +1,42 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.factory;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.gmf.diagram.common.factory.ShapeViewFactory;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+
+/**
+ * View factory for UML Classifier.
+ *
+ * FIXME : NestedClassifier compartment is not yet supported.
+ */
+public class ClassifierViewFactory extends ShapeViewFactory {
+
+ /**
+ * Creates Classifier view and add Label and Compartment nodes
+ */
+ @Override
+ protected void decorateView(View containerView, View view, IAdaptable element, String semanticHint, int index, boolean persisted) {
+
+ getViewService().createNode(element, view, UMLGraphicalTypes.LABEL_UML_NAMEDELEMENT_NAME_ID, ViewUtil.APPEND, persisted, getPreferencesHint());
+ getViewService().createNode(element, view, UMLGraphicalTypes.COMPARTMENT_UML_PROPERTY_AS_LIST_ID, ViewUtil.APPEND, persisted, getPreferencesHint());
+ getViewService().createNode(element, view, UMLGraphicalTypes.COMPARTMENT_UML_OPERATION_AS_LIST_ID, ViewUtil.APPEND, persisted, getPreferencesHint());
+
+ // this action needs to be done after the compartments creation
+ super.decorateView(containerView, view, element, semanticHint, index, persisted);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/figure/ConnectorEdgeFigure.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/figure/ConnectorEdgeFigure.java
new file mode 100755
index 0000000..dd9cf57
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/figure/ConnectorEdgeFigure.java
@@ -0,0 +1,85 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.figure;
+
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+
+/**
+ * Figure for UML {@link Connector} Edges.
+ */
+public class ConnectorEdgeFigure extends NamedElementEdgeFigure {
+
+ /** The multiplicity source label. */
+ private WrappingLabel fSourceMultiplicityLabel;
+
+ /** The multiplicity target label. */
+ private WrappingLabel fTargetMultiplicityLabel;
+
+ /**
+ * Instantiates a new association figure.
+ */
+ public ConnectorEdgeFigure() {
+ super();
+ createContents();
+ }
+
+ /**
+ * Creates the contents.
+ */
+ @Override
+ protected void createContents() {
+ super.createContents();
+
+ fSourceMultiplicityLabel = new PapyrusWrappingLabel();
+ fSourceMultiplicityLabel.setText("");
+
+ this.add(fSourceMultiplicityLabel);
+
+ fTargetMultiplicityLabel = new PapyrusWrappingLabel();
+ fTargetMultiplicityLabel.setText("");
+
+ this.add(fTargetMultiplicityLabel);
+
+ }
+
+ /**
+ * Gets the applied stereotype association label.
+ *
+ * @return the applied stereotype association label
+ */
+ @Override
+ public WrappingLabel getAppliedStereotypeLabel() {
+ return appliedStereotypeLabel;
+ }
+
+ /**
+ * Gets the multiplicity source label.
+ *
+ * @return the multiplicity source label
+ */
+ public WrappingLabel getSourceMultiplicityLabel() {
+ return fSourceMultiplicityLabel;
+ }
+
+ /**
+ * Gets the multiplicity target label.
+ *
+ * @return the multiplicity target label
+ */
+ public WrappingLabel getTargetMultiplicityLabel() {
+ return fTargetMultiplicityLabel;
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/figure/EdgeDecorationType.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/figure/EdgeDecorationType.java
new file mode 100755
index 0000000..7a644b7
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/figure/EdgeDecorationType.java
@@ -0,0 +1,39 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.figure;
+
+import org.eclipse.gmf.runtime.notation.ArrowType;
+
+/**
+ * <pre>
+ * The class provides a list of predefined ids to create edge decorations.
+ *
+ * Also see : org.eclipse.papyrus.uml.diagram.common.edit.part.AbstractElementLinkEditPart#getArrowDecoration().
+ * </pre>
+ */
+public final class EdgeDecorationType {
+
+ public static final int NONE = ArrowType.NONE; // 0
+
+ public static final int OPEN_ARROW = ArrowType.OPEN_ARROW; // 1
+
+ public static final int SOLID_ARROW_FILLED = ArrowType.SOLID_ARROW; // 2
+
+ public static final int SOLID_ARROW_EMPTY = 3;
+
+ public static final int SOLID_DIAMOND_FILLED = 4;
+
+ public static final int SOLID_DIAMOND_EMPTY = 5;
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/figure/GeneralizationFigure.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/figure/GeneralizationFigure.java
new file mode 100755
index 0000000..51a89d5
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/figure/GeneralizationFigure.java
@@ -0,0 +1,26 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.figure;
+
+import org.eclipse.papyrus.uml.diagram.common.figure.edge.UMLEdgeFigure;
+
+/**
+ * Figure for UML Generalization Edges.
+ */
+public class GeneralizationFigure extends UMLEdgeFigure {
+
+ public GeneralizationFigure() {
+ super();
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/figure/InterfaceRealizationFigure.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/figure/InterfaceRealizationFigure.java
new file mode 100755
index 0000000..2511b00
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/figure/InterfaceRealizationFigure.java
@@ -0,0 +1,24 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.figure;
+
+/**
+ * Figure for UML InterfaceRealization Edges.
+ */
+public class InterfaceRealizationFigure extends NamedElementEdgeFigure {
+
+ public InterfaceRealizationFigure() {
+ super();
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/figure/NamedElementEdgeFigure.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/figure/NamedElementEdgeFigure.java
new file mode 100755
index 0000000..889906a
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/figure/NamedElementEdgeFigure.java
@@ -0,0 +1,64 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.figure;
+
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.papyrus.uml.diagram.common.figure.edge.UMLEdgeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+
+/**
+ * <pre>
+ * This edge figure support stereotype application and name labels,
+ * and does not make any assumption on style, decorations, and width.
+ * These properties are managed by the edit part.
+ *
+ * This figure also provides its own custom dash pattern that can be use calling
+ * setLineType(Graphics.LINE_CUSTOM);
+ * </pre>
+ */
+public class NamedElementEdgeFigure extends UMLEdgeFigure {
+
+ private WrappingLabel nameLabel;
+
+ /** Dashes used to paint line. */
+ private final int[] dashes = new int[10];
+
+ public NamedElementEdgeFigure() {
+ super();
+
+ // set dashes
+ for (int i = 0; i < 10; i++) {
+ dashes[i] = 5;
+ }
+ setLineDash(dashes);
+
+ createContents();
+ }
+
+ public WrappingLabel getNameLabel() {
+ return nameLabel;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createContents() {
+ super.createContents();
+ nameLabel = new PapyrusWrappingLabel();
+ nameLabel.setText("");
+
+ this.add(nameLabel);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/AssociationEndLabelParser.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/AssociationEndLabelParser.java
new file mode 100755
index 0000000..9cb1c33
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/AssociationEndLabelParser.java
@@ -0,0 +1,183 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.parser;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.sysml.diagram.common.preferences.ILabelPreferenceConstants;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLMultiplicityElementUtil;
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
+import org.eclipse.papyrus.uml.tools.utils.ICustomAppearance;
+import org.eclipse.papyrus.uml.tools.utils.ValueSpecificationUtil;
+import org.eclipse.uml2.uml.Association;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.ValueSpecification;
+import org.eclipse.uml2.uml.VisibilityKind;
+
+/**
+ * Semantic Parser for {@link Property} used as {@link Association} end.
+ */
+public class AssociationEndLabelParser extends PropertyLabelParser {
+
+ /** The String format for displaying a {@link Property} label with modifiers */
+ protected static final String ALT_MODIFIER_FORMAT = "{%s}%s";
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getPrintString(IAdaptable element, int flags) {
+ Collection<String> maskValues = getMaskValues(element);
+
+ if (maskValues.isEmpty()) {
+ return MaskedLabel;
+ }
+
+ String result = "";
+ EObject eObject = EMFHelper.getEObject(element);
+
+ if ((eObject != null) && (eObject instanceof Property)) {
+
+ Property property = (Property) eObject;
+
+ // manage visibility
+ if (maskValues.contains(ICustomAppearance.DISP_VISIBILITY)) {
+ String visibility;
+ switch (property.getVisibility().getValue()) {
+ case VisibilityKind.PACKAGE:
+ visibility = "~";
+ break;
+ case VisibilityKind.PUBLIC:
+ visibility = "+";
+ break;
+ case VisibilityKind.PROTECTED:
+ visibility = "#";
+ break;
+ case VisibilityKind.PRIVATE:
+ visibility = "-";
+ break;
+ default:
+ visibility = "+";
+ break;
+ }
+ result = String.format(VISIBILITY_FORMAT, visibility, result);
+ }
+
+ // manage derived modifier
+ if (maskValues.contains(ICustomAppearance.DISP_DERIVE) && property.isDerived()) {
+ result = String.format(DERIVED_FORMAT, result);
+ }
+
+ // manage name
+ if (maskValues.contains(ICustomAppearance.DISP_NAME) && property.isSetName()) {
+ String name = UMLLabelInternationalization.getInstance().getLabel(property);
+
+ // If property is owned by Association (non navigable) only show the name when explicitly asked.
+
+ if (maskValues.contains(ILabelPreferenceConstants.DISP_NON_NAVIGABLE_ROLE) || !((property.getOwningAssociation() != null) && (property.getOwningAssociation().getOwnedEnds().contains(property)))) {
+
+ result = String.format(NAME_FORMAT, result, name);
+ }
+ }
+
+ // manage type
+ if (maskValues.contains(ICustomAppearance.DISP_TYPE)) {
+ String type = "<Undefined>";
+ if (property.getType() != null) {
+ type = UMLLabelInternationalization.getInstance().getLabel(property.getType());
+ }
+
+ // If type is undefined only show "<Undefined>" when explicitly asked.
+
+ if (maskValues.contains(ILabelPreferenceConstants.DISP_UNDEFINED_TYPE) || (!"<Undefined>".equals(type))) {
+
+ result = String.format(TYPE_FORMAT, result, type);
+ }
+ }
+
+ // manage multiplicity
+ if (maskValues.contains(ICustomAppearance.DISP_MULTIPLICITY)) {
+
+ String multiplicity = SysMLMultiplicityElementUtil.formatMultiplicity(property, maskValues);
+ if (multiplicity != null && !multiplicity.isEmpty()) {
+ result += " " + multiplicity;
+ }
+ }
+
+ // manage default value
+ if (maskValues.contains(ICustomAppearance.DISP_DEFAULT_VALUE) && property.getDefaultValue() != null) {
+ ValueSpecification valueSpecification = property.getDefaultValue();
+ result = String.format(DEFAULT_VALUE_FORMAT, result, ValueSpecificationUtil.getSpecificationValue(valueSpecification, true));
+ }
+
+ // manage modifier
+ if (maskValues.contains(ICustomAppearance.DISP_MODIFIERS)) {
+ StringBuffer sb = new StringBuffer();
+ if (property.isReadOnly()) {
+ sb.append(sb.length() == 0 ? "readOnly" : ", readOnly");
+ }
+ if (property.isOrdered()) {
+ sb.append(sb.length() == 0 ? "ordered" : ", ordered");
+ }
+ if (property.isUnique()) {
+ sb.append(sb.length() == 0 ? "unique" : ", unique");
+ }
+ if (property.isDerivedUnion()) {
+ sb.append(sb.length() == 0 ? "union" : ", union");
+ }
+ EList<Property> redefinedProperties = property.getRedefinedProperties();
+ if (redefinedProperties != null && !redefinedProperties.isEmpty()) {
+ for (Property p : redefinedProperties) {
+ sb.append(sb.length() == 0 ? UMLLabelInternationalization.getInstance().getLabel(p) : ", redefines " + UMLLabelInternationalization.getInstance().getLabel(p));
+ }
+ }
+ if (sb.length() != 0) {
+ result = String.format(ALT_MODIFIER_FORMAT, sb.toString(), result);
+ }
+ }
+ }
+ return result;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Map<String, String> getMasks() {
+ return super.getMasks();
+ }
+
+ @Override
+ public Collection<String> getDefaultValue(IAdaptable element) {
+ View view = (View) element.getAdapter(View.class);
+ if (view == null) {
+ return super.getDefaultValue(element);
+ }
+
+ if (view.getType() != null && view.getType().contains("multiplicity")) {
+ return Arrays.asList(ICustomAppearance.DISP_MULTIPLICITY, ILabelPreferenceConstants.DISP_DEFAULT_MULTIPLICITY);
+ } else if (view.getType() != null && view.getType().contains("role")) {
+ return Arrays.asList(ICustomAppearance.DISP_NAME, ICustomAppearance.DISP_VISIBILITY, ICustomAppearance.DISP_DERIVE);
+ }
+
+ return super.getDefaultValue(element);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/ConnectorLabelParser.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/ConnectorLabelParser.java
new file mode 100755
index 0000000..dba3106
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/ConnectorLabelParser.java
@@ -0,0 +1,134 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.parser;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.sysml.diagram.common.preferences.ILabelPreferenceConstants;
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
+import org.eclipse.papyrus.uml.tools.utils.ICustomAppearance;
+import org.eclipse.uml2.uml.Connector;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * Semantic Parser for {@link Connector}
+ */
+public class ConnectorLabelParser extends NamedElementLabelParser {
+
+ /** The String format for displaying a {@link Connector} label with its name */
+ protected static final String NAME_FORMAT = "%s";
+
+ /** The String format for displaying a {@link Connector} label with its type */
+ protected static final String TYPE_FORMAT = "%s: %s";
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getPrintString(IAdaptable element, int flags) {
+
+ Collection<String> maskValues = getMaskValues(element);
+
+ if (maskValues.isEmpty()) {
+ return MaskedLabel;
+ }
+
+ String result = "";
+ EObject eObject = EMFHelper.getEObject(element);
+
+ if ((eObject != null) && (eObject instanceof Connector)) {
+
+ Connector connector = (Connector) eObject;
+
+ // manage name
+ if (maskValues.contains(ICustomAppearance.DISP_NAME) && (connector.isSetName())) {
+ String name = UMLLabelInternationalization.getInstance().getLabel(connector);
+ result = String.format(NAME_FORMAT, name);
+ }
+
+ // manage type
+ if (maskValues.contains(ICustomAppearance.DISP_TYPE)) {
+ String type = "<Undefined>";
+ if (connector.getType() != null) {
+ type = UMLLabelInternationalization.getInstance().getLabel(connector.getType());
+ }
+
+ // If type is undefined only show "<Undefined>" when explicitly asked.
+ if (maskValues.contains(ILabelPreferenceConstants.DISP_UNDEFINED_TYPE) || !"<Undefined>".equals(type)) {
+ result = String.format(TYPE_FORMAT, result, type);
+ }
+ }
+
+ }
+ return result;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean isAffectingEvent(Object event, int flags) {
+
+ if (event instanceof Notification) {
+ Object feature = ((Notification) event).getFeature();
+ if (feature instanceof EStructuralFeature) {
+ return UMLPackage.eINSTANCE.getTypedElement_Type().equals(feature) || super.isAffectingEvent(event, flags);
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public List<EObject> getSemanticElementsBeingParsed(EObject element) {
+ List<EObject> semanticElementsBeingParsed = new ArrayList<EObject>();
+
+ if ((element != null) && (element instanceof Connector)) {
+ Connector semElement = (Connector) element;
+
+ semanticElementsBeingParsed.add(semElement);
+ if (semElement.getType() != null) {
+ semanticElementsBeingParsed.add(semElement.getType());
+ }
+ }
+ return semanticElementsBeingParsed;
+ }
+
+ @Override
+ public Map<String, String> getMasks() {
+ Map<String, String> masks = new HashMap<String, String>();
+ masks.put(ICustomAppearance.DISP_NAME, "Name");
+ masks.put(ICustomAppearance.DISP_TYPE, "Type");
+ masks.put(ILabelPreferenceConstants.DISP_UNDEFINED_TYPE, "Show <Undefined> type");
+ return masks;
+ }
+
+ @Override
+ public Collection<String> getDefaultValue(IAdaptable element) {
+ return Arrays.asList(ICustomAppearance.DISP_NAME, ICustomAppearance.DISP_TYPE);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/ConstraintLabelParser.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/ConstraintLabelParser.java
new file mode 100755
index 0000000..72ad2e8
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/ConstraintLabelParser.java
@@ -0,0 +1,240 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.parser;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand;
+import org.eclipse.gmf.runtime.emf.type.core.IClientContext;
+import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.emf.gmf.command.EMFtoGMFCommandWrapper;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.infra.internationalization.common.utils.InternationalizationPreferencesUtils;
+import org.eclipse.papyrus.infra.services.edit.context.TypeContext;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.sysml.diagram.common.preferences.ILabelPreferenceConstants;
+import org.eclipse.papyrus.uml.diagram.common.Activator;
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
+import org.eclipse.papyrus.uml.tools.utils.ICustomAppearance;
+import org.eclipse.papyrus.uml.tools.utils.ValueSpecificationUtil;
+import org.eclipse.uml2.uml.Constraint;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.eclipse.uml2.uml.ValueSpecification;
+
+/**
+ * Semantic Parser for {@link Constraint}.
+ */
+public class ConstraintLabelParser extends NamedElementLabelParser {
+
+ /** The String format for displaying a Property label with derived modifier */
+ protected static final String NAME_FORMAT = "%s";
+
+ /** The String format for displaying a Property with visibility */
+ protected static final String SPECIFICATION_FORMAT = "%s{%s}";
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getEditString(IAdaptable element, int flags) {
+
+ Collection<String> maskValues = getMaskValues(element);
+
+ if (maskValues.isEmpty()) {
+ return MaskedLabel;
+ }
+
+ String editString = "";
+
+ EObject eObject = EMFHelper.getEObject(element);
+ if ((eObject != null) && (eObject instanceof Constraint)) {
+ Constraint semElement = (Constraint) eObject;
+
+ // edit name
+ if ((maskValues.contains(ICustomAppearance.DISP_NAME))) {
+ if (semElement.isSetName()) {
+ editString = UMLLabelInternationalization.getInstance().getLabel(semElement);
+ }
+
+ // (try to) edit constraint specification
+ } else if ((maskValues.contains(ILabelPreferenceConstants.DISP_SPECIFICATION))) {
+ if (semElement.getSpecification() != null) {
+ editString = ValueSpecificationUtil.getSpecificationValue(semElement.getSpecification());
+ if (editString == null) {
+ editString = "";
+ }
+ }
+ }
+ }
+ return editString;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getPrintString(IAdaptable element, int flags) {
+ Collection<String> maskValues = getMaskValues(element);
+
+ if (maskValues.isEmpty()) {
+ return MaskedLabel;
+ }
+
+ String result = "";
+ EObject eObject = EMFHelper.getEObject(element);
+
+ if ((eObject != null) && (eObject instanceof Constraint)) {
+
+ Constraint semElement = (Constraint) eObject;
+
+ // manage name
+ if ((maskValues.contains(ICustomAppearance.DISP_NAME)) && (semElement.isSetName())) {
+ String name = UMLLabelInternationalization.getInstance().getLabel(semElement);
+ result = String.format(NAME_FORMAT, name);
+ }
+
+ // manage specification
+ if ((maskValues.contains(ILabelPreferenceConstants.DISP_SPECIFICATION))) {
+ String spec = "<Undefined>";
+ if (semElement.getSpecification() != null) {
+ spec = ValueSpecificationUtil.getSpecificationValue(semElement.getSpecification(), true);
+ if (spec == null || "".equals(spec)) {
+ spec = "<Undefined>";
+ }
+ }
+ result = String.format(SPECIFICATION_FORMAT, result, spec);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ICommand getParseCommand(IAdaptable element, String newString, int flags) {
+
+ Collection<String> maskValues = getMaskValues(element);
+
+ ICommand command = UnexecutableCommand.INSTANCE;
+ SetRequest updateRequest = null;
+
+ Constraint constraint = (Constraint) EMFHelper.getEObject(element);
+ if (constraint == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ // prepare set name request
+ if ((maskValues.contains(ICustomAppearance.DISP_NAME))) {
+ if(InternationalizationPreferencesUtils.getInternationalizationPreference(constraint) && null != UMLLabelInternationalization.getInstance().getLabelWithoutUML(constraint)){
+ final ModelSet modelSet = (ModelSet)constraint.eResource().getResourceSet();
+ command = new EMFtoGMFCommandWrapper(UMLLabelInternationalization.getInstance().getSetLabelCommand(modelSet.getTransactionalEditingDomain(), constraint, newString, null));
+ }else{
+ updateRequest = new SetRequest(constraint, UMLPackage.eINSTANCE.getNamedElement_Name(), newString);
+ updateRequest.setLabel("Update Constraint Label");
+ }
+
+ // prepare set specification request
+ } else if ((maskValues.contains(ILabelPreferenceConstants.DISP_SPECIFICATION))) {
+ ValueSpecification spec = constraint.getSpecification();
+ if (spec == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ ValueSpecification specCopy = EcoreUtil.copy(spec);
+ ValueSpecificationUtil.restoreSpecificationValue(specCopy, newString);
+
+ updateRequest = new SetRequest(constraint, UMLPackage.eINSTANCE.getConstraint_Specification(), specCopy);
+ updateRequest.setLabel("Update Constraint Label");
+ }
+
+ try {
+ if (updateRequest != null) {
+ IClientContext context = TypeContext.getContext(constraint);
+ command = ElementEditServiceUtils.getEditServiceProvider(context).getEditService(constraint).getEditCommand(updateRequest);
+ }
+
+ } catch (ServiceException e) {
+ Activator.log.error(e);
+ }
+
+
+ return command;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean isAffectingEvent(Object event, int flags) {
+
+ if (event instanceof Notification) {
+ Object feature = ((Notification) event).getFeature();
+ if (feature instanceof EStructuralFeature) {
+ return UMLPackage.eINSTANCE.getValueSpecification__BooleanValue().equals(feature) || UMLPackage.eINSTANCE.getValueSpecification__IntegerValue().equals(feature) || UMLPackage.eINSTANCE.getValueSpecification__StringValue().equals(feature)
+ || UMLPackage.eINSTANCE.getValueSpecification__UnlimitedValue().equals(feature) || UMLPackage.eINSTANCE.getOpaqueExpression_Body().equals(feature) || UMLPackage.eINSTANCE.getOpaqueExpression_Language().equals(feature)
+ || super.isAffectingEvent(event, flags);
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public List<EObject> getSemanticElementsBeingParsed(EObject element) {
+ List<EObject> semanticElementsBeingParsed = new ArrayList<EObject>();
+
+ if ((element != null) && (element instanceof Constraint)) {
+ Constraint semElement = (Constraint) element;
+
+ semanticElementsBeingParsed.add(semElement);
+ if (semElement.getSpecification() != null) {
+ semanticElementsBeingParsed.add(semElement.getSpecification());
+ }
+ }
+ return semanticElementsBeingParsed;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Map<String, String> getMasks() {
+ Map<String, String> masks = new HashMap<String, String>(2);
+ masks.put(ICustomAppearance.DISP_NAME, "Name");
+ masks.put(ILabelPreferenceConstants.DISP_SPECIFICATION, "Specification");
+ return masks;
+ }
+
+ @Override
+ public Collection<String> getDefaultValue(IAdaptable element) {
+ return Arrays.asList(ILabelPreferenceConstants.DISP_SPECIFICATION);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/DefaultParserHintAdapter.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/DefaultParserHintAdapter.java
new file mode 100755
index 0000000..1bfb39d
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/DefaultParserHintAdapter.java
@@ -0,0 +1,43 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.parser;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ParserHintAdapter;
+import org.eclipse.gmf.runtime.notation.Diagram;
+
+public class DefaultParserHintAdapter extends ParserHintAdapter {
+
+ private Diagram diagram = null;
+
+ /** Constructor */
+ public DefaultParserHintAdapter(Diagram diagram, EObject element, String parserHint) {
+ super(element, parserHint);
+ this.diagram = diagram;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @SuppressWarnings("rawtypes")
+ @Override
+ public Object getAdapter(Class adapter) {
+
+ if (adapter.equals(Diagram.class)) {
+ return diagram;
+ }
+
+ return super.getAdapter(adapter);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/MultiplicityElementLabelParser.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/MultiplicityElementLabelParser.java
new file mode 100755
index 0000000..1f0d3ce
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/MultiplicityElementLabelParser.java
@@ -0,0 +1,188 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.parser;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand;
+import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
+import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.infra.gmfdiag.common.helper.MaskLabelHelper;
+import org.eclipse.papyrus.sysml.diagram.common.preferences.ILabelPreferenceConstants;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLMultiplicityElementUtil;
+import org.eclipse.papyrus.uml.tools.utils.ICustomAppearance;
+import org.eclipse.uml2.uml.MultiplicityElement;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * Semantic Parser for {@link MultiplicityElement}
+ */
+public class MultiplicityElementLabelParser implements IMaskManagedSemanticParser {
+
+ /** The String format for displaying a {@link Property} label with multiplicity */
+ protected static final String MULTIPLICITY_FORMAT = "[%s..%s]";
+
+ /** The String format for displaying a {@link Property} label with multiplicity */
+ protected static final String MULTIPLICITY_FORMAT_ALT = "[%s]";
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getEditString(IAdaptable element, int flags) {
+ return getPrintString(element, flags);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public IParserEditStatus isValidEditString(IAdaptable element, String editString) {
+ return ParserEditStatus.UNEDITABLE_STATUS;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ICommand getParseCommand(IAdaptable element, String newString, int flags) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getPrintString(IAdaptable element, int flags) {
+
+ Collection<String> maskValues = getMaskValues(element);
+
+ if (maskValues.isEmpty()) {
+ return MaskedLabel;
+ }
+
+ String result = "";
+ EObject eObject = EMFHelper.getEObject(element);
+
+ if ((eObject != null) && (eObject instanceof MultiplicityElement)) {
+
+ MultiplicityElement multElt = (MultiplicityElement) eObject;
+
+ // manage multiplicity
+ if ((maskValues.contains(ICustomAppearance.DISP_MULTIPLICITY))) {
+
+ // TODO : add a case for default with multiplicity not set.
+ String multiplicity = SysMLMultiplicityElementUtil.formatMultiplicity(multElt, maskValues);
+ if (multiplicity != null && !multiplicity.isEmpty()) {
+ result += " " + multiplicity;
+ }
+ }
+ }
+ return result;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean isAffectingEvent(Object event, int flags) {
+
+ if (event instanceof Notification) {
+ Object feature = ((Notification) event).getFeature();
+ if (feature instanceof EStructuralFeature) {
+ return EcorePackage.eINSTANCE.getEAnnotation_Details().equals(feature) || UMLPackage.eINSTANCE.getMultiplicityElement_LowerValue().equals(feature) || UMLPackage.eINSTANCE.getMultiplicityElement_UpperValue().equals(feature);
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor(IAdaptable element) {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public List<EObject> getSemanticElementsBeingParsed(EObject element) {
+ List<EObject> semanticElementsBeingParsed = new ArrayList<EObject>();
+
+ if ((element != null) && (element instanceof MultiplicityElement)) {
+ MultiplicityElement semElement = (MultiplicityElement) element;
+
+ semanticElementsBeingParsed.add(semElement);
+ if (semElement.getLowerValue() != null) {
+ semanticElementsBeingParsed.add(semElement.getLowerValue());
+ }
+ if (semElement.getUpperValue() != null) {
+ semanticElementsBeingParsed.add(semElement.getUpperValue());
+ }
+ }
+ return semanticElementsBeingParsed;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean areSemanticElementsAffected(EObject listener, Object notification) {
+ return true;
+ }
+
+ @Override
+ public Map<String, String> getMasks() {
+ Map<String, String> masks = new HashMap<String, String>();
+ masks.put(ICustomAppearance.DISP_MULTIPLICITY, "Multiplicity");
+ masks.put(ILabelPreferenceConstants.DISP_DEFAULT_MULTIPLICITY, "Show default multiplicity");
+ return masks;
+ }
+
+ protected Collection<String> getMaskValues(IAdaptable element) {
+ View view = (View) element.getAdapter(View.class);
+ if (view == null) {
+ return getDefaultValue(element);
+ }
+
+ Collection<String> result = MaskLabelHelper.getMaskValues(view);
+ if (result == null) {
+ result = getDefaultValue(element);
+ }
+ return result;
+ }
+
+ @Override
+ public Collection<String> getDefaultValue(IAdaptable element) {
+ return Arrays.asList(ICustomAppearance.DISP_MULTIPLICITY);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/NamedElementLabelParser.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/NamedElementLabelParser.java
new file mode 100755
index 0000000..da7801a
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/NamedElementLabelParser.java
@@ -0,0 +1,189 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.parser;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand;
+import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
+import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
+import org.eclipse.gmf.runtime.emf.type.core.IClientContext;
+import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.emf.gmf.command.EMFtoGMFCommandWrapper;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.infra.gmfdiag.common.helper.MaskLabelHelper;
+import org.eclipse.papyrus.infra.services.edit.context.TypeContext;
+import org.eclipse.papyrus.infra.internationalization.common.utils.InternationalizationPreferencesUtils;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.uml.diagram.common.Activator;
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * Semantic Parser for {@link NamedElement} name.
+ */
+public class NamedElementLabelParser implements IMaskManagedSemanticParser {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getEditString(IAdaptable element, int flags) {
+ String editString = "";
+
+ EObject eObject = EMFHelper.getEObject(element);
+ if ((eObject != null) && (eObject instanceof NamedElement)) {
+ NamedElement semElement = (NamedElement) eObject;
+ if (semElement.isSetName()) {
+ editString = UMLLabelInternationalization.getInstance().getLabel(semElement);
+ }
+ }
+ return editString;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public IParserEditStatus isValidEditString(IAdaptable element, String editString) {
+ return ParserEditStatus.EDITABLE_STATUS;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ICommand getParseCommand(IAdaptable element, String newString, int flags) {
+
+ ICommand command = UnexecutableCommand.INSTANCE;
+
+ EObject objectToEdit = EMFHelper.getEObject(element);
+ if (objectToEdit == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ try {
+ if(InternationalizationPreferencesUtils.getInternationalizationPreference(objectToEdit) && null != UMLLabelInternationalization.getInstance().getLabelWithoutUML((NamedElement)objectToEdit)){
+ final ModelSet modelSet = (ModelSet)objectToEdit.eResource().getResourceSet();
+ command = new EMFtoGMFCommandWrapper(UMLLabelInternationalization.getInstance().getSetLabelCommand(modelSet.getTransactionalEditingDomain(), (NamedElement)objectToEdit, newString, null));
+ }else{
+ IClientContext context = TypeContext.getContext(objectToEdit);
+ command = ElementEditServiceUtils.getEditServiceProvider(context).getEditService(objectToEdit).getEditCommand(new SetRequest(objectToEdit, UMLPackage.eINSTANCE.getNamedElement_Name(), newString));
+ }
+ } catch (ServiceException e) {
+ Activator.log.error(e);
+ }
+
+ return command;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getPrintString(IAdaptable element, int flags) {
+ String result = "";
+ EObject eObject = EMFHelper.getEObject(element);
+
+ if (eObject instanceof NamedElement) {
+ return UMLLabelInternationalization.getInstance().getLabel((NamedElement) eObject);
+ }
+
+ return result;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean isAffectingEvent(Object event, int flags) {
+
+ if (event instanceof Notification) {
+ Object feature = ((Notification) event).getFeature();
+ if (feature instanceof EStructuralFeature) {
+ return EcorePackage.eINSTANCE.getEAnnotation_Details().equals(feature) || UMLPackage.eINSTANCE.getNamedElement_Name().equals(feature);
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor(IAdaptable element) {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public List<EObject> getSemanticElementsBeingParsed(EObject element) {
+ List<EObject> semanticElementsBeingParsed = new ArrayList<EObject>();
+ semanticElementsBeingParsed.add(element);
+
+ return semanticElementsBeingParsed;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean areSemanticElementsAffected(EObject listener, Object notification) {
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Map<String, String> getMasks() {
+ return Collections.emptyMap();
+ }
+
+ protected Collection<String> getMaskValues(IAdaptable element) {
+ View view = (View) element.getAdapter(View.class);
+ if (view == null) {
+ return getDefaultValue(element);
+ }
+
+ Collection<String> result = MaskLabelHelper.getMaskValues(view);
+ if (result == null) {
+ result = getDefaultValue(element);
+ }
+ return result;
+ }
+
+ @Override
+ public Collection<String> getDefaultValue(IAdaptable element) {
+ return Collections.emptySet();
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/OperationLabelParser.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/OperationLabelParser.java
new file mode 100755
index 0000000..81ef14c
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/OperationLabelParser.java
@@ -0,0 +1,236 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.parser;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.infra.tools.util.StringHelper;
+import org.eclipse.papyrus.sysml.diagram.common.preferences.ILabelPreferenceConstants;
+import org.eclipse.papyrus.uml.diagram.common.utils.ParameterLabelUtil;
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
+import org.eclipse.papyrus.uml.tools.utils.ICustomAppearance;
+import org.eclipse.uml2.uml.Operation;
+import org.eclipse.uml2.uml.Parameter;
+import org.eclipse.uml2.uml.ParameterDirectionKind;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.eclipse.uml2.uml.VisibilityKind;
+
+/**
+ * Semantic Parser for {@link Operation}
+ */
+public class OperationLabelParser extends NamedElementLabelParser {
+
+ /** Parameter parser */
+ protected IMaskManagedSemanticParser parameterParser = new ParameterLabelParser();
+
+ /** The String format for displaying {@link Operation} label with visibility */
+ protected static final String VISIBILITY_FORMAT = "%s ";
+
+ /** The String format for displaying a {@link Operation} label with its name */
+ protected static final String NAME_FORMAT = "%s%s(%s)";
+
+ /** The String format for displaying a {@link Operation} label with its type */
+ protected static final String TYPE_FORMAT = "%s: %s";
+
+ /** The String format for displaying a {@link Operation} label with modifiers */
+ protected static final String MODIFIER_FORMAT = "%s{%s}";
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getPrintString(IAdaptable element, int flags) {
+
+ Collection<String> maskValues = getMaskValues(element);
+
+ if (maskValues.isEmpty()) {
+ return MaskedLabel;
+ }
+
+ String result = "";
+ EObject eObject = EMFHelper.getEObject(element);
+
+ if ((eObject != null) && (eObject instanceof Operation)) {
+
+ Operation operation = (Operation) eObject;
+
+ // manage visibility
+ if (maskValues.contains(ICustomAppearance.DISP_VISIBILITY)) {
+ String visibility;
+ switch (operation.getVisibility().getValue()) {
+ case VisibilityKind.PACKAGE:
+ visibility = "~";
+ break;
+ case VisibilityKind.PUBLIC:
+ visibility = "+";
+ break;
+ case VisibilityKind.PROTECTED:
+ visibility = "#";
+ break;
+ case VisibilityKind.PRIVATE:
+ visibility = "-";
+ break;
+ default:
+ visibility = "+";
+ break;
+ }
+ result = String.format(VISIBILITY_FORMAT, visibility);
+ }
+
+ // manage name and parameters
+ if ((maskValues.contains(ICustomAppearance.DISP_NAME)) && (operation.isSetName())) {
+ String name = UMLLabelInternationalization.getInstance().getLabel(operation);
+
+ StringBuffer params = new StringBuffer();
+ for (Parameter parameter : operation.getOwnedParameters()) {
+ if (parameter.getDirection() != ParameterDirectionKind.RETURN_LITERAL) {
+ String currentParamLabel = ParameterLabelUtil.getPrintString(parameter, extractParameterMaskValues(maskValues));
+ params.append(params.length() == 0 ? currentParamLabel : ", " + currentParamLabel);
+ }
+ }
+
+ result = String.format(NAME_FORMAT, result, name, params);
+ }
+
+ // manage type
+ if ((maskValues.contains(ICustomAppearance.DISP_TYPE))) {
+ String type = "<Undefined>";
+ if (operation.getType() != null) {
+ type = UMLLabelInternationalization.getInstance().getLabel(operation.getType());
+ }
+
+ // If type is undefined only show "<Undefined>" when explicitly asked.
+ if ((maskValues.contains(ILabelPreferenceConstants.DISP_UNDEFINED_TYPE)) || (!"<Undefined>".equals(type))) {
+ result = String.format(TYPE_FORMAT, result, type);
+ }
+ }
+
+ // manage modifier
+ if (maskValues.contains(ICustomAppearance.DISP_MODIFIERS)) {
+ StringBuffer sb = new StringBuffer();
+ if (operation.isAbstract()) {
+ sb.append(sb.length() == 0 ? "abstract" : ", abstract");
+ }
+ if (operation.isStatic()) {
+ sb.append(sb.length() == 0 ? "static" : ", static");
+ }
+ if (operation.isUnique()) {
+ sb.append(sb.length() == 0 ? "unique" : ", unique");
+ }
+ if (operation.isQuery()) {
+ sb.append(sb.length() == 0 ? "query" : ", query");
+ }
+ if (operation.isLeaf()) {
+ sb.append(sb.length() == 0 ? "leaf" : ", leaf");
+ }
+
+ if (sb.length() != 0) {
+ result = String.format(MODIFIER_FORMAT, result, sb.toString());
+ }
+ }
+ }
+ return result;
+ }
+
+ private static Collection<String> extractParameterMaskValues(Collection<String> operationMaskValues) {
+ Set<String> result = new HashSet<String>();
+
+ for (String maskValue : operationMaskValues) {
+ if (maskValue.startsWith(ICustomAppearance.PARAMETERS_PREFIX)) {
+ String newValue = StringHelper.firstToLower(maskValue.replace(ICustomAppearance.PARAMETERS_PREFIX, ""));
+ result.add(newValue);
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean isAffectingEvent(Object event, int flags) {
+
+ if (event instanceof Notification) {
+ Object feature = ((Notification) event).getFeature();
+ if (feature instanceof EStructuralFeature) {
+ return UMLPackage.eINSTANCE.getNamedElement_Visibility().equals(feature) || UMLPackage.eINSTANCE.getTypedElement_Type().equals(feature) || UMLPackage.eINSTANCE.getBehavioralFeature_IsAbstract().equals(feature)
+ || UMLPackage.eINSTANCE.getFeature_IsStatic().equals(feature) || UMLPackage.eINSTANCE.getOperation_IsUnique().equals(feature) || UMLPackage.eINSTANCE.getOperation_IsQuery().equals(feature)
+ || UMLPackage.eINSTANCE.getRedefinableElement_IsLeaf().equals(feature) || parameterParser.isAffectingEvent(event, flags) || super.isAffectingEvent(event, flags);
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public List<EObject> getSemanticElementsBeingParsed(EObject element) {
+ List<EObject> semanticElementsBeingParsed = new ArrayList<EObject>();
+
+ if ((element != null) && (element instanceof Operation)) {
+ Operation semElement = (Operation) element;
+
+ semanticElementsBeingParsed.add(semElement);
+ if (semElement.getType() != null) {
+ semanticElementsBeingParsed.add(semElement.getType());
+ }
+ for (Parameter parameter : semElement.getOwnedParameters()) {
+ semanticElementsBeingParsed.addAll(parameterParser.getSemanticElementsBeingParsed(parameter));
+ }
+ }
+ return semanticElementsBeingParsed;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Map<String, String> getMasks() {
+ Map<String, String> masks = new HashMap<String, String>(5);
+ masks.put(ICustomAppearance.DISP_VISIBILITY, "Visibility");
+ masks.put(ICustomAppearance.DISP_NAME, "Name");
+ masks.put(ICustomAppearance.DISP_TYPE, "Type");
+ masks.put(ILabelPreferenceConstants.DISP_UNDEFINED_TYPE, "Show <Undefined> type");
+ masks.put(ICustomAppearance.DISP_MODIFIERS, "Modifiers");
+
+ masks.put(ICustomAppearance.DISP_PARAMETER_DIRECTION, "Parameter direction");
+ masks.put(ICustomAppearance.DISP_PARAMETER_NAME, "Parameter name");
+ masks.put(ICustomAppearance.DISP_PARAMETER_TYPE, "Parameter type");
+ masks.put(ICustomAppearance.DISP_PARAMETER_MULTIPLICITY, "Parameter multiplicity");
+ masks.put(ICustomAppearance.DISP_PARAMETER_DEFAULT, "Parameter default value");
+ masks.put(ICustomAppearance.DISP_PARAMETER_MODIFIERS, "Parameter modifiers");
+ return masks;
+ }
+
+ @Override
+ public Collection<String> getDefaultValue(IAdaptable element) {
+ return Arrays.asList(ICustomAppearance.DISP_NAME, ICustomAppearance.DISP_TYPE, ICustomAppearance.DISP_PARAMETER_DIRECTION, ICustomAppearance.DISP_PARAMETER_NAME, ICustomAppearance.DISP_PARAMETER_TYPE);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/ParameterLabelParser.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/ParameterLabelParser.java
new file mode 100755
index 0000000..0c37c60
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/ParameterLabelParser.java
@@ -0,0 +1,143 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.parser;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.uml.diagram.common.utils.ParameterLabelUtil;
+import org.eclipse.papyrus.uml.tools.utils.ICustomAppearance;
+import org.eclipse.uml2.uml.Parameter;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * Semantic Parser for {@link Parameter}
+ */
+public class ParameterLabelParser extends NamedElementLabelParser {
+
+ /** The String format for displaying a {@link Parameter} with direction */
+ protected static final String DIRECTION_FORMAT = "%s %s";
+
+ /** The String format for displaying a {@link Parameter} label with its name */
+ protected static final String NAME_FORMAT = "%s%s";
+
+ /** The String format for displaying a {@link Parameter} label with its type */
+ protected static final String TYPE_FORMAT = "%s: %s";
+
+ /** The String format for displaying a {@link Parameter} label with its multiplicity */
+ protected static final String MULTIPLICITY_FORMAT = "%s [%s..%s]";
+
+ /** The String format for displaying a {@link Parameter} label with its default value */
+ protected static final String DEFAULT_VALUE_FORMAT = "%s= %s";
+
+ /** The String format for displaying a {@link Parameter} label with its modifiers */
+ protected static final String MODIFIER_FORMAT = "%s{%s}";
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getPrintString(IAdaptable element, int flags) {
+
+ Collection<String> maskValues = getMaskValues(element);
+
+ if (maskValues.isEmpty()) {
+ return MaskedLabel;
+ }
+
+ EObject eObject = EMFHelper.getEObject(element);
+
+ if (eObject != null && eObject instanceof Parameter) {
+ Parameter parameter = (Parameter) eObject;
+ return ParameterLabelUtil.getPrintString(parameter, maskValues);
+ }
+
+ return "";
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean isAffectingEvent(Object event, int flags) {
+
+ if (event instanceof Notification) {
+ Object feature = ((Notification) event).getFeature();
+ if (feature instanceof EStructuralFeature) {
+ return UMLPackage.eINSTANCE.getTypedElement_Type().equals(feature) || UMLPackage.eINSTANCE.getParameter_Direction().equals(feature) || UMLPackage.eINSTANCE.getParameter_DefaultValue().equals(feature)
+ || UMLPackage.eINSTANCE.getParameter_IsStream().equals(feature) || UMLPackage.eINSTANCE.getParameter_IsException().equals(feature) || UMLPackage.eINSTANCE.getMultiplicityElement_IsOrdered().equals(feature)
+ || UMLPackage.eINSTANCE.getMultiplicityElement_IsUnique().equals(feature) || UMLPackage.eINSTANCE.getMultiplicityElement_LowerValue().equals(feature) || UMLPackage.eINSTANCE.getMultiplicityElement_UpperValue().equals(feature)
+ || super.isAffectingEvent(event, flags);
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public List<EObject> getSemanticElementsBeingParsed(EObject element) {
+ List<EObject> semanticElementsBeingParsed = new ArrayList<EObject>();
+
+ if ((element != null) && (element instanceof Parameter)) {
+ Parameter semElement = (Parameter) element;
+
+ semanticElementsBeingParsed.add(semElement);
+ if (semElement.getType() != null) {
+ semanticElementsBeingParsed.add(semElement.getType());
+ }
+ if (semElement.getDefaultValue() != null) {
+ semanticElementsBeingParsed.add(semElement.getDefaultValue());
+ }
+ if (semElement.getLowerValue() != null) {
+ semanticElementsBeingParsed.add(semElement.getLowerValue());
+ }
+ if (semElement.getUpperValue() != null) {
+ semanticElementsBeingParsed.add(semElement.getUpperValue());
+ }
+ }
+ return semanticElementsBeingParsed;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Map<String, String> getMasks() {
+ Map<String, String> masks = new HashMap<String, String>();
+ masks.put(ICustomAppearance.DISP_DIRECTION, "Direction");
+ masks.put(ICustomAppearance.DISP_NAME, "Name");
+ masks.put(ICustomAppearance.DISP_TYPE, "Type");
+ masks.put(ICustomAppearance.DISP_MULTIPLICITY, "Multiplicity");
+ masks.put(ICustomAppearance.DISP_DEFAULT_VALUE, "Default value");
+ masks.put(ICustomAppearance.DISP_MODIFIERS, "Modifiers");
+ return masks;
+ }
+
+ @Override
+ public Collection<String> getDefaultValue(IAdaptable element) {
+ return Arrays.asList(ICustomAppearance.DISP_NAME);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/PropertyLabelParser.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/PropertyLabelParser.java
new file mode 100755
index 0000000..89ea3a8
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/PropertyLabelParser.java
@@ -0,0 +1,248 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.parser;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.sysml.diagram.common.preferences.ILabelPreferenceConstants;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLMultiplicityElementUtil;
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
+import org.eclipse.papyrus.uml.tools.utils.ICustomAppearance;
+import org.eclipse.papyrus.uml.tools.utils.ValueSpecificationUtil;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.eclipse.uml2.uml.ValueSpecification;
+import org.eclipse.uml2.uml.VisibilityKind;
+
+/**
+ * Semantic Parser for {@link Property}
+ */
+public class PropertyLabelParser extends NamedElementLabelParser {
+
+ /** The String format for displaying a {@link Property} with visibility */
+ protected static final String VISIBILITY_FORMAT = "%s %s";
+
+ /** The String format for displaying a {@link Property} label with derived modifier */
+ protected static final String DERIVED_FORMAT = "%s/";
+
+ /** The String format for displaying a {@link Property} label with its name */
+ protected static final String NAME_FORMAT = "%s%s";
+
+ /** The String format for displaying a {@link Property} label with its type */
+ protected static final String TYPE_FORMAT = "%s: %s";
+
+ /** The String format for displaying a {@link Property} label with multiplicity */
+ protected static final String MULTIPLICITY_FORMAT = "%s [%s..%s]";
+
+ /** The String format for displaying a {@link Property} label with multiplicity */
+ protected static final String MULTIPLICITY_FORMAT_ALT = "%s [%s]";
+
+ /** The String format for displaying a {@link Property} label with default value */
+ protected static final String DEFAULT_VALUE_FORMAT = "%s= %s";
+
+ /** The String format for displaying a {@link Property} label with modifiers */
+ protected static final String MODIFIER_FORMAT = "%s{%s}";
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getPrintString(IAdaptable element, int flags) {
+
+ Collection<String> maskValues = getMaskValues(element);
+
+ if (maskValues.isEmpty()) {
+ return MaskedLabel;
+ }
+
+ String result = "";
+ EObject eObject = EMFHelper.getEObject(element);
+
+ if ((eObject != null) && (eObject instanceof Property)) {
+
+ Property property = (Property) eObject;
+
+ // manage visibility
+ if (maskValues.contains(ICustomAppearance.DISP_VISIBILITY)) {
+ String visibility;
+ switch (property.getVisibility().getValue()) {
+ case VisibilityKind.PACKAGE:
+ visibility = "~";
+ break;
+ case VisibilityKind.PUBLIC:
+ visibility = "+";
+ break;
+ case VisibilityKind.PROTECTED:
+ visibility = "#";
+ break;
+ case VisibilityKind.PRIVATE:
+ visibility = "-";
+ break;
+ default:
+ visibility = "+";
+ break;
+ }
+ result = String.format(VISIBILITY_FORMAT, visibility, result);
+ }
+
+ // manage derived modifier
+ if (maskValues.contains(ICustomAppearance.DISP_DERIVE) && (property.isDerived())) {
+ result = String.format(DERIVED_FORMAT, result);
+ }
+
+ // manage name
+ if (maskValues.contains(ICustomAppearance.DISP_NAME) && (property.isSetName())) {
+ String name = UMLLabelInternationalization.getInstance().getLabel(property);
+ result = String.format(NAME_FORMAT, result, name);
+ }
+
+ // manage type
+ if (maskValues.contains(ICustomAppearance.DISP_TYPE)) {
+ String type = "<Undefined>";
+ if (property.getType() != null) {
+ type = UMLLabelInternationalization.getInstance().getLabel(property.getType());
+ }
+
+ // If type is undefined only show "<Undefined>" when explicitly asked.
+ if (maskValues.contains(ILabelPreferenceConstants.DISP_UNDEFINED_TYPE) || (!"<Undefined>".equals(type))) {
+ result = String.format(TYPE_FORMAT, result, type);
+ }
+ }
+
+ // manage multiplicity
+ if (maskValues.contains(ICustomAppearance.DISP_MULTIPLICITY)) {
+
+ // TODO : add a case for default with multiplicity not set.
+ String multiplicity = SysMLMultiplicityElementUtil.formatMultiplicity(property, maskValues);
+ if (multiplicity != null && !multiplicity.isEmpty()) {
+ result += " " + multiplicity;
+ }
+ }
+
+ // manage default value
+ if (maskValues.contains(ICustomAppearance.DISP_DEFAULT_VALUE) && property.getDefaultValue() != null) {
+ ValueSpecification valueSpecification = property.getDefaultValue();
+ result = String.format(DEFAULT_VALUE_FORMAT, result, ValueSpecificationUtil.getSpecificationValue(valueSpecification, true));
+ }
+
+ // manage modifier
+ if (maskValues.contains(ICustomAppearance.DISP_MODIFIERS)) {
+ StringBuffer sb = new StringBuffer();
+ if (property.isReadOnly()) {
+ sb.append(sb.length() == 0 ? "readOnly" : ", readOnly");
+ }
+ if (property.isOrdered()) {
+ sb.append(sb.length() == 0 ? "ordered" : ", ordered");
+ }
+ if (property.isUnique()) {
+ sb.append(sb.length() == 0 ? "unique" : ", unique");
+ }
+ if (property.isDerivedUnion()) {
+ sb.append(sb.length() == 0 ? "union" : ", union");
+ }
+ EList<Property> redefinedProperties = property.getRedefinedProperties();
+ if (redefinedProperties != null && !redefinedProperties.isEmpty()) {
+ for (Property p : redefinedProperties) {
+ sb.append(sb.length() == 0 ? UMLLabelInternationalization.getInstance().getLabel(p) : ", redefines " + UMLLabelInternationalization.getInstance().getLabel(p));
+ }
+ }
+ if (sb.length() != 0) {
+ result = String.format(MODIFIER_FORMAT, result, sb.toString());
+ }
+ }
+ }
+ return result;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean isAffectingEvent(Object event, int flags) {
+
+ if (event instanceof Notification) {
+ Object feature = ((Notification) event).getFeature();
+
+ if (feature instanceof EStructuralFeature) { // UMLPackage.eINSTANCE.getLiteralString_Value().equals(feature) ||
+ return UMLPackage.eINSTANCE.getTypedElement_Type().equals(feature) || UMLPackage.eINSTANCE.getInstanceValue_Instance().equals(feature) || UMLPackage.eINSTANCE.getMultiplicityElement_IsOrdered().equals(feature)
+ || UMLPackage.eINSTANCE.getMultiplicityElement_IsUnique().equals(feature) || UMLPackage.eINSTANCE.getMultiplicityElement_LowerValue().equals(feature) || UMLPackage.eINSTANCE.getMultiplicityElement_UpperValue().equals(feature)
+ || UMLPackage.eINSTANCE.getStructuralFeature_IsReadOnly().equals(feature) || UMLPackage.eINSTANCE.getFeature_IsStatic().equals(feature) || UMLPackage.eINSTANCE.getProperty_IsDerived().equals(feature)
+ || UMLPackage.eINSTANCE.getProperty_IsDerivedUnion().equals(feature) || UMLPackage.eINSTANCE.getProperty_RedefinedProperty().equals(feature) || super.isAffectingEvent(event, flags);
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public List<EObject> getSemanticElementsBeingParsed(EObject element) {
+ List<EObject> semanticElementsBeingParsed = new ArrayList<EObject>();
+
+ if ((element != null) && (element instanceof Property)) {
+ Property semElement = (Property) element;
+
+ semanticElementsBeingParsed.add(semElement);
+ if (semElement.getType() != null) {
+ semanticElementsBeingParsed.add(semElement.getType());
+ }
+ if (semElement.getLowerValue() != null) {
+ semanticElementsBeingParsed.add(semElement.getLowerValue());
+ }
+ if (semElement.getUpperValue() != null) {
+ semanticElementsBeingParsed.add(semElement.getUpperValue());
+ }
+ if (semElement.getDefaultValue() != null) {
+ semanticElementsBeingParsed.add(semElement.getDefaultValue());
+ }
+ }
+ return semanticElementsBeingParsed;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Map<String, String> getMasks() {
+ Map<String, String> masks = new HashMap<String, String>();
+ masks.put(ICustomAppearance.DISP_VISIBILITY, "Visibility");
+ masks.put(ICustomAppearance.DISP_DERIVE, "Is Derived");
+ masks.put(ICustomAppearance.DISP_NAME, "Name");
+ masks.put(ICustomAppearance.DISP_TYPE, "Type");
+ masks.put(ILabelPreferenceConstants.DISP_UNDEFINED_TYPE, "Show <Undefined> type");
+ masks.put(ICustomAppearance.DISP_MULTIPLICITY, "Multiplicity");
+ masks.put(ILabelPreferenceConstants.DISP_DEFAULT_MULTIPLICITY, "Show default multiplicity");
+ masks.put(ICustomAppearance.DISP_DEFAULT_VALUE, "Default Value");
+ masks.put(ICustomAppearance.DISP_MODIFIERS, "Modifiers");
+ return masks;
+ }
+
+ @Override
+ public Collection<String> getDefaultValue(IAdaptable element) {
+ return Arrays.asList(ICustomAppearance.DISP_NAME, ICustomAppearance.DISP_TYPE, ICustomAppearance.DISP_MULTIPLICITY, ILabelPreferenceConstants.DISP_UNDEFINED_TYPE);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/ReceptionLabelParser.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/ReceptionLabelParser.java
new file mode 100755
index 0000000..a5fbfae
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/ReceptionLabelParser.java
@@ -0,0 +1,135 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.parser;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.sysml.diagram.common.preferences.ILabelPreferenceConstants;
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
+import org.eclipse.papyrus.uml.tools.utils.ICustomAppearance;
+import org.eclipse.uml2.uml.Reception;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * Semantic Parser for {@link Reception}
+ */
+public class ReceptionLabelParser extends NamedElementLabelParser implements IMaskManagedSemanticParser {
+
+ /** The String format for displaying a Property with visibility */
+ protected static final String PREFIX = "\u00ABsignal\u00BB ";
+
+ /** The String format for displaying a Property label with its name */
+ protected static final String NAME_FORMAT = "%s%s";
+
+ /** The String format for displaying a Property label with its type */
+ protected static final String TYPE_FORMAT = "%s: %s";
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getPrintString(IAdaptable element, int flags) {
+
+ Collection<String> maskValues = getMaskValues(element);
+
+ if (maskValues.isEmpty()) {
+ return MaskedLabel;
+ }
+
+ String result = PREFIX;
+ EObject eObject = EMFHelper.getEObject(element);
+
+ if ((eObject != null) && (eObject instanceof Reception)) {
+
+ Reception reception = (Reception) eObject;
+
+ // manage name
+ if (maskValues.contains(ICustomAppearance.DISP_NAME) && reception.isSetName()) {
+ String name = UMLLabelInternationalization.getInstance().getLabel(reception);
+ result = String.format(NAME_FORMAT, result, name);
+ }
+
+ // manage signal
+ if (maskValues.contains(ILabelPreferenceConstants.DISP_SIGNAL)) {
+ String type = "<Undefined>";
+ if (reception.getSignal() != null) {
+ type = UMLLabelInternationalization.getInstance().getLabel(reception.getSignal());
+ }
+ result = String.format(TYPE_FORMAT, result, type);
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean isAffectingEvent(Object event, int flags) {
+
+ if (event instanceof Notification) {
+ Object feature = ((Notification) event).getFeature();
+ if (feature instanceof EStructuralFeature) {
+ return UMLPackage.eINSTANCE.getReception_Signal().equals(feature) || super.isAffectingEvent(event, flags);
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public List<EObject> getSemanticElementsBeingParsed(EObject element) {
+ List<EObject> semanticElementsBeingParsed = new ArrayList<EObject>();
+
+ if ((element != null) && (element instanceof Reception)) {
+ Reception semElement = (Reception) element;
+
+ semanticElementsBeingParsed.add(semElement);
+ if (semElement.getSignal() != null) {
+ semanticElementsBeingParsed.add(semElement.getSignal());
+ }
+ }
+ return semanticElementsBeingParsed;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Map<String, String> getMasks() {
+ Map<String, String> masks = new HashMap<String, String>();
+ masks.put(ICustomAppearance.DISP_NAME, "Name");
+ masks.put(ILabelPreferenceConstants.DISP_SIGNAL, "Signal");
+ return masks;
+ }
+
+ @Override
+ public Collection<String> getDefaultValue(IAdaptable element) {
+ return Arrays.asList(ICustomAppearance.DISP_NAME, ILabelPreferenceConstants.DISP_SIGNAL);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/SlotLabelParser.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/SlotLabelParser.java
new file mode 100755
index 0000000..f1b973a
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/SlotLabelParser.java
@@ -0,0 +1,151 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.parser;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand;
+import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
+import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.uml2.uml.InstanceValue;
+import org.eclipse.uml2.uml.Slot;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.eclipse.uml2.uml.ValueSpecification;
+
+/**
+ * Semantic Parser for {@link Slot}
+ */
+public class SlotLabelParser implements ISemanticParser {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getEditString(IAdaptable element, int flags) {
+ return getPrintString(element, flags);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public IParserEditStatus isValidEditString(IAdaptable element, String editString) {
+ return ParserEditStatus.UNEDITABLE_STATUS;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ICommand getParseCommand(IAdaptable element, String newString, int flags) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getPrintString(IAdaptable element, int flags) {
+ String result = "";
+ EObject eObject = EMFHelper.getEObject(element);
+
+ if (eObject instanceof Slot) {
+ Slot slot = (Slot) eObject;
+ result = "<UNDEFINED>";
+
+ if (slot.getDefiningFeature() != null) {
+
+ // Add defining feature
+ result = slot.getDefiningFeature().getName();
+
+ // Add values
+ if (!slot.getValues().isEmpty()) {
+
+ String values = "";
+ Iterator<ValueSpecification> iter = slot.getValues().iterator();
+ while (iter.hasNext()) {
+ ValueSpecification currentSpecification = iter.next();
+
+ String currentValue = currentSpecification.stringValue();
+ if ((currentSpecification instanceof InstanceValue) && ((InstanceValue) currentSpecification).getInstance() != null) {
+ currentValue = ((InstanceValue) currentSpecification).getInstance().getName();
+ }
+
+ values = values + currentValue;
+ if (iter.hasNext()) {
+ result = result + ", ";
+ }
+ }
+
+ result = result + ": " + values;
+ }
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean isAffectingEvent(Object event, int flags) {
+ if (event instanceof Notification) {
+ Object feature = ((Notification) event).getFeature();
+ if (feature instanceof EStructuralFeature) {
+ return UMLPackage.eINSTANCE.getSlot_DefiningFeature().equals(feature);
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor(IAdaptable element) {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public List<EObject> getSemanticElementsBeingParsed(EObject element) {
+ List<EObject> semanticElementsBeingParsed = new ArrayList<EObject>();
+ semanticElementsBeingParsed.add(element);
+
+ return semanticElementsBeingParsed;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean areSemanticElementsAffected(EObject listener, Object notification) {
+ return true;
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/utils/AssociationViewUtils.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/utils/AssociationViewUtils.java
new file mode 100755
index 0000000..a9be2ba
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/utils/AssociationViewUtils.java
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.utils;
+
+import org.eclipse.gmf.runtime.notation.EObjectValueStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.uml2.uml.Property;
+
+/**
+ * Utility class for Association graphical end - property mapping.
+ */
+public class AssociationViewUtils {
+
+ /** ID for the source end - property mapping of an association */
+ public static final String SEMANTIC_SOURCE_END = "semantic_source_end";
+
+ /** ID for the target end - property mapping of an association */
+ public static final String SEMANTIC_TARGET_END = "semantic_target_end";
+
+ /**
+ * Get the semantic end from the source of an edge representing an Association.
+ *
+ * @param view
+ * the Association view.
+ * @return the Property corresponding to the source of the graphical end.
+ */
+ public static Property getSourceSemanticEnd(View view) {
+ EObjectValueStyle semanticStyle = (EObjectValueStyle) view.getNamedStyle(NotationPackage.eINSTANCE.getEObjectValueStyle(), SEMANTIC_SOURCE_END);
+ return semanticStyle == null ? null : (Property) semanticStyle.getEObjectValue();
+ }
+
+ /**
+ * Get the semantic end from the target of an edge representing an Association.
+ *
+ * @param view
+ * the Association view.
+ * @return the Property corresponding to the target of the graphical end.
+ */
+ public static Property getTargetSemanticEnd(View view) {
+ EObjectValueStyle semanticStyle = (EObjectValueStyle) view.getNamedStyle(NotationPackage.eINSTANCE.getEObjectValueStyle(), SEMANTIC_TARGET_END);
+ return semanticStyle == null ? null : (Property) semanticStyle.getEObjectValue();
+ }
+
+ /**
+ * Set the semantic end for the source of an edge representing an Association.
+ *
+ * @param view
+ * the Association view.
+ * @param end
+ * the Property corresponding to the source of the graphical end.
+ */
+ public static void setSourceSemanticEnd(View view, Property end) {
+ EObjectValueStyle semanticStyle = (EObjectValueStyle) view.getNamedStyle(NotationPackage.eINSTANCE.getEObjectValueStyle(), SEMANTIC_SOURCE_END);
+ semanticStyle.setEObjectValue(end);
+ }
+
+ /**
+ * Set the semantic end for the target of an edge representing an Association.
+ *
+ * @param view
+ * the Association view.
+ * @param end
+ * the Property corresponding to the target of the graphical end.
+ */
+ public static void setTargetSemanticEnd(View view, Property end) {
+ EObjectValueStyle semanticStyle = (EObjectValueStyle) view.getNamedStyle(NotationPackage.eINSTANCE.getEObjectValueStyle(), SEMANTIC_TARGET_END);
+ semanticStyle.setEObjectValue(end);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/utils/ParameterLabelUtil.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/utils/ParameterLabelUtil.java
new file mode 100755
index 0000000..edb3268
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/utils/ParameterLabelUtil.java
@@ -0,0 +1,136 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.utils;
+
+import java.util.Collection;
+
+import org.eclipse.papyrus.sysml.diagram.common.preferences.ILabelPreferenceConstants;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLMultiplicityElementUtil;
+import org.eclipse.papyrus.uml.diagram.common.parser.IMaskManagedSemanticParser;
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
+import org.eclipse.papyrus.uml.tools.utils.ICustomAppearance;
+import org.eclipse.papyrus.uml.tools.utils.ValueSpecificationUtil;
+import org.eclipse.uml2.uml.Parameter;
+import org.eclipse.uml2.uml.ParameterDirectionKind;
+import org.eclipse.uml2.uml.ValueSpecification;
+
+
+public class ParameterLabelUtil {
+
+ /** The String format for displaying a {@link Parameter} with direction */
+ protected static final String DIRECTION_FORMAT = "%s %s";
+
+ /** The String format for displaying a {@link Parameter} label with its name */
+ protected static final String NAME_FORMAT = "%s%s";
+
+ /** The String format for displaying a {@link Parameter} label with its type */
+ protected static final String TYPE_FORMAT = "%s: %s";
+
+ /** The String format for displaying a {@link Parameter} label with its multiplicity */
+ protected static final String MULTIPLICITY_FORMAT = "%s [%s..%s]";
+
+ /** The String format for displaying a {@link Parameter} label with its default value */
+ protected static final String DEFAULT_VALUE_FORMAT = "%s= %s";
+
+ /** The String format for displaying a {@link Parameter} label with its modifiers */
+ protected static final String MODIFIER_FORMAT = "%s{%s}";
+
+ public static String getPrintString(Parameter parameter, Collection<String> displayValue) {
+ if (displayValue.isEmpty()) {
+ return IMaskManagedSemanticParser.MaskedLabel;
+ }
+
+ String result = "";
+
+ if (parameter != null) {
+
+ // manage direction
+ if (displayValue.contains(ICustomAppearance.DISP_DIRECTION) || displayValue.contains(ICustomAppearance.DISP_PARAMETER_DIRECTION)) {
+ String direction;
+ switch (parameter.getDirection().getValue()) {
+ case ParameterDirectionKind.IN:
+ direction = "in";
+ break;
+ case ParameterDirectionKind.OUT:
+ direction = "out";
+ break;
+ case ParameterDirectionKind.INOUT:
+ direction = "inout";
+ break;
+ case ParameterDirectionKind.RETURN:
+ direction = "return";
+ break;
+ default:
+ direction = "in";
+ break;
+ }
+ result = String.format(DIRECTION_FORMAT, direction, result);
+ }
+
+ // manage name
+ if ((displayValue.contains(ICustomAppearance.DISP_NAME) || displayValue.contains(ICustomAppearance.DISP_PARAMETER_NAME)) && (parameter.isSetName())) {
+ String name = UMLLabelInternationalization.getInstance().getLabel(parameter);
+ result = String.format(NAME_FORMAT, result, name);
+ }
+
+ // manage type
+ if (displayValue.contains(ICustomAppearance.DISP_TYPE) || displayValue.contains(ICustomAppearance.DISP_PARAMETER_TYPE)) {
+ String type = "<Undefined>";
+ if (parameter.getType() != null) {
+ type = UMLLabelInternationalization.getInstance().getLabel(parameter.getType());
+ }
+
+ // If type is undefined only show "<Undefined>" when explicitly asked.
+ if (displayValue.contains(ILabelPreferenceConstants.DISP_UNDEFINED_TYPE) || (!"<Undefined>".equals(type))) {
+ result = String.format(TYPE_FORMAT, result, type);
+ }
+ }
+
+ // manage multiplicity
+ String multiplicity = SysMLMultiplicityElementUtil.formatMultiplicity(parameter, displayValue);
+ if (multiplicity != null && !multiplicity.isEmpty()) {
+ result += " " + multiplicity;
+ }
+
+ // manage default value
+ if ((displayValue.contains(ICustomAppearance.DISP_PARAMETER_DEFAULT) || displayValue.contains(ICustomAppearance.DISP_DEFAULT_VALUE)) && ((parameter.getDefaultValue() != null))) {
+ ValueSpecification valueSpecification = parameter.getDefaultValue();
+ result = String.format(DEFAULT_VALUE_FORMAT, result, ValueSpecificationUtil.getSpecificationValue(valueSpecification, true));
+ }
+
+ // manage modifier
+ if (displayValue.contains(ICustomAppearance.DISP_PARAMETER_MODIFIERS) || displayValue.contains(ICustomAppearance.DISP_MODIFIERS)) {
+ StringBuffer sb = new StringBuffer();
+ if (parameter.isOrdered()) {
+ sb.append(sb.length() == 0 ? "ordered" : ", ordered");
+ }
+ if (parameter.isUnique()) {
+ sb.append(sb.length() == 0 ? "unique" : ", unique");
+ }
+ if (parameter.isStream()) {
+ sb.append(sb.length() == 0 ? "stream" : ", stream");
+ }
+ if (parameter.isException()) {
+ sb.append(sb.length() == 0 ? "exception" : ", exception");
+ }
+ if (sb.length() != 0) {
+ result = String.format(MODIFIER_FORMAT, result, sb.toString());
+ }
+ }
+
+ }
+ return result;
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/BlockCompositeEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/BlockCompositeEditPart.java
new file mode 100755
index 0000000..03205da
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/BlockCompositeEditPart.java
@@ -0,0 +1,184 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.edit.part;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
+import org.eclipse.papyrus.sysml.diagram.common.edit.policy.BlockCompositeSemanticEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.common.figure.BlockCompositeFigure;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.AbstractElementEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.PortAffixedNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.policy.StructuredClassifierCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.BorderItemResizableEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.locator.PortPositionLocator;
+
+public class BlockCompositeEditPart extends AbstractElementEditPart {
+
+ public BlockCompositeEditPart(View view) {
+ super(view);
+ }
+
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new BlockCompositeSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new StructuredClassifierCreationEditPolicy());
+ installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
+ installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
+ installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ installEditPolicy(AffixedNodeAlignmentEditPolicy.AFFIXED_CHILD_ALIGNMENT_ROLE, new AffixedNodeAlignmentEditPolicy());
+ // Start of user code custom policies
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new org.eclipse.papyrus.uml.diagram.common.edit.policy.EncapsulatedClassifierResizableShapeEditPolicy());
+ // End of user code
+ }
+
+ @Override
+ protected LayoutEditPolicy createLayoutEditPolicy() {
+ org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ if (child instanceof IBorderItemEditPart) {
+ return new BorderItemResizableEditPolicy();
+ }
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ @Override
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof BlockLabelNameEditPart) {
+ ((BlockLabelNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+ if (childEditPart instanceof FlowPortAffixedNodeEditPart) {
+ IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
+ getBorderedFigure().getBorderItemContainer().add(((FlowPortAffixedNodeEditPart) childEditPart).getFigure(), locator);
+ return true;
+ }
+ if (childEditPart instanceof PortAffixedNodeEditPart) {
+ IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
+ getBorderedFigure().getBorderItemContainer().add(((PortAffixedNodeEditPart) childEditPart).getFigure(), locator);
+ return true;
+ }
+ if (childEditPart instanceof StructureCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getStructureCompartmentFigure();
+ setupContentPane(pane);
+ pane.add(((StructureCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof BlockLabelNameEditPart) {
+ return true;
+ }
+ if (childEditPart instanceof FlowPortAffixedNodeEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((FlowPortAffixedNodeEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof PortAffixedNodeEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((PortAffixedNodeEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof StructureCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getStructureCompartmentFigure();
+ setupContentPane(pane);
+ pane.remove(((StructureCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ if (editPart instanceof StructureCompartmentEditPart) {
+ return getPrimaryShape().getStructureCompartmentFigure();
+ }
+ if (editPart instanceof IBorderItemEditPart) {
+ return getBorderedFigure().getBorderItemContainer();
+ }
+ return getContentPane();
+ }
+
+ // public EditPart getTargetEditPart(Request request) {
+ // if(request instanceof CreateViewAndElementRequest) {
+ // CreateElementRequestAdapter adapter = ((CreateViewAndElementRequest)request).getViewAndElementDescriptor().getCreateElementRequestAdapter();
+ // IElementType type = (IElementType)adapter.getAdapter(IElementType.class);
+ // if(type == CustomBlockDefinitionDiagramElementTypes.BLOCK_CONSTRAINT_CLN) {
+ // return getChildBySemanticHint(CustomBlockDefinitionDiagramElementTypes.BLOCK_CONSTRAINT_COMPARTMENT_HINT);
+ // }
+ // }
+ // return super.getTargetEditPart(request);
+ // }
+ @Override
+ protected NodeFigure createNodeFigure() {
+ return new SelectableBorderedNodeFigure(createMainFigure());
+ }
+
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new BlockCompositeFigure();
+ }
+
+ @Override
+ public BlockCompositeFigure getPrimaryShape() {
+ return (BlockCompositeFigure) primaryShape;
+ }
+
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(SysMLGraphicalTypes.LABEL_SYSML_BLOCK_NAME_ID);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/BlockConstraintCompartmentEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/BlockConstraintCompartmentEditPart.java
new file mode 100755
index 0000000..8e1d6e6
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/BlockConstraintCompartmentEditPart.java
@@ -0,0 +1,66 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.edit.part;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.figures.ResizableCompartmentFigure;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.ResizeableListCompartmentEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
+
+public class BlockConstraintCompartmentEditPart extends ResizeableListCompartmentEditPart {
+
+ public final static String COMPARTMENT_NAME = "constraints";
+
+ public BlockConstraintCompartmentEditPart(View view) {
+ super(view);
+ }
+
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultCompartmentSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
+ // Start of user code custom edit policies
+ // End of user code
+ }
+
+ @Override
+ public String getCompartmentName() {
+ return COMPARTMENT_NAME;
+ }
+
+ @Override
+ protected boolean hasModelChildrenChanged(Notification evt) {
+ return false;
+ }
+
+ @Override
+ public IFigure createFigure() {
+ ResizableCompartmentFigure result = (ResizableCompartmentFigure) super.createFigure();
+ result.setTitleVisibility(false);
+ return result;
+ }
+
+ @Override
+ protected void setRatio(Double ratio) {
+ if (getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/BlockEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/BlockEditPart.java
new file mode 100755
index 0000000..334c849
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/BlockEditPart.java
@@ -0,0 +1,291 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.edit.part;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
+import org.eclipse.papyrus.sysml.diagram.common.edit.policy.BlockCompositeSemanticEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.common.figure.BlockFigure;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.AbstractElementEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.OperationCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.PortAffixedNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.PortCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.policy.StructuredClassifierCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.BorderItemResizableEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.locator.PortPositionLocator;
+
+public class BlockEditPart extends AbstractElementEditPart {
+
+ public BlockEditPart(View view) {
+ super(view);
+ }
+
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new BlockCompositeSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new StructuredClassifierCreationEditPolicy());
+ installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
+ installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
+ installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ installEditPolicy(AffixedNodeAlignmentEditPolicy.AFFIXED_CHILD_ALIGNMENT_ROLE, new AffixedNodeAlignmentEditPolicy());
+ // Start of user code custom policies
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new org.eclipse.papyrus.uml.diagram.common.edit.policy.EncapsulatedClassifierResizableShapeEditPolicy());
+ // End of user code
+ }
+
+ @Override
+ protected LayoutEditPolicy createLayoutEditPolicy() {
+ org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ if (child instanceof IBorderItemEditPart) {
+ return new BorderItemResizableEditPolicy();
+ }
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ @Override
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof BlockLabelNameEditPart) {
+ ((BlockLabelNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+ if (childEditPart instanceof FlowPortAffixedNodeEditPart) {
+ IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
+ getBorderedFigure().getBorderItemContainer().add(((FlowPortAffixedNodeEditPart) childEditPart).getFigure(), locator);
+ return true;
+ }
+ if (childEditPart instanceof PortAffixedNodeEditPart) {
+ IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
+ getBorderedFigure().getBorderItemContainer().add(((PortAffixedNodeEditPart) childEditPart).getFigure(), locator);
+ return true;
+ }
+ if (childEditPart instanceof BlockPropertyCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getBlockPropertyCompartmentFigure();
+ setupContentPane(pane);
+ pane.add(((BlockPropertyCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof PartPropertyCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getPartPropertyCompartmentFigure();
+ setupContentPane(pane);
+ pane.add(((PartPropertyCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof ReferencePropertyCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getReferencePropertyCompartmentFigure();
+ setupContentPane(pane);
+ pane.add(((ReferencePropertyCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof PortCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getPortCompartmentFigure();
+ setupContentPane(pane);
+ pane.add(((PortCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof FlowPortCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getFlowPortCompartmentFigure();
+ setupContentPane(pane);
+ pane.add(((FlowPortCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof OperationCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getOperationCompartmentFigure();
+ setupContentPane(pane);
+ pane.add(((OperationCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof BlockConstraintCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getBlockConstraintCompartmentFigure();
+ setupContentPane(pane);
+ pane.add(((BlockConstraintCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof ValuePropertyCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getValuePropertyCompartmentFigure();
+ setupContentPane(pane);
+ pane.add(((ValuePropertyCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof BlockLabelNameEditPart) {
+ return true;
+ }
+ if (childEditPart instanceof FlowPortAffixedNodeEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((FlowPortAffixedNodeEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof PortAffixedNodeEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((PortAffixedNodeEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof BlockPropertyCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getBlockPropertyCompartmentFigure();
+ setupContentPane(pane);
+ pane.remove(((BlockPropertyCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof PartPropertyCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getPartPropertyCompartmentFigure();
+ setupContentPane(pane);
+ pane.remove(((PartPropertyCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof ReferencePropertyCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getReferencePropertyCompartmentFigure();
+ setupContentPane(pane);
+ pane.remove(((ReferencePropertyCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof PortCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getPortCompartmentFigure();
+ setupContentPane(pane);
+ pane.remove(((PortCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof FlowPortCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getFlowPortCompartmentFigure();
+ setupContentPane(pane);
+ pane.remove(((FlowPortCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof OperationCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getOperationCompartmentFigure();
+ setupContentPane(pane);
+ pane.remove(((OperationCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof BlockConstraintCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getBlockConstraintCompartmentFigure();
+ setupContentPane(pane);
+ pane.remove(((BlockConstraintCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof ValuePropertyCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getValuePropertyCompartmentFigure();
+ setupContentPane(pane);
+ pane.remove(((ValuePropertyCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ if (editPart instanceof BlockPropertyCompartmentEditPart) {
+ return getPrimaryShape().getBlockPropertyCompartmentFigure();
+ }
+ if (editPart instanceof PartPropertyCompartmentEditPart) {
+ return getPrimaryShape().getPartPropertyCompartmentFigure();
+ }
+ if (editPart instanceof ReferencePropertyCompartmentEditPart) {
+ return getPrimaryShape().getReferencePropertyCompartmentFigure();
+ }
+ if (editPart instanceof PortCompartmentEditPart) {
+ return getPrimaryShape().getPortCompartmentFigure();
+ }
+ if (editPart instanceof FlowPortCompartmentEditPart) {
+ return getPrimaryShape().getFlowPortCompartmentFigure();
+ }
+ if (editPart instanceof OperationCompartmentEditPart) {
+ return getPrimaryShape().getOperationCompartmentFigure();
+ }
+ if (editPart instanceof BlockConstraintCompartmentEditPart) {
+ return getPrimaryShape().getBlockConstraintCompartmentFigure();
+ }
+ if (editPart instanceof ValuePropertyCompartmentEditPart) {
+ return getPrimaryShape().getValuePropertyCompartmentFigure();
+ }
+ if (editPart instanceof IBorderItemEditPart) {
+ return getBorderedFigure().getBorderItemContainer();
+ }
+ return getContentPane();
+ }
+
+ // public EditPart getTargetEditPart(Request request) {
+ // if(request instanceof CreateViewAndElementRequest) {
+ // CreateElementRequestAdapter adapter = ((CreateViewAndElementRequest)request).getViewAndElementDescriptor().getCreateElementRequestAdapter();
+ // IElementType type = (IElementType)adapter.getAdapter(IElementType.class);
+ // if(type == CustomBlockDefinitionDiagramElementTypes.BLOCK_CONSTRAINT_CLN) {
+ // return getChildBySemanticHint(CustomBlockDefinitionDiagramElementTypes.BLOCK_CONSTRAINT_COMPARTMENT_HINT);
+ // }
+ // }
+ // return super.getTargetEditPart(request);
+ // }
+ @Override
+ protected NodeFigure createNodeFigure() {
+ return new SelectableBorderedNodeFigure(createMainFigure());
+ }
+
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new BlockFigure();
+ }
+
+ @Override
+ public BlockFigure getPrimaryShape() {
+ return (BlockFigure) primaryShape;
+ }
+
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(SysMLGraphicalTypes.LABEL_SYSML_BLOCK_NAME_ID);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/BlockLabelNameEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/BlockLabelNameEditPart.java
new file mode 100755
index 0000000..83af46d
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/BlockLabelNameEditPart.java
@@ -0,0 +1,25 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.edit.part;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.NamedElementNodeLabelNameEditPart;
+
+public class BlockLabelNameEditPart extends NamedElementNodeLabelNameEditPart {
+
+ /** Constructor */
+ public BlockLabelNameEditPart(View view) {
+ super(view);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/BlockPropertyCompartmentEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/BlockPropertyCompartmentEditPart.java
new file mode 100755
index 0000000..628a4f4
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/BlockPropertyCompartmentEditPart.java
@@ -0,0 +1,66 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.edit.part;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.figures.ResizableCompartmentFigure;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.ResizeableListCompartmentEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.common.edit.policy.PropertyCompartmentSemanticEditPolicy;
+
+public class BlockPropertyCompartmentEditPart extends ResizeableListCompartmentEditPart {
+
+ public final static String COMPARTMENT_NAME = "properties";
+
+ public BlockPropertyCompartmentEditPart(View view) {
+ super(view);
+ }
+
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new PropertyCompartmentSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
+ // Start of user code custom edit policies
+ // End of user code
+ }
+
+ @Override
+ public String getCompartmentName() {
+ return COMPARTMENT_NAME;
+ }
+
+ @Override
+ protected boolean hasModelChildrenChanged(Notification evt) {
+ return false;
+ }
+
+ @Override
+ public IFigure createFigure() {
+ ResizableCompartmentFigure result = (ResizableCompartmentFigure) super.createFigure();
+ result.setTitleVisibility(false);
+ return result;
+ }
+
+ @Override
+ protected void setRatio(Double ratio) {
+ if (getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/BlockPropertyStructureCompartmentEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/BlockPropertyStructureCompartmentEditPart.java
new file mode 100755
index 0000000..87d8fdd
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/BlockPropertyStructureCompartmentEditPart.java
@@ -0,0 +1,44 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.edit.part;
+
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.edit.policy.BlockPropertyStructureCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.common.edit.policy.CustomDuplicatePasteEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.AbstractShapeCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
+
+public class BlockPropertyStructureCompartmentEditPart extends AbstractShapeCompartmentEditPart {
+
+ public final static String COMPARTMENT_NAME = "structure";
+
+ public BlockPropertyStructureCompartmentEditPart(View view) {
+ super(view);
+ }
+
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new BlockPropertyStructureCompartmentSemanticEditPolicy());
+ // Start of user code custom edit policies
+ installEditPolicy(PasteEditPolicy.PASTE_ROLE, new CustomDuplicatePasteEditPolicy());
+ // End of user code
+ }
+
+ @Override
+ public String getCompartmentName() {
+ return COMPARTMENT_NAME;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/ConstraintBlockEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/ConstraintBlockEditPart.java
new file mode 100755
index 0000000..b6d15b7
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/ConstraintBlockEditPart.java
@@ -0,0 +1,157 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.edit.part;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.common.figure.ConstraintBlockFigure;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.AbstractElementEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
+
+public class ConstraintBlockEditPart extends AbstractElementEditPart {
+
+ public ConstraintBlockEditPart(View view) {
+ super(view);
+ }
+
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
+ installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
+ installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ // Start of user code custom policies
+ // End of user code
+ }
+
+ @Override
+ protected LayoutEditPolicy createLayoutEditPolicy() {
+ org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ @Override
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof ConstraintBlockLabelNameEditPart) {
+ ((ConstraintBlockLabelNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+ if (childEditPart instanceof ParameterCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getParameterCompartmentFigure();
+ setupContentPane(pane);
+ pane.add(((ParameterCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof BlockConstraintCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getBlockConstraintCompartmentFigure();
+ setupContentPane(pane);
+ pane.add(((BlockConstraintCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof ConstraintBlockLabelNameEditPart) {
+ return true;
+ }
+ if (childEditPart instanceof ParameterCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getParameterCompartmentFigure();
+ setupContentPane(pane);
+ pane.remove(((ParameterCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof BlockConstraintCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getBlockConstraintCompartmentFigure();
+ setupContentPane(pane);
+ pane.remove(((BlockConstraintCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ if (editPart instanceof ParameterCompartmentEditPart) {
+ return getPrimaryShape().getParameterCompartmentFigure();
+ }
+ if (editPart instanceof BlockConstraintCompartmentEditPart) {
+ return getPrimaryShape().getBlockConstraintCompartmentFigure();
+ }
+ return getContentPane();
+ }
+
+ // public EditPart getTargetEditPart(Request request) {
+ // if(request instanceof CreateViewAndElementRequest) {
+ // CreateElementRequestAdapter adapter = ((CreateViewAndElementRequest)request).getViewAndElementDescriptor().getCreateElementRequestAdapter();
+ // IElementType type = (IElementType)adapter.getAdapter(IElementType.class);
+ // if(type == CustomBlockDefinitionDiagramElementTypes.BLOCK_CONSTRAINT_CLN) {
+ // return getChildBySemanticHint(CustomBlockDefinitionDiagramElementTypes.BLOCK_CONSTRAINT_COMPARTMENT_HINT);
+ // }
+ // }
+ // return super.getTargetEditPart(request);
+ // }
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new ConstraintBlockFigure();
+ }
+
+ @Override
+ public ConstraintBlockFigure getPrimaryShape() {
+ return (ConstraintBlockFigure) primaryShape;
+ }
+
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(SysMLGraphicalTypes.LABEL_SYSML_CONSTRAINTBLOCK_NAME_ID);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/ConstraintBlockLabelNameEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/ConstraintBlockLabelNameEditPart.java
new file mode 100755
index 0000000..a863eb6
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/ConstraintBlockLabelNameEditPart.java
@@ -0,0 +1,25 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.edit.part;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.NamedElementNodeLabelNameEditPart;
+
+public class ConstraintBlockLabelNameEditPart extends NamedElementNodeLabelNameEditPart {
+
+ /** Constructor */
+ public ConstraintBlockLabelNameEditPart(View view) {
+ super(view);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/DimensionEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/DimensionEditPart.java
new file mode 100755
index 0000000..108ace0
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/DimensionEditPart.java
@@ -0,0 +1,123 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.edit.part;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.common.figure.DimensionFigure;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.AbstractElementEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy;
+
+public class DimensionEditPart extends AbstractElementEditPart {
+
+ public DimensionEditPart(View view) {
+ super(view);
+ }
+
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ // Start of user code custom policies
+ // End of user code
+ }
+
+ @Override
+ protected LayoutEditPolicy createLayoutEditPolicy() {
+ org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ @Override
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof DimensionLabelNameEditPart) {
+ ((DimensionLabelNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof DimensionLabelNameEditPart) {
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ return getContentPane();
+ }
+
+ // public EditPart getTargetEditPart(Request request) {
+ // if(request instanceof CreateViewAndElementRequest) {
+ // CreateElementRequestAdapter adapter = ((CreateViewAndElementRequest)request).getViewAndElementDescriptor().getCreateElementRequestAdapter();
+ // IElementType type = (IElementType)adapter.getAdapter(IElementType.class);
+ // if(type == CustomBlockDefinitionDiagramElementTypes.BLOCK_CONSTRAINT_CLN) {
+ // return getChildBySemanticHint(CustomBlockDefinitionDiagramElementTypes.BLOCK_CONSTRAINT_COMPARTMENT_HINT);
+ // }
+ // }
+ // return super.getTargetEditPart(request);
+ // }
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new DimensionFigure();
+ }
+
+ @Override
+ public DimensionFigure getPrimaryShape() {
+ return (DimensionFigure) primaryShape;
+ }
+
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(SysMLGraphicalTypes.LABEL_SYSML_DIMENSION_NAME_ID);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/DimensionLabelNameEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/DimensionLabelNameEditPart.java
new file mode 100755
index 0000000..cc01228
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/DimensionLabelNameEditPart.java
@@ -0,0 +1,25 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.edit.part;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.NamedElementNodeLabelNameEditPart;
+
+public class DimensionLabelNameEditPart extends NamedElementNodeLabelNameEditPart {
+
+ /** Constructor */
+ public DimensionLabelNameEditPart(View view) {
+ super(view);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/FlowPortCompartmentEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/FlowPortCompartmentEditPart.java
new file mode 100755
index 0000000..6e0c6ce
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/FlowPortCompartmentEditPart.java
@@ -0,0 +1,66 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.edit.part;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.figures.ResizableCompartmentFigure;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.ResizeableListCompartmentEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.common.edit.policy.FlowPortCompartmentSemanticEditPolicy;
+
+public class FlowPortCompartmentEditPart extends ResizeableListCompartmentEditPart {
+
+ public final static String COMPARTMENT_NAME = "flow ports";
+
+ public FlowPortCompartmentEditPart(View view) {
+ super(view);
+ }
+
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new FlowPortCompartmentSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
+ // Start of user code custom edit policies
+ // End of user code
+ }
+
+ @Override
+ public String getCompartmentName() {
+ return COMPARTMENT_NAME;
+ }
+
+ @Override
+ protected boolean hasModelChildrenChanged(Notification evt) {
+ return false;
+ }
+
+ @Override
+ public IFigure createFigure() {
+ ResizableCompartmentFigure result = (ResizableCompartmentFigure) super.createFigure();
+ result.setTitleVisibility(false);
+ return result;
+ }
+
+ @Override
+ protected void setRatio(Double ratio) {
+ if (getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/FlowPropertyCompartmentEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/FlowPropertyCompartmentEditPart.java
new file mode 100755
index 0000000..b61127f
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/FlowPropertyCompartmentEditPart.java
@@ -0,0 +1,66 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.edit.part;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.figures.ResizableCompartmentFigure;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.ResizeableListCompartmentEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
+
+public class FlowPropertyCompartmentEditPart extends ResizeableListCompartmentEditPart {
+
+ public final static String COMPARTMENT_NAME = "flow properties";
+
+ public FlowPropertyCompartmentEditPart(View view) {
+ super(view);
+ }
+
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultCompartmentSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
+ // Start of user code custom edit policies
+ // End of user code
+ }
+
+ @Override
+ public String getCompartmentName() {
+ return COMPARTMENT_NAME;
+ }
+
+ @Override
+ protected boolean hasModelChildrenChanged(Notification evt) {
+ return false;
+ }
+
+ @Override
+ public IFigure createFigure() {
+ ResizableCompartmentFigure result = (ResizableCompartmentFigure) super.createFigure();
+ result.setTitleVisibility(false);
+ return result;
+ }
+
+ @Override
+ protected void setRatio(Double ratio) {
+ if (getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/FlowSpecificationEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/FlowSpecificationEditPart.java
new file mode 100755
index 0000000..00fb8ff
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/FlowSpecificationEditPart.java
@@ -0,0 +1,142 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.edit.part;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.common.figure.FlowSpecificationFigure;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.AbstractElementEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
+
+public class FlowSpecificationEditPart extends AbstractElementEditPart {
+
+ public FlowSpecificationEditPart(View view) {
+ super(view);
+ }
+
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
+ installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
+ installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ // Start of user code custom policies
+ // End of user code
+ }
+
+ @Override
+ protected LayoutEditPolicy createLayoutEditPolicy() {
+ org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ @Override
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof FlowSpecificationLabelNameEditPart) {
+ ((FlowSpecificationLabelNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+ if (childEditPart instanceof FlowPropertyCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getFlowPropertyCompartmentFigure();
+ setupContentPane(pane);
+ pane.add(((FlowPropertyCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof FlowSpecificationLabelNameEditPart) {
+ return true;
+ }
+ if (childEditPart instanceof FlowPropertyCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getFlowPropertyCompartmentFigure();
+ setupContentPane(pane);
+ pane.remove(((FlowPropertyCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ if (editPart instanceof FlowPropertyCompartmentEditPart) {
+ return getPrimaryShape().getFlowPropertyCompartmentFigure();
+ }
+ return getContentPane();
+ }
+
+ // public EditPart getTargetEditPart(Request request) {
+ // if(request instanceof CreateViewAndElementRequest) {
+ // CreateElementRequestAdapter adapter = ((CreateViewAndElementRequest)request).getViewAndElementDescriptor().getCreateElementRequestAdapter();
+ // IElementType type = (IElementType)adapter.getAdapter(IElementType.class);
+ // if(type == CustomBlockDefinitionDiagramElementTypes.BLOCK_CONSTRAINT_CLN) {
+ // return getChildBySemanticHint(CustomBlockDefinitionDiagramElementTypes.BLOCK_CONSTRAINT_COMPARTMENT_HINT);
+ // }
+ // }
+ // return super.getTargetEditPart(request);
+ // }
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new FlowSpecificationFigure();
+ }
+
+ @Override
+ public FlowSpecificationFigure getPrimaryShape() {
+ return (FlowSpecificationFigure) primaryShape;
+ }
+
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(SysMLGraphicalTypes.LABEL_SYSML_FLOWSPECIFICATION_NAME_ID);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/FlowSpecificationLabelNameEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/FlowSpecificationLabelNameEditPart.java
new file mode 100755
index 0000000..bb44d90
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/FlowSpecificationLabelNameEditPart.java
@@ -0,0 +1,25 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.edit.part;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.NamedElementNodeLabelNameEditPart;
+
+public class FlowSpecificationLabelNameEditPart extends NamedElementNodeLabelNameEditPart {
+
+ /** Constructor */
+ public FlowSpecificationLabelNameEditPart(View view) {
+ super(view);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/ParameterCompartmentEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/ParameterCompartmentEditPart.java
new file mode 100755
index 0000000..853e3dd
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/ParameterCompartmentEditPart.java
@@ -0,0 +1,66 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.edit.part;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.figures.ResizableCompartmentFigure;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.ResizeableListCompartmentEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.common.edit.policy.ConstraintParameterCompartmentSemanticEditPolicy;
+
+public class ParameterCompartmentEditPart extends ResizeableListCompartmentEditPart {
+
+ public final static String COMPARTMENT_NAME = "parameters";
+
+ public ParameterCompartmentEditPart(View view) {
+ super(view);
+ }
+
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ConstraintParameterCompartmentSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
+ // Start of user code custom edit policies
+ // End of user code
+ }
+
+ @Override
+ public String getCompartmentName() {
+ return COMPARTMENT_NAME;
+ }
+
+ @Override
+ protected boolean hasModelChildrenChanged(Notification evt) {
+ return false;
+ }
+
+ @Override
+ public IFigure createFigure() {
+ ResizableCompartmentFigure result = (ResizableCompartmentFigure) super.createFigure();
+ result.setTitleVisibility(false);
+ return result;
+ }
+
+ @Override
+ protected void setRatio(Double ratio) {
+ if (getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/PartPropertyCompartmentEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/PartPropertyCompartmentEditPart.java
new file mode 100755
index 0000000..2c1112d
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/PartPropertyCompartmentEditPart.java
@@ -0,0 +1,66 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.edit.part;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.figures.ResizableCompartmentFigure;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.ResizeableListCompartmentEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.common.edit.policy.PartCompartmentSemanticEditPolicy;
+
+public class PartPropertyCompartmentEditPart extends ResizeableListCompartmentEditPart {
+
+ public final static String COMPARTMENT_NAME = "parts";
+
+ public PartPropertyCompartmentEditPart(View view) {
+ super(view);
+ }
+
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new PartCompartmentSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
+ // Start of user code custom edit policies
+ // End of user code
+ }
+
+ @Override
+ public String getCompartmentName() {
+ return COMPARTMENT_NAME;
+ }
+
+ @Override
+ protected boolean hasModelChildrenChanged(Notification evt) {
+ return false;
+ }
+
+ @Override
+ public IFigure createFigure() {
+ ResizableCompartmentFigure result = (ResizableCompartmentFigure) super.createFigure();
+ result.setTitleVisibility(false);
+ return result;
+ }
+
+ @Override
+ protected void setRatio(Double ratio) {
+ if (getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/ReferencePropertyCompartmentEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/ReferencePropertyCompartmentEditPart.java
new file mode 100755
index 0000000..736ceb8
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/ReferencePropertyCompartmentEditPart.java
@@ -0,0 +1,66 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.edit.part;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.figures.ResizableCompartmentFigure;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.ResizeableListCompartmentEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.common.edit.policy.ReferenceCompartmentSemanticEditPolicy;
+
+public class ReferencePropertyCompartmentEditPart extends ResizeableListCompartmentEditPart {
+
+ public final static String COMPARTMENT_NAME = "references";
+
+ public ReferencePropertyCompartmentEditPart(View view) {
+ super(view);
+ }
+
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ReferenceCompartmentSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
+ // Start of user code custom edit policies
+ // End of user code
+ }
+
+ @Override
+ public String getCompartmentName() {
+ return COMPARTMENT_NAME;
+ }
+
+ @Override
+ protected boolean hasModelChildrenChanged(Notification evt) {
+ return false;
+ }
+
+ @Override
+ public IFigure createFigure() {
+ ResizableCompartmentFigure result = (ResizableCompartmentFigure) super.createFigure();
+ result.setTitleVisibility(false);
+ return result;
+ }
+
+ @Override
+ protected void setRatio(Double ratio) {
+ if (getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/StructureCompartmentEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/StructureCompartmentEditPart.java
new file mode 100755
index 0000000..5bfd6a1
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/StructureCompartmentEditPart.java
@@ -0,0 +1,44 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.edit.part;
+
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.edit.policy.CustomDuplicatePasteEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.common.edit.policy.StructureCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.AbstractShapeCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
+
+public class StructureCompartmentEditPart extends AbstractShapeCompartmentEditPart {
+
+ public final static String COMPARTMENT_NAME = "structure";
+
+ public StructureCompartmentEditPart(View view) {
+ super(view);
+ }
+
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new StructureCompartmentSemanticEditPolicy());
+ // Start of user code custom edit policies
+ installEditPolicy(PasteEditPolicy.PASTE_ROLE, new CustomDuplicatePasteEditPolicy());
+ // End of user code
+ }
+
+ @Override
+ public String getCompartmentName() {
+ return COMPARTMENT_NAME;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/UnitEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/UnitEditPart.java
new file mode 100755
index 0000000..09c89bd
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/UnitEditPart.java
@@ -0,0 +1,123 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.edit.part;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.common.figure.UnitFigure;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.AbstractElementEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy;
+
+public class UnitEditPart extends AbstractElementEditPart {
+
+ public UnitEditPart(View view) {
+ super(view);
+ }
+
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ // Start of user code custom policies
+ // End of user code
+ }
+
+ @Override
+ protected LayoutEditPolicy createLayoutEditPolicy() {
+ org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ @Override
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof UnitLabelNameEditPart) {
+ ((UnitLabelNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof UnitLabelNameEditPart) {
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ return getContentPane();
+ }
+
+ // public EditPart getTargetEditPart(Request request) {
+ // if(request instanceof CreateViewAndElementRequest) {
+ // CreateElementRequestAdapter adapter = ((CreateViewAndElementRequest)request).getViewAndElementDescriptor().getCreateElementRequestAdapter();
+ // IElementType type = (IElementType)adapter.getAdapter(IElementType.class);
+ // if(type == CustomBlockDefinitionDiagramElementTypes.BLOCK_CONSTRAINT_CLN) {
+ // return getChildBySemanticHint(CustomBlockDefinitionDiagramElementTypes.BLOCK_CONSTRAINT_COMPARTMENT_HINT);
+ // }
+ // }
+ // return super.getTargetEditPart(request);
+ // }
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new UnitFigure();
+ }
+
+ @Override
+ public UnitFigure getPrimaryShape() {
+ return (UnitFigure) primaryShape;
+ }
+
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(SysMLGraphicalTypes.LABEL_SYSML_UNIT_NAME_ID);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/UnitLabelNameEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/UnitLabelNameEditPart.java
new file mode 100755
index 0000000..f160a76
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/UnitLabelNameEditPart.java
@@ -0,0 +1,25 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.edit.part;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.NamedElementNodeLabelNameEditPart;
+
+public class UnitLabelNameEditPart extends NamedElementNodeLabelNameEditPart {
+
+ /** Constructor */
+ public UnitLabelNameEditPart(View view) {
+ super(view);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/ValuePropertyCompartmentEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/ValuePropertyCompartmentEditPart.java
new file mode 100755
index 0000000..4c49454
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/ValuePropertyCompartmentEditPart.java
@@ -0,0 +1,66 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.edit.part;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.figures.ResizableCompartmentFigure;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.ResizeableListCompartmentEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.common.edit.policy.ValueCompartmentSemanticEditPolicy;
+
+public class ValuePropertyCompartmentEditPart extends ResizeableListCompartmentEditPart {
+
+ public final static String COMPARTMENT_NAME = "values";
+
+ public ValuePropertyCompartmentEditPart(View view) {
+ super(view);
+ }
+
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ValueCompartmentSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
+ // Start of user code custom edit policies
+ // End of user code
+ }
+
+ @Override
+ public String getCompartmentName() {
+ return COMPARTMENT_NAME;
+ }
+
+ @Override
+ protected boolean hasModelChildrenChanged(Notification evt) {
+ return false;
+ }
+
+ @Override
+ public IFigure createFigure() {
+ ResizableCompartmentFigure result = (ResizableCompartmentFigure) super.createFigure();
+ result.setTitleVisibility(false);
+ return result;
+ }
+
+ @Override
+ protected void setRatio(Double ratio) {
+ if (getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/ValueTypeEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/ValueTypeEditPart.java
new file mode 100755
index 0000000..b3e1b12
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/ValueTypeEditPart.java
@@ -0,0 +1,159 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.edit.part;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.common.figure.ValueTypeFigure;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.AbstractElementEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.OperationCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.PropertyCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
+
+public class ValueTypeEditPart extends AbstractElementEditPart {
+
+ public ValueTypeEditPart(View view) {
+ super(view);
+ }
+
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
+ installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
+ installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ // Start of user code custom policies
+ // End of user code
+ }
+
+ @Override
+ protected LayoutEditPolicy createLayoutEditPolicy() {
+ org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ @Override
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof ValueTypeLabelNameEditPart) {
+ ((ValueTypeLabelNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+ if (childEditPart instanceof PropertyCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getPropertyCompartmentFigure();
+ setupContentPane(pane);
+ pane.add(((PropertyCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof OperationCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getOperationCompartmentFigure();
+ setupContentPane(pane);
+ pane.add(((OperationCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof ValueTypeLabelNameEditPart) {
+ return true;
+ }
+ if (childEditPart instanceof PropertyCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getPropertyCompartmentFigure();
+ setupContentPane(pane);
+ pane.remove(((PropertyCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof OperationCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getOperationCompartmentFigure();
+ setupContentPane(pane);
+ pane.remove(((OperationCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ if (editPart instanceof PropertyCompartmentEditPart) {
+ return getPrimaryShape().getPropertyCompartmentFigure();
+ }
+ if (editPart instanceof OperationCompartmentEditPart) {
+ return getPrimaryShape().getOperationCompartmentFigure();
+ }
+ return getContentPane();
+ }
+
+ // public EditPart getTargetEditPart(Request request) {
+ // if(request instanceof CreateViewAndElementRequest) {
+ // CreateElementRequestAdapter adapter = ((CreateViewAndElementRequest)request).getViewAndElementDescriptor().getCreateElementRequestAdapter();
+ // IElementType type = (IElementType)adapter.getAdapter(IElementType.class);
+ // if(type == CustomBlockDefinitionDiagramElementTypes.BLOCK_CONSTRAINT_CLN) {
+ // return getChildBySemanticHint(CustomBlockDefinitionDiagramElementTypes.BLOCK_CONSTRAINT_COMPARTMENT_HINT);
+ // }
+ // }
+ // return super.getTargetEditPart(request);
+ // }
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new ValueTypeFigure();
+ }
+
+ @Override
+ public ValueTypeFigure getPrimaryShape() {
+ return (ValueTypeFigure) primaryShape;
+ }
+
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(SysMLGraphicalTypes.LABEL_SYSML_VALUETYPE_NAME_ID);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/ValueTypeLabelNameEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/ValueTypeLabelNameEditPart.java
new file mode 100755
index 0000000..b2fe15c
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/edit/part/ValueTypeLabelNameEditPart.java
@@ -0,0 +1,25 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.edit.part;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.NamedElementNodeLabelNameEditPart;
+
+public class ValueTypeLabelNameEditPart extends NamedElementNodeLabelNameEditPart {
+
+ /** Constructor */
+ public ValueTypeLabelNameEditPart(View view) {
+ super(view);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/factory/BlockClassifierViewFactory.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/factory/BlockClassifierViewFactory.java
new file mode 100755
index 0000000..3c4cb21
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/factory/BlockClassifierViewFactory.java
@@ -0,0 +1,58 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.factory;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.gmf.diagram.common.factory.ShapeViewFactory;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+
+public class BlockClassifierViewFactory extends ShapeViewFactory {
+
+ /**
+ * Creates Block view and add Label and Compartment nodes
+ */
+ @Override
+ protected void decorateView(View containerView, View view, IAdaptable element, String semanticHint, int index, boolean persisted) {
+ getViewService().createNode(element, view, SysMLGraphicalTypes.LABEL_SYSML_BLOCK_NAME_ID, ViewUtil.APPEND, persisted, getPreferencesHint());
+ getViewService().createNode(element, view, SysMLGraphicalTypes.COMPARTMENT_SYSML_PROPERTY_AS_LIST_ID, ViewUtil.APPEND, persisted, getPreferencesHint());
+ getViewService().createNode(element, view, SysMLGraphicalTypes.COMPARTMENT_SYSML_PART_AS_LIST_ID, ViewUtil.APPEND, persisted, getPreferencesHint());
+ getViewService().createNode(element, view, SysMLGraphicalTypes.COMPARTMENT_SYSML_REFERENCE_AS_LIST_ID, ViewUtil.APPEND, persisted, getPreferencesHint());
+ getViewService().createNode(element, view, UMLGraphicalTypes.COMPARTMENT_UML_PORT_AS_LIST_ID, ViewUtil.APPEND, persisted, getPreferencesHint());
+ getViewService().createNode(element, view, SysMLGraphicalTypes.COMPARTMENT_SYSML_FLOWPORT_AS_LIST_ID, ViewUtil.APPEND, persisted, getPreferencesHint());
+ getViewService().createNode(element, view, UMLGraphicalTypes.COMPARTMENT_UML_OPERATION_AS_LIST_ID, ViewUtil.APPEND, persisted, getPreferencesHint());
+ getViewService().createNode(element, view, SysMLGraphicalTypes.COMPARTMENT_SYSML_CONSTRAINT_AS_LIST_ID, ViewUtil.APPEND, persisted, getPreferencesHint());
+ getViewService().createNode(element, view, SysMLGraphicalTypes.COMPARTMENT_SYSML_VALUE_AS_LIST_ID, ViewUtil.APPEND, persisted, getPreferencesHint());
+ // this action needs to be done after the compartments creation
+ super.decorateView(containerView, view, element, semanticHint, index, persisted);
+ }
+
+ // Start of user code preferences
+ @Override
+ protected void initializeFromPreferences(View view) {
+ super.initializeFromPreferences(view);
+ org.eclipse.jface.preference.IPreferenceStore store = (org.eclipse.jface.preference.IPreferenceStore) getPreferencesHint().getPreferenceStore();
+ if (store == null) {
+ return;
+ }
+ // Get default size from preferences use set view size.
+ String preferenceConstantWitdh = org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper.getpreferenceKey(view, view.getType(), org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.WIDTH);
+ String preferenceConstantHeight = org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper.getpreferenceKey(view, view.getType(), org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.HEIGHT);
+ ViewUtil.setStructuralFeatureValue(view, org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getSize_Width(), store.getInt(preferenceConstantWitdh));
+ ViewUtil.setStructuralFeatureValue(view, org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getSize_Height(), store.getInt(preferenceConstantHeight));
+ }
+ // End of user code
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/factory/BlockCompositeClassifierViewFactory.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/factory/BlockCompositeClassifierViewFactory.java
new file mode 100755
index 0000000..f993010
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/factory/BlockCompositeClassifierViewFactory.java
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.factory;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.gmf.diagram.common.factory.ShapeViewFactory;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+
+public class BlockCompositeClassifierViewFactory extends ShapeViewFactory {
+
+ /**
+ * Creates BlockComposite view and add Label and Compartment nodes
+ */
+ @Override
+ protected void decorateView(View containerView, View view, IAdaptable element, String semanticHint, int index, boolean persisted) {
+ getViewService().createNode(element, view, SysMLGraphicalTypes.LABEL_SYSML_BLOCK_NAME_ID, ViewUtil.APPEND, persisted, getPreferencesHint());
+ getViewService().createNode(element, view, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID, ViewUtil.APPEND, persisted, getPreferencesHint());
+ // this action needs to be done after the compartments creation
+ super.decorateView(containerView, view, element, semanticHint, index, persisted);
+ }
+
+ // Start of user code preferences
+ @Override
+ protected void initializeFromPreferences(View view) {
+ super.initializeFromPreferences(view);
+ org.eclipse.jface.preference.IPreferenceStore store = (org.eclipse.jface.preference.IPreferenceStore) getPreferencesHint().getPreferenceStore();
+ if (store == null) {
+ return;
+ }
+ // Get default size from preferences use set view size.
+ String preferenceConstantWitdh = org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper.getpreferenceKey(view, view.getType(), org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.WIDTH);
+ String preferenceConstantHeight = org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper.getpreferenceKey(view, view.getType(), org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.HEIGHT);
+ ViewUtil.setStructuralFeatureValue(view, org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getSize_Width(), store.getInt(preferenceConstantWitdh));
+ ViewUtil.setStructuralFeatureValue(view, org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getSize_Height(), store.getInt(preferenceConstantHeight));
+ }
+ // End of user code
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/factory/BlockPropertyCompositeClassifierViewFactory.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/factory/BlockPropertyCompositeClassifierViewFactory.java
new file mode 100755
index 0000000..4fde8d2
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/factory/BlockPropertyCompositeClassifierViewFactory.java
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.factory;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.gmf.diagram.common.factory.ShapeViewFactory;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+
+public class BlockPropertyCompositeClassifierViewFactory extends ShapeViewFactory {
+
+ /**
+ * Creates BlockPropertyComposite view and add Label and Compartment nodes
+ */
+ @Override
+ protected void decorateView(View containerView, View view, IAdaptable element, String semanticHint, int index, boolean persisted) {
+ getViewService().createNode(element, view, UMLGraphicalTypes.LABEL_UML_PROPERTY_LABEL_ID, ViewUtil.APPEND, persisted, getPreferencesHint());
+ getViewService().createNode(element, view, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID, ViewUtil.APPEND, persisted, getPreferencesHint());
+ // this action needs to be done after the compartments creation
+ super.decorateView(containerView, view, element, semanticHint, index, persisted);
+ }
+
+ // Start of user code preferences
+ @Override
+ protected void initializeFromPreferences(View view) {
+ super.initializeFromPreferences(view);
+ org.eclipse.jface.preference.IPreferenceStore store = (org.eclipse.jface.preference.IPreferenceStore) getPreferencesHint().getPreferenceStore();
+ if (store == null) {
+ return;
+ }
+ // Get default size from preferences use set view size.
+ String preferenceConstantWitdh = org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper.getpreferenceKey(view, view.getType(), org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.WIDTH);
+ String preferenceConstantHeight = org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper.getpreferenceKey(view, view.getType(), org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.HEIGHT);
+ ViewUtil.setStructuralFeatureValue(view, org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getSize_Width(), store.getInt(preferenceConstantWitdh));
+ ViewUtil.setStructuralFeatureValue(view, org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getSize_Height(), store.getInt(preferenceConstantHeight));
+ }
+ // End of user code
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/factory/ConstraintBlockClassifierViewFactory.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/factory/ConstraintBlockClassifierViewFactory.java
new file mode 100755
index 0000000..2c722b9
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/factory/ConstraintBlockClassifierViewFactory.java
@@ -0,0 +1,37 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.factory;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.gmf.diagram.common.factory.ShapeViewFactory;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+
+public class ConstraintBlockClassifierViewFactory extends ShapeViewFactory {
+
+ /**
+ * Creates ConstraintBlock view and add Label and Compartment nodes
+ */
+ @Override
+ protected void decorateView(View containerView, View view, IAdaptable element, String semanticHint, int index, boolean persisted) {
+ getViewService().createNode(element, view, SysMLGraphicalTypes.LABEL_SYSML_CONSTRAINTBLOCK_NAME_ID, ViewUtil.APPEND, persisted, getPreferencesHint());
+ getViewService().createNode(element, view, SysMLGraphicalTypes.COMPARTMENT_SYSML_PARAMETER_AS_LIST_ID, ViewUtil.APPEND, persisted, getPreferencesHint());
+ getViewService().createNode(element, view, SysMLGraphicalTypes.COMPARTMENT_SYSML_CONSTRAINT_AS_LIST_ID, ViewUtil.APPEND, persisted, getPreferencesHint());
+ // this action needs to be done after the compartments creation
+ super.decorateView(containerView, view, element, semanticHint, index, persisted);
+ }
+ // Start of user code preferences
+ // End of user code
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/factory/ConstraintBlockPropertyCompositeClassifierViewFactory.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/factory/ConstraintBlockPropertyCompositeClassifierViewFactory.java
new file mode 100755
index 0000000..097b114
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/factory/ConstraintBlockPropertyCompositeClassifierViewFactory.java
@@ -0,0 +1,74 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.factory;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.services.ViewService;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.gmf.diagram.common.factory.ShapeViewFactory;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.sysml.constraints.ConstraintBlock;
+import org.eclipse.papyrus.sysml.constraints.ConstraintProperty;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.ConstraintBlockPropertyCompositeEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.Constraint;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Type;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+public class ConstraintBlockPropertyCompositeClassifierViewFactory extends ShapeViewFactory {
+
+ /**
+ * Creates ConstraintBlockPropertyComposite view and add Label and Compartment nodes
+ */
+ @Override
+ protected void decorateView(View containerView, View view, IAdaptable element, String semanticHint, int index, boolean persisted) {
+
+ getViewService().createNode(element, view, UMLGraphicalTypes.LABEL_UML_PROPERTY_LABEL_ID, ViewUtil.APPEND, persisted, getPreferencesHint());
+ if (ConstraintBlockPropertyCompositeEditPart.lastRepresentationIsSquareWithStructure()) {
+ getViewService().createNode(element, view, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID, ViewUtil.APPEND, persisted, getPreferencesHint());
+ }
+
+ if (element != null) {
+ EObject newElement = EMFHelper.getEObject(element);
+ if (newElement instanceof Property && UMLUtil.getStereotypeApplication((Property) newElement, ConstraintProperty.class) != null) {
+ Property constraintProperty = (Property) newElement;
+ ViewService.createNode(view, getConstraint(constraintProperty), UMLGraphicalTypes.SHAPE_UML_CONSTRAINT_AS_LABEL_ID, getPreferencesHint());
+ }
+ }
+
+ // this action needs to be done after the compartments creation
+ super.decorateView(containerView, view, element, semanticHint, index, persisted);
+ }
+
+ private Constraint getConstraint(Property constraintProperty) {
+ Type type = constraintProperty.getType();
+ if (type instanceof Class && UMLUtil.getStereotypeApplication(type, ConstraintBlock.class) != null) { // instanceof ensure type is not null
+ Class constraintBlock = (Class) type;
+ EList<Constraint> ownedRules = constraintBlock.getOwnedRules();
+ for (Constraint constraint : ownedRules) {
+ return constraint;
+ }
+ }
+ return null;
+ }
+
+ // Start of user code preferences
+ // End of user code
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/factory/DimensionClassifierViewFactory.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/factory/DimensionClassifierViewFactory.java
new file mode 100755
index 0000000..4c9538e
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/factory/DimensionClassifierViewFactory.java
@@ -0,0 +1,35 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.factory;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.gmf.diagram.common.factory.ShapeViewFactory;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+
+public class DimensionClassifierViewFactory extends ShapeViewFactory {
+
+ /**
+ * Creates Dimension view and add Label and Compartment nodes
+ */
+ @Override
+ protected void decorateView(View containerView, View view, IAdaptable element, String semanticHint, int index, boolean persisted) {
+ getViewService().createNode(element, view, SysMLGraphicalTypes.LABEL_SYSML_DIMENSION_NAME_ID, ViewUtil.APPEND, persisted, getPreferencesHint());
+ // this action needs to be done after the compartments creation
+ super.decorateView(containerView, view, element, semanticHint, index, persisted);
+ }
+ // Start of user code preferences
+ // End of user code
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/factory/FlowPortAffixedNodeViewFactory.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/factory/FlowPortAffixedNodeViewFactory.java
new file mode 100755
index 0000000..fa93389
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/factory/FlowPortAffixedNodeViewFactory.java
@@ -0,0 +1,35 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.factory;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.gmf.diagram.common.factory.ShapeViewFactory;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+
+public class FlowPortAffixedNodeViewFactory extends ShapeViewFactory {
+
+ /**
+ * Creates FlowPort view and add Label and Compartment nodes
+ */
+ @Override
+ protected void decorateView(View containerView, View view, IAdaptable element, String semanticHint, int index, boolean persisted) {
+ getViewService().createNode(element, view, SysMLGraphicalTypes.AFFIXEDLABEL_SYSML_FLOWPORT_LABEL_ID, ViewUtil.APPEND, persisted, getPreferencesHint());
+ getViewService().createNode(element, view, UMLGraphicalTypes.AFFIXEDLABEL_UML_APPLIEDSTEREOTYPE_ID, ViewUtil.APPEND, persisted, getPreferencesHint());
+ // this action needs to be done after the compartments creation
+ super.decorateView(containerView, view, element, semanticHint, index, persisted);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/factory/FlowSpecificationClassifierViewFactory.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/factory/FlowSpecificationClassifierViewFactory.java
new file mode 100755
index 0000000..f94d5a1
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/factory/FlowSpecificationClassifierViewFactory.java
@@ -0,0 +1,36 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.factory;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.gmf.diagram.common.factory.ShapeViewFactory;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+
+public class FlowSpecificationClassifierViewFactory extends ShapeViewFactory {
+
+ /**
+ * Creates FlowSpecification view and add Label and Compartment nodes
+ */
+ @Override
+ protected void decorateView(View containerView, View view, IAdaptable element, String semanticHint, int index, boolean persisted) {
+ getViewService().createNode(element, view, SysMLGraphicalTypes.LABEL_SYSML_FLOWSPECIFICATION_NAME_ID, ViewUtil.APPEND, persisted, getPreferencesHint());
+ getViewService().createNode(element, view, SysMLGraphicalTypes.COMPARTMENT_SYSML_FLOWPROPERTY_AS_LIST_ID, ViewUtil.APPEND, persisted, getPreferencesHint());
+ // this action needs to be done after the compartments creation
+ super.decorateView(containerView, view, element, semanticHint, index, persisted);
+ }
+ // Start of user code preferences
+ // End of user code
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/factory/NestedBlockPropertyCompositeClassifierViewFactory.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/factory/NestedBlockPropertyCompositeClassifierViewFactory.java
new file mode 100755
index 0000000..fc99030
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/factory/NestedBlockPropertyCompositeClassifierViewFactory.java
@@ -0,0 +1,35 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.factory;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.gmf.diagram.common.factory.ShapeViewFactory;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+
+public class NestedBlockPropertyCompositeClassifierViewFactory extends ShapeViewFactory {
+
+ /**
+ * Creates NestedBlockPropertyComposite view and add Label and Compartment nodes
+ */
+ @Override
+ protected void decorateView(View containerView, View view, IAdaptable element, String semanticHint, int index, boolean persisted) {
+ getViewService().createNode(element, view, UMLGraphicalTypes.LABEL_UML_PROPERTY_LABEL_ID, ViewUtil.APPEND, persisted, getPreferencesHint());
+ // this action needs to be done after the compartments creation
+ super.decorateView(containerView, view, element, semanticHint, index, persisted);
+ }
+ // Start of user code preferences
+ // End of user code
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/factory/UnitClassifierViewFactory.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/factory/UnitClassifierViewFactory.java
new file mode 100755
index 0000000..7413b11
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/factory/UnitClassifierViewFactory.java
@@ -0,0 +1,35 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.factory;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.gmf.diagram.common.factory.ShapeViewFactory;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+
+public class UnitClassifierViewFactory extends ShapeViewFactory {
+
+ /**
+ * Creates Unit view and add Label and Compartment nodes
+ */
+ @Override
+ protected void decorateView(View containerView, View view, IAdaptable element, String semanticHint, int index, boolean persisted) {
+ getViewService().createNode(element, view, SysMLGraphicalTypes.LABEL_SYSML_UNIT_NAME_ID, ViewUtil.APPEND, persisted, getPreferencesHint());
+ // this action needs to be done after the compartments creation
+ super.decorateView(containerView, view, element, semanticHint, index, persisted);
+ }
+ // Start of user code preferences
+ // End of user code
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/factory/ValueTypeClassifierViewFactory.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/factory/ValueTypeClassifierViewFactory.java
new file mode 100755
index 0000000..15d2b60
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/factory/ValueTypeClassifierViewFactory.java
@@ -0,0 +1,38 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.factory;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.gmf.diagram.common.factory.ShapeViewFactory;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+
+public class ValueTypeClassifierViewFactory extends ShapeViewFactory {
+
+ /**
+ * Creates ValueType view and add Label and Compartment nodes
+ */
+ @Override
+ protected void decorateView(View containerView, View view, IAdaptable element, String semanticHint, int index, boolean persisted) {
+ getViewService().createNode(element, view, SysMLGraphicalTypes.LABEL_SYSML_VALUETYPE_NAME_ID, ViewUtil.APPEND, persisted, getPreferencesHint());
+ getViewService().createNode(element, view, UMLGraphicalTypes.COMPARTMENT_UML_PROPERTY_AS_LIST_ID, ViewUtil.APPEND, persisted, getPreferencesHint());
+ getViewService().createNode(element, view, UMLGraphicalTypes.COMPARTMENT_UML_OPERATION_AS_LIST_ID, ViewUtil.APPEND, persisted, getPreferencesHint());
+ // this action needs to be done after the compartments creation
+ super.decorateView(containerView, view, element, semanticHint, index, persisted);
+ }
+ // Start of user code preferences
+ // End of user code
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/figure/BlockCompositeFigure.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/figure/BlockCompositeFigure.java
new file mode 100755
index 0000000..878ae76
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/figure/BlockCompositeFigure.java
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.figure;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.StructureCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ClassifierFigure;
+
+public class BlockCompositeFigure extends ClassifierFigure {
+
+ public BlockCompositeFigure() {
+ super(); //$NON-NLS-1$
+ }
+
+ @Override
+ protected void createContentPane(List<String> compartments) {
+ super.createContentPane(getUpdatedListOfCompartments(compartments));
+ }
+
+ /**
+ * Get the list of compartments, updated with specific ones
+ *
+ * @param compartments
+ * the original list of compartments (untouched)
+ * @return the new completed list of compartments
+ */
+ private List<String> getUpdatedListOfCompartments(List<String> compartments) {
+ compartments = new ArrayList<String>(compartments);
+ compartments.add(StructureCompartmentEditPart.COMPARTMENT_NAME);
+ return compartments;
+ }
+
+ public IFigure getStructureCompartmentFigure() {
+ return getCompartment(StructureCompartmentEditPart.COMPARTMENT_NAME);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/figure/BlockFigure.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/figure/BlockFigure.java
new file mode 100755
index 0000000..601395e
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/figure/BlockFigure.java
@@ -0,0 +1,93 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.figure;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.BlockConstraintCompartmentEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.BlockPropertyCompartmentEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.FlowPortCompartmentEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.PartPropertyCompartmentEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.ReferencePropertyCompartmentEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.ValuePropertyCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.OperationCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.PortCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ClassifierFigure;
+
+public class BlockFigure extends ClassifierFigure {
+
+ public BlockFigure() {
+ super(); //$NON-NLS-1$
+ }
+
+ @Override
+ protected void createContentPane(List<String> compartments) {
+ super.createContentPane(getUpdatedListOfCompartments(compartments));
+ }
+
+ /**
+ * Get the list of compartments, updated with specific ones
+ *
+ * @param compartments
+ * the original list of compartments (untouched)
+ * @return the new completed list of compartments
+ */
+ private List<String> getUpdatedListOfCompartments(List<String> compartments) {
+ compartments = new ArrayList<String>(compartments);
+ compartments.add(BlockPropertyCompartmentEditPart.COMPARTMENT_NAME);
+ compartments.add(PartPropertyCompartmentEditPart.COMPARTMENT_NAME);
+ compartments.add(ReferencePropertyCompartmentEditPart.COMPARTMENT_NAME);
+ compartments.add(PortCompartmentEditPart.COMPARTMENT_NAME);
+ compartments.add(FlowPortCompartmentEditPart.COMPARTMENT_NAME);
+ compartments.add(OperationCompartmentEditPart.COMPARTMENT_NAME);
+ compartments.add(BlockConstraintCompartmentEditPart.COMPARTMENT_NAME);
+ compartments.add(ValuePropertyCompartmentEditPart.COMPARTMENT_NAME);
+ return compartments;
+ }
+
+ public IFigure getBlockPropertyCompartmentFigure() {
+ return getCompartment(BlockPropertyCompartmentEditPart.COMPARTMENT_NAME);
+ }
+
+ public IFigure getPartPropertyCompartmentFigure() {
+ return getCompartment(PartPropertyCompartmentEditPart.COMPARTMENT_NAME);
+ }
+
+ public IFigure getReferencePropertyCompartmentFigure() {
+ return getCompartment(ReferencePropertyCompartmentEditPart.COMPARTMENT_NAME);
+ }
+
+ public IFigure getPortCompartmentFigure() {
+ return getCompartment(PortCompartmentEditPart.COMPARTMENT_NAME);
+ }
+
+ public IFigure getFlowPortCompartmentFigure() {
+ return getCompartment(FlowPortCompartmentEditPart.COMPARTMENT_NAME);
+ }
+
+ @Override
+ public IFigure getOperationCompartmentFigure() {
+ return getCompartment(OperationCompartmentEditPart.COMPARTMENT_NAME);
+ }
+
+ public IFigure getBlockConstraintCompartmentFigure() {
+ return getCompartment(BlockConstraintCompartmentEditPart.COMPARTMENT_NAME);
+ }
+
+ public IFigure getValuePropertyCompartmentFigure() {
+ return getCompartment(ValuePropertyCompartmentEditPart.COMPARTMENT_NAME);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/figure/BlockPropertyCompositeFigure.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/figure/BlockPropertyCompositeFigure.java
new file mode 100755
index 0000000..0122caf
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/figure/BlockPropertyCompositeFigure.java
@@ -0,0 +1,54 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.figure;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.BlockPropertyStructureCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ClassifierFigure;
+
+public class BlockPropertyCompositeFigure extends ClassifierFigure {
+
+ public BlockPropertyCompositeFigure() {
+ super("undefined"); //$NON-NLS-1$
+ }
+
+ @Override
+ protected void createContentPane(List<String> compartments) {
+ super.createContentPane(getUpdatedListOfCompartments(compartments));
+ }
+
+ /**
+ * Get the list of compartments, updated with specific ones
+ *
+ * @param compartments
+ * the original list of compartments (untouched)
+ * @return the new completed list of compartments
+ */
+ private List<String> getUpdatedListOfCompartments(List<String> compartments) {
+ compartments = new ArrayList<String>(compartments);
+ compartments.add(BlockPropertyStructureCompartmentEditPart.COMPARTMENT_NAME);
+ return compartments;
+ }
+
+ public IFigure getBlockPropertyStructureCompartmentFigure() {
+ return getCompartment(BlockPropertyStructureCompartmentEditPart.COMPARTMENT_NAME);
+ }
+
+ public void setFigureTag(String newTag) {
+ getTaggedLabel().setText(String.valueOf("\u00AB") + newTag + String.valueOf("\u00BB"));
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/figure/ConstraintBlockFigure.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/figure/ConstraintBlockFigure.java
new file mode 100755
index 0000000..4fbda10
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/figure/ConstraintBlockFigure.java
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.figure;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.BlockConstraintCompartmentEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.ParameterCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ClassifierFigure;
+
+public class ConstraintBlockFigure extends ClassifierFigure {
+
+ public ConstraintBlockFigure() {
+ super("constraint"); //$NON-NLS-1$
+ }
+
+ @Override
+ protected void createContentPane(List<String> compartments) {
+ super.createContentPane(getUpdatedListOfCompartments(compartments));
+ }
+
+ /**
+ * Get the list of compartments, updated with specific ones
+ *
+ * @param compartments
+ * the original list of compartments (untouched)
+ * @return the new completed list of compartments
+ */
+ private List<String> getUpdatedListOfCompartments(List<String> compartments) {
+ compartments = new ArrayList<String>(compartments);
+ compartments.add(ParameterCompartmentEditPart.COMPARTMENT_NAME);
+ compartments.add(BlockConstraintCompartmentEditPart.COMPARTMENT_NAME);
+ return compartments;
+ }
+
+ public IFigure getParameterCompartmentFigure() {
+ return getCompartment(ParameterCompartmentEditPart.COMPARTMENT_NAME);
+ }
+
+ public IFigure getBlockConstraintCompartmentFigure() {
+ return getCompartment(BlockConstraintCompartmentEditPart.COMPARTMENT_NAME);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/figure/ConstraintBlockPropertyCompositeFigure.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/figure/ConstraintBlockPropertyCompositeFigure.java
new file mode 100755
index 0000000..6a941aa
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/figure/ConstraintBlockPropertyCompositeFigure.java
@@ -0,0 +1,278 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.figure;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.draw2d.text.FlowPage;
+import org.eclipse.gmf.runtime.diagram.ui.figures.ShapeCompartmentFigure;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.ConstraintBlockPropertyCompositeEditPart;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusRoundedNodeFigure;
+
+public class ConstraintBlockPropertyCompositeFigure extends PapyrusRoundedNodeFigure {
+
+ protected WrappingLabel constraintLabel;
+ protected WrappingLabel tagLabel;
+
+ private static final String tagConstraintText = String.valueOf("\u00AB") + "constraint" + String.valueOf("\u00BB");
+
+ /** main flow page */
+ protected FlowPage page;
+
+ public ConstraintBlockPropertyCompositeFigure() {
+ this(ConstraintBlockPropertyCompositeEditPart.ROUNDED_REPRESENTATION);
+ }
+
+ public ConstraintBlockPropertyCompositeFigure(String representationMode) {
+ super();
+
+ ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout() {
+
+ @Override
+ /**
+ * Always strech figure for StructureCompartment
+ * @see org.eclipse.draw2d.LayoutManager#layout(IFigure)
+ */
+ public void layout(IFigure parent) {
+ if (!parent.isVisible()) {
+ return;
+ }
+ List<?> children = getChildren(parent);
+ int numChildren = children.size();
+ Rectangle clientArea = transposer.t(parent.getClientArea());
+ int x = clientArea.x;
+ int y = clientArea.y;
+ int availableHeight = clientArea.height;
+
+ Dimension prefSizes[] = new Dimension[numChildren];
+ Dimension minSizes[] = new Dimension[numChildren];
+ Dimension maxSizes[] = new Dimension[numChildren];
+
+ // Calculate the width and height hints. If it's a vertical ToolBarLayout,
+ // then ignore the height hint (set it to -1); otherwise, ignore the
+ // width hint. These hints will be passed to the children of the parent
+ // figure when getting their preferred size.
+ int wHint = -1;
+ int hHint = -1;
+ if (isHorizontal()) {
+ hHint = parent.getClientArea(Rectangle.SINGLETON).height;
+ } else {
+ wHint = parent.getClientArea(Rectangle.SINGLETON).width;
+ }
+
+ /*
+ * Calculate sum of preferred heights of all children(totalHeight).
+ * Calculate sum of minimum heights of all children(minHeight).
+ * Cache Preferred Sizes and Minimum Sizes of all children.
+ *
+ * totalHeight is the sum of the preferred heights of all children
+ * totalMinHeight is the sum of the minimum heights of all children
+ * prefMinSumHeight is the sum of the difference between all children's
+ * preferred heights and minimum heights. (This is used as a ratio to
+ * calculate how much each child will shrink).
+ */
+ IFigure child;
+ int totalHeight = 0;
+ int totalMinHeight = 0;
+ double totalMaxHeight = 0;
+ int prefMinSumHeight = 0;
+ double prefMaxSumHeight = 0;
+
+ for (int i = 0; i < numChildren; i++) {
+ child = (IFigure) children.get(i);
+
+ prefSizes[i] = transposer.t(child.getPreferredSize(wHint, hHint));
+ minSizes[i] = transposer.t(child.getMinimumSize(wHint, hHint));
+ maxSizes[i] = transposer.t(child.getMaximumSize());
+
+ if (getConstraint(child) != null) {
+ double ratio = ((Double) getConstraint(child)).doubleValue();
+ int prefHeight = (int) (ratio * availableHeight);
+ prefHeight = Math.max(prefHeight, minSizes[i].height);
+ prefHeight = Math.min(prefHeight, maxSizes[i].height);
+ prefSizes[i].height = prefHeight;
+ }
+
+ totalHeight += prefSizes[i].height;
+ totalMinHeight += minSizes[i].height;
+ totalMaxHeight += maxSizes[i].height;
+ }
+ totalHeight += (numChildren - 1) * getSpacing();
+ totalMinHeight += (numChildren - 1) * getSpacing();
+ totalMaxHeight += (numChildren - 1) * getSpacing();
+ prefMinSumHeight = totalHeight - totalMinHeight;
+ prefMaxSumHeight = totalMaxHeight - totalHeight;
+
+ /*
+ * The total amount that the children must be shrunk is the
+ * sum of the preferred Heights of the children minus
+ * Max(the available area and the sum of the minimum heights of the children).
+ *
+ * amntShrinkHeight is the combined amount that the children must shrink
+ * amntShrinkCurrentHeight is the amount each child will shrink respectively
+ */
+ int amntShrinkHeight =
+ totalHeight - Math.max(availableHeight, totalMinHeight);
+
+ for (int i = 0; i < numChildren; i++) {
+ int amntShrinkCurrentHeight = 0;
+ int prefHeight = prefSizes[i].height;
+ int minHeight = minSizes[i].height;
+ int maxHeight = maxSizes[i].height;
+ int prefWidth = prefSizes[i].width;
+ int minWidth = minSizes[i].width;
+ int maxWidth = maxSizes[i].width;
+ Rectangle newBounds = new Rectangle(x, y, prefWidth, prefHeight);
+
+ child = (IFigure) children.get(i);
+ if (getStretchMajorAxis() || child instanceof ShapeCompartmentFigure) {
+ if (amntShrinkHeight > 0 && prefMinSumHeight != 0) {
+ amntShrinkCurrentHeight = (int) ((long) (prefHeight - minHeight)
+ * amntShrinkHeight / (prefMinSumHeight));
+ } else if (amntShrinkHeight < 0 && totalHeight != 0) {
+ amntShrinkCurrentHeight =
+ (int) (((maxHeight - prefHeight) / prefMaxSumHeight)
+ * amntShrinkHeight);
+ }
+ }
+
+ int width = Math.min(prefWidth, maxWidth);
+ if (isStretchMinorAxis()) {
+ width = maxWidth;
+ }
+ width = Math.max(minWidth, Math.min(clientArea.width, width));
+ newBounds.width = width;
+
+ int adjust = clientArea.width - width;
+ switch (getMinorAlignment()) {
+ case ALIGN_TOPLEFT:
+ adjust = 0;
+ break;
+ case ALIGN_CENTER:
+ adjust /= 2;
+ break;
+ case ALIGN_BOTTOMRIGHT:
+ break;
+ }
+ newBounds.x += adjust;
+ if (newBounds.height - amntShrinkCurrentHeight > maxHeight) {
+ amntShrinkCurrentHeight = newBounds.height - maxHeight;
+ }
+ newBounds.height -= amntShrinkCurrentHeight;
+ child.setBounds(transposer.t(newBounds));
+
+ amntShrinkHeight -= amntShrinkCurrentHeight;
+ prefMinSumHeight -= (prefHeight - minHeight);
+ prefMaxSumHeight -= (maxHeight - prefHeight);
+ totalHeight -= prefHeight;
+ y += newBounds.height + getSpacing();
+ }
+ }
+
+ /**
+ * Gets the list of children after applying the layout options of
+ * ignore invisible children & reverse children
+ */
+ private List<?> getChildren(IFigure container) {
+ @SuppressWarnings({ "rawtypes", "unchecked" })
+ List<?> children = new ArrayList(container.getChildren());
+ if (getIgnoreInvisibleChildren()) {
+ Iterator<?> iter = children.iterator();
+ while (iter.hasNext()) {
+ IFigure f = (IFigure) iter.next();
+ if (!f.isVisible()) {
+ iter.remove();
+ }
+ }
+ }
+ if (isReversed()) {
+ Collections.reverse(children);
+ }
+ return children;
+ }
+
+ };
+
+ layout.setStretchMajorAxis(false);
+ setLayoutManager(layout);
+
+ tagLabel = new WrappingLabel();
+ tagLabel.setAlignment(PositionConstants.MIDDLE);
+ add(tagLabel);
+
+ if (ConstraintBlockPropertyCompositeEditPart.ROUNDED_REPRESENTATION.equals(representationMode)) {
+ corner = 50;
+ }
+ else {
+ corner = 0;
+ tagLabel.setText(tagConstraintText);
+ }
+
+ add(nameLabel);
+
+ constraintLabel = new WrappingLabel();
+ constraintLabel.setAlignment(PositionConstants.RIGHT);
+ add(constraintLabel);
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.uml.diagram.common.figure.node.IPapyrusNodeNamedElementFigure#getNameLabel()
+ *
+ * @return
+ */
+ @Override
+ public WrappingLabel getNameLabel() {
+ return nameLabel;
+ }
+
+ /**
+ *
+ * @return the textflow of the constraint that contain the string of the
+ * specification
+ */
+ public WrappingLabel getConstraintLabel() {
+ return constraintLabel;
+ }
+
+ public int getCorner() {
+ return corner;
+ }
+
+ public void setCorner(int newCorner) {
+ this.corner = newCorner;
+ }
+
+ public WrappingLabel getTagLabel() {
+ return tagLabel;
+ }
+
+ public void setTagLabel(String newTag) {
+ this.tagLabel.setText(newTag);
+ }
+
+ public static boolean isCompleteRepresentation() {
+ return false;
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/figure/DimensionFigure.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/figure/DimensionFigure.java
new file mode 100755
index 0000000..c154cd8
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/figure/DimensionFigure.java
@@ -0,0 +1,43 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.figure;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ClassifierFigure;
+
+public class DimensionFigure extends ClassifierFigure {
+
+ public DimensionFigure() {
+ super(); //$NON-NLS-1$
+ }
+
+ @Override
+ protected void createContentPane(List<String> compartments) {
+ super.createContentPane(getUpdatedListOfCompartments(compartments));
+ }
+
+ /**
+ * Get the list of compartments, updated with specific ones
+ *
+ * @param compartments
+ * the original list of compartments (untouched)
+ * @return the new completed list of compartments
+ */
+ private List<String> getUpdatedListOfCompartments(List<String> compartments) {
+ compartments = new ArrayList<String>(compartments);
+ return compartments;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/figure/FlowSpecificationFigure.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/figure/FlowSpecificationFigure.java
new file mode 100755
index 0000000..f05f3cd
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/figure/FlowSpecificationFigure.java
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.figure;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.FlowPropertyCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ClassifierFigure;
+
+public class FlowSpecificationFigure extends ClassifierFigure {
+
+ public FlowSpecificationFigure() {
+ super("flowSpecification"); //$NON-NLS-1$
+ }
+
+ @Override
+ protected void createContentPane(List<String> compartments) {
+ super.createContentPane(getUpdatedListOfCompartments(compartments));
+ }
+
+ /**
+ * Get the list of compartments, updated with specific ones
+ *
+ * @param compartments
+ * the original list of compartments (untouched)
+ * @return the new completed list of compartments
+ */
+ private List<String> getUpdatedListOfCompartments(List<String> compartments) {
+ compartments = new ArrayList<String>(compartments);
+ compartments.add(FlowPropertyCompartmentEditPart.COMPARTMENT_NAME);
+ return compartments;
+ }
+
+ public IFigure getFlowPropertyCompartmentFigure() {
+ return getCompartment(FlowPropertyCompartmentEditPart.COMPARTMENT_NAME);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/figure/NestedBlockPropertyCompositeFigure.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/figure/NestedBlockPropertyCompositeFigure.java
new file mode 100755
index 0000000..638d178
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/figure/NestedBlockPropertyCompositeFigure.java
@@ -0,0 +1,47 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.figure;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ClassifierFigure;
+
+public class NestedBlockPropertyCompositeFigure extends ClassifierFigure {
+
+ public NestedBlockPropertyCompositeFigure() {
+ super("undefined"); //$NON-NLS-1$
+ }
+
+ @Override
+ protected void createContentPane(List<String> compartments) {
+ super.createContentPane(getUpdatedListOfCompartments(compartments));
+ }
+
+ /**
+ * Get the list of compartments, updated with specific ones
+ *
+ * @param compartments
+ * the original list of compartments (untouched)
+ * @return the new completed list of compartments
+ */
+ private List<String> getUpdatedListOfCompartments(List<String> compartments) {
+ compartments = new ArrayList<String>(compartments);
+ return compartments;
+ }
+
+ public void setFigureTag(String newTag) {
+ getTaggedLabel().setText(String.valueOf("\u00AB") + newTag + String.valueOf("\u00BB"));
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/figure/SysMLDiagramFrameFigure.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/figure/SysMLDiagramFrameFigure.java
new file mode 100755
index 0000000..ad42f9d
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/figure/SysMLDiagramFrameFigure.java
@@ -0,0 +1,176 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.figure;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.MarginBorder;
+import org.eclipse.draw2d.OrderedLayout;
+import org.eclipse.draw2d.RectangleFigure;
+import org.eclipse.draw2d.ToolbarLayout;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gmf.runtime.diagram.ui.figures.ShapeCompartmentFigure;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.papyrus.uml.diagram.common.draw2d.InteractionFigure;
+import org.eclipse.papyrus.uml.diagram.common.draw2d.LeftToolbarLayout;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.AutomaticCompartmentLayoutManager;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.NodeNamedElementFigure;
+
+public class SysMLDiagramFrameFigure extends NodeNamedElementFigure {
+
+ private WrappingLabel stereotypeLabel;
+
+ private WrappingLabel frameLabel;
+
+ private RectangleFigure frameLabelContainerFigure;
+
+ private InteractionFigure interactionFigure;
+
+ private int structureOffset;
+
+ public SysMLDiagramFrameFigure() {
+ super();
+ createContents();
+ }
+
+ protected void createContents() {
+ add(createFigureHeader());
+ setLayoutManager(new SysMLLayoutLayoutManager());
+ }
+
+ protected RectangleFigure createFigureHeader() {
+
+ if (this.stereotypeLabel == null) {
+ this.stereotypeLabel = new WrappingLabel() {
+
+ @Override
+ public Dimension getPreferredSize(final int wHint, final int hHint) {
+ final Dimension preferredSize = super.getPreferredSize(wHint, hHint);
+ if (preferredSize.width == 0) {
+ return preferredSize;
+ }
+ return new Dimension(preferredSize.width + 2, preferredSize.height);
+ }
+ };
+ }
+
+ stereotypeLabel.setAlignment(OrderedLayout.ALIGN_CENTER);
+ if (this.frameLabel == null) {
+ this.frameLabel = new WrappingLabel() {
+
+ @Override
+ public Dimension getPreferredSize(final int wHint, final int hHint) {
+ final Dimension preferredSize = super.getPreferredSize(wHint, hHint);
+ if (preferredSize.width == 0) {
+ return preferredSize;
+ }
+ return new Dimension(preferredSize.width + 9, preferredSize.height);
+ }
+ };
+ }
+
+ interactionFigure = new InteractionFigure();
+ interactionFigure.setBorder(new MarginBorder(3, 3, 6, 3));
+ interactionFigure.setLayoutManager(new LeftToolbarLayout());
+ interactionFigure.add(frameLabel);
+
+ frameLabelContainerFigure = new RectangleFigure();
+ frameLabelContainerFigure.setOutline(false);
+ frameLabelContainerFigure.setFill(false);
+ frameLabelContainerFigure.setLayoutManager(new ToolbarLayout(false));
+ frameLabelContainerFigure.add(interactionFigure, OrderedLayout.ALIGN_CENTER);
+ return frameLabelContainerFigure;
+ }
+
+ @Override
+ public WrappingLabel getNameLabel() {
+ if (frameLabel == null) {
+ createFigureHeader();
+ }
+ return frameLabel;
+ }
+
+ public RectangleFigure getLabelContainer() {
+ return frameLabelContainerFigure;
+ }
+
+ /**
+ * this is the layout manager in charge to place element in the enumeration
+ *
+ */
+ private class SysMLLayoutLayoutManager extends AutomaticCompartmentLayoutManager {
+
+ /**
+ *
+ * {@inheritDoc}
+ */
+ @Override
+ public void layout(final IFigure container) {
+ List<IFigure> figuresToRemove = new ArrayList<IFigure>();
+ for (int i = 0; i < container.getChildren().size(); i++) {
+ IFigure currentCompartment = (IFigure) container.getChildren().get(i);
+ // this is a visible compartment
+ if (currentCompartment instanceof ShapeCompartmentFigure) {
+ Rectangle bound = new Rectangle(currentCompartment.getBounds());
+ currentCompartment.invalidate();
+ Dimension pref = currentCompartment.getPreferredSize();
+ currentCompartment.invalidate();
+ Dimension prefConstraint = currentCompartment.getPreferredSize(container.getBounds().width - 40, -1);
+ if (pref.width < prefConstraint.width) {
+ bound.setSize(pref);
+ } else {
+ bound.setSize(prefConstraint);
+ }
+ bound.x = container.getBounds().x + 10;
+ bound.y = container.getBounds().y + structureOffset;
+ bound.width = container.getBounds().width - 20;
+ bound.height = container.getBounds().height - structureOffset - 10;
+ currentCompartment.setBounds(bound);
+ } else if (currentCompartment == frameLabelContainerFigure) {
+ Rectangle boundLabel = new Rectangle(frameLabelContainerFigure.getBounds());
+ Dimension frameLabelDimension = frameLabelContainerFigure.getPreferredSize();
+ boundLabel.setSize(frameLabelDimension);
+ frameLabelContainerFigure.setBounds(boundLabel);
+ } else {
+ // remove other figure
+ figuresToRemove.add(currentCompartment);
+ }
+ }
+ for (IFigure iFigure : figuresToRemove) {
+ container.getChildren().remove(iFigure);
+ }
+ }
+ }
+
+ public void setStereotypeLabel(String stereotypeText) {
+ interactionFigure.remove(frameLabel);
+ if (interactionFigure.getChildren().contains(stereotypeLabel)) {
+ interactionFigure.remove(stereotypeLabel);
+ }
+ if (stereotypeText != null && !stereotypeText.isEmpty()) {
+ stereotypeLabel.setText(String.valueOf("\u00AB") + stereotypeText + String.valueOf("\u00BB"));
+ interactionFigure.add(stereotypeLabel);
+ structureOffset = 41;
+ }
+ else {
+ // no stereotype
+ structureOffset = 26;
+ }
+ interactionFigure.add(frameLabel);
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/figure/UnitFigure.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/figure/UnitFigure.java
new file mode 100755
index 0000000..21d1c25
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/figure/UnitFigure.java
@@ -0,0 +1,43 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.figure;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ClassifierFigure;
+
+public class UnitFigure extends ClassifierFigure {
+
+ public UnitFigure() {
+ super(); //$NON-NLS-1$
+ }
+
+ @Override
+ protected void createContentPane(List<String> compartments) {
+ super.createContentPane(getUpdatedListOfCompartments(compartments));
+ }
+
+ /**
+ * Get the list of compartments, updated with specific ones
+ *
+ * @param compartments
+ * the original list of compartments (untouched)
+ * @return the new completed list of compartments
+ */
+ private List<String> getUpdatedListOfCompartments(List<String> compartments) {
+ compartments = new ArrayList<String>(compartments);
+ return compartments;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/figure/ValueTypeFigure.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/figure/ValueTypeFigure.java
new file mode 100755
index 0000000..0536e5f
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/figure/ValueTypeFigure.java
@@ -0,0 +1,57 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.figure;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.OperationCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.PropertyCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ClassifierFigure;
+
+public class ValueTypeFigure extends ClassifierFigure {
+
+ public ValueTypeFigure() {
+ super(); //$NON-NLS-1$
+ }
+
+ @Override
+ protected void createContentPane(List<String> compartments) {
+ super.createContentPane(getUpdatedListOfCompartments(compartments));
+ }
+
+ /**
+ * Get the list of compartments, updated with specific ones
+ *
+ * @param compartments
+ * the original list of compartments (untouched)
+ * @return the new completed list of compartments
+ */
+ private List<String> getUpdatedListOfCompartments(List<String> compartments) {
+ compartments = new ArrayList<String>(compartments);
+ compartments.add(PropertyCompartmentEditPart.COMPARTMENT_NAME);
+ compartments.add(OperationCompartmentEditPart.COMPARTMENT_NAME);
+ return compartments;
+ }
+
+ public IFigure getPropertyCompartmentFigure() {
+ return getCompartment(PropertyCompartmentEditPart.COMPARTMENT_NAME);
+ }
+
+ @Override
+ public IFigure getOperationCompartmentFigure() {
+ return getCompartment(OperationCompartmentEditPart.COMPARTMENT_NAME);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/utils/SysMLGraphicalTypes.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/utils/SysMLGraphicalTypes.java
new file mode 100755
index 0000000..572c2de
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/sysml/diagram/common/utils/SysMLGraphicalTypes.java
@@ -0,0 +1,105 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.utils;
+
+public class SysMLGraphicalTypes {
+
+ /** ********************************************************* */
+ /** Diagram custom graphical types id *********************** */
+ /** ********************************************************* */
+ /** Custom nodes */
+ public static final String SHAPE_SYSML_BLOCK_AS_CLASSIFIER_ID = "shape_sysml_block_as_classifier"; //$NON-NLS-1$
+
+ public static final String SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID = "shape_sysml_block_as_composite"; //$NON-NLS-1$
+
+ public static final String SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID = "shape_sysml_blockproperty_as_composite"; //$NON-NLS-1$
+
+ public static final String SHAPE_SYSML_CONSTRAINTBLOCKPROPERTY_AS_COMPOSITE_ID = "shape_sysml_constraintblockproperty_as_composite"; //$NON-NLS-1$
+
+ public static final String SHAPE_SYSML_DIMENSION_AS_CLASSIFIER_ID = "shape_sysml_dimension_as_classifier"; //$NON-NLS-1$
+
+ public static final String SHAPE_SYSML_CONSTRAINTBLOCK_AS_CLASSIFIER_ID = "shape_sysml_constraintblock_as_classifier"; //$NON-NLS-1$
+
+ public static final String SHAPE_SYSML_FLOWSPECIFICATION_AS_CLASSIFIER_ID = "shape_sysml_flowspecification_as_classifier"; //$NON-NLS-1$
+
+ public static final String SHAPE_SYSML_UNIT_AS_CLASSIFIER_ID = "shape_sysml_unit_as_classifier"; //$NON-NLS-1$
+
+ public static final String SHAPE_SYSML_VALUETYPE_AS_CLASSIFIER_ID = "shape_sysml_valuetype_as_classifier"; //$NON-NLS-1$
+
+ public static final String SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID = "shape_sysml_flowport_as_affixed"; //$NON-NLS-1$
+
+ public static final String SHAPE_SYSML_REQUIREMENT_AS_CLASSIFER_ID = "shape_sysml_requirement_as_classifier"; //$NON-NLS-1$
+
+ @Deprecated
+ public static final String SHAPE_SYSML_NESTEDBLOCKPROPERTY_AS_COMPOSITE_ID = "shape_sysml_nestedblockproperty_as_composite"; //$NON-NLS-1$
+
+ /** Custom label nodes */
+ public static final String SHAPE_SYSML_CONSTRAINTPROPERTY_AS_LABEL_ID = "shape_sysml_constraintproperty_as_label"; //$NON-NLS-1$
+
+ public static final String SHAPE_SYSML_FLOWPORT_AS_LABEL_ID = "shape_sysml_flowport_as_label"; //$NON-NLS-1$
+
+ public static final String SHAPE_SYSML_FLOWPROPERTY_AS_LABEL_ID = "shape_sysml_flowproperty_as_label"; //$NON-NLS-1$
+
+ public static final String SHAPE_SYSML_PART_AS_LABEL_ID = "shape_sysml_part_as_label"; //$NON-NLS-1$
+
+ public static final String SHAPE_SYSML_REFERENCE_AS_LABEL_ID = "shape_sysml_reference_as_label"; //$NON-NLS-1$
+
+ public static final String SHAPE_SYSML_VALUE_AS_LABEL_ID = "shape_sysml_value_as_label"; //$NON-NLS-1$
+
+ /** Custom inner labels */
+ public static final String LABEL_SYSML_BLOCK_NAME_ID = "label_sysml_block_name"; //$NON-NLS-1$
+
+ public static final String LABEL_SYSML_CONSTRAINTBLOCK_NAME_ID = "label_sysml_constraintblock_name"; //$NON-NLS-1$
+
+ public static final String LABEL_SYSML_DIMENSION_NAME_ID = "label_sysml_dimension_name"; //$NON-NLS-1$
+
+ public static final String LABEL_SYSML_FLOWSPECIFICATION_NAME_ID = "label_sysml_flowspecification_name"; //$NON-NLS-1$
+
+ public static final String LABEL_SYSML_UNIT_NAME_ID = "label_sysml_unit_name"; //$NON-NLS-1$
+
+ public static final String LABEL_SYSML_VALUETYPE_NAME_ID = "label_sysml_valuetype_name"; //$NON-NLS-1$
+
+ public static final String LABEL_SYSML_REQUIREMENT_ID_ID = "label_sysml_requirement_id"; //$NON-NLS-1$
+
+ public static final String LABEL_SYSML_REQUIREMENT_TEXT_ID = "label_sysml_requirement_text"; //$NON-NLS-1$
+
+ /** Custom affixed labels */
+ public static final String AFFIXEDLABEL_SYSML_FLOWPORT_LABEL_ID = "affixedlabel_sysml_flowport_label"; //$NON-NLS-1$
+
+ /** Custom compartments */
+ public static final String COMPARTMENT_SYSML_CONSTRAINT_AS_LIST_ID = "compartment_sysml_constraint_as_list"; //$NON-NLS-1$
+
+ public static final String COMPARTMENT_SYSML_FLOWPORT_AS_LIST_ID = "compartment_sysml_flowport_as_list"; //$NON-NLS-1$
+
+ public static final String COMPARTMENT_SYSML_FLOWPROPERTY_AS_LIST_ID = "compartment_sysml_flowproperty_as_list"; //$NON-NLS-1$
+
+ public static final String COMPARTMENT_SYSML_PARAMETER_AS_LIST_ID = "compartment_sysml_parameter_as_list"; //$NON-NLS-1$
+
+ public static final String COMPARTMENT_SYSML_PART_AS_LIST_ID = "compartment_sysml_part_as_list"; //$NON-NLS-1$
+
+ public static final String COMPARTMENT_SYSML_PROPERTY_AS_LIST_ID = "compartment_sysml_property_as_list"; //$NON-NLS-1$
+
+ public static final String COMPARTMENT_SYSML_REFERENCE_AS_LIST_ID = "compartment_sysml_reference_as_list"; //$NON-NLS-1$
+
+ public static final String COMPARTMENT_SYSML_STRUCTURE_ID = "compartment_sysml_structure"; //$NON-NLS-1$
+
+ public static final String COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID = "compartment_sysml_blockproperty_structure"; //$NON-NLS-1$
+
+ public static final String COMPARTMENT_SYSML_VALUE_AS_LIST_ID = "compartment_sysml_value_as_list"; //$NON-NLS-1$
+
+ public static final String COMPARTMENT_SYSML_REQUIREMENT_IDINFO_AS_LIST_ID = "compartment_sysml_requirement_idinfo_as_list"; //$NON-NLS-1$
+
+ /** Custom links */
+ public static final String LINK_SYSML_ASSOCIATION_ID = "link_sysml_association"; //$NON-NLS-1$
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/edit/part/ActorEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/edit/part/ActorEditPart.java
new file mode 100755
index 0000000..d98baf3
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/edit/part/ActorEditPart.java
@@ -0,0 +1,156 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.edit.part;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.figure.ActorFigure;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+
+public class ActorEditPart extends AbstractElementEditPart {
+
+ public ActorEditPart(View view) {
+ super(view);
+ }
+
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
+ installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
+ installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ // Start of user code custom policies
+ // End of user code
+ }
+
+ @Override
+ protected LayoutEditPolicy createLayoutEditPolicy() {
+ org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ @Override
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof NamedElementNodeLabelNameEditPart) {
+ ((NamedElementNodeLabelNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+ if (childEditPart instanceof PropertyCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getPropertyCompartmentFigure();
+ setupContentPane(pane);
+ pane.add(((PropertyCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof OperationCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getOperationCompartmentFigure();
+ setupContentPane(pane);
+ pane.add(((OperationCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof NamedElementNodeLabelNameEditPart) {
+ return true;
+ }
+ if (childEditPart instanceof PropertyCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getPropertyCompartmentFigure();
+ setupContentPane(pane);
+ pane.remove(((PropertyCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof OperationCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getOperationCompartmentFigure();
+ setupContentPane(pane);
+ pane.remove(((OperationCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ if (editPart instanceof PropertyCompartmentEditPart) {
+ return getPrimaryShape().getPropertyCompartmentFigure();
+ }
+ if (editPart instanceof OperationCompartmentEditPart) {
+ return getPrimaryShape().getOperationCompartmentFigure();
+ }
+ return getContentPane();
+ }
+
+ // public EditPart getTargetEditPart(Request request) {
+ // if(request instanceof CreateViewAndElementRequest) {
+ // CreateElementRequestAdapter adapter = ((CreateViewAndElementRequest)request).getViewAndElementDescriptor().getCreateElementRequestAdapter();
+ // IElementType type = (IElementType)adapter.getAdapter(IElementType.class);
+ // if(type == CustomBlockDefinitionDiagramElementTypes.BLOCK_CONSTRAINT_CLN) {
+ // return getChildBySemanticHint(CustomBlockDefinitionDiagramElementTypes.BLOCK_CONSTRAINT_COMPARTMENT_HINT);
+ // }
+ // }
+ // return super.getTargetEditPart(request);
+ // }
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new ActorFigure();
+ }
+
+ @Override
+ public ActorFigure getPrimaryShape() {
+ return (ActorFigure) primaryShape;
+ }
+
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLGraphicalTypes.LABEL_UML_NAMEDELEMENT_NAME_ID);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/edit/part/ConnectorEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/edit/part/ConnectorEditPart.java
new file mode 100755
index 0000000..699f630
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/edit/part/ConnectorEditPart.java
@@ -0,0 +1,112 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.edit.part;
+
+import org.eclipse.draw2d.Connection;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
+import org.eclipse.papyrus.sysml.blocks.BindingConnector;
+import org.eclipse.papyrus.uml.diagram.common.figure.ConnectorEdgeFigure;
+import org.eclipse.uml2.uml.Element;
+
+public class ConnectorEditPart extends AbstractElementLinkEditPart {
+
+ /**
+ * Constructor.
+ */
+ public ConnectorEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ // Start of user code custom policies
+ // End of user code
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof ConnectorLinkLabelEditPart) {
+ ((ConnectorLinkLabelEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+ if (childEditPart instanceof ConnectorLinkLabelSourceMultiplicityEditPart) {
+ ((ConnectorLinkLabelSourceMultiplicityEditPart) childEditPart).setLabel(getPrimaryShape().getSourceMultiplicityLabel());
+ return true;
+ }
+ if (childEditPart instanceof ConnectorLinkLabelTargetMultiplicityEditPart) {
+ ((ConnectorLinkLabelTargetMultiplicityEditPart) childEditPart).setLabel(getPrimaryShape().getTargetMultiplicityLabel());
+ return true;
+ }
+ return super.addFixedChild(childEditPart);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof ConnectorLinkLabelEditPart) {
+ return true;
+ }
+ if (childEditPart instanceof ConnectorLinkLabelSourceMultiplicityEditPart) {
+ return true;
+ }
+ if (childEditPart instanceof ConnectorLinkLabelTargetMultiplicityEditPart) {
+ return true;
+ }
+ return super.removeFixedChild(childEditPart);
+ }
+
+ /**
+ * Creates figure for this edit part.
+ */
+ @Override
+ protected Connection createConnectionFigure() {
+ return new ConnectorEdgeFigure();
+ }
+
+ /**
+ * Creates primary shape for this edit part.
+ */
+ @Override
+ public ConnectorEdgeFigure getPrimaryShape() {
+ return (ConnectorEdgeFigure) getFigure();
+ }
+
+ @Override
+ protected void refreshLineWidth() {
+ int width = getLineWidth();
+ if (width < 1) {
+ width = 1;
+ }
+
+ if (org.eclipse.uml2.uml.util.UMLUtil.getStereotypeApplication((Element) resolveSemanticElement(), BindingConnector.class) != null) {
+ setLineWidth(width * 2);
+ } else {
+ setLineWidth(width);
+ }
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/edit/part/ConstraintCompartmentEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/edit/part/ConstraintCompartmentEditPart.java
new file mode 100755
index 0000000..8139565
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/edit/part/ConstraintCompartmentEditPart.java
@@ -0,0 +1,66 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.edit.part;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.figures.ResizableCompartmentFigure;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.ResizeableListCompartmentEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
+
+public class ConstraintCompartmentEditPart extends ResizeableListCompartmentEditPart {
+
+ public final static String COMPARTMENT_NAME = "constraints";
+
+ public ConstraintCompartmentEditPart(View view) {
+ super(view);
+ }
+
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultCompartmentSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
+ // Start of user code custom edit policies
+ // End of user code
+ }
+
+ @Override
+ public String getCompartmentName() {
+ return COMPARTMENT_NAME;
+ }
+
+ @Override
+ protected boolean hasModelChildrenChanged(Notification evt) {
+ return false;
+ }
+
+ @Override
+ public IFigure createFigure() {
+ ResizableCompartmentFigure result = (ResizableCompartmentFigure) super.createFigure();
+ result.setTitleVisibility(false);
+ return result;
+ }
+
+ @Override
+ protected void setRatio(Double ratio) {
+ if (getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/edit/part/ConstraintParameterAffixedNodeEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/edit/part/ConstraintParameterAffixedNodeEditPart.java
new file mode 100755
index 0000000..436f87d
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/edit/part/ConstraintParameterAffixedNodeEditPart.java
@@ -0,0 +1,206 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.edit.part;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.LayoutListener;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.LayoutEditPolicy;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.handles.MoveHandle;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.gmf.diagram.common.edit.policy.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IPapyrusEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeIconlDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.AffixedNamedElementFigure;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.IPapyrusUMLElementFigure;
+import org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+
+public class ConstraintParameterAffixedNodeEditPart extends AbstractElementBorderEditPart {
+
+ private LayoutListener.Stub layoutInitializationListener;
+
+ public ConstraintParameterAffixedNodeEditPart(View view) {
+ super(view);
+ }
+
+
+ @Override
+ protected EditPart createChild(Object model) {
+ return super.createChild(model);
+ }
+
+
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeIconlDisplayEditPolicy() {
+
+ /**
+ * <pre>
+ * {@inheritDoc}
+ *
+ * This modifies the edit policy in order to call refreshVisuals() whenever the stereotype image to show is null.
+ * (required to show the Port default image correctly).
+ * </pre>
+ */
+ @Override
+ protected void refreshStereotypeDisplay() {
+ if (getHost() instanceof IPapyrusEditPart) {
+ IFigure figure = ((IPapyrusEditPart) getHost()).getPrimaryShape();
+
+ if ((figure instanceof IPapyrusUMLElementFigure) && (stereotypeIconToDisplay() != null)) {
+ ((IPapyrusUMLElementFigure) figure).setStereotypeDisplay(null, stereotypeIconToDisplay());
+ } else {
+ refreshVisuals();
+ }
+ }
+ }
+
+ });
+
+ installEditPolicy(ShowHideLabelEditPolicy.SHOW_HIDE_LABEL_ROLE, new ShowHideLabelEditPolicy());
+ }
+
+ @Override
+ protected LayoutEditPolicy createLayoutEditPolicy() {
+ org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ if (child instanceof IBorderItemEditPart) { // External labels
+ return new ExternalLabelPrimaryDragRoleEditPolicy() {
+
+ @Override
+ @SuppressWarnings("rawtypes")
+ protected List createSelectionHandles() {
+ MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ mh.setBorder(null);
+ return Collections.singletonList(mh);
+ }
+ };
+ }
+
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ @Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ return;
+ }
+
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLGraphicalTypes.AFFIXEDLABEL_UML_PORT_LABEL_ID);
+ }
+
+ /**
+ * <pre>
+ * Calls the figure refresh when a change event is detected on
+ * UMLPackage.eINSTANCE.getProperty_Aggregation().
+ *
+ * {@inheritDoc}
+ * </pre>
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+
+ // When the constraint parameter position changes, its position on parent side may change and requires a visual refresh.
+ Object feature = event.getFeature();
+ if (NotationPackage.eINSTANCE.getSize_Width().equals(feature) || NotationPackage.eINSTANCE.getSize_Height().equals(feature) || NotationPackage.eINSTANCE.getLocation_X().equals(feature) || NotationPackage.eINSTANCE.getLocation_Y().equals(feature)) {
+ refreshVisuals();
+ }
+
+ super.handleNotificationEvent(event);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new AffixedNamedElementFigure();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public AffixedNamedElementFigure getPrimaryShape() {
+ return (AffixedNamedElementFigure) primaryShape;
+ }
+
+ /**
+ * <pre>
+ * A post layout listener is added during activate and remove the first time the layout occurs.
+ * This is required in order to be able to find the side of this border item on its parent when opening the model.
+ * Without this, the locator is unable to guess the parent side because the parent constraint is not set yet.
+ *
+ * Once the initialization is done, the listener become useless and can be removed.
+ *
+ * {@inheritDoc}
+ * </pre>
+ */
+ @Override
+ public void activate() {
+
+ layoutInitializationListener = new LayoutListener.Stub() {
+
+ @Override
+ public void postLayout(IFigure container) {
+ refreshVisuals();
+ // getBorderedFigure().getBorderItemContainer().removeLayoutListener(layoutInitializationListener);
+ layoutInitializationListener = null;
+ }
+ };
+ getBorderedFigure().getBorderItemContainer().addLayoutListener(layoutInitializationListener);
+
+ super.activate();
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/edit/part/DataTypeEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/edit/part/DataTypeEditPart.java
new file mode 100755
index 0000000..9493d1a
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/edit/part/DataTypeEditPart.java
@@ -0,0 +1,156 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.edit.part;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.figure.DataTypeFigure;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+
+public class DataTypeEditPart extends AbstractElementEditPart {
+
+ public DataTypeEditPart(View view) {
+ super(view);
+ }
+
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
+ installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
+ installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ // Start of user code custom policies
+ // End of user code
+ }
+
+ @Override
+ protected LayoutEditPolicy createLayoutEditPolicy() {
+ org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ @Override
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof NamedElementNodeLabelNameEditPart) {
+ ((NamedElementNodeLabelNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+ if (childEditPart instanceof PropertyCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getPropertyCompartmentFigure();
+ setupContentPane(pane);
+ pane.add(((PropertyCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof OperationCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getOperationCompartmentFigure();
+ setupContentPane(pane);
+ pane.add(((OperationCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof NamedElementNodeLabelNameEditPart) {
+ return true;
+ }
+ if (childEditPart instanceof PropertyCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getPropertyCompartmentFigure();
+ setupContentPane(pane);
+ pane.remove(((PropertyCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof OperationCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getOperationCompartmentFigure();
+ setupContentPane(pane);
+ pane.remove(((OperationCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ if (editPart instanceof PropertyCompartmentEditPart) {
+ return getPrimaryShape().getPropertyCompartmentFigure();
+ }
+ if (editPart instanceof OperationCompartmentEditPart) {
+ return getPrimaryShape().getOperationCompartmentFigure();
+ }
+ return getContentPane();
+ }
+
+ // public EditPart getTargetEditPart(Request request) {
+ // if(request instanceof CreateViewAndElementRequest) {
+ // CreateElementRequestAdapter adapter = ((CreateViewAndElementRequest)request).getViewAndElementDescriptor().getCreateElementRequestAdapter();
+ // IElementType type = (IElementType)adapter.getAdapter(IElementType.class);
+ // if(type == CustomBlockDefinitionDiagramElementTypes.BLOCK_CONSTRAINT_CLN) {
+ // return getChildBySemanticHint(CustomBlockDefinitionDiagramElementTypes.BLOCK_CONSTRAINT_COMPARTMENT_HINT);
+ // }
+ // }
+ // return super.getTargetEditPart(request);
+ // }
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new DataTypeFigure();
+ }
+
+ @Override
+ public DataTypeFigure getPrimaryShape() {
+ return (DataTypeFigure) primaryShape;
+ }
+
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLGraphicalTypes.LABEL_UML_NAMEDELEMENT_NAME_ID);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/edit/part/DependencyEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/edit/part/DependencyEditPart.java
new file mode 100755
index 0000000..795bae5
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/edit/part/DependencyEditPart.java
@@ -0,0 +1,113 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.edit.part;
+
+import org.eclipse.draw2d.Connection;
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.figure.EdgeDecorationType;
+import org.eclipse.papyrus.uml.diagram.common.figure.NamedElementEdgeFigure;
+
+public class DependencyEditPart extends AbstractElementLinkEditPart {
+
+ /**
+ * Constructor.
+ */
+ public DependencyEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ // Start of user code custom policies
+ // End of user code
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof NamedElementLinkLabelNameEditPart) {
+ ((NamedElementLinkLabelNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+ return super.addFixedChild(childEditPart);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof NamedElementLinkLabelNameEditPart) {
+ return true;
+ }
+ return super.removeFixedChild(childEditPart);
+ }
+
+ /**
+ * Creates figure for this edit part.
+ */
+ @Override
+ protected Connection createConnectionFigure() {
+ return new NamedElementEdgeFigure();
+ }
+
+ /**
+ * Creates primary shape for this edit part.
+ */
+ @Override
+ public NamedElementEdgeFigure getPrimaryShape() {
+ return (NamedElementEdgeFigure) getFigure();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void refreshLineType() {
+ // Start of user code custom line type
+ setLineType(Graphics.LINE_CUSTOM);
+ // End of user code
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void refreshArrowSource() {
+ // Start of user code custom source decoration
+ setArrowSource(getArrowDecoration(EdgeDecorationType.NONE));
+ // End of user code
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void refreshArrowTarget() {
+ // Start of user code custom target decoration
+ setArrowTarget(getArrowDecoration(EdgeDecorationType.OPEN_ARROW));
+ // End of user code
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/edit/part/EnumerationEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/edit/part/EnumerationEditPart.java
new file mode 100755
index 0000000..9b8c732
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/edit/part/EnumerationEditPart.java
@@ -0,0 +1,141 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.edit.part;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.figure.EnumerationFigure;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+
+public class EnumerationEditPart extends AbstractElementEditPart {
+
+ public EnumerationEditPart(View view) {
+ super(view);
+ }
+
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
+ installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
+ installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ // Start of user code custom policies
+ // End of user code
+ }
+
+ @Override
+ protected LayoutEditPolicy createLayoutEditPolicy() {
+ org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ @Override
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof NamedElementNodeLabelNameEditPart) {
+ ((NamedElementNodeLabelNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+ if (childEditPart instanceof EnumerationLiteralCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getEnumerationLiteralCompartmentFigure();
+ setupContentPane(pane);
+ pane.add(((EnumerationLiteralCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof NamedElementNodeLabelNameEditPart) {
+ return true;
+ }
+ if (childEditPart instanceof EnumerationLiteralCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getEnumerationLiteralCompartmentFigure();
+ setupContentPane(pane);
+ pane.remove(((EnumerationLiteralCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ if (editPart instanceof EnumerationLiteralCompartmentEditPart) {
+ return getPrimaryShape().getEnumerationLiteralCompartmentFigure();
+ }
+ return getContentPane();
+ }
+
+ // public EditPart getTargetEditPart(Request request) {
+ // if(request instanceof CreateViewAndElementRequest) {
+ // CreateElementRequestAdapter adapter = ((CreateViewAndElementRequest)request).getViewAndElementDescriptor().getCreateElementRequestAdapter();
+ // IElementType type = (IElementType)adapter.getAdapter(IElementType.class);
+ // if(type == CustomBlockDefinitionDiagramElementTypes.BLOCK_CONSTRAINT_CLN) {
+ // return getChildBySemanticHint(CustomBlockDefinitionDiagramElementTypes.BLOCK_CONSTRAINT_COMPARTMENT_HINT);
+ // }
+ // }
+ // return super.getTargetEditPart(request);
+ // }
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new EnumerationFigure();
+ }
+
+ @Override
+ public EnumerationFigure getPrimaryShape() {
+ return (EnumerationFigure) primaryShape;
+ }
+
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLGraphicalTypes.LABEL_UML_NAMEDELEMENT_NAME_ID);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/edit/part/EnumerationLiteralCompartmentEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/edit/part/EnumerationLiteralCompartmentEditPart.java
new file mode 100755
index 0000000..c8e2aea
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/edit/part/EnumerationLiteralCompartmentEditPart.java
@@ -0,0 +1,66 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.edit.part;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.figures.ResizableCompartmentFigure;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.ResizeableListCompartmentEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
+
+public class EnumerationLiteralCompartmentEditPart extends ResizeableListCompartmentEditPart {
+
+ public final static String COMPARTMENT_NAME = "literals";
+
+ public EnumerationLiteralCompartmentEditPart(View view) {
+ super(view);
+ }
+
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultCompartmentSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
+ // Start of user code custom edit policies
+ // End of user code
+ }
+
+ @Override
+ public String getCompartmentName() {
+ return COMPARTMENT_NAME;
+ }
+
+ @Override
+ protected boolean hasModelChildrenChanged(Notification evt) {
+ return false;
+ }
+
+ @Override
+ public IFigure createFigure() {
+ ResizableCompartmentFigure result = (ResizableCompartmentFigure) super.createFigure();
+ result.setTitleVisibility(false);
+ return result;
+ }
+
+ @Override
+ protected void setRatio(Double ratio) {
+ if (getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/edit/part/GeneralizationEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/edit/part/GeneralizationEditPart.java
new file mode 100755
index 0000000..ad314da
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/edit/part/GeneralizationEditPart.java
@@ -0,0 +1,106 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.edit.part;
+
+import org.eclipse.draw2d.Connection;
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.figure.EdgeDecorationType;
+import org.eclipse.papyrus.uml.diagram.common.figure.GeneralizationFigure;
+
+public class GeneralizationEditPart extends AbstractElementLinkEditPart {
+
+ /**
+ * Constructor.
+ */
+ public GeneralizationEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ // Start of user code custom policies
+ // End of user code
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected boolean addFixedChild(EditPart childEditPart) {
+ return super.addFixedChild(childEditPart);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ return super.removeFixedChild(childEditPart);
+ }
+
+ /**
+ * Creates figure for this edit part.
+ */
+ @Override
+ protected Connection createConnectionFigure() {
+ return new GeneralizationFigure();
+ }
+
+ /**
+ * Creates primary shape for this edit part.
+ */
+ @Override
+ public GeneralizationFigure getPrimaryShape() {
+ return (GeneralizationFigure) getFigure();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void refreshLineType() {
+ // Start of user code custom line type
+ setLineType(Graphics.LINE_SOLID);
+ // End of user code
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void refreshArrowSource() {
+ // Start of user code custom source decoration
+ setArrowSource(getArrowDecoration(EdgeDecorationType.NONE));
+ // End of user code
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void refreshArrowTarget() {
+ // Start of user code custom target decoration
+ setArrowTarget(getArrowDecoration(EdgeDecorationType.SOLID_ARROW_EMPTY));
+ // End of user code
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/edit/part/InterfaceEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/edit/part/InterfaceEditPart.java
new file mode 100755
index 0000000..f2947a5
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/edit/part/InterfaceEditPart.java
@@ -0,0 +1,156 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.edit.part;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.figure.InterfaceFigure;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+
+public class InterfaceEditPart extends AbstractElementEditPart {
+
+ public InterfaceEditPart(View view) {
+ super(view);
+ }
+
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
+ installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
+ installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ // Start of user code custom policies
+ // End of user code
+ }
+
+ @Override
+ protected LayoutEditPolicy createLayoutEditPolicy() {
+ org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ @Override
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof NamedElementNodeLabelNameEditPart) {
+ ((NamedElementNodeLabelNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+ if (childEditPart instanceof PropertyCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getPropertyCompartmentFigure();
+ setupContentPane(pane);
+ pane.add(((PropertyCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof OperationCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getOperationCompartmentFigure();
+ setupContentPane(pane);
+ pane.add(((OperationCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof NamedElementNodeLabelNameEditPart) {
+ return true;
+ }
+ if (childEditPart instanceof PropertyCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getPropertyCompartmentFigure();
+ setupContentPane(pane);
+ pane.remove(((PropertyCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof OperationCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getOperationCompartmentFigure();
+ setupContentPane(pane);
+ pane.remove(((OperationCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ if (editPart instanceof PropertyCompartmentEditPart) {
+ return getPrimaryShape().getPropertyCompartmentFigure();
+ }
+ if (editPart instanceof OperationCompartmentEditPart) {
+ return getPrimaryShape().getOperationCompartmentFigure();
+ }
+ return getContentPane();
+ }
+
+ // public EditPart getTargetEditPart(Request request) {
+ // if(request instanceof CreateViewAndElementRequest) {
+ // CreateElementRequestAdapter adapter = ((CreateViewAndElementRequest)request).getViewAndElementDescriptor().getCreateElementRequestAdapter();
+ // IElementType type = (IElementType)adapter.getAdapter(IElementType.class);
+ // if(type == CustomBlockDefinitionDiagramElementTypes.BLOCK_CONSTRAINT_CLN) {
+ // return getChildBySemanticHint(CustomBlockDefinitionDiagramElementTypes.BLOCK_CONSTRAINT_COMPARTMENT_HINT);
+ // }
+ // }
+ // return super.getTargetEditPart(request);
+ // }
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new InterfaceFigure();
+ }
+
+ @Override
+ public InterfaceFigure getPrimaryShape() {
+ return (InterfaceFigure) primaryShape;
+ }
+
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLGraphicalTypes.LABEL_UML_NAMEDELEMENT_NAME_ID);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/edit/part/InterfaceRealizationEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/edit/part/InterfaceRealizationEditPart.java
new file mode 100755
index 0000000..1d11426
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/edit/part/InterfaceRealizationEditPart.java
@@ -0,0 +1,113 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.edit.part;
+
+import org.eclipse.draw2d.Connection;
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.figure.EdgeDecorationType;
+import org.eclipse.papyrus.uml.diagram.common.figure.InterfaceRealizationFigure;
+
+public class InterfaceRealizationEditPart extends AbstractElementLinkEditPart {
+
+ /**
+ * Constructor.
+ */
+ public InterfaceRealizationEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ // Start of user code custom policies
+ // End of user code
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof NamedElementLinkLabelNameEditPart) {
+ ((NamedElementLinkLabelNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+ return super.addFixedChild(childEditPart);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof NamedElementLinkLabelNameEditPart) {
+ return true;
+ }
+ return super.removeFixedChild(childEditPart);
+ }
+
+ /**
+ * Creates figure for this edit part.
+ */
+ @Override
+ protected Connection createConnectionFigure() {
+ return new InterfaceRealizationFigure();
+ }
+
+ /**
+ * Creates primary shape for this edit part.
+ */
+ @Override
+ public InterfaceRealizationFigure getPrimaryShape() {
+ return (InterfaceRealizationFigure) getFigure();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void refreshLineType() {
+ // Start of user code custom line type
+ setLineType(Graphics.LINE_CUSTOM);
+ // End of user code
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void refreshArrowSource() {
+ // Start of user code custom source decoration
+ setArrowSource(getArrowDecoration(EdgeDecorationType.NONE));
+ // End of user code
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void refreshArrowTarget() {
+ // Start of user code custom target decoration
+ setArrowTarget(getArrowDecoration(EdgeDecorationType.SOLID_ARROW_EMPTY));
+ // End of user code
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/edit/part/OperationCompartmentEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/edit/part/OperationCompartmentEditPart.java
new file mode 100755
index 0000000..29dd59c
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/edit/part/OperationCompartmentEditPart.java
@@ -0,0 +1,66 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.edit.part;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.figures.ResizableCompartmentFigure;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.ResizeableListCompartmentEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
+
+public class OperationCompartmentEditPart extends ResizeableListCompartmentEditPart {
+
+ public final static String COMPARTMENT_NAME = "operations";
+
+ public OperationCompartmentEditPart(View view) {
+ super(view);
+ }
+
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultCompartmentSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
+ // Start of user code custom edit policies
+ // End of user code
+ }
+
+ @Override
+ public String getCompartmentName() {
+ return COMPARTMENT_NAME;
+ }
+
+ @Override
+ protected boolean hasModelChildrenChanged(Notification evt) {
+ return false;
+ }
+
+ @Override
+ public IFigure createFigure() {
+ ResizableCompartmentFigure result = (ResizableCompartmentFigure) super.createFigure();
+ result.setTitleVisibility(false);
+ return result;
+ }
+
+ @Override
+ protected void setRatio(Double ratio) {
+ if (getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/edit/part/PortAffixedNodeEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/edit/part/PortAffixedNodeEditPart.java
new file mode 100755
index 0000000..e8715b7
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/edit/part/PortAffixedNodeEditPart.java
@@ -0,0 +1,102 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.edit.part;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.LayoutEditPolicy;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.handles.MoveHandle;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.gmf.diagram.common.edit.policy.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeIconlDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+
+public class PortAffixedNodeEditPart extends AbstractElementBorderEditPart {
+
+ public PortAffixedNodeEditPart(View view) {
+ super(view);
+ }
+
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeIconlDisplayEditPolicy());
+ installEditPolicy(ShowHideLabelEditPolicy.SHOW_HIDE_LABEL_ROLE, new ShowHideLabelEditPolicy());
+ // Start of user code custom policies
+ // End of user code
+ }
+
+ @Override
+ protected LayoutEditPolicy createLayoutEditPolicy() {
+ org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ if (child instanceof IBorderItemEditPart) { // External labels
+ return new ExternalLabelPrimaryDragRoleEditPolicy() {
+
+ @Override
+ protected List createSelectionHandles() {
+ MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ mh.setBorder(null);
+ return Collections.singletonList(mh);
+ }
+ };
+ }
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ @Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ return;
+ }
+
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLGraphicalTypes.AFFIXEDLABEL_UML_PORT_LABEL_ID);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/edit/part/PortCompartmentEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/edit/part/PortCompartmentEditPart.java
new file mode 100755
index 0000000..f70d5b1
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/edit/part/PortCompartmentEditPart.java
@@ -0,0 +1,66 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.edit.part;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.figures.ResizableCompartmentFigure;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.ResizeableListCompartmentEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
+
+public class PortCompartmentEditPart extends ResizeableListCompartmentEditPart {
+
+ public final static String COMPARTMENT_NAME = "standard ports";
+
+ public PortCompartmentEditPart(View view) {
+ super(view);
+ }
+
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultCompartmentSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
+ // Start of user code custom edit policies
+ // End of user code
+ }
+
+ @Override
+ public String getCompartmentName() {
+ return COMPARTMENT_NAME;
+ }
+
+ @Override
+ protected boolean hasModelChildrenChanged(Notification evt) {
+ return false;
+ }
+
+ @Override
+ public IFigure createFigure() {
+ ResizableCompartmentFigure result = (ResizableCompartmentFigure) super.createFigure();
+ result.setTitleVisibility(false);
+ return result;
+ }
+
+ @Override
+ protected void setRatio(Double ratio) {
+ if (getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/edit/part/PrimitiveTypeEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/edit/part/PrimitiveTypeEditPart.java
new file mode 100755
index 0000000..6d02734
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/edit/part/PrimitiveTypeEditPart.java
@@ -0,0 +1,122 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.edit.part;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.figure.PrimitiveTypeFigure;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+
+public class PrimitiveTypeEditPart extends AbstractElementEditPart {
+
+ public PrimitiveTypeEditPart(View view) {
+ super(view);
+ }
+
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ // Start of user code custom policies
+ // End of user code
+ }
+
+ @Override
+ protected LayoutEditPolicy createLayoutEditPolicy() {
+ org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ @Override
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof NamedElementNodeLabelNameEditPart) {
+ ((NamedElementNodeLabelNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof NamedElementNodeLabelNameEditPart) {
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ return getContentPane();
+ }
+
+ // public EditPart getTargetEditPart(Request request) {
+ // if(request instanceof CreateViewAndElementRequest) {
+ // CreateElementRequestAdapter adapter = ((CreateViewAndElementRequest)request).getViewAndElementDescriptor().getCreateElementRequestAdapter();
+ // IElementType type = (IElementType)adapter.getAdapter(IElementType.class);
+ // if(type == CustomBlockDefinitionDiagramElementTypes.BLOCK_CONSTRAINT_CLN) {
+ // return getChildBySemanticHint(CustomBlockDefinitionDiagramElementTypes.BLOCK_CONSTRAINT_COMPARTMENT_HINT);
+ // }
+ // }
+ // return super.getTargetEditPart(request);
+ // }
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new PrimitiveTypeFigure();
+ }
+
+ @Override
+ public PrimitiveTypeFigure getPrimaryShape() {
+ return (PrimitiveTypeFigure) primaryShape;
+ }
+
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLGraphicalTypes.LABEL_UML_NAMEDELEMENT_NAME_ID);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/edit/part/PropertyCompartmentEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/edit/part/PropertyCompartmentEditPart.java
new file mode 100755
index 0000000..a42db06
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/edit/part/PropertyCompartmentEditPart.java
@@ -0,0 +1,66 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.edit.part;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.figures.ResizableCompartmentFigure;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.ResizeableListCompartmentEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
+
+public class PropertyCompartmentEditPart extends ResizeableListCompartmentEditPart {
+
+ public final static String COMPARTMENT_NAME = "properties";
+
+ public PropertyCompartmentEditPart(View view) {
+ super(view);
+ }
+
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultCompartmentSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
+ // Start of user code custom edit policies
+ // End of user code
+ }
+
+ @Override
+ public String getCompartmentName() {
+ return COMPARTMENT_NAME;
+ }
+
+ @Override
+ protected boolean hasModelChildrenChanged(Notification evt) {
+ return false;
+ }
+
+ @Override
+ public IFigure createFigure() {
+ ResizableCompartmentFigure result = (ResizableCompartmentFigure) super.createFigure();
+ result.setTitleVisibility(false);
+ return result;
+ }
+
+ @Override
+ protected void setRatio(Double ratio) {
+ if (getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/edit/part/SignalEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/edit/part/SignalEditPart.java
new file mode 100755
index 0000000..3411cbe
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/edit/part/SignalEditPart.java
@@ -0,0 +1,156 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.edit.part;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.figure.SignalFigure;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+
+public class SignalEditPart extends AbstractElementEditPart {
+
+ public SignalEditPart(View view) {
+ super(view);
+ }
+
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
+ installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
+ installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ // Start of user code custom policies
+ // End of user code
+ }
+
+ @Override
+ protected LayoutEditPolicy createLayoutEditPolicy() {
+ org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ @Override
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof NamedElementNodeLabelNameEditPart) {
+ ((NamedElementNodeLabelNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+ if (childEditPart instanceof PropertyCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getPropertyCompartmentFigure();
+ setupContentPane(pane);
+ pane.add(((PropertyCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof OperationCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getOperationCompartmentFigure();
+ setupContentPane(pane);
+ pane.add(((OperationCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof NamedElementNodeLabelNameEditPart) {
+ return true;
+ }
+ if (childEditPart instanceof PropertyCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getPropertyCompartmentFigure();
+ setupContentPane(pane);
+ pane.remove(((PropertyCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof OperationCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getOperationCompartmentFigure();
+ setupContentPane(pane);
+ pane.remove(((OperationCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ if (editPart instanceof PropertyCompartmentEditPart) {
+ return getPrimaryShape().getPropertyCompartmentFigure();
+ }
+ if (editPart instanceof OperationCompartmentEditPart) {
+ return getPrimaryShape().getOperationCompartmentFigure();
+ }
+ return getContentPane();
+ }
+
+ // public EditPart getTargetEditPart(Request request) {
+ // if(request instanceof CreateViewAndElementRequest) {
+ // CreateElementRequestAdapter adapter = ((CreateViewAndElementRequest)request).getViewAndElementDescriptor().getCreateElementRequestAdapter();
+ // IElementType type = (IElementType)adapter.getAdapter(IElementType.class);
+ // if(type == CustomBlockDefinitionDiagramElementTypes.BLOCK_CONSTRAINT_CLN) {
+ // return getChildBySemanticHint(CustomBlockDefinitionDiagramElementTypes.BLOCK_CONSTRAINT_COMPARTMENT_HINT);
+ // }
+ // }
+ // return super.getTargetEditPart(request);
+ // }
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new SignalFigure();
+ }
+
+ @Override
+ public SignalFigure getPrimaryShape() {
+ return (SignalFigure) primaryShape;
+ }
+
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLGraphicalTypes.LABEL_UML_NAMEDELEMENT_NAME_ID);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/edit/part/UsageEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/edit/part/UsageEditPart.java
new file mode 100755
index 0000000..cfab37b
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/edit/part/UsageEditPart.java
@@ -0,0 +1,116 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.edit.part;
+
+import org.eclipse.draw2d.Connection;
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.figure.EdgeDecorationType;
+import org.eclipse.papyrus.uml.diagram.common.figure.NamedElementEdgeFigure;
+
+public class UsageEditPart extends AbstractElementLinkEditPart {
+
+ /**
+ * Constructor.
+ */
+ public UsageEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultSemanticEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeLinkLabelDisplayEditPolicy("use"));
+ // Start of user code custom policies
+ // End of user code
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof NamedElementLinkLabelNameEditPart) {
+ ((NamedElementLinkLabelNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+ return super.addFixedChild(childEditPart);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof NamedElementLinkLabelNameEditPart) {
+ return true;
+ }
+ return super.removeFixedChild(childEditPart);
+ }
+
+ /**
+ * Creates figure for this edit part.
+ */
+ @Override
+ protected Connection createConnectionFigure() {
+ return new NamedElementEdgeFigure();
+ }
+
+ /**
+ * Creates primary shape for this edit part.
+ */
+ @Override
+ public NamedElementEdgeFigure getPrimaryShape() {
+ return (NamedElementEdgeFigure) getFigure();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void refreshLineType() {
+ // Start of user code custom line type
+ setLineType(Graphics.LINE_CUSTOM);
+ // End of user code
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void refreshArrowSource() {
+ // Start of user code custom source decoration
+ setArrowSource(getArrowDecoration(EdgeDecorationType.NONE));
+ // End of user code
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void refreshArrowTarget() {
+ // Start of user code custom target decoration
+ setArrowTarget(getArrowDecoration(EdgeDecorationType.OPEN_ARROW));
+ // End of user code
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/factory/ConnectorLinkViewFactory.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/factory/ConnectorLinkViewFactory.java
new file mode 100755
index 0000000..f185101
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/factory/ConnectorLinkViewFactory.java
@@ -0,0 +1,38 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.factory;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.gmf.diagram.common.factory.ConnectorViewFactory;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+
+/**
+ * View factory for Connector.
+ */
+public class ConnectorLinkViewFactory extends ConnectorViewFactory {
+
+ /**
+ * Creates Connector view and add Label nodes
+ */
+ @Override
+ protected void decorateView(View containerView, View view, IAdaptable element, String semanticHint, int index, boolean persisted) {
+ getViewService().createNode(element, view, UMLGraphicalTypes.LINKLABEL_UML_APPLIEDSTEREOTYPE_ID, ViewUtil.APPEND, persisted, getPreferencesHint());
+ getViewService().createNode(element, view, UMLGraphicalTypes.LINKLABEL_UML_CONNECTOR_LABEL_ID, ViewUtil.APPEND, persisted, getPreferencesHint());
+ getViewService().createNode(element, view, UMLGraphicalTypes.LINKLABEL_UML_CONNECTOR_SOURCE_MULTIPLICITY_ID, ViewUtil.APPEND, persisted, getPreferencesHint());
+ getViewService().createNode(element, view, UMLGraphicalTypes.LINKLABEL_UML_CONNECTOR_TARGET_MULTIPLICITY_ID, ViewUtil.APPEND, persisted, getPreferencesHint());
+ super.decorateView(containerView, view, element, semanticHint, index, persisted);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/factory/ConstraintPropertyAffixedNodeViewFactory.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/factory/ConstraintPropertyAffixedNodeViewFactory.java
new file mode 100755
index 0000000..96460cb
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/factory/ConstraintPropertyAffixedNodeViewFactory.java
@@ -0,0 +1,19 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.factory;
+
+
+
+public class ConstraintPropertyAffixedNodeViewFactory extends PortAffixedNodeViewFactory {
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/factory/DependencyLinkViewFactory.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/factory/DependencyLinkViewFactory.java
new file mode 100755
index 0000000..15aba6f
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/factory/DependencyLinkViewFactory.java
@@ -0,0 +1,36 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.factory;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.gmf.diagram.common.factory.ConnectorViewFactory;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+
+/**
+ * View factory for Dependency.
+ */
+public class DependencyLinkViewFactory extends ConnectorViewFactory {
+
+ /**
+ * Creates Dependency view and add Label nodes
+ */
+ @Override
+ protected void decorateView(View containerView, View view, IAdaptable element, String semanticHint, int index, boolean persisted) {
+ getViewService().createNode(element, view, UMLGraphicalTypes.LINKLABEL_UML_APPLIEDSTEREOTYPE_ID, ViewUtil.APPEND, persisted, getPreferencesHint());
+ getViewService().createNode(element, view, UMLGraphicalTypes.LINKLABEL_UML_NAMEDELEMENT_NAME_ID, ViewUtil.APPEND, persisted, getPreferencesHint());
+ super.decorateView(containerView, view, element, semanticHint, index, persisted);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/factory/EnumerationClassifierViewFactory.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/factory/EnumerationClassifierViewFactory.java
new file mode 100755
index 0000000..4b30069
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/factory/EnumerationClassifierViewFactory.java
@@ -0,0 +1,36 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.factory;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.gmf.diagram.common.factory.ShapeViewFactory;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+
+public class EnumerationClassifierViewFactory extends ShapeViewFactory {
+
+ /**
+ * Creates Enumeration view and add Label and Compartment nodes
+ */
+ @Override
+ protected void decorateView(View containerView, View view, IAdaptable element, String semanticHint, int index, boolean persisted) {
+ getViewService().createNode(element, view, UMLGraphicalTypes.LABEL_UML_NAMEDELEMENT_NAME_ID, ViewUtil.APPEND, persisted, getPreferencesHint());
+ getViewService().createNode(element, view, UMLGraphicalTypes.COMPARTMENT_UML_ENUMERATIONLITERAL_AS_LIST_ID, ViewUtil.APPEND, persisted, getPreferencesHint());
+ // this action needs to be done after the compartments creation
+ super.decorateView(containerView, view, element, semanticHint, index, persisted);
+ }
+ // Start of user code preferences
+ // End of user code
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/factory/GeneralizationLinkViewFactory.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/factory/GeneralizationLinkViewFactory.java
new file mode 100755
index 0000000..4459ac6
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/factory/GeneralizationLinkViewFactory.java
@@ -0,0 +1,35 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.factory;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.gmf.diagram.common.factory.ConnectorViewFactory;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+
+/**
+ * View factory for Generalization.
+ */
+public class GeneralizationLinkViewFactory extends ConnectorViewFactory {
+
+ /**
+ * Creates Generalization view and add Label nodes
+ */
+ @Override
+ protected void decorateView(View containerView, View view, IAdaptable element, String semanticHint, int index, boolean persisted) {
+ getViewService().createNode(element, view, UMLGraphicalTypes.LINKLABEL_UML_APPLIEDSTEREOTYPE_ID, ViewUtil.APPEND, persisted, getPreferencesHint());
+ super.decorateView(containerView, view, element, semanticHint, index, persisted);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/factory/InterfaceRealizationLinkViewFactory.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/factory/InterfaceRealizationLinkViewFactory.java
new file mode 100755
index 0000000..095d358
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/factory/InterfaceRealizationLinkViewFactory.java
@@ -0,0 +1,36 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.factory;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.gmf.diagram.common.factory.ConnectorViewFactory;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+
+/**
+ * View factory for InterfaceRealization.
+ */
+public class InterfaceRealizationLinkViewFactory extends ConnectorViewFactory {
+
+ /**
+ * Creates InterfaceRealization view and add Label nodes
+ */
+ @Override
+ protected void decorateView(View containerView, View view, IAdaptable element, String semanticHint, int index, boolean persisted) {
+ getViewService().createNode(element, view, UMLGraphicalTypes.LINKLABEL_UML_APPLIEDSTEREOTYPE_ID, ViewUtil.APPEND, persisted, getPreferencesHint());
+ getViewService().createNode(element, view, UMLGraphicalTypes.LINKLABEL_UML_NAMEDELEMENT_NAME_ID, ViewUtil.APPEND, persisted, getPreferencesHint());
+ super.decorateView(containerView, view, element, semanticHint, index, persisted);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/factory/PortAffixedNodeViewFactory.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/factory/PortAffixedNodeViewFactory.java
new file mode 100755
index 0000000..555236e
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/factory/PortAffixedNodeViewFactory.java
@@ -0,0 +1,34 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.factory;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.gmf.diagram.common.factory.ShapeViewFactory;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+
+public class PortAffixedNodeViewFactory extends ShapeViewFactory {
+
+ /**
+ * Creates Port view and add Label and Compartment nodes
+ */
+ @Override
+ protected void decorateView(View containerView, View view, IAdaptable element, String semanticHint, int index, boolean persisted) {
+ getViewService().createNode(element, view, UMLGraphicalTypes.AFFIXEDLABEL_UML_PORT_LABEL_ID, ViewUtil.APPEND, persisted, getPreferencesHint());
+ getViewService().createNode(element, view, UMLGraphicalTypes.AFFIXEDLABEL_UML_APPLIEDSTEREOTYPE_ID, ViewUtil.APPEND, persisted, getPreferencesHint());
+ // this action needs to be done after the compartments creation
+ super.decorateView(containerView, view, element, semanticHint, index, persisted);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/factory/PrimitiveTypeClassifierViewFactory.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/factory/PrimitiveTypeClassifierViewFactory.java
new file mode 100755
index 0000000..0f603a5
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/factory/PrimitiveTypeClassifierViewFactory.java
@@ -0,0 +1,35 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.factory;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.gmf.diagram.common.factory.ShapeViewFactory;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+
+public class PrimitiveTypeClassifierViewFactory extends ShapeViewFactory {
+
+ /**
+ * Creates PrimitiveType view and add Label and Compartment nodes
+ */
+ @Override
+ protected void decorateView(View containerView, View view, IAdaptable element, String semanticHint, int index, boolean persisted) {
+ getViewService().createNode(element, view, UMLGraphicalTypes.LABEL_UML_NAMEDELEMENT_NAME_ID, ViewUtil.APPEND, persisted, getPreferencesHint());
+ // this action needs to be done after the compartments creation
+ super.decorateView(containerView, view, element, semanticHint, index, persisted);
+ }
+ // Start of user code preferences
+ // End of user code
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/factory/UsageLinkViewFactory.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/factory/UsageLinkViewFactory.java
new file mode 100755
index 0000000..a02e00e
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/factory/UsageLinkViewFactory.java
@@ -0,0 +1,36 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.factory;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.gmf.diagram.common.factory.ConnectorViewFactory;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+
+/**
+ * View factory for Usage.
+ */
+public class UsageLinkViewFactory extends ConnectorViewFactory {
+
+ /**
+ * Creates Usage view and add Label nodes
+ */
+ @Override
+ protected void decorateView(View containerView, View view, IAdaptable element, String semanticHint, int index, boolean persisted) {
+ getViewService().createNode(element, view, UMLGraphicalTypes.LINKLABEL_UML_APPLIEDSTEREOTYPE_ID, ViewUtil.APPEND, persisted, getPreferencesHint());
+ getViewService().createNode(element, view, UMLGraphicalTypes.LINKLABEL_UML_NAMEDELEMENT_NAME_ID, ViewUtil.APPEND, persisted, getPreferencesHint());
+ super.decorateView(containerView, view, element, semanticHint, index, persisted);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/figure/ActorFigure.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/figure/ActorFigure.java
new file mode 100755
index 0000000..e7b5124
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/figure/ActorFigure.java
@@ -0,0 +1,57 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.figure;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.OperationCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.PropertyCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ClassifierFigure;
+
+public class ActorFigure extends ClassifierFigure {
+
+ public ActorFigure() {
+ super("actor"); //$NON-NLS-1$
+ }
+
+ @Override
+ protected void createContentPane(List<String> compartments) {
+ super.createContentPane(getUpdatedListOfCompartments(compartments));
+ }
+
+ /**
+ * Get the list of compartments, updated with specific ones
+ *
+ * @param compartments
+ * the original list of compartments (untouched)
+ * @return the new completed list of compartments
+ */
+ private List<String> getUpdatedListOfCompartments(List<String> compartments) {
+ compartments = new ArrayList<String>(compartments);
+ compartments.add(PropertyCompartmentEditPart.COMPARTMENT_NAME);
+ compartments.add(OperationCompartmentEditPart.COMPARTMENT_NAME);
+ return compartments;
+ }
+
+ public IFigure getPropertyCompartmentFigure() {
+ return getCompartment(PropertyCompartmentEditPart.COMPARTMENT_NAME);
+ }
+
+ @Override
+ public IFigure getOperationCompartmentFigure() {
+ return getCompartment(OperationCompartmentEditPart.COMPARTMENT_NAME);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/figure/DataTypeFigure.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/figure/DataTypeFigure.java
new file mode 100755
index 0000000..e6ab2cb
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/figure/DataTypeFigure.java
@@ -0,0 +1,57 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.figure;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.OperationCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.PropertyCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ClassifierFigure;
+
+public class DataTypeFigure extends ClassifierFigure {
+
+ public DataTypeFigure() {
+ super("datatype"); //$NON-NLS-1$
+ }
+
+ @Override
+ protected void createContentPane(List<String> compartments) {
+ super.createContentPane(getUpdatedListOfCompartments(compartments));
+ }
+
+ /**
+ * Get the list of compartments, updated with specific ones
+ *
+ * @param compartments
+ * the original list of compartments (untouched)
+ * @return the new completed list of compartments
+ */
+ private List<String> getUpdatedListOfCompartments(List<String> compartments) {
+ compartments = new ArrayList<String>(compartments);
+ compartments.add(PropertyCompartmentEditPart.COMPARTMENT_NAME);
+ compartments.add(OperationCompartmentEditPart.COMPARTMENT_NAME);
+ return compartments;
+ }
+
+ public IFigure getPropertyCompartmentFigure() {
+ return getCompartment(PropertyCompartmentEditPart.COMPARTMENT_NAME);
+ }
+
+ @Override
+ public IFigure getOperationCompartmentFigure() {
+ return getCompartment(OperationCompartmentEditPart.COMPARTMENT_NAME);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/figure/EnumerationFigure.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/figure/EnumerationFigure.java
new file mode 100755
index 0000000..3383969
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/figure/EnumerationFigure.java
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.figure;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.EnumerationLiteralCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ClassifierFigure;
+
+public class EnumerationFigure extends ClassifierFigure {
+
+ public EnumerationFigure() {
+ super("enumeration"); //$NON-NLS-1$
+ }
+
+ @Override
+ protected void createContentPane(List<String> compartments) {
+ super.createContentPane(getUpdatedListOfCompartments(compartments));
+ }
+
+ /**
+ * Get the list of compartments, updated with specific ones
+ *
+ * @param compartments
+ * the original list of compartments (untouched)
+ * @return the new completed list of compartments
+ */
+ private List<String> getUpdatedListOfCompartments(List<String> compartments) {
+ compartments = new ArrayList<String>(compartments);
+ compartments.add(EnumerationLiteralCompartmentEditPart.COMPARTMENT_NAME);
+ return compartments;
+ }
+
+ public IFigure getEnumerationLiteralCompartmentFigure() {
+ return getCompartment(EnumerationLiteralCompartmentEditPart.COMPARTMENT_NAME);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/figure/InterfaceFigure.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/figure/InterfaceFigure.java
new file mode 100755
index 0000000..db162ee
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/figure/InterfaceFigure.java
@@ -0,0 +1,57 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.figure;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.OperationCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.PropertyCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ClassifierFigure;
+
+public class InterfaceFigure extends ClassifierFigure {
+
+ public InterfaceFigure() {
+ super("interface"); //$NON-NLS-1$
+ }
+
+ @Override
+ protected void createContentPane(List<String> compartments) {
+ super.createContentPane(getUpdatedListOfCompartments(compartments));
+ }
+
+ /**
+ * Get the list of compartments, updated with specific ones
+ *
+ * @param compartments
+ * the original list of compartments (untouched)
+ * @return the new completed list of compartments
+ */
+ private List<String> getUpdatedListOfCompartments(List<String> compartments) {
+ compartments = new ArrayList<String>(compartments);
+ compartments.add(PropertyCompartmentEditPart.COMPARTMENT_NAME);
+ compartments.add(OperationCompartmentEditPart.COMPARTMENT_NAME);
+ return compartments;
+ }
+
+ public IFigure getPropertyCompartmentFigure() {
+ return getCompartment(PropertyCompartmentEditPart.COMPARTMENT_NAME);
+ }
+
+ @Override
+ public IFigure getOperationCompartmentFigure() {
+ return getCompartment(OperationCompartmentEditPart.COMPARTMENT_NAME);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/figure/PrimitiveTypeFigure.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/figure/PrimitiveTypeFigure.java
new file mode 100755
index 0000000..596800a
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/figure/PrimitiveTypeFigure.java
@@ -0,0 +1,43 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.figure;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ClassifierFigure;
+
+public class PrimitiveTypeFigure extends ClassifierFigure {
+
+ public PrimitiveTypeFigure() {
+ super("primitive"); //$NON-NLS-1$
+ }
+
+ @Override
+ protected void createContentPane(List<String> compartments) {
+ super.createContentPane(getUpdatedListOfCompartments(compartments));
+ }
+
+ /**
+ * Get the list of compartments, updated with specific ones
+ *
+ * @param compartments
+ * the original list of compartments (untouched)
+ * @return the new completed list of compartments
+ */
+ private List<String> getUpdatedListOfCompartments(List<String> compartments) {
+ compartments = new ArrayList<String>(compartments);
+ return compartments;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/figure/SignalFigure.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/figure/SignalFigure.java
new file mode 100755
index 0000000..8b78df6
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/figure/SignalFigure.java
@@ -0,0 +1,57 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.figure;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.OperationCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.PropertyCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ClassifierFigure;
+
+public class SignalFigure extends ClassifierFigure {
+
+ public SignalFigure() {
+ super("signal"); //$NON-NLS-1$
+ }
+
+ @Override
+ protected void createContentPane(List<String> compartments) {
+ super.createContentPane(getUpdatedListOfCompartments(compartments));
+ }
+
+ /**
+ * Get the list of compartments, updated with specific ones
+ *
+ * @param compartments
+ * the original list of compartments (untouched)
+ * @return the new completed list of compartments
+ */
+ private List<String> getUpdatedListOfCompartments(List<String> compartments) {
+ compartments = new ArrayList<String>(compartments);
+ compartments.add(PropertyCompartmentEditPart.COMPARTMENT_NAME);
+ compartments.add(OperationCompartmentEditPart.COMPARTMENT_NAME);
+ return compartments;
+ }
+
+ public IFigure getPropertyCompartmentFigure() {
+ return getCompartment(PropertyCompartmentEditPart.COMPARTMENT_NAME);
+ }
+
+ @Override
+ public IFigure getOperationCompartmentFigure() {
+ return getCompartment(OperationCompartmentEditPart.COMPARTMENT_NAME);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/utils/UMLGraphicalTypes.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/utils/UMLGraphicalTypes.java
new file mode 100755
index 0000000..494dea6
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/utils/UMLGraphicalTypes.java
@@ -0,0 +1,103 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.utils;
+
+public class UMLGraphicalTypes {
+
+ /** ********************************************************* */
+ /** Diagram custom graphical types id *********************** */
+ /** ********************************************************* */
+ /** Custom nodes */
+ public static final String SHAPE_UML_ACTOR_AS_CLASSIFIER_ID = "shape_uml_actor_as_classifier"; //$NON-NLS-1$
+
+ public static final String SHAPE_UML_DATATYPE_AS_CLASSIFIER_ID = "shape_uml_datatype_as_classifier"; //$NON-NLS-1$
+
+ public static final String SHAPE_UML_ENUMERATION_AS_CLASSIFIER_ID = "shape_uml_enumeration_as_classifier"; //$NON-NLS-1$
+
+ public static final String SHAPE_UML_INTERFACE_AS_CLASSIFIER_ID = "shape_uml_interface_as_classifier"; //$NON-NLS-1$
+
+ public static final String SHAPE_UML_PRIMITIVETYPE_AS_CLASSIFIER_ID = "shape_uml_primitivetype_as_classifier"; //$NON-NLS-1$
+
+ public static final String SHAPE_UML_SIGNAL_AS_CLASSIFIER_ID = "shape_uml_signal_as_classifier"; //$NON-NLS-1$
+
+ public static final String SHAPE_UML_PORT_AS_AFFIXED_ID = "shape_uml_port_as_affixed"; //$NON-NLS-1$
+
+ public static final String SHAPE_UML_PROPERTY_AS_AFFIXED_ID = "shape_uml_property_as_affixed"; //$NON-NLS-1$
+
+ /** Custom label nodes */
+ public static final String SHAPE_UML_CONSTRAINT_AS_LABEL_ID = "shape_uml_constraint_as_label"; //$NON-NLS-1$
+
+ public static final String SHAPE_UML_ENUMERATIONLITERAL_AS_LABEL_ID = "shape_uml_enumerationliteral_as_label"; //$NON-NLS-1$
+
+ public static final String SHAPE_UML_OPERATION_AS_LABEL_ID = "shape_uml_operation_as_label"; //$NON-NLS-1$
+
+ public static final String SHAPE_UML_PORT_AS_LABEL_ID = "shape_uml_port_as_label"; //$NON-NLS-1$
+
+ public static final String SHAPE_UML_PROPERTY_AS_LABEL_ID = "shape_uml_property_as_label"; //$NON-NLS-1$
+
+ public static final String SHAPE_UML_RECEPTION_AS_LABEL_ID = "shape_uml_reception_as_label"; //$NON-NLS-1$
+
+ /** Custom inner labels */
+ public static final String LABEL_UML_NAMEDELEMENT_NAME_ID = "label_uml_namedelement_name"; //$NON-NLS-1$
+
+ public static final String LABEL_UML_PROPERTY_LABEL_ID = "label_uml_property_label"; //$NON-NLS-1$
+
+ /** Custom affixed labels */
+ public static final String AFFIXEDLABEL_UML_APPLIEDSTEREOTYPE_ID = "affixedlabel_uml_appliedstereotype"; //$NON-NLS-1$
+
+ public static final String AFFIXEDLABEL_UML_NAMEDELEMENT_NAME_ID = "affixedlabel_uml_namedelement_name"; //$NON-NLS-1$
+
+ public static final String AFFIXEDLABEL_UML_PORT_LABEL_ID = "affixedlabel_uml_port_label"; //$NON-NLS-1$
+
+ /** Custom compartments */
+ public static final String COMPARTMENT_UML_CONSTRAINT_AS_LIST_ID = "compartment_uml_constraint_as_list"; //$NON-NLS-1$
+
+ public static final String COMPARTMENT_UML_ENUMERATIONLITERAL_AS_LIST_ID = "compartment_uml_enumerationliteral_as_list"; //$NON-NLS-1$
+
+ public static final String COMPARTMENT_UML_OPERATION_AS_LIST_ID = "compartment_uml_operation_as_list"; //$NON-NLS-1$
+
+ public static final String COMPARTMENT_UML_PORT_AS_LIST_ID = "compartment_uml_port_as_list"; //$NON-NLS-1$
+
+ public static final String COMPARTMENT_UML_PROPERTY_AS_LIST_ID = "compartment_uml_property_as_list"; //$NON-NLS-1$
+
+ /** Custom links */
+ public static final String LINK_UML_DEPENDENCY_ID = "link_uml_dependency"; //$NON-NLS-1$
+
+ public static final String LINK_UML_CONNECTOR_ID = "link_uml_connector"; //$NON-NLS-1$
+
+ public static final String LINK_UML_GENERALIZATION_ID = "link_uml_generalization"; //$NON-NLS-1$
+
+ public static final String LINK_UML_INTERFACEREALIZATION_ID = "link_uml_interfacerealization"; //$NON-NLS-1$
+
+ public static final String LINK_UML_USAGE_ID = "link_uml_usage"; //$NON-NLS-1$
+
+ /** Custom link labels */
+ public static final String LINKLABEL_UML_CONNECTOR_LABEL_ID = "linklabel_uml_connector_label"; //$NON-NLS-1$
+
+ public static final String LINKLABEL_UML_NAMEDELEMENT_NAME_ID = "linklabel_uml_namedelement_name"; //$NON-NLS-1$
+
+ public static final String LINKLABEL_UML_APPLIEDSTEREOTYPE_ID = "linklabel_uml_appliedstereotype"; //$NON-NLS-1$
+
+ public static final String LINKLABEL_UML_ASSOCIATION_SOURCE_ROLE_ID = "linklabel_uml_association_source_role"; //$NON-NLS-1$
+
+ public static final String LINKLABEL_UML_ASSOCIATION_SOURCE_MULTIPLICITY_ID = "linklabel_uml_association_source_multiplicity"; //$NON-NLS-1$
+
+ public static final String LINKLABEL_UML_ASSOCIATION_TARGET_ROLE_ID = "linklabel_uml_association_target_role"; //$NON-NLS-1$
+
+ public static final String LINKLABEL_UML_ASSOCIATION_TARGET_MULTIPLICITY_ID = "linklabel_uml_association_target_multiplicity"; //$NON-NLS-1$
+
+ public static final String LINKLABEL_UML_CONNECTOR_SOURCE_MULTIPLICITY_ID = "linklabel_uml_connector_source_multiplicity"; //$NON-NLS-1$
+
+ public static final String LINKLABEL_UML_CONNECTOR_TARGET_MULTIPLICITY_ID = "linklabel_uml_connector_target_multiplicity"; //$NON-NLS-1$
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src/org/eclipse/papyrus/sysml/diagram/common/Activator.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src/org/eclipse/papyrus/sysml/diagram/common/Activator.java
new file mode 100755
index 0000000..4437e9f
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src/org/eclipse/papyrus/sysml/diagram/common/Activator.java
@@ -0,0 +1,319 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common;
+
+import java.util.ArrayList;
+
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EClassifier;
+import org.eclipse.emf.ecore.ENamedElement;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.provider.EcoreItemProviderAdapterFactory;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory;
+import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory;
+import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.papyrus.infra.core.log.LogHelper;
+import org.eclipse.papyrus.sysml.portandflows.FlowDirection;
+import org.eclipse.papyrus.sysml.portandflows.FlowPort;
+import org.eclipse.papyrus.uml.internationalization.edit.providers.InternationalizationUMLItemProviderAdapterFactory;
+import org.eclipse.papyrus.uml.tools.providers.UMLLabelProvider;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+//import org.eclipse.papyrus.sysml.activities.provider.ActivitiesItemProviderAdapterFactory;
+//import org.eclipse.papyrus.sysml.allocations.provider.AllocationsItemProviderAdapterFactory;
+//import org.eclipse.papyrus.sysml.blocks.provider.BlocksItemProviderAdapterFactory;
+//import org.eclipse.papyrus.sysml.constraints.provider.ConstraintsItemProviderAdapterFactory;
+//import org.eclipse.papyrus.sysml.modelelements.provider.ModelelementsItemProviderAdapterFactory;
+//import org.eclipse.papyrus.sysml.portandflows.provider.PortandflowsItemProviderAdapterFactory;
+//import org.eclipse.papyrus.sysml.requirements.provider.RequirementsItemProviderAdapterFactory;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ /** The Constant ID. */
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.sysml.diagram.common"; //$NON-NLS-1$
+
+ /** Shared instance of the plug-in (singleton pattern) */
+ private static Activator plugin;
+
+ /** Logging helper */
+ public static LogHelper log;
+
+ /** The composed adapter factory */
+ private ComposedAdapterFactory adapterFactory;
+
+ /** generic label provider based on EMF facet */
+ private UMLLabelProvider labelProvider;
+
+ /** Default constructor */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+
+ // register the login helper
+ log = new LogHelper(plugin);
+
+ // prepare the composed adapter factory
+ adapterFactory = createAdapterFactory();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ adapterFactory.dispose();
+ adapterFactory = null;
+ if (labelProvider != null) {
+ labelProvider.dispose();
+ labelProvider = null;
+ }
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getInstance() {
+ return plugin;
+ }
+
+ /**
+ * Returns an image descriptor for the image file at the given plug-in relative path.
+ *
+ * @generated
+ * @param path
+ * the path
+ * @return the image descriptor
+ */
+ public static ImageDescriptor getBundledImageDescriptor(String path) {
+ return AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, path);
+ }
+
+ /**
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#getPreferenceStore()
+ *
+ * @return Shared Preference Store.
+ */
+ @Override
+ public IPreferenceStore getPreferenceStore() {
+ IPreferenceStore store = org.eclipse.papyrus.infra.gmfdiag.preferences.Activator.getDefault().getPreferenceStore();
+ return store;
+ }
+
+ /**
+ * Get the item provider adapter factory.
+ *
+ * @return the adapter factory.
+ */
+ public AdapterFactory getItemProvidersAdapterFactory() {
+ return adapterFactory;
+ }
+
+ /**
+ * Get an image descriptor for current item.
+ *
+ * @param item
+ * the item for which an image descriptor searched.
+ * @return the image descriptor.
+ */
+ public ImageDescriptor getItemImageDescriptor(Object item) {
+ IItemLabelProvider labelProvider = (IItemLabelProvider) adapterFactory.adapt(item, IItemLabelProvider.class);
+ if (labelProvider != null) {
+ return ExtendedImageRegistry.getInstance().getImageDescriptor(labelProvider.getImage(item));
+ }
+ return null;
+ }
+
+ /**
+ * Get an image for a ENamedElement in plug-in image registry.
+ *
+ * @param element
+ * the element.
+ * @return the image.
+ */
+ public Image getImage(ENamedElement element) {
+
+ String imageKey = element.getName();
+
+ Image image = getImageRegistry().get(imageKey);
+ if (image == null) {
+ ImageDescriptor imageDescriptor = getProvidedImageDescriptor(element);
+ if (imageDescriptor == null) {
+ imageDescriptor = ImageDescriptor.getMissingImageDescriptor();
+ }
+ getImageRegistry().put(imageKey, imageDescriptor);
+ image = getImageRegistry().get(imageKey);
+ }
+ return image;
+ }
+
+ /**
+ * <pre>
+ * Provide a FlowPort image for border edit part that take the border item position
+ * into account.
+ *
+ * The image is not rotated, but predefined.
+ *
+ * The side of the image (relatively to the parent figure) can be:
+ * <ul>
+ * <li>{@linkplain PositionConstants#NORTH}</li>
+ * <li> {@linkplain PositionConstants#SOUTH}</li>
+ * <li> {@linkplain PositionConstants#EAST}</li>
+ * <li> {@linkplain PositionConstants#WEST}</li>
+ * <li> {@linkplain PositionConstants#NORTH_EAST}</li>
+ * <li> {@linkplain PositionConstants#NORTH_WEST}</li>
+ * <li> {@linkplain PositionConstants#SOUTH_EAST}</li>
+ * <li> {@linkplain PositionConstants#SOUTH_WEST}</li>
+ * </ul>
+ *
+ * </pre>
+ */
+ public Image getFlowPortImage(FlowPort flowport, int side) {
+
+ // Prepare the image key
+ String imageKey = "FlowPort_";
+ if (flowport.isAtomic()) {
+ if (flowport.getDirection() == FlowDirection.IN) {
+ imageKey = imageKey + "IN_";
+ } else if (flowport.getDirection() == FlowDirection.OUT) {
+ imageKey = imageKey + "OUT_";
+ } else if (flowport.getDirection() == FlowDirection.INOUT) {
+ imageKey = imageKey + "INOUT_";
+ }
+
+ imageKey = imageKey + "A_";
+ } else {
+ imageKey = imageKey + "NA_";
+ }
+
+ if (side == PositionConstants.WEST) {
+ imageKey = imageKey + "WEST";
+ } else if (side == PositionConstants.NORTH) {
+ imageKey = imageKey + "NORTH";
+ } else if (side == PositionConstants.SOUTH) {
+ imageKey = imageKey + "SOUTH";
+ } else if (side == PositionConstants.EAST) {
+ imageKey = imageKey + "EAST";
+ } else if (side == PositionConstants.NORTH_WEST) {
+ imageKey = imageKey + "NORTH_WEST";
+ } else if (side == PositionConstants.NORTH_EAST) {
+ imageKey = imageKey + "NORTH_EAST";
+ } else if (side == PositionConstants.SOUTH_EAST) {
+ imageKey = imageKey + "SOUTH_EAST";
+ } else if (side == PositionConstants.SOUTH_WEST) {
+ imageKey = imageKey + "SOUTH_WEST";
+ }
+
+ // Retrieve image from registry or add it in the registry
+ Image image = getImageRegistry().get(imageKey);
+ if (image == null) {
+
+ ImageDescriptor imageDescriptor = imageDescriptorFromPlugin(PLUGIN_ID, "/icons/flowports/" + imageKey + ".gif");
+
+ if (imageDescriptor == null) {
+ imageDescriptor = ImageDescriptor.getMissingImageDescriptor();
+ }
+ getImageRegistry().put(imageKey, imageDescriptor);
+ image = getImageRegistry().get(imageKey);
+ }
+
+ return image;
+ }
+
+ /**
+ * Returns a label provider supported by EMF Facet
+ *
+ * @return a label provider supported by EMF Facet
+ */
+ public ILabelProvider getLabelProvider() {
+ if (labelProvider == null) {
+ // add a generic label provider for sysml elements
+ labelProvider = new UMLLabelProvider();
+ }
+ return labelProvider;
+ }
+
+ /**
+ * Create a new Composed adapter factory for this plug-in.
+ */
+ protected ComposedAdapterFactory createAdapterFactory() {
+ ArrayList<AdapterFactory> factories = new ArrayList<AdapterFactory>();
+
+ // Add SysML adapters
+ // factories.add(new ActivitiesItemProviderAdapterFactory());
+ // factories.add(new AllocationsItemProviderAdapterFactory());
+ // factories.add(new BlocksItemProviderAdapterFactory());
+ // factories.add(new ConstraintsItemProviderAdapterFactory());
+ // factories.add(new ModelelementsItemProviderAdapterFactory());
+ // factories.add(new PortandflowsItemProviderAdapterFactory());
+ // factories.add(new RequirementsItemProviderAdapterFactory());
+ // Add UML adapter
+ factories.add(new InternationalizationUMLItemProviderAdapterFactory());
+
+ // Other adapters
+ factories.add(new EcoreItemProviderAdapterFactory());
+ factories.add(new ResourceItemProviderAdapterFactory());
+ factories.add(new ReflectiveItemProviderAdapterFactory());
+ return new ComposedAdapterFactory(factories);
+ }
+
+ private ImageDescriptor getProvidedImageDescriptor(ENamedElement element) {
+ if (element instanceof EStructuralFeature) {
+ EStructuralFeature feature = ((EStructuralFeature) element);
+ EClass eContainingClass = feature.getEContainingClass();
+ EClassifier eType = feature.getEType();
+ if (eContainingClass != null && !eContainingClass.isAbstract()) {
+ element = eContainingClass;
+ } else if (eType instanceof EClass && !((EClass) eType).isAbstract()) {
+ element = eType;
+ }
+ }
+ if (element instanceof EClass) {
+ EClass eClass = (EClass) element;
+ if (!eClass.isAbstract()) {
+ return getItemImageDescriptor(eClass.getEPackage().getEFactoryInstance().create(eClass));
+ }
+ }
+ // TODO : support structural features
+ return null;
+ }
+
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src/org/eclipse/papyrus/sysml/diagram/common/commands/CreateSysMLModelCommand.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src/org/eclipse/papyrus/sysml/diagram/common/commands/CreateSysMLModelCommand.java
new file mode 100755
index 0000000..600ca08
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src/org/eclipse/papyrus/sysml/diagram/common/commands/CreateSysMLModelCommand.java
@@ -0,0 +1,67 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.commands;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.sysml.util.SysmlResource;
+import org.eclipse.papyrus.uml.diagram.common.commands.ModelCreationCommandBase;
+import org.eclipse.papyrus.uml.tools.utils.PackageUtil;
+import org.eclipse.uml2.uml.Profile;
+import org.eclipse.uml2.uml.UMLFactory;
+
+
+/**
+ * The Class CreateSysMLModelCommand.
+ */
+public class CreateSysMLModelCommand extends ModelCreationCommandBase {
+
+ /**
+ * @see org.eclipse.papyrus.infra.core.extension.commands.ModelCreationCommandBase#createRootElement()
+ *
+ * @return
+ */
+
+ @Override
+ protected EObject createRootElement() {
+ return UMLFactory.eINSTANCE.createModel();
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.core.extension.commands.ModelCreationCommandBase#initializeModel(org.eclipse.emf.ecore.EObject)
+ *
+ * @param owner
+ */
+
+ @Override
+ protected void initializeModel(EObject owner) {
+ super.initializeModel(owner);
+ ((org.eclipse.uml2.uml.Package) owner).setName(getModelName());
+
+ // Retrieve SysML profile and apply with Sub-profile
+ Profile sysml = (Profile) PackageUtil.loadPackage(URI.createURI(SysmlResource.SYSML_PROFILE_URI), owner.eResource().getResourceSet());
+ if (sysml != null) {
+ PackageUtil.applyProfile(((org.eclipse.uml2.uml.Package) owner), sysml, true);
+ }
+ }
+
+ /**
+ * Gets the model name.
+ *
+ * @return the model name
+ */
+ protected String getModelName() {
+ return "SysMLmodel";
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src/org/eclipse/papyrus/sysml/diagram/common/strategy/paste/PartPasteStrategy.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src/org/eclipse/papyrus/sysml/diagram/common/strategy/paste/PartPasteStrategy.java
new file mode 100755
index 0000000..ec0a181
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src/org/eclipse/papyrus/sysml/diagram/common/strategy/paste/PartPasteStrategy.java
@@ -0,0 +1,364 @@
+/*****************************************************************************
+ * Copyright (c) 2014, 2016 CEA LIST, Esterel Technologies SAS and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Benoit Maggi (CEA LIST) benoit.maggi@cea.fr - Initial API and implementation
+ * Sebastien Bordes (Esterel Technologies SAS) - Bug 497816
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.strategy.paste;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.eclipse.emf.common.command.CompoundCommand;
+import org.eclipse.emf.common.util.BasicEList;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.MoveRequest;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.commands.wrappers.EMFtoGEFCommandWrapper;
+import org.eclipse.papyrus.infra.core.clipboard.IClipboardAdditionalData;
+import org.eclipse.papyrus.infra.core.clipboard.PapyrusClipboard;
+import org.eclipse.papyrus.infra.emf.gmf.command.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.infra.gmfdiag.common.strategy.paste.DefaultPasteStrategy;
+import org.eclipse.papyrus.infra.gmfdiag.common.strategy.paste.IPasteStrategy;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.sysml.blocks.Block;
+import org.eclipse.papyrus.uml.diagram.common.Activator;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.uml2.uml.Association;
+import org.eclipse.uml2.uml.Classifier;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+/**
+ * Offer a strategy for copying stereotypes.
+ */
+public class PartPasteStrategy implements IPasteStrategy {
+
+ /** The instance. */
+ private static IPasteStrategy instance = new PartPasteStrategy();
+
+ /**
+ * Gets the single instance of StereotypePasteStrategy.
+ *
+ * @return single instance of StereotypePasteStrategy
+ */
+ public static IPasteStrategy getInstance() {
+ return instance;
+ }
+
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.strategy.paste.IPasteStrategy#getLabel()
+ */
+ @Override
+ public String getLabel() {
+ return "partPasteStrategy"; //$NON-NLS-1$
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.strategy.paste.IPasteStrategy#getID()
+ */
+ @Override
+ public String getID() {
+ return Activator.ID + ".partPasteStrategy"; //$NON-NLS-1$
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.strategy.paste.IPasteStrategy#getDescription()
+ */
+ @Override
+ public String getDescription() {
+ return "Paste part elements with association"; //$NON-NLS-1$
+ }
+
+ /**
+ * Gets the category id.
+ *
+ * @return the category id
+ */
+ public String getCategoryID() {
+ return "org.eclipse.papyrus.strategy.paste"; //$NON-NLS-1$
+ }
+
+ /**
+ * Gets the category label.
+ *
+ * @return the category label
+ */
+ public String getCategoryLabel() {
+ return "Paste all copied elements"; //$NON-NLS-1$
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.strategy.paste.IPasteStrategy#getImage()
+ */
+ @Override
+ @Deprecated
+ public Image getImage() {
+ return null;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.strategy.paste.IPasteStrategy#getPriority()
+ */
+ @Override
+ @Deprecated
+ public int getPriority() {
+ return 1;
+ }
+
+ /**
+ * Sets the options.
+ *
+ * @param options
+ * the options
+ */
+ public void setOptions(Map<String, Object> options) {
+ // Nothing
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.strategy.paste.IPasteStrategy#getSemanticCommand(org.eclipse.emf.edit.domain.EditingDomain,
+ * org.eclipse.emf.ecore.EObject, org.eclipse.papyrus.infra.core.clipboard.PapyrusClipboard)
+ */
+ @Override
+ public org.eclipse.emf.common.command.Command getSemanticCommand(EditingDomain domain, EObject targetOwner, PapyrusClipboard<Object> papyrusClipboard) {
+ if (targetOwner instanceof Classifier || targetOwner instanceof Package) { // test if block or package
+ // get affiliate AdditionnalData
+ Map<Object, ?> additionalDataMap = papyrusClipboard.getAdditionalDataForStrategy(getID());
+ if (additionalDataMap != null) {
+ CompoundCommand compoundCommand = new CompoundCommand("Copy associations for parts"); //$NON-NLS-1$
+ for (Iterator<Object> iterator = papyrusClipboard.iterator(); iterator.hasNext();) {
+ Object object = iterator.next();
+ EObject target = papyrusClipboard.getTragetCopyFromInternalClipboardCopy(object);
+ Object additionnalData = additionalDataMap.get(object);
+ EList<Association> listDuplicatedAssociation = new BasicEList<Association>();
+ EObject associationContainer = null;
+ if (target != null && target instanceof Property && targetOwner instanceof Classifier && additionnalData instanceof PartAdditionalData) { // test if it is a part
+ Classifier block = (Classifier) targetOwner;
+ Property property = (Property) target;
+ PartAdditionalData partAdditionalData = (PartAdditionalData) additionnalData;
+ Association newAssociation = partAdditionalData.getDuplicatedAssociation();
+ restoreAssociationPartContext(block, property, newAssociation);
+ listDuplicatedAssociation.add(newAssociation);
+ associationContainer = block.eContainer();
+ } else if (target != null && target instanceof Classifier && targetOwner instanceof Package && additionnalData instanceof PartBlockAdditionalData) { // test if it is a block
+ Classifier classifier = (Classifier) target;
+ EList<Property> allAttributes = classifier.getAllAttributes();
+ PartBlockAdditionalData partBlockAdditionalData = (PartBlockAdditionalData) additionnalData;
+ for (Property property : allAttributes) {
+ Association duplicatedAssociation = partBlockAdditionalData.getDuplicatedAssociationByPropertyName(property.getName());
+ if (duplicatedAssociation != null) {
+ restoreAssociationPartContext(classifier, property, duplicatedAssociation);
+ listDuplicatedAssociation.add(duplicatedAssociation);
+ }
+ }
+ associationContainer = targetOwner;
+ }
+ if (associationContainer != null && !listDuplicatedAssociation.isEmpty()) {
+ // add associations to the nearest container
+ MoveRequest moveRequest = new MoveRequest(associationContainer, listDuplicatedAssociation);
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(targetOwner);
+ if (provider != null) {
+ ICommand editCommand = provider.getEditCommand(moveRequest);
+ if (editCommand != null) {
+ GMFtoEMFCommandWrapper gmFtoEMFCommandWrapper = new GMFtoEMFCommandWrapper(editCommand);
+ compoundCommand.append(gmFtoEMFCommandWrapper);
+ }
+ }
+ }
+ }
+ // An empty command can't be executed
+ if (compoundCommand.getCommandList().isEmpty()) {
+ return null;
+ }
+ return compoundCommand;
+ }
+ }
+ return null;
+ }
+
+
+
+
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.strategy.paste.IPasteStrategy#getGraphicalCommand(org.eclipse.emf.edit.domain.EditingDomain,
+ * org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart, org.eclipse.papyrus.infra.core.clipboard.PapyrusClipboard)
+ */
+ @Override
+ public Command getGraphicalCommand(EditingDomain domain, org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart targetEditPart, PapyrusClipboard<Object> papyrusClipboard) {
+ View targetView = (View) targetEditPart.getModel();
+ EObject targetOwner = targetView.getElement();
+ org.eclipse.emf.common.command.Command semanticCommand = getSemanticCommand(domain, targetOwner, papyrusClipboard);
+ if (semanticCommand != null) {
+ org.eclipse.gef.commands.CompoundCommand compoundCommand = new org.eclipse.gef.commands.CompoundCommand("Association Part Semantic And Graphical paste"); //$NON-NLS-1$
+ EMFtoGEFCommandWrapper emFtoGEFCommandWrapper = new EMFtoGEFCommandWrapper(semanticCommand);
+ compoundCommand.add(emFtoGEFCommandWrapper);
+ return compoundCommand;
+ }
+ return null;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.strategy.paste.IPasteStrategy#dependsOn()
+ */
+ @Override
+ public IPasteStrategy dependsOn() {
+ return DefaultPasteStrategy.getInstance();
+ }
+
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.strategy.paste.IPasteStrategy#prepare(org.eclipse.papyrus.infra.core.clipboard.PapyrusClipboard)
+ */
+ @Override
+ public void prepare(PapyrusClipboard<Object> papyrusClipboard, Collection<EObject> selection) {
+ Map<Object, IClipboardAdditionalData> mapCopyPartData = new HashMap<Object, IClipboardAdditionalData>();
+ for (Iterator<EObject> iterator = papyrusClipboard.iterateOnSource(); iterator.hasNext();) {
+ EObject eObjectSource = iterator.next();
+ if (eObjectSource instanceof Element) {
+ Element elementSource = (Element) eObjectSource;
+ IClipboardAdditionalData clipboardAdditionalData = null;
+ if (elementSource instanceof Property && UMLUtil.getStereotypeApplication(elementSource.getOwner(), Block.class) != null) { // is part
+ Property propertySource = (Property) elementSource;
+ Association association = propertySource.getAssociation();
+ if (association != null) {
+ clipboardAdditionalData = new PartAdditionalData(association);
+ }
+ } else if (elementSource instanceof Classifier && UMLUtil.getStereotypeApplication(elementSource, Block.class) != null) {// is Block
+ Classifier block = (Classifier) elementSource;
+ clipboardAdditionalData = new PartBlockAdditionalData(block);
+ }
+ if (clipboardAdditionalData != null) {
+ Object copy = papyrusClipboard.getCopyFromSource(eObjectSource);
+ mapCopyPartData.put(copy, clipboardAdditionalData);
+ }
+ }
+
+ }
+ papyrusClipboard.pushAdditionalData(getID(), mapCopyPartData);
+ }
+
+
+ /**
+ * Duplicate the association
+ *
+ * @param association
+ * @return
+ */
+ protected Association duplicateAssociation(Association association) {
+ EcoreUtil.Copier copier = new EcoreUtil.Copier();
+ copier.copy(association);
+ EObject eObject = copier.get(association);
+ return (Association) eObject;
+ }
+
+ /**
+ * Init the association in the new context
+ *
+ * @param classifier
+ * @param property
+ * @param association
+ */
+ protected void restoreAssociationPartContext(Classifier classifier, Property property, Association association) {
+ EList<Property> memberEnds = association.getMemberEnds(); // should have only one element
+ if (memberEnds != null && !memberEnds.isEmpty()) {
+ Property blockProperty = memberEnds.get(0);
+ blockProperty.setType(classifier);
+ }
+ memberEnds.add(property);
+ }
+
+
+ /**
+ * The Class PartAdditionalData.
+ */
+ protected class PartAdditionalData implements IClipboardAdditionalData {
+
+ /** The association. */
+ protected Association asssociation;
+
+ /**
+ * @param association
+ */
+ public PartAdditionalData(Association asssociation) {
+ this.asssociation = duplicateAssociation(asssociation);
+ }
+
+ /**
+ * @return a copy of the association
+ */
+ public Association getDuplicatedAssociation() {
+ return duplicateAssociation(asssociation);
+ }
+
+ }
+
+ /**
+ * The Class PartBlockAdditionalData.
+ */
+ protected class PartBlockAdditionalData implements IClipboardAdditionalData {
+
+ /** The associations by property name. */
+ protected Map<String, Association> mapPropertyNameToAssociation;
+
+ /**
+ * @param block
+ */
+ public PartBlockAdditionalData(Classifier block) {
+ this.mapPropertyNameToAssociation = new HashMap<String, Association>();
+ EList<Property> allAttributes = block.getAllAttributes();
+ for (Property property : allAttributes) {
+ Association association = property.getAssociation();
+ Association newAssociation = duplicateAssociation(association);
+ mapPropertyNameToAssociation.put(property.getName(), newAssociation);
+ }
+
+ }
+
+ /**
+ * @param propertyName
+ * @return a copy of the association
+ */
+ public Association getDuplicatedAssociationByPropertyName(String propertyName) {
+ Association association = mapPropertyNameToAssociation.get(propertyName);
+ return duplicateAssociation(association);
+ }
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src/org/eclipse/papyrus/sysml/diagram/common/utils/ConstraintBlockHelper.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src/org/eclipse/papyrus/sysml/diagram/common/utils/ConstraintBlockHelper.java
new file mode 100755
index 0000000..bb21d0c
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src/org/eclipse/papyrus/sysml/diagram/common/utils/ConstraintBlockHelper.java
@@ -0,0 +1,62 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.utils;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.constraints.ConstraintBlock;
+import org.eclipse.papyrus.sysml.constraints.ConstraintProperty;
+import org.eclipse.papyrus.uml.diagram.common.helper.ElementHelper;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+public class ConstraintBlockHelper extends ElementHelper {
+
+ public static boolean couldBeConstraintParameter(EObject possibleContraintParameter, EObject ownerConstraintBlock) {
+ if (!(ownerConstraintBlock instanceof org.eclipse.uml2.uml.Class && UMLUtil.getStereotypeApplication((Element) ownerConstraintBlock, ConstraintBlock.class) != null)) {
+ return false;
+ }
+ return UMLUtil.getStereotypeApplication((Element) possibleContraintParameter, ConstraintProperty.class) == null;
+ }
+
+ public static boolean isConstraintParameter(Element element, View view) {
+ if (element instanceof Property) {
+ Property constraintProperty = (Property) element;
+ Element ownerConstraintBlock = constraintProperty.getOwner();
+ if (ownerConstraintBlock instanceof org.eclipse.uml2.uml.Class && UMLUtil.getStereotypeApplication(ownerConstraintBlock, ConstraintBlock.class) != null) {
+ // check for graphics : owned by a constraintProperty
+ if (view != null) {
+ View containerView = ViewUtil.getContainerView(view);
+ Element containerElement = (Element) containerView.getElement();
+ // Owned by a ConstraintProperty
+ if (containerElement instanceof Property
+ && UMLUtil.getStereotypeApplication(containerElement, ConstraintProperty.class) != null
+ && ((Property) containerElement).getType() == ownerConstraintBlock) {
+ return true;
+ }
+ // Owned by a ConstraintBlock
+ if (containerElement instanceof org.eclipse.uml2.uml.Class
+ && UMLUtil.getStereotypeApplication(containerElement, ConstraintBlock.class) != null
+ && containerElement == ownerConstraintBlock) {
+ return true;
+ }
+ }
+ }
+ }
+ return false;
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src/org/eclipse/papyrus/sysml/diagram/common/utils/SysMLCreateOrShowExistingElementHelper.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src/org/eclipse/papyrus/sysml/diagram/common/utils/SysMLCreateOrShowExistingElementHelper.java
new file mode 100755
index 0000000..b8a2e6c
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src/org/eclipse/papyrus/sysml/diagram/common/utils/SysMLCreateOrShowExistingElementHelper.java
@@ -0,0 +1,299 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Fanch Bonnabesse (ALL4TEC) fanch.bonnabesse@alltec.net - Bug 478288, 419357
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.diagram.common.utils;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.services.edit.utils.RequestParameterConstants;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.sysml.service.types.utils.ConnectorUtils;
+import org.eclipse.papyrus.uml.diagram.common.helper.CreateOrShowExistingElementHelper;
+import org.eclipse.papyrus.uml.diagram.common.helper.ILinkMappingHelper;
+import org.eclipse.papyrus.uml.diagram.common.util.AssociationUtil;
+import org.eclipse.papyrus.uml.diagram.common.util.LinkEndsMapper;
+import org.eclipse.uml2.uml.AggregationKind;
+import org.eclipse.uml2.uml.Association;
+import org.eclipse.uml2.uml.Connector;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * Show Existing Link Helper for SysML. This class provides specific management for SysML Association.
+ *
+ * @author VL222926
+ *
+ */
+public class SysMLCreateOrShowExistingElementHelper extends CreateOrShowExistingElementHelper {
+
+ /**
+ *
+ * Constructor.
+ *
+ */
+ public SysMLCreateOrShowExistingElementHelper() {
+ super();
+ }
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param linkHelper
+ */
+ public SysMLCreateOrShowExistingElementHelper(final ILinkMappingHelper linkHelper) {
+ super(linkHelper);
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.uml.diagram.common.helper.CreateOrShowExistingElementHelper#getIElementTypeNameToDisplay(org.eclipse.gmf.runtime.emf.type.core.IElementType)
+ *
+ * @param elementType
+ * @return
+ */
+ @Override
+ protected String getIElementTypeNameToDisplay(final IElementType elementType) {
+ if (SysMLElementTypes.ASSOCIATION_NONE.equals(elementType) || SysMLElementTypes.ASSOCIATION_NONE_DIRECTED.equals(elementType)) {
+ return "Association/DirectAssociation"; //$NON-NLS-1$
+ } else if (SysMLElementTypes.ASSOCIATION_COMPOSITE.equals(elementType) || SysMLElementTypes.ASSOCIATION_COMPOSITE_DIRECTED.equals(elementType)) {
+ return "Composition/DirectComposition"; //$NON-NLS-1$
+ } else if (SysMLElementTypes.ASSOCIATION_SHARED.equals(elementType) || SysMLElementTypes.ASSOCIATION_SHARED_DIRECTED.equals(elementType)) {
+ return "Aggregation/DirectAggregation"; //$NON-NLS-1$
+ }
+ return super.getIElementTypeNameToDisplay(elementType);
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.uml.diagram.common.helper.CreateOrShowExistingElementHelper#hasWantedType(org.eclipse.emf.ecore.EObject, org.eclipse.gmf.runtime.emf.type.core.IElementType)
+ *
+ * @param eobject
+ * an eobject
+ * @param wantedType
+ * the wanted element type
+ * @return
+ * true if the eobject is an instance of the wanted element type.
+ *
+ * Add test for SysML Association
+ */
+ @Override
+ protected boolean hasWantedType(final EObject eobject, final IElementType wantedType) {
+ boolean result = super.hasWantedType(eobject, wantedType);
+ if (result) {
+ if (eobject instanceof Association) {
+ Association association = (Association) eobject;
+ // Skip incomplete associations: it can't be a duplicate of the current link (Which has a source and a target)
+ if (association.getMemberEnds().size() < 2) {
+ return false;
+ }
+
+ final AggregationKind current = getAssociationAggregationKind((Association) eobject);
+ if (current == AggregationKind.NONE_LITERAL) {
+ if (SysMLElementTypes.ASSOCIATION_NONE.equals(current) || SysMLElementTypes.ASSOCIATION_NONE_DIRECTED.equals(wantedType)) {
+ result = true;
+ }
+ } else if (current == AggregationKind.COMPOSITE_LITERAL) {
+ if (SysMLElementTypes.ASSOCIATION_COMPOSITE.equals(current) || SysMLElementTypes.ASSOCIATION_COMPOSITE_DIRECTED.equals(wantedType)) {
+ result = true;
+ }
+ } else if (current == AggregationKind.SHARED_LITERAL) {
+ if (SysMLElementTypes.ASSOCIATION_SHARED.equals(current) || SysMLElementTypes.ASSOCIATION_SHARED_DIRECTED.equals(wantedType)) {
+ result = true;
+ }
+ } else {
+ result = false;
+ }
+ }
+ }
+ return result;
+ }
+
+ /**
+ *
+ * @param association
+ * an association
+ * @return
+ * the association kind for the association
+ */
+ private static final AggregationKind getAssociationAggregationKind(final Association association) {
+ // Incomplete associations
+ if (association.getMemberEnds().size() < 2) {
+ return AggregationKind.NONE_LITERAL;
+ }
+
+ final Property source = association.getMemberEnds().get(0);
+ final Property target = association.getMemberEnds().get(1);
+
+ if (source.getAggregation() == AggregationKind.NONE_LITERAL && target.getAggregation() == AggregationKind.NONE_LITERAL) {
+ return AggregationKind.NONE_LITERAL;
+ } else if ((source.getAggregation() == AggregationKind.COMPOSITE_LITERAL) || (target.getAggregation() == AggregationKind.COMPOSITE_LITERAL)) {
+ return AggregationKind.COMPOSITE_LITERAL;
+ } else {
+ return AggregationKind.SHARED_LITERAL;
+ }
+
+ }
+
+ /**
+ * @param request
+ * the request for the creation
+ * @param wantedEClass
+ * @return
+ * a list of {@link EdgeEndsMapper} referencing the existing links between the source and the target
+ */
+ @Override
+ protected List<LinkEndsMapper> getExistingLinksBetweenSourceAndTarget(final CreateRelationshipRequest request, final IElementType wantedElementType) {
+ List<LinkEndsMapper> existingElement = null;
+
+ final EClass wantedEClass = wantedElementType.getEClass();
+
+ if (UMLPackage.eINSTANCE.getConnector().equals(wantedEClass)) {
+ EList<Element> ownedElements = ((Element) request.getContainer()).getOwnedElements();
+
+ existingElement = new ArrayList<LinkEndsMapper>();
+
+ for (final Element current : ownedElements) {
+ if (hasWantedType(current, wantedElementType)) {
+ final Collection<?> sources = this.linkMappingHelper.getSource(current);
+ final Collection<?> targets = this.linkMappingHelper.getTarget(current);
+
+ if (sources.contains(request.getSource()) && targets.contains(request.getTarget())) {
+ // we verify the nestedPath before to propose to restore a connector
+ View sourceView = (View) request.getParameter(RequestParameterConstants.EDGE_CREATE_REQUEST_SOURCE_VIEW);
+ View targetView = (View) request.getParameter(RequestParameterConstants.EDGE_CREATE_REQUEST_TARGET_VIEW);
+ boolean canBeDisplayed = ConnectorUtils.canDisplayExistingConnectorBetweenViewsAccordingToNestedPaths((Connector) current, sourceView, targetView);
+ if (canBeDisplayed) {
+ existingElement.add(new LinkEndsMapper(current, sources, null, null));
+ }
+ }
+ }
+ }
+
+ } else if (UMLPackage.eINSTANCE.getAssociation().equals(wantedEClass)) {
+ final EList<Element> ownedElements = ((Element) request.getContainer()).getOwnedElements();
+
+ existingElement = new ArrayList<LinkEndsMapper>();
+
+ for (final Element current : ownedElements) {
+ if (hasWantedType(current, wantedElementType)) {
+ final Collection<?> sources = this.linkMappingHelper.getSource(current);
+ final Collection<?> targets = this.linkMappingHelper.getTarget(current);
+
+ if (sources.contains(request.getSource()) && targets.contains(request.getTarget()) && (current instanceof Association)) {
+ boolean identicalAssociation = compareMembers(current, request, wantedElementType);
+
+ if (identicalAssociation) {
+ existingElement.add(new LinkEndsMapper(current, sources, null, null));
+ }
+ }
+ }
+ }
+ } else {
+ existingElement = super.getExistingLinksBetweenSourceAndTarget(request, wantedElementType);
+ }
+
+ return existingElement;
+ }
+
+ /**
+ * Manages all the members of the current relationship to compare with a new relationship.
+ *
+ * @param current
+ * The element to compare with the created element.
+ * @param request
+ * The creation relationship request.
+ * @param wantedElementType
+ * The type of the created relationship.
+ * @return The result of the comparison.
+ */
+ private boolean compareMembers(final Element current, final CreateRelationshipRequest request, final IElementType wantedElementType) {
+ boolean identicalAssociation = true;
+
+ final Iterator<Property> iterator = ((Association) current).getMemberEnds().iterator();
+
+ while (iterator.hasNext() && identicalAssociation) {
+ final Property property = iterator.next();
+
+ final boolean source = request.getSource().equals(property.getType());
+
+ boolean expectedNavigable = true;
+ AggregationKind expectedAggregation = AggregationKind.NONE_LITERAL;
+
+ // Handle of all types of Association in SysML
+ if (SysMLElementTypes.ASSOCIATION_NONE_DIRECTED.equals(wantedElementType)) {
+ if (source) {
+ expectedNavigable = false;
+ }
+
+ if (!AssociationUtil.isIdenticalProperties(expectedNavigable, expectedAggregation, property)) {
+ identicalAssociation = false;
+ }
+ } else if (SysMLElementTypes.ASSOCIATION_NONE.equals(wantedElementType)) {
+ if (!AssociationUtil.isIdenticalProperties(expectedNavigable, expectedAggregation, property)) {
+ identicalAssociation = false;
+ }
+ } else if (SysMLElementTypes.ASSOCIATION_COMPOSITE_DIRECTED.equals(wantedElementType)) {
+ if (source) {
+ expectedNavigable = false;
+ } else {
+ expectedAggregation = AggregationKind.COMPOSITE_LITERAL;
+ }
+
+ if (!AssociationUtil.isIdenticalProperties(expectedNavigable, expectedAggregation, property)) {
+ identicalAssociation = false;
+ }
+ } else if (SysMLElementTypes.ASSOCIATION_COMPOSITE.equals(wantedElementType)) {
+ if (!source) {
+ expectedAggregation = AggregationKind.COMPOSITE_LITERAL;
+ }
+
+ if (!AssociationUtil.isIdenticalProperties(expectedNavigable, expectedAggregation, property)) {
+ identicalAssociation = false;
+ }
+ } else if (SysMLElementTypes.ASSOCIATION_SHARED_DIRECTED.equals(wantedElementType)) {
+ if (source) {
+ expectedNavigable = false;
+ } else {
+ expectedAggregation = AggregationKind.SHARED_LITERAL;
+ }
+
+ if (!AssociationUtil.isIdenticalProperties(expectedNavigable, expectedAggregation, property)) {
+ identicalAssociation = false;
+ }
+ } else if (SysMLElementTypes.ASSOCIATION_SHARED.equals(wantedElementType)) {
+ if (!source) {
+ expectedAggregation = AggregationKind.SHARED_LITERAL;
+ }
+
+ if (!AssociationUtil.isIdenticalProperties(expectedNavigable, expectedAggregation, property)) {
+ identicalAssociation = false;
+ }
+ }
+ }
+
+ return identicalAssociation;
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src/org/eclipse/papyrus/sysml/diagram/common/utils/SysMLMultiplicityElementUtil.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src/org/eclipse/papyrus/sysml/diagram/common/utils/SysMLMultiplicityElementUtil.java
new file mode 100755
index 0000000..8237373
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src/org/eclipse/papyrus/sysml/diagram/common/utils/SysMLMultiplicityElementUtil.java
@@ -0,0 +1,22 @@
+package org.eclipse.papyrus.sysml.diagram.common.utils;
+
+import java.util.Collection;
+
+import org.eclipse.papyrus.sysml.diagram.common.preferences.ILabelPreferenceConstants;
+import org.eclipse.uml2.uml.MultiplicityElement;
+
+
+public class SysMLMultiplicityElementUtil extends org.eclipse.papyrus.uml.tools.utils.MultiplicityElementUtil {
+
+ /**
+ * If multiplicity is [1] (SysML default), only show when explicitly asked.
+ */
+ public static String formatMultiplicity(MultiplicityElement element, Collection<String> maskValues) {
+ return formatMultiplicity(element, !maskValues.contains(ILabelPreferenceConstants.DISP_DEFAULT_MULTIPLICITY));
+ }
+
+ public static String formatMultiplicity(MultiplicityElement element, boolean blockDefault) {
+ String result = formatMultiplicity(element);
+ return manageDefaultMultiplicity(result, blockDefault);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src/org/eclipse/papyrus/sysml/diagram/common/utils/SysMLSelectionTester.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src/org/eclipse/papyrus/sysml/diagram/common/utils/SysMLSelectionTester.java
new file mode 100755
index 0000000..fc6b90e
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.common/src/org/eclipse/papyrus/sysml/diagram/common/utils/SysMLSelectionTester.java
@@ -0,0 +1,149 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.common.utils;
+
+import org.eclipse.core.expressions.PropertyTester;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.papyrus.infra.core.resource.NotFoundException;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.ui.util.ServiceUtilsForSelection;
+import org.eclipse.papyrus.sysml.diagram.common.Activator;
+import org.eclipse.papyrus.uml.tools.model.UmlModel;
+import org.eclipse.uml2.uml.Package;
+
+/**
+ * This class is a Property tester used to check is current model (meaning the model currently opened in Papyrus) is a SysML Model.
+ * This class is used in order to create test for deciding whether a diagram creation command should be visible or not.
+ * This property tester assumes that currently active editor is Papyrus, it should be used with care (simultaneously with a test to ensure Papyrus is
+ * currently opened and active).
+ *
+ */
+public class SysMLSelectionTester extends PropertyTester {
+
+ /** Tester ID for SysML Model nature. This is currently a test on: is this a blocks profiles package... */
+ public final static String IS_SYSML_MODEL = "isSysMLModel";
+
+ /** Tester ID for SysML Requirements Model nature */
+ public final static String IS_SYSML_REQUIREMENTS_MODEL = "isSysMLRequirementsModel";
+
+ /** Tester ID for SysML Blocks Model nature */
+ public final static String IS_SYSML_BLOCKS_MODEL = "isSysMLBlocksModel";
+
+ /** Default constructor */
+ public SysMLSelectionTester() {
+ }
+
+ /** Test the receiver against the selected property */
+ @Override
+ public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
+
+ // Ensure Papyrus is the active editor
+ Object currentValue = null;
+ if (IS_SYSML_MODEL.equals(property)) {
+ currentValue = testSysMLModelNature(receiver);
+ return (currentValue == expectedValue);
+ } else if (IS_SYSML_BLOCKS_MODEL.equals(property)) {
+ currentValue = testSysMLBlocksModelNature(receiver);
+ return (currentValue == expectedValue);
+ } else if (IS_SYSML_REQUIREMENTS_MODEL.equals(property)) {
+ currentValue = testSysMLRequirementsModelNature(receiver);
+ return (currentValue == expectedValue);
+ }
+
+ return false;
+ }
+
+ /** True is root object is a UML Model with SysML Profile (and sub profiles) applied */
+ protected boolean testSysMLModelNature(Object receiver) {
+ boolean isSysMLModel = false;
+
+ EObject root = getRoot(receiver);
+ if (root instanceof Package) {
+
+ return (((Package) root).getAppliedProfile("SysML") != null);
+
+ // FIX: UMLUtil.getProfile() loads the profile into the resource set. This is not desired.
+ //
+ // Profile sysml = UMLUtil.getProfile(SysmlPackage.eINSTANCE, root);
+ // if(((Package)root).isProfileApplied(sysml)) {
+ // isSysMLModel = true;
+ // }
+ }
+
+ return isSysMLModel;
+ }
+
+ /** True is root object is a UML Model with SysML Requirements Profile applied */
+ protected boolean testSysMLRequirementsModelNature(Object receiver) {
+ boolean isSysMLModel = false;
+
+ EObject root = getRoot(receiver);
+ if (root instanceof Package) {
+ return (((Package) root).getAppliedProfile("SysML::Requirements") != null);
+
+ // FIX: UMLUtil.getProfile() loads the profile into the resource set. This is not desired.
+ // Profile sysml = UMLUtil.getProfile(RequirementsPackage.eINSTANCE, root);
+ // if(((Package)root).isProfileApplied(sysml)) {
+ // isSysMLModel = true;
+ // }
+ }
+
+ return isSysMLModel;
+ }
+
+ /** True is root object is a UML Model with SysML Blocks Profile applied */
+ protected boolean testSysMLBlocksModelNature(Object receiver) {
+ boolean isSysMLModel = false;
+
+ EObject root = getRoot(receiver);
+ if (root instanceof Package) {
+ return (((Package) root).getAppliedProfile("SysML::Blocks") != null);
+ // FIX: UMLUtil.getProfile() loads the profile into the resource set. This is not desired.
+ // Profile sysml = UMLUtil.getProfile(BlocksPackage.eINSTANCE, root);
+ // if(((Package)root).isProfileApplied(sysml)) {
+ // isSysMLModel = true;
+ // }
+ }
+
+ return isSysMLModel;
+ }
+
+ /** Returns the root EObject of currently opened model */
+ private EObject getRoot(Object receiver) {
+ EObject root = null;
+
+ if (receiver instanceof ISelection) {
+ ISelection selection = (ISelection) receiver;
+ if (selection.isEmpty()) {
+ return null;
+ }
+
+ try {
+ ServiceUtilsForSelection serviceUtils = ServiceUtilsForSelection.getInstance();
+ UmlModel openedModel = (UmlModel) serviceUtils.getModelSet(selection).getModel(UmlModel.MODEL_ID);
+ if (openedModel != null) {
+ root = openedModel.lookupRoot();
+ }
+ } catch (ServiceException e) {
+ // Ignored: The selection cannot be used to retrieve the ServicesRegistry
+ } catch (NotFoundException e) {
+ Activator.log.error(e);
+ }
+ }
+
+ return root;
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.css/.project b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.css/.project
new file mode 100755
index 0000000..5221c6d
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.css/.project
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.sysml.diagram.css</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.oomph.version.VersionBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>check.maven.pom</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>ignore.lower.bound.dependency.ranges</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>release.path</key>
+ <value>/org.eclipse.papyrus.releng.main.release/release.xml</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
+ <nature>org.eclipse.oomph.version.VersionNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.css/META-INF/MANIFEST.MF b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.css/META-INF/MANIFEST.MF
new file mode 100755
index 0000000..0dd344c
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.css/META-INF/MANIFEST.MF
@@ -0,0 +1,8 @@
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.papyrus.infra.gmfdiag.css;bundle-version="[2.1.0,3.0.0)",
+ org.eclipse.papyrus.infra.gmfdiag.css.theme;bundle-version="[1.2.0,2.0.0)";resolution:=optional
+Bundle-Vendor: Eclipse Modeling Project
+Bundle-Version: 1.2.0.qualifier
+Bundle-Name: SysML Css
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.papyrus.sysml.diagram.css;singleton:=true
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.css/about.html b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.css/about.html
new file mode 100755
index 0000000..d35d5ae
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.css/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.css/build.properties b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.css/build.properties
new file mode 100755
index 0000000..6878b10
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.css/build.properties
@@ -0,0 +1,5 @@
+bin.includes = META-INF/,\
+ plugin.xml,\
+ theme/,\
+ about.html
+src.includes = about.html
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.css/org.eclipse.papyrus.sysml.diagram.css.iml b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.css/org.eclipse.papyrus.sysml.diagram.css.iml
new file mode 100755
index 0000000..72b1d62
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.css/org.eclipse.papyrus.sysml.diagram.css.iml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+ <component name="NewModuleRootManager" inherit-compiler-output="false">
+ <output url="file://$MODULE_DIR$/bin" />
+ <exclude-output />
+ <content url="file://$MODULE_DIR$" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ </component>
+</module>
\ No newline at end of file
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.css/plugin.xml b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.css/plugin.xml
new file mode 100755
index 0000000..d8d454f
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.css/plugin.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.papyrus.infra.gmfdiag.css.userAgentStyleSheet">
+ <stylesheet
+ stylesheetPath="theme/sysml.css">
+ </stylesheet>
+ </extension>
+ <extension
+ point="org.eclipse.papyrus.infra.gmfdiag.css.theme">
+ <themeContribution
+ id="org.eclipse.papyrus.css.papyrus_theme">
+ <stylesheet
+ stylesheetPath="theme/sysml.css">
+ </stylesheet>
+ </themeContribution>
+ <themeContribution
+ id="org.eclipse.papyrus.css.blacknwhite_theme">
+ <stylesheet
+ stylesheetPath="theme/sysml.css">
+ </stylesheet>
+ </themeContribution>
+ </extension>
+</plugin>
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.css/pom.xml b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.css/pom.xml
new file mode 100755
index 0000000..1bf1d22
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.css/pom.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.papyrus.sysml</groupId>
+ <artifactId>org.eclipse.papyrus.sysml-diagram</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.papyrus.sysml.diagram.css</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.css/theme/sysml.css b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.css/theme/sysml.css
new file mode 100755
index 0000000..97d4a20
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.css/theme/sysml.css
@@ -0,0 +1,74 @@
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr
+ *****************************************************************************/
+
+/**
+* Configures the default visibility for SysML compartments
+*/
+
+BlockDefinitionDiagram Compartment,
+ParametricDiagram Compartment,
+RequirementDiagram Compartment,
+InternalBlockDiagram Compartment{
+ visible: false;
+ showTitle: true;
+}
+
+Compartment[kind=structure]{
+ showTitle: false;
+}
+
+Package > Compartment[kind=packagedElements],
+Model > Compartment[kind=packagedElements]{
+ visible: true;
+ showTitle: false;
+}
+
+[appliedStereotypes~="Block"] > Compartment[kind=properties],
+[appliedStereotypes~="Block"] > Compartment[kind=operations],
+[appliedStereotypes~="Block"] > Compartment[kind=constraints]{
+ visible: true;
+}
+
+[appliedStereotypes~="ConstraintBlock"] > Compartment[kind=parameters],
+[appliedStereotypes~="ConstraintBlock"] > Compartment[kind=constraints]{
+ visible: true;
+}
+
+BlockDefinitionDiagram DataType > Compartment[kind=properties],
+BlockDefinitionDiagram Enumeration > Compartment[kind=literals],
+BlockDefinitionDiagram InstanceSpecification > Compartment[kind=slots],
+BlockDefinitionDiagram Interface > Compartment[kind=properties],
+BlockDefinitionDiagram Interface > Compartment[kind=operations]{
+ visible: true;
+}
+
+
+[appliedStereotypes~="FlowSpecification"] > Compartment[kind=flowproperties]{
+ visible: true;
+}
+
+[appliedStereotypes~="ValueType"] > Compartment[kind=properties],
+[appliedStereotypes~="ValueType"] > Compartment[kind=operations]{
+ visible: true;
+}
+
+InternalBlockDiagram [appliedStereotypes~="Block"] > Compartment[kind=structure],
+InternalBlockDiagram Property > Compartment[kind=structure]{
+ visible: true;
+}
+
+ParametricDiagram Property > Compartment[kind=structure],
+ParametricDiagram [appliedStereotypes~="Block"] > Compartment[kind=structure],
+ParametricDiagram [appliedStereotypes~="ConstraintBlock"] > Compartment[kind=structure]{
+ visible: true;
+}
+
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/.classpath b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/.classpath
new file mode 100755
index 0000000..59cf397
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/.classpath
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="src-gen"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/.project b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/.project
new file mode 100755
index 0000000..170079d
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/.project
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.sysml.diagram.internalblock</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>
+ <buildCommand>
+ <name>org.eclipse.oomph.version.VersionBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>check.maven.pom</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>ignore.lower.bound.dependency.ranges</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>release.path</key>
+ <value>/org.eclipse.papyrus.releng.main.release/release.xml</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.oomph.version.VersionNature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/.settings/net.sf.jautodoc.prefs b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/.settings/net.sf.jautodoc.prefs
new file mode 100755
index 0000000..b393451
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/.settings/net.sf.jautodoc.prefs
@@ -0,0 +1,7 @@
+#Fri Aug 19 13:56:13 CEST 2011
+add_header=true
+eclipse.preferences.version=1
+header_text=/*****************************************************************************\r\n * Copyright (c) 2011 CEA LIST.\r\n *\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http\://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors\:\r\n *\t\t\r\n *\t\tCEA LIST - Initial API and implementation\r\n *\r\n *****************************************************************************/
+project_specific_settings=true
+replace_header=true
+replacements=<?xml version\="1.0" standalone\="yes"?>\n\n<replacements>\n<replacement key\="get" scope\="1" mode\="0">Gets the</replacement>\n<replacement key\="set" scope\="1" mode\="0">Sets the</replacement>\n<replacement key\="add" scope\="1" mode\="0">Adds the</replacement>\n<replacement key\="edit" scope\="1" mode\="0">Edits the</replacement>\n<replacement key\="remove" scope\="1" mode\="0">Removes the</replacement>\n<replacement key\="init" scope\="1" mode\="0">Inits the</replacement>\n<replacement key\="parse" scope\="1" mode\="0">Parses the</replacement>\n<replacement key\="create" scope\="1" mode\="0">Creates the</replacement>\n<replacement key\="build" scope\="1" mode\="0">Builds the</replacement>\n<replacement key\="is" scope\="1" mode\="0">Checks if is</replacement>\n<replacement key\="print" scope\="1" mode\="0">Prints the</replacement>\n<replacement key\="has" scope\="1" mode\="0">Checks for</replacement>\n</replacements>\n\n
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/.settings/org.eclipse.jdt.core.prefs b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 0000000..c585cc4
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,291 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/.settings/org.eclipse.jdt.ui.prefs b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/.settings/org.eclipse.jdt.ui.prefs
new file mode 100755
index 0000000..954281d
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,68 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+formatter_profile=_Papyrus
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/.settings/org.eclipse.pde.api.tools.prefs b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100755
index 0000000..23fb95e
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/.settings/org.eclipse.pde.api.tools.prefs
@@ -0,0 +1,98 @@
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+API_USE_SCAN_FIELD_SEVERITY=Error
+API_USE_SCAN_METHOD_SEVERITY=Error
+API_USE_SCAN_TYPE_SEVERITY=Error
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Ignore
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_ANNOTATION=Ignore
+INVALID_JAVADOC_TAG=Ignore
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Ignore
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+MISSING_EE_DESCRIPTIONS=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=Enabled
+eclipse.preferences.version=1
+incompatible_api_component_version=Error
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Warning
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/META-INF/MANIFEST.MF b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/META-INF/MANIFEST.MF
new file mode 100755
index 0000000..0892dd3
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/META-INF/MANIFEST.MF
@@ -0,0 +1,29 @@
+Manifest-Version: 1.0
+Export-Package: org.eclipse.papyrus.sysml.diagram.internalblock,
+ org.eclipse.papyrus.sysml.diagram.internalblock.compatibility,
+ org.eclipse.papyrus.sysml.diagram.internalblock.dnd.helper,
+ org.eclipse.papyrus.sysml.diagram.internalblock.edit.part,
+ org.eclipse.papyrus.sysml.diagram.internalblock.edit.policy,
+ org.eclipse.papyrus.sysml.diagram.internalblock.factory,
+ org.eclipse.papyrus.sysml.diagram.internalblock.handler,
+ org.eclipse.papyrus.sysml.diagram.internalblock.helper.advice,
+ org.eclipse.papyrus.sysml.diagram.internalblock.messages,
+ org.eclipse.papyrus.sysml.diagram.internalblock.part,
+ org.eclipse.papyrus.sysml.diagram.internalblock.preferences,
+ org.eclipse.papyrus.sysml.diagram.internalblock.provider,
+ org.eclipse.papyrus.sysml.diagram.internalblock.ui,
+ org.eclipse.papyrus.sysml.diagram.internalblock.utils
+Require-Bundle: org.eclipse.gmf.runtime.diagram.ui.providers;bundle-version="[1.7.0,2.0.0)",
+ org.eclipse.papyrus.sysml.diagram.common;bundle-version="[2.0.0,3.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.sysml.service.types;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.infra.gmfdiag.navigation;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.infra.internationalization.utils;bundle-version="[1.0.0,2.0.0)"
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 3.0.0.qualifier
+Bundle-Localization: plugin
+Bundle-Name: %pluginName
+Bundle-Activator: org.eclipse.papyrus.sysml.diagram.internalblock.Activator
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.papyrus.sysml.diagram.internalblock;singleton:=true
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/about.html b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/about.html
new file mode 100755
index 0000000..d35d5ae
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/build.gen.properties b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/build.gen.properties
new file mode 100755
index 0000000..ca6d14e
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/build.gen.properties
@@ -0,0 +1,10 @@
+source.. = src/,\
+ src-gen/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ palettes/,\
+ icons/,\
+ about.html,\
+ plugin.properties
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/build.properties b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/build.properties
new file mode 100755
index 0000000..21002e2
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/build.properties
@@ -0,0 +1,16 @@
+bin.includes = META-INF/,\
+ .,\
+ palettes/,\
+ about.html,\
+ plugin.properties,\
+ icons/,\
+ messages.properties,\
+ plugin.xml,\
+ model/
+source..=src/,src-gen/
+bin..=bin/
+src.includes = palettes/,\
+ icons/,\
+ messages.properties,\
+ about.html,\
+ model/
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/icons/obj16/Diagram_InternalBlock.gif b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/icons/obj16/Diagram_InternalBlock.gif
new file mode 100755
index 0000000..ca02c19
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/icons/obj16/Diagram_InternalBlock.gif
Binary files differ
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/icons/obj16/Link.gif b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/icons/obj16/Link.gif
new file mode 100755
index 0000000..13fb22e
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/icons/obj16/Link.gif
Binary files differ
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/messages.properties b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/messages.properties
new file mode 100755
index 0000000..66027e5
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/messages.properties
@@ -0,0 +1,5 @@
+Notification_Drop_Title=Drop in diagram
+Notification_Drop_UMLAssociationWarning=The Association ({0}) can not be dropped in this diagram because it is not a SysML Association.\nIt was probably not created in a SysML Diagram.
+
+ShowHideRelatedContentsAction_Message=Choose the elements to show
+ShowHideRelatedContentsAction_Title=Show/Hide Related Contents
\ No newline at end of file
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/model/SysML.InternalBlock.idgen b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/model/SysML.InternalBlock.idgen
new file mode 100755
index 0000000..f6dbf0a
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/model/SysML.InternalBlock.idgen
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<idgen:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:gmfgen="http://www.eclipse.org/gmf/2009/GenModel" xmlns:idgen="http://www.eclipse.org/papyrus/0.7.0/idgen" name="InternalBlock" type="InternalBlock" icon="icons/obj16/Diagram_InternalBlock.gif" label="SysML Internal Block Diagram" language="sysml" javaPackagePrefix="org.eclipse.papyrus.sysml.diagram.internalblock" javaClassPrefix="InternalBlockDiagram" createCommandLabel="Create a new Internal Block Diagram">
+ <diagramEditPart name="Diagram edit part">
+ <behaviors javaClassQualifiedName="org.eclipse.papyrus.uml.diagram.common.editpolicies.DuplicatePasteEditPolicy" key="DuplicatePasteEditPolicy.PASTE_ROLE"/>
+ <behaviors javaClassQualifiedName="org.eclipse.papyrus.sysml.diagram.internalblock.edit.policy.CustomDragDropEditPolicy" key="EditPolicyRoles.DRAG_DROP_ROLE"/>
+ <behaviors javaClassQualifiedName="org.eclipse.papyrus.gmf.diagram.common.edit.policy.DefaultXYLayoutEditPolicy" key="EditPolicy.LAYOUT_ROLE"/>
+ <behaviors name="" javaClassQualifiedName="org.eclipse.papyrus.gmf.diagram.common.edit.policy.DefaultCreationEditPolicy" key="EditPolicyRoles.CREATION_ROLE"/>
+ <behaviors javaClassQualifiedName="org.eclipse.papyrus.gmf.diagram.common.edit.policy.DefaultContainerNodeEditPolicy" key="EditPolicy.GRAPHICAL_NODE_ROLE"/>
+ <behaviors name="" javaClassQualifiedName="org.eclipse.papyrus.sysml.diagram.internalblock.edit.policy.ShowHideRelatedLinkEditPolicy" key="ShowHideRelatedLinkEditPolicy"/>
+ </diagramEditPart>
+ <inheritedDiagrams name="CompositeDiagram" viewProviderClassQualifiedName="" editPartProviderClassQualifiedName="" dndEditPolicyClassQualifiedName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy">
+ <genInheritedEditor href="../../org.eclipse.papyrus.uml.diagram.composite/model/compositediagram.gmfgen#CompositeStructure"/>
+ <genNodes>
+ <genNode xsi:type="gmfgen:GenTopLevelNode" href="../../org.eclipse.papyrus.uml.diagram.composite/model/compositediagram.gmfgen#/0/@diagram/@topLevelNodes.48"/>
+ <semanticType href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#org.eclipse.papyrus.uml.Constraint"/>
+ </genNodes>
+ <genNodes generatePreferencePage="false" generateTool="false">
+ <genNode xsi:type="gmfgen:GenChildNode" href="../../org.eclipse.papyrus.uml.diagram.composite/model/compositediagram.gmfgen#/0/@diagram/@childNodes.27"/>
+ <semanticType href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#org.eclipse.papyrus.uml.Comment"/>
+ </genNodes>
+ <genNodes>
+ <genNode xsi:type="gmfgen:GenTopLevelNode" href="../../org.eclipse.papyrus.uml.diagram.composite/model/compositediagram.gmfgen#/0/@diagram/@topLevelNodes.43"/>
+ <semanticType href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#org.eclipse.papyrus.uml.Comment"/>
+ </genNodes>
+ <genNodes generatePreferencePage="false" generateTool="false">
+ <genNode xsi:type="gmfgen:GenChildNode" href="../../org.eclipse.papyrus.uml.diagram.composite/model/compositediagram.gmfgen#/0/@diagram/@childNodes.32"/>
+ <semanticType href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#org.eclipse.papyrus.uml.Constraint"/>
+ </genNodes>
+ <genLinks>
+ <genLink href="../../org.eclipse.papyrus.uml.diagram.composite/model/compositediagram.gmfgen#/0/@diagram/@links.1"/>
+ </genLinks>
+ <genLinks>
+ <genLink href="../../org.eclipse.papyrus.uml.diagram.composite/model/compositediagram.gmfgen#/0/@diagram/@links.2"/>
+ </genLinks>
+ </inheritedDiagrams>
+ <customJavaClasses name="" customEditPolicyProvider="org.eclipse.papyrus.sysml.diagram.internalblock.provider.CustomEditPolicyProvider" customPreferenceInitializer="org.eclipse.papyrus.sysml.diagram.internalblock.preferences.CustomPreferenceInitializer"/>
+ <usedCustomNodes href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_block_as_composite"/>
+ <usedCustomNodes href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_blockproperty_as_composite"/>
+ <usedCustomNodes href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_flowport_as_affixed"/>
+ <usedCustomNodes href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#shape_uml_port_as_affixed"/>
+ <usedCustomEdges href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#link_uml_connector"/>
+ <usedCustomEdges href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#link_uml_dependency"/>
+ <usedCustomDecorations href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#label_sysml_block_name"/>
+ <usedCustomDecorations href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#affixedlabel_sysml_flowport_label"/>
+ <usedCustomDecorations href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#affixedlabel_uml_appliedstereotype"/>
+ <usedCustomDecorations href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#affixedlabel_uml_port_label"/>
+ <usedCustomDecorations href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#compartment_sysml_structure"/>
+ <usedCustomDecorations href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#compartment_sysml_blockproperty_structure"/>
+ <usedCustomDecorations href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#label_uml_property_label"/>
+ <usedCustomDecorations href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#linklabel_uml_appliedstereotype"/>
+ <usedCustomDecorations href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#linklabel_uml_connector_label"/>
+ <usedCustomDecorations href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#linklabel_uml_connector_source_multiplicity"/>
+ <usedCustomDecorations href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#linklabel_uml_connector_target_multiplicity"/>
+ <usedCustomDecorations href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#linklabel_uml_namedelement_name"/>
+ <diagramConfig>
+ <contains xsi:type="idgen:GraphicalTypeDiagramRef">
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_block_as_composite"/>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_flowport_as_affixed"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#shape_uml_port_as_affixed"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#compartment_sysml_structure"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_blockproperty_as_composite"/>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_flowport_as_affixed"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#shape_uml_port_as_affixed"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#compartment_sysml_blockproperty_structure"/>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_blockproperty_as_composite"/>
+ </contains>
+ </contains>
+ </contains>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#link_uml_dependency"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#link_uml_connector"/>
+ </contains>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#compartment_sysml_structure"/>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_blockproperty_as_composite"/>
+ </contains>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#compartment_sysml_blockproperty_structure"/>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_blockproperty_as_composite"/>
+ </contains>
+ </contains>
+ </diagramConfig>
+</idgen:Diagram>
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/palettes/PapyrusSysMLInternalBlockDiagram.paletteconfiguration b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/palettes/PapyrusSysMLInternalBlockDiagram.paletteconfiguration
new file mode 100755
index 0000000..ae8e6b7
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/palettes/PapyrusSysMLInternalBlockDiagram.paletteconfiguration
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="ASCII"?>
+<paletteconfiguration:PaletteConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:elementtypesconfigurations="http://www.eclipse.org/papyrus/infra/elementtypesconfigurations/1.2" xmlns:paletteconfiguration="http://www.eclipse.org/papyrus/diagram/paletteconfiguration/0.8" id="org.eclipse.papyrus.sysml.diagram.internalblock.paletteconfiguration" label="org.eclipse.papyrus.sysml.diagram.internalblock Palette" description="This is the palette of PapyrusSysMLInternalBlockDiagram.">
+ <drawerConfigurations id="internalblock.drawer.nodes" label="Nodes">
+ <icon pluginID="org.eclipse.gmf.runtime.diagram.ui" iconPath="/icons/group.gif"/>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="internalblock_main.tool.port" label="Port" description="Create a new Port">
+ <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/Port.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Port"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="internalblock_main.tool.flowport_in" label="FlowPort (IN)" description="Create a new FlowPort (IN)">
+ <icon pluginID="org.eclipse.papyrus.sysml" iconPath="/icons/portandflows/FlowPort_IN.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.FlowPort_In"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="internalblock_main.tool.flowport_out" label="FlowPort (OUT)" description="Create a new FlowPort (OUT)">
+ <icon pluginID="org.eclipse.papyrus.sysml" iconPath="/icons/portandflows/FlowPort_OUT.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.FlowPort_Out"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="internalblock_main.tool.flowport_inout" label="FlowPort (INOUT)" description="Create a new FlowPort (INOUT)">
+ <icon pluginID="org.eclipse.papyrus.sysml" iconPath="/icons/portandflows/FlowPort_INOUT.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.FlowPort_InOut"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="internalblock_main.tool.flowport_na" label="FlowPort (Non Atomic)" description="Create a new FlowPort (Non Atomic)">
+ <icon pluginID="org.eclipse.papyrus.sysml" iconPath="/icons/portandflows/FlowPort_NA.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.FlowPort_NA"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="internalblock_main.tool.property" label="Property" description="Create a new Property">
+ <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/Property.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Property"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="internalblock_main.tool.part" label="Part" description="Create a new Part">
+ <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/Property.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.PartProperty"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="internalblock_main.tool.reference" label="Reference" description="Create a new Reference">
+ <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/Property.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.ReferenceProperty"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="internalblock_main.tool.actorpart" label="ActorPart" description="Create a new ActorPart">
+ <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/Property.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.ActorPartProperty"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="internalblock_main.tool.value" label="Value" description="Create a new Value">
+ <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/Property.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.ValueProperty"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="internalblock_main.tool.comment" label="Comment" description="Create a new Comment">
+ <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/Comment.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Comment"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="internalblock_main.tool.constraint" label="Constraint" description="Create a new Constraint">
+ <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/Constraint.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Constraint"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ </drawerConfigurations>
+ <drawerConfigurations id="internalblock.drawer.edges" label="Edges">
+ <icon pluginID="org.eclipse.gmf.runtime.diagram.ui" iconPath="/icons/group.gif"/>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="internalblock_main.tool.connector" label="Connector" description="Create a new Connector" kind="ConnectionTool">
+ <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/Connector.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Connector"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="internalblock_main.tool.dependency" label="Dependency" description="Create a new Dependency" kind="ConnectionTool">
+ <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/Dependency.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Dependency"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="internalblock_main.tool.comment_constraint_link" label="Comment / Constraint link" description="Create a new Comment / Constraint link" kind="ConnectionTool">
+ <icon pluginID="org.eclipse.papyrus.sysml.diagram.blockdefinition" iconPath="/icons/obj16/Link.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/umldi.elementtypesconfigurations#org.eclipse.papyrus.umldi.Comment_AnnotatedElementEdge"/>
+ </elementDescriptors>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/umldi.elementtypesconfigurations#org.eclipse.papyrus.umldi.Constraint_ConstrainedElementEdge"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ </drawerConfigurations>
+</paletteconfiguration:PaletteConfiguration>
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/palettes/internalblock.palette.gen.xml b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/palettes/internalblock.palette.gen.xml
new file mode 100755
index 0000000..0970689
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/palettes/internalblock.palette.gen.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<paletteDefinition>
+ <content>
+ <drawer
+ iconpath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ id="org.eclipse.papyrus.sysml.diagram.internalblock.SYSML_InternalBlock__Tools" name="Tools">
+ <aspectTool description="Create a new BlockComposite" id="internalblock.tool.blockcomposite"
+ name="BlockComposite" refToolId="internalblock.tool.blockcomposite">
+ </aspectTool>
+ <aspectTool description="Create a new BlockPropertyComposite" id="internalblock.tool.blockpropertycomposite"
+ name="BlockPropertyComposite" refToolId="internalblock.tool.blockpropertycomposite">
+ </aspectTool>
+ <aspectTool description="Create a new FlowPort" id="internalblock.tool.flowport"
+ name="FlowPort" refToolId="internalblock.tool.flowport">
+ </aspectTool>
+ <aspectTool description="Create a new Port" id="internalblock.tool.port"
+ name="Port" refToolId="internalblock.tool.port">
+ </aspectTool>
+ <aspectTool description="Create a new Connector" id="internalblock.tool.connector"
+ name="Connector" refToolId="internalblock.tool.connector">
+ </aspectTool>
+ <aspectTool description="Create a new Dependency" id="internalblock.tool.dependency"
+ name="Dependency" refToolId="internalblock.tool.dependency">
+ </aspectTool>
+
+ <aspectTool description="Create a new Comment" id="internalblock.tool.comment"
+ name="Comment" refToolId="composite.tool.comment">
+ </aspectTool>
+ <aspectTool description="Create a new Constraint" id="internalblock.tool.constraint"
+ name="Constraint" refToolId="composite.tool.constraint">
+ </aspectTool>
+ <aspectTool description="Create a new CommentAnnotatedElement" id="internalblock.tool.commentannotatedelement"
+ name="CommentAnnotatedElement" refToolId="composite.tool.link">
+ </aspectTool>
+ <aspectTool description="Create a new ConstraintConstrainedElement" id="internalblock.tool.constraintconstrainedelement"
+ name="ConstraintConstrainedElement" refToolId="composite.tool.link">
+ </aspectTool>
+
+ </drawer>
+ </content>
+</paletteDefinition>
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/palettes/internalblock.palette.xml b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/palettes/internalblock.palette.xml
new file mode 100755
index 0000000..d0cac7e
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/palettes/internalblock.palette.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<paletteDefinition>
+<content>
+
+ <drawer id="internalblock.drawer.nodes" name="Nodes" iconpath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif">
+
+ <aspectTool description="Create a new Port" id="internalblock_main.tool.port"
+ name="Port" refToolId="internalblock.tool.port">
+ </aspectTool>
+ <aspectTool description="Create a new FlowPort (IN)" id="internalblock_main.tool.flowport_in"
+ name="FlowPort (IN)" refToolId="internalblock.tool.flowport_in">
+ </aspectTool>
+ <aspectTool description="Create a new FlowPort (OUT)" id="internalblock_main.tool.flowport_out"
+ name="FlowPort (OUT)" refToolId="internalblock.tool.flowport_out">
+ </aspectTool>
+ <aspectTool description="Create a new FlowPort (INOUT)" id="internalblock_main.tool.flowport_inout"
+ name="FlowPort (INOUT)" refToolId="internalblock.tool.flowport_inout">
+ </aspectTool>
+ <aspectTool description="Create a new FlowPort (Non Atomic)" id="internalblock_main.tool.flowport_na"
+ name="FlowPort (Non Atomic)" refToolId="internalblock.tool.flowport_na">
+ </aspectTool>
+ <aspectTool description="Create a new Property" id="internalblock_main.tool.property"
+ name="Property" refToolId="internalblock.tool.property">
+ </aspectTool>
+ <aspectTool description="Create a new Part" id="internalblock_main.tool.part"
+ name="Part" refToolId="internalblock.tool.part">
+ </aspectTool>
+ <aspectTool description="Create a new Reference" id="internalblock_main.tool.reference"
+ name="Reference" refToolId="internalblock.tool.reference">
+ </aspectTool>
+ <aspectTool description="Create a new ActorPart" id="internalblock_main.tool.actorpart"
+ name="ActorPart" refToolId="internalblock.tool.actorpart">
+ </aspectTool>
+ <aspectTool description="Create a new Value" id="internalblock_main.tool.value"
+ name="Value" refToolId="internalblock.tool.value">
+ </aspectTool>
+
+ <aspectTool name="Comment" id="internalblock_main.tool.comment" refToolId="internalblock.tool.comment" description="Create a new Comment" />
+ <aspectTool name="Constraint" id="internalblock_main.tool.constraint" refToolId="internalblock.tool.constraint" description="Create a new Constraint" />
+
+ </drawer>
+
+
+ <drawer id="internalblock.drawer.edges" name="Edges" iconpath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif">
+
+ <aspectTool description="Create a new Connector" id="internalblock_main.tool.connector"
+ name="Connector" refToolId="internalblock.tool.connector">
+ </aspectTool>
+ <aspectTool description="Create a new Dependency" id="internalblock_main.tool.dependency"
+ name="Dependency" refToolId="internalblock.tool.dependency">
+ </aspectTool>
+ <aspectTool description="Create a new Comment / Constraint link" id="internalblock_main.tool.comment_constraint_link"
+ name="Comment / Constraint link" refToolId="internalblock.tool.comment_constraint_link">
+ </aspectTool>
+ </drawer>
+
+</content>
+</paletteDefinition>
\ No newline at end of file
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/plugin.gen.xml b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/plugin.gen.xml
new file mode 100755
index 0000000..388b6e1
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/plugin.gen.xml
@@ -0,0 +1,497 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+
+<!-- Diagram declaration -->
+<extension point="org.eclipse.papyrus.core.papyrusDiagram">
+ <creationCommand
+ creationCommandClass="org.eclipse.papyrus.sysml.diagram.internalblock.InternalBlockDiagramCreateCommand"
+ icon="icons/obj16/Diagram_InternalBlock.gif"
+ id="org.eclipse.papyrus.sysml.diagram.internalblock.CreateCommand"
+ language="sysml"
+ label="Internal Block Diagram"/>
+ <editorDiagram
+ actionBarContributorId="org.eclipse.papyrus.uml.diagram.common.part.UMLDiagramActionBarContributor"
+ factoryClass="org.eclipse.papyrus.sysml.diagram.internalblock.InternalBlockDiagramEditorFactory"
+ icon="icons/obj16/Diagram_InternalBlock.gif" />
+</extension>
+
+<!-- Diagram creation command and handler -->
+<extension point="org.eclipse.ui.commands">
+ <command id="org.eclipse.papyrus.sysml.diagram.internalblock.CreateCommand"
+ name="Create a new Internal Block Diagram"
+ description="Create a new Internal Block Diagram"
+ categoryId="org.eclipse.papyrus.editor.category"/>
+</extension>
+
+<extension point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.papyrus.sysml.diagram.internalblock.InternalBlockDiagramCreateCommand"
+ commandId="org.eclipse.papyrus.sysml.diagram.internalblock.CreateCommand">
+ <activeWhen>
+ <with variable="activeEditorId">
+ <equals value="org.eclipse.papyrus.core.papyrusEditor" />
+ </with>
+ </activeWhen>
+ </handler>
+</extension>
+
+<!-- Diagram creation command registration in menu and toolbar -->
+<extension point="org.eclipse.ui.menus">
+
+ <menuContribution locationURI="menu:org.eclipse.papyrus.ui.menu">
+ <menu id="org.eclipse.papyrus.diagram.ui.menu.diagrams" label="Diagrams">
+ <command commandId="org.eclipse.papyrus.sysml.diagram.internalblock.CreateCommand"
+ icon="icons/obj16/Diagram_InternalBlock.gif" label="Create a new Internal Block Diagram"
+ style="push" tooltip="Create a new Internal Block Diagram">
+ <visibleWhen>
+ <reference definitionId="org.eclipse.papyrus.sysml.diagram.common.IsPapyrusActiveWithSysML"/>
+ </visibleWhen>
+
+ </command>
+ </menu>
+ </menuContribution>
+
+ <menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar">
+ <toolbar id="org.eclipse.papyrus.diagram.ui.toolbar">
+ <command commandId="org.eclipse.papyrus.sysml.diagram.internalblock.CreateCommand"
+ icon="icons/obj16/Diagram_InternalBlock.gif" label="Create a new Internal Block Diagram"
+ style="push" tooltip="Create a new Internal Block Diagram">
+ <visibleWhen>
+ <reference definitionId="org.eclipse.papyrus.sysml.diagram.common.IsPapyrusActiveWithSysML"/>
+ </visibleWhen>
+
+ </command>
+ </toolbar>
+ </menuContribution>
+
+ <menuContribution locationURI="popup:org.eclipse.papyrus.modelexplorer.popupmenu.creatediagram">
+ <command commandId="org.eclipse.papyrus.sysml.diagram.internalblock.CreateCommand"
+ icon="icons/obj16/Diagram_InternalBlock.gif"
+ label="Create a new Internal Block Diagram"
+ style="push"
+ tooltip="Create a new Internal Block Diagram">
+ <visibleWhen>
+ <reference definitionId="org.eclipse.papyrus.sysml.diagram.common.IsPapyrusActiveWithSysML"/>
+ </visibleWhen>
+
+ </command>
+ </menuContribution>
+
+</extension>
+
+<!-- Palette tool definition (defines tools possibly used by the palette(s)) -->
+<extension point="org.eclipse.gmf.runtime.diagram.ui.paletteProviders"
+ name="SYSML_InternalBlock_Predefined_Entries"
+ id="org.eclipse.papyrus.sysml.diagram.blockdefinition.palettedefinition">
+
+ <paletteProvider class="org.eclipse.gmf.runtime.diagram.ui.providers.DefaultPaletteProvider">
+ <Priority name="Lowest"/> <!-- Lower priority than Palette tool declaration -->
+
+ <!-- SysML Internal Block Diagram specific tool definition -->
+ <contribution
+ factoryClass="org.eclipse.papyrus.sysml.diagram.internalblock.factory.DiagramPaletteFactory">
+
+ <!-- internalblock.tool.blockcomposite -->
+ <entry
+ defineOnly="true"
+ description="Create a BlockComposite"
+ id="internalblock.tool.blockcomposite"
+ kind="tool"
+ label="BlockComposite"
+ large_icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/blocks/Block.gif"
+ small_icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/blocks/Block.gif">
+ </entry>
+
+ <!-- internalblock.tool.blockpropertycomposite -->
+ <entry
+ defineOnly="true"
+ description="Create a BlockPropertyComposite"
+ id="internalblock.tool.blockpropertycomposite"
+ kind="tool"
+ label="BlockPropertyComposite"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif"
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif">
+ </entry>
+
+ <!-- internalblock.tool.flowport -->
+ <entry
+ defineOnly="true"
+ description="Create a FlowPort"
+ id="internalblock.tool.flowport"
+ kind="tool"
+ label="FlowPort"
+ large_icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/portandflows/FlowPort.gif"
+ small_icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/portandflows/FlowPort.gif">
+ </entry>
+
+ <!-- internalblock.tool.port -->
+ <entry
+ defineOnly="true"
+ description="Create a Port"
+ id="internalblock.tool.port"
+ kind="tool"
+ label="Port"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Port.gif"
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Port.gif">
+ </entry>
+ <!-- Start of user code Custom node button entry
+ -->
+
+ <!-- End of user code -->
+
+
+ <!-- internalblock.tool.connector -->
+ <entry
+ defineOnly="true"
+ description="Create a Connector"
+ id="internalblock.tool.connector"
+ kind="tool"
+ label="Connector"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Connector.gif"
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Connector.gif">
+ </entry>
+
+ <!-- internalblock.tool.dependency -->
+ <entry
+ defineOnly="true"
+ description="Create a Dependency"
+ id="internalblock.tool.dependency"
+ kind="tool"
+ label="Dependency"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Dependency.gif"
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Dependency.gif">
+ </entry>
+ <!-- Start of user code Custom edge button entry
+ -->
+
+ <!-- End of user code -->
+
+ </contribution>
+
+ <!-- Specify diagram this palette tools relate to -->
+ <editor id="org.eclipse.papyrus.sysml.diagram.internalblock"/>
+
+ </paletteProvider>
+</extension>
+
+<!-- Palette tool declaration (declares the real palette containment) -->
+<extension point="org.eclipse.papyrus.uml.diagram.common.paletteDefinition"
+ name="SYSML_InternalBlock">
+
+ <paletteDefinition ID="SYSML_InternalBlock"
+ class="org.eclipse.papyrus.uml.diagram.common.service.PluginPaletteProvider"
+ name="SYSML_InternalBlock" icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ path="palettes/internalblock.palette.xml"
+ provider="CEA LIST">
+ <Priority name="Low"/>
+
+ <!-- Specify diagram this palette tools relate to -->
+ <editor id="org.eclipse.papyrus.sysml.diagram.internalblock"/>
+ </paletteDefinition>
+</extension>
+
+
+<!-- Diagram view providers declaration -->
+<extension point="org.eclipse.gmf.runtime.diagram.core.viewProviders">
+ <!-- Diagram view provider -->
+ <viewProvider class="org.eclipse.papyrus.sysml.diagram.internalblock.provider.InternalBlockDiagramViewProvider">
+ <Priority name="Low"/>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Diagram" semanticHints="InternalBlock"/>
+ </viewProvider>
+
+ <!-- Custom graphical types view provider -->
+ <viewProvider class="org.eclipse.papyrus.sysml.diagram.internalblock.provider.CustomViewProvider">
+ <Priority name="Medium"/>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="SysML::ReferenceProperty, SysML::FlowPort_In, UML::Port, SysML::FlowPort_Out, SysML::PartProperty, SysML::FlowPort_InOut, SysML::FlowPort, SysML::Block"/>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="shape_sysml_flowport_as_affixed, shape_sysml_block_as_composite, shape_uml_port_as_affixed, shape_sysml_blockproperty_as_composite"/>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="UML::Dependency, UML::Connector"/>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="link_uml_connector, link_uml_dependency"/>
+
+ <!-- Additional descriptors provided in case the semantic hint is is not provided -->
+
+ <!-- "uml.Class" -->
+ <object id="uml.Class" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Class"/>
+ </object>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="uml.Class"/>
+
+ <!-- "uml.Port" -->
+ <object id="uml.Port" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Port"/>
+ </object>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="uml.Port"/>
+
+ <!-- "uml.Property" -->
+ <object id="uml.Property" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Property"/>
+ </object>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="uml.Property"/>
+
+ <!-- "uml.Connector" -->
+ <object id="uml.Connector" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Connector"/>
+ </object>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="uml.Connector"/>
+
+ <!-- "uml.Dependency" -->
+ <object id="uml.Dependency" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Dependency"/>
+ </object>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="uml.Dependency"/>
+
+ </viewProvider>
+
+ <!-- ViewProvider for inherited elements (from CompositeDiagram ViewProvider) -->
+ <viewProvider class="org.eclipse.papyrus.sysml.diagram.internalblock.provider.InheritedCompositeDiagramViewProvider">
+ <Priority name="Low"/>
+
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="Constraint_Shape, Comment_Shape_CN, Comment_Shape, Constraint_Shape_CN"/>
+
+ <context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="Comment_AnnotatedElementEdge, Constraint_ConstrainedElementEdge"/>
+
+ <!-- Additional descriptors provided in case the semantic hint is is not provided -->
+
+ <!-- "uml.Constraint" -->
+ <object id="uml.Constraint" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Constraint"/>
+ </object>
+
+ <!-- "uml.Comment" -->
+ <object id="uml.Comment" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Comment"/>
+ </object>
+
+ <!-- Additional activation contexts for nodes semantic objects -->
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node"
+ elements="uml.Constraint, uml.Comment"/>
+
+ </viewProvider>
+</extension>
+
+<!-- Diagram edit part providers declaration -->
+<extension point="org.eclipse.gmf.runtime.diagram.ui.editpartProviders">
+ <!-- Diagram edit part provider -->
+ <editpartProvider class="org.eclipse.papyrus.sysml.diagram.internalblock.provider.InternalBlockDiagramEditPartProvider">
+ <Priority name="Low"/>
+ <object
+ id="org.eclipse.papyrus.sysml.diagram.internalblock.Diagram"
+ class="org.eclipse.gmf.runtime.notation.Diagram">
+ <method name="getType()" value="InternalBlock"/>
+ </object>
+ <context views="org.eclipse.papyrus.sysml.diagram.internalblock.Diagram"/>
+ </editpartProvider>
+
+ <!-- Custom graphical types edit part provider -->
+ <editpartProvider class="org.eclipse.papyrus.sysml.diagram.internalblock.provider.CustomEditPartProvider">
+ <Priority name="Medium"/>
+
+ <object
+ class="org.eclipse.gmf.runtime.notation.Node(org.eclipse.gmf.runtime.notation)"
+ id="org.eclipse.papyrus.sysml.diagram.internalblock.CustomNodeGraphicalTypes">
+ <method name="getType()" value="shape_sysml_flowport_as_affixed, shape_sysml_block_as_composite, shape_uml_port_as_affixed, shape_sysml_blockproperty_as_composite"/>
+ </object>
+
+ <object
+ class="org.eclipse.gmf.runtime.notation.Node(org.eclipse.gmf.runtime.notation)"
+ id="org.eclipse.papyrus.sysml.diagram.internalblock.CustomGraphicalTypes_Decorations">
+ <method name="getType()" value="linklabel_uml_connector_target_multiplicity, label_uml_property_label, linklabel_uml_appliedstereotype, label_sysml_block_name, compartment_sysml_structure, affixedlabel_uml_port_label, linklabel_uml_connector_source_multiplicity, linklabel_uml_namedelement_name, linklabel_uml_connector_label, compartment_sysml_blockproperty_structure, affixedlabel_uml_appliedstereotype, affixedlabel_sysml_flowport_label"/>
+ </object>
+
+ <context views="org.eclipse.papyrus.sysml.diagram.internalblock.CustomNodeGraphicalTypes"/>
+ <context views="org.eclipse.papyrus.sysml.diagram.internalblock.CustomGraphicalTypes_Decorations"/>
+
+ <object
+ class="org.eclipse.gmf.runtime.notation.Edge(org.eclipse.gmf.runtime.notation)"
+ id="org.eclipse.papyrus.sysml.diagram.internalblock.CustomEdgeGraphicalTypes">
+ <method name="getType()" value="link_uml_connector, link_uml_dependency"/>
+ </object>
+
+ <context views="org.eclipse.papyrus.sysml.diagram.internalblock.CustomEdgeGraphicalTypes"/>
+
+ </editpartProvider>
+
+ <!-- EditPartProvider for inherited elements (from CompositeDiagram) -->
+ <editpartProvider class="org.eclipse.papyrus.sysml.diagram.internalblock.provider.InheritedCompositeDiagramEditPartProvider">
+ <Priority name="Low"/>
+ <object
+ id="CONSTRAINT"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="Constraint_Shape, Constraint_NameLabel, Constraint_BodyLabel"/>
+ </object>
+ <object
+ id="COMMENT_CN"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="Comment_Shape_CN, Comment_BodyLabel_CN"/>
+ </object>
+ <object
+ id="COMMENT"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="Comment_Shape, Comment_BodyLabel"/>
+ </object>
+ <object
+ id="CONSTRAINT_CN"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="Constraint_Shape_CN, Constraint_NameLabel_CN, Constraint_BodyLabel_CN"/>
+ </object>
+
+
+ <object
+ id="COMMENT_ANNOTATED_ELEMENT"
+ class="org.eclipse.gmf.runtime.notation.Edge">
+ <method name="getType()" value="Comment_AnnotatedElementEdge"/>
+ </object>
+ <object
+ id="CONSTRAINT_CONSTRAINED_ELEMENT"
+ class="org.eclipse.gmf.runtime.notation.Edge">
+ <method name="getType()" value="Constraint_ConstrainedElementEdge"/>
+ </object>
+
+ <context views="CONSTRAINT, COMMENT_CN, COMMENT, CONSTRAINT_CN"/>
+ <context views="COMMENT_ANNOTATED_ELEMENT, CONSTRAINT_CONSTRAINED_ELEMENT"/>
+
+ </editpartProvider>
+</extension>
+
+<!-- Diagram edit policy provider -->
+<extension
+ point="org.eclipse.gmf.runtime.diagram.ui.editpolicyProviders">
+ <editpolicyProvider
+ class="org.eclipse.papyrus.sysml.diagram.internalblock.provider.CustomEditPolicyProvider">
+ <Priority name="Low"/>
+ </editpolicyProvider>
+</extension>
+
+<!-- Preference pages declaration -->
+<extension point="org.eclipse.ui.preferencePages" id="prefpages">
+
+ <!-- Diagram Preference pages declaration -->
+ <page
+ id="org.eclipse.papyrus.sysml.diagram.internalblock.preferences"
+ name="InternalBlock Diagram"
+ category="org.eclipse.papyrus.preferences.diagrams"
+ class="org.eclipse.papyrus.sysml.diagram.internalblock.preferences.InternalBlockDiagramGeneralPreferencePage">
+ </page>
+
+ <!-- Element Preference pages declaration -->
+ <page category="org.eclipse.papyrus.sysml.diagram.internalblock.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.internalblock.preferences.ConstraintPreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.internalblock.preferences.ConstraintPreferencePage"
+ name="Constraint">
+ </page>
+
+
+
+
+ <page category="org.eclipse.papyrus.sysml.diagram.internalblock.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.internalblock.preferences.CommentPreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.internalblock.preferences.CommentPreferencePage"
+ name="Comment">
+ </page>
+
+
+
+
+ <page category="org.eclipse.papyrus.sysml.diagram.internalblock.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.internalblock.preferences.CommentAnnotatedElementPreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.internalblock.preferences.CommentAnnotatedElementPreferencePage"
+ name="CommentAnnotatedElement">
+ </page>
+
+
+ <page category="org.eclipse.papyrus.sysml.diagram.internalblock.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.internalblock.preferences.ConstraintConstrainedElementPreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.internalblock.preferences.ConstraintConstrainedElementPreferencePage"
+ name="ConstraintConstrainedElement">
+ </page>
+
+
+
+
+ <page category="org.eclipse.papyrus.sysml.diagram.internalblock.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.internalblock.preferences.BlockCompositePreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.internalblock.preferences.BlockCompositePreferencePage"
+ name="BlockComposite">
+ </page>
+
+ <page category="org.eclipse.papyrus.sysml.diagram.internalblock.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.internalblock.preferences.BlockPropertyCompositePreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.internalblock.preferences.BlockPropertyCompositePreferencePage"
+ name="BlockPropertyComposite">
+ </page>
+
+ <page category="org.eclipse.papyrus.sysml.diagram.internalblock.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.internalblock.preferences.FlowPortPreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.internalblock.preferences.FlowPortPreferencePage"
+ name="FlowPort">
+ </page>
+
+ <page category="org.eclipse.papyrus.sysml.diagram.internalblock.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.internalblock.preferences.PortPreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.internalblock.preferences.PortPreferencePage"
+ name="Port">
+ </page>
+
+ <page category="org.eclipse.papyrus.sysml.diagram.internalblock.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.internalblock.preferences.ConnectorPreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.internalblock.preferences.ConnectorPreferencePage"
+ name="Connector">
+ </page>
+
+ <page category="org.eclipse.papyrus.sysml.diagram.internalblock.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.internalblock.preferences.DependencyPreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.internalblock.preferences.DependencyPreferencePage"
+ name="Dependency">
+ </page>
+
+
+</extension>
+
+<!-- // Start of user code custom extensions
+ -->
+
+<!-- Insert custom extensions here. -->
+
+<!--
+ Handler declaration for the Interface Manager Command.
+ The handler is enabled only if the selected element is a Port (excluding FlowPort) in an InternalBlockDiagram.
+ -->
+<extension point="org.eclipse.ui.handlers">
+
+ <handler commandId="org.eclipse.papyrus.uml.diagram.composite.command.manage.interfaces"
+ class="org.eclipse.papyrus.uml.diagram.composite.custom.actions.ManageProvidedInterfacesHandler">
+ <activeWhen>
+ <and>
+ <with variable="selection">
+ <iterate>
+ <instanceof value="org.eclipse.papyrus.uml.diagram.composite.edit.parts.PortEditPart"/>
+ </iterate>
+ </with>
+
+ <with variable="activeEditor">
+ <test property="org.eclipse.papyrus.uml.diagram.common.diagram.tester.diagramType" value="InternalBlock" forcePluginActivation="true"/>
+ </with>
+
+ <with variable="selection">
+ <test property="org.eclipse.papyrus.uml.diagram.internalblock.tester.selection.isFlowPort" value="false" forcePluginActivation="true"/>
+ </with>
+ </and>
+ </activeWhen>
+ </handler>
+</extension>
+
+<!--
+ Add a property tester for this diagram.
+ The tested properties allow to enable/disable handlers for commands .
+ -->
+<extension point="org.eclipse.core.expressions.propertyTesters">
+ <propertyTester id="org.eclipse.papyrus.uml.diagram.internalblock.tester.selection" type="org.eclipse.jface.viewers.ISelection"
+ namespace="org.eclipse.papyrus.uml.diagram.internalblock.tester.selection" properties="isFlowPort"
+ class="org.eclipse.papyrus.sysml.diagram.internalblock.utils.InternalBlockDiagramTester">
+ </propertyTester>
+</extension>
+
+<!-- // End of user code
+ -->
+
+</plugin>
\ No newline at end of file
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/plugin.properties b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/plugin.properties
new file mode 100755
index 0000000..04f44d4
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/plugin.properties
@@ -0,0 +1,12 @@
+#################################################################################
+# Copyright (c) 2010 CEA LIST.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - initial API and implementation
+##################################################################################
+pluginName=SysML Internal Block Diagram
+providerName=Eclipse Modeling Project
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/plugin.xml b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/plugin.xml
new file mode 100755
index 0000000..1ce2200
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/plugin.xml
@@ -0,0 +1,463 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+<!-- Diagram declaration -->
+<extension point="org.eclipse.papyrus.infra.ui.papyrusDiagram">
+ <creationCommand creationCommandClass="org.eclipse.papyrus.sysml.diagram.internalblock.InternalBlockDiagramCreateCommand" creationCondition="org.eclipse.papyrus.sysml.diagram.internalblock.InternalBlockDiagramCondition" icon="icons/obj16/Diagram_InternalBlock.gif" id="org.eclipse.papyrus.sysml.diagram.internalblock.CreateCommand" language="sysml" label="Internal Block Diagram"></creationCommand>
+ <editorDiagram actionBarContributorId="org.eclipse.papyrus.uml.diagram.common.part.UMLDiagramActionBarContributor" factoryClass="org.eclipse.papyrus.sysml.diagram.internalblock.InternalBlockDiagramEditorFactory" icon="icons/obj16/Diagram_InternalBlock.gif"></editorDiagram>
+</extension>
+
+<!-- Diagram creation command and handler -->
+<extension point="org.eclipse.ui.commands">
+ <command id="org.eclipse.papyrus.sysml.diagram.internalblock.CreateCommand" name="Create a new Internal Block Diagram" description="Create a new Internal Block Diagram" categoryId="org.eclipse.papyrus.editor.category"></command>
+</extension>
+
+
+<!-- Diagram view providers declaration -->
+<extension point="org.eclipse.gmf.runtime.diagram.core.viewProviders">
+
+ <!-- Diagram view provider -->
+ <viewProvider class="org.eclipse.papyrus.sysml.diagram.internalblock.provider.InternalBlockDiagramViewProvider">
+ <Priority name="Low"></Priority>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Diagram" semanticHints="InternalBlock"></context>
+ </viewProvider>
+
+ <!-- Custom graphical types view provider -->
+ <viewProvider class="org.eclipse.papyrus.sysml.diagram.internalblock.provider.CustomViewProvider">
+ <Priority name="Medium"></Priority>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="UML::Property, SysML::ActorPartProperty, SysML::ValueProperty, SysML::ReferenceProperty, SysML::FlowPort_In, UML::Port, SysML::FlowPort_Out, SysML::PartProperty, SysML::FlowPort_InOut, SysML::FlowPort, SysML::Block, SysML::FlowPort_NA"></context>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="shape_sysml_flowport_as_affixed, shape_sysml_block_as_composite, shape_uml_port_as_affixed, shape_sysml_blockproperty_as_composite, compartment_sysml_blockproperty_structure"></context>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="UML::Dependency, UML::Connector"></context>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="link_uml_connector, link_uml_dependency"></context>
+
+ <!-- Additional descriptors provided in case the semantic hint is is not provided -->
+
+ <!-- "uml.Class" -->
+ <object id="uml.Class" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Class"></method>
+ </object>
+ <context
+ elements="uml.Class"
+ viewClass="org.eclipse.gmf.runtime.notation.Node"></context>
+
+ <!-- "uml.Port" -->
+ <object id="uml.Port" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Port"></method>
+ </object>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" elements="uml.Port"></context>
+
+ <!-- "uml.Property" -->
+ <object id="uml.Property" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Property"></method>
+ </object>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" elements="uml.Property"></context>
+
+ <!-- "uml.Connector" -->
+ <object id="uml.Connector" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Connector"></method>
+ </object>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Edge" elements="uml.Connector"></context>
+
+ <!-- "uml.Dependency" -->
+ <object id="uml.Dependency" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Dependency"></method>
+ </object>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Edge" elements="uml.Dependency"></context>
+
+
+ <object id="elementtype.node"
+ class="org.eclipse.papyrus.gmf.diagram.common.commands.ISemanticHintAdapter(org.eclipse.papyrus.sysml.diagram.common)">
+
+ <method
+ name="getSemanticHint()"
+ value="UML::Property, SysML::ActorPartProperty, SysML::ValueProperty, SysML::ReferenceProperty, SysML::FlowPort_In, UML::Port, SysML::FlowPort_Out, SysML::PartProperty, SysML::FlowPort_InOut, SysML::FlowPort, SysML::Block, SysML::FlowPort_NA">
+ </method>
+ </object>
+ <context
+ elements="elementtype.node"
+ viewClass="org.eclipse.gmf.runtime.notation.Node">
+ </context>
+ <object id="elementtype.edge"
+ class="org.eclipse.papyrus.gmf.diagram.common.commands.ISemanticHintAdapter(org.eclipse.papyrus.sysml.diagram.common)">
+ <method
+ name="getSemanticHint()"
+ value="UML::Dependency, UML::Connector">
+ </method>
+ </object>
+ <context
+ elements="elementtype.edge"
+ viewClass="org.eclipse.gmf.runtime.notation.Edge">
+ </context>
+
+ </viewProvider>
+
+ <!-- ViewProvider for inherited elements (from CompositeDiagram ViewProvider) -->
+ <viewProvider class="org.eclipse.papyrus.sysml.diagram.internalblock.provider.InheritedCompositeDiagramViewProvider">
+ <Priority name="Low"></Priority>
+
+ <!-- Load the ViewProvider on following SemanticHint related to IElementType(s) used in the palette (also used for legacy elements) -->
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="UML::Comment, UML::Constraint"></context>
+
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="Comment_Shape, Comment_Shape_CN, Constraint_Shape, Constraint_Shape_CN"></context>
+
+ <context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="Comment_AnnotatedElementEdge, Constraint_ConstrainedElementEdge"></context>
+
+ <!-- Additional descriptors provided in case the semantic hint is is not provided -->
+
+ <!-- "uml.Comment" -->
+ <object id="uml.Comment" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Comment"></method>
+ </object>
+
+ <!-- "uml.Constraint" -->
+ <object id="uml.Constraint" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Constraint"></method>
+ </object>
+
+ <!-- Additional activation contexts for nodes semantic objects -->
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" elements="uml.Comment, uml.Constraint"></context>
+
+ </viewProvider>
+
+</extension>
+
+<!-- Diagram edit part providers declaration -->
+<extension point="org.eclipse.gmf.runtime.diagram.ui.editpartProviders">
+
+ <!-- Diagram edit part provider -->
+ <editpartProvider class="org.eclipse.papyrus.sysml.diagram.internalblock.provider.InternalBlockDiagramEditPartProvider">
+ <Priority name="Low"></Priority>
+ <object id="org.eclipse.papyrus.sysml.diagram.internalblock.Diagram" class="org.eclipse.gmf.runtime.notation.Diagram">
+ <method name="getType()" value="InternalBlock"></method>
+ </object>
+ <context views="org.eclipse.papyrus.sysml.diagram.internalblock.Diagram"></context>
+ </editpartProvider>
+
+ <!-- Custom graphical types edit part provider -->
+ <editpartProvider class="org.eclipse.papyrus.sysml.diagram.internalblock.provider.CustomEditPartProvider">
+ <Priority name="Medium"></Priority>
+
+ <object class="org.eclipse.gmf.runtime.notation.Node(org.eclipse.gmf.runtime.notation)" id="org.eclipse.papyrus.sysml.diagram.internalblock.CustomNodeGraphicalTypes">
+ <method name="getType()" value="shape_sysml_flowport_as_affixed, shape_sysml_block_as_composite, shape_uml_port_as_affixed, shape_sysml_blockproperty_as_composite"></method>
+ </object>
+
+ <object class="org.eclipse.gmf.runtime.notation.Node(org.eclipse.gmf.runtime.notation)" id="org.eclipse.papyrus.sysml.diagram.internalblock.CustomGraphicalTypes_Decorations">
+ <method name="getType()" value="linklabel_uml_connector_target_multiplicity, label_uml_property_label, linklabel_uml_appliedstereotype, label_sysml_block_name, compartment_sysml_structure, affixedlabel_uml_port_label, linklabel_uml_connector_source_multiplicity, linklabel_uml_namedelement_name, linklabel_uml_connector_label, compartment_sysml_blockproperty_structure, affixedlabel_uml_appliedstereotype, affixedlabel_sysml_flowport_label"></method>
+ </object>
+
+ <context views="org.eclipse.papyrus.sysml.diagram.internalblock.CustomNodeGraphicalTypes"></context>
+ <context views="org.eclipse.papyrus.sysml.diagram.internalblock.CustomGraphicalTypes_Decorations"></context>
+
+ <object class="org.eclipse.gmf.runtime.notation.Edge(org.eclipse.gmf.runtime.notation)" id="org.eclipse.papyrus.sysml.diagram.internalblock.CustomEdgeGraphicalTypes">
+ <method name="getType()" value="link_uml_connector, link_uml_dependency"></method>
+ </object>
+
+ <context views="org.eclipse.papyrus.sysml.diagram.internalblock.CustomEdgeGraphicalTypes"></context>
+
+ </editpartProvider>
+
+ <!-- EditPartProvider for inherited elements (from CompositeDiagram) -->
+ <editpartProvider class="org.eclipse.papyrus.sysml.diagram.internalblock.provider.InheritedCompositeDiagramEditPartProvider">
+ <Priority name="Low"></Priority>
+
+ <object id="COMMENT" class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="Comment_Shape, Comment_BodyLabel"></method>
+ </object>
+ <object id="COMMENT_CN" class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="Comment_Shape_CN, Comment_BodyLabel_CN"></method>
+ </object>
+ <object id="CONSTRAINT" class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="Constraint_Shape, Constraint_NameLabel, Constraint_BodyLabel"></method>
+ </object>
+ <object id="CONSTRAINT_CN" class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="Constraint_Shape_CN, Constraint_NameLabel_CN, Constraint_BodyLabel_CN"></method>
+ </object>
+
+ <object id="COMMENT_ANNOTATED_ELEMENT" class="org.eclipse.gmf.runtime.notation.Edge">
+ <method name="getType()" value="Comment_AnnotatedElementEdge"></method>
+ </object>
+ <object id="CONSTRAINT_CONSTRAINED_ELEMENT" class="org.eclipse.gmf.runtime.notation.Edge">
+ <method name="getType()" value="Constraint_ConstrainedElementEdge"></method>
+ </object>
+
+ <context views="COMMENT, COMMENT_CN, CONSTRAINT, CONSTRAINT_CN"></context>
+ <context views="COMMENT_ANNOTATED_ELEMENT, CONSTRAINT_CONSTRAINED_ELEMENT"></context>
+
+ </editpartProvider>
+
+</extension>
+
+<!-- Diagram edit policy provider -->
+<extension point="org.eclipse.gmf.runtime.diagram.ui.editpolicyProviders">
+ <editpolicyProvider class="org.eclipse.papyrus.sysml.diagram.internalblock.provider.CustomEditPolicyProvider">
+ <Priority name="Low"></Priority>
+ </editpolicyProvider>
+</extension>
+
+<!-- Preference pages declaration -->
+<extension point="org.eclipse.ui.preferencePages" id="prefpages">
+
+ <!-- Diagram Preference pages declaration -->
+ <page id="org.eclipse.papyrus.sysml.diagram.internalblock.preferences" name="Internal Block Diagram" category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams" class="org.eclipse.papyrus.sysml.diagram.internalblock.preferences.InternalBlockDiagramGeneralPreferencePage">
+ </page>
+
+</extension>
+
+<!-- // Start of user code custom extensions
+ -->
+
+<!-- Insert custom extensions here. -->
+
+
+
+<!--
+ Handler declaration for the Interface Manager Command.
+ The handler is enabled only if the selected element is a Port (excluding FlowPort) in an InternalBlockDiagram.
+ -->
+<extension point="org.eclipse.ui.handlers">
+
+ <handler commandId="org.eclipse.papyrus.sysml.diagram.internalblock.command.manage.interfaces" class="org.eclipse.papyrus.sysml.diagram.internalblock.handler.InternalBlockManageInterfacesHandler">
+ <activeWhen>
+ <and>
+ <with variable="selection">
+ <iterate>
+ <instanceof value="org.eclipse.papyrus.uml.diagram.common.edit.part.PortAffixedNodeEditPart"></instanceof>
+ </iterate>
+ </with>
+
+ <with variable="activeEditor">
+ <test property="org.eclipse.papyrus.uml.diagram.common.diagram.tester.diagramType" value="InternalBlock" forcePluginActivation="true"></test>
+ </with>
+
+ <with variable="selection">
+ <test property="org.eclipse.papyrus.sysml.diagram.internalblock.tester.selection.isFlowPort" value="false" forcePluginActivation="true"></test>
+ </with>
+ </and>
+ </activeWhen>
+ </handler>
+</extension>
+
+<!--
+ Add a property tester for this diagram.
+ The tested properties allow to enable/disable handlers for commands .
+ -->
+<extension point="org.eclipse.core.expressions.propertyTesters">
+ <propertyTester id="org.eclipse.papyrus.sysml.diagram.internalblock.tester.selection" type="org.eclipse.jface.viewers.ISelection" namespace="org.eclipse.papyrus.sysml.diagram.internalblock.tester.selection" properties="isFlowPort" class="org.eclipse.papyrus.sysml.diagram.internalblock.utils.InternalBlockDiagramTester">
+ </propertyTester>
+</extension>
+
+<!-- The Command to manages the Provided and Required Interfaces for a Port-->
+<extension point="org.eclipse.ui.commands">
+ <command categoryId="org.eclipse.papyrus.editor.category" id="org.eclipse.papyrus.sysml.diagram.internalblock.command.manage.interfaces" name="Manage Provided Interfaces" description="Allows to manage easily provided Interfaces for a Port">
+ </command>
+</extension>
+
+<!-- Add the Menu to manages the Provided and Required Interfaces for a Port-->
+<extension point="org.eclipse.ui.menus">
+ <menuContribution locationURI="popup:org.eclipse.gmf.runtime.diagram.ui.DiagramEditorContextMenu?endof=editMenu" allPopups="false">
+ <command commandId="org.eclipse.papyrus.sysml.diagram.internalblock.command.manage.interfaces" icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Interface.gif" id="org.eclipse.papyrus.sysml.diagram.internalblock.popup.interface.manage.interface" label="Manage Interfaces" mnemonic="&I" style="push" tooltip="The command to manage the interfaces provided and required by a Port">
+ <!-- The action is visible only if there is an active handler for it -->
+ <visibleWhen checkEnabled="true"></visibleWhen>
+ </command>
+ </menuContribution>
+</extension>
+
+<!-- Parser provider declaration -->
+<extension point="org.eclipse.gmf.runtime.common.ui.services.parserProviders">
+ <ParserProvider class="org.eclipse.papyrus.sysml.diagram.internalblock.provider.ParserProvider">
+ <Priority name="Low"></Priority>
+ </ParserProvider>
+</extension>
+
+<!-- Diagram specific advices -->
+<extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypes">
+
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+
+ <!-- Property specific advices (remove inconsistent views when a Property type is set) -->
+ <adviceBinding id="org.eclipse.papyrus.sysml.diagram.internalblock.PropertyHelperAdvice" class="org.eclipse.papyrus.sysml.diagram.internalblock.helper.advice.PropertyHelperAdvice" inheritance="all" typeId="org.eclipse.papyrus.uml.Property">
+ </adviceBinding>
+
+ <!-- Delete moved views advice -->
+ <adviceBinding id="org.eclipse.papyrus.sysml.diagram.internalblock.DeleteViewDuringMoveHelperAdvice" class="org.eclipse.papyrus.sysml.diagram.internalblock.helper.advice.DeleteViewDuringMoveHelperAdvice" inheritance="all" typeId="org.eclipse.papyrus.uml.Element">
+ </adviceBinding>
+
+ </metamodel>
+</extension>
+
+<!-- UML ElementType bindings to Papyrus shared IClientContext -->
+<extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypeBindings">
+
+ <!-- Bindings declaration to shared IClientContext -->
+ <binding context="org.eclipse.papyrus.infra.services.edit.TypeContext">
+ <elementType ref="org.eclipse.papyrus.sysml.diagram.internalblock.PropertyHelperAdvice"></elementType>
+ <elementType ref="org.eclipse.papyrus.sysml.diagram.internalblock.DeleteViewDuringMoveHelperAdvice"></elementType>
+ </binding>
+
+</extension>
+
+<!-- Service for Show/Hide content on Part or Ref. -->
+<extension point="org.eclipse.ui.services">
+ <sourceProvider provider="org.eclipse.papyrus.sysml.diagram.internalblock.provider.ActionStateSourceProvider">
+ <variable name="showHideRelatedContents" priorityLevel="workbench"></variable>
+ </sourceProvider>
+</extension>
+
+<!-- Handler for Show/Hide content on Part or Ref. -->
+<extension point="org.eclipse.ui.handlers">
+ <handler class="org.eclipse.papyrus.sysml.diagram.internalblock.handler.ShowHideRelatedContentsHandler" commandId="org.eclipse.papyrus.uml.diagram.menu.commands.ShowHideContentsCommand">
+ <activeWhen>
+ <and>
+ <with variable="activeEditor">
+ <test property="org.eclipse.papyrus.uml.diagram.common.diagram.tester.diagramType" value="InternalBlock" forcePluginActivation="true"></test>
+ </with>
+ <with variable="showHideRelatedContents">
+ <equals value="enabled"></equals>
+ </with>
+ <with variable="selection">
+ <iterate ifEmpty="false" operator="and">
+ <instanceof value="org.eclipse.papyrus.sysml.diagram.parametric.edit.part.CustomBlockCompositeEditPartTN"></instanceof>
+ </iterate>
+ </with>
+ </and>
+ </activeWhen>
+ </handler>
+</extension>
+
+<!-- Validation markers declaration -->
+<extension point="org.eclipse.gmf.runtime.common.ui.services.markerNavigationProviders" id="markers-navigation">
+ <MarkerNavigationProvider class="org.eclipse.papyrus.gmf.diagram.common.provider.MarkerNavigationProvider">
+ <MarkerType name="org.eclipse.papyrus.sysml.diagram.internalblock.diagnostic"></MarkerType>
+ <Priority name="Lowest"></Priority>
+ </MarkerNavigationProvider>
+</extension>
+
+<extension id="diagnostic" name="Internal Block Diagram problems" point="org.eclipse.core.resources.markers">
+ <super type="org.eclipse.core.resources.problemmarker"></super>
+ <super type="org.eclipse.gmf.runtime.common.ui.services.marker"></super>
+ <persistent value="true"></persistent>
+</extension>
+
+<extension id="validationDecoratorProvider" name="ValidationDecorations" point="org.eclipse.gmf.runtime.diagram.ui.decoratorProviders">
+ <decoratorProvider class="org.eclipse.papyrus.sysml.diagram.internalblock.provider.ValidationDecoratorProvider">
+ <Priority name="Lowest"></Priority>
+ <object class="org.eclipse.gmf.runtime.diagram.ui.editparts.IPrimaryEditPart(org.eclipse.gmf.runtime.diagram.ui)" id="PRIMARY_VIEW"></object>
+ <context decoratorTargets="PRIMARY_VIEW"></context>
+ </decoratorProvider>
+</extension>
+
+
+
+<!-- // End of user code
+ -->
+<extension point="org.eclipse.papyrus.infra.gmfdiag.common.notationTypesMapping">
+ <diagramMappings diagramID="InternalBlock">
+ <mapping type="InternalBlock" humanReadableType="InternalBlockDiagram"/>
+ <!-- Compartments -->
+ <mapping
+ humanReadableType="structure"
+ type="compartment_sysml_structure">
+ </mapping>
+
+ <mapping
+ humanReadableType="structure"
+ type="compartment_sysml_blockproperty_structure">
+ </mapping>
+
+ <!-- Link labels -->
+
+ <mapping
+ humanReadableType="Name"
+ type="affixedlabel_sysml_flowport_label">
+ </mapping>
+
+ <mapping
+ humanReadableType="Stereotype"
+ type="affixedlabel_uml_appliedstereotype">
+ </mapping>
+
+ <mapping
+ humanReadableType="Label"
+ type="affixedlabel_uml_port_label">
+ </mapping>
+
+ <mapping
+ humanReadableType="Stereotype"
+ type="linklabel_uml_appliedstereotype">
+ </mapping>
+
+ <mapping
+ humanReadableType="Name"
+ type="linklabel_uml_connector_label">
+ </mapping>
+
+ <mapping
+ humanReadableType="SourceMultiplicity"
+ type="linklabel_uml_connector_source_multiplicity">
+ </mapping>
+
+ <mapping
+ humanReadableType="TargetMultiplicity"
+ type="linklabel_uml_connector_target_multiplicity">
+ </mapping>
+
+ <mapping
+ humanReadableType="Name"
+ type="linklabel_uml_namedelement_name">
+ </mapping>
+
+ </diagramMappings>
+ </extension>
+
+<extension id="org.eclipse.papyrus.sysml.diagram.internalblock.migration" name="InternalBlockMigration" point="org.eclipse.papyrus.infra.gmfdiag.common.diagramReconciler">
+ <diagramReconciler
+ diagramType="InternalBlock"
+ reconcilerClass="org.eclipse.papyrus.sysml.diagram.internalblock.migration.InternalBlockDiagramReconcilerUndefinedTo100"
+ source="undefined"
+ target="1.3.0">
+ </diagramReconciler>
+ <diagramReconciler
+ diagramType="InternalBlock"
+ reconcilerClass="org.eclipse.papyrus.uml.diagram.composite.custom.migration.CompositeReconciler_1_1_0"
+ source="1.0.0"
+ target="1.3.0">
+ </diagramReconciler>
+ <diagramReconciler
+ diagramType="InternalBlock"
+ reconcilerClass="org.eclipse.papyrus.uml.diagram.composite.custom.migration.CompositeReconcilerForCompartment_1_2_0"
+ source="1.1.0"
+ target="1.3.0">
+ </diagramReconciler>
+ <diagramReconciler
+ diagramType="InternalBlock"
+ reconcilerClass="org.eclipse.papyrus.uml.diagram.composite.custom.migration.CompositeReconciler_1_2_0"
+ source="1.1.0"
+ target="1.3.0">
+ </diagramReconciler>
+</extension>
+
+ <extension
+ point="org.eclipse.papyrus.infra.gmfdiag.common.visualTypeProviders">
+ <visualTypeProvider
+ class="org.eclipse.papyrus.sysml.diagram.internalblock.provider.InternalBlockVisualTypeProvider"
+ diagramType="InternalBlock">
+ </visualTypeProvider>
+ </extension>
+
+<extension point="org.eclipse.papyrus.infra.gmfdiag.common.paletteDefinition">
+ <paletteDefinition
+ ID="org.eclipse.papyrus.sysml.diagram.internalblock.paletteconfiguration"
+ class="org.eclipse.papyrus.infra.gmfdiag.common.service.palette.ExtendedPluginPaletteProvider"
+ name="Papyrus SysML internalblock editor Plugin Palette"
+ path="palettes/PapyrusSysMLInternalBlockDiagram.paletteconfiguration"
+ provider="Eclipse Modeling Project">
+ <Priority
+ name="Lowest">
+ </Priority>
+ <!-- Specify diagram this palette tools relate to -->
+ <editor
+ id="org.eclipse.papyrus.sysml.diagram.internalblock">
+ </editor>
+ </paletteDefinition>
+</extension>
+</plugin>
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/pom.xml b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/pom.xml
new file mode 100755
index 0000000..5d58430
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/pom.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.papyrus.sysml</groupId>
+ <artifactId>org.eclipse.papyrus.sysml-diagram</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.papyrus.sysml.diagram.internalblock</artifactId>
+ <version>3.0.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project>
\ No newline at end of file
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/Activator.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/Activator.java
new file mode 100755
index 0000000..ecd22df
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/Activator.java
@@ -0,0 +1,107 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock;
+
+import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.papyrus.infra.core.log.LogHelper;
+import org.eclipse.papyrus.sysml.diagram.internalblock.preferences.CustomPreferenceInitializer;
+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.sysml.diagram.internalblock";
+
+ /** The plug-in shared instance */
+ private static Activator plugin;
+
+ /** The logging helper */
+ public static LogHelper log;
+
+ /** The plug-in Preference store */
+ public static final PreferencesHint DIAGRAM_PREFERENCES_HINT = new PreferencesHint(PLUGIN_ID);
+
+ /** Default constructor */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+
+ // register the login helper
+ log = new LogHelper(plugin);
+
+ // register the preference store
+ PreferencesHint.registerPreferenceStore(DIAGRAM_PREFERENCES_HINT, getPreferenceStore());
+
+ // Preferences initialization
+ CustomPreferenceInitializer diagramPreferenceInitializer = new CustomPreferenceInitializer();
+ diagramPreferenceInitializer.initializeDefaultPreferences();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getInstance() {
+ return plugin;
+ }
+
+ /**
+ * Returns an image descriptor for the image file at the given plug-in relative path.
+ *
+ * @generated
+ * @param path
+ * the path
+ * @return the image descriptor
+ */
+ public static ImageDescriptor getBundledImageDescriptor(String path) {
+ return AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, path);
+ }
+
+ /**
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#getPreferenceStore()
+ *
+ * @return Shared Preference Store.
+ */
+ @Override
+ public IPreferenceStore getPreferenceStore() {
+ IPreferenceStore store = org.eclipse.papyrus.infra.gmfdiag.preferences.Activator.getDefault().getPreferenceStore();
+ return store;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/InternalBlockDiagramCreateCommand.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/InternalBlockDiagramCreateCommand.java
new file mode 100755
index 0000000..356666f
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/InternalBlockDiagramCreateCommand.java
@@ -0,0 +1,149 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Laurent Wouters (CEA LIST) laurent.wouters@cea.fr - Viewpoints application
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
+import org.eclipse.gmf.runtime.diagram.core.services.ViewService;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.Bounds;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.AbstractPapyrusGmfCreateDiagramCommandHandler;
+import org.eclipse.papyrus.infra.gmfdiag.common.helper.DiagramPrototype;
+import org.eclipse.papyrus.sysml.blocks.Block;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.provider.ElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.commands.SemanticAdapter;
+import org.eclipse.papyrus.uml.diagram.composite.part.UMLDiagramEditorPlugin;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+/**
+ * Represents the creation command for a SysML internal block diagram
+ *
+ * @author Laurent Wouters
+ */
+public class InternalBlockDiagramCreateCommand extends AbstractPapyrusGmfCreateDiagramCommandHandler {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getDefaultDiagramName() {
+ return "New Internal Block Diagram"; //$NON-NLS-1$
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getDiagramNotationID() {
+ return ElementTypes.DIAGRAM_ID;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected PreferencesHint getPreferenceHint() {
+ return Activator.DIAGRAM_PREFERENCES_HINT;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Diagram doCreateDiagram(Resource diagramResource, EObject owner, EObject element, DiagramPrototype prototype, String name) {
+ // Start of user code Custom diagram creation
+ Diagram diagram = null;
+
+ org.eclipse.uml2.uml.Class cOwner = (org.eclipse.uml2.uml.Class) element;
+ Block block = UMLUtil.getStereotypeApplication(cOwner, Block.class);
+
+ if (block != null) {
+ canvasDomainElement = element;
+ Package owningPackage = ((Element) element).getNearestPackage();
+ diagram = super.doCreateDiagram(diagramResource, owner, owningPackage, prototype, name);
+ }
+
+ return diagram;
+ // End of user code
+ }
+
+ // Start of user code Custom creation command
+ /** Domain Element referenced by canvas if it differs from {@link Package} */
+ protected EObject canvasDomainElement = null;
+
+ /** Default margin for the display of Domain Element referenced by canvas */
+ protected static int DEFAULT_MARGIN = 40;
+
+ /** Default height for the display of Domain Element referenced by canvas */
+ protected static int DEFAULT_HEIGHT = 250;
+
+ /** Default width for the display of Domain Element referenced by canvas */
+ protected static int DEFAULT_WIDTH = 500;
+
+ /**
+ * Initialize the diagram. The diagram is attached to the element selected on creation.
+ * Possible element types are: Block.
+ */
+ @Override
+ protected void initializeDiagram(EObject diagram) {
+ if (diagram instanceof Diagram) {
+ Diagram currentDiagram = (Diagram) diagram;
+ if (canvasDomainElement != null) {
+ currentDiagram.setElement(canvasDomainElement);
+ initializeDiagramContent(currentDiagram);
+ }
+ }
+ }
+
+ /**
+ * Initialize the diagram with the canvas domain element shown.
+ *
+ * @param diagram
+ * the diagram to initialize
+ */
+ protected void initializeDiagramContent(Diagram diagram) {
+
+ // Create a view for the canvasDomainElement in the new diagram
+ View view =
+ ViewService.getInstance().createNode(new SemanticAdapter(canvasDomainElement, null), diagram, SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID, ViewUtil.APPEND, true, UMLDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT);
+ view.setElement(diagram.getElement());
+
+ // Update the view position and size (should adapt to canvas current size)
+ Bounds viewBounds = (Bounds) ((Node) view).getLayoutConstraint();
+ viewBounds.setX(DEFAULT_MARGIN);
+ viewBounds.setY(DEFAULT_MARGIN);
+ viewBounds.setHeight(DEFAULT_HEIGHT);
+ viewBounds.setWidth(DEFAULT_WIDTH);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @generated NOT
+ */
+ @Override
+ public boolean isParentReassignable() {
+ // Bug 374626: [Model Explorer] Moving an IBD from a block to another block shall be forbidden
+ return false;
+ }
+
+ // End of user code
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/InternalBlockDiagramEditorFactory.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/InternalBlockDiagramEditorFactory.java
new file mode 100755
index 0000000..3aa198a
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/InternalBlockDiagramEditorFactory.java
@@ -0,0 +1,25 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock;
+
+import org.eclipse.papyrus.infra.gmfdiag.common.GmfEditorFactory;
+import org.eclipse.papyrus.sysml.diagram.internalblock.provider.ElementTypes;
+
+public class InternalBlockDiagramEditorFactory extends GmfEditorFactory {
+
+ public InternalBlockDiagramEditorFactory() {
+ super(InternalBlockDiagramForMultiEditor.class, ElementTypes.DIAGRAM_ID);
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/InternalBlockDiagramForMultiEditor.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/InternalBlockDiagramForMultiEditor.java
new file mode 100755
index 0000000..b50f917
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/InternalBlockDiagramForMultiEditor.java
@@ -0,0 +1,133 @@
+/*****************************************************************************
+ * Copyright (c) 2011, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 392301
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.emf.common.ui.URIEditorInput;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.papyrus.infra.core.editor.BackboneException;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.internationalization.utils.utils.LabelInternationalization;
+import org.eclipse.papyrus.sysml.diagram.internalblock.part.InternalBlockDiagramEditor;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.PartInitException;
+
+/**
+ * An editor to be used in multitabs editor. This editor extends the original UML Diagram.
+ *
+ */
+public class InternalBlockDiagramForMultiEditor extends InternalBlockDiagramEditor {
+
+ /**
+ * The location of diagram icon in the plug-in
+ */
+ private static final String DIAG_IMG_PATH = "icons/obj16/Diagram_InternalBlock.gif";
+
+ /**
+ * The image descriptor of the diagram icon
+ */
+ private static final ImageDescriptor DIAG_IMG_DESC = Activator.getBundledImageDescriptor(InternalBlockDiagramForMultiEditor.DIAG_IMG_PATH);
+
+ /** The editor splitter. */
+ private Composite splitter;
+
+ private Image titleImage;
+
+ /**
+ * Constructor for SashSystem v2. Context and required objects are retrieved from the
+ * ServiceRegistry.
+ *
+ * @throws BackboneException
+ * @throws ServiceException
+ *
+ */
+ public InternalBlockDiagramForMultiEditor(ServicesRegistry servicesRegistry, Diagram diagram) throws BackboneException, ServiceException {
+ super(servicesRegistry, diagram);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void init(IEditorSite site, IEditorInput input) throws PartInitException {
+ super.init(site, input);
+ setPartName(LabelInternationalization.getInstance().getDiagramLabel(getDiagram()));
+ titleImage = DIAG_IMG_DESC.createImage();
+ setTitleImage(titleImage);
+ }
+
+ @Override
+ public void dispose() {
+ if (titleImage != null) {
+ titleImage.dispose();
+ titleImage = null;
+ }
+
+ super.dispose();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void setInput(IEditorInput input) {
+ try {
+ // Provide an URI with fragment in order to reuse the same Resource
+ // and set the diagram to the fragment.
+ URIEditorInput uriInput = new URIEditorInput(EcoreUtil.getURI(getDiagram()));
+ doSetInput(uriInput, true);
+ } catch (CoreException x) {
+ String title = "Problem opening";
+ String msg = "Cannot open input element:";
+ Shell shell = getSite().getShell();
+ ErrorDialog.openError(shell, title, msg, x.getStatus());
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void createGraphicalViewer(Composite parent) {
+ splitter = parent;
+ super.createGraphicalViewer(parent);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void setFocus() {
+ splitter.setFocus();
+ super.setFocus();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getEditingDomainID() {
+ return "org.eclipse.papyrus.sysml.diagram.internalblock.EditingDomain";
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/edit/part/InternalBlockDiagramEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/edit/part/InternalBlockDiagramEditPart.java
new file mode 100755
index 0000000..20c360f
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/edit/part/InternalBlockDiagramEditPart.java
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.edit.part;
+
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.gmf.diagram.common.edit.policy.DefaultContainerNodeEditPolicy;
+import org.eclipse.papyrus.gmf.diagram.common.edit.policy.DefaultXYLayoutEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusDiagramEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.AbstractShowHideRelatedLinkEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.internalblock.edit.policy.CustomDragDropEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.internalblock.edit.policy.DiagramSemanticEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.internalblock.edit.policy.ShowHideRelatedLinkEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
+
+/**
+ *
+ * @Generated NOT //change the super class
+ */
+public class InternalBlockDiagramEditPart extends PapyrusDiagramEditPart {
+
+ public InternalBlockDiagramEditPart(View view) {
+ super(view);
+ }
+
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DiagramSemanticEditPolicy());
+ installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDragDropEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new DefaultXYLayoutEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultContainerNodeEditPolicy());
+ installEditPolicy(AbstractShowHideRelatedLinkEditPolicy.SHOW_HIDE_RELATED_LINK_ROLE, new ShowHideRelatedLinkEditPolicy(this));
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/edit/policy/DiagramSemanticEditPolicy.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/edit/policy/DiagramSemanticEditPolicy.java
new file mode 100755
index 0000000..e439b66
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/edit/policy/DiagramSemanticEditPolicy.java
@@ -0,0 +1,54 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.edit.policy;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gef.requests.ReconnectRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
+
+public class DiagramSemanticEditPolicy extends DefaultSemanticEditPolicy {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getReorientRelationshipSourceCommand(ReconnectRequest request) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getReorientRelationshipTargetCommand(ReconnectRequest request) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getReorientRefRelationshipSourceCommand(ReconnectRequest request) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getReorientRefRelationshipTargetCommand(ReconnectRequest request) {
+ return UnexecutableCommand.INSTANCE;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/edit/policy/InternalBlockDiagramDragDropEditPolicy.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/edit/policy/InternalBlockDiagramDragDropEditPolicy.java
new file mode 100755
index 0000000..e0acac9
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/edit/policy/InternalBlockDiagramDragDropEditPolicy.java
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.edit.policy;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.gmf.diagram.common.provider.IGraphicalTypeRegistry;
+import org.eclipse.papyrus.sysml.diagram.internalblock.provider.GraphicalTypeRegistry;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+
+/** Customization of the DND edit policy for the InternalBlock Diagram */
+public class InternalBlockDiagramDragDropEditPolicy extends CustomDiagramDragDropEditPolicy {
+
+ /** Local graphical type registry */
+ protected IGraphicalTypeRegistry registry = new GraphicalTypeRegistry();
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getNodeVisualID(View containerView, EObject domainElement) {
+ String domainType = registry.getNodeGraphicalType(domainElement, containerView.getType());
+ if (org.eclipse.papyrus.infra.gmfdiag.common.providers.IGraphicalTypeRegistry.UNDEFINED_TYPE.equals(domainType)) {
+ return null; // undefined
+ }
+ return domainType;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getLinkWithClassVisualID(EObject domainElement) {
+ String domainType = registry.getEdgeGraphicalType(domainElement);
+ if (org.eclipse.papyrus.infra.gmfdiag.common.providers.IGraphicalTypeRegistry.UNDEFINED_TYPE.equals(domainType)) {
+ return null; // undefined
+ }
+ return domainType;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/factory/DiagramPaletteFactory.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/factory/DiagramPaletteFactory.java
new file mode 100755
index 0000000..bc27f1d
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/factory/DiagramPaletteFactory.java
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.factory;
+
+import java.util.Arrays;
+import java.util.HashMap;
+
+import org.eclipse.gef.Tool;
+import org.eclipse.gmf.runtime.diagram.ui.services.palette.PaletteFactory;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.infra.gmfdiag.common.service.palette.AspectUnspecifiedTypeConnectionTool;
+import org.eclipse.papyrus.infra.gmfdiag.common.service.palette.AspectUnspecifiedTypeCreationTool;
+import org.eclipse.papyrus.sysml.diagram.internalblock.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+
+@SuppressWarnings("serial")
+public class DiagramPaletteFactory extends PaletteFactory.Adapter {
+
+ private static HashMap<String, IElementType[]> nodesToolIdTypesMap = new HashMap<String, IElementType[]>() {
+
+ {
+ put("internalblock.tool.blockcomposite", new IElementType[] { SysMLElementTypes.BLOCK });
+ put("internalblock.tool.blockpropertycomposite", new IElementType[] { SysMLElementTypes.PART_PROPERTY, SysMLElementTypes.REFERENCE_PROPERTY, SysMLElementTypes.ACTOR_PART_PROPERTY,
+ SysMLElementTypes.VALUE_PROPERTY, UMLElementTypes.PROPERTY });
+ put("internalblock.tool.flowport", new IElementType[] { SysMLElementTypes.FLOW_PORT });
+ put("internalblock.tool.port", new IElementType[] { UMLElementTypes.PORT });
+ // Start of user code Custom nodes
+ put("internalblock.tool.part", new IElementType[] { SysMLElementTypes.PART_PROPERTY });
+ put("internalblock.tool.reference", new IElementType[] { SysMLElementTypes.REFERENCE_PROPERTY });
+ put("internalblock.tool.actorpart", new IElementType[] { SysMLElementTypes.ACTOR_PART_PROPERTY });
+ put("internalblock.tool.value", new IElementType[] { SysMLElementTypes.VALUE_PROPERTY });
+ put("internalblock.tool.property", new IElementType[] { UMLElementTypes.PROPERTY });
+
+ put("internalblock.tool.flowport_na", new IElementType[] { SysMLElementTypes.FLOW_PORT_NA });
+ put("internalblock.tool.flowport_in", new IElementType[] { SysMLElementTypes.FLOW_PORT_IN });
+ put("internalblock.tool.flowport_out", new IElementType[] { SysMLElementTypes.FLOW_PORT_OUT });
+ put("internalblock.tool.flowport_inout", new IElementType[] { SysMLElementTypes.FLOW_PORT_IN_OUT });
+
+ put("internalblock.tool.constraint", new IElementType[] { UMLElementTypes.CONSTRAINT });
+ put("internalblock.tool.comment", new IElementType[] { UMLElementTypes.COMMENT });
+ // End of user code
+ }
+ };
+
+ private static HashMap<String, IElementType[]> edgesToolIdTypesMap = new HashMap<String, IElementType[]>() {
+
+ {
+ put("internalblock.tool.connector", new IElementType[] { UMLElementTypes.CONNECTOR });
+ put("internalblock.tool.dependency", new IElementType[] { UMLElementTypes.DEPENDENCY });
+ // Start of user code Custom edges
+ put("internalblock.tool.comment_constraint_link", new IElementType[] { ElementTypes.COMMENT_ANNOTATED_ELEMENT, ElementTypes.CONSTRAINT_CONSTRAINED_ELEMENT });
+ // End of user code
+ }
+ };
+
+ @Override
+ public Tool createTool(String toolId) {
+
+ IElementType[] types;
+
+ types = nodesToolIdTypesMap.get(toolId);
+ if (types != null) {
+ return new AspectUnspecifiedTypeCreationTool(Arrays.asList(types));
+ }
+
+ types = edgesToolIdTypesMap.get(toolId);
+ if (types != null) {
+ return new AspectUnspecifiedTypeConnectionTool(Arrays.asList(types));
+ }
+ return null;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/factory/InternalBlockDiagramViewFactory.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/factory/InternalBlockDiagramViewFactory.java
new file mode 100755
index 0000000..120a1c0
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/factory/InternalBlockDiagramViewFactory.java
@@ -0,0 +1,33 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.factory;
+
+import org.eclipse.gmf.runtime.diagram.ui.view.factories.DiagramViewFactory;
+import org.eclipse.gmf.runtime.notation.MeasurementUnit;
+
+public class InternalBlockDiagramViewFactory extends DiagramViewFactory {
+
+ // Start of user code Custom view Factory field
+ public static final String INTERNAL_VERSION = "0.9.1";
+
+ // End of user code
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected MeasurementUnit getMeasurementUnit() {
+ return MeasurementUnit.PIXEL_LITERAL;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/part/InternalBlockDiagramEditor.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/part/InternalBlockDiagramEditor.java
new file mode 100755
index 0000000..5ed04b1
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/part/InternalBlockDiagramEditor.java
@@ -0,0 +1,555 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.part;
+
+import java.util.EventObject;
+import java.util.Set;
+
+import org.eclipse.core.commands.operations.IUndoContext;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.GraphicalViewer;
+import org.eclipse.gef.KeyHandler;
+import org.eclipse.gef.Tool;
+import org.eclipse.gef.commands.CommandStackListener;
+import org.eclipse.gef.palette.PaletteRoot;
+import org.eclipse.gef.ui.palette.PaletteViewer;
+import org.eclipse.gef.ui.palette.PaletteViewerProvider;
+import org.eclipse.gmf.runtime.common.core.service.IProviderChangeListener;
+import org.eclipse.gmf.runtime.common.core.service.ProviderChangeEvent;
+import org.eclipse.gmf.runtime.common.ui.services.marker.MarkerNavigationService;
+import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
+import org.eclipse.gmf.runtime.diagram.ui.actions.ActionIds;
+import org.eclipse.gmf.runtime.diagram.ui.internal.parts.PaletteToolTransferDragSourceListener;
+import org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider;
+import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDocumentProvider;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.jface.util.LocalSelectionTransfer;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.papyrus.commands.util.OperationHistoryDirtyState;
+import org.eclipse.papyrus.gmf.diagram.common.compatibility.IDiagramVersionUpdater;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.gmfdiag.common.GmfMultiDiagramDocumentProvider;
+import org.eclipse.papyrus.infra.gmfdiag.common.service.palette.PapyrusPaletteContextMenuProvider;
+import org.eclipse.papyrus.infra.gmfdiag.common.service.palette.PapyrusPaletteService;
+import org.eclipse.papyrus.infra.gmfdiag.common.service.palette.PapyrusPaletteViewer;
+import org.eclipse.papyrus.infra.ui.editor.IMultiDiagramEditor;
+import org.eclipse.papyrus.sysml.diagram.internalblock.Activator;
+import org.eclipse.papyrus.sysml.diagram.internalblock.compatibility.DiagramVersionUpdater;
+import org.eclipse.papyrus.sysml.diagram.internalblock.factory.InternalBlockDiagramViewFactory;
+import org.eclipse.papyrus.uml.diagram.common.listeners.DropTargetListener;
+import org.eclipse.papyrus.uml.diagram.common.part.UmlGmfDiagramEditor;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.dnd.TransferData;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.MouseListener;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.ide.IGotoMarker;
+import org.eclipse.ui.part.ShowInContext;
+
+/**
+ * @generated
+ */
+public class InternalBlockDiagramEditor extends UmlGmfDiagramEditor implements IProviderChangeListener, IGotoMarker {
+
+ /**
+ * @generated
+ */
+ public static final String ID = "org.eclipse.papyrus.sysml.diagram.internalblock.part.InternalBlockDiagramEditorID"; //$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ private KeyHandler paletteKeyHandler = null;
+
+ /**
+ * @generated
+ */
+ private MouseListener paletteMouseListener = null;
+
+ /**
+ * @generated
+ */
+ private OperationHistoryDirtyState dirtyState;
+
+ /**
+ * @generated
+ */
+ private TransactionalEditingDomain editingDomain;
+
+ /**
+ * @generated
+ */
+ private IDocumentProvider documentProvider;
+
+ /**
+ * @generated
+ */
+ public InternalBlockDiagramEditor(ServicesRegistry servicesRegistry, Diagram diagram) throws ServiceException {
+ super(servicesRegistry, diagram);
+
+ // Start of user code Custom Editor Constructor
+ // Verify diagram compatibility version
+ verifyDiagramCompatibilityVersion(diagram);
+
+ // Fix Port locations (implementations before 0.8.1 were erroneous see https://bugs.eclipse.org/bugs/show_bug.cgi?id=354815)
+ (new org.eclipse.papyrus.sysml.diagram.internalblock.utils.FixPortsLocationOnOpening()).fix(diagram);
+ // End of user code
+
+ // adds a listener to the palette service, which reacts to palette customizations
+ PapyrusPaletteService.getInstance().addProviderChangeListener(this);
+
+ // Share the same editing provider
+ editingDomain = servicesRegistry.getService(TransactionalEditingDomain.class);
+ documentProvider = new GmfMultiDiagramDocumentProvider(editingDomain);
+
+ // overrides editing domain created by super constructor
+ setDocumentProvider(documentProvider);
+ }
+
+ protected void verifyDiagramCompatibilityVersion(Diagram diagram) {
+ IDiagramVersionUpdater updater = new DiagramVersionUpdater();
+
+ String currentVersion = org.eclipse.papyrus.infra.gmfdiag.common.reconciler.DiagramVersioningUtils.getCompatibilityVersion(diagram);
+ if (!InternalBlockDiagramViewFactory.INTERNAL_VERSION.equals(currentVersion)) {
+ updater.update(diagram, currentVersion, InternalBlockDiagramViewFactory.INTERNAL_VERSION);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected PaletteRoot createPaletteRoot(PaletteRoot existingPaletteRoot) {
+ PaletteRoot paletteRoot;
+ if (existingPaletteRoot == null) {
+ paletteRoot = PapyrusPaletteService.getInstance().createPalette(this, getDefaultPaletteContent());
+ } else {
+ PapyrusPaletteService.getInstance().updatePalette(existingPaletteRoot, this, getDefaultPaletteContent());
+ paletteRoot = existingPaletteRoot;
+ }
+ applyCustomizationsToPalette(paletteRoot);
+ return paletteRoot;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected PreferencesHint getPreferencesHint() {
+ return Activator.DIAGRAM_PREFERENCES_HINT;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public String getContributorId() {
+ return Activator.PLUGIN_ID;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected final IDocumentProvider getDocumentProvider(IEditorInput input) {
+ return documentProvider;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public TransactionalEditingDomain getEditingDomain() {
+ return editingDomain;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected final void setDocumentProvider(IEditorInput input) {
+ // Already set in the constructor
+ }
+
+ /**
+ * @generated
+ */
+ public void gotoMarker(IMarker marker) {
+ MarkerNavigationService.getInstance().gotoMarker(this, marker);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean isSaveAsAllowed() {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void doSaveAs() {
+ performSaveAs(new NullProgressMonitor());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void performSaveAs(IProgressMonitor progressMonitor) {
+ // Nothing
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ShowInContext getShowInContext() {
+ return new ShowInContext(getEditorInput(), getGraphicalViewer().getSelection());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void configureGraphicalViewer() {
+ super.configureGraphicalViewer();
+
+ // Replace diagram contextual menu removing default
+ // delete from model action.
+ DiagramContextMenuProvider provider = (DiagramContextMenuProvider) getDiagramGraphicalViewer().getContextMenu();
+ Set<String> menuExclusions = provider.getExclusionSet();
+ menuExclusions.add(ActionIds.ACTION_DELETE_FROM_MODEL);
+ provider.setExclusionSet(menuExclusions);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected TransactionalEditingDomain createEditingDomain() {
+ // Already configured
+ return editingDomain;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void configureDiagramEditDomain() {
+ super.configureDiagramEditDomain();
+ getDiagramEditDomain().getDiagramCommandStack().addCommandStackListener(new CommandStackListener() {
+
+ public void commandStackChanged(EventObject event) {
+ firePropertyChange(IEditorPart.PROP_DIRTY);
+ }
+ });
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void doSave(IProgressMonitor progressMonitor) {
+ // The saving of the resource is done by the CoreMultiDiagramEditor
+ getDirtyState().saved();
+ }
+
+ /**
+ * @generated
+ */
+ protected OperationHistoryDirtyState getDirtyState() {
+ if (dirtyState == null) {
+ dirtyState = OperationHistoryDirtyState.newInstance(getUndoContext(), getOperationHistory());
+ }
+ return dirtyState;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setUndoContext(IUndoContext context) {
+ if (dirtyState != null) {
+ dirtyState.dispose();
+ dirtyState = null;
+ }
+
+ super.setUndoContext(context);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean isDirty() {
+ return getDirtyState().isDirty();
+ }
+
+ /**
+ * @generated
+ */
+ public void providerChanged(ProviderChangeEvent event) {
+ // update the palette if the palette service has changed
+ if (PapyrusPaletteService.getInstance().equals(event.getSource())) {
+ PapyrusPaletteService.getInstance().updatePalette(getPaletteViewer().getPaletteRoot(), this, getDefaultPaletteContent());
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void dispose() {
+ // remove palette service listener
+ // remove preference listener
+ PapyrusPaletteService.getInstance().removeProviderChangeListener(this);
+
+ if (dirtyState != null) {
+ dirtyState.dispose();
+ dirtyState = null;
+ }
+
+ super.dispose();
+ }
+
+ /**
+ * @generated
+ */
+ protected PaletteViewer getPaletteViewer() {
+ return getEditDomain().getPaletteViewer();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected PaletteViewer constructPaletteViewer() {
+ return new PapyrusPaletteViewer();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected PaletteViewerProvider createPaletteViewerProvider() {
+ getEditDomain().setPaletteRoot(createPaletteRoot(null));
+ return new PaletteViewerProvider(getEditDomain()) {
+
+ /**
+ * Override to provide the additional behavior for the tools. Will intialize with a
+ * PaletteEditPartFactory that has a TrackDragger that understand how to handle the
+ * mouseDoubleClick event for shape creation tools. Also will initialize the palette
+ * with a defaultTool that is the SelectToolEx that undestands how to handle the enter
+ * key which will result in the creation of the shape also.
+ */
+ @Override
+ protected void configurePaletteViewer(PaletteViewer viewer) {
+ super.configurePaletteViewer(viewer);
+
+ // customize menu...
+ viewer.setContextMenu(new PapyrusPaletteContextMenuProvider(viewer));
+
+ viewer.getKeyHandler().setParent(getPaletteKeyHandler());
+ viewer.getControl().addMouseListener(getPaletteMouseListener());
+
+ // Add a transfer drag target listener that is supported on
+ // palette template entries whose template is a creation tool.
+ // This will enable drag and drop of the palette shape creation
+ // tools.
+ viewer.addDragSourceListener(new PaletteToolTransferDragSourceListener(viewer));
+ viewer.setCustomizer(createPaletteCustomizer());
+ }
+
+ @Override
+ public PaletteViewer createPaletteViewer(Composite parent) {
+ PaletteViewer pViewer = constructPaletteViewer();
+ pViewer.createControl(parent);
+ configurePaletteViewer(pViewer);
+ hookPaletteViewer(pViewer);
+ return pViewer;
+ }
+
+ /**
+ * @return Palette Key Handler for the palette
+ */
+ private KeyHandler getPaletteKeyHandler() {
+
+ if (paletteKeyHandler == null) {
+
+ paletteKeyHandler = new KeyHandler() {
+
+ /**
+ * Processes a <i>key released </i> event. This method is called by the Tool
+ * whenever a key is released, and the Tool is in the proper state. Override
+ * to support pressing the enter key to create a shape or connection
+ * (between two selected shapes)
+ *
+ * @param event
+ * the KeyEvent
+ * @return <code>true</code> if KeyEvent was handled in some way
+ */
+ @Override
+ public boolean keyReleased(KeyEvent event) {
+
+ if (event.keyCode == SWT.Selection) {
+
+ Tool tool = getPaletteViewer().getActiveTool().createTool();
+
+ if (toolSupportsAccessibility(tool)) {
+
+ tool.keyUp(event, getDiagramGraphicalViewer());
+
+ // deactivate current selection
+ getPaletteViewer().setActiveTool(null);
+
+ return true;
+ }
+
+ }
+ return super.keyReleased(event);
+ }
+
+ };
+
+ }
+ return paletteKeyHandler;
+ }
+
+ /**
+ * @return Palette Mouse listener for the palette
+ */
+ private MouseListener getPaletteMouseListener() {
+
+ if (paletteMouseListener == null) {
+
+ paletteMouseListener = new MouseListener() {
+
+ /**
+ * Flag to indicate that the current active tool should be cleared after a
+ * mouse double-click event.
+ */
+ private boolean clearActiveTool = false;
+
+ /**
+ * Override to support double-clicking a palette tool entry to create a
+ * shape or connection (between two selected shapes).
+ *
+ * @see MouseListener#mouseDoubleClick(MouseEvent)
+ */
+ public void mouseDoubleClick(MouseEvent e) {
+ Tool tool = getPaletteViewer().getActiveTool().createTool();
+
+ if (toolSupportsAccessibility(tool)) {
+
+ tool.setViewer(getDiagramGraphicalViewer());
+ tool.setEditDomain(getDiagramGraphicalViewer().getEditDomain());
+ tool.mouseDoubleClick(e, getDiagramGraphicalViewer());
+
+ // Current active tool should be deactivated,
+ // but if it is down here it will get
+ // reactivated deep in GEF palette code after
+ // receiving mouse up events.
+ clearActiveTool = true;
+ }
+ }
+
+ public void mouseDown(MouseEvent e) {
+ // do nothing
+ }
+
+ public void mouseUp(MouseEvent e) {
+ // Deactivate current active tool here if a
+ // double-click was handled.
+ if (clearActiveTool) {
+ getPaletteViewer().setActiveTool(null);
+ clearActiveTool = false;
+ }
+
+ }
+ };
+
+ }
+ return paletteMouseListener;
+ }
+
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public GraphicalViewer getGraphicalViewer() {
+ return super.getGraphicalViewer();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void initializeGraphicalViewer() {
+ super.initializeGraphicalViewer();
+
+ // Enable Drop
+ getDiagramGraphicalViewer().addDropTargetListener(new DropTargetListener(getDiagramGraphicalViewer(), LocalSelectionTransfer.getTransfer()) {
+
+ @Override
+ protected Object getJavaObject(TransferData data) {
+ return LocalSelectionTransfer.getTransfer().nativeToJava(data);
+ }
+
+ @Override
+ protected TransactionalEditingDomain getTransactionalEditingDomain() {
+ return getEditingDomain();
+ }
+ });
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void selectionChanged(IWorkbenchPart part, ISelection selection) {
+ if (getSite().getPage().getActiveEditor() instanceof IMultiDiagramEditor) {
+ IMultiDiagramEditor editor = (IMultiDiagramEditor) getSite().getPage().getActiveEditor();
+ // If not the active editor, ignore selection changed.
+ if (this.equals(editor.getActiveEditor())) {
+ updateActions(getSelectionActions());
+ super.selectionChanged(part, selection);
+ } else {
+ super.selectionChanged(part, selection);
+ }
+ } else {
+ super.selectionChanged(part, selection);
+ }
+ // from
+ // org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.DiagramDocumentEditor.selectionChanged(IWorkbenchPart,
+ // ISelection)
+ if (part == this) {
+ rebuildStatusLine();
+ }
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/preferences/BlockCompositePreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/preferences/BlockCompositePreferencePage.java
new file mode 100755
index 0000000..007b728
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/preferences/BlockCompositePreferencePage.java
@@ -0,0 +1,99 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.preferences;
+
+import java.util.Collections;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.provider.ElementTypes;
+
+public class BlockCompositePreferencePage extends InternalBlockDiagramNodePreferencePage {
+
+ /** Constant key to access preferences */
+ public static String prefKey = ElementTypes.DIAGRAM_ID + "_" + SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID; //$NON-NLS-1$
+
+ /** The compartments default visibility for preferences */
+ public static final Map<String, Boolean> compartmentDefaultVisibilityMap;
+
+ /** The compartment titles default visibility for preferences */
+ public static final Map<String, Boolean> compartmentTitleDefaultVisibilityMap;
+
+ /** Static attribute initialization */
+ static {
+ compartmentDefaultVisibilityMap = new LinkedHashMap<String, Boolean>();
+ compartmentDefaultVisibilityMap.put("structure", Boolean.TRUE); //$NON-NLS-1$
+
+ compartmentTitleDefaultVisibilityMap = new LinkedHashMap<String, Boolean>();
+ compartmentTitleDefaultVisibilityMap.put("structure", Boolean.TRUE); //$NON-NLS-1$
+
+ // Start of user code custom static initializations
+ compartmentTitleDefaultVisibilityMap.remove("structure"); //$NON-NLS-1$
+ compartmentTitleDefaultVisibilityMap.put("structure", Boolean.FALSE); //$NON-NLS-1$
+ // End of user code
+
+ Collections.unmodifiableMap(compartmentDefaultVisibilityMap);
+ Collections.unmodifiableMap(compartmentTitleDefaultVisibilityMap);
+ }
+
+ /** Constructor */
+ public BlockCompositePreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_" + SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID); //$NON-NLS-1$
+ }
+
+ /** Default preferences initializer */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.WIDTH), 100);
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.HEIGHT), 150);
+ // End of user code
+
+ // Initialize default visibility for compartments in preference page.
+ for (String compartmentName : compartmentDefaultVisibilityMap.keySet()) {
+ String showCompartmentKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_VISIBILITY);
+ store.setDefault(showCompartmentKey, compartmentDefaultVisibilityMap.get(compartmentName));
+ }
+
+ // Initialize default title visibility for compartments in preference page.
+ for (String compartmentName : compartmentTitleDefaultVisibilityMap.keySet()) {
+ String showCompartmentTitleKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_NAME_VISIBILITY);
+ store.setDefault(showCompartmentTitleKey, compartmentTitleDefaultVisibilityMap.get(compartmentName));
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void initializeCompartmentNamesList() {
+ for (String name : compartmentDefaultVisibilityMap.keySet()) {
+ this.compartmentNamesList.add(name);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void initializeCompartmentTitlesList() {
+ for (String name : compartmentTitleDefaultVisibilityMap.keySet()) {
+ this.compartmentTitlesList.add(name);
+ }
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/preferences/CommentAnnotatedElementPreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/preferences/CommentAnnotatedElementPreferencePage.java
new file mode 100755
index 0000000..5a5c233
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/preferences/CommentAnnotatedElementPreferencePage.java
@@ -0,0 +1,42 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.sysml.diagram.internalblock.provider.ElementTypes;
+
+public class CommentAnnotatedElementPreferencePage extends InternalBlockDiagramLinkPreferencePage {
+
+ /** Constant key to access preferences */
+ protected static String prefKey = ElementTypes.DIAGRAM_ID + "_CommentAnnotatedElement"; //$NON-NLS-1$
+
+ /** Default constructor */
+ public CommentAnnotatedElementPreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_CommentAnnotatedElement"); //$NON-NLS-1$
+ }
+
+ /**
+ * Initialize defaults using a specified {@link IPreferenceStore}
+ *
+ * @param store
+ * the preference store.
+ */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ // End of user code
+
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/preferences/CommentPreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/preferences/CommentPreferencePage.java
new file mode 100755
index 0000000..c5d7285
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/preferences/CommentPreferencePage.java
@@ -0,0 +1,42 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.sysml.diagram.internalblock.provider.ElementTypes;
+
+public class CommentPreferencePage extends InternalBlockDiagramNodePreferencePage {
+
+ /** Constant key to access preferences */
+ protected static String prefKey = ElementTypes.DIAGRAM_ID + "_Comment"; //$NON-NLS-1$
+
+ /** Default constructor */
+ public CommentPreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_Comment"); //$NON-NLS-1$
+ }
+
+ /**
+ * Initialize defaults using a specified {@link IPreferenceStore}
+ *
+ * @param store
+ * the preference store.
+ */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ // End of user code
+
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/preferences/ConstraintConstrainedElementPreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/preferences/ConstraintConstrainedElementPreferencePage.java
new file mode 100755
index 0000000..ad326f4
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/preferences/ConstraintConstrainedElementPreferencePage.java
@@ -0,0 +1,42 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.sysml.diagram.internalblock.provider.ElementTypes;
+
+public class ConstraintConstrainedElementPreferencePage extends InternalBlockDiagramLinkPreferencePage {
+
+ /** Constant key to access preferences */
+ protected static String prefKey = ElementTypes.DIAGRAM_ID + "_ConstraintConstrainedElement"; //$NON-NLS-1$
+
+ /** Default constructor */
+ public ConstraintConstrainedElementPreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_ConstraintConstrainedElement"); //$NON-NLS-1$
+ }
+
+ /**
+ * Initialize defaults using a specified {@link IPreferenceStore}
+ *
+ * @param store
+ * the preference store.
+ */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ // End of user code
+
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/preferences/ConstraintPreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/preferences/ConstraintPreferencePage.java
new file mode 100755
index 0000000..9bc6847
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/preferences/ConstraintPreferencePage.java
@@ -0,0 +1,42 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.sysml.diagram.internalblock.provider.ElementTypes;
+
+public class ConstraintPreferencePage extends InternalBlockDiagramNodePreferencePage {
+
+ /** Constant key to access preferences */
+ protected static String prefKey = ElementTypes.DIAGRAM_ID + "_Constraint"; //$NON-NLS-1$
+
+ /** Default constructor */
+ public ConstraintPreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_Constraint"); //$NON-NLS-1$
+ }
+
+ /**
+ * Initialize defaults using a specified {@link IPreferenceStore}
+ *
+ * @param store
+ * the preference store.
+ */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ // End of user code
+
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/preferences/DependencyPreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/preferences/DependencyPreferencePage.java
new file mode 100755
index 0000000..bb8f08b
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/preferences/DependencyPreferencePage.java
@@ -0,0 +1,36 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.sysml.diagram.internalblock.provider.ElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+
+public class DependencyPreferencePage extends InternalBlockDiagramLinkPreferencePage {
+
+ /** Constant key to access preferences */
+ public static String prefKey = ElementTypes.DIAGRAM_ID + "_" + UMLGraphicalTypes.LINK_UML_DEPENDENCY_ID; //$NON-NLS-1$
+
+ /** Constructor */
+ public DependencyPreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_" + UMLGraphicalTypes.LINK_UML_DEPENDENCY_ID); //$NON-NLS-1$
+ }
+
+ /** Default preferences initializer */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ // End of user code
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/preferences/InternalBlockDiagramGeneralPreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/preferences/InternalBlockDiagramGeneralPreferencePage.java
new file mode 100755
index 0000000..45c53e9
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/preferences/InternalBlockDiagramGeneralPreferencePage.java
@@ -0,0 +1,26 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.preferences;
+
+import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.DiagramPreferencePage;
+import org.eclipse.papyrus.sysml.diagram.internalblock.Activator;
+import org.eclipse.papyrus.sysml.diagram.internalblock.provider.ElementTypes;
+
+public class InternalBlockDiagramGeneralPreferencePage extends DiagramPreferencePage {
+
+ public InternalBlockDiagramGeneralPreferencePage() {
+ setPreferenceStore(Activator.getInstance().getPreferenceStore());
+ setPreferenceKey(ElementTypes.DIAGRAM_ID);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/preferences/InternalBlockDiagramLinkPreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/preferences/InternalBlockDiagramLinkPreferencePage.java
new file mode 100755
index 0000000..1a41f2a
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/preferences/InternalBlockDiagramLinkPreferencePage.java
@@ -0,0 +1,73 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.preferences;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.TreeMap;
+
+import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusLinkPreferencePage;
+import org.eclipse.papyrus.infra.gmfdiag.preferences.ui.OrderedLabelGroup;
+import org.eclipse.papyrus.sysml.diagram.internalblock.Activator;
+import org.eclipse.swt.widgets.Composite;
+
+public class InternalBlockDiagramLinkPreferencePage extends AbstractPapyrusLinkPreferencePage {
+
+ /** The list of label names for this link */
+ protected List<String> labelsList;
+
+ /** Constructor */
+ public InternalBlockDiagramLinkPreferencePage() {
+ labelsList = new ArrayList<String>();
+ initializeLabelsList();
+ Collections.unmodifiableList(labelsList);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void createPageContents(Composite parent) {
+ super.createPageContents(parent);
+
+ // Add label visibility group
+ if (!labelsList.isEmpty()) {
+ OrderedLabelGroup compartmentGroup = new OrderedLabelGroup(parent, getPreferenceKey(), this, labelsList);
+ addPreferenceGroup(compartmentGroup);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getBundleId() {
+ return Activator.PLUGIN_ID;
+ }
+
+ /** Initialize the list containing names of labels. */
+ protected void initializeLabelsList() {
+ // Implemented by subclasses.
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected final TreeMap<String, String> getLabelRole() {
+ return new TreeMap<String, String>();
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/preferences/InternalBlockDiagramNodePreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/preferences/InternalBlockDiagramNodePreferencePage.java
new file mode 100755
index 0000000..4cdca40
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/preferences/InternalBlockDiagramNodePreferencePage.java
@@ -0,0 +1,119 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.preferences;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.TreeMap;
+
+import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusNodePreferencePage;
+import org.eclipse.papyrus.infra.gmfdiag.preferences.ui.OrderedCompartmentGroup;
+import org.eclipse.papyrus.infra.gmfdiag.preferences.ui.OrderedLabelGroup;
+import org.eclipse.papyrus.sysml.diagram.internalblock.Activator;
+import org.eclipse.swt.widgets.Composite;
+
+public class InternalBlockDiagramNodePreferencePage extends AbstractPapyrusNodePreferencePage {
+
+ /** The list owning the names of compartments */
+ protected List<String> compartmentNamesList;
+
+ /** The list owning the names of compartment that have a title */
+ protected List<String> compartmentTitlesList;
+
+ /** The list of label names for this node */
+ protected List<String> labelsList;
+
+ /** Constructor */
+ public InternalBlockDiagramNodePreferencePage() {
+ this.labelsList = new ArrayList<String>();
+ this.compartmentNamesList = new ArrayList<String>();
+ this.compartmentTitlesList = new ArrayList<String>();
+
+ initializeLabelsList();
+ initializeCompartmentNamesList();
+ initializeCompartmentTitlesList();
+
+ Collections.unmodifiableList(labelsList);
+ Collections.unmodifiableList(compartmentNamesList);
+ Collections.unmodifiableList(compartmentTitlesList);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void createPageContents(Composite parent) {
+ super.createPageContents(parent);
+
+ // Add compartments visibility group
+ if (!compartmentNamesList.isEmpty()) {
+ OrderedCompartmentGroup compartmentGroup = new OrderedCompartmentGroup(parent, getPreferenceKey(), this, compartmentNamesList, compartmentTitlesList, getPreferenceStore());
+ addPreferenceGroup(compartmentGroup);
+ }
+
+ // Add label visibility group
+ if (!labelsList.isEmpty()) {
+ OrderedLabelGroup compartmentGroup = new OrderedLabelGroup(parent, getPreferenceKey(), this, labelsList);
+ addPreferenceGroup(compartmentGroup);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getBundleId() {
+ return Activator.PLUGIN_ID;
+ }
+
+ /** Initialize the list containing names of labels. */
+ protected void initializeLabelsList() {
+ // Implemented by subclasses.
+ }
+
+ /** Initialize the list containing the names of compartments. */
+ protected void initializeCompartmentNamesList() {
+ // Implemented by subclasses.
+ }
+
+ /** Initialize the list containing the names of compartment that have titles. */
+ protected void initializeCompartmentTitlesList() {
+ // Implemented by subclasses.
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected final TreeMap<String, String> getLabelRole() {
+ return new TreeMap<String, String>();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected final TreeMap<String, Boolean> getCompartmentTitleVisibilityPreferences() {
+ return new TreeMap<String, Boolean>();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected final void initializeCompartmentsList() {
+ compartmentsList = Collections.emptyList();
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/preferences/InternalBlockDiagramPreferenceInitializer.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/preferences/InternalBlockDiagramPreferenceInitializer.java
new file mode 100755
index 0000000..ba447cf
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/preferences/InternalBlockDiagramPreferenceInitializer.java
@@ -0,0 +1,37 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.preferences;
+
+import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.sysml.diagram.internalblock.Activator;
+
+public class InternalBlockDiagramPreferenceInitializer extends AbstractPreferenceInitializer {
+
+ protected IPreferenceStore getPreferenceStore() {
+ return Activator.getInstance().getPreferenceStore();
+ }
+
+ @Override
+ public void initializeDefaultPreferences() {
+ IPreferenceStore store = getPreferenceStore();
+
+ org.eclipse.papyrus.sysml.diagram.internalblock.preferences.ConstraintPreferencePage.initDefaults(store);
+ org.eclipse.papyrus.sysml.diagram.internalblock.preferences.CommentPreferencePage.initDefaults(store);
+ org.eclipse.papyrus.sysml.diagram.internalblock.preferences.CommentAnnotatedElementPreferencePage.initDefaults(store);
+ org.eclipse.papyrus.sysml.diagram.internalblock.preferences.ConstraintConstrainedElementPreferencePage.initDefaults(store);
+ BlockCompositePreferencePage.initDefaults(store);
+ DependencyPreferencePage.initDefaults(store);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/provider/CustomEditPartProvider.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/provider/CustomEditPartProvider.java
new file mode 100755
index 0000000..a97c11d
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/provider/CustomEditPartProvider.java
@@ -0,0 +1,126 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.provider;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.gmf.runtime.common.core.service.IOperation;
+import org.eclipse.gmf.runtime.diagram.ui.services.editpart.CreateGraphicEditPartOperation;
+import org.eclipse.gmf.runtime.diagram.ui.services.editpart.IEditPartOperation;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.gmf.diagram.common.provider.CustomAbstractEditPartProvider;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.BlockCompositeEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.BlockLabelNameEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.BlockPropertyCompositeEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.BlockPropertyStructureCompartmentEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.CustomFlowPortAppliedStereotypeEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.FlowPortAffixedLabelNameEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.FlowPortAffixedNodeEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.StructureCompartmentEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.AppliedStereotypeLinkLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.ConnectorEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.ConnectorLinkLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.ConnectorLinkLabelSourceMultiplicityEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.ConnectorLinkLabelTargetMultiplicityEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.DependencyEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.NamedElementLinkLabelNameEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.PortAffixedLabelNameEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.PortAffixedNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.PropertyNodeLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+
+public class CustomEditPartProvider extends CustomAbstractEditPartProvider {
+
+ /** Map containing node view types supported by this provider */
+ protected Map<String, Class<?>> nodeMap = new HashMap<String, Class<?>>();
+
+ /** Map containing edge view types supported by this provider */
+ protected Map<String, Class<?>> edgeMap = new HashMap<String, Class<?>>();
+
+ /** Default constructor */
+ public CustomEditPartProvider() {
+ super();
+
+ diagramType = ElementTypes.DIAGRAM_ID;
+
+ // Nodes
+ nodeMap.put(SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, BlockPropertyCompositeEditPart.class);
+ nodeMap.put(SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID, BlockCompositeEditPart.class);
+ nodeMap.put(SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID, FlowPortAffixedNodeEditPart.class);
+ nodeMap.put(UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID, PortAffixedNodeEditPart.class);
+
+ // Decorations
+ nodeMap.put(SysMLGraphicalTypes.AFFIXEDLABEL_SYSML_FLOWPORT_LABEL_ID, FlowPortAffixedLabelNameEditPart.class);
+ nodeMap.put(SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID, BlockPropertyStructureCompartmentEditPart.class);
+ nodeMap.put(SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID, StructureCompartmentEditPart.class);
+ nodeMap.put(SysMLGraphicalTypes.LABEL_SYSML_BLOCK_NAME_ID, BlockLabelNameEditPart.class);
+ nodeMap.put(UMLGraphicalTypes.AFFIXEDLABEL_UML_APPLIEDSTEREOTYPE_ID, CustomFlowPortAppliedStereotypeEditPart.class);
+ nodeMap.put(UMLGraphicalTypes.AFFIXEDLABEL_UML_PORT_LABEL_ID, PortAffixedLabelNameEditPart.class);
+ nodeMap.put(UMLGraphicalTypes.LABEL_UML_PROPERTY_LABEL_ID, PropertyNodeLabelEditPart.class);
+ nodeMap.put(UMLGraphicalTypes.LINKLABEL_UML_APPLIEDSTEREOTYPE_ID, AppliedStereotypeLinkLabelEditPart.class);
+ nodeMap.put(UMLGraphicalTypes.LINKLABEL_UML_CONNECTOR_LABEL_ID, ConnectorLinkLabelEditPart.class);
+ nodeMap.put(UMLGraphicalTypes.LINKLABEL_UML_CONNECTOR_SOURCE_MULTIPLICITY_ID, ConnectorLinkLabelSourceMultiplicityEditPart.class);
+ nodeMap.put(UMLGraphicalTypes.LINKLABEL_UML_CONNECTOR_TARGET_MULTIPLICITY_ID, ConnectorLinkLabelTargetMultiplicityEditPart.class);
+ nodeMap.put(UMLGraphicalTypes.LINKLABEL_UML_NAMEDELEMENT_NAME_ID, NamedElementLinkLabelNameEditPart.class);
+
+ // Edges
+ edgeMap.put(UMLGraphicalTypes.LINK_UML_CONNECTOR_ID, ConnectorEditPart.class);
+ edgeMap.put(UMLGraphicalTypes.LINK_UML_DEPENDENCY_ID, DependencyEditPart.class);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean provides(IOperation operation) {
+ if (operation instanceof CreateGraphicEditPartOperation) {
+ View newView = ((IEditPartOperation) operation).getView();
+ if (newView == null) {
+ return false;
+ }
+
+ String graphicalType = newView.getType();
+
+ if ((newView instanceof Node) && (!nodeMap.containsKey(graphicalType))) {
+ return false;
+ }
+
+ if ((newView instanceof Edge) && (!edgeMap.containsKey(graphicalType))) {
+ return false;
+ }
+ }
+
+ return super.provides(operation);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Class<?> getNodeEditPartClass(View view) {
+ return nodeMap.get(view.getType());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Class<?> getEdgeEditPartClass(View view) {
+ return edgeMap.get(view.getType());
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/provider/CustomGraphicalTypeRegistry.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/provider/CustomGraphicalTypeRegistry.java
new file mode 100755
index 0000000..4333a8f
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/provider/CustomGraphicalTypeRegistry.java
@@ -0,0 +1,259 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.provider;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.emf.type.core.ISpecializationType;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+
+public class CustomGraphicalTypeRegistry extends GraphicalTypeRegistry {
+
+ /** Default constructor */
+ public CustomGraphicalTypeRegistry() {
+
+ super();
+
+ // Nodes
+ knownNodes.add(SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID);
+ knownNodes.add(SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ knownNodes.add(SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID);
+ knownNodes.add(UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID);
+ // Decorations
+ knownNodes.add(SysMLGraphicalTypes.AFFIXEDLABEL_SYSML_FLOWPORT_LABEL_ID);
+ knownNodes.add(SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ knownNodes.add(SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+ knownNodes.add(SysMLGraphicalTypes.LABEL_SYSML_BLOCK_NAME_ID);
+ knownNodes.add(UMLGraphicalTypes.AFFIXEDLABEL_UML_APPLIEDSTEREOTYPE_ID);
+ knownNodes.add(UMLGraphicalTypes.AFFIXEDLABEL_UML_PORT_LABEL_ID);
+ knownNodes.add(UMLGraphicalTypes.LABEL_UML_PROPERTY_LABEL_ID);
+ knownNodes.add(UMLGraphicalTypes.LINKLABEL_UML_APPLIEDSTEREOTYPE_ID);
+ knownNodes.add(UMLGraphicalTypes.LINKLABEL_UML_CONNECTOR_LABEL_ID);
+ knownNodes.add(UMLGraphicalTypes.LINKLABEL_UML_CONNECTOR_SOURCE_MULTIPLICITY_ID);
+ knownNodes.add(UMLGraphicalTypes.LINKLABEL_UML_CONNECTOR_TARGET_MULTIPLICITY_ID);
+ knownNodes.add(UMLGraphicalTypes.LINKLABEL_UML_NAMEDELEMENT_NAME_ID);
+
+ // Edges
+ knownEdges.add(UMLGraphicalTypes.LINK_UML_CONNECTOR_ID);
+ knownEdges.add(UMLGraphicalTypes.LINK_UML_DEPENDENCY_ID);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getNodeGraphicalType(EObject domainElement, String containerType) {
+ // Start of user code getNodeGraphicalType(EObject domainElement, String containerType)
+ if (((ISpecializationType) SysMLElementTypes.PART_PROPERTY).getMatcher().matches(domainElement)
+ || ((ISpecializationType) SysMLElementTypes.REFERENCE_PROPERTY).getMatcher().matches(domainElement)
+ || ((ISpecializationType) SysMLElementTypes.ACTOR_PART_PROPERTY).getMatcher().matches(domainElement)
+ || ((ISpecializationType) SysMLElementTypes.VALUE_PROPERTY).getMatcher().matches(domainElement)
+ || ((domainElement instanceof org.eclipse.uml2.uml.Property) && !(domainElement instanceof org.eclipse.uml2.uml.Port))) {
+
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID;
+ }
+
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID;
+ }
+
+ return UNDEFINED_TYPE;
+ }
+
+ if (((ISpecializationType) SysMLElementTypes.FLOW_PORT).getMatcher().matches(domainElement)
+ || ((ISpecializationType) SysMLElementTypes.FLOW_PORT_IN).getMatcher().matches(domainElement)
+ || ((ISpecializationType) SysMLElementTypes.FLOW_PORT_OUT).getMatcher().matches(domainElement)
+ || ((ISpecializationType) SysMLElementTypes.FLOW_PORT_IN_OUT).getMatcher().matches(domainElement)
+ || ((ISpecializationType) SysMLElementTypes.FLOW_PORT_NA).getMatcher().matches(domainElement)) {
+
+ if (SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID;
+ }
+ if (SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID;
+ }
+ /*
+ * if(SysMLGraphicalTypes.SHAPE_SYSML_NESTEDBLOCKPROPERTY_AS_COMPOSITE_ID.equals(containerType)) {
+ * return SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID;
+ * }
+ */
+ return UNDEFINED_TYPE;
+ }
+ // End of user code
+
+ if (((ISpecializationType) SysMLElementTypes.BLOCK).getMatcher().matches(domainElement)) {
+ if (ElementTypes.DIAGRAM_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+ if (((ISpecializationType) SysMLElementTypes.PART_PROPERTY).getMatcher().matches(domainElement)) {
+ if (SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID;
+ }
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID;
+ }
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID;
+ }
+ /*
+ * if(SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID.equals(containerType)) {
+ * return SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID;
+ * }
+ */
+ return UNDEFINED_TYPE;
+ }
+ if (((ISpecializationType) SysMLElementTypes.FLOW_PORT).getMatcher().matches(domainElement)) {
+ if (SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID;
+ }
+ if (SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+ if (UMLElementTypes.PORT.getEClass().isInstance(domainElement)) {
+ if (SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID;
+ }
+ if (SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+ return super.getNodeGraphicalType(domainElement, containerType);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getNodeGraphicalType(String proposedType, String containerType) {
+ // Start of user code getNodeGraphicalType(String proposedType, String containerType)
+ if (SysMLElementTypes.PART_PROPERTY.getSemanticHint().equals(proposedType)
+ || SysMLElementTypes.REFERENCE_PROPERTY.getSemanticHint().equals(proposedType)
+ || SysMLElementTypes.ACTOR_PART_PROPERTY.getSemanticHint().equals(proposedType)
+ || SysMLElementTypes.VALUE_PROPERTY.getSemanticHint().equals(proposedType)
+ || UMLElementTypes.PROPERTY.getSemanticHint().equals(proposedType)) {
+
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID;
+ }
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID;
+ }
+
+ return UNDEFINED_TYPE;
+ }
+
+ if (SysMLElementTypes.FLOW_PORT.getSemanticHint().equals(proposedType)
+ || SysMLElementTypes.FLOW_PORT_IN.getSemanticHint().equals(proposedType)
+ || SysMLElementTypes.FLOW_PORT_OUT.getSemanticHint().equals(proposedType)
+ || SysMLElementTypes.FLOW_PORT_IN_OUT.getSemanticHint().matches(proposedType)
+ || SysMLElementTypes.FLOW_PORT_NA.getSemanticHint().matches(proposedType)) {
+
+ if (SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID;
+ }
+ if (SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID;
+ }
+
+ return UNDEFINED_TYPE;
+ }
+
+ // End of user code
+
+ if (SysMLElementTypes.BLOCK.getSemanticHint().equals(proposedType)) {
+ if (ElementTypes.DIAGRAM_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+ if (SysMLElementTypes.PART_PROPERTY.getSemanticHint().equals(proposedType)) {
+ if (SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID;
+ }
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID;
+ }
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID;
+ }
+ /*
+ * if(SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID.equals(containerType)) {
+ * return SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID;
+ * }
+ */
+ return UNDEFINED_TYPE;
+ }
+ if (SysMLElementTypes.FLOW_PORT.getSemanticHint().equals(proposedType)) {
+ if (SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID;
+ }
+ if (SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+ if (UMLElementTypes.PORT.getSemanticHint().equals(proposedType)) {
+ if (SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID;
+ }
+ if (SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+ return super.getNodeGraphicalType(proposedType, containerType);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getEdgeGraphicalType(EObject domainElement) {
+ // Start of user code getEdgeGraphicalType(EObject domainElement)
+ // End of user code
+
+ if (UMLElementTypes.CONNECTOR.getEClass().isInstance(domainElement)) {
+ return UMLGraphicalTypes.LINK_UML_CONNECTOR_ID;
+ }
+ if (UMLElementTypes.DEPENDENCY.getEClass().isInstance(domainElement)) {
+ return UMLGraphicalTypes.LINK_UML_DEPENDENCY_ID;
+ }
+ return super.getEdgeGraphicalType(domainElement);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getEdgeGraphicalType(String proposedType) {
+ // Start of user code getEdgeGraphicalType(String proposedType)
+ // End of user code
+
+ if (UMLElementTypes.CONNECTOR.getSemanticHint().equals(proposedType)) {
+ return UMLGraphicalTypes.LINK_UML_CONNECTOR_ID;
+ }
+ if (UMLElementTypes.DEPENDENCY.getSemanticHint().equals(proposedType)) {
+ return UMLGraphicalTypes.LINK_UML_DEPENDENCY_ID;
+ }
+ return super.getEdgeGraphicalType(proposedType);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/provider/CustomViewProvider.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/provider/CustomViewProvider.java
new file mode 100755
index 0000000..3a842a2
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/provider/CustomViewProvider.java
@@ -0,0 +1,95 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.provider;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.gmf.diagram.common.factory.AffixedLabelViewFactory;
+import org.eclipse.papyrus.gmf.diagram.common.factory.CompartmentShapeViewFactory;
+import org.eclipse.papyrus.gmf.diagram.common.factory.ConnectorLabelViewFactory;
+import org.eclipse.papyrus.gmf.diagram.common.factory.InnerLabelViewFactory;
+import org.eclipse.papyrus.gmf.diagram.common.provider.CustomAbstractViewProvider;
+import org.eclipse.papyrus.sysml.diagram.common.factory.BlockCompositeClassifierViewFactory;
+import org.eclipse.papyrus.sysml.diagram.common.factory.BlockPropertyCompositeClassifierViewFactory;
+import org.eclipse.papyrus.sysml.diagram.common.factory.FlowPortAffixedNodeViewFactory;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.uml.diagram.common.factory.ConnectorLinkViewFactory;
+import org.eclipse.papyrus.uml.diagram.common.factory.DependencyLinkViewFactory;
+import org.eclipse.papyrus.uml.diagram.common.factory.PortAffixedNodeViewFactory;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+
+public class CustomViewProvider extends CustomAbstractViewProvider {
+
+ /** Map containing node view types supported by this provider */
+ protected Map<String, Class<?>> nodeMap = new HashMap<String, Class<?>>();
+
+ /** Map containing edge view types supported by this provider */
+ protected Map<String, Class<?>> edgeMap = new HashMap<String, Class<?>>();
+
+ /** Default constructor */
+ public CustomViewProvider() {
+ super();
+ this.registry = new CustomGraphicalTypeRegistry();
+
+ diagramType = ElementTypes.DIAGRAM_ID;
+
+ // Custom classifier nodes
+ nodeMap.put(SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID, BlockCompositeClassifierViewFactory.class);
+ nodeMap.put(SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, BlockPropertyCompositeClassifierViewFactory.class);
+ // Custom affixed nodes
+ nodeMap.put(SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID, FlowPortAffixedNodeViewFactory.class);
+ nodeMap.put(UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID, PortAffixedNodeViewFactory.class);
+ // Custom child node labels
+ // Custom inner labels
+ nodeMap.put(SysMLGraphicalTypes.LABEL_SYSML_BLOCK_NAME_ID, InnerLabelViewFactory.class);
+ nodeMap.put(UMLGraphicalTypes.LABEL_UML_PROPERTY_LABEL_ID, InnerLabelViewFactory.class);
+ // Custom compartments
+ nodeMap.put(SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID, CompartmentShapeViewFactory.class);
+ nodeMap.put(SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID, CompartmentShapeViewFactory.class);
+ // Custom affixed labels
+ nodeMap.put(SysMLGraphicalTypes.AFFIXEDLABEL_SYSML_FLOWPORT_LABEL_ID, AffixedLabelViewFactory.class);
+ nodeMap.put(UMLGraphicalTypes.AFFIXEDLABEL_UML_APPLIEDSTEREOTYPE_ID, AffixedLabelViewFactory.class);
+ nodeMap.put(UMLGraphicalTypes.AFFIXEDLABEL_UML_PORT_LABEL_ID, AffixedLabelViewFactory.class);
+
+ // Custom edges
+ edgeMap.put(UMLGraphicalTypes.LINK_UML_CONNECTOR_ID, ConnectorLinkViewFactory.class);
+ edgeMap.put(UMLGraphicalTypes.LINK_UML_DEPENDENCY_ID, DependencyLinkViewFactory.class);
+
+ // Custom edge labels
+ nodeMap.put(UMLGraphicalTypes.LINKLABEL_UML_APPLIEDSTEREOTYPE_ID, ConnectorLabelViewFactory.class);
+ nodeMap.put(UMLGraphicalTypes.LINKLABEL_UML_CONNECTOR_LABEL_ID, ConnectorLabelViewFactory.class);
+ nodeMap.put(UMLGraphicalTypes.LINKLABEL_UML_CONNECTOR_SOURCE_MULTIPLICITY_ID, ConnectorLabelViewFactory.class);
+ nodeMap.put(UMLGraphicalTypes.LINKLABEL_UML_CONNECTOR_TARGET_MULTIPLICITY_ID, ConnectorLabelViewFactory.class);
+ nodeMap.put(UMLGraphicalTypes.LINKLABEL_UML_NAMEDELEMENT_NAME_ID, ConnectorLabelViewFactory.class);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Class<?> getNodeViewClass(IAdaptable semanticAdapter, View containerView, String graphicalType) {
+ return nodeMap.get(graphicalType);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Class<?> getEdgeViewClass(IAdaptable semanticAdapter, View containerView, String graphicalType) {
+ return edgeMap.get(graphicalType);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/provider/ElementTypes.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/provider/ElementTypes.java
new file mode 100755
index 0000000..06aad10
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/provider/ElementTypes.java
@@ -0,0 +1,69 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.provider;
+
+import org.eclipse.gmf.runtime.emf.type.core.AbstractElementTypeEnumerator;
+import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
+import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentBodyEditPart;
+import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentBodyEditPartCN;
+import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintNameEditPart;
+import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintNameEditPartCN;
+import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintSpecificationEditPart;
+import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintSpecificationEditPartCN;
+import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
+
+public class ElementTypes extends AbstractElementTypeEnumerator {
+
+ /** ********************************************************* */
+ /** SysML Internal Block Diagram specific elements **************** */
+ /** ********************************************************* */
+
+ /** SysML Internal Block Diagram :: Diagram */
+ public static final String DIAGRAM_ID = "InternalBlock";
+
+ /** ********************************************************* */
+ /** SysML Internal Block Diagram - CompositeDiagram related elements */
+ /** ********************************************************* */
+
+ /** CompositeDiagram :: CONSTRAINT */
+ public static final IHintedType CONSTRAINT = (IHintedType) UMLElementTypes.Constraint_Shape;
+
+ public static final String CONSTRAINT_LABEL_NAME_HINT = ConstraintNameEditPart.VISUAL_ID;
+
+ public static final String CONSTRAINT_LABEL_SPECIFICATION_HINT = ConstraintSpecificationEditPart.VISUAL_ID;
+
+ /** CompositeDiagram :: COMMENT_CN */
+ public static final IHintedType COMMENT_CN = (IHintedType) UMLElementTypes.Comment_Shape_CN;
+
+ public static final String COMMENT_CN_LABEL_BODY_HINT = CommentBodyEditPartCN.VISUAL_ID;
+
+ /** CompositeDiagram :: COMMENT */
+ public static final IHintedType COMMENT = (IHintedType) UMLElementTypes.Comment_Shape;
+
+ public static final String COMMENT_LABEL_BODY_HINT = CommentBodyEditPart.VISUAL_ID;
+
+ /** CompositeDiagram :: CONSTRAINT_CN */
+ public static final IHintedType CONSTRAINT_CN = (IHintedType) UMLElementTypes.Constraint_Shape_CN;
+
+ public static final String CONSTRAINT_CN_LABEL_NAME_HINT = ConstraintNameEditPartCN.VISUAL_ID;
+
+ public static final String CONSTRAINT_CN_LABEL_SPECIFICATION_HINT = ConstraintSpecificationEditPartCN.VISUAL_ID;
+
+ /** CompositeDiagram :: COMMENT_ANNOTATED_ELEMENT */
+ public static final IHintedType COMMENT_ANNOTATED_ELEMENT = (IHintedType) UMLElementTypes.Comment_AnnotatedElementEdge;
+
+ /** CompositeDiagram :: CONSTRAINT_CONSTRAINED_ELEMENT */
+ public static final IHintedType CONSTRAINT_CONSTRAINED_ELEMENT = (IHintedType) UMLElementTypes.Constraint_ConstrainedElementEdge;
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/provider/GraphicalTypeRegistry.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/provider/GraphicalTypeRegistry.java
new file mode 100755
index 0000000..1956448
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/provider/GraphicalTypeRegistry.java
@@ -0,0 +1,195 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.provider;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
+import org.eclipse.papyrus.gmf.diagram.common.provider.IGraphicalTypeRegistry;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+
+/**
+ * <pre>
+ * This class provides graphical type id (used as View type) for
+ * domain element according to their actual or expected graphical
+ * container type.
+ * </pre>
+ */
+public class GraphicalTypeRegistry implements IGraphicalTypeRegistry {
+
+ /** A Set containing all known node graphical types */
+ protected Set<String> knownNodes = new HashSet<String>();
+
+ /** A Set containing all known edge graphical types */
+ protected Set<String> knownEdges = new HashSet<String>();
+
+ /** Default constructor */
+ public GraphicalTypeRegistry() {
+
+ // Fill known edges set
+ knownEdges.add(ElementTypes.COMMENT_ANNOTATED_ELEMENT.getSemanticHint());
+ knownEdges.add(ElementTypes.CONSTRAINT_CONSTRAINED_ELEMENT.getSemanticHint());
+
+ // Fill known nodes set (primary nodes)
+ knownNodes.add(UMLElementTypes.CONSTRAINT.getSemanticHint());
+ knownNodes.add(UMLElementTypes.COMMENT.getSemanticHint());
+
+ knownNodes.add(ElementTypes.CONSTRAINT.getSemanticHint());
+ knownNodes.add(ElementTypes.COMMENT_CN.getSemanticHint());
+ knownNodes.add(ElementTypes.COMMENT.getSemanticHint());
+ knownNodes.add(ElementTypes.CONSTRAINT_CN.getSemanticHint());
+
+ // Fill known nodes set (child label nodes)
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getEdgeGraphicalType(EObject domainElement) {
+
+ String graphicalType = UNDEFINED_TYPE;
+ if (domainElement == null) {
+ return UNDEFINED_TYPE;
+ }
+ return graphicalType;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getEdgeGraphicalType(IElementType elementType) {
+ if (elementType instanceof IHintedType) {
+ String semanticHint = ((IHintedType) elementType).getSemanticHint();
+ return getEdgeGraphicalType(semanticHint);
+ }
+
+ return UNDEFINED_TYPE;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getEdgeGraphicalType(String proposedType) {
+ if (isKnownEdgeType(proposedType)) {
+ return proposedType;
+ }
+
+ return UNDEFINED_TYPE;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getNodeGraphicalType(EObject domainElement, String containerType) {
+
+ String graphicalType = UNDEFINED_TYPE;
+ if ((containerType == null) || (domainElement == null)) {
+ return UNDEFINED_TYPE;
+ }
+
+ if (domainElement instanceof org.eclipse.uml2.uml.Constraint) {
+ if (ElementTypes.DIAGRAM_ID.equals(containerType)) { // Constraint TopNode
+ graphicalType = ElementTypes.CONSTRAINT.getSemanticHint();
+ }
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID.equals(containerType)) {
+ graphicalType = ElementTypes.CONSTRAINT_CN.getSemanticHint();
+ }
+
+ }
+
+ if (domainElement instanceof org.eclipse.uml2.uml.Comment) {
+ if (ElementTypes.DIAGRAM_ID.equals(containerType)) { // Comment TopNode
+ graphicalType = ElementTypes.COMMENT.getSemanticHint();
+ }
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID.equals(containerType)) {
+ graphicalType = ElementTypes.COMMENT_CN.getSemanticHint();
+ }
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID.equals(containerType)) {
+ graphicalType = ElementTypes.COMMENT_CN.getSemanticHint();
+ }
+
+ }
+
+ return graphicalType;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getNodeGraphicalType(IElementType elementType, String containerType) {
+ if (elementType instanceof IHintedType) {
+ String semanticHint = ((IHintedType) elementType).getSemanticHint();
+ return getNodeGraphicalType(semanticHint, containerType);
+ }
+
+ return UNDEFINED_TYPE;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getNodeGraphicalType(String proposedType, String containerType) {
+ if ((UMLElementTypes.COMMENT.getSemanticHint().equals(proposedType))) {
+
+ if (ElementTypes.DIAGRAM_ID.equals(containerType)) { // Constraint TopNode
+ return ElementTypes.COMMENT.getSemanticHint();
+ }
+
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID.equals(containerType)) {
+ return ElementTypes.COMMENT_CN.getSemanticHint();
+ }
+
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID.equals(containerType)) {
+ return ElementTypes.COMMENT_CN.getSemanticHint();
+ }
+
+ return UNDEFINED_TYPE;
+ }
+
+ if (UMLElementTypes.CONSTRAINT.getSemanticHint().equals(proposedType)) {
+
+ if (ElementTypes.DIAGRAM_ID.equals(containerType)) { // Constraint TopNode
+ return ElementTypes.CONSTRAINT.getSemanticHint();
+ }
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID.equals(containerType)) {
+ return ElementTypes.CONSTRAINT_CN.getSemanticHint();
+ }
+
+ return UNDEFINED_TYPE;
+ }
+ if (isKnownNodeType(proposedType)) {
+ return proposedType;
+ }
+
+ return UNDEFINED_TYPE;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isKnownEdgeType(String type) {
+ return knownEdges.contains(type);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isKnownNodeType(String type) {
+ return knownNodes.contains(type);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/provider/InheritedCompositeDiagramEditPartProvider.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/provider/InheritedCompositeDiagramEditPartProvider.java
new file mode 100755
index 0000000..b48b56a
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/provider/InheritedCompositeDiagramEditPartProvider.java
@@ -0,0 +1,64 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.provider;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.service.IOperation;
+import org.eclipse.gmf.runtime.diagram.ui.services.editpart.CreateGraphicEditPartOperation;
+import org.eclipse.gmf.runtime.diagram.ui.services.editpart.IEditPartOperation;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.composite.providers.UMLEditPartProvider;
+
+public class InheritedCompositeDiagramEditPartProvider extends UMLEditPartProvider {
+
+ @Override
+ public synchronized boolean provides(IOperation operation) {
+ if (operation instanceof CreateGraphicEditPartOperation) {
+ View view = ((IEditPartOperation) operation).getView();
+
+ // Ensure current diagram is a InternalBlock Diagram
+ if (!ElementTypes.DIAGRAM_ID.equals(view.getDiagram().getType())) {
+ return false;
+ }
+
+ // Test supported inherited types
+ EObject eobject = view.getElement();
+
+ /** Nodes (and ChildLabelNodes) *********** */
+ if (eobject instanceof org.eclipse.uml2.uml.Constraint) {
+ return true;
+ }
+ if (eobject instanceof org.eclipse.uml2.uml.Comment) {
+ return true;
+ }
+
+ // Additional test needed here to decide whether to support Feature type links.
+ // As feature type link are not related to a MetaClass from the domain model
+ // they are not already handled by previous tests.
+ // Also concerns NotationType.
+ String hint = view.getType();
+
+ /** Edges (Feature) : COMMENT_ANNOTATED_ELEMENT *********** */
+ if (ElementTypes.COMMENT_ANNOTATED_ELEMENT.getSemanticHint().equals(hint)) {
+ return true;
+ }
+ /** Edges (Feature) : CONSTRAINT_CONSTRAINED_ELEMENT *********** */
+ if (ElementTypes.CONSTRAINT_CONSTRAINED_ELEMENT.getSemanticHint().equals(hint)) {
+ return true;
+ }
+
+ }
+ return false;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/provider/InheritedCompositeDiagramViewProvider.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/provider/InheritedCompositeDiagramViewProvider.java
new file mode 100755
index 0000000..513df2b
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/provider/InheritedCompositeDiagramViewProvider.java
@@ -0,0 +1,200 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.provider;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EcoreFactory;
+import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
+import org.eclipse.gmf.runtime.diagram.core.services.view.CreateEdgeViewOperation;
+import org.eclipse.gmf.runtime.diagram.core.services.view.CreateNodeViewOperation;
+import org.eclipse.gmf.runtime.diagram.core.services.view.CreateViewForKindOperation;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.gmf.diagram.common.provider.IGraphicalTypeRegistry;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.infra.gmfdiag.common.commands.SemanticAdapter;
+//bugs.eclipse.org/bugs/show_bug.cgi?id=432824
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.Activator;
+import org.eclipse.papyrus.uml.diagram.composite.providers.UMLViewProvider;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+
+public class InheritedCompositeDiagramViewProvider extends UMLViewProvider {
+
+ /** Local graphical type registry */
+ protected IGraphicalTypeRegistry registry = new GraphicalTypeRegistry();
+
+ @Override
+ public Edge createEdge(IAdaptable semanticAdapter, View containerView, String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Edge createdEdge = null;
+ IElementType elementType = (IElementType) semanticAdapter.getAdapter(IElementType.class);
+ if (elementType != null) {
+ createdEdge = super.createEdge(semanticAdapter, containerView, semanticHint, index, persisted, preferencesHint);
+ } else {
+ EObject domainElement = EMFHelper.getEObject(semanticAdapter);
+ String domainElementGraphicalType = semanticHint;
+ if (domainElementGraphicalType == null) {
+ domainElementGraphicalType = registry.getEdgeGraphicalType(domainElement);
+ }
+ if ((!org.eclipse.papyrus.infra.gmfdiag.common.providers.IGraphicalTypeRegistry.UNDEFINED_TYPE.equals(domainElementGraphicalType)) && (registry.isKnownEdgeType(domainElementGraphicalType))) {
+ // Cannot use createEdge from super class as it never take the graphical type (semanticHint) into account.
+ // createdEdge = super.createEdge(semanticAdapter, containerView, domainElementGraphicalType, index, persisted, preferencesHint);
+ if (ElementTypes.COMMENT_ANNOTATED_ELEMENT.getSemanticHint().equals(domainElementGraphicalType)) {
+ createdEdge = createComment_AnnotatedElementEdge(containerView, index, persisted, preferencesHint);
+ }
+ if (ElementTypes.CONSTRAINT_CONSTRAINED_ELEMENT.getSemanticHint().equals(domainElementGraphicalType)) {
+ createdEdge = createConstraint_ConstrainedElementEdge(containerView, index, persisted, preferencesHint);
+ }
+ }
+ }
+ if (createdEdge == null) {
+ Activator.log.error(new Exception("Could not create Edge."));
+ }
+ return createdEdge;
+ }
+
+ @Override
+ protected boolean provides(CreateViewForKindOperation op) {
+ // Never use this method (often incorrectly implemented due to GMF Tooling choices).
+ String diagramType = op.getContainerView().getDiagram().getType();
+ if (!ElementTypes.DIAGRAM_ID.equals(diagramType)) {
+ return false;
+ }
+ throw new UnsupportedOperationException("Should never be called by the " + diagramType + " diagram.");
+ }
+
+ @Override
+ protected boolean provides(CreateEdgeViewOperation op) {
+ // Must have a container
+ if (op.getContainerView() == null) {
+ return false;
+ }
+ // This provider is registered for InternalBlock Diagram only
+ String diagramType = op.getContainerView().getDiagram().getType();
+ if (!ElementTypes.DIAGRAM_ID.equals(diagramType)) {
+ return false;
+ }
+ IElementType elementType = getSemanticElementType(op.getSemanticAdapter());
+ if (elementType == ElementTypes.COMMENT_ANNOTATED_ELEMENT) {
+ return true;
+ }
+ if (elementType == ElementTypes.CONSTRAINT_CONSTRAINED_ELEMENT) {
+ return true;
+ }
+
+ // IElementType may be null (especially when drop from ModelExplorer).
+ // In such a case, test the semantic EObject instead.
+ if (elementType == null) {
+ EObject domainElement = (EObject) op.getSemanticAdapter().getAdapter(EObject.class);
+ String domainElementGraphicalType = op.getSemanticHint();
+ if (domainElementGraphicalType == null) {
+ domainElementGraphicalType = registry.getEdgeGraphicalType(domainElement);
+ }
+ if ((!org.eclipse.papyrus.infra.gmfdiag.common.providers.IGraphicalTypeRegistry.UNDEFINED_TYPE.equals(domainElementGraphicalType)) && (registry.isKnownEdgeType(domainElementGraphicalType))) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ @Override
+ protected boolean provides(CreateNodeViewOperation op) {
+ // Must have a container
+ if (op.getContainerView() == null) {
+ return false;
+ }
+ // Get the type of the container
+ String containerGraphicalType = op.getContainerView().getType();
+ // This provider is registered for InternalBlock Diagram only
+ String diagramType = op.getContainerView().getDiagram().getType();
+ if (!ElementTypes.DIAGRAM_ID.equals(diagramType)) {
+ return false;
+ }
+ // /////////////////////////////////////////////////////////////////////
+ // Test possibility to provide a view based on the ElementType and its expected container.
+ // /////////////////////////////////////////////////////////////////////
+ IElementType elementType = (IElementType) op.getSemanticAdapter().getAdapter(IElementType.class);
+ if (elementType == UMLElementTypes.CONSTRAINT) {
+ if (ElementTypes.DIAGRAM_ID.equals(containerGraphicalType)) {
+ return true;
+ }
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID.equals(containerGraphicalType)) {
+ return true;
+ }
+ }
+ if (elementType == UMLElementTypes.COMMENT) {
+ if (ElementTypes.DIAGRAM_ID.equals(containerGraphicalType)) {
+ return true;
+ }
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID.equals(containerGraphicalType)) {
+ return true;
+ }
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID.equals(containerGraphicalType)) {
+ return true;
+ }
+ }
+
+
+ // IElementType may be null (especially when drop from ModelExplorer).
+ // In such a case, test the semantic EObject instead.
+ if (elementType == null) {
+ EObject domainElement = (EObject) op.getSemanticAdapter().getAdapter(EObject.class);
+ String domainElementGraphicalType = op.getSemanticHint();
+ if (domainElementGraphicalType == null) {
+ domainElementGraphicalType = registry.getNodeGraphicalType(domainElement, containerGraphicalType);
+ } else {
+ domainElementGraphicalType = registry.getNodeGraphicalType(domainElementGraphicalType, containerGraphicalType);
+ }
+ if ((!org.eclipse.papyrus.infra.gmfdiag.common.providers.IGraphicalTypeRegistry.UNDEFINED_TYPE.equals(domainElementGraphicalType)) && (registry.isKnownNodeType(domainElementGraphicalType))) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ @Override
+ public Node createNode(IAdaptable semanticAdapter, View containerView, String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) {
+ // Use the GraphicalTypeRegistry to find the expected type for a domain element
+ // Get the type of the container
+ String containerGraphicalType = containerView.getType();
+ // Get the type of the domain element
+ EObject domainElement = EMFHelper.getEObject(semanticAdapter);
+ if (semanticHint != null) {
+ // Look for a possible graphicalType replacement
+ String graphicalType = registry.getNodeGraphicalType(semanticHint, containerGraphicalType);
+ return super.createNode(new SemanticAdapter(domainElement, null), containerView, graphicalType, index, persisted, preferencesHint);
+ }
+ String domainElementGraphicalType = registry.getNodeGraphicalType(domainElement, containerGraphicalType);
+ // Create the expected node
+ if (!org.eclipse.papyrus.infra.gmfdiag.common.providers.IGraphicalTypeRegistry.UNDEFINED_TYPE.equals(domainElementGraphicalType)) {
+ return super.createNode(semanticAdapter, containerView, domainElementGraphicalType, index, persisted, preferencesHint);
+ }
+ Activator.log.error(new Exception("Could not create Node."));
+ return null;
+ }
+
+ @Override
+ protected void stampShortcut(View containerView, Node target) {
+ if (!ElementTypes.DIAGRAM_ID.equals(containerView.getDiagram().getType())) {
+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation();
+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$
+ shortcutAnnotation.getDetails().put("modelID", ElementTypes.DIAGRAM_ID); //$NON-NLS-1$
+ target.getEAnnotations().add(shortcutAnnotation);
+ }
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/provider/InternalBlockDiagramEditPartProvider.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/provider/InternalBlockDiagramEditPartProvider.java
new file mode 100755
index 0000000..41f6aec
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/provider/InternalBlockDiagramEditPartProvider.java
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.provider;
+
+import org.eclipse.gmf.runtime.common.core.service.IOperation;
+import org.eclipse.gmf.runtime.diagram.ui.services.editpart.AbstractEditPartProvider;
+import org.eclipse.gmf.runtime.diagram.ui.services.editpart.CreateGraphicEditPartOperation;
+import org.eclipse.gmf.runtime.diagram.ui.services.editpart.IEditPartOperation;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.internalblock.Activator;
+import org.eclipse.papyrus.sysml.diagram.internalblock.edit.part.InternalBlockDiagramEditPart;
+
+public class InternalBlockDiagramEditPartProvider extends AbstractEditPartProvider {
+
+ @Override
+ public boolean provides(IOperation operation) {
+ if (operation instanceof CreateGraphicEditPartOperation) {
+ View view = ((IEditPartOperation) operation).getView();
+
+ // Ensure current diagram is InternalBlock Diagram
+ if (ElementTypes.DIAGRAM_ID.equals(view.getType())) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ @Override
+ protected Class<?> getDiagramEditPartClass(View view) {
+ if (ElementTypes.DIAGRAM_ID.equals(view.getType())) {
+ return InternalBlockDiagramEditPart.class;
+ }
+
+ Activator.log.error(new Exception("Could not create EditPart."));
+ return null;
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/provider/InternalBlockDiagramEditPolicyProvider.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/provider/InternalBlockDiagramEditPolicyProvider.java
new file mode 100755
index 0000000..ae877b5
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/provider/InternalBlockDiagramEditPolicyProvider.java
@@ -0,0 +1,59 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.provider;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.common.core.service.AbstractProvider;
+import org.eclipse.gmf.runtime.common.core.service.IOperation;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.services.editpolicy.CreateEditPoliciesOperation;
+import org.eclipse.gmf.runtime.diagram.ui.services.editpolicy.IEditPolicyProvider;
+import org.eclipse.papyrus.sysml.diagram.internalblock.edit.policy.CustomDragDropEditPolicy;
+
+public class InternalBlockDiagramEditPolicyProvider extends AbstractProvider implements IEditPolicyProvider {
+
+ public boolean provides(IOperation operation) {
+
+ CreateEditPoliciesOperation epOperation = (CreateEditPoliciesOperation) operation;
+ if (!(epOperation.getEditPart() instanceof GraphicalEditPart)) {
+ return false;
+ }
+ GraphicalEditPart gep = (GraphicalEditPart) epOperation.getEditPart();
+ String diagramType = gep.getNotationView().getDiagram().getType();
+ if (!ElementTypes.DIAGRAM_ID.equals(diagramType)) {
+ return false;
+ }
+
+ if (gep instanceof org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintEditPart) {
+ return true;
+ }
+ if (gep instanceof org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentEditPartCN) {
+ return true;
+ }
+ if (gep instanceof org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentEditPart) {
+ return true;
+ }
+ if (gep instanceof org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintEditPartCN) {
+ return true;
+ }
+
+ return false;
+ }
+
+ public void createEditPolicies(EditPart editPart) {
+ editPart.installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDragDropEditPolicy());
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/provider/InternalBlockDiagramViewProvider.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/provider/InternalBlockDiagramViewProvider.java
new file mode 100755
index 0000000..bd13769
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/provider/InternalBlockDiagramViewProvider.java
@@ -0,0 +1,43 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.provider;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.gmf.runtime.diagram.core.providers.AbstractViewProvider;
+import org.eclipse.gmf.runtime.diagram.core.services.view.CreateDiagramViewOperation;
+import org.eclipse.papyrus.sysml.diagram.internalblock.Activator;
+import org.eclipse.papyrus.sysml.diagram.internalblock.factory.InternalBlockDiagramViewFactory;
+
+public class InternalBlockDiagramViewProvider extends AbstractViewProvider {
+
+ @Override
+ protected boolean provides(CreateDiagramViewOperation operation) {
+
+ if (ElementTypes.DIAGRAM_ID.equals(operation.getSemanticHint())) {
+ return true;
+ }
+
+ return false;
+ }
+
+ @Override
+ protected Class<?> getDiagramViewClass(IAdaptable semanticAdapter, String diagramKind) {
+ if (ElementTypes.DIAGRAM_ID.equals(diagramKind)) {
+ return InternalBlockDiagramViewFactory.class;
+ }
+
+ Activator.log.error(new Exception("Could not create View."));
+ return null;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/InternalBlockDiagramCondition.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/InternalBlockDiagramCondition.java
new file mode 100755
index 0000000..4277e80
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/InternalBlockDiagramCondition.java
@@ -0,0 +1,31 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Laurent Wouters (CEA LIST) laurent.wouters@cea.fr - Viewpoints application
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.infra.ui.extension.commands.PerspectiveContextDependence;
+
+/**
+ * InternalBlockDiagramCondition to set conditions for the diagram creation
+ */
+public class InternalBlockDiagramCondition extends PerspectiveContextDependence {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean create(EObject selectedElement) {
+ return false;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/compatibility/DiagramVersionUpdater.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/compatibility/DiagramVersionUpdater.java
new file mode 100755
index 0000000..5247e77
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/compatibility/DiagramVersionUpdater.java
@@ -0,0 +1,70 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.compatibility;
+
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.papyrus.gmf.diagram.common.compatibility.IDiagramVersionUpdater;
+
+/**
+ * Diagram version updater for the Internal Block Diagram.*
+ *
+ * @Deprecated
+ * @link org.eclipse.papyrus.sysml.diagram.internalblock.migration.InternalBlockDiagramReconcilerUndefinedTo100
+ */
+@Deprecated
+public class DiagramVersionUpdater implements IDiagramVersionUpdater {
+
+ public static final String VERSION_0_9_1 = "0.9.1";
+
+ public final static String VERSION_0_8_1 = "0.8.1";
+
+ /** Constructor */
+ public DiagramVersionUpdater() {
+ }
+
+ public int update(Diagram diagram, String oldVersion, String newVersion) {
+ // TransactionalEditingDomain editingDomain = TransactionUtil.getEditingDomain(diagram);
+ //
+ // if(DiagramVersioningUtils.UNDEFINED_VERSION.equals(oldVersion)) {
+ // if(VERSION_0_8_1.equals(newVersion)) {
+ // try {
+ // editingDomain.getCommandStack().execute(getUpdateCommandFromUndefinedTo_081(diagram));
+ // } catch (Exception e) {
+ // e.printStackTrace();
+ // }
+ // } else if(VERSION_0_9_1.equals(newVersion)) {
+ // try {
+ // CompoundCommand cc = new CompoundCommand("Update Diagram");
+ // cc.append(getUpdateCommandFromUndefinedTo_081(diagram));
+ // cc.append(getUpdateCommandFrom081To_091(diagram));
+ // editingDomain.getCommandStack().execute(cc);
+ // } catch (Exception e) {
+ // e.printStackTrace();
+ // }
+ // }
+ //
+ // }
+ //
+ // if(VERSION_0_8_1.equals(oldVersion) && (VERSION_0_9_1.equals(newVersion))) {
+ // try {
+ // editingDomain.getCommandStack().execute(getUpdateCommandFrom081To_091(diagram));
+ // } catch (Exception e) {
+ // e.printStackTrace();
+ // }
+ // }
+ //
+ return 0;
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/dnd/helper/CustomLinkMappingHelper.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/dnd/helper/CustomLinkMappingHelper.java
new file mode 100755
index 0000000..a4356b9
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/dnd/helper/CustomLinkMappingHelper.java
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.dnd.helper;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.gmf.diagram.common.edit.policy.ILinkMappingHelper;
+import org.eclipse.papyrus.uml.diagram.common.dnd.helper.LinkMappingHelper.CommonSourceUMLSwitch;
+import org.eclipse.papyrus.uml.diagram.common.dnd.helper.LinkMappingHelper.CommonTargetUMLSwitch;
+import org.eclipse.uml2.uml.ConnectorEnd;
+import org.eclipse.uml2.uml.Element;
+
+/**
+ * The Class LinkMappingHelper is specialization of the link mapping helper for the Class diagram
+ */
+public class CustomLinkMappingHelper implements ILinkMappingHelper {
+
+ /**
+ * {@inheritDoc}
+ */
+ public Collection<?> getSource(Element link) {
+ CommonSourceUMLSwitch umlSwitch = new CommonSourceUMLSwitch() {
+
+ @Override
+ public java.util.Collection<?> caseConnector(org.eclipse.uml2.uml.Connector object) {
+
+ java.util.Collection<?> ends = Collections.emptySet();
+
+ // Support for binary Connector only in this diagram.
+
+ if (object.getEnds().size() == 2) {
+
+ ConnectorEnd semanticSource = object.getEnds().get(0);
+ ends = Arrays.asList(new EObject[] { semanticSource });
+
+ } else {
+ // TODO: log warning here - can only drop binary associations in this diagram...
+ }
+
+ return ends;
+ };
+
+ };
+ return umlSwitch.doSwitch(link);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Collection<?> getTarget(Element link) {
+ CommonTargetUMLSwitch umlSwitch = new CommonTargetUMLSwitch() {
+
+ @Override
+ public java.util.Collection<?> caseConnector(org.eclipse.uml2.uml.Connector object) {
+
+ java.util.Collection<?> ends = Collections.emptySet();
+
+ // Support for binary Connector only in this diagram.
+
+ if (object.getEnds().size() == 2) {
+
+ ConnectorEnd semanticTarget = object.getEnds().get(1);
+ ends = Arrays.asList(new EObject[] { semanticTarget });
+
+ } else {
+ // TODO: log warning here - can only drop binary associations in this diagram...
+ }
+
+ return ends;
+ };
+
+ };
+ return umlSwitch.doSwitch(link);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/edit/policy/CustomBlockCompositeSemanticEditPolicy.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/edit/policy/CustomBlockCompositeSemanticEditPolicy.java
new file mode 100755
index 0000000..3d3e74a
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/edit/policy/CustomBlockCompositeSemanticEditPolicy.java
@@ -0,0 +1,93 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.edit.policy;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.gmf.diagram.common.provider.IGraphicalTypeRegistry;
+import org.eclipse.papyrus.sysml.diagram.common.edit.policy.BlockCompositeSemanticEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.internalblock.provider.CustomGraphicalTypeRegistry;
+import org.eclipse.papyrus.sysml.diagram.internalblock.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.provider.GraphicalTypeRegistry;
+import org.eclipse.papyrus.uml.service.types.command.CommentAnnotatedElementsCreateCommand;
+import org.eclipse.papyrus.uml.service.types.command.CommentAnnotatedElementsReorientCommand;
+import org.eclipse.papyrus.uml.service.types.command.ConstraintConstrainedElementsCreateCommand;
+import org.eclipse.papyrus.uml.service.types.command.ConstraintConstrainedElementsReorientCommand;
+
+/**
+ * <pre>
+ * Custom semantic edit policy that replace DefaultSemanticEditPolicy
+ * in order to manage Class Diagram specific elements (reference
+ * relationships COMMENT_ANNOTATED_ELEMENT and CONSTRAINT_CONSTRAINED_ELEMENT).
+ * </pre>
+ */
+public class CustomBlockCompositeSemanticEditPolicy extends BlockCompositeSemanticEditPolicy {
+
+ /** Local graphical type registry for graphical elements */
+ private IGraphicalTypeRegistry registry = new CustomGraphicalTypeRegistry();
+
+ /** Local graphical type registry for inherited graphical elements */
+ private IGraphicalTypeRegistry inheritedRegistry = new GraphicalTypeRegistry();
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+
+ if (ElementTypes.COMMENT_ANNOTATED_ELEMENT == req.getElementType()) {
+ return getGEFWrapper(new CommentAnnotatedElementsCreateCommand(req));
+ }
+
+ if (ElementTypes.CONSTRAINT_CONSTRAINED_ELEMENT == req.getElementType()) {
+ return getGEFWrapper(new ConstraintConstrainedElementsCreateCommand(req));
+ }
+
+ String newEdgeGraphicalType = registry.getEdgeGraphicalType(req.getElementType());
+
+ if (inheritedRegistry.isKnownEdgeType(newEdgeGraphicalType)) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ if (!registry.isKnownEdgeType(newEdgeGraphicalType)) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ return super.getCreateRelationshipCommand(req);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
+
+ View reconnectedView = (View) req.getParameter(org.eclipse.papyrus.infra.services.edit.utils.RequestParameterConstants.GRAPHICAL_RECONNECTED_EDGE);
+ String reconnectedViewType = (reconnectedView != null) ? reconnectedView.getType() : org.eclipse.papyrus.infra.gmfdiag.common.providers.IGraphicalTypeRegistry.UNDEFINED_TYPE;
+
+ if (ElementTypes.COMMENT_ANNOTATED_ELEMENT.getSemanticHint().equals(reconnectedViewType)) {
+ return getGEFWrapper(new CommentAnnotatedElementsReorientCommand(req));
+ }
+
+ if (ElementTypes.CONSTRAINT_CONSTRAINED_ELEMENT.getSemanticHint().equals(reconnectedViewType)) {
+ return getGEFWrapper(new ConstraintConstrainedElementsReorientCommand(req));
+ }
+
+ return super.getReorientReferenceRelationshipCommand(req);
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/edit/policy/CustomBlockPropertyCompositeDropEditPolicy.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/edit/policy/CustomBlockPropertyCompositeDropEditPolicy.java
new file mode 100755
index 0000000..fb551b1
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/edit/policy/CustomBlockPropertyCompositeDropEditPolicy.java
@@ -0,0 +1,155 @@
+/*****************************************************************************
+ * Copyright (c) 2011, 2016 CEA LIST, Esterel Technologies SAS and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Alain Le Guennec (Esterel Technologies SAS) - bug 497400
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.edit.policy;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.RunnableWithResult;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.commands.SelectAndExecuteCommand;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.utils.PortDropHelper;
+import org.eclipse.papyrus.sysml.diagram.internalblock.utils.TypeDropHelper;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.uml2.uml.Port;
+
+/**
+ * <pre>
+ * Customization of the DND edit policy for BlockPropertyComposite that enables
+ * type modification, or creation of new Port and FlowPort by a drop on target.
+ * </pre>
+ */
+public class CustomBlockPropertyCompositeDropEditPolicy extends CustomDragDropEditPolicy {
+
+ /** Default constructor */
+ public CustomBlockPropertyCompositeDropEditPolicy() {
+ super();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Set<String> getSpecificDropBehaviorTypes() {
+ Set<String> specificDropBehaviorTypes = super.getSpecificDropBehaviorTypes();
+
+ specificDropBehaviorTypes.add(UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID);
+ specificDropBehaviorTypes.add(SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID);
+
+ return specificDropBehaviorTypes;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected ICommand getSpecificDropCommand(DropObjectsRequest dropRequest, EObject droppedEObject, String nodeType, String edgeType) {
+ if ((UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID.equals(nodeType)) || (SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID.equals(nodeType))) {
+ PortDropHelper portDropHelper = new PortDropHelper(getEditingDomain());
+ return portDropHelper.getDropPortOnPart((Port) droppedEObject, dropRequest.getLocation().getCopy(), (GraphicalEditPart) getHost());
+ }
+
+ return super.getSpecificDropCommand(dropRequest, droppedEObject, nodeType, edgeType);
+ }
+
+ /**
+ * {@inheritedDoc}.
+ */
+ @Override
+ public Command getDropObjectsCommand(DropObjectsRequest dropRequest) {
+ TypeDropHelper helper = new TypeDropHelper(getEditingDomain());
+
+ // Single drop management possible drop action list can be proposed
+ if (dropRequest.getObjects().size() == 1) {
+
+ // List of available drop commands
+ final List<Command> commandChoice = new ArrayList<Command>();
+
+ // 1. Try to set the target element type with dropped object
+ Command dropAsSetType = helper.getDropAsTypedElementType(dropRequest, (GraphicalEditPart) getHost());
+ if ((dropAsSetType != null) && (dropAsSetType.canExecute())) {
+ commandChoice.add(dropAsSetType);
+ }
+
+ // 2. Try to create a Port typed by the dropped object
+ Command dropAsTypedPort = helper.getDropAsTypedPortOnPart(dropRequest, (GraphicalEditPart) getHost());
+ if ((dropAsTypedPort != null) && (dropAsTypedPort.canExecute())) {
+ commandChoice.add(dropAsTypedPort);
+ }
+
+ // 3. Try to create a FlowPort (In - Out - InOut) typed by the dropped object
+ Command dropAsTypedFlowPort_In = helper.getDropAsTypedFlowPortOnPart(dropRequest, (GraphicalEditPart) getHost(), SysMLElementTypes.FLOW_PORT);
+ if ((dropAsTypedFlowPort_In != null) && (dropAsTypedFlowPort_In.canExecute())) {
+ commandChoice.add(dropAsTypedFlowPort_In);
+ }
+ Command dropAsTypedFlowPort_Out = helper.getDropAsTypedFlowPortOnPart(dropRequest, (GraphicalEditPart) getHost(), SysMLElementTypes.FLOW_PORT_IN);
+ if ((dropAsTypedFlowPort_Out != null) && (dropAsTypedFlowPort_Out.canExecute())) {
+ commandChoice.add(dropAsTypedFlowPort_Out);
+ }
+ Command dropAsTypedFlowPort_InOut = helper.getDropAsTypedFlowPortOnPart(dropRequest, (GraphicalEditPart) getHost(), SysMLElementTypes.FLOW_PORT_OUT);
+ if ((dropAsTypedFlowPort_InOut != null) && (dropAsTypedFlowPort_InOut.canExecute())) {
+ commandChoice.add(dropAsTypedFlowPort_InOut);
+ }
+
+ // Same behavior for 4 & 5
+ // // 4. Build command to drop Port and FlowPort
+ // PortDropHelper portDropHelper = new PortDropHelper(getEditingDomain());
+ // Command dropPortOnPart = portDropHelper.getDropPortOnPart(dropRequest, (GraphicalEditPart)getHost());
+ // if ((dropPortOnPart != null) && (dropPortOnPart.canExecute())) {
+ // commandChoice.add(dropPortOnPart);
+ // }
+
+ // 5. Build default drop command (show view of the dropped object)
+ Command defaultDropCommand = super.getDropObjectsCommand(dropRequest);
+ if ((defaultDropCommand != null) && (defaultDropCommand.canExecute())) {
+ defaultDropCommand.setLabel("Default drop (Show dropped object in diagram)");
+ commandChoice.add(defaultDropCommand);
+ }
+
+ // Prepare the selection command (if several command are available) or return the drop command
+ if (commandChoice.size() > 1) {
+ RunnableWithResult<ICommand> runnable;
+ Display.getDefault().syncExec(runnable = new RunnableWithResult.Impl<ICommand>() {
+
+ public void run() {
+ setResult(new SelectAndExecuteCommand("Select drop action for ", PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), commandChoice));
+ }
+ });
+
+ ICommand selectCommand = runnable.getResult();
+
+ return new ICommandProxy(selectCommand);
+ } else if (commandChoice.size() == 1) {
+ return commandChoice.get(0);
+ }
+
+ // else (command choice is empty)
+ return UnexecutableCommand.INSTANCE;
+
+ }
+
+ return super.getDropObjectsCommand(dropRequest);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/edit/policy/CustomBlockPropertyCompositeSemanticEditPolicy.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/edit/policy/CustomBlockPropertyCompositeSemanticEditPolicy.java
new file mode 100755
index 0000000..7814cb8
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/edit/policy/CustomBlockPropertyCompositeSemanticEditPolicy.java
@@ -0,0 +1,112 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.edit.policy;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.gmf.diagram.common.provider.IGraphicalTypeRegistry;
+import org.eclipse.papyrus.sysml.diagram.common.edit.policy.BlockPropertyCompositeSemanticEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLCreateOrShowExistingElementHelper;
+import org.eclipse.papyrus.sysml.diagram.internalblock.provider.CustomGraphicalTypeRegistry;
+import org.eclipse.papyrus.sysml.diagram.internalblock.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.provider.GraphicalTypeRegistry;
+import org.eclipse.papyrus.uml.diagram.common.helper.CreateOrShowExistingElementHelper;
+import org.eclipse.papyrus.uml.service.types.command.CommentAnnotatedElementsCreateCommand;
+import org.eclipse.papyrus.uml.service.types.command.CommentAnnotatedElementsReorientCommand;
+import org.eclipse.papyrus.uml.service.types.command.ConstraintConstrainedElementsCreateCommand;
+import org.eclipse.papyrus.uml.service.types.command.ConstraintConstrainedElementsReorientCommand;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+
+/**
+ * <pre>
+ * Custom semantic edit policy that replace DefaultSemanticEditPolicy
+ * in order to manage Class Diagram specific elements (reference
+ * relationships COMMENT_ANNOTATED_ELEMENT and CONSTRAINT_CONSTRAINED_ELEMENT).
+ * </pre>
+ */
+public class CustomBlockPropertyCompositeSemanticEditPolicy extends BlockPropertyCompositeSemanticEditPolicy {
+
+ /** Local graphical type registry for graphical elements */
+ private IGraphicalTypeRegistry registry = new CustomGraphicalTypeRegistry();
+
+ /** Local graphical type registry for inherited graphical elements */
+ private IGraphicalTypeRegistry inheritedRegistry = new GraphicalTypeRegistry();
+
+ private CreateOrShowExistingElementHelper linkHelper = new CreateOrShowExistingElementHelper();
+
+ /** the sysml link helper to use for specific case */
+ private CreateOrShowExistingElementHelper sysmlLinkHelper = new SysMLCreateOrShowExistingElementHelper();
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+
+ if (ElementTypes.COMMENT_ANNOTATED_ELEMENT == req.getElementType()) {
+ return getGEFWrapper(new CommentAnnotatedElementsCreateCommand(req));
+ }
+
+ if (ElementTypes.CONSTRAINT_CONSTRAINED_ELEMENT == req.getElementType()) {
+ return getGEFWrapper(new ConstraintConstrainedElementsCreateCommand(req));
+ }
+
+ String newEdgeGraphicalType = registry.getEdgeGraphicalType(req.getElementType());
+
+ if (inheritedRegistry.isKnownEdgeType(newEdgeGraphicalType)) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ if (!registry.isKnownEdgeType(newEdgeGraphicalType)) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ final Command defaultCommand = super.getCreateRelationshipCommand(req);
+ if (defaultCommand.canExecute()) {
+ final IElementType elementType = req.getElementType();
+ if (UMLElementTypes.CONNECTOR.equals(req.getElementType())) {
+ return this.sysmlLinkHelper.getCreateOrRestoreElementCommand(req, defaultCommand, elementType);
+ }
+ if (UMLElementTypes.DEPENDENCY.equals(req.getElementType())) {
+ return this.linkHelper.getCreateOrRestoreElementCommand(req, defaultCommand, elementType);
+ }
+ }
+ return defaultCommand;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
+
+ View reconnectedView = (View) req.getParameter(org.eclipse.papyrus.infra.services.edit.utils.RequestParameterConstants.GRAPHICAL_RECONNECTED_EDGE);
+ String reconnectedViewType = (reconnectedView != null) ? reconnectedView.getType() : org.eclipse.papyrus.infra.gmfdiag.common.providers.IGraphicalTypeRegistry.UNDEFINED_TYPE;
+
+ if (ElementTypes.COMMENT_ANNOTATED_ELEMENT.getSemanticHint().equals(reconnectedViewType)) {
+ return getGEFWrapper(new CommentAnnotatedElementsReorientCommand(req));
+ }
+
+ if (ElementTypes.CONSTRAINT_CONSTRAINED_ELEMENT.getSemanticHint().equals(reconnectedViewType)) {
+ return getGEFWrapper(new ConstraintConstrainedElementsReorientCommand(req));
+ }
+
+ return super.getReorientReferenceRelationshipCommand(req);
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/edit/policy/CustomBlockPropertyStructureCompartmentEditPartDropEditPolicy.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/edit/policy/CustomBlockPropertyStructureCompartmentEditPartDropEditPolicy.java
new file mode 100755
index 0000000..3be3b13
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/edit/policy/CustomBlockPropertyStructureCompartmentEditPartDropEditPolicy.java
@@ -0,0 +1,139 @@
+/*****************************************************************************
+ * Copyright (c) 2011, 2016 CEA LIST, Esterel Technologies SAS and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Alain Le Guennec (Esterel Technologies SAS) - bug 497400
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.edit.policy;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.transaction.RunnableWithResult;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.commands.SelectAndExecuteCommand;
+import org.eclipse.papyrus.sysml.diagram.internalblock.utils.BlockDropHelper;
+import org.eclipse.papyrus.sysml.diagram.internalblock.utils.PartDropHelper;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * <pre>
+ * Customization of the DND edit policy for BlockPropertyComposite that enables
+ * type modification, or creation of new Port and FlowPort by a drop on target.
+ * </pre>
+ */
+public class CustomBlockPropertyStructureCompartmentEditPartDropEditPolicy extends CustomDragDropEditPolicy {
+
+ /** Default constructor */
+ public CustomBlockPropertyStructureCompartmentEditPartDropEditPolicy() {
+ super();
+ }
+
+ /**
+ * {@inheritedDoc}.
+ */
+ @Override
+ public Command getDropObjectsCommand(DropObjectsRequest dropRequest) {
+
+ BlockDropHelper helper = new BlockDropHelper(getEditingDomain());
+
+ // Single drop management possible drop action list can be proposed
+ if (dropRequest.getObjects().size() == 1) {
+
+ // List of available drop commands
+ final List<Command> commandChoice = new ArrayList<Command>();
+
+ // 1. Build command to drop BlockProperty
+ PartDropHelper partDropHelper = new PartDropHelper(getEditingDomain());
+ Command dropPartOnPart = partDropHelper.getDropPartOnPart(dropRequest, (GraphicalEditPart) getHost());
+ if ((dropPartOnPart != null) && (dropPartOnPart.canExecute())) {
+ commandChoice.add(dropPartOnPart);
+ }
+
+ // 2. Try to create a Part typed by the dropped object
+ Command dropAsTypedPart = helper.getDropAsStructureItemOnPart(dropRequest, (GraphicalEditPart) getHost(), SysMLElementTypes.PART_PROPERTY);
+ if ((dropAsTypedPart != null) && (dropAsTypedPart.canExecute())) {
+ commandChoice.add(dropAsTypedPart);
+ }
+
+ // 3. Try to create a Reference typed by the dropped object
+ Command dropAsTypedReference = helper.getDropAsStructureItemOnPart(dropRequest, (GraphicalEditPart) getHost(), SysMLElementTypes.REFERENCE_PROPERTY);
+ if ((dropAsTypedReference != null) && (dropAsTypedReference.canExecute())) {
+ commandChoice.add(dropAsTypedReference);
+ }
+
+ // 4. Try to create an ActorPart typed by the dropped object
+ Command dropAsTypedActorPart = helper.getDropAsStructureItemOnPart(dropRequest, (GraphicalEditPart) getHost(), SysMLElementTypes.ACTOR_PART_PROPERTY);
+ if ((dropAsTypedActorPart != null) && (dropAsTypedActorPart.canExecute())) {
+ commandChoice.add(dropAsTypedActorPart);
+ }
+
+ // 5. Try to create a Value typed by the dropped object
+ Command dropAsTypedValue = helper.getDropAsStructureItemOnPart(dropRequest, (GraphicalEditPart) getHost(), SysMLElementTypes.VALUE_PROPERTY);
+ if ((dropAsTypedValue != null) && (dropAsTypedValue.canExecute())) {
+ commandChoice.add(dropAsTypedValue);
+ }
+
+ // 6. Try to create a Property typed by the dropped object
+ Command dropAsTypedProperty = helper.getDropAsStructureItemOnPart(dropRequest, (GraphicalEditPart) getHost(), UMLElementTypes.PROPERTY);
+ if ((dropAsTypedProperty != null) && (dropAsTypedProperty.canExecute())) {
+ commandChoice.add(dropAsTypedProperty);
+ }
+
+ // 7. Build default drop command (show view of the dropped object)
+ Command defaultDropCommand = super.getDropObjectsCommand(dropRequest);
+ if ((defaultDropCommand != null) && (defaultDropCommand.canExecute())) {
+ defaultDropCommand.setLabel("Default drop (Show dropped object in diagram)");
+ commandChoice.add(defaultDropCommand);
+ }
+
+ // Prepare the selection command (if several command are available) or return the drop command
+ if (commandChoice.size() > 1) {
+ RunnableWithResult<ICommand> runnable;
+ Display.getDefault().syncExec(runnable = new RunnableWithResult.Impl<ICommand>() {
+
+ public void run() {
+ setResult(new SelectAndExecuteCommand("Select drop action for ", PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), commandChoice));
+ }
+ });
+
+ ICommand selectCommand = runnable.getResult();
+
+ return new ICommandProxy(selectCommand);
+ } else if (commandChoice.size() == 1) {
+ return commandChoice.get(0);
+ }
+
+ // else (command choice is empty)
+ return UnexecutableCommand.INSTANCE;
+
+ }
+
+ return super.getDropObjectsCommand(dropRequest);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected View getReferenceViewForConnectorEnd() {
+ return ViewUtil.getContainerView(super.getReferenceViewForConnectorEnd());
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/edit/policy/CustomDefaultSemanticEditPolicy.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/edit/policy/CustomDefaultSemanticEditPolicy.java
new file mode 100755
index 0000000..8113f48
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/edit/policy/CustomDefaultSemanticEditPolicy.java
@@ -0,0 +1,114 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.edit.policy;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.gmf.diagram.common.provider.IGraphicalTypeRegistry;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLCreateOrShowExistingElementHelper;
+import org.eclipse.papyrus.sysml.diagram.internalblock.provider.CustomGraphicalTypeRegistry;
+import org.eclipse.papyrus.sysml.diagram.internalblock.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.provider.GraphicalTypeRegistry;
+import org.eclipse.papyrus.uml.diagram.common.helper.CreateOrShowExistingElementHelper;
+import org.eclipse.papyrus.uml.service.types.command.CommentAnnotatedElementsCreateCommand;
+import org.eclipse.papyrus.uml.service.types.command.CommentAnnotatedElementsReorientCommand;
+import org.eclipse.papyrus.uml.service.types.command.ConstraintConstrainedElementsCreateCommand;
+import org.eclipse.papyrus.uml.service.types.command.ConstraintConstrainedElementsReorientCommand;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+
+/**
+ * <pre>
+ * Custom semantic edit policy that replace DefaultSemanticEditPolicy
+ * in order to manage Class Diagram specific elements (reference
+ * relationships COMMENT_ANNOTATED_ELEMENT and CONSTRAINT_CONSTRAINED_ELEMENT).
+ * </pre>
+ */
+public class CustomDefaultSemanticEditPolicy extends DefaultSemanticEditPolicy {
+
+ /** Local graphical type registry for graphical elements */
+ private IGraphicalTypeRegistry registry = new CustomGraphicalTypeRegistry();
+
+ /** Local graphical type registry for inherited graphical elements */
+ private IGraphicalTypeRegistry inheritedRegistry = new GraphicalTypeRegistry();
+
+ /** the link helper to use */
+ private CreateOrShowExistingElementHelper linkHelper = new CreateOrShowExistingElementHelper();
+
+ /** the sysml link helper to use for specific case */
+ private CreateOrShowExistingElementHelper sysmlLinkHelper = new SysMLCreateOrShowExistingElementHelper();
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+
+ if (ElementTypes.COMMENT_ANNOTATED_ELEMENT == req.getElementType()) {
+ return getGEFWrapper(new CommentAnnotatedElementsCreateCommand(req));
+ }
+
+ if (ElementTypes.CONSTRAINT_CONSTRAINED_ELEMENT == req.getElementType()) {
+ return getGEFWrapper(new ConstraintConstrainedElementsCreateCommand(req));
+ }
+
+ String newEdgeGraphicalType = registry.getEdgeGraphicalType(req.getElementType());
+
+ if (inheritedRegistry.isKnownEdgeType(newEdgeGraphicalType)) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ if (!registry.isKnownEdgeType(newEdgeGraphicalType)) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ final Command defaultCommand = super.getCreateRelationshipCommand(req);
+ if (defaultCommand.canExecute()) {
+ final IElementType elementType = req.getElementType();
+ if (UMLElementTypes.CONNECTOR.equals(req.getElementType())) {
+ return this.sysmlLinkHelper.getCreateOrRestoreElementCommand(req, defaultCommand, elementType);
+ }
+
+ if (UMLElementTypes.DEPENDENCY.equals(req.getElementType())) {
+ return this.linkHelper.getCreateOrRestoreElementCommand(req, defaultCommand, elementType);
+ }
+ }
+ return defaultCommand;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
+
+ View reconnectedView = (View) req.getParameter(org.eclipse.papyrus.infra.services.edit.utils.RequestParameterConstants.GRAPHICAL_RECONNECTED_EDGE);
+ String reconnectedViewType = (reconnectedView != null) ? reconnectedView.getType() : org.eclipse.papyrus.infra.gmfdiag.common.providers.IGraphicalTypeRegistry.UNDEFINED_TYPE;
+
+ if (ElementTypes.COMMENT_ANNOTATED_ELEMENT.getSemanticHint().equals(reconnectedViewType)) {
+ return getGEFWrapper(new CommentAnnotatedElementsReorientCommand(req));
+ }
+
+ if (ElementTypes.CONSTRAINT_CONSTRAINED_ELEMENT.getSemanticHint().equals(reconnectedViewType)) {
+ return getGEFWrapper(new ConstraintConstrainedElementsReorientCommand(req));
+ }
+
+ return super.getReorientReferenceRelationshipCommand(req);
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/edit/policy/CustomDiagramDropEditPolicy.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/edit/policy/CustomDiagramDropEditPolicy.java
new file mode 100755
index 0000000..4192a5c
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/edit/policy/CustomDiagramDropEditPolicy.java
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.edit.policy;
+
+import java.util.Iterator;
+import java.util.Set;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand;
+import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.service.types.matcher.BlockMatcher;
+
+/**
+ * Custom drag'n'drop edit policy when the target edit part is the diagram itself.
+ * <P>
+ * In this case, it should be impossible to drop elements in this Internal Block Diagram, except the block context of that diagram, if it is not already displayed in the diagram.
+ * </P>
+ */
+public class CustomDiagramDropEditPolicy extends CustomDragDropEditPolicy {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Set<String> getSpecificDropBehaviorTypes() {
+ Set<String> specificDropBehaviorTypes = super.getSpecificDropBehaviorTypes();
+ specificDropBehaviorTypes.add(SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ return specificDropBehaviorTypes;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected ICommand getSpecificDropCommand(DropObjectsRequest dropRequest, EObject droppedEObject, String nodeType, String edgeType) {
+ if (SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID.equals(nodeType)) {
+ // should not be possible to execute, unless 2 conditions:
+ // 1. the block is the context of the diagram
+ // 2. the block is not already displayed in the diagram
+ BlockMatcher matcher = new BlockMatcher();
+ if (!matcher.matches(droppedEObject)) { // should check for additional free elements, like comments, constraints.
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ // this is a block. checking if the element context of the diagram is the block dropped
+ Object model = getHost().getModel();
+ if (model instanceof Diagram) { // should be...
+ EObject element = ((Diagram) model).getElement();
+ if (droppedEObject.equals(element)) {
+ // check no view exists for this block already
+ @SuppressWarnings("unchecked")
+ Iterator<View> it = ((Diagram) model).getChildren().iterator();
+ while (it.hasNext()) {
+ View view = it.next();
+ if (SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID.equals(view.getType())) {
+ // there is already a block displayed in the diagram. Should be unexecutable.
+ return UnexecutableCommand.INSTANCE;
+ }
+ }
+ } else {
+ // block that do not corresponds to block the context of the diagram.
+ return UnexecutableCommand.INSTANCE;
+ }
+ } else {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ // it should be possible to create a view for the block now. It is not displayed and this is the context of the diagram
+ return getDefaultDropNodeCommand(nodeType, dropRequest.getLocation(), droppedEObject);
+
+ }
+ return super.getSpecificDropCommand(dropRequest, droppedEObject, nodeType, edgeType);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/edit/policy/CustomDragDropEditPolicy.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/edit/policy/CustomDragDropEditPolicy.java
new file mode 100755
index 0000000..06a8993
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/edit/policy/CustomDragDropEditPolicy.java
@@ -0,0 +1,443 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.edit.policy;
+
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.diagram.ui.commands.CommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest;
+import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.gmf.diagram.common.edit.policy.CommonDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.adapter.SemanticAdapter;
+import org.eclipse.papyrus.infra.gmfdiag.common.commands.CommonDeferredCreateConnectionViewCommand;
+import org.eclipse.papyrus.sysml.blocks.NestedConnectorEnd;
+import org.eclipse.papyrus.sysml.diagram.internalblock.dnd.helper.CustomLinkMappingHelper;
+import org.eclipse.papyrus.sysml.diagram.internalblock.provider.CustomGraphicalTypeRegistry;
+import org.eclipse.papyrus.sysml.diagram.internalblock.utils.PortDropHelper;
+import org.eclipse.papyrus.sysml.service.types.utils.ConnectorUtils;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.AbstractElementNodeLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.eclipse.uml2.uml.Connector;
+import org.eclipse.uml2.uml.ConnectorEnd;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.EncapsulatedClassifier;
+import org.eclipse.uml2.uml.Port;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.TypedElement;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+/** Customization of the DND edit policy for the Internal Block Diagram */
+public class CustomDragDropEditPolicy extends CommonDiagramDragDropEditPolicy {
+
+ private ConnectorUtils utils = new ConnectorUtils();
+
+ /** Default constructor. */
+ public CustomDragDropEditPolicy() {
+ super(new CustomLinkMappingHelper());
+ registry = new CustomGraphicalTypeRegistry();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Set<String> getSpecificDropBehaviorTypes() {
+ Set<String> specificDropBehaviorTypes = new HashSet<String>();
+
+ specificDropBehaviorTypes.add(UMLGraphicalTypes.LINK_UML_CONNECTOR_ID);
+
+ return specificDropBehaviorTypes;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected ICommand getSpecificDropCommand(DropObjectsRequest dropRequest, EObject droppedEObject, String nodeType, String edgeType) {
+ if ((UMLGraphicalTypes.LINK_UML_CONNECTOR_ID.equals(edgeType)) && (droppedEObject instanceof Connector)) {
+ return getConnectorDropCommand(dropRequest, (Connector) droppedEObject, edgeType);
+ }
+
+ return org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand.INSTANCE;
+ }
+
+ protected ICommand getConnectorDropCommand(DropObjectsRequest dropRequest, Connector droppedEObject, String edgeType) {
+
+ // Only manage binary link during drop
+ if (droppedEObject.getEnds().size() != 2) {
+ return org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand.INSTANCE;
+ }
+
+ ConnectorEnd source = droppedEObject.getEnds().get(0);
+ ConnectorEnd target = droppedEObject.getEnds().get(1);
+
+ return dropBinaryLink(new CompositeCommand("drop Connector"), source.getRole(), target.getRole(), edgeType, dropRequest.getLocation(), droppedEObject);
+ }
+
+ /**
+ * the method provides command to create the binary link into the diagram.
+ * If the source and the target views do not exist, these views will be
+ * created.
+ *
+ * @param cc
+ * the composite command that will contain the set of command to
+ * create the binary link
+ * @param source
+ * the source the element source of the link
+ * @param target
+ * the target the element target of the link
+ * @param linkVISUALID
+ * the link VISUALID used to create the view
+ * @param location
+ * the location the location where the view will be be created
+ * @param semanticLink
+ * the semantic link that will be attached to the view
+ *
+ * @return the composite command
+ */
+ protected CompositeCommand dropBinaryLink(CompositeCommand cc, Element source, Element target, String edgeType, Point absoluteLocation, Element semanticLink) {
+ IAdaptable sourceViewAdapter = findAdapter(cc, source, getLinkSourceDropLocation(absoluteLocation, source, target), edgeType);
+ IAdaptable targetViewAdapter = findAdapter(cc, target, getLinkTargetDropLocation(absoluteLocation, source, target), edgeType);
+ IAdaptable droppedViewAdapter = new SemanticAdapter(semanticLink, null);
+
+ CreateConnectionViewRequest.ConnectionViewDescriptor linkdescriptor = new CreateConnectionViewRequest.ConnectionViewDescriptor(droppedViewAdapter, edgeType, getDiagramPreferencesHint());
+ CommonDeferredCreateConnectionViewCommand createConnectionViewCommand = new CommonDeferredCreateConnectionViewCommand(getEditingDomain(), edgeType, sourceViewAdapter, targetViewAdapter, getViewer(), getDiagramPreferencesHint(), linkdescriptor, null);
+ createConnectionViewCommand.setElement(semanticLink);
+ cc.compose(createConnectionViewCommand);
+ return cc;
+ }
+
+ /**
+ * This method allows to specify a location for the creation of a node at
+ * the source of a dropped link. Overriding implementations must not modify
+ * the absoluteLocation parameter (use {@link Point#getCopy()})
+ *
+ * @param absoluteLocation
+ * the request's drop location
+ * @param source
+ * the source of the dropped link
+ * @param target
+ * the target of the dropped link
+ * @return the new location for the node
+ */
+ protected Point getLinkSourceDropLocation(Point absoluteLocation, Element source, Element target) {
+ return absoluteLocation;
+ }
+
+ /**
+ * This method allows to specify a location for the creation of a node at
+ * the target of a dropped link. Overriding implementations must not modify
+ * the absoluteLocation parameter (use {@link Point#getCopy()})
+ *
+ * @param absoluteLocation
+ * the request's drop location
+ * @param source
+ * the source of the dropped link
+ * @param target
+ * the target of the dropped link
+ * @return the new location for the node
+ */
+ protected Point getLinkTargetDropLocation(Point absoluteLocation, Element source, Element target) {
+ if (lookForEditPart(source) == null && lookForEditPart(target) == null) {
+ return absoluteLocation.getTranslated(100, 0);
+ }
+ return absoluteLocation;
+ }
+
+ /**
+ * the method provides command to create the binary link into the diagram.
+ * Find source/target adapter
+ * If the source and the target views do not exist, these views will be
+ * created.
+ *
+ * @see dropBinaryLink(CompositeCommand cc, Element source, Element target, int linkVISUALID
+ * , Point absoluteLocation, Element semanticLink)
+ *
+ * @param cc
+ * the composite command that will contain the set of command to
+ * create the binary link
+ * @param source
+ * source/target link node
+ * @param point
+ * source/target node location
+ */
+ private IAdaptable findAdapter(CompositeCommand cc, Element source, Point dropLocation, String edgeType) {
+ IAdaptable result = getElement2IAdaptableRegistryHelper().findAdapter(source);
+ if (result != null) {
+ return result;
+ }
+ GraphicalEditPart editPart = (GraphicalEditPart) lookForEditPart(source);
+ if (editPart != null) {
+ return new SemanticAdapter(null, editPart.getModel());
+ }
+ if (isPortSource(source)) {
+ ICommand createPortCommand = createPortViewCommand(source, dropLocation);
+ cc.add(createPortCommand);
+ return (IAdaptable) createPortCommand.getCommandResult().getReturnValue();
+ }
+ ICommand createCommand = getDefaultDropNodeCommand(edgeType, dropLocation, source);
+ cc.add(createCommand);
+ return (IAdaptable) createCommand.getCommandResult().getReturnValue();
+ }
+
+ protected boolean isPortSource(Element source) {
+ return source instanceof Port;
+ }
+
+ private ICommand createPortViewCommand(Element source, Point dropLocation) {
+ if (false == source instanceof Port) {
+ return new CommandProxy(UnexecutableCommand.INSTANCE);
+ }
+ EditPart portContainer = lookForEditPart(source.eContainer(), true);
+ if (portContainer == null) {
+ return new CommandProxy(UnexecutableCommand.INSTANCE);
+ }
+ PortDropHelper portDropHelper = new PortDropHelper(getEditingDomain());
+ return portDropHelper.getDropPortOnPart((Port) source, dropLocation.getCopy(), (GraphicalEditPart) portContainer);
+ }
+
+ protected EditPart lookForEditPart(EObject semantic) {
+ return lookForEditPart(semantic, false);
+ }
+
+ /**
+ * Look for editPart from his semantic.
+ *
+ * @param semantic
+ * the semantic
+ *
+ * @return the edits the part or null if not found
+ */
+ protected EditPart lookForEditPart(EObject semantic, boolean byType) {
+ Collection<EditPart> editPartSet = getHost().getViewer().getEditPartRegistry().values();
+ Iterator<EditPart> editPartIterator = editPartSet.iterator();
+ while (editPartIterator.hasNext()) {
+ EditPart nextEditPart = editPartIterator.next();
+ if (!isEditPartTypeAdapted(nextEditPart.getClass(), semantic.eClass())) {
+ continue;
+ }
+ EObject nextSemantic = ((GraphicalEditPart) nextEditPart).resolveSemanticElement();
+ if (semantic.equals(nextSemantic)) {
+ return nextEditPart;
+ }
+ if (byType && nextSemantic instanceof TypedElement && ((TypedElement) nextSemantic).getType() != null) {
+ EObject nextSemanticType = ((TypedElement) nextSemantic).getType();
+ if (semantic.equals(nextSemanticType)) {
+ return nextEditPart;
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Check if the edit part type is the best one to represent an object of the
+ * given EClass type
+ *
+ * @param editPartClass
+ * the type of EditPart which may represent a semantic element
+ * @param eClass
+ * the EClass type of the represented semantic element
+ * @return true if an edit part of this type should be selected
+ */
+ private boolean isEditPartTypeAdapted(Class<? extends EditPart> editPartClass, EClass eClass) {
+ if (DiagramEditPart.class.isAssignableFrom(editPartClass) || CompartmentEditPart.class.isAssignableFrom(editPartClass)) {
+ // the edit part is disqualified, as a compartment or a diagram can not be dropped
+ return false;
+ } else if (AbstractElementNodeLabelEditPart.class.isAssignableFrom(editPartClass)) {
+ return false;
+ } else if (GraphicalEditPart.class.isAssignableFrom(editPartClass)) {
+ // check the edit part type against advised ones
+ return isEditPartTypeSuitableForEClass(editPartClass.asSubclass(GraphicalEditPart.class), eClass);
+ }
+ return false;
+ }
+
+ /**
+ * Check if an edit part type correctly represent a semantic element of the
+ * given EClass. Subclasses should implement this method to restrict the
+ * possibilities during drop of a link. If an edit part is not of a suitable
+ * type, returning false will eliminate it to represent the element as a
+ * source or target edit part. This can be used for example to disable label
+ * edit parts, which may represent the same model element as the main node.
+ *
+ * @param editPartClass
+ * the type of EditPart which must be checked
+ * @param eClass
+ * the EClass type of the element which the edit part must
+ * represent
+ * @return the only edit part type which can be selected (return a common
+ * super type if several edit parts can be chosen)
+ */
+ protected boolean isEditPartTypeSuitableForEClass(Class<? extends GraphicalEditPart> editPartClass, EClass eClass) {
+ return true;
+ }
+
+ /**
+ * get the first valid target view for the given source. the couple source/target is valid if the path to them from the future container is valid
+ *
+ * @param sourceView
+ * @param targetViews
+ * @return
+ */
+ private View getFirstValidTargetViewForSource(View sourceView, Collection<View> targetViews, Connector droppedConnector) {
+ for (View targetView : targetViews) {
+ if (isValidTargetViewForSource(sourceView, targetView, droppedConnector)) {
+ return targetView;
+ }
+ }
+
+ return null;
+ }
+
+ private boolean isValidTargetViewForSource(View sourceView, View targetView, Connector droppedConnector) {
+ if (!(utils.isCrossingEncapsulation(sourceView, targetView))) {
+ // no encapsulation. Computes the end paths
+ List<Property> sourceNestedPaths = utils.getNestedPropertyPath(sourceView, targetView);
+ List<Property> targetNestedPaths = utils.getNestedPropertyPath(targetView, sourceView);
+
+ // check this is compatible with current connector
+ ConnectorEnd sourceConnectorEnd = utils.getSourceConnectorEnd(droppedConnector);
+ NestedConnectorEnd nestedSourceConnectorEnd = UMLUtil.getStereotypeApplication(sourceConnectorEnd, NestedConnectorEnd.class);
+ if (nestedSourceConnectorEnd != null) {
+ List<Property> currentSourceConnectorPropertyPath = nestedSourceConnectorEnd.getPropertyPath();
+ // compare the 2 list
+ if (!sourceNestedPaths.equals(currentSourceConnectorPropertyPath)) {
+ return false;
+ }
+
+ } else { // no end for the current connector, so the sourceNestedPath should be empty
+ if (!sourceNestedPaths.isEmpty()) {
+ return false;
+ }
+ }
+
+
+ ConnectorEnd targetConnectorEnd = utils.getTargetConnectorEnd(droppedConnector);
+ NestedConnectorEnd nestedTargetConnectorEnd = UMLUtil.getStereotypeApplication(targetConnectorEnd, NestedConnectorEnd.class);
+ if (nestedTargetConnectorEnd != null) {
+ List<Property> currentTargetConnectorPropertyPath = nestedTargetConnectorEnd.getPropertyPath();
+ // compare the 2 list
+ if (!targetNestedPaths.equals(currentTargetConnectorPropertyPath)) {
+ return false;
+ }
+
+ } else { // no end for the current connector, so the targetNestedPaths should be empty
+ if (!targetNestedPaths.isEmpty()) {
+ return false;
+ }
+ }
+ }
+ return true;
+ }
+
+ /**
+ * This methods looks for views representing a given {@link ConnectorEnd} in the host diagram.
+ *
+ * @param end
+ * the {@link ConnectorEnd} to look for.
+ * @return the list of {@link View} representing the eObject.
+ */
+ protected Set<View> getViewsForConnectorEnd(ConnectorEnd end) {
+ Set<View> views = new HashSet<View>();
+
+ // Retrieve host diagram
+ View hostView = ((IGraphicalEditPart) getHost()).getNotationView();
+ View hostDiagram = (hostView instanceof Diagram) ? hostView : hostView.getDiagram();
+
+ // Retrieve all views for the ConnectorEnd role
+ EReference[] refs = { NotationPackage.eINSTANCE.getView_Element() };
+ @SuppressWarnings("unchecked")
+ Collection<View> relatedViews = EMFCoreUtil.getReferencers(end.getRole(), refs);
+
+ // TODO: We should filter views not only for the current diagram,
+ // but also consider only views nested within the owner of the connector that are closest to the host view
+ // (in case there are several instances of a Part within which the connector could appear).
+ // Connector connector = (Connector)end.getOwner();
+ // StructuredClassifier connectorOwner = (StructuredClassifier)connector.getOwner();
+ // Parse and select views from host diagram only
+ Iterator<View> it = relatedViews.iterator();
+ while (it.hasNext()) {
+ View currentView = it.next();
+ if (currentView.getDiagram() == hostDiagram) { // FIXME: Cf TODO above.
+
+ boolean isInView = false;
+ View containerView = currentView;
+ while (containerView != null && !(containerView instanceof Diagram)) {
+ if (containerView == getReferenceViewForConnectorEnd()) {
+ isInView = true;
+ }
+ containerView = ViewUtil.getContainerView(containerView);
+ }
+
+ if (isInView) {
+
+ EObject containerElement = ViewUtil.getContainerView(currentView).getElement();
+
+ // If the ConnectorEnd partWithPort is not null, only select Views for which
+ // the graphical parent reference partWithPort.
+ if (end.getPartWithPort() != null) {
+ if (containerElement == end.getPartWithPort()) {
+ views.add(currentView);
+ }
+ } else {
+ // If the role is a Port, its graphical parent is a EncapsulatedClassifier
+ if (end.getRole() instanceof Port) {
+ if (containerElement instanceof EncapsulatedClassifier) {
+ views.add(currentView);
+ } else if (containerElement instanceof Property) {
+ Property property = (Property) containerElement;
+ if (property.getType() == end.getRole().getOwner()) {
+ views.add(currentView);
+ }
+ }
+ } else { // No further test needed
+ views.add(currentView);
+ }
+
+ }
+ }
+ }
+ }
+
+ return views;
+ }
+
+ protected View getReferenceViewForConnectorEnd() {
+ return ((IGraphicalEditPart) getHost()).getNotationView();
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/edit/policy/CustomNestedBlockPropertyCompositeSemanticEditPolicy.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/edit/policy/CustomNestedBlockPropertyCompositeSemanticEditPolicy.java
new file mode 100755
index 0000000..e2baacb
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/edit/policy/CustomNestedBlockPropertyCompositeSemanticEditPolicy.java
@@ -0,0 +1,94 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.edit.policy;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.gmf.diagram.common.provider.IGraphicalTypeRegistry;
+import org.eclipse.papyrus.sysml.diagram.common.edit.policy.NestedBlockPropertyCompositeSemanticEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.internalblock.provider.CustomGraphicalTypeRegistry;
+import org.eclipse.papyrus.sysml.diagram.internalblock.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.provider.GraphicalTypeRegistry;
+import org.eclipse.papyrus.uml.service.types.command.CommentAnnotatedElementsCreateCommand;
+import org.eclipse.papyrus.uml.service.types.command.CommentAnnotatedElementsReorientCommand;
+import org.eclipse.papyrus.uml.service.types.command.ConstraintConstrainedElementsCreateCommand;
+import org.eclipse.papyrus.uml.service.types.command.ConstraintConstrainedElementsReorientCommand;
+
+/**
+ * <pre>
+ * Custom semantic edit policy that replace DefaultSemanticEditPolicy
+ * in order to manage Class Diagram specific elements (reference
+ * relationships COMMENT_ANNOTATED_ELEMENT and CONSTRAINT_CONSTRAINED_ELEMENT).
+ * </pre>
+ */
+@Deprecated
+public class CustomNestedBlockPropertyCompositeSemanticEditPolicy extends NestedBlockPropertyCompositeSemanticEditPolicy {
+
+ /** Local graphical type registry for graphical elements */
+ private IGraphicalTypeRegistry registry = new CustomGraphicalTypeRegistry();
+
+ /** Local graphical type registry for inherited graphical elements */
+ private IGraphicalTypeRegistry inheritedRegistry = new GraphicalTypeRegistry();
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+
+ if (ElementTypes.COMMENT_ANNOTATED_ELEMENT == req.getElementType()) {
+ return getGEFWrapper(new CommentAnnotatedElementsCreateCommand(req));
+ }
+
+ if (ElementTypes.CONSTRAINT_CONSTRAINED_ELEMENT == req.getElementType()) {
+ return getGEFWrapper(new ConstraintConstrainedElementsCreateCommand(req));
+ }
+
+ String newEdgeGraphicalType = registry.getEdgeGraphicalType(req.getElementType());
+
+ if (inheritedRegistry.isKnownEdgeType(newEdgeGraphicalType)) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ if (!registry.isKnownEdgeType(newEdgeGraphicalType)) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ return super.getCreateRelationshipCommand(req);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
+
+ View reconnectedView = (View) req.getParameter(org.eclipse.papyrus.infra.services.edit.utils.RequestParameterConstants.GRAPHICAL_RECONNECTED_EDGE);
+ String reconnectedViewType = (reconnectedView != null) ? reconnectedView.getType() : org.eclipse.papyrus.infra.gmfdiag.common.providers.IGraphicalTypeRegistry.UNDEFINED_TYPE;
+
+ if (ElementTypes.COMMENT_ANNOTATED_ELEMENT.getSemanticHint().equals(reconnectedViewType)) {
+ return getGEFWrapper(new CommentAnnotatedElementsReorientCommand(req));
+ }
+
+ if (ElementTypes.CONSTRAINT_CONSTRAINED_ELEMENT.getSemanticHint().equals(reconnectedViewType)) {
+ return getGEFWrapper(new ConstraintConstrainedElementsReorientCommand(req));
+ }
+
+ return super.getReorientReferenceRelationshipCommand(req);
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/edit/policy/EncapsulatedClassifierDropEditPolicy.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/edit/policy/EncapsulatedClassifierDropEditPolicy.java
new file mode 100755
index 0000000..29acc51
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/edit/policy/EncapsulatedClassifierDropEditPolicy.java
@@ -0,0 +1,111 @@
+/*****************************************************************************
+ * Copyright (c) 2011, 2016 CEA LIST, Esterel Technologies SAS and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Alain Le Guennec (Esterel Technologies SAS) - bug 497400
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.edit.policy;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.transaction.RunnableWithResult;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.commands.SelectAndExecuteCommand;
+import org.eclipse.papyrus.sysml.diagram.internalblock.utils.TypeDropHelper;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * <pre>
+ * Customization of the DND edit policy for the EncapsulatedClassifier, that enables the direct
+ * creation of typed Port or FlowPort by dragging types over diagram figure.
+ * </pre>
+ */
+public class EncapsulatedClassifierDropEditPolicy extends CustomDragDropEditPolicy {
+
+ /** Default constructor */
+ public EncapsulatedClassifierDropEditPolicy() {
+ super();
+ }
+
+ /**
+ * {@inheritedDoc}.
+ */
+ @Override
+ public Command getDropObjectsCommand(DropObjectsRequest dropRequest) {
+
+ TypeDropHelper helper = new TypeDropHelper(getEditingDomain());
+
+ // Single drop management possible drop action list can be proposed
+ if (dropRequest.getObjects().size() == 1) {
+
+ // List of available drop commands
+ final List<Command> commandChoice = new ArrayList<Command>();
+
+ // 1. Try to create a Port typed by the dropped object
+ Command dropAsTypedPort = helper.getDropAsTypedPort(dropRequest, (GraphicalEditPart) getHost());
+ if ((dropAsTypedPort != null) && (dropAsTypedPort.canExecute())) {
+ commandChoice.add(dropAsTypedPort);
+ }
+
+ // 2. Try to create a FlowPort (In - Out - InOut) typed by the dropped object
+ Command dropAsTypedFlowPort_In = helper.getDropAsTypedFlowPort(dropRequest, (GraphicalEditPart) getHost(), SysMLElementTypes.FLOW_PORT);
+ if ((dropAsTypedFlowPort_In != null) && (dropAsTypedFlowPort_In.canExecute())) {
+ commandChoice.add(dropAsTypedFlowPort_In);
+ }
+ Command dropAsTypedFlowPort_Out = helper.getDropAsTypedFlowPort(dropRequest, (GraphicalEditPart) getHost(), SysMLElementTypes.FLOW_PORT_IN);
+ if ((dropAsTypedFlowPort_Out != null) && (dropAsTypedFlowPort_Out.canExecute())) {
+ commandChoice.add(dropAsTypedFlowPort_Out);
+ }
+ Command dropAsTypedFlowPort_InOut = helper.getDropAsTypedFlowPort(dropRequest, (GraphicalEditPart) getHost(), SysMLElementTypes.FLOW_PORT_OUT);
+ if ((dropAsTypedFlowPort_InOut != null) && (dropAsTypedFlowPort_InOut.canExecute())) {
+ commandChoice.add(dropAsTypedFlowPort_InOut);
+ }
+
+ // 3. Build default drop command (show view of the dropped object)
+ Command defaultDropCommand = super.getDropObjectsCommand(dropRequest);
+ if ((defaultDropCommand != null) && (defaultDropCommand.canExecute())) {
+ defaultDropCommand.setLabel("Default drop (Show dropped object in diagram)");
+ commandChoice.add(defaultDropCommand);
+ }
+
+ // Prepare the selection command (if several command are available) or return the drop command
+ if (commandChoice.size() > 1) {
+ RunnableWithResult<ICommand> runnable;
+ Display.getDefault().syncExec(runnable = new RunnableWithResult.Impl<ICommand>() {
+
+ public void run() {
+ setResult(new SelectAndExecuteCommand("Select drop action for ", PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), commandChoice));
+ }
+ });
+
+ ICommand selectCommand = runnable.getResult();
+
+ return new ICommandProxy(selectCommand);
+
+ } else if (commandChoice.size() == 1) {
+ return commandChoice.get(0);
+ }
+
+ // else (command choice is empty)
+ return UnexecutableCommand.INSTANCE;
+
+ }
+
+ return super.getDropObjectsCommand(dropRequest);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/edit/policy/ShowHideRelatedLinkEditPolicy.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/edit/policy/ShowHideRelatedLinkEditPolicy.java
new file mode 100755
index 0000000..8dbef11
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/edit/policy/ShowHideRelatedLinkEditPolicy.java
@@ -0,0 +1,408 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.edit.policy;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.diagram.ui.commands.CommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.structure.DiagramStructure;
+import org.eclipse.papyrus.infra.gmfdiag.common.updater.DiagramUpdater;
+import org.eclipse.papyrus.infra.gmfdiag.common.updater.UpdaterLinkDescriptor;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.Domain2Notation;
+import org.eclipse.papyrus.sysml.blocks.NestedConnectorEnd;
+import org.eclipse.papyrus.sysml.diagram.internalblock.part.SysMLDiagramUpdater;
+import org.eclipse.papyrus.sysml.diagram.internalblock.part.SysMLVisualIDRegistry;
+import org.eclipse.papyrus.sysml.service.types.utils.ConnectorUtils;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractUMLShowHideRelatedLinkEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.util.CrossReferencerUtil;
+import org.eclipse.uml2.uml.ConnectableElement;
+import org.eclipse.uml2.uml.Connector;
+import org.eclipse.uml2.uml.ConnectorEnd;
+import org.eclipse.uml2.uml.Property;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The edit policy to use in the IBD diagram to restore existing links.
+ */
+public class ShowHideRelatedLinkEditPolicy extends AbstractUMLShowHideRelatedLinkEditPolicy {
+
+ /**
+ * Constructor.
+ *
+ * @param host
+ * the host
+ */
+ public ShowHideRelatedLinkEditPolicy(DiagramEditPart host) {
+ super(host);
+ }
+
+ /**
+ * Gets the diagram updater.
+ *
+ * @return the diagram updater
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IDiagramInformationProviderEditPolicy#getDiagramUpdater()
+ */
+ public DiagramUpdater getDiagramUpdater() {
+ return SysMLDiagramUpdater.TYPED_INSTANCE;
+ }
+
+ /**
+ * Gets the diagram structure.
+ *
+ * @return the diagram structure
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IDiagramInformationProviderEditPolicy#getDiagramStructure()
+ */
+ public DiagramStructure getDiagramStructure() {
+ return SysMLVisualIDRegistry.TYPED_INSTANCE;
+ }
+
+ /**
+ * Gets the semantic hint.
+ *
+ * @param eobject
+ * the eobject
+ * @return the semantic hint
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.AbstractShowHideRelatedLinkEditPolicy#getSemanticHint(org.eclipse.emf.ecore.EObject)
+ */
+ @Override
+ protected String getSemanticHint(final EObject eobject) {
+ return SysMLVisualIDRegistry.getLinkWithClassVisualID(eobject);
+ }
+
+ /**
+ * Clean add.
+ *
+ * @param result
+ * the result
+ * @param view
+ * the view
+ * @param descriptors
+ * the descriptors
+ * @param domain2NotationMap
+ * the domain2 notation map
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.AbstractShowHideRelatedLinkEditPolicy#cleanAdd(java.util.Collection, org.eclipse.gmf.runtime.notation.View, java.util.List, java.util.Map)
+ */
+ @Override
+ protected void cleanAdd(final Collection<UpdaterLinkDescriptor> result, final View view, final List<? extends UpdaterLinkDescriptor> descriptors, final Domain2Notation domain2NotationMap) {
+ cleanAddForConnector(result, view, descriptors, domain2NotationMap);
+ super.cleanAdd(result, view, descriptors, domain2NotationMap);
+ }
+
+ /**
+ * This method manages descriptors representing Connector to verify that it
+ * can be displayed according to the nestedPath of the {@link ConnectorEnd} If the connector can be displayed :
+ * <ul>
+ * <li>
+ * the link descriptor is removed from descriptors and added to result</li>
+ * <li>
+ * the view associated to the role of the connector are added to domain2NotationMap (using the ConnectorEnd as key)</li>
+ * </ul>
+ * .
+ *
+ * @param result
+ * the result of the method
+ * @param view
+ * a view
+ * @param descriptors
+ * the link descriptors
+ * @param domain2NotationMap
+ * the map between model element and views
+ */
+ protected void cleanAddForConnector(final Collection<UpdaterLinkDescriptor> result, final View view, final List<?> descriptors, final Domain2Notation domain2NotationMap) {
+ final List<UpdaterLinkDescriptor> toRemove = new ArrayList<UpdaterLinkDescriptor>();
+ for (final Object current : descriptors) {
+ if (current instanceof UpdaterLinkDescriptor) {
+ final UpdaterLinkDescriptor descriptor = (UpdaterLinkDescriptor) current;
+ final EObject element = descriptor.getModelElement();
+ if (element instanceof Connector) {
+ if (canBeDisplayed((Connector) element, view, domain2NotationMap)) {
+ result.add((UpdaterLinkDescriptor) current);
+ }
+ toRemove.add((UpdaterLinkDescriptor) current);
+ }
+ }
+ }
+ descriptors.removeAll(toRemove);
+ }
+
+ /**
+ * Checks if is correct graphical view.
+ *
+ * @param connectorEnd
+ * a connector end
+ * @param view
+ * a view
+ * @return <code>true</code> if the view represents the role of the
+ * connector AND if the view is encapsulated as required by the
+ * nested path of the connector end
+ */
+ protected boolean isCorrectGraphicalView(final ConnectorEnd connectorEnd, final View view) {
+ final NestedConnectorEnd nestedConnectorEnd = org.eclipse.uml2.uml.util.UMLUtil.getStereotypeApplication(connectorEnd, NestedConnectorEnd.class);
+ final Property partWithPort = connectorEnd.getPartWithPort();
+ // final ConnectableElement role = end.getRole();
+ // 1. we get the top view of this view with the same semantic element
+ View localView = getTopViewWithSameSemanticElement(view);
+
+ // 2. we verify the part with port
+ if (partWithPort != null) {
+ View parent = getTopViewWithSameSemanticElement(ViewUtil.getViewContainer(localView));
+ if (parent.getElement() != partWithPort) {
+ return false;
+ }
+ }
+
+ // 3. we verify the nested path
+ if (nestedConnectorEnd != null && nestedConnectorEnd.getPropertyPath().size() > 0) {
+ View parent = view;
+ final List<Property> paths = nestedConnectorEnd.getPropertyPath();
+ for (int i = paths.size() - 1; i >= 0; i--) {
+ final Property currentProperty = paths.get(i);
+ parent = getTopViewWithSameSemanticElement(ViewUtil.getViewContainer(parent));
+ if (parent.getElement() != currentProperty) {
+ return false;
+ }
+ }
+ }
+ return true;
+ }
+
+ /**
+ * Can be displayed.
+ *
+ * @param connector
+ * a connector
+ * @param selectedView
+ * a view used as source or target for the connector to display
+ * @param domain2NotationMap
+ * the map to complete if we found source and target View on the
+ * diagram to diplsay the connector
+ * @return <code>true</code> if the view can be used as source/target for
+ * the connector according to the nested path AND if we found a
+ * second view for the 2nd connector end according to the nested
+ * path
+ */
+ protected boolean canBeDisplayed(final Connector connector, final View selectedView, final Domain2Notation domain2NotationMap) {
+ // we need to verify the selected view
+ final EObject semanticElement = selectedView.getElement();
+ ConnectorEnd endForView = null;
+
+ // 1. look for the connector end represented by the selected view
+ for (final ConnectorEnd current : connector.getEnds()) {
+ if (current.getRole() == semanticElement) {
+ endForView = current;
+ break;
+ }
+ }
+ Assert.isNotNull(endForView);
+ // 2. verify the view of the selected connector end
+ if (!isCorrectGraphicalView(endForView, selectedView)) {
+ return false;
+ }
+
+ // 3. try to find a view for the second connector end
+ View secondView = null;
+ for (final ConnectorEnd end : connector.getEnds()) {
+ final ConnectableElement role = end.getRole();
+ if (role == null) {
+ return false;
+ }
+ if (end == endForView) {
+ continue;
+ }
+
+ final Set<View> views = CrossReferencerUtil.getCrossReferencingViewsInDiagram(role, getCurrentDiagram());
+ final Iterator<View> iterOnView = views.iterator();
+ while (secondView == null && iterOnView.hasNext()) {
+ final View currentView = iterOnView.next();
+ if (isCorrectGraphicalView(end, currentView)) {
+ domain2NotationMap.putView(endForView, selectedView);
+ domain2NotationMap.putView(end, currentView);
+ secondView = currentView;
+ }
+ }
+ }
+ return secondView != null;
+ }
+
+ /**
+ * Gets the show link command.
+ *
+ * @param domain
+ * the editing domain to use for this command
+ * @param linkToShow
+ * a link to show
+ * @param domain2NotationMap
+ * the domain2 notation map
+ * @param linkDescriptors
+ * the link descriptors
+ * @return the command to display the link on the diagram
+ */
+ @Override
+ protected ICommand getShowLinkCommand(final TransactionalEditingDomain domain, final EObject linkToShow, final Domain2Notation domain2NotationMap, final Collection<? extends UpdaterLinkDescriptor> linkDescriptors) {
+
+ if (!(linkToShow instanceof Connector)) {
+ return super.getShowLinkCommand(domain, linkToShow, domain2NotationMap, linkDescriptors);
+ }
+ domain2NotationMap.mapModel((View) getHost().getAdapter(View.class));
+
+ // we look for the link descriptor
+ UpdaterLinkDescriptor updaterLinkDescriptor = getLinkDescriptor(linkToShow, linkDescriptors);
+ ICommand showLinkCommandFromUpdaterLinkDescriptor = getShowLinkCommandFromUpdaterLinkDescriptor(linkToShow, domain2NotationMap, updaterLinkDescriptor);
+ return showLinkCommandFromUpdaterLinkDescriptor;
+ }
+
+
+ /**
+ * Gets the show link command from updater link descriptor.
+ *
+ * @param linkToShow
+ * the link to show
+ * @param domain2NotationMap
+ * the domain2 notation map
+ * @param descriptor
+ * the descriptor
+ * @return the show link command from updater link descriptor
+ */
+ private ICommand getShowLinkCommandFromUpdaterLinkDescriptor(final EObject linkToShow, final Domain2Notation domain2NotationMap, UpdaterLinkDescriptor descriptor) {
+ ConnectorUtils connectorUtils = new ConnectorUtils();
+
+ if (descriptor != null) {
+
+ Set<View> sourceViewList = domain2NotationMap.get(descriptor.getSource());
+ Set<View> targetViewList = domain2NotationMap.get(descriptor.getDestination());
+
+
+ final Set<View> linkSet = domain2NotationMap.get(linkToShow);
+
+ CompositeCommand compositeCommand = new CompositeCommand("Restore All Related Links");
+ for (View sourceView : sourceViewList) {
+ for (View targetView : targetViewList) {
+ if (canDisplayExistingLinkBetweenViews(linkToShow, sourceView, targetView)) {
+
+ if (ConnectorUtils.canDisplayExistingConnectorBetweenViewsAccordingToNestedPaths((Connector) linkToShow, sourceView, targetView)) {
+ boolean alreadyDisplayed = false;
+ if (linkSet != null) {
+ for (View viewLink : linkSet) {
+ boolean linkForViews = isLinkForViews((org.eclipse.gmf.runtime.notation.Connector) viewLink, sourceView, targetView);
+ alreadyDisplayed = alreadyDisplayed || linkForViews;
+ }
+ }
+
+ if (!alreadyDisplayed) {
+ EditPart sourceEditPart = getEditPartFromView(sourceView);
+ EditPart targetEditPart = getEditPartFromView(targetView);
+
+ // If the parts are still null...
+ if (sourceEditPart == null || targetEditPart == null) {
+ return null;
+ }
+ String semanticHint = getSemanticHint(linkToShow);
+ CreateConnectionViewRequest.ConnectionViewDescriptor viewDescriptor = new CreateConnectionViewRequest.ConnectionViewDescriptor(descriptor.getSemanticAdapter(), semanticHint, ViewUtil.APPEND, false,
+ ((GraphicalEditPart) getHost()).getDiagramPreferencesHint());
+ CreateConnectionViewRequest ccr = new CreateConnectionViewRequest(viewDescriptor);
+ ccr.setType(org.eclipse.gef.RequestConstants.REQ_CONNECTION_START);
+ ccr.setSourceEditPart(sourceEditPart);
+ sourceEditPart.getCommand(ccr);
+ ccr.setTargetEditPart(targetEditPart);
+ ccr.setType(org.eclipse.gef.RequestConstants.REQ_CONNECTION_END);
+ CommandProxy commandProxy = new CommandProxy(targetEditPart.getCommand(ccr));
+ compositeCommand.add(commandProxy);
+ }
+ }
+ }
+ }
+ }
+ return compositeCommand;
+ }
+ return null;
+ }
+
+
+
+
+
+ /**
+ * Can display existing link between views.
+ *
+ * @param connector
+ * the connector
+ * @param sourceView
+ * the source view
+ * @param targetView
+ * the target view
+ * @return true, if successful
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.AbstractShowHideRelatedLinkEditPolicy#canDisplayExistingLinkBetweenViews(org.eclipse.uml2.uml.Connector, org.eclipse.gmf.runtime.notation.View, org.eclipse.gmf.runtime.notation.View)
+ */
+
+ @Override
+ public boolean canDisplayExistingLinkBetweenViews(final EObject element, final View sourceView, final View targetView) {
+ return (element instanceof Connector) && ConnectorUtils.canDisplayExistingConnectorBetweenViewsAccordingToNestedPaths((Connector) element, sourceView, targetView);
+ }
+
+ /**
+ * Checks if is link for views.
+ *
+ * @param link
+ * a connector existing in the model
+ * @param sourceView
+ * a potential source for this connector
+ * @param targetView
+ * a potential target for this connector
+ * @return true, if is link for views <code>true</code> if displaying the existing connector between this source and this target view is correct
+ */
+ public final boolean isLinkForViews(final org.eclipse.gmf.runtime.notation.Connector link, final View sourceView, final View targetView) {
+ View source = link.getSource();
+ View target = link.getTarget();
+ boolean isDrawingAllowed = source.equals(sourceView) && target.equals(targetView);
+ boolean isReverseDrawingAllowed = source.equals(targetView) && target.equals(sourceView);
+ return isDrawingAllowed || isReverseDrawingAllowed;
+ }
+
+
+
+ /**
+ * Gets the top view with same semantic element.
+ *
+ * @param view
+ * a view
+ * @return the last parent of this view referencing the same semantic
+ * element
+ */
+ protected View getTopViewWithSameSemanticElement(final View view) {
+ final EObject semanticElement = view.getElement();
+ View parent = view;
+ View lastParent = view;
+ while (parent.getElement() == semanticElement) {
+ lastParent = parent;
+ parent = (View) parent.eContainer();
+ }
+ return lastParent;
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/edit/policy/StructureClassifierDropEditPolicy.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/edit/policy/StructureClassifierDropEditPolicy.java
new file mode 100755
index 0000000..5cc31f8
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/edit/policy/StructureClassifierDropEditPolicy.java
@@ -0,0 +1,132 @@
+/*****************************************************************************
+ * Copyright (c) 2011, 2016 CEA LIST, Esterel Technologies SAS and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Alain Le Guennec (Esterel Technologies SAS) - bug 497400
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.edit.policy;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.transaction.RunnableWithResult;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.commands.SelectAndExecuteCommand;
+import org.eclipse.papyrus.sysml.diagram.internalblock.utils.BlockDropHelper;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * <pre>
+ * Customization of the DND edit policy for the StructureClassifier compartments, that enables the direct
+ * creation of typed Part, Reference, Value, ActorPart or Property by dragging types in a Block structure compartment.
+ * </pre>
+ */
+public class StructureClassifierDropEditPolicy extends CustomDragDropEditPolicy {
+
+ /** Default constructor */
+ public StructureClassifierDropEditPolicy() {
+ super();
+ }
+
+ /**
+ * {@inheritedDoc}.
+ */
+ @Override
+ public Command getDropObjectsCommand(DropObjectsRequest dropRequest) {
+
+ BlockDropHelper helper = new BlockDropHelper(getEditingDomain());
+
+ // Single drop management possible drop action list can be proposed
+ if (dropRequest.getObjects().size() == 1) {
+
+ // List of available drop commands
+ final List<Command> commandChoice = new ArrayList<Command>();
+
+ // 1. Try to create a Part typed by the dropped object
+ Command dropAsTypedPart = helper.getDropAsStructureItem(dropRequest, (GraphicalEditPart) getHost(), SysMLElementTypes.PART_PROPERTY);
+ if ((dropAsTypedPart != null) && (dropAsTypedPart.canExecute())) {
+ commandChoice.add(dropAsTypedPart);
+ }
+
+ // 2. Try to create a Reference typed by the dropped object
+ Command dropAsTypedReference = helper.getDropAsStructureItem(dropRequest, (GraphicalEditPart) getHost(), SysMLElementTypes.REFERENCE_PROPERTY);
+ if ((dropAsTypedReference != null) && (dropAsTypedReference.canExecute())) {
+ commandChoice.add(dropAsTypedReference);
+ }
+
+ // 3. Try to create an ActorPart typed by the dropped object
+ Command dropAsTypedActorPart = helper.getDropAsStructureItem(dropRequest, (GraphicalEditPart) getHost(), SysMLElementTypes.ACTOR_PART_PROPERTY);
+ if ((dropAsTypedActorPart != null) && (dropAsTypedActorPart.canExecute())) {
+ commandChoice.add(dropAsTypedActorPart);
+ }
+
+ // 4. Try to create a Value typed by the dropped object
+ Command dropAsTypedValue = helper.getDropAsStructureItem(dropRequest, (GraphicalEditPart) getHost(), SysMLElementTypes.VALUE_PROPERTY);
+ if ((dropAsTypedValue != null) && (dropAsTypedValue.canExecute())) {
+ commandChoice.add(dropAsTypedValue);
+ }
+
+ // 5. Try to create a Property typed by the dropped object
+ Command dropAsTypedProperty = helper.getDropAsStructureItem(dropRequest, (GraphicalEditPart) getHost(), UMLElementTypes.PROPERTY);
+ if ((dropAsTypedProperty != null) && (dropAsTypedProperty.canExecute())) {
+ commandChoice.add(dropAsTypedProperty);
+ }
+
+ // 6. Build default drop command (show view of the dropped object)
+ Command defaultDropCommand = super.getDropObjectsCommand(dropRequest);
+ if ((defaultDropCommand != null) && (defaultDropCommand.canExecute())) {
+ defaultDropCommand.setLabel("Default drop (Show dropped object in diagram)");
+ commandChoice.add(defaultDropCommand);
+ }
+
+ // Prepare the selection command (if several command are available) or return the drop command
+ if (commandChoice.size() > 1) {
+ RunnableWithResult<ICommand> runnable;
+ Display.getDefault().syncExec(runnable = new RunnableWithResult.Impl<ICommand>() {
+
+ public void run() {
+ setResult(new SelectAndExecuteCommand("Select drop action for ", PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), commandChoice));
+ }
+ });
+
+ ICommand selectCommand = runnable.getResult();
+
+ return new ICommandProxy(selectCommand);
+
+ } else if (commandChoice.size() == 1) {
+ return commandChoice.get(0);
+ }
+
+ // else (command choice is empty)
+ return UnexecutableCommand.INSTANCE;
+
+ }
+
+ return super.getDropObjectsCommand(dropRequest);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected View getReferenceViewForConnectorEnd() {
+ return ViewUtil.getContainerView(super.getReferenceViewForConnectorEnd());
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/edit/policy/TypedElementDropEditPolicy.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/edit/policy/TypedElementDropEditPolicy.java
new file mode 100755
index 0000000..3bebb6a
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/edit/policy/TypedElementDropEditPolicy.java
@@ -0,0 +1,94 @@
+/*****************************************************************************
+ * Copyright (c) 2011, 2016 CEA LIST, Esterel Technologies SAS and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Alain Le Guennec (Esterel Technologies SAS) - bug 497400
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.edit.policy;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.transaction.RunnableWithResult;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.commands.SelectAndExecuteCommand;
+import org.eclipse.papyrus.sysml.diagram.internalblock.utils.TypeDropHelper;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * <pre>
+ * Customization of the DND edit policy for TypedElement (Port, Part, Reference, FlowPort), that enables
+ * type modification by a drop on target.
+ * </pre>
+ */
+public class TypedElementDropEditPolicy extends CustomDragDropEditPolicy {
+
+ /** Default constructor */
+ public TypedElementDropEditPolicy() {
+ super();
+ }
+
+ /**
+ * {@inheritedDoc}.
+ */
+ @Override
+ public Command getDropObjectsCommand(DropObjectsRequest dropRequest) {
+ TypeDropHelper helper = new TypeDropHelper(getEditingDomain());
+
+ // Single drop management possible drop action list can be proposed
+ if (dropRequest.getObjects().size() == 1) {
+
+ // List of available drop commands
+ final List<Command> commandChoice = new ArrayList<Command>();
+
+ // 1. Try to set the target element type with dropped object
+ Command dropAsSetType = helper.getDropAsTypedElementType(dropRequest, (GraphicalEditPart) getHost());
+ if ((dropAsSetType != null) && (dropAsSetType.canExecute())) {
+ commandChoice.add(dropAsSetType);
+ }
+
+ // 3. Build default drop command (show view of the dropped object)
+ Command defaultDropCommand = super.getDropObjectsCommand(dropRequest);
+ if ((defaultDropCommand != null) && (defaultDropCommand.canExecute())) {
+ defaultDropCommand.setLabel("Default drop (Show dropped object in diagram)");
+ commandChoice.add(defaultDropCommand);
+ }
+
+ // Prepare the selection command (if several command are available) or return the drop command
+ if (commandChoice.size() > 1) {
+ RunnableWithResult<ICommand> runnable;
+ Display.getDefault().syncExec(runnable = new RunnableWithResult.Impl<ICommand>() {
+
+ public void run() {
+ setResult(new SelectAndExecuteCommand("Select drop action for ", PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), commandChoice));
+ }
+ });
+
+ ICommand selectCommand = runnable.getResult();
+
+ return new ICommandProxy(selectCommand);
+ } else if (commandChoice.size() == 1) {
+ return commandChoice.get(0);
+ }
+
+ // else (command choice is empty)
+ return UnexecutableCommand.INSTANCE;
+
+ }
+
+ return super.getDropObjectsCommand(dropRequest);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/handler/InternalBlockManageInterfacesHandler.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/handler/InternalBlockManageInterfacesHandler.java
new file mode 100755
index 0000000..d3a6bfd
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/handler/InternalBlockManageInterfacesHandler.java
@@ -0,0 +1,46 @@
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Gabriel Pascual (ALL4TEC) gabriel.pascual@all4tec.net - Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.diagram.internalblock.handler;
+
+import org.eclipse.gmf.runtime.common.ui.util.DisplayUtils;
+import org.eclipse.papyrus.sysml.diagram.internalblock.ui.InternalBlockInterfaceManagerDialog;
+import org.eclipse.papyrus.uml.diagram.common.actions.handlers.ManagePortInterfacesHandler;
+import org.eclipse.papyrus.uml.diagram.common.dialogs.IPortInterfaceManagerDialog;
+import org.eclipse.uml2.uml.Interface;
+import org.eclipse.uml2.uml.InterfaceRealization;
+import org.eclipse.uml2.uml.Port;
+import org.eclipse.uml2.uml.Usage;
+
+/**
+ * <pre>
+ * This handler provides the handler to manage the provided and required {@link Interface}
+ * of a {@link Port} without graphically creating {@link InterfaceRealization} and
+ * {@link Usage} relationships.
+ * </pre>
+ */
+public class InternalBlockManageInterfacesHandler extends ManagePortInterfacesHandler {
+
+
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.common.actions.handlers.ManagePortInterfacesHandler#getInterfaceManagerDialog(org.eclipse.uml2.uml.Port)
+ *
+ * @param port
+ * @return
+ */
+ @Override
+ public IPortInterfaceManagerDialog getInterfaceManagerDialog(Port port) {
+ return new InternalBlockInterfaceManagerDialog(DisplayUtils.getDefaultShell(), port);
+
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/handler/ShowHideRelatedContentsAction.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/handler/ShowHideRelatedContentsAction.java
new file mode 100755
index 0000000..8608fd1
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/handler/ShowHideRelatedContentsAction.java
@@ -0,0 +1,91 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.handler;
+
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.internalblock.messages.Messages;
+import org.eclipse.papyrus.uml.diagram.common.actions.ShowHideContentsAction;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideRelatedContentsEditPolicy;
+import org.eclipse.uml2.uml.Classifier;
+import org.eclipse.uml2.uml.Property;
+
+public class ShowHideRelatedContentsAction extends ShowHideContentsAction {
+
+ /** Constructor. */
+ public ShowHideRelatedContentsAction() {
+ super(Messages.ShowHideRelatedContentsAction_Title, Messages.ShowHideRelatedContentsAction_Message, ShowHideRelatedContentsEditPolicy.SHOW_HIDE_RELATED_CONTENTS_POLICY);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.diagram.common.actions.AbstractShowHideAction#initAction()
+ */
+ @Override
+ protected void initAction() {
+ super.initAction();
+
+ for (IGraphicalEditPart current : this.selectedElements) {
+ // the selected elements which aren't Classifier are ignored
+ if (((View) current.getModel()).getElement() instanceof Property) {
+ Property property = (Property) ((View) current.getModel()).getElement();
+ if (property.getType() instanceof Classifier) {
+ this.representations.add(new RootEditPartRepresentation(current, (Classifier) property.getType()));
+ }
+ }
+ }
+ // setEditorLabelProvider(new EditorLabelProvider());
+ // this.representations = new ArrayList<AbstractShowHideAction.EditPartRepresentation>();
+ //
+ // for(EditPart current : this.selectedElements) {
+ // //the selected elements which aren't Classifier are ignored
+ // EObject element = ((View)current.getModel()).getElement();
+ // if(element instanceof Property) {
+ // Type type = ((Property)element).getType();
+ // if(type instanceof Classifier) {
+ // this.representations.add(new CustomEditPartRepresentation(current, (Classifier)type));
+ // }
+ // }
+ // }
+ // this.setEditorLabelProvider(new CustomEditorLabelProvider());
+ // this.setContentProvider(new CustomContentProvider());
+
+ }
+
+ // protected class CustomContentProvider extends ShowHideContentsAction.ContentProvider {
+ //
+ // /**
+ // * @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)
+ // *
+ // * @param element
+ // * @return
+ // */
+ // @Override
+ // public Object getParent(Object element) {
+ // if(!(element instanceof EditPartRepresentation)) {
+ // EditPartRepresentation rep = findEditPartRepresentation(element);
+ // if(rep != null) {
+ // //element can be owned by the class (rep), or by a superclass (ClassifierRepresentation)
+ // List<ClassifierRepresentation> classes = ((CustomEditPartRepresentation)rep).getSuperClasses();
+ // for(ClassifierRepresentation classifierRepresentation : classes) {
+ // if(classifierRepresentation.getRepresentedClassifier().getOwnedMembers().contains(element)) {
+ // return classifierRepresentation;
+ // }
+ // }
+ // }
+ // return rep;
+ // }
+ // return null;
+ // }
+ // }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/handler/ShowHideRelatedContentsHandler.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/handler/ShowHideRelatedContentsHandler.java
new file mode 100755
index 0000000..c4fbc55
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/handler/ShowHideRelatedContentsHandler.java
@@ -0,0 +1,28 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.handler;
+
+import org.eclipse.papyrus.uml.diagram.common.actions.handlers.AbstractShowHideHandler;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideRelatedContentsEditPolicy;
+
+/**
+ * Handler for the {@link ShowHideRelatedContentsAction}
+ */
+public class ShowHideRelatedContentsHandler extends AbstractShowHideHandler {
+
+ /** Constructor. */
+ public ShowHideRelatedContentsHandler() {
+ super(new ShowHideRelatedContentsAction(), ShowHideRelatedContentsEditPolicy.SHOW_HIDE_RELATED_CONTENTS_POLICY);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/helper/advice/DeleteViewDuringMoveHelperAdvice.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/helper/advice/DeleteViewDuringMoveHelperAdvice.java
new file mode 100755
index 0000000..3963b3f
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/helper/advice/DeleteViewDuringMoveHelperAdvice.java
@@ -0,0 +1,100 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.helper.advice;
+
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.emf.type.core.ISpecializationType;
+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.MoveRequest;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.internalblock.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.util.CrossReferencerUtil;
+import org.eclipse.uml2.uml.Property;
+
+/**
+ * <pre>
+ * Edit helper advice that delete views from diagram when an element is
+ * moved in a new container (in the model explorer).
+ *
+ * Block is an exception as the IBD is attached to the Block itself, removing it
+ * would result in an unusable IBD.
+ * </pre>
+ */
+public class DeleteViewDuringMoveHelperAdvice extends AbstractEditHelperAdvice {
+
+ @Override
+ protected ICommand getBeforeMoveCommand(MoveRequest request) {
+
+ ICommand moveCommand = super.getBeforeMoveCommand(request);
+
+ Set<View> viewsToDestroy = new HashSet<View>();
+
+ @SuppressWarnings("unchecked")
+ Iterator<EObject> it = request.getElementsToMove().keySet().iterator();
+ while (it.hasNext()) {
+ EObject eObject = it.next();
+
+ // If current eObject is a Block do nothing.
+ if (!((eObject instanceof Property && ((ISpecializationType) SysMLElementTypes.BLOCK).getMatcher().matches(((Property) eObject).getType())))) {
+ viewsToDestroy.addAll(getViewsToDestroy(eObject));
+ }
+ }
+
+ if (!viewsToDestroy.isEmpty()) {
+ DestroyDependentsRequest ddr = new DestroyDependentsRequest(request.getEditingDomain(), request.getTargetContainer(), false);
+ ddr.setClientContext(request.getClientContext());
+ ddr.addParameters(request.getParameters());
+ ICommand destroyViewsCommand = ddr.getDestroyDependentsCommand(viewsToDestroy);
+ moveCommand = CompositeCommand.compose(moveCommand, destroyViewsCommand);
+ }
+
+ return moveCommand;
+ }
+
+ /**
+ * This methods looks for inconsistent views to delete in case a semantic move done in the model explorer.
+ *
+ * @param movedObject
+ * the moved {@link EObject}
+ * @return the list of {@link View} to delete
+ */
+ protected Set<View> getViewsToDestroy(EObject movedObject) {
+ Set<View> viewsToDestroy = new HashSet<View>();
+
+ Iterator<View> viewIt = CrossReferencerUtil.getCrossReferencingViews(movedObject, ElementTypes.DIAGRAM_ID).iterator();
+ while (viewIt.hasNext()) {
+ View view = viewIt.next();
+
+ String containerType = ViewUtil.getViewContainer(view) != null ? ViewUtil.getViewContainer(view).getType() : null;
+
+ // Views are to be destroyed if they are not the diagram itself (containerType == null)
+ // and not a view directly owned by the diagram (the current policy in Papyrus allows
+ // to drop nearly anything in the diagram whatever the semantic container).
+ if ((containerType != null) && !ElementTypes.DIAGRAM_ID.equals(containerType)) {
+ viewsToDestroy.add(view);
+ }
+ }
+
+ return viewsToDestroy;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/helper/advice/PropertyHelperAdvice.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/helper/advice/PropertyHelperAdvice.java
new file mode 100755
index 0000000..0b52629
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/helper/advice/PropertyHelperAdvice.java
@@ -0,0 +1,134 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.helper.advice;
+
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+
+import org.eclipse.emf.common.util.BasicEList;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+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.SetRequest;
+import org.eclipse.gmf.runtime.notation.DecorationNode;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.internalblock.provider.ElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.util.CrossReferencerUtil;
+import org.eclipse.uml2.uml.Classifier;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Type;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ *
+ * This advice is used to remove the view of the parts which become inconsistent when we change the type of the property
+ *
+ */
+public class PropertyHelperAdvice extends AbstractEditHelperAdvice {
+
+ /**
+ * Returns the command to destroy the views of the parts which are not owned by the new type
+ *
+ * @see org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice#getBeforeSetCommand(org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest)
+ *
+ * @param request
+ * the request to modify the model
+ * @return
+ * the command to destroy the views of the parts which are not owned by the new type
+ *
+ */
+ @Override
+ protected ICommand getBeforeSetCommand(SetRequest request) {
+ Type oldType = null;
+ Type newType = null;
+
+ EObject elementToEdit = request.getElementToEdit();
+ Set<View> viewsToDelete = new HashSet<View>();
+ if ((elementToEdit instanceof Property) && (request.getFeature() == UMLPackage.eINSTANCE.getTypedElement_Type()) && ((request.getValue() == null) || (request.getValue() instanceof Type))) {
+
+ Property propertyToEdit = (Property) elementToEdit;
+
+ oldType = propertyToEdit.getType();
+ newType = (Type) request.getValue();
+
+ if ((oldType != null) && (oldType instanceof Classifier) && ((request.getValue() == null) || (newType instanceof Classifier))) {
+
+ EList<NamedElement> newTypeMembers = (newType != null) ? ((Classifier) newType).getMembers() : new BasicEList<NamedElement>();
+ EList<NamedElement> oldTypeMembers = ((Classifier) oldType).getMembers();
+
+ // Remove members of the new type from the list.
+ // oldTypeMembers now contains the list of members for which views will become
+ // inconsistent (if shown in the propertyToEdit) after setting the new type.
+ Set<NamedElement> possiblyInconsistentMembers = new HashSet<NamedElement>();
+ possiblyInconsistentMembers.addAll(oldTypeMembers);
+ possiblyInconsistentMembers.removeAll(newTypeMembers);
+
+ if (!possiblyInconsistentMembers.isEmpty()) {
+
+ Set<View> propertyToEditViews = null;
+
+ // Parse the list of possibly inconsistent members
+ for (NamedElement possiblyInconsistentMember : possiblyInconsistentMembers) {
+
+ // Retrieve views of the current possiblyInconsistentMember
+ Iterator<View> viewIt = CrossReferencerUtil.getCrossReferencingViews(possiblyInconsistentMember, ElementTypes.DIAGRAM_ID).iterator();
+ while (viewIt.hasNext()) {
+ if (propertyToEditViews == null) {
+ propertyToEditViews = CrossReferencerUtil.getCrossReferencingViews(propertyToEdit, ElementTypes.DIAGRAM_ID);
+ }
+
+ View possiblyInconsistentMemberView = viewIt.next();
+ if (isConcerned(possiblyInconsistentMemberView, propertyToEditViews)) {
+ viewsToDelete.add(possiblyInconsistentMemberView);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ if ((viewsToDelete != null) && !(viewsToDelete.isEmpty())) {
+ DestroyDependentsRequest req = new DestroyDependentsRequest(request.getEditingDomain(), elementToEdit, false);
+ req.setClientContext(request.getClientContext());
+ req.addParameters(request.getParameters());
+ return req.getDestroyDependentsCommand(viewsToDelete);
+ }
+
+ return null;
+ }
+
+ /**
+ * Tests if the view must be deleted
+ *
+ * @param view
+ * the view to test
+ * @param list
+ * the list of the property view
+ * @return
+ * <code>true</code> if the view need to be removed <code>false</code> if not
+ */
+ protected boolean isConcerned(View view, Set<View> propertyViews) {
+
+ EObject parentView = view.eContainer();
+ if (parentView instanceof DecorationNode) {
+ parentView = parentView.eContainer();
+ }
+ return propertyViews.contains(parentView);
+
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/messages/Messages.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/messages/Messages.java
new file mode 100755
index 0000000..d0d0e61
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/messages/Messages.java
@@ -0,0 +1,34 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.messages;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+
+ public static String Notification_Drop_Title;
+
+ public static String Notification_Drop_UMLAssociationWarning;
+
+ public static String ShowHideRelatedContentsAction_Title;
+
+ public static String ShowHideRelatedContentsAction_Message;
+
+ static {
+ NLS.initializeMessages("messages", Messages.class); //$NON-NLS-1$
+ }
+
+ private Messages() {
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/migration/InternalBlockDiagramReconcilerUndefinedTo100.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/migration/InternalBlockDiagramReconcilerUndefinedTo100.java
new file mode 100755
index 0000000..9b0dd4d
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/migration/InternalBlockDiagramReconcilerUndefinedTo100.java
@@ -0,0 +1,238 @@
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Benoit Maggi (CEA LIST) benoit.maggi@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.migration;
+
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.CompoundCommand;
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.util.TransactionUtil;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand;
+import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
+import org.eclipse.gmf.runtime.diagram.core.services.ViewService;
+import org.eclipse.gmf.runtime.emf.type.core.ISpecializationType;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.emf.gmf.command.EMFtoGMFCommandWrapper;
+import org.eclipse.papyrus.infra.gmfdiag.common.reconciler.DiagramReconciler;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.Activator;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.ViewServiceUtil;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+
+/**
+ * Internal Block Diagram Reconciler from undefined to 1.0.0
+ */
+public class InternalBlockDiagramReconcilerUndefinedTo100 extends DiagramReconciler {
+
+ @Override
+ public ICommand getReconcileCommand(Diagram diagram) {
+ try {
+
+ CompoundCommand cc = new CompoundCommand("Update Internal Block Diagram From Undefined To 1.0.0");
+
+ Command updateCommandFromUndefinedTo_081 = getUpdateCommandFromUndefinedTo_081(diagram);
+ Command updateCommandFrom081To_091 = getUpdateCommandFrom081To_091(diagram);
+ cc.append(updateCommandFromUndefinedTo_081);
+ cc.append(updateCommandFrom081To_091);
+
+ return EMFtoGMFCommandWrapper.wrap(cc);
+ } catch (Exception e) {
+ Activator.log.error(e);
+ return UnexecutableCommand.INSTANCE;
+ }
+ }
+
+
+ public static Command getUpdateCommandFromUndefinedTo_081(final Diagram diagram) throws Exception {
+
+ Command command = new RecordingCommand(TransactionUtil.getEditingDomain(diagram), "Diagram version updater (from undefined to 0.8.1)") {
+
+ private Map<String, String> conversionMapping = new HashMap<String, String>();
+
+ private void initializeMappings() {
+
+ conversionMapping.put(OldElementTypes.CLASS_HINT, SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ conversionMapping.put(OldElementTypes.CLASS_LABEL_COMPOSITE_NAME_HINT, SysMLGraphicalTypes.LABEL_SYSML_BLOCK_NAME_ID);
+ conversionMapping.put(OldElementTypes.CLASS_COMPARTMENT_STRUCTURE_HINT, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+
+ conversionMapping.put(OldElementTypes.PROPERTY_CN_HINT, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID);
+ conversionMapping.put(OldElementTypes.PROPERTY_CN_LABEL_PART_NAME_HINT, UMLGraphicalTypes.LABEL_UML_PROPERTY_LABEL_ID);
+ conversionMapping.put(OldElementTypes.PROPERTY_CN_COMPARTMENT_STRUCTURE_HINT, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+
+ conversionMapping.put(OldElementTypes.PORT_CN_LABEL_APPLIED_STEREOTYPE_HINT, UMLGraphicalTypes.AFFIXEDLABEL_UML_APPLIEDSTEREOTYPE_ID);
+
+ conversionMapping.put(OldElementTypes.CONNECTOR_HINT, UMLGraphicalTypes.LINK_UML_CONNECTOR_ID);
+ conversionMapping.put(OldElementTypes.CONNECTOR_LABEL_APPLIED_STEREOTYPE_HINT, UMLGraphicalTypes.LINKLABEL_UML_APPLIEDSTEREOTYPE_ID);
+ conversionMapping.put(OldElementTypes.CONNECTOR_LABEL_NAME_HINT, UMLGraphicalTypes.LINKLABEL_UML_CONNECTOR_LABEL_ID);
+ conversionMapping.put(OldElementTypes.CONNECTOR_LABEL_MULTIPLICITY_SOURCE_HINT, UMLGraphicalTypes.LINKLABEL_UML_CONNECTOR_SOURCE_MULTIPLICITY_ID);
+ conversionMapping.put(OldElementTypes.CONNECTOR_LABEL_MULTIPLICITY_TARGET_HINT, UMLGraphicalTypes.LINKLABEL_UML_CONNECTOR_TARGET_MULTIPLICITY_ID);
+
+ }
+
+ @Override
+ protected void doExecute() {
+ initializeMappings();
+
+ List<View> blockViews = new ArrayList<View>();
+ List<View> portViews = new ArrayList<View>();
+
+ // Update diagram compatibility version
+ // DiagramVersioningUtils.setCompatibilityVersion(diagram, "0.8.1");
+
+ // Update view types
+ Iterator<EObject> it = diagram.eAllContents();
+ while (it.hasNext()) {
+ EObject currentEObject = it.next();
+ if (currentEObject instanceof View) {
+ View currentView = (View) currentEObject;
+
+ if (conversionMapping.containsKey(currentView.getType())) {
+ if (currentView.getType().equals(OldElementTypes.CLASS_HINT)) {
+ blockViews.add(currentView);
+ }
+
+ currentView.setType(conversionMapping.get(currentView.getType()));
+ }
+
+ // Port require specific conversion
+ if (currentView.getType().equals(OldElementTypes.PORT_CN_HINT) || currentView.getType().equals(OldElementTypes.PORT_CN_LABEL_NAME_HINT)) {
+ portViews.add(currentView);
+ }
+ }
+ }
+
+ // Specific conversion cases
+ for (View portView : portViews) {
+ EObject eObject = portView.getElement();
+
+ if (((ISpecializationType) SysMLElementTypes.FLOW_PORT).getMatcher().matches(eObject)) {
+
+ if (portView.getType().equals(OldElementTypes.PORT_CN_HINT)) {
+ portView.setType(SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID);
+ }
+
+ if (portView.getType().equals(OldElementTypes.PORT_CN_LABEL_NAME_HINT)) {
+ portView.setType(SysMLGraphicalTypes.AFFIXEDLABEL_SYSML_FLOWPORT_LABEL_ID);
+ }
+
+ } else { // if (eObject instanceof Port)
+
+ if (portView.getType().equals(OldElementTypes.PORT_CN_HINT)) {
+ portView.setType(UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID);
+ }
+
+ if (portView.getType().equals(OldElementTypes.PORT_CN_LABEL_NAME_HINT)) {
+ portView.setType(UMLGraphicalTypes.AFFIXEDLABEL_UML_PORT_LABEL_ID);
+ }
+ }
+ }
+
+ // Update settings
+ for (View blockView : blockViews) {
+ EAnnotation stereotypeAnnotation = blockView.getEAnnotation("Stereotype_Annotation");
+ blockView.getEAnnotations().remove(stereotypeAnnotation);
+ }
+ }
+
+ @Override
+ public boolean canUndo() {
+ return false;
+ }
+ };
+
+ return command;
+ }
+
+ public static Command getUpdateCommandFrom081To_091(final Diagram diagram) throws Exception {
+
+ Command command = new RecordingCommand(TransactionUtil.getEditingDomain(diagram), "Diagram version updater (from 0.8.1 to 0.9.1)") {
+
+ private Map<String, String> conversionMapping = new HashMap<String, String>();
+
+ private List<IStatus> results = new ArrayList<IStatus>();
+
+ private void initializeMappings() {
+
+ conversionMapping.put(OldElementTypes.SHAPE_SYSML_NESTEDBLOCKPROPERTY_AS_COMPOSITE_ID, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID);
+
+ }
+
+ @Override
+ protected void doExecute() {
+ initializeMappings();
+ ViewServiceUtil.forceLoad();
+ List<View> nestedPropertyViews = new ArrayList<View>();
+ List<View> failedPropertyUpdates = new ArrayList<View>();
+
+ // Update diagram compatibility version
+ // DiagramVersioningUtils.setCompatibilityVersion(diagram, "0.8.1");
+
+ // Update view types
+ Iterator<EObject> it = diagram.eAllContents();
+ while (it.hasNext()) {
+ EObject currentEObject = it.next();
+ if (currentEObject instanceof View) {
+ View currentView = (View) currentEObject;
+ String currentViewType = currentView.getType();
+ if (conversionMapping.containsKey(currentViewType)) {
+
+ // update nested properties
+ if (OldElementTypes.SHAPE_SYSML_NESTEDBLOCKPROPERTY_AS_COMPOSITE_ID.equals(currentViewType)) {
+ currentView.setType(conversionMapping.get(currentView.getType()));
+ nestedPropertyViews.add(currentView);
+ // need to create child structure compartment, enven not visible
+
+ Node compartment = ViewService.createNode(currentView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID, PreferencesHint.USE_DEFAULTS);
+ if (compartment == null) {
+ failedPropertyUpdates.add(currentView);
+ }
+ }
+ }
+ }
+ }
+
+ if (!failedPropertyUpdates.isEmpty()) {
+ org.eclipse.papyrus.sysml.diagram.internalblock.Activator.log.warn("Impossible to create a compartment for the properties: " + failedPropertyUpdates);
+ }
+
+ }
+
+ @Override
+ public boolean canUndo() {
+ return false;
+ }
+
+ @Override
+ public java.util.Collection<IStatus> getResult() {
+ return results;
+ };
+ };
+
+ return command;
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/migration/OldElementTypes.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/migration/OldElementTypes.java
new file mode 100755
index 0000000..5720996
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/migration/OldElementTypes.java
@@ -0,0 +1,60 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.migration;
+
+import org.eclipse.gmf.runtime.emf.type.core.AbstractElementTypeEnumerator;
+import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
+
+/**
+ * This class list element hints previously used by the Internal Block Diagram.
+ */
+public class OldElementTypes extends AbstractElementTypeEnumerator {
+
+ /** CompositeDiagram :: CLASS */
+ public static final String CLASS_HINT = "2073"; //$NON-NLS-1$
+
+ public static final String CLASS_COMPARTMENT_STRUCTURE_HINT = "7073"; //$NON-NLS-1$
+
+ public static final String CLASS_LABEL_COMPOSITE_NAME_HINT = "5156"; //$NON-NLS-1$
+
+ /** CompositeDiagram :: PORT_CN */
+ public static final String PORT_CN_HINT = "3069"; //$NON-NLS-1$
+
+ public static final String PORT_CN_LABEL_NAME_HINT = "5125"; //$NON-NLS-1$
+
+ public static final String PORT_CN_LABEL_APPLIED_STEREOTYPE_HINT = "6029"; //$NON-NLS-1$
+
+ /** CompositeDiagram :: PROPERTY_CN */
+ public static final String PROPERTY_CN_HINT = "3070"; //$NON-NLS-1$
+
+ public static final String PROPERTY_CN_COMPARTMENT_STRUCTURE_HINT = "7077"; //$NON-NLS-1$
+
+ public static final String PROPERTY_CN_LABEL_PART_NAME_HINT = "5126"; //$NON-NLS-1$
+
+ /** CompositeDiagram :: CONNECTOR */
+ public static final String CONNECTOR_HINT = "4013"; //$NON-NLS-1$
+
+ public static final String CONNECTOR_LABEL_APPLIED_STEREOTYPE_HINT = "6025"; //$NON-NLS-1$
+
+ public static final String CONNECTOR_LABEL_NAME_HINT = "6050"; //$NON-NLS-1$
+
+ public static final String CONNECTOR_LABEL_MULTIPLICITY_SOURCE_HINT = "6051"; //$NON-NLS-1$
+
+ public static final String CONNECTOR_LABEL_MULTIPLICITY_TARGET_HINT = "6052"; //$NON-NLS-1$
+
+
+ // 0.8.1 --> 0.9.1
+ public static final String SHAPE_SYSML_NESTEDBLOCKPROPERTY_AS_COMPOSITE_ID = "shape_sysml_nestedblockproperty_as_composite";//$NON-NLS-1$
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/part/SysMLDiagramUpdater.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/part/SysMLDiagramUpdater.java
new file mode 100755
index 0000000..4bf236b
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/part/SysMLDiagramUpdater.java
@@ -0,0 +1,522 @@
+/*****************************************************************************
+ * Copyright (c) 2011, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 410909
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.part;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.emf.core.util.CrossReferenceAdapter;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.updater.DiagramUpdater;
+import org.eclipse.papyrus.infra.gmfdiag.common.updater.UpdaterLinkDescriptor;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentAnnotatedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentEditPart;
+import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintConstrainedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintEditPart;
+import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintEditPartCN;
+import org.eclipse.papyrus.uml.diagram.composite.part.UMLLinkDescriptor;
+import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.Comment;
+import org.eclipse.uml2.uml.ConnectableElement;
+import org.eclipse.uml2.uml.Connector;
+import org.eclipse.uml2.uml.ConnectorEnd;
+import org.eclipse.uml2.uml.Constraint;
+import org.eclipse.uml2.uml.Dependency;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.UMLPackage;
+
+
+/**
+ *
+ * @author vl222926
+ * Adapted code from generated code for UML Diagram
+ * The name of the methods are not java compliant, but it is done to be consistent with the generated classes which use the id of the elements
+ */
+public class SysMLDiagramUpdater {
+
+ /**
+ * @generated
+ */
+ public static final DiagramUpdater TYPED_INSTANCE = new DiagramUpdater() {
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.updater.DiagramUpdater#getSemanticChildren(org.eclipse.gmf.runtime.notation.View)
+ *
+ * @param view
+ * @return
+ */
+ public List<UpdaterLinkDescriptor> getSemanticChildren(View view) {
+ return SysMLDiagramUpdater.getSemanticChildren(view);
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.updater.DiagramUpdater#getContainedLinks(org.eclipse.gmf.runtime.notation.View)
+ *
+ * @param view
+ * @return
+ */
+ public List<UpdaterLinkDescriptor> getContainedLinks(View view) {
+ return SysMLDiagramUpdater.getContainedLinks(view);
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.updater.DiagramUpdater#getIncomingLinks(org.eclipse.gmf.runtime.notation.View)
+ *
+ * @param view
+ * @return
+ */
+ public List<UpdaterLinkDescriptor> getIncomingLinks(View view) {
+ return SysMLDiagramUpdater.getIncomingLinks(view);
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.updater.DiagramUpdater#getOutgoingLinks(org.eclipse.gmf.runtime.notation.View)
+ *
+ * @param view
+ * @return
+ */
+ public List<UpdaterLinkDescriptor> getOutgoingLinks(View view) {
+ return SysMLDiagramUpdater.getOutgoingLinks(view);
+ }
+ };
+
+ public static List<UpdaterLinkDescriptor> getContainedLinks(final View view) {
+ throw new UnsupportedOperationException("Not yet implemented"); //$NON-NLS-1$
+ }
+
+ public static List<UpdaterLinkDescriptor> getSemanticChildren(final View view) {
+ throw new UnsupportedOperationException("Not yet implemented"); //$NON-NLS-1$
+ }
+
+ /**
+ *
+ * @param view
+ * a view
+ * @return
+ * the list of the incoming links for this view
+ */
+ public static List<UpdaterLinkDescriptor> getIncomingLinks(final View view) {
+ final String id = view.getType();// TODO : could be done by the SysMLVisualIdRegistry...
+ if (id.equals(UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID)) {
+ return getPort_shape_uml_port_as_affixed_IncominkLink(view);
+ }
+ if (id.equals(SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID)) {
+ return getFlowPort_shape_sysml_flowport_as_affixed_IncominkLink(view);
+ }
+ if (id.equals(SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID)) {
+ return getProperty_shape_sysml_blockproperty_as_composite_IncomingLink(view);
+ }
+ if (id.equals(SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID)) {
+ return getBlock_shape_sysml_block_as_composite_IncomingLink(view);
+ }
+ if (id.equals(UMLGraphicalTypes.LINK_UML_DEPENDENCY_ID)) {
+ return getDependency_link_uml_dependency_IncomingLink(view);
+ }
+ if (id.equals(UMLGraphicalTypes.LINK_UML_CONNECTOR_ID)) {
+ return getConnector_link_uml_connector_IncomingLink(view);
+ }
+ if (id.equals(CommentEditPart.VISUAL_ID)) {
+ return getComment_Shape_IncomingLinks(view);
+ }
+ if (id.equals(CommentEditPartCN.VISUAL_ID)) {
+ return getComment_Shape_CN_IncomingLinks(view);
+ }
+ if (id.equals(ConstraintEditPart.VISUAL_ID)) {
+ return getConstraint_Shape_IncomingLinks(view);
+ }
+ if (id.equals(ConstraintEditPartCN.VISUAL_ID)) {
+ return getConstraint_Shape_CN_IncomingLinks(view);
+ }
+ return Collections.emptyList();
+ }
+
+ /**
+ *
+ * @param view
+ * a view
+ * @return
+ * the list of the outgoing links for this view
+ */
+ public static List<UpdaterLinkDescriptor> getOutgoingLinks(final View view) {
+ final String id = view.getType();// TODO : could be done by the SysMLVisualIdRegistry...
+ if (id.equals(UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID)) {
+ return getPort_shape_uml_port_as_affixed_OutgoingLink(view);
+ }
+ if (id.equals(SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID)) {
+ return getFlowPort_shape_sysml_flowport_as_affixed_OutgoingLink(view);
+ }
+ if (id.equals(SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID)) {
+ return getProperty_shape_sysml_blockproperty_as_composite_OutgoingLink(view);
+ }
+ if (id.equals(SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID)) {
+ return getBlock_shape_sysml_block_as_composite_OutgoingLink(view);
+ }
+ if (id.equals(UMLGraphicalTypes.LINK_UML_DEPENDENCY_ID)) {
+ return getDependency_link_uml_dependency_OutgoingLink(view);
+ }
+ if (id.equals(UMLGraphicalTypes.LINK_UML_CONNECTOR_ID)) {
+ return getConnector_link_uml_connector_OutgoingLink(view);
+ }
+ if (id.equals(CommentEditPart.VISUAL_ID)) {
+ return getComment_Shape_OutgoingLinks(view);
+ }
+ if (id.equals(CommentEditPartCN.VISUAL_ID)) {
+ return getComment_Shape_CN_OutgoingLinks(view);
+ }
+ if (id.equals(ConstraintEditPart.VISUAL_ID)) {
+ return getConstraint_Shape_OutgoingLinks(view);
+ }
+ if (id.equals(ConstraintEditPartCN.VISUAL_ID)) {
+ return getConstraint_Shape_CN_OutgoingLinks(view);
+ }
+ return Collections.emptyList();
+ }
+
+ private static List<UpdaterLinkDescriptor> getConnector_link_uml_connector_IncomingLink(View view) {
+ Connector modelElement = (Connector) view.getElement();
+ CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
+ LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetsLinks_Dependency_link_uml_dependency(modelElement, crossReferencer));
+ return result;
+
+ }
+
+ private static List<UpdaterLinkDescriptor> getConnector_link_uml_connector_OutgoingLink(View view) {
+ Connector modelElement = (Connector) view.getElement();
+ LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_link_uml_dependency(modelElement));
+ return result;
+ }
+
+ private static List<UpdaterLinkDescriptor> getDependency_link_uml_dependency_IncomingLink(View view) {
+ Dependency modelElement = (Dependency) view.getElement();
+ CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
+ LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetsLinks_Dependency_link_uml_dependency(modelElement, crossReferencer));
+ return result;
+ }
+
+ private static List<UpdaterLinkDescriptor> getDependency_link_uml_dependency_OutgoingLink(View view) {
+ Dependency modelElement = (Dependency) view.getElement();
+ LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_link_uml_dependency(modelElement));
+ return result;
+ }
+
+
+ private static List<UpdaterLinkDescriptor> getComment_Shape_CN_IncomingLinks(View view) {
+ Comment modelElement = (Comment) view.getElement();
+ CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
+ LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
+ return result;
+ }
+
+ private static List<UpdaterLinkDescriptor> getComment_Shape_CN_OutgoingLinks(View view) {
+ Comment modelElement = (Comment) view.getElement();
+ LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ result.addAll(getOutgoingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(modelElement));
+ return result;
+ }
+
+ private static List<UpdaterLinkDescriptor> getComment_Shape_IncomingLinks(View view) {
+ Comment modelElement = (Comment) view.getElement();
+ CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
+ LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
+ return result;
+ }
+
+ private static List<UpdaterLinkDescriptor> getComment_Shape_OutgoingLinks(View view) {
+ Comment modelElement = (Comment) view.getElement();
+ LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ result.addAll(getOutgoingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(modelElement));
+ return result;
+ }
+
+ private static List<UpdaterLinkDescriptor> getConstraint_Shape_IncomingLinks(View view) {
+ Constraint modelElement = (Constraint) view.getElement();
+ CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
+ LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetsLinks_Dependency_link_uml_dependency(modelElement, crossReferencer));
+ return result;
+ }
+
+ private static List<UpdaterLinkDescriptor> getConstraint_Shape_OutgoingLinks(View view) {
+ Constraint modelElement = (Constraint) view.getElement();
+ LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_link_uml_dependency(modelElement));
+ return result;
+ }
+
+ private static List<UpdaterLinkDescriptor> getConstraint_Shape_CN_IncomingLinks(View view) {
+ Constraint modelElement = (Constraint) view.getElement();
+ CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
+ LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetsLinks_Dependency_link_uml_dependency(modelElement, crossReferencer));
+ return result;
+ }
+
+
+ private static List<UpdaterLinkDescriptor> getConstraint_Shape_CN_OutgoingLinks(View view) {
+ Constraint modelElement = (Constraint) view.getElement();
+ LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_link_uml_dependency(modelElement));
+ result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement));
+ return result;
+ }
+
+ private static List<UpdaterLinkDescriptor> getBlock_shape_sysml_block_as_composite_IncomingLink(final View view) {
+ final Class modelElement = (Class) view.getElement();
+ final CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
+ final LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ result.addAll(getIncomingTypeModelFacetsLinks_Dependency_link_uml_dependency(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
+ return result;
+ }
+
+ private static List<UpdaterLinkDescriptor> getBlock_shape_sysml_block_as_composite_OutgoingLink(final View view) {
+ final Class modelElement = (Class) view.getElement();
+ final LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_link_uml_dependency(modelElement));
+ return result;
+ }
+
+ /**
+ *
+ * @param view
+ * a view
+ * @return
+ * common method to get the incoming link for a property in the SysML IBD Diagram
+ */
+ private static List<UpdaterLinkDescriptor> getProperty_IncomingLink(final View view) {
+ final Property modelElement = (Property) view.getElement();
+ final CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
+ final LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetsLinks_Connector_link_uml_connector(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetsLinks_Dependency_link_uml_dependency(modelElement, crossReferencer));
+ return result;
+ }
+
+ /**
+ *
+ * @param view
+ * a view
+ * @return
+ * common method to get the outgoing link for a property in the SysML IBD Diagram
+ */
+ private static List<UpdaterLinkDescriptor> getProperty_OutgoingLink(final View view) {
+ final Property modelElement = (Property) view.getElement();
+ final CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
+ final LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetsLinks_Connector_link_uml_connector(modelElement, crossReferencer));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_link_uml_dependency(modelElement));
+ return result;
+ }
+
+ private static Collection<? extends UpdaterLinkDescriptor> getIncomingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(final Element target, final CrossReferenceAdapter crossReferencer) {
+ LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ Collection<EStructuralFeature.Setting> settings = crossReferencer.getInverseReferences(target);
+ for (EStructuralFeature.Setting setting : settings) {
+ if (setting.getEStructuralFeature() == UMLPackage.eINSTANCE.getComment_AnnotatedElement()) {
+ result.add(new UpdaterLinkDescriptor(setting.getEObject(), target, UMLElementTypes.Comment_AnnotatedElementEdge, CommentAnnotatedElementEditPart.VISUAL_ID));
+ }
+ }
+ return result;
+ }
+
+
+ private static Collection<UpdaterLinkDescriptor> getOutgoingFeatureModelFacetLinks_Comment_AnnotatedElementEdge(Comment source) {
+ LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ for (Iterator<?> destinations = source.getAnnotatedElements().iterator(); destinations.hasNext();) {
+ Element destination = (Element) destinations.next();
+ result.add(new UMLLinkDescriptor(source, destination, UMLElementTypes.Comment_AnnotatedElementEdge, CommentAnnotatedElementEditPart.VISUAL_ID));
+ }
+ return result;
+ }
+
+ private static Collection<UpdaterLinkDescriptor> getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(Element target, CrossReferenceAdapter crossReferencer) {
+ LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ Collection<EStructuralFeature.Setting> settings = crossReferencer.getInverseReferences(target);
+ for (EStructuralFeature.Setting setting : settings) {
+ if (setting.getEStructuralFeature() == UMLPackage.eINSTANCE.getConstraint_ConstrainedElement()) {
+ result.add(new UMLLinkDescriptor(setting.getEObject(), target, UMLElementTypes.Constraint_ConstrainedElementEdge, ConstraintConstrainedElementEditPart.VISUAL_ID));
+ }
+ }
+ return result;
+ }
+
+
+ private static Collection<UMLLinkDescriptor> getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElementEdge(Constraint source) {
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ for (Iterator<?> destinations = source.getConstrainedElements().iterator(); destinations.hasNext();) {
+ Element destination = (Element) destinations.next();
+ result.add(new UMLLinkDescriptor(source, destination, UMLElementTypes.Constraint_ConstrainedElementEdge, ConstraintConstrainedElementEditPart.VISUAL_ID));
+ }
+ return result;
+ }
+
+ private static List<UpdaterLinkDescriptor> getProperty_shape_sysml_blockproperty_as_composite_IncomingLink(final View view) {
+ return getProperty_IncomingLink(view);
+ }
+
+ private static List<UpdaterLinkDescriptor> getProperty_shape_sysml_blockproperty_as_composite_OutgoingLink(final View view) {
+ return getProperty_OutgoingLink(view);
+ }
+
+ private static List<UpdaterLinkDescriptor> getFlowPort_shape_sysml_flowport_as_affixed_IncominkLink(View view) {
+ return getProperty_IncomingLink(view);
+ }
+
+ private static List<UpdaterLinkDescriptor> getFlowPort_shape_sysml_flowport_as_affixed_OutgoingLink(View view) {
+ return getProperty_OutgoingLink(view);
+ }
+
+ private static List<UpdaterLinkDescriptor> getPort_shape_uml_port_as_affixed_IncominkLink(View view) {
+ return getProperty_IncomingLink(view);
+ }
+
+ private static List<UpdaterLinkDescriptor> getPort_shape_uml_port_as_affixed_OutgoingLink(View view) {
+ return getProperty_OutgoingLink(view);
+ }
+
+ private static Collection<? extends UpdaterLinkDescriptor> getIncomingTypeModelFacetsLinks_Connector_link_uml_connector(final ConnectableElement target, CrossReferenceAdapter crossReferencer) {
+ LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ Collection<EStructuralFeature.Setting> settings = crossReferencer.getInverseReferences(target);
+ for (EStructuralFeature.Setting setting : settings) {
+ if (setting.getEStructuralFeature() != UMLPackage.eINSTANCE.getConnectorEnd_Role() || false == setting.getEObject() instanceof ConnectorEnd) {
+ continue;
+ }
+ final ConnectorEnd connectorEnd = (ConnectorEnd) setting.getEObject();
+ if (!UMLGraphicalTypes.LINK_UML_CONNECTOR_ID.equals(SysMLVisualIDRegistry.getLinkWithClassVisualID(connectorEnd.eContainer()))) {
+ continue;
+ }
+ final Connector connector = (Connector) connectorEnd.eContainer();
+
+ // FIXME : verify the path
+ for (final ConnectorEnd current : connector.getEnds()) {
+ if (current == connectorEnd) {
+ continue;
+ }
+ final ConnectableElement src = current.getRole();
+ result.add(new UpdaterLinkDescriptor(src, target, connector, org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes.Connector_Edge, null));
+ }
+ }
+ return result;
+ }
+
+ private static Collection<? extends UpdaterLinkDescriptor> getOutgoingTypeModelFacetsLinks_Connector_link_uml_connector(final ConnectableElement source, CrossReferenceAdapter crossReferencer) {
+ // I don't know how to adapt the common case to connector, so this way works properly...
+ return getIncomingTypeModelFacetsLinks_Connector_link_uml_connector(source, crossReferencer);
+ }
+
+ private static Collection<? extends UpdaterLinkDescriptor> getIncomingTypeModelFacetsLinks_Dependency_link_uml_dependency(NamedElement target, CrossReferenceAdapter crossReferencer) {
+ LinkedList<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ Collection<EStructuralFeature.Setting> settings = crossReferencer.getInverseReferences(target);
+ for (EStructuralFeature.Setting setting : settings) {
+ if (setting.getEStructuralFeature() != UMLPackage.eINSTANCE.getDependency_Supplier() || false == setting.getEObject() instanceof Dependency) {
+ continue;
+ }
+ Dependency link = (Dependency) setting.getEObject();
+ if (!UMLGraphicalTypes.LINK_UML_DEPENDENCY_ID.equals(SysMLVisualIDRegistry.getLinkWithClassVisualID(link))) {
+ continue;
+ }
+
+ List<?> sources = link.getClients();
+ Object theSource = sources.size() >= 1 ? sources.get(0) : null;
+ if (false == theSource instanceof NamedElement) {
+ continue;
+ }
+ NamedElement src = (NamedElement) theSource;
+ result.add(new UpdaterLinkDescriptor(src, target, link, org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes.Dependency_Edge, null));
+ }
+ return result;
+ }
+
+ private static Collection<? extends UpdaterLinkDescriptor> getOutgoingTypeModelFacetLinks_Dependency_link_uml_dependency(NamedElement source) {
+ Package container = null;
+ // Find container element for the link.
+ // Climb up by containment hierarchy starting from the source
+ // and return the first element that is instance of the container class.
+ for (EObject element = source; element != null && container == null; element = element.eContainer()) {
+ if (element instanceof Package) {
+ container = (Package) element;
+ }
+ }
+ if (container == null) {
+ return Collections.emptyList();
+ }
+ Collection<UpdaterLinkDescriptor> result = new LinkedList<UpdaterLinkDescriptor>();
+ for (Iterator<?> links = container.getPackagedElements().iterator(); links.hasNext();) {
+ EObject linkObject = (EObject) links.next();
+ if (false == linkObject instanceof Dependency) {
+ continue;
+ }
+ Dependency link = (Dependency) linkObject;
+ if (!UMLGraphicalTypes.LINK_UML_DEPENDENCY_ID.equals(SysMLVisualIDRegistry.getLinkWithClassVisualID(link))) {
+ continue;
+ }
+ List<?> targets = link.getSuppliers();
+ Object theTarget = targets.size() == 1 ? targets.get(0) : null;
+ if (false == theTarget instanceof NamedElement) {
+ continue;
+ }
+ NamedElement dst = (NamedElement) theTarget;
+ List<?> sources = link.getClients();
+ Object theSource = sources.size() >= 1 ? sources.get(0) : null;
+ if (false == theSource instanceof NamedElement) {
+ continue;
+ }
+ NamedElement src = (NamedElement) theSource;
+ if (src != source) {
+ continue;
+ }
+ result.add(new UpdaterLinkDescriptor(src, dst, link, org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes.Dependency_Edge, null));
+ }
+ return result;
+ }
+
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/part/SysMLVisualIDRegistry.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/part/SysMLVisualIDRegistry.java
new file mode 100755
index 0000000..8276759
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/part/SysMLVisualIDRegistry.java
@@ -0,0 +1,141 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.part;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.structure.DiagramStructure;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ *
+ * @author vl222926
+ * Adapted code for the code generated for the UML Diagrams
+ */
+public class SysMLVisualIDRegistry {
+
+ private static final String UNKNOWN = "-1"; //$NON-NLS-1$
+
+ public static String getLinkWithClassVisualID(EObject domainElement) {
+ if (domainElement == null) {
+ return UNKNOWN;
+ }
+ if (UMLPackage.eINSTANCE.getConnector().isSuperTypeOf(domainElement.eClass())) {
+ return UMLGraphicalTypes.LINK_UML_CONNECTOR_ID;
+ }
+ // if(UMLPackage.eINSTANCE.getAssociationClass().isSuperTypeOf(domainElement.eClass())) {
+ // return AssociationClassLinkEditPart.VISUAL_ID;
+ // }
+ // if(UMLPackage.eINSTANCE.getAssociation().isSuperTypeOf(domainElement.eClass())) {
+ // return AssociationEditPart.VISUAL_ID;
+ // }
+ // if(UMLPackage.eINSTANCE.getAssociation().isSuperTypeOf(domainElement.eClass())) {
+ // return AssociationBranchEditPart.VISUAL_ID;
+ // }
+ // if(UMLPackage.eINSTANCE.getGeneralization().isSuperTypeOf(domainElement.eClass())) {
+ // return GeneralizationEditPart.VISUAL_ID;
+ // }
+ // if(UMLPackage.eINSTANCE.getInterfaceRealization().isSuperTypeOf(domainElement.eClass())) {
+ // return InterfaceRealizationEditPart.VISUAL_ID;
+ // }
+ // if(UMLPackage.eINSTANCE.getSubstitution().isSuperTypeOf(domainElement.eClass())) {
+ // return SubstitutionEditPart.VISUAL_ID;
+ // }
+ // if(UMLPackage.eINSTANCE.getRealization().isSuperTypeOf(domainElement.eClass())) {
+ // return RealizationEditPart.VISUAL_ID;
+ // }
+ // if(UMLPackage.eINSTANCE.getAbstraction().isSuperTypeOf(domainElement.eClass())) {
+ // return AbstractionEditPart.VISUAL_ID;
+ // }
+ // if(UMLPackage.eINSTANCE.getUsage().isSuperTypeOf(domainElement.eClass())) {
+ // return UsageEditPart.VISUAL_ID;
+ // }
+ if (UMLPackage.eINSTANCE.getDependency().isSuperTypeOf(domainElement.eClass())) {
+ return UMLGraphicalTypes.LINK_UML_DEPENDENCY_ID;
+ }
+ // if(UMLPackage.eINSTANCE.getDependency().isSuperTypeOf(domainElement.eClass())) {
+ // return DependencyBranchEditPart.VISUAL_ID;
+ // }
+ // if(UMLPackage.eINSTANCE.getElementImport().isSuperTypeOf(domainElement.eClass())) {
+ // return ElementImportEditPart.VISUAL_ID;
+ // }
+ // if(UMLPackage.eINSTANCE.getPackageImport().isSuperTypeOf(domainElement.eClass())) {
+ // return PackageImportEditPart.VISUAL_ID;
+ // }
+ // if(UMLPackage.eINSTANCE.getPackageMerge().isSuperTypeOf(domainElement.eClass())) {
+ // return PackageMergeEditPart.VISUAL_ID;
+ // }
+ // if(UMLPackage.eINSTANCE.getProfileApplication().isSuperTypeOf(domainElement.eClass())) {
+ // return ProfileApplicationEditPart.VISUAL_ID;
+ // }
+ // if(UMLPackage.eINSTANCE.getTemplateBinding().isSuperTypeOf(domainElement.eClass())) {
+ // return TemplateBindingEditPart.VISUAL_ID;
+ // }
+ // if(UMLPackage.eINSTANCE.getGeneralizationSet().isSuperTypeOf(domainElement.eClass())) {
+ // return GeneralizationSetEditPart.VISUAL_ID;
+ // }
+ // if(UMLPackage.eINSTANCE.getInstanceSpecification().isSuperTypeOf(domainElement.eClass())) {
+ // return InstanceSpecificationLinkEditPart.VISUAL_ID;
+ // }
+ // if(UMLPackage.eINSTANCE.getInformationFlow().isSuperTypeOf(domainElement.eClass())) {
+ // return InformationFlowEditPart.VISUAL_ID;
+ // }
+ return UNKNOWN;
+ }
+
+ // TODO : this class as not been tested...
+ public static final DiagramStructure TYPED_INSTANCE = new DiagramStructure() {
+
+ public String getVisualIDAsString(final View view) {
+ return view.getType();
+ }
+
+ @Override
+ public String getVisualID(View view) {// TODO : not useful with sysml, because we are using String!
+ final String type = view.getType();
+ return org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry.getVisualID(view);
+ }
+
+
+ @Override
+ public String getModelID(View view) {
+ return org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry.getModelID(view);
+ }
+
+
+ @Override
+ public String getNodeVisualID(View containerView, EObject domainElement) {
+ return org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry.getNodeVisualID(containerView, domainElement);
+ }
+
+
+ @Override
+ public boolean checkNodeVisualID(View containerView, EObject domainElement, String candidate) {
+ return org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry.checkNodeVisualID(containerView, domainElement, candidate);
+ }
+
+
+ @Override
+ public boolean isCompartmentVisualID(String visualID) {
+ return org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry.isCompartmentVisualID(visualID);
+ }
+
+
+ @Override
+ public boolean isSemanticLeafVisualID(String visualID) {
+ return org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry.isSemanticLeafVisualID(visualID);
+ }
+ };
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/preferences/BlockPropertyCompositePreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/preferences/BlockPropertyCompositePreferencePage.java
new file mode 100755
index 0000000..11ba36d
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/preferences/BlockPropertyCompositePreferencePage.java
@@ -0,0 +1,42 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.preferences;
+
+import org.eclipse.gmf.runtime.common.ui.preferences.AbstractPreferencePage;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.swt.widgets.Composite;
+
+public class BlockPropertyCompositePreferencePage extends AbstractPreferencePage {
+
+ /** Constructor */
+ public BlockPropertyCompositePreferencePage() {
+ super();
+ }
+
+ /** Default preferences initializer */
+ public static void initDefaults(IPreferenceStore store) {
+ CustomBlockPropertyCompositePreferencePage.initDefaults(store);
+ /* CustomNestedBlockPropertyCompositePreferencePage.initDefaults(store); */
+ }
+
+ @Override
+ protected void addFields(Composite parent) {
+
+ }
+
+ @Override
+ protected void initHelp() {
+
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/preferences/CustomBlockPropertyCompositePreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/preferences/CustomBlockPropertyCompositePreferencePage.java
new file mode 100755
index 0000000..4b0f5df
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/preferences/CustomBlockPropertyCompositePreferencePage.java
@@ -0,0 +1,104 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.preferences;
+
+import java.util.Collections;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.provider.ElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+
+/**
+ * Preference page for Part and References.
+ */
+public class CustomBlockPropertyCompositePreferencePage extends InternalBlockDiagramNodePreferencePage {
+
+ /** Constant key to access preferences */
+ public static String prefKey = ElementTypes.DIAGRAM_ID + "_" + SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID; //$NON-NLS-1$
+
+ public static String prefLabelKey = prefKey + "-" + UMLGraphicalTypes.LABEL_UML_PROPERTY_LABEL_ID; //$NON-NLS-1$
+
+ /** The compartments default visibility for preferences */
+ public static final Map<String, Boolean> compartmentDefaultVisibilityMap;
+
+ /** The compartment titles default visibility for preferences */
+ public static final Map<String, Boolean> compartmentTitleDefaultVisibilityMap;
+
+ /** Static attribute initialization */
+ static {
+ compartmentDefaultVisibilityMap = new LinkedHashMap<String, Boolean>();
+ compartmentDefaultVisibilityMap.put("structure", Boolean.TRUE); //$NON-NLS-1$
+
+ compartmentTitleDefaultVisibilityMap = new LinkedHashMap<String, Boolean>();
+ compartmentTitleDefaultVisibilityMap.put("structure", Boolean.TRUE); //$NON-NLS-1$
+
+ // Start of user code custom static initializations
+ compartmentTitleDefaultVisibilityMap.remove("structure"); //$NON-NLS-1$
+ compartmentTitleDefaultVisibilityMap.put("structure", Boolean.FALSE); //$NON-NLS-1$
+ // End of user code
+
+ Collections.unmodifiableMap(compartmentDefaultVisibilityMap);
+ Collections.unmodifiableMap(compartmentTitleDefaultVisibilityMap);
+ }
+
+ /** Constructor */
+ public CustomBlockPropertyCompositePreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_" + SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID); //$NON-NLS-1$
+ }
+
+ /** Default preferences initializer */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.WIDTH), 200);
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.HEIGHT), 100);
+ // End of user code
+
+ // Initialize default visibility for compartments in preference page.
+ for (String compartmentName : compartmentDefaultVisibilityMap.keySet()) {
+ String showCompartmentKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_VISIBILITY);
+ store.setDefault(showCompartmentKey, compartmentDefaultVisibilityMap.get(compartmentName));
+ }
+
+ // Initialize default title visibility for compartments in preference page.
+ for (String compartmentName : compartmentTitleDefaultVisibilityMap.keySet()) {
+ String showCompartmentTitleKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_NAME_VISIBILITY);
+ store.setDefault(showCompartmentTitleKey, compartmentTitleDefaultVisibilityMap.get(compartmentName));
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void initializeCompartmentNamesList() {
+ for (String name : compartmentDefaultVisibilityMap.keySet()) {
+ this.compartmentNamesList.add(name);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void initializeCompartmentTitlesList() {
+ for (String name : compartmentTitleDefaultVisibilityMap.keySet()) {
+ this.compartmentTitlesList.add(name);
+ }
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/preferences/CustomConnectorPreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/preferences/CustomConnectorPreferencePage.java
new file mode 100755
index 0000000..519f241
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/preferences/CustomConnectorPreferencePage.java
@@ -0,0 +1,40 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.sysml.diagram.internalblock.provider.ElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+
+/**
+ * {@link Connector} preference page.
+ */
+public class CustomConnectorPreferencePage extends InternalBlockDiagramLinkPreferencePage {
+
+ /** Constant key to access preferences */
+ public static String prefKey = ElementTypes.DIAGRAM_ID + "_" + UMLGraphicalTypes.LINK_UML_CONNECTOR_ID; //$NON-NLS-1$
+
+ /** Constructor */
+ public CustomConnectorPreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_" + UMLGraphicalTypes.LINK_UML_CONNECTOR_ID); //$NON-NLS-1$
+ }
+
+ /** Default preferences initializer */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ // End of user code
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/preferences/CustomNestedBlockPropertyCompositePreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/preferences/CustomNestedBlockPropertyCompositePreferencePage.java
new file mode 100755
index 0000000..9bd2356
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/preferences/CustomNestedBlockPropertyCompositePreferencePage.java
@@ -0,0 +1,47 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.provider.ElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+
+/**
+ * Preference page for Part and References.
+ */
+@Deprecated
+public class CustomNestedBlockPropertyCompositePreferencePage extends InternalBlockDiagramNodePreferencePage {
+
+ /** Constant key to access preferences */
+ public static String prefKey = ElementTypes.DIAGRAM_ID + "_" + SysMLGraphicalTypes.SHAPE_SYSML_NESTEDBLOCKPROPERTY_AS_COMPOSITE_ID; //$NON-NLS-1$
+
+ public static String prefLabelKey = prefKey + "-" + UMLGraphicalTypes.LABEL_UML_PROPERTY_LABEL_ID; //$NON-NLS-1$
+
+ /** Constructor */
+ public CustomNestedBlockPropertyCompositePreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_" + SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID); //$NON-NLS-1$
+ }
+
+ /** Default preferences initializer */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.WIDTH), 160);
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.HEIGHT), 80);
+ // End of user code
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/preferences/CustomPreferenceInitializer.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/preferences/CustomPreferenceInitializer.java
new file mode 100755
index 0000000..c0a4f7c
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/preferences/CustomPreferenceInitializer.java
@@ -0,0 +1,79 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.Activator;
+import org.eclipse.papyrus.sysml.diagram.internalblock.provider.ElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+
+/**
+ * Custom preferences initializer.
+ */
+public class CustomPreferenceInitializer extends InternalBlockDiagramPreferenceInitializer {
+
+ @Override
+ protected IPreferenceStore getPreferenceStore() {
+ return Activator.getInstance().getPreferenceStore();
+ }
+
+ @Override
+ public void initializeDefaultPreferences() {
+ super.initializeDefaultPreferences();
+
+ IPreferenceStore store = getPreferenceStore();
+
+ PortAsBorderItemPreferencePage.initDefaults(store);
+ FlowPortAsBorderItemPreferencePage.initDefaults(store);
+ BlockPropertyCompositePreferencePage.initDefaults(store);
+ CustomConnectorPreferencePage.initDefaults(store);
+
+ // Initialize default positions for labels.
+ initDefaultPosition(UMLGraphicalTypes.LINK_UML_DEPENDENCY_ID, UMLGraphicalTypes.LINKLABEL_UML_NAMEDELEMENT_NAME_ID, 0, -10);
+ initDefaultPosition(UMLGraphicalTypes.LINK_UML_DEPENDENCY_ID, UMLGraphicalTypes.LINKLABEL_UML_APPLIEDSTEREOTYPE_ID, 0, -30);
+
+ initDefaultPosition(UMLGraphicalTypes.LINK_UML_CONNECTOR_ID, UMLGraphicalTypes.LINKLABEL_UML_CONNECTOR_LABEL_ID, 0, -10);
+ initDefaultPosition(UMLGraphicalTypes.LINK_UML_CONNECTOR_ID, UMLGraphicalTypes.LINKLABEL_UML_APPLIEDSTEREOTYPE_ID, 0, -30);
+ initDefaultPosition(UMLGraphicalTypes.LINK_UML_CONNECTOR_ID, UMLGraphicalTypes.LINKLABEL_UML_CONNECTOR_SOURCE_MULTIPLICITY_ID, 0, 10);
+ initDefaultPosition(UMLGraphicalTypes.LINK_UML_CONNECTOR_ID, UMLGraphicalTypes.LINKLABEL_UML_CONNECTOR_TARGET_MULTIPLICITY_ID, 0, 10);
+
+ initDefaultPosition(UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID, UMLGraphicalTypes.AFFIXEDLABEL_UML_PORT_LABEL_ID, 30, 0);
+ initDefaultPosition(UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID, UMLGraphicalTypes.AFFIXEDLABEL_UML_APPLIEDSTEREOTYPE_ID, 30, -20);
+
+ initDefaultPosition(SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID, SysMLGraphicalTypes.AFFIXEDLABEL_SYSML_FLOWPORT_LABEL_ID, 30, 0);
+ initDefaultPosition(SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID, UMLGraphicalTypes.AFFIXEDLABEL_UML_APPLIEDSTEREOTYPE_ID, 30, -20);
+ }
+
+ /**
+ * Initialize default position of a link label in preferences.
+ *
+ * @param parentGraphicalType
+ * the graphical type of the view owning the label
+ * @param graphicalType
+ * the graphical type of the label
+ * @param x
+ * @param y
+ */
+ protected void initDefaultPosition(String parentGraphicalType, String graphicalType, int x, int y) {
+ IPreferenceStore store = getPreferenceStore();
+
+ String xKey = PreferencesConstantsHelper.getElementConstant(ElementTypes.DIAGRAM_ID + "_" + parentGraphicalType + "-" + graphicalType, PreferencesConstantsHelper.LOCATION_X);
+ String yKey = PreferencesConstantsHelper.getElementConstant(ElementTypes.DIAGRAM_ID + "_" + parentGraphicalType + "-" + graphicalType, PreferencesConstantsHelper.LOCATION_Y);
+
+ store.setDefault(xKey, x);
+ store.setDefault(yKey, y);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/preferences/FlowPortAsBorderItemPreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/preferences/FlowPortAsBorderItemPreferencePage.java
new file mode 100755
index 0000000..0446c67
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/preferences/FlowPortAsBorderItemPreferencePage.java
@@ -0,0 +1,42 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.provider.ElementTypes;
+
+/**
+ * FlowPort preference page.
+ */
+public class FlowPortAsBorderItemPreferencePage extends InternalBlockDiagramNodePreferencePage {
+
+ /** Constant key to access preferences */
+ public static String prefKey = ElementTypes.DIAGRAM_ID + "_" + SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID; //$NON-NLS-1$
+
+ public static String prefLabelKey = prefKey + "-" + SysMLGraphicalTypes.AFFIXEDLABEL_SYSML_FLOWPORT_LABEL_ID; //$NON-NLS-1$
+
+ /** Constructor */
+ public FlowPortAsBorderItemPreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_" + SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID); //$NON-NLS-1$
+ }
+
+ /** Default preferences initializer */
+ public static void initDefaults(IPreferenceStore store) {
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.WIDTH), 20);
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.HEIGHT), 20);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/preferences/PortAsBorderItemPreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/preferences/PortAsBorderItemPreferencePage.java
new file mode 100755
index 0000000..d3d446b
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/preferences/PortAsBorderItemPreferencePage.java
@@ -0,0 +1,44 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.sysml.diagram.internalblock.provider.ElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.eclipse.uml2.uml.Port;
+
+/**
+ * {@link Port} preference page.
+ */
+public class PortAsBorderItemPreferencePage extends InternalBlockDiagramNodePreferencePage {
+
+ /** Constant key to access preferences */
+ public static String prefKey = ElementTypes.DIAGRAM_ID + "_" + UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID; //$NON-NLS-1$
+
+ public static String prefLabelKey = prefKey + "-" + UMLGraphicalTypes.AFFIXEDLABEL_UML_PORT_LABEL_ID; //$NON-NLS-1$
+
+ /** Constructor */
+ public PortAsBorderItemPreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_" + UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID); //$NON-NLS-1$
+ }
+
+ /** Default preferences initializer */
+ public static void initDefaults(IPreferenceStore store) {
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.WIDTH), 20);
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.HEIGHT), 20);
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/provider/ActionStateSourceProvider.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/provider/ActionStateSourceProvider.java
new file mode 100755
index 0000000..9f1a183
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/provider/ActionStateSourceProvider.java
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.provider;
+
+import org.eclipse.papyrus.uml.diagram.common.providers.AbstractActionStateSourceProvider;
+import org.eclipse.papyrus.uml.diagram.composite.custom.actions.ShowHideRelatedContentsHandler;
+import org.eclipse.ui.ISources;
+
+/**
+ * This class provides the state of the actions. It's used to refresh
+ * the status of these actions in the menu. (in toolbar and popup, it's not needed)
+ *
+ * To get the status, we listen the selection service AND the part service!
+ * The part service is used to know if the selection is in the Model Explorer or not!
+ * When the selection is not in the model explorer, the handlers listening the variable need to be disabled
+ */
+public class ActionStateSourceProvider extends AbstractActionStateSourceProvider {
+
+ /**
+ * The name of the variable to check.
+ */
+ public static final String SHOW_HIDE_RELATED_CONTENTS = "showHideRelatedContents"; //$NON-NLS-1$
+
+ /**
+ *
+ * Constructor.
+ *
+ */
+ public ActionStateSourceProvider() {
+ super();
+ currentState.put(SHOW_HIDE_RELATED_CONTENTS, DISABLED);
+ }
+
+ /**
+ *
+ * @see org.eclipse.ui.ISourceProvider#getProvidedSourceNames()
+ *
+ * @return
+ */
+ @Override
+ public String[] getProvidedSourceNames() {
+ return new String[] { SHOW_HIDE_RELATED_CONTENTS };
+ }
+
+ /**
+ * Refresh the state of the Delete Action
+ */
+ protected void refreshShowHideRelatedContentsAction() {
+ String oldState = currentState.get(SHOW_HIDE_RELATED_CONTENTS);
+ String newState = (testShowHideRelatedContents() ? ENABLED : DISABLED);
+
+ if (oldState != newState) {
+ currentState.put(SHOW_HIDE_RELATED_CONTENTS, newState);
+ fireSourceChanged(ISources.WORKBENCH, currentState);
+ }
+ }
+
+ /**
+ * Tests if the action DeleteFromDiagram (now called Delete Selected Element can be executed
+ *
+ * @return
+ * <code>true</code> if the action DeleteFromDiagram (now called Delete Selected Element can be executed <code>false</code> if not
+ */
+ protected boolean testShowHideRelatedContents() {
+ ShowHideRelatedContentsHandler handler = new ShowHideRelatedContentsHandler();
+ return isSelectionInDiagram() && handler.isEnabled();
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.uml.diagram.common.providers.AbstractActionStateSourceProvider#refreshActions()
+ *
+ */
+ @Override
+ protected void refreshActions() {
+ refreshShowHideRelatedContentsAction();
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/provider/CustomEditPolicyProvider.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/provider/CustomEditPolicyProvider.java
new file mode 100755
index 0000000..48b0d5d
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/provider/CustomEditPolicyProvider.java
@@ -0,0 +1,173 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.provider;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gmf.runtime.common.core.service.IOperation;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ResizableCompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.services.editpolicy.CreateEditPoliciesOperation;
+import org.eclipse.papyrus.gmf.diagram.common.edit.policy.DefaultXYLayoutEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.BlockCompositeEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.BlockPropertyCompositeEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.BlockPropertyStructureCompartmentEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.FlowPortAffixedNodeEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.StructureCompartmentEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.edit.policy.CustomDuplicatePasteEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.internalblock.edit.part.InternalBlockDiagramEditPart;
+import org.eclipse.papyrus.sysml.diagram.internalblock.edit.policy.CustomBlockCompositeSemanticEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.internalblock.edit.policy.CustomBlockPropertyCompositeDropEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.internalblock.edit.policy.CustomBlockPropertyCompositeSemanticEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.internalblock.edit.policy.CustomBlockPropertyStructureCompartmentEditPartDropEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.internalblock.edit.policy.CustomDefaultSemanticEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.internalblock.edit.policy.CustomDiagramDropEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.internalblock.edit.policy.CustomDragDropEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.internalblock.edit.policy.EncapsulatedClassifierDropEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.internalblock.edit.policy.StructureClassifierDropEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.internalblock.edit.policy.TypedElementDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.AbstractElementBorderEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.AbstractElementEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.AbstractElementLinkEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.ConnectorEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.DependencyEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.PortAffixedNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentEditPart;
+import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintEditPart;
+import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintEditPartCN;
+
+/**
+ * Custom edit policy provider.
+ */
+public class CustomEditPolicyProvider extends InternalBlockDiagramEditPolicyProvider {
+
+ @Override
+ public boolean provides(IOperation operation) {
+
+ CreateEditPoliciesOperation epOperation = (CreateEditPoliciesOperation) operation;
+ if (!(epOperation.getEditPart() instanceof IGraphicalEditPart)) {
+ return false;
+ }
+
+ // Make sure this concern Internal Block Diagram only
+ IGraphicalEditPart gep = (IGraphicalEditPart) epOperation.getEditPart();
+ String diagramType = gep.getNotationView().getDiagram().getType();
+ if (!ElementTypes.DIAGRAM_ID.equals(diagramType)) {
+ return false;
+ }
+
+ // provides for the main diagram edit part
+ if (gep instanceof InternalBlockDiagramEditPart) {
+ return true;
+ }
+
+ // Provides for edit parts that represent nodes in Internal Block diagram
+ if (gep instanceof AbstractElementEditPart) {
+ return true;
+ }
+ if (gep instanceof AbstractElementBorderEditPart) {
+ return true;
+ }
+
+ // Provides for edit parts that represent edges in Internal Block diagram
+ if (gep instanceof AbstractElementLinkEditPart) {
+ return true;
+ }
+
+ if (gep instanceof ResizableCompartmentEditPart) {
+ return true;
+ }
+
+ return super.provides(operation);
+ }
+
+ @Override
+ public void createEditPolicies(EditPart editPart) {
+ super.createEditPolicies(editPart);
+
+ if (editPart instanceof InternalBlockDiagramEditPart) {
+ editPart.installEditPolicy(PasteEditPolicy.PASTE_ROLE, new CustomDuplicatePasteEditPolicy());
+ editPart.installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDropEditPolicy());
+ // no installation of other policies.
+ return;
+ }
+
+ editPart.installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDragDropEditPolicy());
+
+ if ((editPart instanceof ConstraintEditPart) || (editPart instanceof ConstraintEditPartCN)) {
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomDefaultSemanticEditPolicy());
+ editPart.installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
+ editPart.installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
+ }
+
+ if ((editPart instanceof CommentEditPart) || (editPart instanceof CommentEditPartCN)) {
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomDefaultSemanticEditPolicy());
+ editPart.installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
+ editPart.installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
+ }
+
+ if (editPart instanceof FlowPortAffixedNodeEditPart) {
+ editPart.installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new TypedElementDropEditPolicy());
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomDefaultSemanticEditPolicy());
+ }
+
+ if (editPart instanceof PortAffixedNodeEditPart) {
+ editPart.installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new TypedElementDropEditPolicy());
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomDefaultSemanticEditPolicy());
+ }
+
+ if (editPart instanceof BlockPropertyCompositeEditPart) {
+ editPart.installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomBlockPropertyCompositeDropEditPolicy());
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomBlockPropertyCompositeSemanticEditPolicy());
+ }
+
+ /*
+ * if(editPart instanceof NestedBlockPropertyCompositeEditPart) {
+ * editPart.installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomBlockPropertyCompositeDropEditPolicy());
+ * editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomNestedBlockPropertyCompositeSemanticEditPolicy());
+ * }
+ */
+
+ if (editPart instanceof BlockPropertyStructureCompartmentEditPart) {
+ editPart.installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomBlockPropertyStructureCompartmentEditPartDropEditPolicy());
+ editPart.installEditPolicy(EditPolicy.LAYOUT_ROLE, new DefaultXYLayoutEditPolicy());
+ }
+
+ if (editPart instanceof BlockCompositeEditPart) {
+ editPart.installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new EncapsulatedClassifierDropEditPolicy());
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomBlockCompositeSemanticEditPolicy());
+ }
+
+ if (editPart instanceof StructureCompartmentEditPart) {
+ editPart.installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new StructureClassifierDropEditPolicy());
+ editPart.installEditPolicy(EditPolicy.LAYOUT_ROLE, new DefaultXYLayoutEditPolicy());
+ }
+
+ if (editPart instanceof DependencyEditPart) {
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomDefaultSemanticEditPolicy());
+ }
+
+ if (editPart instanceof ConnectorEditPart) {
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomDefaultSemanticEditPolicy());
+ }
+
+
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/provider/InternalBlockVisualTypeProvider.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/provider/InternalBlockVisualTypeProvider.java
new file mode 100755
index 0000000..a4bbbbd
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/provider/InternalBlockVisualTypeProvider.java
@@ -0,0 +1,28 @@
+/*****************************************************************************
+ * Copyright (c) 2015 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.diagram.internalblock.provider;
+
+import org.eclipse.papyrus.gmf.diagram.common.provider.SysMLVisualTypeProvider;
+import org.eclipse.papyrus.uml.diagram.composite.providers.UMLVisualTypeProvider;
+
+/**
+ * Visual type provider for the SysML Internal Block Diagram.
+ */
+public class InternalBlockVisualTypeProvider extends SysMLVisualTypeProvider {
+
+ public InternalBlockVisualTypeProvider() {
+ super(new CustomGraphicalTypeRegistry(), new UMLVisualTypeProvider());
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/provider/ParserProvider.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/provider/ParserProvider.java
new file mode 100755
index 0000000..74c7de2
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/provider/ParserProvider.java
@@ -0,0 +1,107 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.provider;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.gmf.runtime.common.core.service.AbstractProvider;
+import org.eclipse.gmf.runtime.common.core.service.IOperation;
+import org.eclipse.gmf.runtime.common.ui.services.parser.GetParserOperation;
+import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
+import org.eclipse.gmf.runtime.common.ui.services.parser.IParserProvider;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.parser.FlowPortLabelParser;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.uml.diagram.common.parser.ConnectorLabelParser;
+import org.eclipse.papyrus.uml.diagram.common.parser.MultiplicityElementLabelParser;
+import org.eclipse.papyrus.uml.diagram.common.parser.NamedElementLabelParser;
+import org.eclipse.papyrus.uml.diagram.common.parser.PropertyLabelParser;
+import org.eclipse.papyrus.uml.diagram.common.parser.stereotype.AppliedStereotypeParser;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+
+/**
+ * Parser provider for labels used by this diagram.
+ */
+public class ParserProvider extends AbstractProvider implements IParserProvider {
+
+ /** map from graphical hint to parsers */
+ private static final Map<String, IParser> graphicalHintToParser = new HashMap<String, IParser>();
+
+ static {
+ graphicalHintToParser.put(SysMLGraphicalTypes.LABEL_SYSML_BLOCK_NAME_ID, new NamedElementLabelParser());
+ graphicalHintToParser.put(UMLGraphicalTypes.LABEL_UML_PROPERTY_LABEL_ID, new PropertyLabelParser());
+
+ graphicalHintToParser.put(UMLGraphicalTypes.AFFIXEDLABEL_UML_PORT_LABEL_ID, new PropertyLabelParser());
+ graphicalHintToParser.put(SysMLGraphicalTypes.AFFIXEDLABEL_SYSML_FLOWPORT_LABEL_ID, new FlowPortLabelParser());
+ graphicalHintToParser.put(UMLGraphicalTypes.AFFIXEDLABEL_UML_APPLIEDSTEREOTYPE_ID, new AppliedStereotypeParser());
+
+
+ graphicalHintToParser.put(UMLGraphicalTypes.LINKLABEL_UML_NAMEDELEMENT_NAME_ID, new NamedElementLabelParser());
+ graphicalHintToParser.put(UMLGraphicalTypes.LINKLABEL_UML_CONNECTOR_LABEL_ID, new ConnectorLabelParser());
+ graphicalHintToParser.put(UMLGraphicalTypes.LINKLABEL_UML_CONNECTOR_SOURCE_MULTIPLICITY_ID, new MultiplicityElementLabelParser());
+ graphicalHintToParser.put(UMLGraphicalTypes.LINKLABEL_UML_CONNECTOR_TARGET_MULTIPLICITY_ID, new MultiplicityElementLabelParser());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean provides(IOperation operation) {
+ if (operation instanceof GetParserOperation) {
+ IAdaptable hint = ((GetParserOperation) operation).getHint();
+
+ if (!ElementTypes.DIAGRAM_ID.equals(getDiagramType(hint))) {
+ return false;
+ }
+
+ return getParser(hint) != null;
+ }
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public IParser getParser(IAdaptable hint) {
+ String parserHint = hint.getAdapter(String.class);
+ if (parserHint != null) {
+ IParser parser = graphicalHintToParser.get(parserHint);
+ if (parser != null) {
+ return parser;
+ }
+ }
+
+ View view = hint.getAdapter(View.class);
+ if (view != null) {
+ IParser parser = graphicalHintToParser.get(view.getType());
+ if (parser != null) {
+ return parser;
+ }
+ }
+
+ return null;
+ }
+
+ private String getDiagramType(IAdaptable hint) {
+ Diagram diagram = hint.getAdapter(Diagram.class);
+ if (diagram != null) {
+ return diagram.getType();
+ }
+
+ return "undefined";
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/provider/ValidationDecoratorProvider.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/provider/ValidationDecoratorProvider.java
new file mode 100755
index 0000000..aec82b4
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/provider/ValidationDecoratorProvider.java
@@ -0,0 +1,62 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.provider;
+
+import org.eclipse.gef.EditDomain;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.editparts.AbstractConnectionEditPart;
+import org.eclipse.gmf.runtime.common.core.service.IOperation;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditDomain;
+import org.eclipse.gmf.runtime.diagram.ui.services.decorator.CreateDecoratorsOperation;
+import org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecoratorProvider;
+import org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecoratorTarget;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.common.part.UmlGmfDiagramEditor;
+
+public class ValidationDecoratorProvider extends org.eclipse.papyrus.uml.diagram.common.providers.ValidationDecoratorProvider implements IDecoratorProvider {
+
+ @Override
+ public void createDecorators(IDecoratorTarget decoratorTarget) {
+ EditPart editPart = (EditPart) decoratorTarget.getAdapter(EditPart.class);
+ if (editPart instanceof GraphicalEditPart || editPart instanceof AbstractConnectionEditPart) {
+ Object model = editPart.getModel();
+ if ((model instanceof View)) {
+ View view = (View) model;
+ if (!(view instanceof Edge) && !view.isSetElement()) {
+ return;
+ }
+ }
+ EditDomain ed = editPart.getViewer().getEditDomain();
+ if (!(ed instanceof DiagramEditDomain)) {
+ return;
+ }
+ if (((DiagramEditDomain) ed).getEditorPart() instanceof UmlGmfDiagramEditor) {
+ decoratorTarget.installDecorator(KEY, new StatusDecorator(decoratorTarget));
+ }
+ }
+ }
+
+ @Override
+ public boolean provides(IOperation operation) {
+ if (!(operation instanceof CreateDecoratorsOperation)) {
+ return false;
+ }
+ IDecoratorTarget decoratorTarget = ((CreateDecoratorsOperation) operation).getDecoratorTarget();
+ View view = (View) decoratorTarget.getAdapter(View.class);
+ return view != null && ElementTypes.DIAGRAM_ID.equals(view.getDiagram().getType());
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/provider/ValidationProvider.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/provider/ValidationProvider.java
new file mode 100755
index 0000000..9efbf83
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/provider/ValidationProvider.java
@@ -0,0 +1,62 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.provider;
+
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.internalblock.Activator;
+
+public class ValidationProvider {
+
+ private static boolean constraintsActive = false;
+
+ public static boolean shouldConstraintsBePrivate() {
+ return false;
+ }
+
+ public static void runWithConstraints(TransactionalEditingDomain editingDomain, Runnable operation) {
+ final Runnable op = operation;
+ Runnable task = new Runnable() {
+
+ public void run() {
+ try {
+ constraintsActive = true;
+ op.run();
+ } finally {
+ constraintsActive = false;
+ }
+ }
+ };
+ if (editingDomain != null) {
+ try {
+ editingDomain.runExclusive(task);
+ } catch (Exception e) {
+ Activator.log.error("Validation failed", e); //$NON-NLS-1$
+ }
+ } else {
+ task.run();
+ }
+ }
+
+ static boolean isInDefaultEditorContext(Object object) {
+ if (shouldConstraintsBePrivate() && !constraintsActive) {
+ return false;
+ }
+ if (object instanceof View) {
+ return constraintsActive && ElementTypes.DIAGRAM_ID.equals(((View) object).getDiagram().getType());
+ }
+ return true;
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/ui/InternalBlockInterfaceManagerDialog.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/ui/InternalBlockInterfaceManagerDialog.java
new file mode 100755
index 0000000..ca7ea88
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/ui/InternalBlockInterfaceManagerDialog.java
@@ -0,0 +1,77 @@
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Gabriel Pascual (ALL4TEC) gabriel.pascual@all4tec.net - Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.diagram.internalblock.ui;
+
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.papyrus.sysml.portandflows.FlowSpecification;
+import org.eclipse.papyrus.uml.diagram.common.dialogs.InterfaceManagerDialog;
+import org.eclipse.papyrus.uml.diagram.common.util.Visitor;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Interface;
+import org.eclipse.uml2.uml.Namespace;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.Port;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+/**
+ * <pre>
+ * This class provides a Dialog to manage easily the provided and
+ * the required Interfaces for a {@link Port}.
+ * </pre>
+ */
+public class InternalBlockInterfaceManagerDialog extends InterfaceManagerDialog {
+
+
+ /**
+ * Constructor.
+ *
+ * @param parentShell
+ * @param port
+ */
+ public InternalBlockInterfaceManagerDialog(Shell parentShell, Port port) {
+ super(parentShell, port);
+ }
+
+ /**
+ * Returns all the available Interfaces (except {@link FlowSpecification})
+ *
+ * @return
+ * all the available Interfaces
+ * //TODO add the interfaces from the package import!
+ */
+ @Override
+ protected List<Interface> getAllAvailableInterfaces(Package pack) {
+ Set<Interface> otherInterfaces = new HashSet<Interface>();
+ List<Element> interfaces = Visitor.getOwnedAndImportedElement(pack, Interface.class);
+ for (Namespace namespace : Visitor.getOwnedAndImportedNamespaces(pack)) {
+ interfaces.addAll(Visitor.getOwnedAndImportedElement(namespace, Interface.class));
+
+ }
+
+ for (Element element : interfaces) {
+ // Test if the interface is a FlowSpecification
+ FlowSpecification flowSpec = UMLUtil.getStereotypeApplication(element, FlowSpecification.class);
+ if (flowSpec == null) {
+ otherInterfaces.add((Interface) element);
+ }
+ }
+
+ return Arrays.asList(otherInterfaces.toArray(new Interface[otherInterfaces.size()]));
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/utils/BlockDropHelper.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/utils/BlockDropHelper.java
new file mode 100755
index 0000000..c093960
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/utils/BlockDropHelper.java
@@ -0,0 +1,229 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.utils;
+
+import java.util.Collections;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.CompoundCommand;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.core.edithelpers.CreateElementRequestAdapter;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest.ViewDescriptor;
+import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.ISpecializationType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.commands.DeferredSnapToGridCommand;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.ViewDescriptorUtil;
+import org.eclipse.papyrus.infra.services.edit.commands.ConfigureFeatureCommandFactory;
+import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.helper.ElementHelper;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.uml2.uml.Actor;
+import org.eclipse.uml2.uml.Association;
+import org.eclipse.uml2.uml.DataType;
+import org.eclipse.uml2.uml.Type;
+import org.eclipse.uml2.uml.TypedElement;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * This class provides convenience methods to create Block specific drop action (Part or Reference creation).
+ */
+public class BlockDropHelper extends ElementHelper {
+
+ public BlockDropHelper(TransactionalEditingDomain editDomain) {
+ this.editDomain = editDomain;
+ }
+
+ public Command getDropAsStructureItemOnPart(DropObjectsRequest request, GraphicalEditPart host, IElementType elementType) {
+ String label = "";
+ if (elementType == SysMLElementTypes.PART_PROPERTY) {
+ label = "Create a new Part";
+ }
+ if (elementType == SysMLElementTypes.REFERENCE_PROPERTY) {
+ label = "Create a new Reference";
+ }
+ if (elementType == SysMLElementTypes.ACTOR_PART_PROPERTY) {
+ label = "Create a new ActorPart";
+ }
+ if (elementType == SysMLElementTypes.VALUE_PROPERTY) {
+ label = "Create a new Value";
+ }
+ if (elementType == UMLElementTypes.PROPERTY) {
+ label = "Create a new Property";
+ }
+ CompoundCommand cc = new CompoundCommand(label);
+
+ Object droppedEObject = request.getObjects().get(0);
+ if (!isValidStructureItemType(droppedEObject, elementType)) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ // Verify target nature
+ EObject target = getHostEObject(host);
+ if ((!(target instanceof TypedElement)) || (((TypedElement) target).getType() == null)) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ // The target type has to be a Block (will hold the created Port)
+ Type targetType = ((TypedElement) target).getType();
+ if (!((ISpecializationType) SysMLElementTypes.BLOCK).getMatcher().matches(targetType)) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ // Prepare a command for the element creation and the drop in diagram
+
+ // 1. Prepare creation command
+ ICommand createElementCommand = null;
+ CreateElementRequest createElementRequest = new CreateElementRequest(getEditingDomain(), targetType, elementType);
+ createElementRequest.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new ConfigureFeatureCommandFactory(UMLPackage.eINSTANCE.getTypedElement_Type(), request.getObjects().get(0)));
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(targetType);
+ if (provider != null) {
+ createElementCommand = provider.getEditCommand(createElementRequest);
+ }
+ IAdaptable createElementRequestAdapter = new CreateElementRequestAdapter(createElementRequest);
+
+ // 2. Prepare the drop command
+ ViewDescriptor descriptor = new ViewDescriptor(createElementRequestAdapter, Node.class, /* explicit semantic hint is mandatory */null, ViewDescriptorUtil.PERSISTED, host.getDiagramPreferencesHint());
+ CreateViewRequest createViewRequest = new CreateViewRequest(descriptor);
+ createViewRequest.setLocation(request.getLocation().getCopy());
+ Command viewCreateCommand = host.getCommand(createViewRequest);
+
+ // 3. Create the compound command
+ cc.add(new ICommandProxy(createElementCommand));
+ cc.add(viewCreateCommand);
+
+ final Object value = request.getExtendedData().get(PreferencesConstantsHelper.SNAP_TO_GRID_CONSTANT);
+ if (value instanceof Boolean && Boolean.TRUE.equals(value)) {
+ DeferredSnapToGridCommand snapCommand = new DeferredSnapToGridCommand(getEditingDomain(), Collections.singletonList(descriptor), host);
+ cc.add(new ICommandProxy(snapCommand));
+ }
+
+ return cc;
+ }
+
+ public Command getDropAsStructureItem(DropObjectsRequest request, GraphicalEditPart host, IElementType elementType) {
+ String label = "";
+ if (elementType == SysMLElementTypes.PART_PROPERTY) {
+ label = "Create a new Part";
+ }
+ if (elementType == SysMLElementTypes.REFERENCE_PROPERTY) {
+ label = "Create a new Reference";
+ }
+ if (elementType == SysMLElementTypes.ACTOR_PART_PROPERTY) {
+ label = "Create a new ActorPart";
+ }
+ if (elementType == SysMLElementTypes.VALUE_PROPERTY) {
+ label = "Create a new Value";
+ }
+ if (elementType == UMLElementTypes.PROPERTY) {
+ label = "Create a new Property";
+ }
+ CompoundCommand cc = new CompoundCommand(label);
+
+ Object droppedEObject = request.getObjects().get(0);
+ if (!isValidStructureItemType(droppedEObject, elementType)) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ // Prepare a command for the element creation and the drop in diagram
+
+ // 1. Prepare creation command
+ ICommand createElementCommand = null;
+ CreateElementRequest createElementRequest = new CreateElementRequest(getEditingDomain(), getHostEObject(host), elementType);
+ createElementRequest.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new ConfigureFeatureCommandFactory(UMLPackage.eINSTANCE.getTypedElement_Type(), request.getObjects().get(0)));
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(getHostEObject(host));
+ if (provider != null) {
+ createElementCommand = provider.getEditCommand(createElementRequest);
+ }
+ IAdaptable createElementRequestAdapter = new CreateElementRequestAdapter(createElementRequest);
+
+ // 2. Prepare the drop command
+ ViewDescriptor descriptor = new ViewDescriptor(createElementRequestAdapter, Node.class, /* explicit semantic hint is mandatory */null, ViewDescriptorUtil.PERSISTED, host.getDiagramPreferencesHint());
+ CreateViewRequest createViewRequest = new CreateViewRequest(descriptor);
+ createViewRequest.setLocation(request.getLocation().getCopy());
+ Command viewCreateCommand = host.getCommand(createViewRequest);
+
+
+ // 3. Create the compound command
+ cc.add(new ICommandProxy(createElementCommand));
+ cc.add(viewCreateCommand);
+
+ final Object value = request.getExtendedData().get(PreferencesConstantsHelper.SNAP_TO_GRID_CONSTANT);
+ if (value instanceof Boolean && Boolean.TRUE.equals(value)) {
+ DeferredSnapToGridCommand snapCommand = new DeferredSnapToGridCommand(getEditingDomain(), Collections.singletonList(descriptor), host);
+ cc.add(new ICommandProxy(snapCommand));
+ }
+
+ return cc;
+ }
+
+ private boolean isValidStructureItemType(Object object, IElementType elementType) {
+ boolean isValid = false;
+
+ if ((object != null) && (object instanceof Type) && !(object instanceof Association)) {
+
+ Type type = (Type) object;
+ if ((elementType == SysMLElementTypes.PART_PROPERTY) || (elementType == SysMLElementTypes.REFERENCE_PROPERTY)) {
+ if (((ISpecializationType) SysMLElementTypes.BLOCK).getMatcher().matches(type)) {
+ isValid = true;
+ }
+ }
+ if (elementType == SysMLElementTypes.ACTOR_PART_PROPERTY) {
+ if (type instanceof Actor) {
+ isValid = true;
+ }
+ }
+ if (elementType == SysMLElementTypes.VALUE_PROPERTY) {
+ if (((ISpecializationType) SysMLElementTypes.VALUE_TYPE).getMatcher().matches(type) || (type instanceof DataType)) {
+ isValid = true;
+ }
+ }
+ if (elementType == UMLElementTypes.PROPERTY) {
+ if (!((ISpecializationType) SysMLElementTypes.BLOCK).getMatcher().matches(type)
+ && !(type instanceof Actor)
+ && !(type instanceof DataType)
+ && !((ISpecializationType) SysMLElementTypes.VALUE_TYPE).getMatcher().matches(type)) {
+ isValid = true;
+ }
+ }
+ }
+
+ return isValid;
+ }
+
+ /**
+ * return the host Edit Part's semantic element, if the semantic element
+ * is <code>null</code> or unresolvable it will return <code>null</code>
+ *
+ * @return EObject
+ */
+ protected EObject getHostEObject(GraphicalEditPart host) {
+ return ViewUtil.resolveSemanticElement((View) host.getModel());
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/utils/FixPortsLocationOnOpening.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/utils/FixPortsLocationOnOpening.java
new file mode 100755
index 0000000..1fec49d
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/utils/FixPortsLocationOnOpening.java
@@ -0,0 +1,131 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.utils;
+
+import java.util.Iterator;
+
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.emf.transaction.util.TransactionUtil;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.Bounds;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.Shape;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.Activator;
+import org.eclipse.papyrus.sysml.diagram.internalblock.provider.ElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.locator.PortPositionLocatorUtils;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+
+/**
+ * This class fix Port and FlowPort location during diagram opening (no edit part exists yet).
+ */
+public class FixPortsLocationOnOpening {
+
+ /**
+ * This method fix the diagram Port and FlowPort locations.
+ *
+ * @param diagram
+ * the diagram
+ */
+ public void fix(Diagram diagram) {
+
+ // Parse diagram content
+ Iterator<EObject> it = diagram.eAllContents();
+ while (it.hasNext()) {
+ EObject current = it.next();
+
+ // Select Port and FlowPorts
+ if (!(current instanceof Shape)) {
+ continue;
+ }
+
+ Shape portView = (Shape) current;
+ String currentType = portView.getType();
+ if (SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID.equals(currentType) || UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID.equals(currentType)) {
+
+ int borderItemOffset = 10;
+ View parentView = ViewUtil.getViewContainer(portView);
+
+ if (parentView instanceof Shape) {
+ Shape parentShape = (Shape) parentView;
+
+ Bounds portViewBounds = (Bounds) portView.getLayoutConstraint();
+ Bounds parentViewBounds = (Bounds) parentShape.getLayoutConstraint();
+
+ final Rectangle portBounds = new Rectangle(portViewBounds.getX(), portViewBounds.getY(), portViewBounds.getWidth(), portViewBounds.getHeight());
+
+ int parentWidth = parentViewBounds.getWidth();
+ int parentHeight = parentViewBounds.getHeight();
+ if ((parentWidth == -1) && (parentHeight == -1)) {
+ // warning the size may not be set in notation (default size), in such a case get default size from preferences.
+ String parentPrefKey = ElementTypes.DIAGRAM_ID + "_" + parentShape.getType();
+ parentWidth = Activator.getInstance().getPreferenceStore().getInt(PreferencesConstantsHelper.getElementConstant(parentPrefKey, PreferencesConstantsHelper.WIDTH));
+ parentHeight = Activator.getInstance().getPreferenceStore().getInt(PreferencesConstantsHelper.getElementConstant(parentPrefKey, PreferencesConstantsHelper.HEIGHT));
+ }
+ final Rectangle parentBounds = new Rectangle(parentViewBounds.getX(), parentViewBounds.getY(), parentWidth, parentHeight);
+
+ // Calculate the valid location based on currently stored location and parent bounds
+ final Rectangle validLocation = PortPositionLocatorUtils.getBorderLocation(parentBounds, portBounds, borderItemOffset);
+
+ // Fix when current location is not the valid location (only possible if parent size is set)
+ if ((!portBounds.equals(validLocation)) && (parentViewBounds.getWidth() != -1) && (parentViewBounds.getHeight() != -1)) {
+
+ TransactionalEditingDomain editingDomain = TransactionUtil.getEditingDomain(diagram);
+ Command fixCommand = new FixLocationCommand(editingDomain, "Fix Port location on opening", portViewBounds, validLocation);
+ editingDomain.getCommandStack().execute(fixCommand);
+ }
+ }
+
+
+ }
+ }
+ }
+
+ /**
+ * This command set the Port view with valid locations.
+ */
+ public class FixLocationCommand extends RecordingCommand {
+
+ /** Port view bounds. */
+ private Bounds portViewBounds;
+
+ /** Port valid bounds (only the location is used here). */
+ private Rectangle portValidBounds;
+
+ /** Constructor. */
+ public FixLocationCommand(TransactionalEditingDomain domain, String label, Bounds portViewBounds, Rectangle portValidBounds) {
+ super(domain, label);
+ this.portViewBounds = portViewBounds;
+ this.portValidBounds = portValidBounds;
+ }
+
+ @Override
+ protected void doExecute() {
+ portViewBounds.setX(portValidBounds.x());
+ portViewBounds.setY(portValidBounds.y());
+ }
+
+ @Override
+ public boolean canUndo() {
+ return false;
+ }
+
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/utils/InternalBlockDiagramTester.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/utils/InternalBlockDiagramTester.java
new file mode 100755
index 0000000..ebdcdf8
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/utils/InternalBlockDiagramTester.java
@@ -0,0 +1,79 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.utils;
+
+import java.util.Iterator;
+
+import org.eclipse.core.expressions.PropertyTester;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.papyrus.sysml.portandflows.FlowPort;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+/**
+ * Tester for the Internal Block Diagram
+ * This tester provides 2 tests :
+ * <ul>
+ * <li>isFlowPort : return <code>true</code> if the Port is stereotyped with the stereotype SysML::PortAndFlows::FlowPort</li>
+ * </ul>
+ */
+public class InternalBlockDiagramTester extends PropertyTester {
+
+ /** id for the test isFlowPort */
+ public static final String IS_FLOW_PORT = "isFlowPort"; //$NON-NLS-1$
+
+ /**
+ *
+ * @see org.eclipse.core.expressions.IPropertyTester#test(java.lang.Object, java.lang.String, java.lang.Object[], java.lang.Object)
+ *
+ * @param receiver
+ * @param property
+ * @param args
+ * @param expectedValue
+ * @return
+ */
+ public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
+ if (IS_FLOW_PORT.equals(property) && receiver instanceof ISelection) {
+ return testFlowPort((ISelection) receiver, expectedValue);
+ }
+ return false;
+ }
+
+ /**
+ * Tests if the current port is stereotyped with "SysML::PortAndFlows::FlowPort"
+ *
+ * @param selection
+ * the current selection
+ * @return
+ * <code>true</code> if a Port is stereotyped with "SysML::PortAndFlows::FlowPort"
+ */
+ protected boolean testFlowPort(ISelection selection, Object expectedValue) {
+ if (selection instanceof StructuredSelection && expectedValue != null) {
+ @SuppressWarnings("unchecked")
+ Iterator<Object> iter = ((StructuredSelection) selection).iterator();
+ while (iter.hasNext()) {
+ Object current = iter.next();
+ if (current instanceof IAdaptable) {
+ Element port = (Element) ((IAdaptable) current).getAdapter(Element.class);
+ FlowPort fp = UMLUtil.getStereotypeApplication(port, FlowPort.class);
+ boolean value = fp != null;
+ return expectedValue.equals(value);
+ }
+ }
+ }
+ return false;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/utils/PartDropHelper.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/utils/PartDropHelper.java
new file mode 100755
index 0000000..b183ecc
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/utils/PartDropHelper.java
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.utils;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest.ViewDescriptor;
+import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.ViewDescriptorUtil;
+import org.eclipse.papyrus.uml.diagram.common.commands.SemanticAdapter;
+import org.eclipse.papyrus.uml.diagram.common.helper.ElementHelper;
+import org.eclipse.uml2.uml.Port;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Type;
+import org.eclipse.uml2.uml.TypedElement;
+
+/**
+ * This class provides convenience methods to create Type specific drop action (Show BlockProperty on BlockPropertyComposite).
+ */
+public class PartDropHelper extends ElementHelper {
+
+ public PartDropHelper(TransactionalEditingDomain editDomain) {
+ this.editDomain = editDomain;
+ }
+
+ public Command getDropPartOnPart(DropObjectsRequest request, GraphicalEditPart host) {
+
+ Object droppedEObject = request.getObjects().get(0);
+ if (!isValidPart(droppedEObject, getHostEObject(host))) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ // Prepare the view creation command
+ ViewDescriptor descriptor = new ViewDescriptor(new SemanticAdapter((EObject) droppedEObject, null), Node.class, /* explicit semantic hint is mandatory */null, ViewDescriptorUtil.PERSISTED, host.getDiagramPreferencesHint());
+ CreateViewRequest createViewRequest = new CreateViewRequest(descriptor);
+ createViewRequest.setLocation(request.getLocation().getCopy());
+ Command viewCreateCommand = host.getCommand(createViewRequest);
+
+ return viewCreateCommand;
+ }
+
+ private boolean isValidPart(Object object, EObject dropTarget) {
+ boolean isValid = false;
+
+ // The drop object is supposed to be a Property
+ if ((object != null) && (object instanceof Property) && !(object instanceof Port)) {
+
+ // The dropTarget has to be a TypedElement with a non-null Type
+ if ((dropTarget != null) && (dropTarget instanceof TypedElement) && (((TypedElement) dropTarget).getType() != null)) {
+
+ Type targetType = ((TypedElement) dropTarget).getType();
+ // The dropped object is owned by the target type
+ if (((Property) object).eContainer() == targetType) {
+ isValid = true;
+ }
+ }
+ }
+
+ return isValid;
+ }
+
+ /**
+ * return the host Edit Part's semantic element, if the semantic element
+ * is <code>null</code> or unresolvable it will return <code>null</code>
+ *
+ * @return EObject
+ */
+ protected EObject getHostEObject(GraphicalEditPart host) {
+ return ViewUtil.resolveSemanticElement((View) host.getModel());
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/utils/PortDropHelper.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/utils/PortDropHelper.java
new file mode 100755
index 0000000..558ddbd
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/utils/PortDropHelper.java
@@ -0,0 +1,105 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.utils;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.diagram.ui.commands.CommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest.ViewDescriptor;
+import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.commands.wrappers.CommandProxyWithResult;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.ViewDescriptorUtil;
+import org.eclipse.papyrus.uml.diagram.common.helper.ElementHelper;
+import org.eclipse.uml2.uml.Classifier;
+import org.eclipse.uml2.uml.Port;
+import org.eclipse.uml2.uml.Type;
+import org.eclipse.uml2.uml.TypedElement;
+
+/**
+ * This class provides convenience methods to create Type specific drop action (Show Port on BlockPropertyComposite).
+ */
+public class PortDropHelper extends ElementHelper {
+
+ public PortDropHelper(TransactionalEditingDomain editDomain) {
+ this.editDomain = editDomain;
+ }
+
+ public ICommand getDropPortOnPart(DropObjectsRequest request, GraphicalEditPart host) {
+
+ Object droppedEObject = request.getObjects().get(0);
+ if (!isValidPort(droppedEObject, getHostEObject(host))) {
+ return new CommandProxy(UnexecutableCommand.INSTANCE);
+ }
+
+ return getDropPortOnPart((Port) droppedEObject, request.getLocation().getCopy(), host);
+ }
+
+ public ICommand getDropPortOnPart(Port droppedPort, Point location, GraphicalEditPart host) {
+
+ if (!isValidPort(droppedPort, getHostEObject(host))) {
+ return new CommandProxy(UnexecutableCommand.INSTANCE);
+ }
+
+ // Prepare the view creation command
+ ViewDescriptor descriptor = new ViewDescriptor(new EObjectAdapter(droppedPort), Node.class, /* explicit semantic hint is mandatory */null, ViewDescriptorUtil.PERSISTED, host.getDiagramPreferencesHint());
+ CreateViewRequest createViewRequest = new CreateViewRequest(descriptor);
+ createViewRequest.setLocation(location);
+ Command viewCreateCommand = host.getCommand(createViewRequest);
+
+ return new CommandProxyWithResult(viewCreateCommand, descriptor);
+ }
+
+ private boolean isValidPort(Object object, EObject dropTarget) {
+ boolean isValid = false;
+
+ // The drop object is supposed to be a Port (or FlowPort)
+ if ((object != null) && (object instanceof Port)) {
+
+ Port port = (Port) object;
+ // The dropTarget has to be a TypedElement with a non-null Type
+ if ((dropTarget != null) && (dropTarget instanceof TypedElement) && (((TypedElement) dropTarget).getType() != null)) {
+
+ Type targetType = ((TypedElement) dropTarget).getType();
+ // The dropped object is owned by the target type
+
+ if (targetType instanceof Classifier) {
+ Classifier classifier = (Classifier) targetType;
+ isValid = classifier.getAllAttributes().contains(port);
+ }
+ }
+ }
+
+ return isValid;
+ }
+
+ /**
+ * return the host Edit Part's semantic element, if the semantic element
+ * is <code>null</code> or unresolvable it will return <code>null</code>
+ *
+ * @return EObject
+ */
+ protected EObject getHostEObject(GraphicalEditPart host) {
+ return ViewUtil.resolveSemanticElement((View) host.getModel());
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/utils/TypeDropHelper.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/utils/TypeDropHelper.java
new file mode 100755
index 0000000..9bdbb15
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/utils/TypeDropHelper.java
@@ -0,0 +1,314 @@
+/*****************************************************************************
+ * Copyright (c) 2011, 2015 CEA LIST, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus - bug 470296
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.utils;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.CompoundCommand;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.common.core.command.IdentityCommand;
+import org.eclipse.gmf.runtime.diagram.core.edithelpers.CreateElementRequestAdapter;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest.ViewDescriptor;
+import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest;
+import org.eclipse.gmf.runtime.emf.type.core.IClientContext;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.ISpecializationType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.ViewDescriptorUtil;
+import org.eclipse.papyrus.infra.services.edit.commands.ConfigureFeatureCommandFactory;
+import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory;
+import org.eclipse.papyrus.infra.services.edit.context.TypeContext;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.sysml.diagram.internalblock.Activator;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.helper.ElementHelper;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.uml2.uml.Association;
+import org.eclipse.uml2.uml.DataType;
+import org.eclipse.uml2.uml.Signal;
+import org.eclipse.uml2.uml.Type;
+import org.eclipse.uml2.uml.TypedElement;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * This class provides convenience methods to create Type specific drop action (Set new Type, Port creation, ...).
+ */
+public class TypeDropHelper extends ElementHelper {
+
+ public TypeDropHelper(TransactionalEditingDomain editDomain) {
+ this.editDomain = editDomain;
+ }
+
+ public Command getDropAsTypedElementType(DropObjectsRequest request, GraphicalEditPart host) {
+ CompoundCommand cc = new CompoundCommand("Set a new Type");
+ ICommand setCommand = null;
+
+ // The dropped object must be a Type and the target a TypedElement
+ Type newType = (request.getObjects().get(0) instanceof Type) ? (Type) request.getObjects().get(0) : null;
+ TypedElement typedElementDropTarget = (getHostEObject(host) instanceof TypedElement) ? (TypedElement) getHostEObject(host) : null;
+
+ if ((newType == null) || (typedElementDropTarget == null)) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ IClientContext context;
+ try {
+ context = TypeContext.getContext(typedElementDropTarget);
+ } catch (ServiceException e) {
+ Activator.log.error(e);
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ if (newType == typedElementDropTarget.getType()) {
+ setCommand = IdentityCommand.INSTANCE;
+ }
+
+ // Prepare a command to set the new type
+ SetRequest req = new SetRequest(typedElementDropTarget, UMLPackage.eINSTANCE.getTypedElement_Type(), newType);
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(UMLElementTypes.TYPED_ELEMENT, context);
+ if (provider != null) {
+ setCommand = provider.getEditCommand(req);
+ }
+
+ cc.add(new ICommandProxy(setCommand));
+
+ return cc;
+ }
+
+ public Command getDropAsTypedPort(DropObjectsRequest request, GraphicalEditPart host) {
+ CompoundCommand cc = new CompoundCommand("Create a new Port");
+
+ Object droppedEObject = request.getObjects().get(0);
+ if (!isValidPortType(droppedEObject)) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ // Prepare a command for the FlowPort creation and the drop in diagram
+
+ // 1. Prepare creation command
+ ICommand createElementCommand = null;
+ CreateElementRequest createElementRequest = new CreateElementRequest(getEditingDomain(), getHostEObject(host), UMLElementTypes.PORT);
+ createElementRequest.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new ConfigureFeatureCommandFactory(UMLPackage.eINSTANCE.getTypedElement_Type(), request.getObjects().get(0)));
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(getHostEObject(host));
+ if (provider != null) {
+ createElementCommand = provider.getEditCommand(createElementRequest);
+ }
+ IAdaptable createElementRequestAdapter = new CreateElementRequestAdapter(createElementRequest);
+
+ // 2. Prepare the drop command
+ ViewDescriptor descriptor = new ViewDescriptor(createElementRequestAdapter, Node.class, /* explicit semantic hint is mandatory */null, ViewDescriptorUtil.PERSISTED, host.getDiagramPreferencesHint());
+ CreateViewRequest createViewRequest = new CreateViewRequest(descriptor);
+ createViewRequest.setLocation(request.getLocation().getCopy());
+ Command viewCreateCommand = host.getCommand(createViewRequest);
+
+ // 3. Create the compound command
+ cc.add(new ICommandProxy(createElementCommand));
+ cc.add(viewCreateCommand);
+
+ return cc;
+ }
+
+ public Command getDropAsTypedPortOnPart(DropObjectsRequest request, GraphicalEditPart host) {
+ CompoundCommand cc = new CompoundCommand("Create a new Port");
+
+ Object droppedEObject = request.getObjects().get(0);
+ if (!isValidPortType(droppedEObject)) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ // Verify target nature
+ EObject target = getHostEObject(host);
+ if ((!(target instanceof TypedElement)) || (((TypedElement) target).getType() == null)) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ // The target type has to be a Block (will hold the created Port)
+ Type targetType = ((TypedElement) target).getType();
+ if (!((ISpecializationType) SysMLElementTypes.BLOCK).getMatcher().matches(targetType)) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ // Prepare a command for the FlowPort creation and the drop in diagram
+
+ // 1. Prepare creation command
+ ICommand createElementCommand = null;
+ CreateElementRequest createElementRequest = new CreateElementRequest(getEditingDomain(), targetType, UMLElementTypes.PORT);
+ createElementRequest.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new ConfigureFeatureCommandFactory(UMLPackage.eINSTANCE.getTypedElement_Type(), request.getObjects().get(0)));
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(targetType);
+ if (provider != null) {
+ createElementCommand = provider.getEditCommand(createElementRequest);
+ }
+ IAdaptable createElementRequestAdapter = new CreateElementRequestAdapter(createElementRequest);
+
+ // 2. Prepare the drop command
+ ViewDescriptor descriptor = new ViewDescriptor(createElementRequestAdapter, Node.class, /* explicit semantic hint is mandatory */null, ViewDescriptorUtil.PERSISTED, host.getDiagramPreferencesHint());
+ CreateViewRequest createViewRequest = new CreateViewRequest(descriptor);
+ createViewRequest.setLocation(request.getLocation().getCopy());
+ Command viewCreateCommand = host.getCommand(createViewRequest);
+
+ // 3. Create the compound command
+ cc.add(new ICommandProxy(createElementCommand));
+ cc.add(viewCreateCommand);
+
+ return cc;
+ }
+
+ public Command getDropAsTypedFlowPort(DropObjectsRequest request, GraphicalEditPart host, IElementType elementType) {
+ CompoundCommand cc = new CompoundCommand("Create a new FlowPort (" + elementType.getDisplayName() + ")");
+
+ Object droppedEObject = request.getObjects().get(0);
+ if (!isValidFlowPortType(droppedEObject, elementType)) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ // Prepare a command for the FlowPort creation and the drop in diagram
+
+ // 1. Prepare creation command
+ ICommand createElementCommand = null;
+ CreateElementRequest createElementRequest = new CreateElementRequest(getEditingDomain(), getHostEObject(host), elementType);
+ createElementRequest.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new ConfigureFeatureCommandFactory(UMLPackage.eINSTANCE.getTypedElement_Type(), request.getObjects().get(0)));
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(getHostEObject(host));
+ if (provider != null) {
+ createElementCommand = provider.getEditCommand(createElementRequest);
+ }
+ IAdaptable createElementRequestAdapter = new CreateElementRequestAdapter(createElementRequest);
+
+ // 2. Prepare the drop command
+ ViewDescriptor descriptor = new ViewDescriptor(createElementRequestAdapter, Node.class, /* explicit semantic hint is mandatory */null, ViewDescriptorUtil.PERSISTED, host.getDiagramPreferencesHint());
+ CreateViewRequest createViewRequest = new CreateViewRequest(descriptor);
+ createViewRequest.setLocation(request.getLocation().getCopy());
+ Command viewCreateCommand = host.getCommand(createViewRequest);
+
+ // 3. Create the compound command
+ cc.add(new ICommandProxy(createElementCommand));
+ cc.add(viewCreateCommand);
+
+ return cc;
+ }
+
+ public Command getDropAsTypedFlowPortOnPart(DropObjectsRequest request, GraphicalEditPart host, IElementType elementType) {
+ CompoundCommand cc = new CompoundCommand("Create a new FlowPort (" + elementType.getDisplayName() + ")");
+
+ Object droppedEObject = request.getObjects().get(0);
+ if (!isValidFlowPortType(droppedEObject, elementType)) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ // Verify target nature
+ EObject target = getHostEObject(host);
+ if ((!(target instanceof TypedElement)) || (((TypedElement) target).getType() == null)) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ // The target type has to be a Block (will hold the created Port)
+ Type targetType = ((TypedElement) target).getType();
+ if (!((ISpecializationType) SysMLElementTypes.BLOCK).getMatcher().matches(targetType)) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ // Prepare a command for the FlowPort creation and the drop in diagram
+
+ // 1. Prepare creation command
+ ICommand createElementCommand = null;
+ CreateElementRequest createElementRequest = new CreateElementRequest(getEditingDomain(), targetType, elementType);
+ createElementRequest.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new ConfigureFeatureCommandFactory(UMLPackage.eINSTANCE.getTypedElement_Type(), request.getObjects().get(0)));
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(targetType);
+ if (provider != null) {
+ createElementCommand = provider.getEditCommand(createElementRequest);
+ }
+ IAdaptable createElementRequestAdapter = new CreateElementRequestAdapter(createElementRequest);
+
+ // 2. Prepare the drop command
+ ViewDescriptor descriptor = new ViewDescriptor(createElementRequestAdapter, Node.class, /* explicit semantic hint is mandatory */null, ViewDescriptorUtil.PERSISTED, host.getDiagramPreferencesHint());
+ CreateViewRequest createViewRequest = new CreateViewRequest(descriptor);
+ createViewRequest.setLocation(request.getLocation().getCopy());
+ Command viewCreateCommand = host.getCommand(createViewRequest);
+
+ // 3. Create the compound command
+ cc.add(new ICommandProxy(createElementCommand));
+ cc.add(viewCreateCommand);
+
+ return cc;
+ }
+
+ private boolean isValidFlowPortType(Object object, IElementType elementType) {
+ boolean isValid = false;
+
+ if ((object != null) && (object instanceof Type)) {
+ Type type = (Type) object;
+
+ // Test valid type
+ if (type instanceof DataType) {
+ isValid = true;
+ }
+
+ if (type instanceof Signal) {
+ isValid = true;
+ }
+
+ if (((ISpecializationType) SysMLElementTypes.FLOW_SPECIFICATION).getMatcher().matches(type)) {
+ // Non-atomic flow port, the direction is meaningless in this case
+ if (elementType == SysMLElementTypes.FLOW_PORT) {
+ isValid = true;
+ }
+ }
+
+ if (((ISpecializationType) SysMLElementTypes.BLOCK).getMatcher().matches(type)) {
+ isValid = true;
+ }
+
+ if (((ISpecializationType) SysMLElementTypes.VALUE_TYPE).getMatcher().matches(type)) {
+ isValid = true;
+ }
+
+ }
+
+ return isValid;
+ }
+
+ private boolean isValidPortType(Object object) {
+ boolean isValid = false;
+
+ // Bug 470296: Associations are not useful types for ports or any kind of property. Note that this
+ // deliberately excludes association-classes, also, because their primary semantics is that of an association
+ if ((object != null) && (object instanceof Type) && !(object instanceof Association)) {
+ isValid = true;
+ }
+
+ return isValid;
+ }
+
+ /**
+ * return the host Edit Part's semantic element, if the semantic element
+ * is <code>null</code> or unresolvable it will return <code>null</code>
+ *
+ * @return EObject
+ */
+ protected EObject getHostEObject(GraphicalEditPart host) {
+ return ViewUtil.resolveSemanticElement((View) host.getModel());
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/.classpath b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/.classpath
new file mode 100755
index 0000000..f0c5549
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/.classpath
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="src-gen"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/.project b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/.project
new file mode 100755
index 0000000..a0701c1
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/.project
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.sysml.diagram.parametric</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>
+ <buildCommand>
+ <name>org.eclipse.oomph.version.VersionBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>check.maven.pom</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>ignore.lower.bound.dependency.ranges</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>release.path</key>
+ <value>/org.eclipse.papyrus.releng.main.release/release.xml</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.oomph.version.VersionNature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/.settings/org.eclipse.jdt.core.prefs b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 0000000..f08be2b
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,291 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/.settings/org.eclipse.jdt.ui.prefs b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/.settings/org.eclipse.jdt.ui.prefs
new file mode 100755
index 0000000..954281d
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,68 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+formatter_profile=_Papyrus
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/.settings/org.eclipse.pde.api.tools.prefs b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100755
index 0000000..23fb95e
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/.settings/org.eclipse.pde.api.tools.prefs
@@ -0,0 +1,98 @@
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+API_USE_SCAN_FIELD_SEVERITY=Error
+API_USE_SCAN_METHOD_SEVERITY=Error
+API_USE_SCAN_TYPE_SEVERITY=Error
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Ignore
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_ANNOTATION=Ignore
+INVALID_JAVADOC_TAG=Ignore
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Ignore
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+MISSING_EE_DESCRIPTIONS=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=Enabled
+eclipse.preferences.version=1
+incompatible_api_component_version=Error
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Warning
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/META-INF/MANIFEST.MF b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/META-INF/MANIFEST.MF
new file mode 100755
index 0000000..26bfc57
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/META-INF/MANIFEST.MF
@@ -0,0 +1,29 @@
+Manifest-Version: 1.0
+Export-Package: org.eclipse.papyrus.sysml.diagram.parametric,
+ org.eclipse.papyrus.sysml.diagram.parametric.commands,
+ org.eclipse.papyrus.sysml.diagram.parametric.edit.part,
+ org.eclipse.papyrus.sysml.diagram.parametric.edit.policy,
+ org.eclipse.papyrus.sysml.diagram.parametric.factory,
+ org.eclipse.papyrus.sysml.diagram.parametric.figures,
+ org.eclipse.papyrus.sysml.diagram.parametric.parser,
+ org.eclipse.papyrus.sysml.diagram.parametric.part,
+ org.eclipse.papyrus.sysml.diagram.parametric.policies,
+ org.eclipse.papyrus.sysml.diagram.parametric.preferences,
+ org.eclipse.papyrus.sysml.diagram.parametric.provider,
+ org.eclipse.papyrus.sysml.diagram.parametric.utils
+Bundle-ActivationPolicy: lazy
+Bundle-Name: %pluginName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Require-Bundle: org.eclipse.gmf.runtime.diagram.ui.providers;bundle-version="[1.7.0,2.0.0)",
+ org.eclipse.papyrus.sysml.service.types;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.infra.gmfdiag.navigation;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.sysml.diagram.internalblock;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.uml.diagram.clazz;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.infra.properties.ui;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.infra.internationalization.utils;bundle-version="[1.0.0,2.0.0)"
+Bundle-Vendor: %providerName
+Bundle-Version: 2.0.0.qualifier
+Bundle-ManifestVersion: 2
+Bundle-Activator: org.eclipse.papyrus.sysml.diagram.parametric.Activator
+Bundle-SymbolicName: org.eclipse.papyrus.sysml.diagram.parametric;singleton:=true
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/about.html b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/about.html
new file mode 100755
index 0000000..d35d5ae
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/build.properties b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/build.properties
new file mode 100755
index 0000000..70eddf3
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/build.properties
@@ -0,0 +1,12 @@
+source.. = src/,\
+ src-gen/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.properties,\
+ plugin.xml,\
+ palettes/,\
+ icons/,\
+ about.html,\
+ model/
+src.includes = model/
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/icons/obj16/Diagram_Parametric.png b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/icons/obj16/Diagram_Parametric.png
new file mode 100755
index 0000000..2b3e965
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/icons/obj16/Diagram_Parametric.png
Binary files differ
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/icons/wizban/NewResourceWizard.gif b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/icons/wizban/NewResourceWizard.gif
new file mode 100755
index 0000000..93641ae
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/icons/wizban/NewResourceWizard.gif
Binary files differ
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/model/SysML.Parametric.idgen b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/model/SysML.Parametric.idgen
new file mode 100755
index 0000000..4db6815
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/model/SysML.Parametric.idgen
@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<idgen:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:gmfgen="http://www.eclipse.org/gmf/2009/GenModel" xmlns:idgen="http://www.eclipse.org/papyrus/0.7.0/idgen" name="Parametric" type="Parametric" icon="icons/obj16/Diagram_Parametric.gif" label="SysML Parametric Diagram" language="sysml" javaPackagePrefix="org.eclipse.papyrus.sysml.diagram.parametric" javaClassPrefix="ParametricDiagram" createCommandLabel="Create a new Parametric Diagram">
+ <diagramEditPart name="Diagram edit part">
+ <behaviors javaClassQualifiedName="org.eclipse.papyrus.uml.diagram.common.editpolicies.DuplicatePasteEditPolicy" key="DuplicatePasteEditPolicy.PASTE_ROLE"/>
+ <behaviors javaClassQualifiedName="org.eclipse.papyrus.sysml.diagram.internalblock.edit.policy.CustomDragDropEditPolicy" key="EditPolicyRoles.DRAG_DROP_ROLE"/>
+ <behaviors javaClassQualifiedName="org.eclipse.papyrus.gmf.diagram.common.edit.policy.DefaultXYLayoutEditPolicy" key="EditPolicy.LAYOUT_ROLE"/>
+ <behaviors name="" javaClassQualifiedName="org.eclipse.papyrus.gmf.diagram.common.edit.policy.DefaultCreationEditPolicy" key="EditPolicyRoles.CREATION_ROLE"/>
+ <behaviors javaClassQualifiedName="org.eclipse.papyrus.gmf.diagram.common.edit.policy.DefaultContainerNodeEditPolicy" key="EditPolicy.GRAPHICAL_NODE_ROLE"/>
+ </diagramEditPart>
+ <inheritedDiagrams name="CompositeDiagram" viewProviderClassQualifiedName="" editPartProviderClassQualifiedName="" dndEditPolicyClassQualifiedName="org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy">
+ <genInheritedEditor href="../../org.eclipse.papyrus.uml.diagram.composite/model/compositediagram.gmfgen#CompositeStructure"/>
+ <genNodes>
+ <genNode xsi:type="gmfgen:GenTopLevelNode" href="../../org.eclipse.papyrus.uml.diagram.composite/model/compositediagram.gmfgen#/0/@diagram/@topLevelNodes.48"/>
+ <semanticType href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#org.eclipse.papyrus.uml.Constraint"/>
+ </genNodes>
+ <genNodes generatePreferencePage="false" generateTool="false">
+ <genNode xsi:type="gmfgen:GenChildNode" href="../../org.eclipse.papyrus.uml.diagram.composite/model/compositediagram.gmfgen#/0/@diagram/@childNodes.27"/>
+ <semanticType href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#org.eclipse.papyrus.uml.Comment"/>
+ </genNodes>
+ <genNodes>
+ <genNode xsi:type="gmfgen:GenTopLevelNode" href="../../org.eclipse.papyrus.uml.diagram.composite/model/compositediagram.gmfgen#/0/@diagram/@topLevelNodes.43"/>
+ <semanticType href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#org.eclipse.papyrus.uml.Comment"/>
+ </genNodes>
+ <genNodes generatePreferencePage="false" generateTool="false">
+ <genNode xsi:type="gmfgen:GenChildNode" href="../../org.eclipse.papyrus.uml.diagram.composite/model/compositediagram.gmfgen#/0/@diagram/@childNodes.32"/>
+ <semanticType href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#org.eclipse.papyrus.uml.Constraint"/>
+ </genNodes>
+ <genLinks>
+ <genLink href="../../org.eclipse.papyrus.uml.diagram.composite/model/compositediagram.gmfgen#/0/@diagram/@links.1"/>
+ </genLinks>
+ <genLinks>
+ <genLink href="../../org.eclipse.papyrus.uml.diagram.composite/model/compositediagram.gmfgen#/0/@diagram/@links.2"/>
+ </genLinks>
+ </inheritedDiagrams>
+ <customJavaClasses name="" customEditPolicyProvider="org.eclipse.papyrus.sysml.diagram.internalblock.CustomEditPolicyProvider" customPreferenceInitializer="org.eclipse.papyrus.sysml.diagram.parametric.preferences.CustomPreferenceInitializer"/>
+ <usedCustomNodes href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_block_as_composite"/>
+ <usedCustomNodes href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_blockproperty_as_composite"/>
+ <usedCustomNodes href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_flowport_as_affixed"/>
+ <usedCustomNodes href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#shape_uml_port_as_affixed"/>
+ <usedCustomEdges href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#link_uml_connector"/>
+ <usedCustomEdges href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#link_uml_dependency"/>
+ <usedCustomDecorations href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#label_sysml_block_name"/>
+ <usedCustomDecorations href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#affixedlabel_sysml_flowport_label"/>
+ <usedCustomDecorations href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#affixedlabel_uml_appliedstereotype"/>
+ <usedCustomDecorations href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#affixedlabel_uml_port_label"/>
+ <usedCustomDecorations href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#compartment_sysml_structure"/>
+ <usedCustomDecorations href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#compartment_sysml_blockproperty_structure"/>
+ <usedCustomDecorations href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#label_uml_property_label"/>
+ <usedCustomDecorations href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#linklabel_uml_appliedstereotype"/>
+ <usedCustomDecorations href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#linklabel_uml_connector_label"/>
+ <usedCustomDecorations href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#linklabel_uml_connector_source_multiplicity"/>
+ <usedCustomDecorations href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#linklabel_uml_connector_target_multiplicity"/>
+ <usedCustomDecorations href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#linklabel_uml_namedelement_name"/>
+ <diagramConfig>
+ <contains xsi:type="idgen:GraphicalTypeDiagramRef">
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_block_as_composite"/>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_flowport_as_affixed"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#shape_uml_port_as_affixed"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#compartment_sysml_structure"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_blockproperty_as_composite"/>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_flowport_as_affixed"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#shape_uml_port_as_affixed"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#compartment_sysml_blockproperty_structure"/>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_blockproperty_as_composite"/>
+ </contains>
+ </contains>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_constraintblockproperty_as_composite"/>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#shape_uml_property_as_label"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#compartment_sysml_blockproperty_structure"/>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_constraintblockproperty_as_composite"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#label_uml_property_label"/>
+ </contains>
+ </contains>
+ </contains>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#link_uml_dependency"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/UML.ReusableParts.idgen#link_uml_connector"/>
+ </contains>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#compartment_sysml_structure"/>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_blockproperty_as_composite"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_constraintblockproperty_as_composite"/>
+ </contains>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#compartment_sysml_blockproperty_structure"/>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_blockproperty_as_composite"/>
+ </contains>
+ <contains>
+ <ref href="../../org.eclipse.papyrus.sysml.diagram.common/model/SysML.ReusableParts.idgen#shape_sysml_constraintblockproperty_as_composite"/>
+ </contains>
+ </contains>
+ </diagramConfig>
+</idgen:Diagram>
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/palettes/PapyrusSYSMLParametricDiagram.paletteconfiguration b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/palettes/PapyrusSYSMLParametricDiagram.paletteconfiguration
new file mode 100755
index 0000000..00e93a1
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/palettes/PapyrusSYSMLParametricDiagram.paletteconfiguration
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="ASCII"?>
+<paletteconfiguration:PaletteConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:elementtypesconfigurations="http://www.eclipse.org/papyrus/infra/elementtypesconfigurations/1.2" xmlns:paletteconfiguration="http://www.eclipse.org/papyrus/diagram/paletteconfiguration/0.8" id="org.eclipse.papyrus.sysml.diagram.parametric.paletteconfiguration" label="org.eclipse.papyrus.sysml.diagram.parametric Palette" description="This is the palette of PapyrusSysMLParametricDiagram">
+ <drawerConfigurations id="parametric.drawer.nodes" label="Nodes">
+ <icon pluginID="org.eclipse.gmf.runtime.diagram.ui" iconPath="/icons/group.gif"/>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="parametric.tool.constraintblockpropertycomposite" label="ConstraintProperty" description="Create a new ConstraintProperty">
+ <icon pluginID="org.eclipse.papyrus.sysml" iconPath="/icons/blocks/Block.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.ConstraintProperty"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="parametric.tool.parameter" label="ConstraintParameter" description="Create a new ConstraintParameter">
+ <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/Port.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Property"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="parametric.tool.blockpropertycomposite" label="Part" description="Create a new Part">
+ <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/Property.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.PartProperty"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="parametric.tool.reference" label="Reference" description="Create a new Reference">
+ <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/Property.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.ReferenceProperty"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="parametric.tool.value" label="Value" description="Create a new Value">
+ <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/Property.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.ValueProperty"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ </drawerConfigurations>
+ <drawerConfigurations id="parametric.drawer.edges" label="Edges">
+ <icon pluginID="org.eclipse.gmf.runtime.diagram.ui" iconPath="/icons/group.gif"/>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="parametric.tool.connector" label="BindingConnector" description="Create a new BindingConnector" kind="ConnectionTool">
+ <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/Connector.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Connector"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ </drawerConfigurations>
+ <drawerConfigurations id="parametric.drawer.others" label="Others">
+ <icon pluginID="org.eclipse.gmf.runtime.diagram.ui" iconPath="/icons/group.gif"/>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="parametric.tool.dependency" label="Dependency" description="Create a new Dependency" kind="ConnectionTool">
+ <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/Dependency.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Dependency"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="parametric.tool.comment" label="Comment" description="Create a new Comment">
+ <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16//Comment.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Comment"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="parametric.tool.constraint" label="Constraint" description="Create a new Constraint">
+ <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/Constraint.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Constraint"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="parametric.tool.commentannotatedelement" label="CommentAnnotatedElement" description="Create a new CommentAnnotatedElement" kind="ConnectionTool">
+ <icon pluginID="org.eclipse.papyrus.sysml.diagram.blockdefinition" iconPath="/icons/obj16/Link.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/umldi.elementtypesconfigurations#org.eclipse.papyrus.umldi.Comment_AnnotatedElementEdge"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="parametric.tool.context_link" label="ContextLink" description="Create a new ContextLink" kind="ConnectionTool">
+ <icon pluginID="org.eclipse.papyrus.sysml.diagram.blockdefinition" iconPath="/icons/obj16/Link.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/umldi.elementtypesconfigurations#org.eclipse.papyrus.umldi.Constraint_ContextEdge"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ </drawerConfigurations>
+</paletteconfiguration:PaletteConfiguration>
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/palettes/parametric.palette.xml b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/palettes/parametric.palette.xml
new file mode 100755
index 0000000..f385c0e
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/palettes/parametric.palette.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<paletteDefinition>
+ <content>
+ <drawer id="parametric.drawer.nodes" name="Nodes" iconpath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif">
+ <aspectTool description="Create a new ConstraintProperty" id="parametric.tool.constraintblockpropertycomposite"
+ name="ConstraintProperty" refToolId="parametric.tool.constraintblockpropertycomposite">
+ </aspectTool>
+ <aspectTool description="Create a new ConstraintParameter" id="parametric.tool.parameter"
+ name="ConstraintParameter" refToolId="parametric.tool.parameter">
+ </aspectTool>
+ <aspectTool description="Create a new Part" id="parametric.tool.blockpropertycomposite"
+ name="Part" refToolId="parametric.tool.blockpropertycomposite">
+ </aspectTool>
+ <aspectTool description="Create a new Reference" id="parametric.tool.reference"
+ name="Reference" refToolId="parametric.tool.reference">
+ </aspectTool>
+ <aspectTool description="Create a new Value" id="parametric.tool.value"
+ name="Value" refToolId="parametric.tool.value">
+ </aspectTool>
+ </drawer>
+ <drawer id="parametric.drawer.edges" name="Edges" iconpath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif">
+ <aspectTool description="Create a new BindingConnector" id="parametric.tool.connector"
+ name="BindingConnector" refToolId="parametric.tool.connector">
+ </aspectTool>
+ </drawer>
+ <drawer id="parametric.drawer.others" name="Others" iconpath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif">
+ <aspectTool description="Create a new Dependency" id="parametric.tool.dependency"
+ name="Dependency" refToolId="parametric.tool.dependency">
+ </aspectTool>
+ <aspectTool description="Create a new Comment" id="parametric.tool.comment"
+ name="Comment" refToolId="parametric.tool.comment">
+ </aspectTool>
+ <aspectTool description="Create a new Constraint" id="parametric.tool.constraint"
+ name="Constraint" refToolId="parametric.tool.constraint">
+ </aspectTool>
+ <aspectTool description="Create a new CommentAnnotatedElement" id="parametric.tool.commentannotatedelement"
+ name="CommentAnnotatedElement" refToolId="parametric.tool.comment_constraint_link">
+ </aspectTool>
+ <aspectTool description="Create a new ContextLink" id="parametric.tool.context_link"
+ name="ContextLink" refToolId="parametric.tool.context_link">
+ </aspectTool>
+ </drawer>
+ </content>
+</paletteDefinition>
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/plugin.properties b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/plugin.properties
new file mode 100755
index 0000000..6f678bf
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/plugin.properties
@@ -0,0 +1,14 @@
+#################################################################################
+# Copyright (c) 2010 CEA LIST.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - initial API and implementation
+##################################################################################
+pluginName=SysML Parametric Diagram
+providerName=Eclipse Modeling Project
+context.description=Papyrus SysML Parametric Diagram Editing
+context.name=In Papyrus SysML Parametric Diagram Editor
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/plugin.xml b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/plugin.xml
new file mode 100755
index 0000000..44487bc
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/plugin.xml
@@ -0,0 +1,561 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+
+<extension point="org.eclipse.ui.contexts" id="ui-context">
+ <?gmfgen generated="true"?>
+ <context
+ description="%context.description"
+ id="org.eclipse.papyrus.sysml.diagram.parametric.ui.diagramContext"
+ name="%context.name"
+ parentId="org.eclipse.gmf.runtime.diagram.ui.diagramContext">
+ </context>
+</extension>
+
+<!-- Diagram declaration -->
+<extension point="org.eclipse.papyrus.infra.ui.papyrusDiagram">
+ <creationCommand
+ creationCommandClass="org.eclipse.papyrus.sysml.diagram.parametric.ParametricDiagramCreateCommand"
+ icon="icons/obj16/Diagram_Parametric.png"
+ id="org.eclipse.papyrus.sysml.diagram.parametric.CreateCommand"
+ language="sysml"
+ label="Parametric Diagram"/>
+ <editorDiagram
+ actionBarContributorId="org.eclipse.papyrus.uml.diagram.common.part.UMLDiagramActionBarContributor"
+ factoryClass="org.eclipse.papyrus.sysml.diagram.parametric.ParametricDiagramEditorFactory"
+ icon="icons/obj16/Diagram_Parametric.png" />
+</extension>
+
+<!-- Diagram creation command and handler -->
+<extension point="org.eclipse.ui.commands">
+ <command id="org.eclipse.papyrus.sysml.diagram.parametric.CreateCommand"
+ name="Create a new Parametric Diagram"
+ description="Create a new Parametric Diagram"
+ categoryId="org.eclipse.papyrus.editor.category"/>
+ <command
+ categoryId="org.eclipse.papyrus.editor.category"
+ description="Switch ConstraintProperty Representation"
+ defaultHandler="org.eclipse.papyrus.sysml.diagram.parametric.commands.switchrepresentation.SwitchConstraintPropertyRepresentationCommandHandler"
+ id="org.eclipse.papyrus.sysml.diagram.parametric.custom.switchConstraintProperty"
+ name="Switch ConstraintProperty Representation"/>
+ <command
+ categoryId="org.eclipse.papyrus.editor.category"
+ description="Show/Hide ConstraintExpression"
+ defaultHandler="org.eclipse.papyrus.sysml.diagram.parametric.commands.switchrepresentation.ShowHideConstraintExpressionCommandHandler"
+ id="org.eclipse.papyrus.sysml.diagram.parametric.custom.showHideConstraintExpression"
+ name="Show/Hide Constraint expression"/>
+</extension>
+
+
+<!-- Diagram creation command registration in menu and toolbar -->
+<extension point="org.eclipse.ui.menus">
+
+
+ <menuContribution locationURI="popup:org.eclipse.papyrus.uml.diagram.ui.popupmenu.format">
+ <menu
+ label="Representation"
+ tooltip="Representation">
+ <command
+ commandId="org.eclipse.papyrus.sysml.diagram.parametric.custom.switchConstraintProperty"
+ label="Switch ConstraintProperty representation"
+ style="push"
+ tooltip="Switch ConstraintProperty representation">
+ <visibleWhen>
+ <and>
+ <iterate>
+ <instanceof
+ value="org.eclipse.papyrus.sysml.diagram.parametric.edit.part.CustomConstraintBlockPropertyCompositeEditPart">
+ </instanceof>
+ </iterate>
+ <with
+ variable="selection">
+ <not>
+ <count
+ value="0">
+ </count>
+ </not>
+ </with>
+ </and>
+ </visibleWhen>
+ </command>
+ </menu>
+ <separator
+ name="org.eclipse.papyrus.uml.diagram.menu.popup.separatorRepresentation"
+ visible="true">
+ </separator>
+ </menuContribution>
+
+ <menuContribution locationURI="popup:org.eclipse.papyrus.uml.diagram.ui.popupmenu.filters">
+ <command
+ commandId="org.eclipse.papyrus.sysml.diagram.parametric.custom.showHideConstraintExpression"
+ icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"
+ label="Show/Hide Constraint expression"
+ style="push"
+ tooltip="Show/Hide Constraint expression">
+ <visibleWhen>
+ <and>
+ <iterate>
+ <instanceof
+ value="org.eclipse.papyrus.sysml.diagram.parametric.edit.part.CustomConstraintBlockPropertyCompositeEditPart">
+ </instanceof>
+ </iterate>
+ <with
+ variable="selection">
+ <not>
+ <count
+ value="0">
+ </count>
+ </not>
+ </with>
+ </and>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+</extension>
+
+
+<extension
+ id="update-cmd-binding"
+ point="org.eclipse.ui.bindings">
+ <key
+ commandId="org.eclipse.papyrus.sysml.diagram.parametric.custom.switchConstraintProperty"
+ contextId="org.eclipse.gmf.runtime.diagram.ui.diagramContext"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="CTRL+R">
+ </key>
+</extension>
+
+<!-- Handler for Show/Hide content on Part or Ref. -->
+<extension point="org.eclipse.ui.handlers">
+ <handler class="org.eclipse.papyrus.sysml.diagram.parametric.handler.ShowHideRelatedContentsHandler" commandId="org.eclipse.papyrus.uml.diagram.menu.commands.ShowHideContentsCommand">
+ <activeWhen>
+ <and>
+ <with variable="activeEditor">
+ <test property="org.eclipse.papyrus.uml.diagram.common.diagram.tester.diagramType" value="Parametric" forcePluginActivation="true"></test>
+ </with>
+ <with variable="showHideRelatedContents">
+ <equals value="enabled"></equals>
+ </with>
+ <with variable="selection">
+ <iterate ifEmpty="false" operator="and">
+ <instanceof value="org.eclipse.papyrus.sysml.diagram.common.edit.part.ConstraintBlockPropertyCompositeEditPart"></instanceof>
+ </iterate>
+ </with>
+ </and>
+
+ </activeWhen>
+ </handler>
+ <handler class="org.eclipse.papyrus.sysml.diagram.parametric.handler.ShowHideRelatedContentsHandler" commandId="org.eclipse.papyrus.uml.diagram.menu.commands.ShowHideContentsCommand">
+ <activeWhen>
+ <and>
+ <with variable="activeEditor">
+ <test property="org.eclipse.papyrus.uml.diagram.common.diagram.tester.diagramType" value="Parametric" forcePluginActivation="true"></test>
+ </with>
+ <with variable="showHideRelatedContents">
+ <equals value="enabled"></equals>
+ </with>
+ <with variable="selection">
+ <iterate ifEmpty="false" operator="and">
+ <instanceof value="org.eclipse.papyrus.sysml.diagram.parametric.edit.part.CustomBlockCompositeEditPartTN"></instanceof>
+ </iterate>
+ </with>
+ </and>
+
+ </activeWhen>
+ </handler>
+ <handler class="org.eclipse.papyrus.sysml.diagram.parametric.handler.ShowHideRelatedContentsHandler" commandId="org.eclipse.papyrus.uml.diagram.menu.commands.ShowHideContentsCommand">
+ <activeWhen>
+ <and>
+ <with variable="activeEditor">
+ <test property="org.eclipse.papyrus.uml.diagram.common.diagram.tester.diagramType" value="Parametric" forcePluginActivation="true"></test>
+ </with>
+ <with variable="showHideRelatedContents">
+ <equals value="enabled"></equals>
+ </with>
+ <with variable="selection">
+ <iterate ifEmpty="false" operator="and">
+ <instanceof value="org.eclipse.papyrus.sysml.diagram.common.edit.part.BlockPropertyCompositeEditPart"></instanceof>
+ </iterate>
+ </with>
+ </and>
+
+ </activeWhen>
+ </handler>
+</extension>
+
+<!-- Diagram view providers declaration -->
+<extension point="org.eclipse.gmf.runtime.diagram.core.viewProviders">
+ <!-- Diagram view provider -->
+ <viewProvider class="org.eclipse.papyrus.sysml.diagram.parametric.provider.ParametricDiagramViewProvider">
+ <Priority name="Low"/>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Diagram" semanticHints="Parametric"/>
+ </viewProvider>
+
+ <!-- Custom graphical types view provider -->
+ <viewProvider class="org.eclipse.papyrus.sysml.diagram.parametric.provider.CustomViewProvider">
+ <Priority name="Medium"/>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="UML::Property, UML::Port, SysML::ReferenceProperty, SysML::FlowPort, SysML::FlowPort_Out, SysML::Block, SysML::FlowPort_In, SysML::FlowPort_InOut, SysML::PartProperty, SysML::ConstraintProperty"/>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="shape_sysml_flowport_as_affixed, shape_uml_port_as_affixed, shape_sysml_block_as_composite, shape_sysml_blockproperty_as_composite, shape_sysml_constraintblockproperty_as_composite"/>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="UML::Connector, UML::Dependency"/>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="link_uml_dependency, link_uml_connector"/>
+
+ <!-- Additional descriptors provided in case the semantic hint is is not provided -->
+
+ <!-- "uml.Class" -->
+ <object id="uml.Class" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Class"/>
+ </object>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="uml.Class"/>
+
+ <!-- "uml.Port" -->
+ <object id="uml.Port" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Port"/>
+ </object>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="uml.Port"/>
+
+ <!-- "uml.Property" -->
+ <object id="uml.Property" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Property"/>
+ </object>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="uml.Property"/>
+
+ <!-- "uml.Connector" -->
+ <object id="uml.Connector" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Connector"/>
+ </object>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="uml.Connector"/>
+
+ <!-- "uml.Dependency" -->
+ <object id="uml.Dependency" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Dependency"/>
+ </object>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="uml.Dependency"/>
+ <object id="elementtype.node"
+ class="org.eclipse.papyrus.gmf.diagram.common.commands.ISemanticHintAdapter(org.eclipse.papyrus.sysml.diagram.common)">
+
+ <method
+ name="getSemanticHint()"
+ value="UML::Property, SysML::ActorPartProperty, SysML::ValueProperty, SysML::ReferenceProperty, SysML::FlowPort_In, UML::Port, SysML::FlowPort_Out, SysML::PartProperty, SysML::FlowPort_InOut, SysML::FlowPort, SysML::Block, SysML::FlowPort_NA">
+ </method>
+ </object>
+ <context
+ elements="elementtype.node"
+ viewClass="org.eclipse.gmf.runtime.notation.Node">
+ </context>
+ <object id="elementtype.edge"
+ class="org.eclipse.papyrus.gmf.diagram.common.commands.ISemanticHintAdapter(org.eclipse.papyrus.sysml.diagram.common)">
+ <method
+ name="getSemanticHint()"
+ value="UML::Dependency, UML::Connector">
+ </method>
+ </object>
+ <context
+ elements="elementtype.edge"
+ viewClass="org.eclipse.gmf.runtime.notation.Edge">
+ </context>
+
+ </viewProvider>
+
+ <!-- ViewProvider for inherited elements (from CompositeDiagram ViewProvider) -->
+ <viewProvider class="org.eclipse.papyrus.sysml.diagram.parametric.provider.InheritedCompositeDiagramViewProvider">
+ <Priority name="Low"></Priority>
+
+ <!-- Load the ViewProvider on following SemanticHint related to IElementType(s) used in the palette (also used for legacy elements) -->
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="UML::Comment, UML::Constraint"></context>
+
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="Comment_Shape, Comment_Shape_CN, Constraint_Shape, Constraint_Shape_CN"></context>
+
+ <context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="Comment_AnnotatedElementEdge, Constraint_ConstrainedElementEdge"></context>
+
+ <!-- Additional descriptors provided in case the semantic hint is is not provided -->
+
+ <!-- "uml.Comment" -->
+ <object id="uml.Comment" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Comment"></method>
+ </object>
+
+ <!-- "uml.Constraint" -->
+ <object id="uml.Constraint" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Constraint"></method>
+ </object>
+
+ <!-- Additional activation contexts for nodes semantic objects -->
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" elements="uml.Comment, uml.Constraint"></context>
+
+ </viewProvider>
+</extension>
+
+<!-- Diagram edit part providers declaration -->
+<extension point="org.eclipse.gmf.runtime.diagram.ui.editpartProviders">
+ <!-- Diagram edit part provider -->
+ <editpartProvider class="org.eclipse.papyrus.sysml.diagram.parametric.provider.ParametricDiagramEditPartProvider">
+ <Priority name="Low"/>
+ <object
+ id="org.eclipse.papyrus.sysml.diagram.parametric.Diagram"
+ class="org.eclipse.gmf.runtime.notation.Diagram">
+ <method name="getType()" value="Parametric"/>
+ </object>
+ <context views="org.eclipse.papyrus.sysml.diagram.parametric.Diagram"/>
+ </editpartProvider>
+
+ <!-- Custom graphical types edit part provider -->
+ <editpartProvider class="org.eclipse.papyrus.sysml.diagram.parametric.provider.CustomEditPartProvider">
+ <Priority name="Medium"/>
+
+ <object
+ class="org.eclipse.gmf.runtime.notation.Node(org.eclipse.gmf.runtime.notation)"
+ id="org.eclipse.papyrus.sysml.diagram.parametric.CustomNodeGraphicalTypes">
+ <method name="getType()" value="shape_sysml_flowport_as_affixed, shape_uml_port_as_affixed, shape_sysml_block_as_composite, shape_sysml_blockproperty_as_composite, shape_sysml_constraintblockproperty_as_composite"/>
+ </object>
+
+ <object
+ class="org.eclipse.gmf.runtime.notation.Node(org.eclipse.gmf.runtime.notation)"
+ id="org.eclipse.papyrus.sysml.diagram.parametric.CustomGraphicalTypes_Decorations">
+ <method name="getType()" value="linklabel_uml_connector_source_multiplicity, compartment_sysml_blockproperty_structure, linklabel_uml_connector_target_multiplicity, affixedlabel_sysml_flowport_label, compartment_sysml_structure, affixedlabel_uml_port_label, label_sysml_block_name, linklabel_uml_appliedstereotype, linklabel_uml_namedelement_name, linklabel_uml_connector_label, label_uml_property_label, shape_uml_constraint_as_label, affixedlabel_uml_appliedstereotype"/>
+ </object>
+
+ <context views="org.eclipse.papyrus.sysml.diagram.parametric.CustomNodeGraphicalTypes"/>
+ <context views="org.eclipse.papyrus.sysml.diagram.parametric.CustomGraphicalTypes_Decorations"/>
+
+ <object
+ class="org.eclipse.gmf.runtime.notation.Edge(org.eclipse.gmf.runtime.notation)"
+ id="org.eclipse.papyrus.sysml.diagram.parametric.CustomEdgeGraphicalTypes">
+ <method name="getType()" value="link_uml_dependency, link_uml_connector"/>
+ </object>
+
+ <context views="org.eclipse.papyrus.sysml.diagram.parametric.CustomEdgeGraphicalTypes"/>
+
+ </editpartProvider>
+
+ <!-- EditPartProvider for inherited elements (from CompositeDiagram) -->
+ <editpartProvider class="org.eclipse.papyrus.sysml.diagram.parametric.provider.InheritedCompositeDiagramEditPartProvider">
+ <Priority name="Low"></Priority>
+
+ <object id="COMMENT" class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="Comment_Shape, Comment_BodyLabel"></method>
+ </object>
+ <object id="COMMENT_CN" class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="Comment_Shape_CN, Comment_BodyLabel_CN"></method>
+ </object>
+ <object id="CONSTRAINT" class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="Constraint_Shape, Constraint_NameLabel, Constraint_BodyLabel"></method>
+ </object>
+ <object id="CONSTRAINT_CN" class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="Constraint_Shape_CN, Constraint_NameLabel_CN, Constraint_BodyLabel_CN"></method>
+ </object>
+
+ <object id="COMMENT_ANNOTATED_ELEMENT" class="org.eclipse.gmf.runtime.notation.Edge">
+ <method name="getType()" value="Comment_AnnotatedElementEdge"></method>
+ </object>
+ <object id="CONSTRAINT_CONSTRAINED_ELEMENT" class="org.eclipse.gmf.runtime.notation.Edge">
+ <method name="getType()" value="Constraint_ConstrainedElementEdge"></method>
+ </object>
+
+ <context views="COMMENT, COMMENT_CN, CONSTRAINT, CONSTRAINT_CN"></context>
+ <context views="COMMENT_ANNOTATED_ELEMENT, CONSTRAINT_CONSTRAINED_ELEMENT"></context>
+
+ </editpartProvider>
+
+</extension>
+
+<!-- Diagram edit policy provider -->
+<extension
+ point="org.eclipse.gmf.runtime.diagram.ui.editpolicyProviders">
+ <editpolicyProvider
+ class="org.eclipse.papyrus.sysml.diagram.parametric.provider.CustomEditPolicyProvider">
+ <Priority name="Low"/>
+ </editpolicyProvider>
+</extension>
+
+<!-- Preference pages declaration -->
+<extension point="org.eclipse.ui.preferencePages" id="prefpages">
+
+ <!-- Diagram Preference pages declaration -->
+ <page
+ id="org.eclipse.papyrus.sysml.diagram.parametric.preferences"
+ name="Parametric Diagram"
+ category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams"
+ class="org.eclipse.papyrus.sysml.diagram.parametric.preferences.ParametricDiagramGeneralPreferencePage">
+ </page>
+
+ <!-- Element Preference pages declaration -->
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+</extension>
+
+<!-- // Start of user code custom extensions
+ -->
+<!-- Parser provider declaration -->
+<extension point="org.eclipse.gmf.runtime.common.ui.services.parserProviders">
+ <ParserProvider class="org.eclipse.papyrus.sysml.diagram.parametric.provider.ParserProvider">
+ <Priority name="Low"></Priority>
+ </ParserProvider>
+</extension>
+
+ <!-- Diagram specific advices -->
+<extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypes">
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <!-- specific advices (pop up on creation) -->
+ <adviceBinding id="org.eclipse.papyrus.sysml.service.types.helper.ConstraintParameterEditHelperAdvice"
+ class="org.eclipse.papyrus.sysml.service.types.helper.ConstraintParameterEditHelperAdvice"
+ inheritance="none"
+ typeId="org.eclipse.papyrus.uml.Property"/>
+ </metamodel>
+</extension>
+
+<!-- UML ElementType bindings to Papyrus shared IClientContext -->
+<extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypeBindings">
+ <!-- Bindings declaration to shared IClientContext -->
+ <binding context="org.eclipse.papyrus.infra.services.edit.TypeContext">
+ <elementType ref="org.eclipse.papyrus.sysml.service.types.helper.ConstraintParameterEditHelperAdvice"/>
+ </binding>
+</extension>
+
+<extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypes">
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.sysml.diagram.parametric.Constraint_ContextEdge"
+ name="Constraint Context Edge"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
+ <param name="semanticHint" value="Constraint_ContextEdge"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.sysml.diagram.parametric.Constraint_KeywordLabel"
+ name="Constraint Keyword Label"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
+ <param name="semanticHint" value="Constraint_KeywordLabel"/>
+ </specializationType>
+ </metamodel>
+</extension>
+<!-- // End of user code
+ -->
+<extension point="org.eclipse.papyrus.infra.gmfdiag.common.notationTypesMapping">
+ <diagramMappings diagramID="Parametric">
+ <mapping type="Parametric" humanReadableType="ParametricDiagram"/>
+ <!-- Compartments -->
+ <mapping
+ humanReadableType="structure"
+ type="compartment_sysml_structure">
+ </mapping>
+
+ <mapping
+ humanReadableType="structure"
+ type="compartment_sysml_blockproperty_structure">
+ </mapping>
+
+ <!-- Link labels -->
+
+ <mapping
+ humanReadableType="Label"
+ type="affixedlabel_sysml_flowport_label">
+ </mapping>
+
+ <mapping
+ humanReadableType="Name"
+ type="affixedlabel_uml_appliedstereotype">
+ </mapping>
+
+ <mapping
+ humanReadableType="Label"
+ type="affixedlabel_uml_port_label">
+ </mapping>
+
+ <mapping
+ humanReadableType="Stereotype"
+ type="linklabel_uml_appliedstereotype">
+ </mapping>
+
+ <mapping
+ humanReadableType="Name"
+ type="linklabel_uml_connector_label">
+ </mapping>
+
+ <mapping
+ humanReadableType="SourceMultiplicity"
+ type="linklabel_uml_connector_source_multiplicity">
+ </mapping>
+
+ <mapping
+ humanReadableType="TargetMultiplicity"
+ type="linklabel_uml_connector_target_multiplicity">
+ </mapping>
+
+ <mapping
+ humanReadableType="Name"
+ type="linklabel_uml_namedelement_name">
+ </mapping>
+
+ </diagramMappings>
+</extension>
+
+ <extension
+ point="org.eclipse.papyrus.infra.gmfdiag.common.visualTypeProviders">
+ <visualTypeProvider
+ class="org.eclipse.papyrus.sysml.diagram.parametric.provider.ParametricVisualTypeProvider"
+ diagramType="Parametric">
+ </visualTypeProvider>
+ </extension>
+
+<extension
+ point="org.eclipse.papyrus.infra.gmfdiag.common.diagramReconciler">
+ <diagramReconciler
+ diagramType="Parametric"
+ reconcilerClass="org.eclipse.papyrus.uml.diagram.composite.custom.migration.CompositeReconciler_1_1_0"
+ source="1.0.0"
+ target="1.3.0">
+ </diagramReconciler>
+ <diagramReconciler
+ diagramType="Parametric"
+ reconcilerClass="org.eclipse.papyrus.uml.diagram.composite.custom.migration.CompositeReconcilerForCompartment_1_2_0"
+ source="1.1.0"
+ target="1.3.0">
+ </diagramReconciler>
+ <diagramReconciler
+ diagramType="Parametric"
+ reconcilerClass="org.eclipse.papyrus.uml.diagram.composite.custom.migration.CompositeReconciler_1_2_0"
+ source="1.1.0"
+ target="1.3.0">
+ </diagramReconciler>
+ <diagramReconciler
+ diagramType="Parametric"
+ reconcilerClass="org.eclipse.papyrus.sysml.diagram.parametric.migration.ParametricReconciler_1_2_0"
+ source="1.1.0"
+ target="1.3.0">
+ </diagramReconciler>
+</extension>
+<extension point="org.eclipse.papyrus.infra.gmfdiag.common.paletteDefinition">
+ <paletteDefinition
+ ID="org.eclipse.papyrus.sysml.diagram.parametric.paletteconfiguration"
+ class="org.eclipse.papyrus.infra.gmfdiag.common.service.palette.ExtendedPluginPaletteProvider"
+ name="Papyrus SysML parametric editor Plugin Palette"
+ path="palettes/PapyrusSYSMLParametricDiagram.paletteconfiguration"
+ provider="Eclipse Modeling Project">
+ <Priority
+ name="Lowest">
+ </Priority>
+ <!-- Specify diagram this palette tools relate to -->
+ <editor
+ id="org.eclipse.papyrus.sysml.diagram.parametric">
+ </editor>
+ </paletteDefinition>
+</extension>
+</plugin>
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/pom.xml b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/pom.xml
new file mode 100755
index 0000000..e65165b
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/pom.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.papyrus.sysml</groupId>
+ <artifactId>org.eclipse.papyrus.sysml-diagram</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.papyrus.sysml.diagram.parametric</artifactId>
+ <version>2.0.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project>
\ No newline at end of file
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/ParametricDiagramCreateCommand.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/ParametricDiagramCreateCommand.java
new file mode 100755
index 0000000..2c1a044
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/ParametricDiagramCreateCommand.java
@@ -0,0 +1,184 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * R�gis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ * Laurent Wouters (CEA LIST) laurent.wouters@cea.fr - Viewpoints application
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
+import org.eclipse.gmf.runtime.diagram.core.services.ViewService;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest;
+import org.eclipse.gmf.runtime.notation.Bounds;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.AbstractPapyrusGmfCreateDiagramCommandHandler;
+import org.eclipse.papyrus.infra.gmfdiag.common.helper.DiagramPrototype;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.infra.services.edit.utils.GMFCommandUtils;
+import org.eclipse.papyrus.sysml.blocks.Block;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.parametric.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.commands.SemanticAdapter;
+import org.eclipse.papyrus.uml.diagram.composite.part.UMLDiagramEditorPlugin;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+/**
+ * Represents a creation command for a SysML parametric diagram
+ *
+ * @author Laurent Wouters
+ */
+public class ParametricDiagramCreateCommand extends AbstractPapyrusGmfCreateDiagramCommandHandler {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getDefaultDiagramName() {
+ return "New Parametric Diagram"; //$NON-NLS-1$
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getDiagramNotationID() {
+ return ElementTypes.DIAGRAM_ID;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected PreferencesHint getPreferenceHint() {
+ return Activator.DIAGRAM_PREFERENCES_HINT;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Diagram doCreateDiagram(Resource diagramResource, EObject owner, EObject element, DiagramPrototype prototype, String name) {
+ // Start of user code Custom diagram creation
+ Diagram diagram = null;
+
+ if (element instanceof org.eclipse.uml2.uml.Class) {
+ org.eclipse.uml2.uml.Class cOwner = (org.eclipse.uml2.uml.Class) element;
+ Block block = UMLUtil.getStereotypeApplication(cOwner, Block.class);
+
+ if (block != null) {
+ canvasDomainElement = element;
+ Package owningPackage = ((Element) element).getNearestPackage();
+ diagram = super.doCreateDiagram(diagramResource, owner, owningPackage, prototype, name);
+ }
+
+ } else if (element instanceof Package) {
+
+ try {
+ canvasDomainElement = null;
+ IEditCommandRequest request = new CreateElementRequest(element, SysMLElementTypes.BLOCK);
+ IElementEditService commandService = ElementEditServiceUtils.getCommandProvider(element);
+ if (commandService == null) {
+ return null;
+ }
+
+ ICommand createElementCommand = commandService.getEditCommand(request);
+ if ((createElementCommand != null) && (createElementCommand.canExecute())) {
+ createElementCommand.execute(new NullProgressMonitor(), null);
+ EObject block = GMFCommandUtils.getCommandEObjectResult(createElementCommand);
+ canvasDomainElement = block;
+ diagram = super.doCreateDiagram(diagramResource, owner, element, prototype, name);
+ }
+
+ } catch (ExecutionException e) {
+ e.printStackTrace();
+ }
+
+ }
+
+ return diagram;
+ // End of user code
+ }
+
+ // Start of user code Custom creation command
+ /** Domain Element referenced by canvas if it differs from {@link Package} */
+ protected EObject canvasDomainElement = null;
+
+ /** Default margin for the display of Domain Element referenced by canvas */
+ protected static int DEFAULT_MARGIN = 20;
+
+ /** Default height for the display of Domain Element referenced by canvas */
+ protected static int DEFAULT_HEIGHT = 600;
+
+ /** Default width for the display of Domain Element referenced by canvas */
+ protected static int DEFAULT_WIDTH = 1000;
+
+ /**
+ * Initialize the diagram. The diagram is attached to the element selected on creation.
+ * Possible element types are: Block.
+ */
+ @Override
+ protected void initializeDiagram(EObject diagram) {
+ if (diagram instanceof Diagram) {
+ Diagram currentDiagram = (Diagram) diagram;
+ if (canvasDomainElement != null) {
+ currentDiagram.setElement(canvasDomainElement);
+ initializeDiagramContent(currentDiagram);
+ }
+ }
+ }
+
+ /**
+ * Initialize the diagram with the canvas domain element shown.
+ *
+ * @param diagram
+ * the diagram to initialize
+ */
+ protected void initializeDiagramContent(Diagram diagram) {
+
+ // Create a view for the canvasDomainElement in the new diagram
+ View view =
+ ViewService.getInstance().createNode(new SemanticAdapter(canvasDomainElement, null), diagram, SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID, ViewUtil.APPEND, true, UMLDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT);
+ view.setElement(diagram.getElement());
+
+ // Update the view position and size (should adapt to canvas current size)
+ Bounds viewBounds = (Bounds) ((Node) view).getLayoutConstraint();
+ viewBounds.setX(DEFAULT_MARGIN);
+ viewBounds.setY(DEFAULT_MARGIN);
+ viewBounds.setHeight(DEFAULT_HEIGHT);
+ viewBounds.setWidth(DEFAULT_WIDTH);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @generated NOT
+ */
+ @Override
+ public boolean isParentReassignable() {
+ // Bug 374626: [Model Explorer] Moving an IBD from a block to another block shall be forbidden
+ return false;
+ }
+
+ // End of user code
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/ParametricDiagramEditorFactory.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/ParametricDiagramEditorFactory.java
new file mode 100755
index 0000000..fc8f9f6
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/ParametricDiagramEditorFactory.java
@@ -0,0 +1,25 @@
+/*****************************************************************************
+ * 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:
+ * Régis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric;
+
+import org.eclipse.papyrus.infra.gmfdiag.common.GmfEditorFactory;
+import org.eclipse.papyrus.sysml.diagram.parametric.provider.ElementTypes;
+
+public class ParametricDiagramEditorFactory extends GmfEditorFactory {
+
+ public ParametricDiagramEditorFactory() {
+ super(ParametricDiagramForMultiEditor.class, ElementTypes.DIAGRAM_ID);
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/ParametricDiagramForMultiEditor.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/ParametricDiagramForMultiEditor.java
new file mode 100755
index 0000000..725e124
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/ParametricDiagramForMultiEditor.java
@@ -0,0 +1,133 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * R�gis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 392301
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.emf.common.ui.URIEditorInput;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.papyrus.infra.core.editor.BackboneException;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.internationalization.utils.utils.LabelInternationalization;
+import org.eclipse.papyrus.sysml.diagram.parametric.part.ParametricDiagramEditor;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.PartInitException;
+
+/**
+ * An editor to be used in multitabs editor. This editor extends the original UML Diagram.
+ *
+ */
+public class ParametricDiagramForMultiEditor extends ParametricDiagramEditor {
+
+ /**
+ * The location of diagram icon in the plug-in
+ */
+ private static final String DIAG_IMG_PATH = "icons/obj16/Diagram_Parametric.png";
+
+ /**
+ * The image descriptor of the diagram icon
+ */
+ private static final ImageDescriptor DIAG_IMG_DESC = Activator.getBundledImageDescriptor(ParametricDiagramForMultiEditor.DIAG_IMG_PATH);
+
+ /** The editor splitter. */
+ private Composite splitter;
+
+ private Image titleImage;
+
+ /**
+ * Constructor for SashSystem v2. Context and required objects are retrieved from the
+ * ServiceRegistry.
+ *
+ * @throws BackboneException
+ * @throws ServiceException
+ *
+ */
+ public ParametricDiagramForMultiEditor(ServicesRegistry servicesRegistry, Diagram diagram) throws BackboneException, ServiceException {
+ super(servicesRegistry, diagram);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void init(IEditorSite site, IEditorInput input) throws PartInitException {
+ super.init(site, input);
+ setPartName(LabelInternationalization.getInstance().getDiagramLabel(getDiagram()));
+ titleImage = DIAG_IMG_DESC.createImage();
+ setTitleImage(titleImage);
+ }
+
+ @Override
+ public void dispose() {
+ if (titleImage != null) {
+ titleImage.dispose();
+ titleImage = null;
+ }
+
+ super.dispose();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void setInput(IEditorInput input) {
+ try {
+ // Provide an URI with fragment in order to reuse the same Resource
+ // and set the diagram to the fragment.
+ URIEditorInput uriInput = new URIEditorInput(EcoreUtil.getURI(getDiagram()));
+ doSetInput(uriInput, true);
+ } catch (CoreException x) {
+ String title = "Problem opening";
+ String msg = "Cannot open input element:";
+ Shell shell = getSite().getShell();
+ ErrorDialog.openError(shell, title, msg, x.getStatus());
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void createGraphicalViewer(Composite parent) {
+ splitter = parent;
+ super.createGraphicalViewer(parent);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void setFocus() {
+ splitter.setFocus();
+ super.setFocus();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getEditingDomainID() {
+ return "org.eclipse.papyrus.sysml.diagram.parametric.EditingDomain";
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/edit/part/ParametricDiagramEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/edit/part/ParametricDiagramEditPart.java
new file mode 100755
index 0000000..4f433e7
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/edit/part/ParametricDiagramEditPart.java
@@ -0,0 +1,52 @@
+/*****************************************************************************
+ * 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:
+ * R�gis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.edit.part;
+
+
+
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.gmf.diagram.common.edit.policy.DefaultContainerNodeEditPolicy;
+import org.eclipse.papyrus.gmf.diagram.common.edit.policy.DefaultXYLayoutEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusDiagramEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.internalblock.edit.policy.CustomDragDropEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.parametric.edit.policy.DiagramSemanticEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.parametric.policies.CustomParametricSemanticPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
+
+
+/**
+ *
+ * @Generated NOT //change the super class
+ */
+public class ParametricDiagramEditPart extends PapyrusDiagramEditPart {
+
+ public ParametricDiagramEditPart(View view) {
+ super(view);
+ }
+
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DiagramSemanticEditPolicy());
+ installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDragDropEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new DefaultXYLayoutEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultContainerNodeEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomParametricSemanticPolicy());
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/edit/policy/DiagramSemanticEditPolicy.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/edit/policy/DiagramSemanticEditPolicy.java
new file mode 100755
index 0000000..960b88a
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/edit/policy/DiagramSemanticEditPolicy.java
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ * 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:
+ * Régis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.edit.policy;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gef.requests.ReconnectRequest;
+// Start of user code custom imports
+// End of user code
+import org.eclipse.papyrus.sysml.diagram.parametric.policies.CustomDefaultSemanticEditPolicy;
+
+public class DiagramSemanticEditPolicy extends CustomDefaultSemanticEditPolicy {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getReorientRelationshipSourceCommand(ReconnectRequest request) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getReorientRelationshipTargetCommand(ReconnectRequest request) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getReorientRefRelationshipSourceCommand(ReconnectRequest request) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getReorientRefRelationshipTargetCommand(ReconnectRequest request) {
+ return UnexecutableCommand.INSTANCE;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/edit/policy/ParametricDiagramDragDropEditPolicy.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/edit/policy/ParametricDiagramDragDropEditPolicy.java
new file mode 100755
index 0000000..65653c3
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/edit/policy/ParametricDiagramDragDropEditPolicy.java
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ * 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:
+ * R�gis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.edit.policy;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.gmf.diagram.common.provider.IGraphicalTypeRegistry;
+import org.eclipse.papyrus.sysml.diagram.parametric.provider.GraphicalTypeRegistry;
+import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+
+/** Customization of the DND edit policy for the Parametric Diagram */
+public class ParametricDiagramDragDropEditPolicy extends CustomDiagramDragDropEditPolicy {
+
+ /** Local graphical type registry */
+ protected IGraphicalTypeRegistry registry = new GraphicalTypeRegistry();
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getNodeVisualID(View containerView, EObject domainElement) {
+ String domainType = registry.getNodeGraphicalType(domainElement, containerView.getType());
+ if (org.eclipse.papyrus.infra.gmfdiag.common.providers.IGraphicalTypeRegistry.UNDEFINED_TYPE.equals(domainType)) {
+ return null; // undefined
+ }
+ return domainType;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getLinkWithClassVisualID(EObject domainElement) {
+ String domainType = registry.getEdgeGraphicalType(domainElement);
+ if (org.eclipse.papyrus.infra.gmfdiag.common.providers.IGraphicalTypeRegistry.UNDEFINED_TYPE.equals(domainType)) {
+ return null; // undefined
+ }
+ return domainType;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/factory/DiagramPaletteFactory.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/factory/DiagramPaletteFactory.java
new file mode 100755
index 0000000..a5028a8
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/factory/DiagramPaletteFactory.java
@@ -0,0 +1,77 @@
+/*****************************************************************************
+ * 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:
+ * Régis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.factory;
+
+import java.util.Arrays;
+import java.util.HashMap;
+
+import org.eclipse.gef.Tool;
+import org.eclipse.gmf.runtime.diagram.ui.services.palette.PaletteFactory;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.infra.gmfdiag.common.service.palette.AspectUnspecifiedTypeConnectionTool;
+import org.eclipse.papyrus.infra.gmfdiag.common.service.palette.AspectUnspecifiedTypeCreationTool;
+import org.eclipse.papyrus.sysml.diagram.parametric.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+
+@SuppressWarnings("serial")
+public class DiagramPaletteFactory extends PaletteFactory.Adapter {
+
+ private static HashMap<String, IElementType[]> nodesToolIdTypesMap = new HashMap<String, IElementType[]>() {
+
+ {
+ put("parametric.tool.blockcomposite", new IElementType[] { SysMLElementTypes.BLOCK });
+ put("parametric.tool.blockpropertycomposite", new IElementType[] { SysMLElementTypes.PART_PROPERTY });
+ put("parametric.tool.reference", new IElementType[] { SysMLElementTypes.REFERENCE_PROPERTY });
+ put("parametric.tool.value", new IElementType[] { SysMLElementTypes.VALUE_PROPERTY });
+ put("parametric.tool.constraintblockpropertycomposite", new IElementType[] { SysMLElementTypes.CONSTRAINT_PROPERTY });
+ put("parametric.tool.flowport", new IElementType[] { SysMLElementTypes.FLOW_PORT });
+ put("parametric.tool.port", new IElementType[] { UMLElementTypes.PORT });
+ put("parametric.tool.parameter", new IElementType[] { UMLElementTypes.PROPERTY });
+ // Start of user code Custom nodes
+ put("parametric.tool.constraint", new IElementType[] { UMLElementTypes.CONSTRAINT });
+ put("parametric.tool.comment", new IElementType[] { UMLElementTypes.COMMENT });
+ // End of user code
+ }
+ };
+
+ private static HashMap<String, IElementType[]> edgesToolIdTypesMap = new HashMap<String, IElementType[]>() {
+
+ {
+ put("parametric.tool.connector", new IElementType[] { UMLElementTypes.CONNECTOR });
+ put("parametric.tool.dependency", new IElementType[] { UMLElementTypes.DEPENDENCY });
+ // Start of user code Custom edges
+ put("parametric.tool.comment_constraint_link", new IElementType[] { ElementTypes.COMMENT_ANNOTATED_ELEMENT });
+ put("parametric.tool.context_link", new IElementType[] { ElementTypes.CONTEXT_LINK });
+ // End of user code
+ }
+ };
+
+ @Override
+ public Tool createTool(String toolId) {
+
+ IElementType[] types;
+
+ types = nodesToolIdTypesMap.get(toolId);
+ if (types != null) {
+ return new AspectUnspecifiedTypeCreationTool(Arrays.asList(types));
+ }
+
+ types = edgesToolIdTypesMap.get(toolId);
+ if (types != null) {
+ return new AspectUnspecifiedTypeConnectionTool(Arrays.asList(types));
+ }
+ return null;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/factory/ParametricDiagramViewFactory.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/factory/ParametricDiagramViewFactory.java
new file mode 100755
index 0000000..1599ffc
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/factory/ParametricDiagramViewFactory.java
@@ -0,0 +1,31 @@
+/*****************************************************************************
+ * 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:
+ * Régis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.factory;
+
+import org.eclipse.gmf.runtime.diagram.ui.view.factories.DiagramViewFactory;
+import org.eclipse.gmf.runtime.notation.MeasurementUnit;
+
+public class ParametricDiagramViewFactory extends DiagramViewFactory {
+
+ // Start of user code Custom view Factory field
+ // End of user code
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected MeasurementUnit getMeasurementUnit() {
+ return MeasurementUnit.PIXEL_LITERAL;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/part/ParametricDiagramEditor.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/part/ParametricDiagramEditor.java
new file mode 100755
index 0000000..ef56c9a
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/part/ParametricDiagramEditor.java
@@ -0,0 +1,64 @@
+/*****************************************************************************
+ * 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:
+ * Régis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.part;
+
+import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.sysml.diagram.parametric.Activator;
+
+/**
+ * @generated
+ */
+public class ParametricDiagramEditor extends org.eclipse.papyrus.uml.diagram.composite.part.UMLDiagramEditor {
+
+ /** context used when trying to find services */
+ public static final String ID = "org.eclipse.papyrus.sysml.diagram.parametric.part.ParametricDiagramEditorID"; //$NON-NLS-1$
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getContextID() {
+ return CONTEXT_ID;
+ }
+
+ /**
+ * @throws org.eclipse.papyrus.infra.core.services.ServiceException
+ * @generated
+ */
+ public ParametricDiagramEditor(ServicesRegistry servicesRegistry, Diagram diagram) throws ServiceException, org.eclipse.papyrus.infra.core.services.ServiceException {
+ super(servicesRegistry, diagram);
+ }
+
+ // Start of user code Custom Editor Methods
+ // End of user code
+
+ /**
+ * @generated
+ */
+ @Override
+ public String getContributorId() {
+ return Activator.PLUGIN_ID;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected PreferencesHint getPreferencesHint() {
+ return Activator.DIAGRAM_PREFERENCES_HINT;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/preferences/BlockCompositePreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/preferences/BlockCompositePreferencePage.java
new file mode 100755
index 0000000..0a84ca4
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/preferences/BlockCompositePreferencePage.java
@@ -0,0 +1,96 @@
+/*****************************************************************************
+ * 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:
+ * R�gis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.preferences;
+
+import java.util.Collections;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.parametric.provider.ElementTypes;
+
+public class BlockCompositePreferencePage extends ParametricDiagramNodePreferencePage {
+
+ /** Constant key to access preferences */
+ public static String prefKey = ElementTypes.DIAGRAM_ID + "_" + SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID; //$NON-NLS-1$
+
+ /** The compartments default visibility for preferences */
+ public static final Map<String, Boolean> compartmentDefaultVisibilityMap;
+
+ /** The compartment titles default visibility for preferences */
+ public static final Map<String, Boolean> compartmentTitleDefaultVisibilityMap;
+
+ /** Static attribute initialization */
+ static {
+ compartmentDefaultVisibilityMap = new LinkedHashMap<String, Boolean>();
+ compartmentDefaultVisibilityMap.put("structure", Boolean.TRUE); //$NON-NLS-1$
+
+ compartmentTitleDefaultVisibilityMap = new LinkedHashMap<String, Boolean>();
+ compartmentTitleDefaultVisibilityMap.put("structure", Boolean.TRUE); //$NON-NLS-1$
+
+
+ // Start of user code custom static initializations
+ // End of user code
+
+ Collections.unmodifiableMap(compartmentDefaultVisibilityMap);
+ Collections.unmodifiableMap(compartmentTitleDefaultVisibilityMap);
+ }
+
+ /** Constructor */
+ public BlockCompositePreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_" + SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID); //$NON-NLS-1$
+ }
+
+ /** Default preferences initializer */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ // End of user code
+
+ // Initialize default visibility for compartments in preference page.
+ for (String compartmentName : compartmentDefaultVisibilityMap.keySet()) {
+ String showCompartmentKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_VISIBILITY);
+ store.setDefault(showCompartmentKey, compartmentDefaultVisibilityMap.get(compartmentName));
+ }
+
+ // Initialize default title visibility for compartments in preference page.
+ for (String compartmentName : compartmentTitleDefaultVisibilityMap.keySet()) {
+ String showCompartmentTitleKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_NAME_VISIBILITY);
+ store.setDefault(showCompartmentTitleKey, compartmentTitleDefaultVisibilityMap.get(compartmentName));
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void initializeCompartmentNamesList() {
+ for (String name : compartmentDefaultVisibilityMap.keySet()) {
+ this.compartmentNamesList.add(name);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void initializeCompartmentTitlesList() {
+ for (String name : compartmentTitleDefaultVisibilityMap.keySet()) {
+ this.compartmentTitlesList.add(name);
+ }
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/preferences/CommentAnnotatedElementPreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/preferences/CommentAnnotatedElementPreferencePage.java
new file mode 100755
index 0000000..baf66ca
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/preferences/CommentAnnotatedElementPreferencePage.java
@@ -0,0 +1,43 @@
+/*****************************************************************************
+ * 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:
+ * Régis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.sysml.diagram.parametric.provider.ElementTypes;
+
+public class CommentAnnotatedElementPreferencePage extends ParametricDiagramLinkPreferencePage {
+
+ /** Constant key to access preferences */
+ protected static String prefKey = ElementTypes.DIAGRAM_ID + "_CommentAnnotatedElement"; //$NON-NLS-1$
+
+
+ /** Default constructor */
+ public CommentAnnotatedElementPreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_CommentAnnotatedElement"); //$NON-NLS-1$
+ }
+
+ /**
+ * Initialize defaults using a specified {@link IPreferenceStore}
+ *
+ * @param store
+ * the preference store.
+ */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ // End of user code
+
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/preferences/CommentPreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/preferences/CommentPreferencePage.java
new file mode 100755
index 0000000..9b4a5ec
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/preferences/CommentPreferencePage.java
@@ -0,0 +1,44 @@
+/*****************************************************************************
+ * 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:
+ * Régis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.sysml.diagram.parametric.provider.ElementTypes;
+
+public class CommentPreferencePage extends ParametricDiagramNodePreferencePage {
+
+ /** Constant key to access preferences */
+ protected static String prefKey = ElementTypes.DIAGRAM_ID + "_Comment"; //$NON-NLS-1$
+
+
+ /** Default constructor */
+ public CommentPreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_Comment"); //$NON-NLS-1$
+ }
+
+ /**
+ * Initialize defaults using a specified {@link IPreferenceStore}
+ *
+ * @param store
+ * the preference store.
+ */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ // End of user code
+
+ }
+
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/preferences/ConnectorPreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/preferences/ConnectorPreferencePage.java
new file mode 100755
index 0000000..96d5e64
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/preferences/ConnectorPreferencePage.java
@@ -0,0 +1,36 @@
+/*****************************************************************************
+ * 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:
+ * R�gis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.sysml.diagram.parametric.provider.ElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+
+public class ConnectorPreferencePage extends ParametricDiagramLinkPreferencePage {
+
+ /** Constant key to access preferences */
+ public static String prefKey = ElementTypes.DIAGRAM_ID + "_" + UMLGraphicalTypes.LINK_UML_CONNECTOR_ID; //$NON-NLS-1$
+
+ /** Constructor */
+ public ConnectorPreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_" + UMLGraphicalTypes.LINK_UML_CONNECTOR_ID); //$NON-NLS-1$
+ }
+
+ /** Default preferences initializer */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ // End of user code
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/preferences/ConstraintConstrainedElementPreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/preferences/ConstraintConstrainedElementPreferencePage.java
new file mode 100755
index 0000000..e44b40a
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/preferences/ConstraintConstrainedElementPreferencePage.java
@@ -0,0 +1,43 @@
+/*****************************************************************************
+ * 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:
+ * Régis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.sysml.diagram.parametric.provider.ElementTypes;
+
+public class ConstraintConstrainedElementPreferencePage extends ParametricDiagramLinkPreferencePage {
+
+ /** Constant key to access preferences */
+ protected static String prefKey = ElementTypes.DIAGRAM_ID + "_ConstraintConstrainedElement"; //$NON-NLS-1$
+
+
+ /** Default constructor */
+ public ConstraintConstrainedElementPreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_ConstraintConstrainedElement"); //$NON-NLS-1$
+ }
+
+ /**
+ * Initialize defaults using a specified {@link IPreferenceStore}
+ *
+ * @param store
+ * the preference store.
+ */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ // End of user code
+
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/preferences/ConstraintPreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/preferences/ConstraintPreferencePage.java
new file mode 100755
index 0000000..b36251c
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/preferences/ConstraintPreferencePage.java
@@ -0,0 +1,44 @@
+/*****************************************************************************
+ * 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:
+ * Régis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.sysml.diagram.parametric.provider.ElementTypes;
+
+public class ConstraintPreferencePage extends ParametricDiagramNodePreferencePage {
+
+ /** Constant key to access preferences */
+ protected static String prefKey = ElementTypes.DIAGRAM_ID + "_Constraint"; //$NON-NLS-1$
+
+
+ /** Default constructor */
+ public ConstraintPreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_Constraint"); //$NON-NLS-1$
+ }
+
+ /**
+ * Initialize defaults using a specified {@link IPreferenceStore}
+ *
+ * @param store
+ * the preference store.
+ */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ // End of user code
+
+ }
+
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/preferences/DependencyPreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/preferences/DependencyPreferencePage.java
new file mode 100755
index 0000000..c561639
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/preferences/DependencyPreferencePage.java
@@ -0,0 +1,36 @@
+/*****************************************************************************
+ * 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:
+ * R�gis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.sysml.diagram.parametric.provider.ElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+
+public class DependencyPreferencePage extends ParametricDiagramLinkPreferencePage {
+
+ /** Constant key to access preferences */
+ public static String prefKey = ElementTypes.DIAGRAM_ID + "_" + UMLGraphicalTypes.LINK_UML_DEPENDENCY_ID; //$NON-NLS-1$
+
+ /** Constructor */
+ public DependencyPreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_" + UMLGraphicalTypes.LINK_UML_DEPENDENCY_ID); //$NON-NLS-1$
+ }
+
+ /** Default preferences initializer */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ // End of user code
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/preferences/ParametricDiagramGeneralPreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/preferences/ParametricDiagramGeneralPreferencePage.java
new file mode 100755
index 0000000..7a1d143
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/preferences/ParametricDiagramGeneralPreferencePage.java
@@ -0,0 +1,26 @@
+/*****************************************************************************
+ * 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:
+ * Régis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.preferences;
+
+import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.DiagramPreferencePage;
+import org.eclipse.papyrus.sysml.diagram.internalblock.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.parametric.Activator;
+
+public class ParametricDiagramGeneralPreferencePage extends DiagramPreferencePage {
+
+ public ParametricDiagramGeneralPreferencePage() {
+ setPreferenceStore(Activator.getInstance().getPreferenceStore());
+ setPreferenceKey(ElementTypes.DIAGRAM_ID);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/preferences/ParametricDiagramLinkPreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/preferences/ParametricDiagramLinkPreferencePage.java
new file mode 100755
index 0000000..34d9138
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/preferences/ParametricDiagramLinkPreferencePage.java
@@ -0,0 +1,73 @@
+/*****************************************************************************
+ * 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:
+ * R�gis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.preferences;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.TreeMap;
+
+import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusLinkPreferencePage;
+import org.eclipse.papyrus.infra.gmfdiag.preferences.ui.OrderedLabelGroup;
+import org.eclipse.papyrus.sysml.diagram.parametric.Activator;
+import org.eclipse.swt.widgets.Composite;
+
+public class ParametricDiagramLinkPreferencePage extends AbstractPapyrusLinkPreferencePage {
+
+ /** The list of label names for this link */
+ protected List<String> labelsList;
+
+ /** Constructor */
+ public ParametricDiagramLinkPreferencePage() {
+ labelsList = new ArrayList<String>();
+ initializeLabelsList();
+ Collections.unmodifiableList(labelsList);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void createPageContents(Composite parent) {
+ super.createPageContents(parent);
+
+ // Add label visibility group
+ if (!labelsList.isEmpty()) {
+ OrderedLabelGroup compartmentGroup = new OrderedLabelGroup(parent, getPreferenceKey(), this, labelsList);
+ addPreferenceGroup(compartmentGroup);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getBundleId() {
+ return Activator.PLUGIN_ID;
+ }
+
+ /** Initialize the list containing names of labels. */
+ protected void initializeLabelsList() {
+ // Implemented by subclasses.
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected final TreeMap<String, String> getLabelRole() {
+ return new TreeMap<String, String>();
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/preferences/ParametricDiagramNodePreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/preferences/ParametricDiagramNodePreferencePage.java
new file mode 100755
index 0000000..241a468
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/preferences/ParametricDiagramNodePreferencePage.java
@@ -0,0 +1,119 @@
+/*****************************************************************************
+ * 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:
+ * R�gis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.preferences;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.TreeMap;
+
+import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusNodePreferencePage;
+import org.eclipse.papyrus.infra.gmfdiag.preferences.ui.OrderedCompartmentGroup;
+import org.eclipse.papyrus.infra.gmfdiag.preferences.ui.OrderedLabelGroup;
+import org.eclipse.papyrus.sysml.diagram.parametric.Activator;
+import org.eclipse.swt.widgets.Composite;
+
+public class ParametricDiagramNodePreferencePage extends AbstractPapyrusNodePreferencePage {
+
+ /** The list owning the names of compartments */
+ protected List<String> compartmentNamesList;
+
+ /** The list owning the names of compartment that have a title */
+ protected List<String> compartmentTitlesList;
+
+ /** The list of label names for this node */
+ protected List<String> labelsList;
+
+ /** Constructor */
+ public ParametricDiagramNodePreferencePage() {
+ this.labelsList = new ArrayList<String>();
+ this.compartmentNamesList = new ArrayList<String>();
+ this.compartmentTitlesList = new ArrayList<String>();
+
+ initializeLabelsList();
+ initializeCompartmentNamesList();
+ initializeCompartmentTitlesList();
+
+ Collections.unmodifiableList(labelsList);
+ Collections.unmodifiableList(compartmentNamesList);
+ Collections.unmodifiableList(compartmentTitlesList);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void createPageContents(Composite parent) {
+ super.createPageContents(parent);
+
+ // Add compartments visibility group
+ if (!compartmentNamesList.isEmpty()) {
+ OrderedCompartmentGroup compartmentGroup = new OrderedCompartmentGroup(parent, getPreferenceKey(), this, compartmentNamesList, compartmentTitlesList, getPreferenceStore());
+ addPreferenceGroup(compartmentGroup);
+ }
+
+ // Add label visibility group
+ if (!labelsList.isEmpty()) {
+ OrderedLabelGroup compartmentGroup = new OrderedLabelGroup(parent, getPreferenceKey(), this, labelsList);
+ addPreferenceGroup(compartmentGroup);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getBundleId() {
+ return Activator.PLUGIN_ID;
+ }
+
+ /** Initialize the list containing names of labels. */
+ protected void initializeLabelsList() {
+ // Implemented by subclasses.
+ }
+
+ /** Initialize the list containing the names of compartments. */
+ protected void initializeCompartmentNamesList() {
+ // Implemented by subclasses.
+ }
+
+ /** Initialize the list containing the names of compartment that have titles. */
+ protected void initializeCompartmentTitlesList() {
+ // Implemented by subclasses.
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected final TreeMap<String, String> getLabelRole() {
+ return new TreeMap<String, String>();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected final TreeMap<String, Boolean> getCompartmentTitleVisibilityPreferences() {
+ return new TreeMap<String, Boolean>();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected final void initializeCompartmentsList() {
+ compartmentsList = Collections.emptyList();
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/preferences/ParametricDiagramPreferenceInitializer.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/preferences/ParametricDiagramPreferenceInitializer.java
new file mode 100755
index 0000000..560e1b4
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/preferences/ParametricDiagramPreferenceInitializer.java
@@ -0,0 +1,39 @@
+/*****************************************************************************
+ * 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:
+ * Régis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.preferences;
+
+import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.sysml.diagram.parametric.Activator;
+
+public class ParametricDiagramPreferenceInitializer extends AbstractPreferenceInitializer {
+
+ protected IPreferenceStore getPreferenceStore() {
+ return Activator.getInstance().getPreferenceStore();
+ }
+
+ @Override
+ public void initializeDefaultPreferences() {
+ IPreferenceStore store = getPreferenceStore();
+
+ org.eclipse.papyrus.sysml.diagram.parametric.preferences.ConstraintPreferencePage.initDefaults(store);
+ org.eclipse.papyrus.sysml.diagram.parametric.preferences.CommentPreferencePage.initDefaults(store);
+ org.eclipse.papyrus.sysml.diagram.parametric.preferences.CommentAnnotatedElementPreferencePage.initDefaults(store);
+ BlockCompositePreferencePage.initDefaults(store);
+ BlockPropertyCompositePreferencePage.initDefaults(store);
+ ConnectorPreferencePage.initDefaults(store);
+ DependencyPreferencePage.initDefaults(store);
+
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/provider/CustomEditPartProvider.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/provider/CustomEditPartProvider.java
new file mode 100755
index 0000000..f63c671
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/provider/CustomEditPartProvider.java
@@ -0,0 +1,133 @@
+/*****************************************************************************
+ * 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:
+ * Régis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.provider;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.gmf.runtime.common.core.service.IOperation;
+import org.eclipse.gmf.runtime.diagram.ui.services.editpart.CreateGraphicEditPartOperation;
+import org.eclipse.gmf.runtime.diagram.ui.services.editpart.IEditPartOperation;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.gmf.diagram.common.provider.CustomAbstractEditPartProvider;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.BlockPropertyStructureCompartmentEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.FlowPortAffixedLabelNameEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.FlowPortAffixedNodeEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.StructureCompartmentEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.parametric.edit.part.CustomBlockCompositeEditPartTN;
+import org.eclipse.papyrus.sysml.diagram.parametric.edit.part.CustomBlockLabelNameEditPart;
+import org.eclipse.papyrus.sysml.diagram.parametric.edit.part.CustomBlockPropertyCompositeEditPart;
+import org.eclipse.papyrus.sysml.diagram.parametric.edit.part.CustomConstraintBlockPropertyCompositeEditPart;
+import org.eclipse.papyrus.sysml.diagram.parametric.edit.part.CustomConstraintParameterAffixedNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.AppliedStereotypeAffixedLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.AppliedStereotypeLinkLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.ConnectorEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.ConnectorLinkLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.ConnectorLinkLabelSourceMultiplicityEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.ConnectorLinkLabelTargetMultiplicityEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.ConstraintNodeLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.DependencyEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.NamedElementLinkLabelNameEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.PortAffixedLabelNameEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.PortAffixedNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.PropertyNodeLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+
+public class CustomEditPartProvider extends CustomAbstractEditPartProvider {
+
+ /** Map containing node view types supported by this provider */
+ protected Map<String, Class<?>> nodeMap = new HashMap<String, Class<?>>();
+
+ /** Map containing edge view types supported by this provider */
+ protected Map<String, Class<?>> edgeMap = new HashMap<String, Class<?>>();
+
+ /** Default constructor */
+ public CustomEditPartProvider() {
+ super();
+
+ diagramType = ElementTypes.DIAGRAM_ID;
+
+ // Nodes
+ nodeMap.put(SysMLGraphicalTypes.SHAPE_SYSML_CONSTRAINTBLOCKPROPERTY_AS_COMPOSITE_ID, CustomConstraintBlockPropertyCompositeEditPart.class);
+ nodeMap.put(SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, CustomBlockPropertyCompositeEditPart.class);
+ nodeMap.put(SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID, CustomBlockCompositeEditPartTN.class);
+ nodeMap.put(SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID, FlowPortAffixedNodeEditPart.class);
+ nodeMap.put(UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID, PortAffixedNodeEditPart.class);
+ nodeMap.put(UMLGraphicalTypes.SHAPE_UML_PROPERTY_AS_AFFIXED_ID, CustomConstraintParameterAffixedNodeEditPart.class);
+
+ // Decorations
+ nodeMap.put(SysMLGraphicalTypes.AFFIXEDLABEL_SYSML_FLOWPORT_LABEL_ID, FlowPortAffixedLabelNameEditPart.class);
+ nodeMap.put(SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID, BlockPropertyStructureCompartmentEditPart.class);
+ nodeMap.put(SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID, StructureCompartmentEditPart.class);
+ nodeMap.put(SysMLGraphicalTypes.LABEL_SYSML_BLOCK_NAME_ID, CustomBlockLabelNameEditPart.class); // TODO : change for multi FlowText
+ nodeMap.put(UMLGraphicalTypes.AFFIXEDLABEL_UML_APPLIEDSTEREOTYPE_ID, AppliedStereotypeAffixedLabelEditPart.class);
+ nodeMap.put(UMLGraphicalTypes.AFFIXEDLABEL_UML_PORT_LABEL_ID, PortAffixedLabelNameEditPart.class);
+ nodeMap.put(UMLGraphicalTypes.LABEL_UML_PROPERTY_LABEL_ID, PropertyNodeLabelEditPart.class);
+ nodeMap.put(UMLGraphicalTypes.SHAPE_UML_CONSTRAINT_AS_LABEL_ID, ConstraintNodeLabelEditPart.class);
+ nodeMap.put(UMLGraphicalTypes.LINKLABEL_UML_APPLIEDSTEREOTYPE_ID, AppliedStereotypeLinkLabelEditPart.class);
+ nodeMap.put(UMLGraphicalTypes.LINKLABEL_UML_CONNECTOR_LABEL_ID, ConnectorLinkLabelEditPart.class);
+ nodeMap.put(UMLGraphicalTypes.LINKLABEL_UML_CONNECTOR_SOURCE_MULTIPLICITY_ID, ConnectorLinkLabelSourceMultiplicityEditPart.class);
+ nodeMap.put(UMLGraphicalTypes.LINKLABEL_UML_CONNECTOR_TARGET_MULTIPLICITY_ID, ConnectorLinkLabelTargetMultiplicityEditPart.class);
+ nodeMap.put(UMLGraphicalTypes.LINKLABEL_UML_NAMEDELEMENT_NAME_ID, NamedElementLinkLabelNameEditPart.class);
+
+
+ // Edges
+ edgeMap.put(UMLGraphicalTypes.LINK_UML_CONNECTOR_ID, ConnectorEditPart.class);
+ edgeMap.put(UMLGraphicalTypes.LINK_UML_DEPENDENCY_ID, DependencyEditPart.class);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean provides(IOperation operation) {
+ if (operation instanceof CreateGraphicEditPartOperation) {
+ View newView = ((IEditPartOperation) operation).getView();
+ if (newView == null) {
+ return false;
+ }
+
+ String graphicalType = newView.getType();
+
+ if ((newView instanceof Node) && (!nodeMap.containsKey(graphicalType))) {
+ return false;
+ }
+
+ if ((newView instanceof Edge) && (!edgeMap.containsKey(graphicalType))) {
+ return false;
+ }
+ }
+
+ return super.provides(operation);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Class<?> getNodeEditPartClass(View view) {
+ return nodeMap.get(view.getType());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Class<?> getEdgeEditPartClass(View view) {
+ return edgeMap.get(view.getType());
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/provider/CustomGraphicalTypeRegistry.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/provider/CustomGraphicalTypeRegistry.java
new file mode 100755
index 0000000..0d20a3b
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/provider/CustomGraphicalTypeRegistry.java
@@ -0,0 +1,255 @@
+/*****************************************************************************
+ * 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:
+ * Régis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.provider;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.emf.type.core.ISpecializationType;
+import org.eclipse.papyrus.sysml.constraints.ConstraintBlock;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+public class CustomGraphicalTypeRegistry extends GraphicalTypeRegistry {
+
+ /** Default constructor */
+ public CustomGraphicalTypeRegistry() {
+
+ super();
+
+ // Nodes
+ knownNodes.add(SysMLGraphicalTypes.SHAPE_SYSML_CONSTRAINTBLOCKPROPERTY_AS_COMPOSITE_ID);
+ knownNodes.add(SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID);
+ knownNodes.add(SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ knownNodes.add(SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID);
+ knownNodes.add(UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID);
+ knownNodes.add(UMLGraphicalTypes.SHAPE_UML_PROPERTY_AS_AFFIXED_ID);
+ // Decorations
+ knownNodes.add(SysMLGraphicalTypes.AFFIXEDLABEL_SYSML_FLOWPORT_LABEL_ID);
+ knownNodes.add(SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ knownNodes.add(SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+ knownNodes.add(SysMLGraphicalTypes.LABEL_SYSML_BLOCK_NAME_ID);
+ knownNodes.add(UMLGraphicalTypes.AFFIXEDLABEL_UML_APPLIEDSTEREOTYPE_ID);
+ knownNodes.add(UMLGraphicalTypes.AFFIXEDLABEL_UML_PORT_LABEL_ID);
+ knownNodes.add(UMLGraphicalTypes.LABEL_UML_PROPERTY_LABEL_ID);
+ knownNodes.add(UMLGraphicalTypes.SHAPE_UML_CONSTRAINT_AS_LABEL_ID);
+ knownNodes.add(UMLGraphicalTypes.LINKLABEL_UML_APPLIEDSTEREOTYPE_ID);
+ knownNodes.add(UMLGraphicalTypes.LINKLABEL_UML_CONNECTOR_LABEL_ID);
+ knownNodes.add(UMLGraphicalTypes.LINKLABEL_UML_CONNECTOR_SOURCE_MULTIPLICITY_ID);
+ knownNodes.add(UMLGraphicalTypes.LINKLABEL_UML_CONNECTOR_TARGET_MULTIPLICITY_ID);
+ knownNodes.add(UMLGraphicalTypes.LINKLABEL_UML_NAMEDELEMENT_NAME_ID);
+
+ // Edges
+ knownEdges.add(UMLGraphicalTypes.LINK_UML_CONNECTOR_ID);
+ knownEdges.add(UMLGraphicalTypes.LINK_UML_DEPENDENCY_ID);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getNodeGraphicalType(EObject domainElement, String containerType) {
+ // Start of user code getNodeGraphicalType(EObject domainElement, String containerType)
+ // End of user code
+
+ if (((ISpecializationType) SysMLElementTypes.BLOCK).getMatcher().matches(domainElement)) {
+ if (ElementTypes.DIAGRAM_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+ if (((ISpecializationType) SysMLElementTypes.CONSTRAINT_PROPERTY).getMatcher().matches(domainElement)) {
+ if (SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID.equals(domainElement)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_CONSTRAINTBLOCKPROPERTY_AS_COMPOSITE_ID;
+ }
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_CONSTRAINTBLOCKPROPERTY_AS_COMPOSITE_ID;
+ }
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_CONSTRAINTBLOCKPROPERTY_AS_COMPOSITE_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+
+ // These element are only authorized on Block, not in Constraint Block. In ConstraintBlock it must become a ConstraintParameter
+ if (UMLUtil.getStereotypeApplication((Element) domainElement.eContainer(), ConstraintBlock.class) == null) {
+ if (((ISpecializationType) SysMLElementTypes.PART_PROPERTY).getMatcher().matches(domainElement)) {
+ if (SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID;
+ }
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID;
+ }
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+ if (((ISpecializationType) SysMLElementTypes.REFERENCE_PROPERTY).getMatcher().matches(domainElement)) {
+ if (SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID;
+ }
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID;
+ }
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+ if (((ISpecializationType) SysMLElementTypes.VALUE_PROPERTY).getMatcher().matches(domainElement)) {
+ if (SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID;
+ }
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID;
+ }
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+ }
+ // Order is important for Part/Reference/ConstraintProperty which are also Property
+ if (UMLElementTypes.PROPERTY.getEClass().isInstance(domainElement)) {
+ if (SysMLGraphicalTypes.SHAPE_SYSML_CONSTRAINTBLOCKPROPERTY_AS_COMPOSITE_ID.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_PROPERTY_AS_AFFIXED_ID;
+ }
+ if (SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_PROPERTY_AS_AFFIXED_ID;
+ }
+ return UNDEFINED_TYPE;
+
+ }
+ if (((ISpecializationType) SysMLElementTypes.BLOCK).getMatcher().matches(domainElement)) {
+ if (ElementTypes.DIAGRAM_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+ return super.getNodeGraphicalType(domainElement, containerType);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getNodeGraphicalType(String proposedType, String containerType) {
+ // Start of user code getNodeGraphicalType(String proposedType, String containerType)
+ // End of user code
+
+ if (SysMLElementTypes.BLOCK.getSemanticHint().equals(proposedType)) {
+ if (ElementTypes.DIAGRAM_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+
+ if (UMLElementTypes.PROPERTY.getSemanticHint().equals(proposedType)) {
+ if (SysMLGraphicalTypes.SHAPE_SYSML_CONSTRAINTBLOCKPROPERTY_AS_COMPOSITE_ID.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_PROPERTY_AS_AFFIXED_ID;
+ }
+ if (SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID.equals(containerType)) {
+ return UMLGraphicalTypes.SHAPE_UML_PROPERTY_AS_AFFIXED_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+
+ if (SysMLElementTypes.CONSTRAINT_PROPERTY.getSemanticHint().equals(proposedType)) {
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID.equals(containerType)) {
+
+ return SysMLGraphicalTypes.SHAPE_SYSML_CONSTRAINTBLOCKPROPERTY_AS_COMPOSITE_ID;
+ }
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_CONSTRAINTBLOCKPROPERTY_AS_COMPOSITE_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+
+ if (SysMLElementTypes.PART_PROPERTY.getSemanticHint().equals(proposedType)) {
+ if (SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID;
+ }
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID;
+ }
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+ if (SysMLElementTypes.REFERENCE_PROPERTY.getSemanticHint().equals(proposedType)) {
+ if (SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID;
+ }
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID;
+ }
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+ if (SysMLElementTypes.VALUE_PROPERTY.getSemanticHint().equals(proposedType)) {
+ if (SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID;
+ }
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID;
+ }
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID.equals(containerType)) {
+ return SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID;
+ }
+ return UNDEFINED_TYPE;
+ }
+ return super.getNodeGraphicalType(proposedType, containerType);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getEdgeGraphicalType(EObject domainElement) {
+ // Start of user code getEdgeGraphicalType(EObject domainElement)
+ // End of user code
+
+ if (UMLElementTypes.CONNECTOR.getEClass().isInstance(domainElement)) {
+ return UMLGraphicalTypes.LINK_UML_CONNECTOR_ID;
+ }
+ if (UMLElementTypes.DEPENDENCY.getEClass().isInstance(domainElement)) {
+ return UMLGraphicalTypes.LINK_UML_DEPENDENCY_ID;
+ }
+ return super.getEdgeGraphicalType(domainElement);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getEdgeGraphicalType(String proposedType) {
+ // Start of user code getEdgeGraphicalType(String proposedType)
+ // End of user code
+
+ if (UMLElementTypes.CONNECTOR.getSemanticHint().equals(proposedType)) {
+ return UMLGraphicalTypes.LINK_UML_CONNECTOR_ID;
+ }
+ if (UMLElementTypes.DEPENDENCY.getSemanticHint().equals(proposedType)) {
+ return UMLGraphicalTypes.LINK_UML_DEPENDENCY_ID;
+ }
+ return super.getEdgeGraphicalType(proposedType);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/provider/CustomGraphicalTypes.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/provider/CustomGraphicalTypes.java
new file mode 100755
index 0000000..51ddb08
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/provider/CustomGraphicalTypes.java
@@ -0,0 +1,26 @@
+/*****************************************************************************
+ * 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:
+ * Régis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.provider;
+
+public class CustomGraphicalTypes {
+
+ /** ********************************************************* */
+ /** Diagram custom graphical types id *********************** */
+ /** ********************************************************* */
+
+
+
+
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/provider/CustomViewProvider.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/provider/CustomViewProvider.java
new file mode 100755
index 0000000..318d7a1
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/provider/CustomViewProvider.java
@@ -0,0 +1,100 @@
+/*****************************************************************************
+ * 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:
+ * Régis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.provider;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.gmf.diagram.common.factory.AffixedLabelViewFactory;
+import org.eclipse.papyrus.gmf.diagram.common.factory.CompartmentShapeViewFactory;
+import org.eclipse.papyrus.gmf.diagram.common.factory.ConnectorLabelViewFactory;
+import org.eclipse.papyrus.gmf.diagram.common.factory.InnerLabelViewFactory;
+import org.eclipse.papyrus.gmf.diagram.common.provider.CustomAbstractViewProvider;
+import org.eclipse.papyrus.sysml.diagram.common.factory.BlockCompositeClassifierViewFactory;
+import org.eclipse.papyrus.sysml.diagram.common.factory.BlockPropertyCompositeClassifierViewFactory;
+import org.eclipse.papyrus.sysml.diagram.common.factory.ConstraintBlockPropertyCompositeClassifierViewFactory;
+import org.eclipse.papyrus.sysml.diagram.common.factory.FlowPortAffixedNodeViewFactory;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.uml.diagram.common.factory.ConnectorLinkViewFactory;
+import org.eclipse.papyrus.uml.diagram.common.factory.ConstraintPropertyAffixedNodeViewFactory;
+import org.eclipse.papyrus.uml.diagram.common.factory.DependencyLinkViewFactory;
+import org.eclipse.papyrus.uml.diagram.common.factory.PortAffixedNodeViewFactory;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+
+public class CustomViewProvider extends CustomAbstractViewProvider {
+
+ /** Map containing node view types supported by this provider */
+ protected Map<String, Class<?>> nodeMap = new HashMap<String, Class<?>>();
+
+ /** Map containing edge view types supported by this provider */
+ protected Map<String, Class<?>> edgeMap = new HashMap<String, Class<?>>();
+
+ /** Default constructor */
+ public CustomViewProvider() {
+ super();
+ this.registry = new CustomGraphicalTypeRegistry();
+
+ diagramType = ElementTypes.DIAGRAM_ID;
+
+ // Custom classifier nodes
+ nodeMap.put(SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID, BlockCompositeClassifierViewFactory.class);
+ nodeMap.put(SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, BlockPropertyCompositeClassifierViewFactory.class);
+ nodeMap.put(SysMLGraphicalTypes.SHAPE_SYSML_CONSTRAINTBLOCKPROPERTY_AS_COMPOSITE_ID, ConstraintBlockPropertyCompositeClassifierViewFactory.class);
+ nodeMap.put(UMLGraphicalTypes.SHAPE_UML_PROPERTY_AS_AFFIXED_ID, ConstraintPropertyAffixedNodeViewFactory.class);
+ // Custom affixed nodes
+ nodeMap.put(SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID, FlowPortAffixedNodeViewFactory.class);
+ nodeMap.put(UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID, PortAffixedNodeViewFactory.class);
+ // Custom child node labels
+ // Custom inner labels
+ nodeMap.put(SysMLGraphicalTypes.LABEL_SYSML_BLOCK_NAME_ID, InnerLabelViewFactory.class);
+ nodeMap.put(UMLGraphicalTypes.LABEL_UML_PROPERTY_LABEL_ID, InnerLabelViewFactory.class);
+ nodeMap.put(UMLGraphicalTypes.SHAPE_UML_CONSTRAINT_AS_LABEL_ID, InnerLabelViewFactory.class);
+ // Custom compartments
+ nodeMap.put(SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID, CompartmentShapeViewFactory.class);
+ nodeMap.put(SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID, CompartmentShapeViewFactory.class);
+ // Custom affixed labels
+ nodeMap.put(SysMLGraphicalTypes.AFFIXEDLABEL_SYSML_FLOWPORT_LABEL_ID, AffixedLabelViewFactory.class);
+ nodeMap.put(UMLGraphicalTypes.AFFIXEDLABEL_UML_APPLIEDSTEREOTYPE_ID, AffixedLabelViewFactory.class);
+ nodeMap.put(UMLGraphicalTypes.AFFIXEDLABEL_UML_PORT_LABEL_ID, AffixedLabelViewFactory.class);
+
+ // Custom edges
+ edgeMap.put(UMLGraphicalTypes.LINK_UML_CONNECTOR_ID, ConnectorLinkViewFactory.class);
+ edgeMap.put(UMLGraphicalTypes.LINK_UML_DEPENDENCY_ID, DependencyLinkViewFactory.class);
+
+ // Custom edge labels
+ nodeMap.put(UMLGraphicalTypes.LINKLABEL_UML_APPLIEDSTEREOTYPE_ID, ConnectorLabelViewFactory.class);
+ nodeMap.put(UMLGraphicalTypes.LINKLABEL_UML_CONNECTOR_LABEL_ID, ConnectorLabelViewFactory.class);
+ nodeMap.put(UMLGraphicalTypes.LINKLABEL_UML_CONNECTOR_SOURCE_MULTIPLICITY_ID, ConnectorLabelViewFactory.class);
+ nodeMap.put(UMLGraphicalTypes.LINKLABEL_UML_CONNECTOR_TARGET_MULTIPLICITY_ID, ConnectorLabelViewFactory.class);
+ nodeMap.put(UMLGraphicalTypes.LINKLABEL_UML_NAMEDELEMENT_NAME_ID, ConnectorLabelViewFactory.class);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Class<?> getNodeViewClass(IAdaptable semanticAdapter, View containerView, String graphicalType) {
+ return nodeMap.get(graphicalType);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Class<?> getEdgeViewClass(IAdaptable semanticAdapter, View containerView, String graphicalType) {
+ return edgeMap.get(graphicalType);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/provider/ElementTypes.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/provider/ElementTypes.java
new file mode 100755
index 0000000..8270300
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/provider/ElementTypes.java
@@ -0,0 +1,75 @@
+/*****************************************************************************
+ * 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:
+ * R�gis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.provider;
+
+import org.eclipse.gmf.runtime.emf.type.core.AbstractElementTypeEnumerator;
+import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.CommentBodyEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.CommentBodyEditPartCN;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ConstraintNameEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ConstraintNameEditPartCN;
+import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintSpecificationEditPart;
+import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintSpecificationEditPartCN;
+import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
+
+public class ElementTypes extends AbstractElementTypeEnumerator {
+
+ /** ********************************************************* */
+ /** SysML Parametric Diagram specific elements **************** */
+ /** ********************************************************* */
+
+ /** SysML Parametric Diagram :: Diagram */
+ public static final String DIAGRAM_ID = "Parametric";
+
+
+
+
+ /** ********************************************************* */
+ /** SysML Parametric Diagram - CompositeDiagram related elements */
+ /** ********************************************************* */
+
+ /** CompositeDiagram :: CONSTRAINT */
+ public static final IHintedType CONSTRAINT = (IHintedType) UMLElementTypes.Constraint_Shape;
+
+ public static final String CONSTRAINT_LABEL_NAME_HINT = ConstraintNameEditPart.VISUAL_ID;
+
+ public static final String CONSTRAINT_LABEL_SPECIFICATION_HINT = ConstraintSpecificationEditPart.VISUAL_ID;
+
+ /** CompositeDiagram :: COMMENT_CN */
+ public static final IHintedType COMMENT_CN = (IHintedType) UMLElementTypes.Comment_Shape_CN;
+
+ public static final String COMMENT_CN_LABEL_BODY_HINT = CommentBodyEditPartCN.VISUAL_ID;
+
+ /** CompositeDiagram :: COMMENT */
+ public static final IHintedType COMMENT = (IHintedType) UMLElementTypes.Comment_Shape;
+
+ public static final String COMMENT_LABEL_BODY_HINT = CommentBodyEditPart.VISUAL_ID;
+
+ /** CompositeDiagram :: CONSTRAINT_CN */
+ public static final IHintedType CONSTRAINT_CN = (IHintedType) UMLElementTypes.Constraint_Shape_CN;
+
+ public static final String CONSTRAINT_CN_LABEL_NAME_HINT = ConstraintNameEditPartCN.VISUAL_ID;
+
+ public static final String CONSTRAINT_CN_LABEL_SPECIFICATION_HINT = ConstraintSpecificationEditPartCN.VISUAL_ID;
+
+ /** CompositeDiagram :: COMMENT_ANNOTATED_ELEMENT */
+ public static final IHintedType COMMENT_ANNOTATED_ELEMENT = (IHintedType) UMLElementTypes.Comment_AnnotatedElementEdge;
+
+ /** CompositeDiagram :: CONTEXT_LINK */
+ public static final IHintedType CONTEXT_LINK = (IHintedType) getElementType("org.eclipse.papyrus.sysml.diagram.parametric.Constraint_ContextEdge"); //$NON-NLS-1$
+
+ /** CompositeDiagram :: CONContextLinkAppliedStereotype */
+ public static final IHintedType CONTEXT_LINK_APPLIED_STEREOTYPE = (IHintedType) getElementType("org.eclipse.papyrus.sysml.diagram.parametric.Constraint_KeywordLabel"); //$NON-NLS-1$
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/provider/GraphicalTypeRegistry.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/provider/GraphicalTypeRegistry.java
new file mode 100755
index 0000000..186fd31
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/provider/GraphicalTypeRegistry.java
@@ -0,0 +1,201 @@
+/*****************************************************************************
+ * 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:
+ * Régis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.provider;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
+import org.eclipse.papyrus.gmf.diagram.common.provider.IGraphicalTypeRegistry;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+
+/**
+ * <pre>
+ * This class provides graphical type id (used as View type) for
+ * domain element according to their actual or expected graphical
+ * container type.
+ * </pre>
+ */
+public class GraphicalTypeRegistry implements IGraphicalTypeRegistry {
+
+ /** A Set containing all known node graphical types */
+ protected Set<String> knownNodes = new HashSet<String>();
+
+ /** A Set containing all known edge graphical types */
+ protected Set<String> knownEdges = new HashSet<String>();
+
+ /** Default constructor */
+ public GraphicalTypeRegistry() {
+
+ // Fill known edges set
+ knownEdges.add(ElementTypes.COMMENT_ANNOTATED_ELEMENT.getSemanticHint());
+ knownEdges.add(ElementTypes.CONTEXT_LINK.getSemanticHint());
+ knownEdges.add(ElementTypes.CONTEXT_LINK_APPLIED_STEREOTYPE.getSemanticHint());
+
+ // Fill known nodes set (primary nodes)
+ knownNodes.add(UMLElementTypes.CONSTRAINT.getSemanticHint());
+ knownNodes.add(UMLElementTypes.COMMENT.getSemanticHint());
+
+ knownNodes.add(ElementTypes.CONSTRAINT.getSemanticHint());
+ knownNodes.add(ElementTypes.COMMENT_CN.getSemanticHint());
+ knownNodes.add(ElementTypes.COMMENT.getSemanticHint());
+ knownNodes.add(ElementTypes.CONSTRAINT_CN.getSemanticHint());
+
+ // Fill known nodes set (child label nodes)
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getEdgeGraphicalType(EObject domainElement) {
+
+ String graphicalType = UNDEFINED_TYPE;
+ if (domainElement == null) {
+ return UNDEFINED_TYPE;
+ }
+ return graphicalType;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getEdgeGraphicalType(IElementType elementType) {
+ if (elementType instanceof IHintedType) {
+ String semanticHint = ((IHintedType) elementType).getSemanticHint();
+ return getEdgeGraphicalType(semanticHint);
+ }
+
+ return UNDEFINED_TYPE;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getEdgeGraphicalType(String proposedType) {
+ if (isKnownEdgeType(proposedType)) {
+ return proposedType;
+ }
+
+ return UNDEFINED_TYPE;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getNodeGraphicalType(EObject domainElement, String containerType) {
+
+ String graphicalType = UNDEFINED_TYPE;
+ if ((containerType == null) || (domainElement == null)) {
+ return UNDEFINED_TYPE;
+ }
+
+ if (domainElement instanceof org.eclipse.uml2.uml.Constraint) {
+ if (ElementTypes.DIAGRAM_ID.equals(containerType)) { // Constraint TopNode
+ graphicalType = ElementTypes.CONSTRAINT.getSemanticHint();
+ }
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID.equals(containerType)) {
+ graphicalType = ElementTypes.CONSTRAINT_CN.getSemanticHint();
+ }
+
+ }
+
+ if (domainElement instanceof org.eclipse.uml2.uml.Comment) {
+ if (ElementTypes.DIAGRAM_ID.equals(containerType)) { // Comment TopNode
+ graphicalType = ElementTypes.COMMENT.getSemanticHint();
+ }
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID.equals(containerType)) {
+ graphicalType = ElementTypes.COMMENT_CN.getSemanticHint();
+ }
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID.equals(containerType)) {
+ graphicalType = ElementTypes.COMMENT_CN.getSemanticHint();
+ }
+
+ }
+
+ return graphicalType;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getNodeGraphicalType(IElementType elementType, String containerType) {
+ if (elementType instanceof IHintedType) {
+ String semanticHint = ((IHintedType) elementType).getSemanticHint();
+ return getNodeGraphicalType(semanticHint, containerType);
+ }
+
+ return UNDEFINED_TYPE;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getNodeGraphicalType(String proposedType, String containerType) {
+ if ((UMLElementTypes.COMMENT.getSemanticHint().equals(proposedType))) {
+
+ if (ElementTypes.DIAGRAM_ID.equals(containerType)) { // Constraint TopNode
+ return ElementTypes.COMMENT.getSemanticHint();
+ }
+
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID.equals(containerType)) {
+ return ElementTypes.COMMENT_CN.getSemanticHint();
+ }
+
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID.equals(containerType)) {
+ return ElementTypes.COMMENT_CN.getSemanticHint();
+ }
+
+ return UNDEFINED_TYPE;
+ }
+
+ if (UMLElementTypes.CONSTRAINT.getSemanticHint().equals(proposedType)) {
+
+ if (ElementTypes.DIAGRAM_ID.equals(containerType)) { // Constraint TopNode
+ return ElementTypes.CONSTRAINT.getSemanticHint();
+ }
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID.equals(containerType)) {
+ return ElementTypes.CONSTRAINT_CN.getSemanticHint();
+ }
+
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID.equals(containerType)) {
+ return ElementTypes.CONSTRAINT_CN.getSemanticHint();
+ }
+
+
+ return UNDEFINED_TYPE;
+ }
+ if (isKnownNodeType(proposedType)) {
+ return proposedType;
+ }
+
+ return UNDEFINED_TYPE;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isKnownEdgeType(String type) {
+ return knownEdges.contains(type);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isKnownNodeType(String type) {
+ return knownNodes.contains(type);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/provider/IGraphicalTypeRegistry.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/provider/IGraphicalTypeRegistry.java
new file mode 100755
index 0000000..a3f92e3
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/provider/IGraphicalTypeRegistry.java
@@ -0,0 +1,110 @@
+/*****************************************************************************
+ * 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:
+ * Régis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.provider;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+
+/**
+ * This interface provides an API for accessing the local graphical type registry.
+ * This registry provides a graphical type for existing model elements.
+ */
+public interface IGraphicalTypeRegistry {
+
+ /** Constant for undefined graphical type */
+ public static final String UNDEFINED_TYPE = "undefined_type";
+
+ /**
+ * Get a valid edge graphical type for the domain element.
+ *
+ * @param domainElement
+ * the domain element.
+ * @return the domain element graphical type.
+ */
+ public String getEdgeGraphicalType(EObject domainElement);
+
+ /**
+ * Get a valid edge graphical type for the element type.
+ *
+ * @param elementType
+ * the element type.
+ * @param containerType
+ * the type of the graphical owner of the domain element.
+ * @return the domain element graphical type.
+ */
+ public String getEdgeGraphicalType(IElementType elementType);
+
+ /**
+ * Get a valid edge graphical type for the proposed type.
+ *
+ * @param proposedType
+ * the proposed type.
+ * @param containerType
+ * the type of the graphical owner of the domain element.
+ * @return the domain element graphical type.
+ */
+ public String getEdgeGraphicalType(String proposedType);
+
+ /**
+ * Get a valid node graphical type for the domain element.
+ *
+ * @param domainElement
+ * the domain element.
+ * @param containerType
+ * the type of the graphical owner of the domain element.
+ * @return the domain element graphical type.
+ */
+ public String getNodeGraphicalType(EObject domainElement, String containerType);
+
+ /**
+ * Get a valid node graphical type for the element type.
+ *
+ * @param elementType
+ * the element type.
+ * @param containerType
+ * the type of the graphical owner of the domain element.
+ * @return the domain element graphical type.
+ */
+ public String getNodeGraphicalType(IElementType elementType, String containerType);
+
+ /**
+ * Get a valid node graphical type for the proposed type.
+ *
+ * @param proposedType
+ * the proposed type.
+ * @param containerType
+ * the type of the graphical owner of the domain element.
+ * @return the domain element graphical type.
+ */
+ public String getNodeGraphicalType(String proposedType, String containerType);
+
+ /**
+ * Test if the type is a known edge graphical type in this diagram
+ *
+ * @param type
+ * the type to test
+ * @return true if the type is known
+ */
+ public boolean isKnownEdgeType(String type);
+
+ /**
+ * Test if the type is a known node graphical type in this diagram
+ *
+ * @param type
+ * the type to test
+ * @return true if the type is known
+ */
+ public boolean isKnownNodeType(String type);
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/provider/InheritedCompositeDiagramEditPartProvider.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/provider/InheritedCompositeDiagramEditPartProvider.java
new file mode 100755
index 0000000..05a7d55
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/provider/InheritedCompositeDiagramEditPartProvider.java
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ * 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:
+ * R�gis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.provider;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.service.IOperation;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.services.editpart.CreateGraphicEditPartOperation;
+import org.eclipse.gmf.runtime.diagram.ui.services.editpart.IEditPartOperation;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ContextLinkAppliedStereotypeEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ContextLinkEditPart;
+import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.composite.providers.UMLEditPartProvider;
+
+public class InheritedCompositeDiagramEditPartProvider extends UMLEditPartProvider {
+
+ @Override
+ protected IGraphicalEditPart createEditPart(View view) {
+ String visualID = UMLVisualIDRegistry.getVisualID(view);
+ if (ContextLinkEditPart.VISUAL_ID.equals(visualID)) {
+ return new ContextLinkEditPart(view);
+ }
+ if (ContextLinkAppliedStereotypeEditPart.VISUAL_ID.equals(visualID)) {
+ return new ContextLinkAppliedStereotypeEditPart(view);
+ }
+ return super.createEditPart(view);
+ }
+
+ @Override
+ public synchronized boolean provides(IOperation operation) {
+ if (operation instanceof CreateGraphicEditPartOperation) {
+ View view = ((IEditPartOperation) operation).getView();
+
+ // Ensure current diagram is a Parametric Diagram
+ if (!ElementTypes.DIAGRAM_ID.equals(view.getDiagram().getType())) {
+ return false;
+ }
+
+ // Test supported inherited types
+ EObject eobject = view.getElement();
+
+ /** Nodes (and ChildLabelNodes) *********** */
+ if (eobject instanceof org.eclipse.uml2.uml.Constraint) {
+ return true;
+ }
+ if (eobject instanceof org.eclipse.uml2.uml.Comment) {
+ return true;
+ }
+
+ // Additional test needed here to decide whether to support Feature type links.
+ // As feature type link are not related to a MetaClass from the domain model
+ // they are not already handled by previous tests.
+ // Also concerns NotationType.
+ String hint = view.getType();
+
+ /** Edges (Feature) : COMMENT_ANNOTATED_ELEMENT *********** */
+ if (ElementTypes.COMMENT_ANNOTATED_ELEMENT.getSemanticHint().equals(hint)) {
+ return true;
+ }
+ /** Edges (Feature) : CONSTRAINT_CONSTRAINED_ELEMENT *********** */
+ if (ElementTypes.CONTEXT_LINK.getSemanticHint().equals(hint)) {
+ return true;
+ }
+ if (ElementTypes.CONTEXT_LINK_APPLIED_STEREOTYPE.getSemanticHint().equals(hint)) {
+ return true;
+ }
+
+ }
+ return false;
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/provider/InheritedCompositeDiagramViewProvider.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/provider/InheritedCompositeDiagramViewProvider.java
new file mode 100755
index 0000000..3098ae1
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/provider/InheritedCompositeDiagramViewProvider.java
@@ -0,0 +1,217 @@
+/*****************************************************************************
+ * 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:
+ * R�gis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.provider;
+
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EcoreFactory;
+import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
+import org.eclipse.gmf.runtime.diagram.core.services.view.CreateEdgeViewOperation;
+import org.eclipse.gmf.runtime.diagram.core.services.view.CreateNodeViewOperation;
+import org.eclipse.gmf.runtime.diagram.core.services.view.CreateViewForKindOperation;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.gmf.diagram.common.provider.IGraphicalTypeRegistry;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.parametric.Activator;
+import org.eclipse.papyrus.uml.diagram.common.commands.SemanticAdapter;
+import org.eclipse.papyrus.uml.diagram.composite.providers.UMLViewProvider;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+
+public class InheritedCompositeDiagramViewProvider extends UMLViewProvider {
+
+ /** Local graphical type registry */
+ protected IGraphicalTypeRegistry registry = new GraphicalTypeRegistry();
+
+ @Override
+ public Edge createEdge(IAdaptable semanticAdapter, View containerView, String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Edge createdEdge = null;
+
+ IElementType elementType = (IElementType) semanticAdapter.getAdapter(IElementType.class);
+ if (elementType != null) {
+ if (elementType == ElementTypes.CONTEXT_LINK) {
+ org.eclipse.papyrus.uml.diagram.clazz.providers.UMLViewProvider classDiagramUMLProvider = new org.eclipse.papyrus.uml.diagram.clazz.providers.UMLViewProvider();
+ createdEdge = classDiagramUMLProvider.createConstraint_ContextEdge(containerView, index, persisted, preferencesHint);
+ }
+ else {
+ createdEdge = super.createEdge(semanticAdapter, containerView, semanticHint, index, persisted, preferencesHint);
+ }
+ }
+
+ if (createdEdge == null) {
+ Activator.log.error(new Exception("Could not create Edge."));
+ }
+
+ return createdEdge;
+ }
+
+ @Override
+ protected boolean provides(CreateViewForKindOperation op) {
+ // Never use this method (often incorrectly implemented due to GMF Tooling choices).
+ String diagramType = op.getContainerView().getDiagram().getType();
+ if (!ElementTypes.DIAGRAM_ID.equals(diagramType)) {
+ return false;
+ }
+
+ throw new UnsupportedOperationException("Should never be called by the " + diagramType + " diagram.");
+ }
+
+ @Override
+ protected boolean provides(CreateEdgeViewOperation op) {
+
+ // Must have a container
+ if (op.getContainerView() == null) {
+ return false;
+ }
+
+ // This provider is registered for InternalBlock Diagram only
+ String diagramType = op.getContainerView().getDiagram().getType();
+ if (!ElementTypes.DIAGRAM_ID.equals(diagramType)) {
+ return false;
+ }
+
+ IElementType elementType = getSemanticElementType(op.getSemanticAdapter());
+ if (elementType == ElementTypes.COMMENT_ANNOTATED_ELEMENT) {
+ return true;
+ }
+ if (elementType == ElementTypes.CONTEXT_LINK) {
+ return true;
+ }
+
+ // /////////////////////////////////////////////////////////////////////
+ // Test possibility to provide a view based on the semantic nature and its expected container.
+ // /////////////////////////////////////////////////////////////////////
+
+ // IElementType may be null (especially when drop from ModelExplorer).
+ // In such a case, test the semantic EObject instead.
+ if (elementType == null) {
+ EObject domainElement = (EObject) op.getSemanticAdapter().getAdapter(EObject.class);
+ String domainElementGraphicalType = op.getSemanticHint();
+ if (domainElementGraphicalType == null) {
+ domainElementGraphicalType = registry.getEdgeGraphicalType(domainElement);
+ }
+
+ if ((!org.eclipse.papyrus.infra.gmfdiag.common.providers.IGraphicalTypeRegistry.UNDEFINED_TYPE.equals(domainElementGraphicalType)) && (registry.isKnownEdgeType(domainElementGraphicalType))) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ @Override
+ protected boolean provides(CreateNodeViewOperation op) {
+ // Must have a container
+ if (op.getContainerView() == null) {
+ return false;
+ }
+ // Get the type of the container
+ String containerGraphicalType = op.getContainerView().getType();
+
+ // This provider is registered for InternalBlock Diagram only
+ String diagramType = op.getContainerView().getDiagram().getType();
+ if (!ElementTypes.DIAGRAM_ID.equals(diagramType)) {
+ return false;
+ }
+
+ // /////////////////////////////////////////////////////////////////////
+ // Test possibility to provide a view based on the ElementType and its expected container.
+ // /////////////////////////////////////////////////////////////////////
+
+ IElementType elementType = (IElementType) op.getSemanticAdapter().getAdapter(IElementType.class);
+ if (elementType == UMLElementTypes.CONSTRAINT) {
+ if (ElementTypes.DIAGRAM_ID.equals(containerGraphicalType)) {
+ return true;
+ }
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID.equals(containerGraphicalType)) {
+ return true;
+ }
+ }
+ if (elementType == UMLElementTypes.COMMENT) {
+ if (ElementTypes.DIAGRAM_ID.equals(containerGraphicalType)) {
+ return true;
+ }
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID.equals(containerGraphicalType)) {
+ return true;
+ }
+ if (SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID.equals(containerGraphicalType)) {
+ return true;
+ }
+ }
+
+ // /////////////////////////////////////////////////////////////////////
+ // Test possibility to provide a view based on the semantic nature and its expected container.
+ // /////////////////////////////////////////////////////////////////////
+
+ // IElementType may be null (especially when drop from ModelExplorer).
+ // In such a case, test the semantic EObject instead.
+ if (elementType == null) {
+ EObject domainElement = (EObject) op.getSemanticAdapter().getAdapter(EObject.class);
+ String domainElementGraphicalType = op.getSemanticHint();
+ if (domainElementGraphicalType == null) {
+ domainElementGraphicalType = registry.getNodeGraphicalType(domainElement, containerGraphicalType);
+ } else {
+ domainElementGraphicalType = registry.getNodeGraphicalType(domainElementGraphicalType, containerGraphicalType);
+ }
+
+ if ((!org.eclipse.papyrus.infra.gmfdiag.common.providers.IGraphicalTypeRegistry.UNDEFINED_TYPE.equals(domainElementGraphicalType)) && (registry.isKnownNodeType(domainElementGraphicalType))) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ @Override
+ public Node createNode(IAdaptable semanticAdapter, View containerView, String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) {
+
+ // Use the GraphicalTypeRegistry to find the expected type for a domain element
+ // Get the type of the container
+ String containerGraphicalType = containerView.getType();
+
+ // Get the type of the domain element
+ EObject domainElement = (EObject) semanticAdapter.getAdapter(EObject.class);
+
+ if (semanticHint != null) {
+ // Look for a possible graphicalType replacement
+ String graphicalType = registry.getNodeGraphicalType(semanticHint, containerGraphicalType);
+ return super.createNode(new SemanticAdapter(domainElement, null), containerView, graphicalType, index, persisted, preferencesHint);
+ }
+
+ String domainElementGraphicalType = registry.getNodeGraphicalType(domainElement, containerGraphicalType);
+
+ // Create the expected node
+ if (!org.eclipse.papyrus.infra.gmfdiag.common.providers.IGraphicalTypeRegistry.UNDEFINED_TYPE.equals(domainElementGraphicalType)) {
+ return super.createNode(semanticAdapter, containerView, domainElementGraphicalType, index, persisted, preferencesHint);
+ }
+
+ Activator.log.error(new Exception("Could not create Node."));
+ return null;
+ }
+
+
+ @Override
+ protected void stampShortcut(View containerView, Node target) {
+ if (!ElementTypes.DIAGRAM_ID.equals(containerView.getDiagram().getType())) {
+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation();
+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$
+ shortcutAnnotation.getDetails().put("modelID", ElementTypes.DIAGRAM_ID); //$NON-NLS-1$
+ target.getEAnnotations().add(shortcutAnnotation);
+ }
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/provider/ParametricDiagramEditPartProvider.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/provider/ParametricDiagramEditPartProvider.java
new file mode 100755
index 0000000..3666d0c
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/provider/ParametricDiagramEditPartProvider.java
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ * 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:
+ * Régis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.provider;
+
+import org.eclipse.gmf.runtime.common.core.service.IOperation;
+import org.eclipse.gmf.runtime.diagram.ui.services.editpart.AbstractEditPartProvider;
+import org.eclipse.gmf.runtime.diagram.ui.services.editpart.CreateGraphicEditPartOperation;
+import org.eclipse.gmf.runtime.diagram.ui.services.editpart.IEditPartOperation;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.parametric.Activator;
+import org.eclipse.papyrus.sysml.diagram.parametric.edit.part.ParametricDiagramEditPart;
+
+public class ParametricDiagramEditPartProvider extends AbstractEditPartProvider {
+
+ @Override
+ public boolean provides(IOperation operation) {
+ if (operation instanceof CreateGraphicEditPartOperation) {
+ View view = ((IEditPartOperation) operation).getView();
+
+ // Ensure current diagram is Parametric Diagram
+ if (ElementTypes.DIAGRAM_ID.equals(view.getType())) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ @Override
+ protected Class<?> getDiagramEditPartClass(View view) {
+ if (ElementTypes.DIAGRAM_ID.equals(view.getType())) {
+ return ParametricDiagramEditPart.class;
+ }
+
+ Activator.log.error(new Exception("Could not create EditPart."));
+ return null;
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/provider/ParametricDiagramEditPolicyProvider.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/provider/ParametricDiagramEditPolicyProvider.java
new file mode 100755
index 0000000..a483e66
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/provider/ParametricDiagramEditPolicyProvider.java
@@ -0,0 +1,63 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Régis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.provider;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.common.core.service.AbstractProvider;
+import org.eclipse.gmf.runtime.common.core.service.IOperation;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.services.editpolicy.CreateEditPoliciesOperation;
+import org.eclipse.gmf.runtime.diagram.ui.services.editpolicy.IEditPolicyProvider;
+import org.eclipse.papyrus.sysml.diagram.internalblock.edit.policy.CustomDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.PortAffixedNodeEditPart;
+
+public class ParametricDiagramEditPolicyProvider extends AbstractProvider implements IEditPolicyProvider {
+
+ public boolean provides(IOperation operation) {
+
+ CreateEditPoliciesOperation epOperation = (CreateEditPoliciesOperation) operation;
+ if (!(epOperation.getEditPart() instanceof GraphicalEditPart)) {
+ return false;
+ }
+ GraphicalEditPart gep = (GraphicalEditPart) epOperation.getEditPart();
+ String diagramType = gep.getNotationView().getDiagram().getType();
+ if (!ElementTypes.DIAGRAM_ID.equals(diagramType)) {
+ return false;
+ }
+
+ if (gep instanceof org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintEditPart) {
+ return true;
+ }
+ if (gep instanceof PortAffixedNodeEditPart) {
+ return true;
+ }
+ if (gep instanceof org.eclipse.papyrus.uml.diagram.composite.edit.parts.UseCaseEditPartCN) {
+ return true;
+ }
+ if (gep instanceof org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentEditPart) {
+ return true;
+ }
+ if (gep instanceof org.eclipse.papyrus.uml.diagram.composite.edit.parts.InteractionConstraintEditPartCN) {
+ return true;
+ }
+
+ return false;
+ }
+
+ public void createEditPolicies(EditPart editPart) {
+ editPart.installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDragDropEditPolicy());
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/provider/ParametricDiagramViewProvider.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/provider/ParametricDiagramViewProvider.java
new file mode 100755
index 0000000..bb6d608
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/provider/ParametricDiagramViewProvider.java
@@ -0,0 +1,43 @@
+/*****************************************************************************
+ * 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:
+ * Régis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.provider;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.gmf.runtime.diagram.core.providers.AbstractViewProvider;
+import org.eclipse.gmf.runtime.diagram.core.services.view.CreateDiagramViewOperation;
+import org.eclipse.papyrus.sysml.diagram.parametric.Activator;
+import org.eclipse.papyrus.sysml.diagram.parametric.factory.ParametricDiagramViewFactory;
+
+public class ParametricDiagramViewProvider extends AbstractViewProvider {
+
+ @Override
+ protected boolean provides(CreateDiagramViewOperation operation) {
+
+ if (ElementTypes.DIAGRAM_ID.equals(operation.getSemanticHint())) {
+ return true;
+ }
+
+ return false;
+ }
+
+ @Override
+ protected Class<?> getDiagramViewClass(IAdaptable semanticAdapter, String diagramKind) {
+ if (ElementTypes.DIAGRAM_ID.equals(diagramKind)) {
+ return ParametricDiagramViewFactory.class;
+ }
+
+ Activator.log.error(new Exception("Could not create View."));
+ return null;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/utils/ParametricDiagramGraphicalTypes.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/utils/ParametricDiagramGraphicalTypes.java
new file mode 100755
index 0000000..a49f14b
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/utils/ParametricDiagramGraphicalTypes.java
@@ -0,0 +1,22 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Régis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.utils;
+
+public class ParametricDiagramGraphicalTypes {
+
+ /** ********************************************************* */
+ /** Diagram custom graphical types id *********************** */
+ /** ********************************************************* */
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/Activator.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/Activator.java
new file mode 100755
index 0000000..761cc1f
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/Activator.java
@@ -0,0 +1,107 @@
+/*****************************************************************************
+ * 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:
+ * Régis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric;
+
+import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.papyrus.infra.core.log.LogHelper;
+import org.eclipse.papyrus.sysml.diagram.parametric.preferences.CustomPreferenceInitializer;
+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.sysml.diagram.parametric";
+
+ /** The plug-in shared instance */
+ private static Activator plugin;
+
+ /** The logging helper */
+ public static LogHelper log;
+
+ /** The plug-in Preference store */
+ public static final PreferencesHint DIAGRAM_PREFERENCES_HINT = new PreferencesHint(PLUGIN_ID);
+
+ /** Default constructor */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+
+ // register the login helper
+ log = new LogHelper(plugin);
+
+ // register the preference store
+ PreferencesHint.registerPreferenceStore(DIAGRAM_PREFERENCES_HINT, getPreferenceStore());
+
+ // Preferences initialization
+ CustomPreferenceInitializer diagramPreferenceInitializer = new CustomPreferenceInitializer();
+ diagramPreferenceInitializer.initializeDefaultPreferences();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getInstance() {
+ return plugin;
+ }
+
+ /**
+ * Returns an image descriptor for the image file at the given plug-in relative path.
+ *
+ * @generated
+ * @param path
+ * the path
+ * @return the image descriptor
+ */
+ public static ImageDescriptor getBundledImageDescriptor(String path) {
+ return AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, path);
+ }
+
+ /**
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#getPreferenceStore()
+ *
+ * @return Shared Preference Store.
+ */
+ @Override
+ public IPreferenceStore getPreferenceStore() {
+ IPreferenceStore store = org.eclipse.papyrus.infra.gmfdiag.preferences.Activator.getDefault().getPreferenceStore();
+ return store;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/ParametricDiagramCondition.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/ParametricDiagramCondition.java
new file mode 100755
index 0000000..7d051b7
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/ParametricDiagramCondition.java
@@ -0,0 +1,32 @@
+/*****************************************************************************
+ * 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:
+ * chevrel.regis@gmail.com
+ * CEA LIST - Initial API and implementation
+ * Laurent Wouters (CEA LIST) laurent.wouters@cea.fr - Viewpoints application
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.infra.ui.extension.commands.PerspectiveContextDependence;
+
+/**
+ * ParametricDiagramCondition to set conditions for the diagram creation
+ */
+public class ParametricDiagramCondition extends PerspectiveContextDependence {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean create(EObject selectedElement) {
+ return false;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/commands/CustomBindingConnectorCreateCommand.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/commands/CustomBindingConnectorCreateCommand.java
new file mode 100755
index 0000000..80089b8
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/commands/CustomBindingConnectorCreateCommand.java
@@ -0,0 +1,155 @@
+/*****************************************************************************
+ * 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:
+ * Régis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.commands;
+
+import java.util.List;
+
+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.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.sysml.blocks.Block;
+import org.eclipse.papyrus.sysml.blocks.BlocksPackage;
+import org.eclipse.papyrus.sysml.diagram.common.utils.ConstraintBlockHelper;
+import org.eclipse.papyrus.uml.service.types.utils.ConnectorUtils;
+import org.eclipse.papyrus.uml.service.types.utils.RequestParameterUtils;
+import org.eclipse.uml2.uml.Connector;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.StructuredClassifier;
+import org.eclipse.uml2.uml.Type;
+import org.eclipse.uml2.uml.util.UMLUtil;
+import org.eclipse.uml2.uml.util.UMLUtil.StereotypeApplicationHelper;
+
+/**
+ *
+ */
+public class CustomBindingConnectorCreateCommand extends EditElementCommand {
+
+ private final EObject source;
+ private final EObject target;
+
+ public CustomBindingConnectorCreateCommand(final CreateRelationshipRequest request) {
+ super(request.getLabel(), null, request);
+ this.source = request.getSource();
+ this.target = request.getTarget();
+ }
+
+ /**
+ * A BindingConnector could be created in Parametric only if at least one end is a ConstraintParameter.
+ * Also check Block.isEncapsulated (could not cross a Block which is encapsulted)
+ *
+ * @return
+ */
+ @Override
+ public boolean canExecute() {
+ if (this.source == null) {
+ return false;
+ }
+ if (this.target == null) {
+ return true;
+ }
+ if (this.source == this.target) {
+ return false;
+ }
+ if (this.source != null && this.target != null) {
+
+ boolean hasEncapsulationViolation = !checkEncapsulationCrossing();
+
+ return hasEncapsulationViolation ? false :
+ // one of the end must be a ConstraintParameter
+ ConstraintBlockHelper.isConstraintParameter((Element) source, RequestParameterUtils.getSourceView(getRequest()))
+ || ConstraintBlockHelper.isConstraintParameter((Element) target, RequestParameterUtils.getTargetView(getRequest()));
+ }
+ return false;
+ }
+
+ /**
+ * Check that BindingConnector do not cross a "Block.isEncapsulated" Part/Reference/ConstraintProperty
+ *
+ * @return true no encapsulation problem, false else
+ */
+ private boolean checkEncapsulationCrossing() {
+ org.eclipse.papyrus.sysml.service.types.utils.ConnectorUtils util = new org.eclipse.papyrus.sysml.service.types.utils.ConnectorUtils();
+
+ // source end - get the nestedPath
+ List<Property> nestedPropertyPath = util.getNestedPropertyPath(RequestParameterUtils.getSourceView(getRequest()), RequestParameterUtils.getTargetView(getRequest()));
+ // check for each level of path if crossing an isEncapsultaed Block
+ for (Property property : nestedPropertyPath) {
+ Type type = property.getType();
+ Block stereotypeApplication = UMLUtil.getStereotypeApplication(type, Block.class);
+ if (stereotypeApplication != null) {
+ if (stereotypeApplication.isEncapsulated()) {
+ return false;
+ }
+ }
+ }
+
+ // target end - get the nestedPath
+ nestedPropertyPath = util.getNestedPropertyPath(RequestParameterUtils.getTargetView(getRequest()), RequestParameterUtils.getSourceView(getRequest()));
+ // check for each level of path if crossing an isEncapsultaed Block
+ for (Property property : nestedPropertyPath) {
+ Type type = property.getType();
+ Block stereotypeApplication = UMLUtil.getStereotypeApplication(type, Block.class);
+ if (stereotypeApplication != null) {
+ if (stereotypeApplication.isEncapsulated()) {
+ return false;
+ }
+ }
+ }
+ return true;
+ }
+
+ /**
+ * Create the connector, affect its owner, calculate nestedPath
+ *
+ * @param monitor
+ * @param info
+ * @return CommandResult contains the created Connector
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
+
+ if (!canExecute()) {
+ throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
+ }
+
+ // Create the Connector and its ConnectorEnd. Correct container are set and paths are set in case of <<NestedConnectorEnd>>.
+ StructuredClassifier deducedContainer = new ConnectorUtils().deduceContainer(RequestParameterUtils.getSourceView(getRequest()), RequestParameterUtils.getTargetView(getRequest()));
+ ((CreateRelationshipRequest) getRequest()).setContainer(deducedContainer);
+ IElementEditService commandProvider = ElementEditServiceUtils.getCommandProvider(deducedContainer);
+ ICommand editCommand = commandProvider.getEditCommand(getRequest());
+
+ if (editCommand.canExecute()) {
+ editCommand.execute(monitor, info);
+ Object newObject = editCommand.getCommandResult().getReturnValue();
+
+ if (newObject instanceof Connector) {
+ Connector connector = (Connector) newObject;
+ // Apply the <<BindingConnector>> stereotype
+ StereotypeApplicationHelper.INSTANCE.applyStereotype(connector, BlocksPackage.eINSTANCE.getBindingConnector());
+ }
+
+ return CommandResult.newOKCommandResult(newObject);
+ }
+ return CommandResult.newErrorCommandResult("Invalid arguments in create link command");
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/commands/CustomBindingConnectorReorientCommand.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/commands/CustomBindingConnectorReorientCommand.java
new file mode 100755
index 0000000..86c945d
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/commands/CustomBindingConnectorReorientCommand.java
@@ -0,0 +1,265 @@
+/*****************************************************************************
+ * 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:
+ * Régis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.commands;
+
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRequest;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.sysml.blocks.Block;
+import org.eclipse.papyrus.sysml.blocks.BlocksPackage;
+import org.eclipse.papyrus.sysml.blocks.NestedConnectorEnd;
+import org.eclipse.papyrus.sysml.diagram.common.utils.ConstraintBlockHelper;
+import org.eclipse.papyrus.sysml.service.types.utils.ConnectorUtils;
+import org.eclipse.papyrus.uml.diagram.common.util.CrossReferencerUtil;
+import org.eclipse.papyrus.uml.service.types.command.ConnectorReorientCommand;
+import org.eclipse.uml2.uml.Connector;
+import org.eclipse.uml2.uml.ConnectorEnd;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.StructuredClassifier;
+import org.eclipse.uml2.uml.Type;
+import org.eclipse.uml2.uml.util.UMLUtil;
+import org.eclipse.uml2.uml.util.UMLUtil.StereotypeApplicationHelper;
+
+public class CustomBindingConnectorReorientCommand extends ConnectorReorientCommand {
+
+ private final EObject source;
+
+ private final EObject target;
+
+ public CustomBindingConnectorReorientCommand(ReorientReferenceRelationshipRequestWithGraphical request) {
+ super(request);
+ source = reorientDirection == ReorientRequest.REORIENT_SOURCE ? request.getNewRelationshipEnd() : request.getReferenceOwner();
+ target = reorientDirection == ReorientRequest.REORIENT_SOURCE ? request.getReferenceOwner() : request.getNewRelationshipEnd();
+ }
+
+
+ /**
+ * A BindingConnector could be reoriented in Parametric only if at least one end is a ConstraintParameter.
+ * Also check Block.isEncapsulated (could not cross a Block which is encapsulted)
+ *
+ * @return
+ */
+ @Override
+ public boolean canExecute() {
+
+ if (this.source == this.target) {
+ return false;
+ }
+
+ Object connectorView = getRequest().getParameter(DefaultSemanticEditPolicy.GRAPHICAL_RECONNECTED_EDGE);
+ if (connectorView instanceof org.eclipse.gmf.runtime.notation.Connector) {
+ View sourceView = getSourceView();
+ View targetView = getTargetView();
+
+ if (this.source != null && this.target != null) {
+ boolean hasEncapsulationViolation = !checkEncapsulationCrossing();
+
+ return hasEncapsulationViolation ? false :
+ // one of the end must be a ConstraintParameter
+ ConstraintBlockHelper.isConstraintParameter((Element) source, sourceView)
+ || ConstraintBlockHelper.isConstraintParameter((Element) target, targetView);
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Check that BindingConnector do not cross a "Block.isEncapsulated" Part/Reference/ConstraintProperty
+ *
+ * @return true no encapsulation problem, false else
+ */
+ private boolean checkEncapsulationCrossing() {
+ org.eclipse.papyrus.sysml.service.types.utils.ConnectorUtils util = new org.eclipse.papyrus.sysml.service.types.utils.ConnectorUtils();
+ // source end - get the nestedPath
+ List<Property> nestedPropertyPath = util.getNestedPropertyPath(getSourceView(), getTargetView());
+ // check for each level of path if crossing an isEncapsultaed Block
+ for (Property property : nestedPropertyPath) {
+ Type type = property.getType();
+ Block stereotypeApplication = UMLUtil.getStereotypeApplication(type, Block.class);
+ if (stereotypeApplication != null) {
+ if (stereotypeApplication.isEncapsulated()) {
+ return false;
+ }
+ }
+ }
+
+ // target end - get the nestedPath
+ nestedPropertyPath = util.getNestedPropertyPath(getTargetView(), getSourceView());
+ // check for each level of path if crossing an isEncapsultaed Block
+ for (Property property : nestedPropertyPath) {
+ Type type = property.getType();
+ Block stereotypeApplication = UMLUtil.getStereotypeApplication(type, Block.class);
+ if (stereotypeApplication != null) {
+ if (stereotypeApplication.isEncapsulated()) {
+ return false;
+ }
+ }
+ }
+ return true;
+ }
+
+ @Override
+ /**
+ * Get the link to re-orient.
+ *
+ * @return the edited {@link Connector}
+ */
+ protected Connector getLink() {
+ return (Connector) (getConnectorView()).getElement();
+ }
+
+ @Override
+ protected void replaceOwner(Connector connector, StructuredClassifier newOwner) {
+
+ View sourceView = getSourceView();
+ View targetView = getTargetView();
+
+ StructuredClassifier deducedContainer = new ConnectorUtils().deduceContainer(sourceView, targetView);
+ if (connector.getOwner() != deducedContainer) {
+ super.replaceOwner(connector, deducedContainer);
+ }
+ }
+
+ private org.eclipse.gmf.runtime.notation.Connector getConnectorView() {
+ return (org.eclipse.gmf.runtime.notation.Connector) getRequest().getParameter(DefaultSemanticEditPolicy.GRAPHICAL_RECONNECTED_EDGE);
+ }
+
+ private View getSourceView() {
+ return reorientDirection == ReorientRequest.REORIENT_SOURCE ?
+ (View) ((ReorientReferenceRelationshipRequestWithGraphical) getRequest()).getSourceEditPart().getModel() :
+ getConnectorView().getSource();
+ }
+
+ private View getTargetView() {
+ return reorientDirection == ReorientRequest.REORIENT_TARGET ?
+ (View) ((ReorientReferenceRelationshipRequestWithGraphical) getRequest()).getTargetEditPart().getModel() :
+ getConnectorView().getTarget();
+
+ }
+
+ @Override
+ protected Property findNewOppositePartWithPort() {
+ // no Port allowed in Parametric
+ return null;
+ }
+
+ @Override
+ protected Property findNewPartWithPort() {
+ // no Port allowed in Parametric
+ return null;
+ }
+
+ /**
+ * Reorient connector - recalculate nestedPath - remove connector deprecated representations (all diagrams)
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ CommandResult result = super.doExecuteWithResult(monitor, info);
+
+ // apply or update NestedConnectorEnd stereotype and its PropertyPath if needed
+ Connector connector = getLink();
+ if (connector.getEnds().size() == 2) {
+ updateNestedPropertyPath(connector.getEnds().get(0), getSourceView(), getTargetView());
+ updateNestedPropertyPath(connector.getEnds().get(1), getTargetView(), getSourceView());
+ }
+
+ Set<View> memberViewsToDestroy = getMemberViewsToDestroy(connector);
+ // Suppress Connector representation which are not coherant with the new ConnectorEnd
+ for (View view : memberViewsToDestroy) {
+ // exclude reoriented connector representation
+ if (view != getConnectorView()) {
+ // Check Connector View ends matches with semantic ConnectorEnds
+ View sourceNode = ((org.eclipse.gmf.runtime.notation.Connector) view).getSource();
+ View targetNode = ((org.eclipse.gmf.runtime.notation.Connector) view).getTarget();
+
+ EObject sourceElement = sourceNode.getElement();
+ EObject targetElement = targetNode.getElement();
+
+ EList<ConnectorEnd> ends = connector.getEnds();
+ boolean isSameEnds = true;
+ for (ConnectorEnd connectorEnd : ends) {
+ if (connectorEnd.getRole() != sourceElement && connectorEnd.getRole() != targetElement) {
+ isSameEnds = false;
+ break;
+ }
+ }
+
+ // if no matching between graphical and semantic, we destroy the representation
+ if (!isSameEnds) {
+ final DestroyElementRequest destroyRequest = new DestroyElementRequest(getRequest().getEditingDomain(), view, false);
+ final IElementEditService commandProvider = ElementEditServiceUtils.getCommandProvider(view);
+ ICommand editCommand = commandProvider.getEditCommand(destroyRequest);
+ editCommand.execute(monitor, info);
+ }
+ }
+ }
+
+ return result;
+ }
+
+
+ protected Set<View> getMemberViewsToDestroy(final Connector connector) {
+ Set<View> viewsToDestroy = new HashSet<View>();
+
+ // Find Views in Composite Structure Diagram that are referencing current member
+ Iterator<View> viewIt = CrossReferencerUtil.getCrossReferencingViews(connector, null).iterator();
+ while (viewIt.hasNext()) {
+ View view = viewIt.next();
+ viewsToDestroy.add(view);
+ }
+
+ return viewsToDestroy;
+ }
+
+ private void updateNestedPropertyPath(ConnectorEnd connectorEnd, View sourceView, View targetView) {
+ ConnectorUtils utils = new ConnectorUtils();
+ List<Property> nestedPropertyPath = utils.getNestedPropertyPath(sourceView, targetView);
+ if (!nestedPropertyPath.isEmpty()) {
+ // Search for existing stereotype application
+ NestedConnectorEnd nestedConnectorEnd = UMLUtil.getStereotypeApplication(connectorEnd, NestedConnectorEnd.class);
+ if (nestedConnectorEnd == null) {
+ // apply stereotype if no application found
+ nestedConnectorEnd = (NestedConnectorEnd) StereotypeApplicationHelper.INSTANCE.applyStereotype(connectorEnd, BlocksPackage.eINSTANCE.getNestedConnectorEnd());
+ }
+ // set new path
+ nestedConnectorEnd.getPropertyPath().clear();
+ nestedConnectorEnd.getPropertyPath().addAll(nestedPropertyPath);
+ }
+ else {
+ // remove all NestedConnectorEnd Stereotype applications
+ for (EObject stereotypeApplication : connectorEnd.getStereotypeApplications()) {
+ if (NestedConnectorEnd.class.isInstance(stereotypeApplication)) {
+ EcoreUtil.delete(stereotypeApplication, true);
+ }
+ }
+ }
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/commands/CustomParametricContextLinkCreateCommand.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/commands/CustomParametricContextLinkCreateCommand.java
new file mode 100755
index 0000000..29e7bfa
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/commands/CustomParametricContextLinkCreateCommand.java
@@ -0,0 +1,140 @@
+/*****************************************************************************
+ * 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:
+ * Régis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.commands;
+
+import java.util.Collection;
+import java.util.List;
+
+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.ecore.EStructuralFeature.Setting;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.service.types.command.ConstraintConstrainedElementsCreateCommand;
+import org.eclipse.papyrus.uml.service.types.utils.NamedElementHelper;
+import org.eclipse.uml2.common.util.CacheAdapter;
+import org.eclipse.uml2.uml.Constraint;
+import org.eclipse.uml2.uml.Namespace;
+import org.eclipse.uml2.uml.Property;
+
+public class CustomParametricContextLinkCreateCommand extends
+ ConstraintConstrainedElementsCreateCommand {
+
+ public CustomParametricContextLinkCreateCommand(
+ CreateRelationshipRequest request) {
+ super(request);
+ }
+
+ /**
+ * Can execute if :
+ * - source is Constraint
+ * - target is a Namespace or a Namespace typed property
+ * - there is no context link already outgoing from the source Constraint
+ */
+ @Override
+ public boolean canExecute() {
+ if (source == null && target == null) {
+ return false;
+ }
+ if (source != null && !(source instanceof Constraint)) {
+ return false;
+ }
+ if (target != null && !(target instanceof Namespace)) {
+ if (target instanceof Property) {
+ if (!(((Property) target).getType() instanceof Namespace)) {
+ // not a Part / Reference / ConstraintProperty => could not create context link
+ return false;
+ }
+ }
+ else {
+ // not a Property, not a Namespace => could not create context link
+ return false;
+ }
+ }
+ if (getSource() == null) {
+ return true; // link creation is in progress; source is not defined yet
+ }
+ View viewSource = findView(source);
+
+ // Only one context link per Constraint
+ if (viewSource != null && source instanceof Constraint) {
+ List<?> sourceConnections = ViewUtil.getSourceConnections(viewSource);
+ if (!sourceConnections.isEmpty()) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * Set the Constraint context and update Constraint name with new owner ownedRules if necessary
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ if (!canExecute()) {
+ throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
+ }
+ Namespace context = getTarget();
+ if (getSource() != null && context != null) {
+ getSource().setContext(context);
+ String defaultNameWithIncrementFromBase = NamedElementHelper.getDefaultNameWithIncrementFromBase(Constraint.class.getSimpleName(), context.getOwnedRules(), getSource());
+ getSource().setName(defaultNameWithIncrementFromBase);
+ return CommandResult.newOKCommandResult();
+ }
+ else {
+ return CommandResult.newErrorCommandResult("Try to define Constraint context to a non Namespace element");
+ }
+ }
+
+ private View findView(EObject element) {
+ if (element == null) {
+ return null;
+ }
+ Collection<Setting> settings = CacheAdapter.getInstance().getNonNavigableInverseReferences(element);
+ for (Setting ref : settings) {
+ if (NotationPackage.eINSTANCE.getView_Element().equals(ref.getEStructuralFeature())) {
+ View view = (View) ref.getEObject();
+ if (view != null) {
+ return view;
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Get the property Namespace in case of property typed by a Namespace
+ */
+ @Override
+ protected Namespace getTarget() {
+ EObject targetNamespace;
+ if (target instanceof Property) {
+ targetNamespace = ((Property) target).getType();
+ }
+ else {
+ targetNamespace = target;
+ }
+ if (targetNamespace instanceof Namespace) {
+ return (Namespace) targetNamespace;
+ }
+ else {
+ return null;
+ }
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/commands/CustomParametricContextLinkReorientCommand.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/commands/CustomParametricContextLinkReorientCommand.java
new file mode 100755
index 0000000..6480451
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/commands/CustomParametricContextLinkReorientCommand.java
@@ -0,0 +1,159 @@
+/*****************************************************************************
+ * 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:
+ * Régis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.commands;
+
+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.gef.EditPart;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRequest;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.service.types.utils.NamedElementHelper;
+import org.eclipse.uml2.uml.Constraint;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Namespace;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Type;
+
+/**
+ * A context link must have a Constraint as source and a Namespace as target
+ *
+ * @See ContextLinkReorientCommand
+ *
+ */
+public class CustomParametricContextLinkReorientCommand extends EditElementCommand {
+
+ private final int reorientDirection;
+
+ protected ReorientReferenceRelationshipRequestWithGraphical request;
+ protected EObject referenceOwner;
+ protected EObject oldSource;
+ protected EObject newSource;
+ protected EObject oldTarget;
+ protected EObject newTarget;
+
+ public CustomParametricContextLinkReorientCommand(
+ ReorientReferenceRelationshipRequestWithGraphical request) {
+ super(request.getLabel(), null, request);
+ this.request = request;
+ reorientDirection = request.getDirection();
+ referenceOwner = request.getReferenceOwner();
+ oldSource = reorientDirection == ReorientRequest.REORIENT_SOURCE ? request.getOldRelationshipEnd() : request.getReferenceOwner();
+ newSource = reorientDirection == ReorientRequest.REORIENT_SOURCE ? request.getNewRelationshipEnd() : request.getReferenceOwner();
+ oldTarget = reorientDirection == ReorientRequest.REORIENT_SOURCE ? request.getReferenceOwner() : request.getOldRelationshipEnd();
+ newTarget = reorientDirection == ReorientRequest.REORIENT_SOURCE ? request.getReferenceOwner() : request.getNewRelationshipEnd();
+ }
+
+ @Override
+ public boolean canExecute() {
+ return getNewSource() instanceof Constraint && resolveNamespace(getNewTarget()) instanceof Namespace;
+ }
+
+ /**
+ * Get the property Namespace in case of property typed by a Namespace
+ */
+ protected Namespace resolveNamespace(Element element) {
+ if (element instanceof Namespace) {
+ return (Namespace) element;
+ }
+ if (element instanceof Property) {
+ Type type = ((Property) element).getType();
+ if (type instanceof Namespace) {
+ return (Namespace) type;
+ }
+ }
+ return null;
+ }
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ if (!canExecute()) {
+ throw new ExecutionException("Invalid arguments in reorient link command"); //$NON-NLS-1$
+ }
+ if (reorientDirection == ReorientRequest.REORIENT_SOURCE) {
+ return reorientSource();
+ }
+ if (reorientDirection == ReorientRequest.REORIENT_TARGET) {
+ return reorientTarget();
+ }
+ throw new IllegalStateException();
+ }
+
+ /**
+ * Set a default container for old Constraint (diagram consistency).
+ * Set the new context for new Constraint
+ * Update new Constraint name with new owner ownedRules if necessary
+ */
+ protected CommandResult reorientSource() {
+ EditPart sourceEditPart = request.getSourceEditPart();
+ Namespace nearestNamespace = getNearestNamespace(sourceEditPart);
+ getOldSource().setContext(nearestNamespace); // set a default container
+ Namespace context = resolveNamespace(getNewTarget());
+ // Check name
+ String defaultNameWithIncrementFromBase = NamedElementHelper.getDefaultNameWithIncrementFromBase(Constraint.class.getSimpleName(), context.getOwnedRules(), getNewSource());
+ ((Constraint) getNewSource()).setName(defaultNameWithIncrementFromBase);
+ // set the context
+ ((Constraint) getNewSource()).setContext(resolveNamespace(getNewTarget()));
+
+ return CommandResult.newOKCommandResult(referenceOwner);
+ }
+
+ private Namespace getNearestNamespace(EditPart editPart) {
+ if (editPart != null) {
+ EObject semanticElement = ViewUtil.resolveSemanticElement((View) editPart.getModel());
+ if (semanticElement != null) {
+ Namespace resolvedNamespace = resolveNamespace((Element) semanticElement);
+ if (resolvedNamespace instanceof Namespace) {
+ return resolvedNamespace;
+ }
+ return getNearestNamespace(editPart.getParent());
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Set the new context for new Constraint
+ * Update new Constraint name with new owner ownedRules if necessary
+ */
+ protected CommandResult reorientTarget() {
+ Namespace context = resolveNamespace(getNewTarget());
+ // Check name
+ String defaultNameWithIncrementFromBase = NamedElementHelper.getDefaultNameWithIncrementFromBase(Constraint.class.getSimpleName(), context.getOwnedRules(), getNewSource());
+ ((Constraint) getNewSource()).setName(defaultNameWithIncrementFromBase);
+ // Set the context
+ ((Constraint) getNewSource()).setContext(context);
+ return CommandResult.newOKCommandResult(referenceOwner);
+ }
+
+ protected Constraint getOldSource() {
+ return (Constraint) oldSource;
+ }
+
+ protected Element getNewSource() {
+ return (Element) newSource;
+ }
+
+ protected Element getOldTarget() {
+ return (Element) oldTarget;
+ }
+
+ protected Element getNewTarget() {
+ return (Element) newTarget;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/commands/ReorientReferenceRelationshipRequestWithGraphical.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/commands/ReorientReferenceRelationshipRequestWithGraphical.java
new file mode 100755
index 0000000..5bad23d
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/commands/ReorientReferenceRelationshipRequestWithGraphical.java
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ * 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:
+ * Régis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.commands;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
+
+/**
+ * This class extends "classical" ReorientReferenceRelationshipRequest with the source and the target editPart.
+ * These EditPart are needed for algorithms based on graphics:
+ * - determine if a property is a ConstraintParameter
+ * - calculate nestedPath
+ */
+public class ReorientReferenceRelationshipRequestWithGraphical extends
+ ReorientReferenceRelationshipRequest {
+
+ private EditPart sourceEditPart;
+ private EditPart targetEditPart;
+
+ public ReorientReferenceRelationshipRequestWithGraphical(
+ TransactionalEditingDomain editingDomain, EObject referenceOwner,
+ EObject newRelationshipEnd, EObject oldRelationshipEnd,
+ int direction, EditPart sourceEditPart, EditPart targetEditPart) {
+ super(editingDomain, referenceOwner, newRelationshipEnd, oldRelationshipEnd, direction);
+ this.sourceEditPart = sourceEditPart;
+ this.targetEditPart = targetEditPart;
+ }
+
+
+ public EditPart getSourceEditPart() {
+ return sourceEditPart;
+ }
+
+ public EditPart getTargetEditPart() {
+ return targetEditPart;
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/commands/switchrepresentation/ShowHideConstraintExpressionCommand.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/commands/switchrepresentation/ShowHideConstraintExpressionCommand.java
new file mode 100755
index 0000000..9b1b123
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/commands/switchrepresentation/ShowHideConstraintExpressionCommand.java
@@ -0,0 +1,72 @@
+/*****************************************************************************
+ * 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:
+ * Régis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.commands.switchrepresentation;
+
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.parametric.edit.part.CustomConstraintBlockPropertyCompositeEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.ConstraintNodeLabelEditPart;
+
+/**
+ * This command allow to show/hide the Constraint expression of a ConstraintProperty
+ */
+public class ShowHideConstraintExpressionCommand extends Command {
+
+ private final GraphicalEditPart editPartToSwitch;
+
+ public GraphicalEditPart getEditPartToSwitch() {
+ return editPartToSwitch;
+ }
+
+ public ShowHideConstraintExpressionCommand(final GraphicalEditPart editPartToRefresh) {
+ this.editPartToSwitch = editPartToRefresh;
+ }
+
+ @Override
+ public void execute() {
+ if (this.getEditPartToSwitch() instanceof CustomConstraintBlockPropertyCompositeEditPart) {
+ CustomConstraintBlockPropertyCompositeEditPart constraintBlockPropertyCompositeEditPart = (CustomConstraintBlockPropertyCompositeEditPart) this.getEditPartToSwitch();
+ // get the Constraint expression graphical label
+ WrappingLabel constraintLabel = constraintBlockPropertyCompositeEditPart.getPrimaryShape().getConstraintLabel();
+ ConstraintNodeLabelEditPart constraintNodeLabelEditPart = null;
+ // get the EditPart which contains this label
+ for (Object currentEditPart : constraintBlockPropertyCompositeEditPart.getChildren()) {
+ if (currentEditPart instanceof ConstraintNodeLabelEditPart) {
+ if (((ConstraintNodeLabelEditPart) currentEditPart).getFigure() == constraintLabel) {
+ constraintNodeLabelEditPart = (ConstraintNodeLabelEditPart) currentEditPart;
+ }
+ }
+ }
+
+ // switch visibility of this EditPart
+ if (constraintNodeLabelEditPart != null) {
+ View constraintLabelView = (View) constraintNodeLabelEditPart.getModel();
+ constraintLabelView.setVisible(!constraintLabelView.isVisible());
+ }
+ }
+ }
+
+ @Override
+ public void undo() {
+ execute(); // switch
+ }
+
+ @Override
+ public void redo() {
+ execute(); // switch
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/commands/switchrepresentation/ShowHideConstraintExpressionCommandHandler.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/commands/switchrepresentation/ShowHideConstraintExpressionCommandHandler.java
new file mode 100755
index 0000000..41c6104
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/commands/switchrepresentation/ShowHideConstraintExpressionCommandHandler.java
@@ -0,0 +1,37 @@
+/*****************************************************************************
+ * 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:
+ * Régis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.commands.switchrepresentation;
+
+import java.util.List;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.CompoundCommand;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.papyrus.sysml.diagram.parametric.edit.part.CustomConstraintBlockPropertyCompositeEditPart;
+import org.eclipse.papyrus.uml.diagram.common.handlers.GraphicalCommandHandler;
+
+public class ShowHideConstraintExpressionCommandHandler extends GraphicalCommandHandler {
+
+ @Override
+ protected Command getCommand() {
+ CompoundCommand command = new CompoundCommand("Show/Hide ConstraintProperty Constraint Expression");
+ final List<IGraphicalEditPart> selectedElements = getSelectedElements();
+ for (final IGraphicalEditPart selectedElement : selectedElements) {
+ if (selectedElement instanceof CustomConstraintBlockPropertyCompositeEditPart) {
+ command.add(new ShowHideConstraintExpressionCommand(selectedElement));
+ }
+ }
+ return command;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/commands/switchrepresentation/SwitchConstraintPropertyRepresentationCommand.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/commands/switchrepresentation/SwitchConstraintPropertyRepresentationCommand.java
new file mode 100755
index 0000000..87917c9
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/commands/switchrepresentation/SwitchConstraintPropertyRepresentationCommand.java
@@ -0,0 +1,138 @@
+/*****************************************************************************
+ * 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:
+ * Régis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.commands.switchrepresentation;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
+import org.eclipse.gmf.runtime.diagram.core.services.ViewService;
+import org.eclipse.gmf.runtime.notation.NotationFactory;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.StringValueStyle;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.ConstraintBlockPropertyCompositeEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.figure.ConstraintBlockPropertyCompositeFigure;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.parametric.edit.part.CustomConstraintBlockPropertyCompositeEditPart;
+
+/**
+ * This command allow to switch ConstraintProperty representation to rounded corner one to square one with structure compartment
+ */
+public class SwitchConstraintPropertyRepresentationCommand extends Command {
+
+ private final GraphicalEditPart editPartToSwitch;
+
+ public SwitchConstraintPropertyRepresentationCommand(final GraphicalEditPart editPartToRefresh) {
+ this.editPartToSwitch = editPartToRefresh;
+ }
+
+ public GraphicalEditPart getEditPartToSwitch() {
+ return this.editPartToSwitch;
+ }
+
+
+ @Override
+ public void execute() {
+ if (this.getEditPartToSwitch() instanceof CustomConstraintBlockPropertyCompositeEditPart) {
+ CustomConstraintBlockPropertyCompositeEditPart constraintBlockPropertyCompositeEditPart = (CustomConstraintBlockPropertyCompositeEditPart) this.getEditPartToSwitch();
+ ConstraintBlockPropertyCompositeFigure figure = constraintBlockPropertyCompositeEditPart.getPrimaryShape();
+ if (figure instanceof ConstraintBlockPropertyCompositeFigure) {
+ if (figure.getCorner() != 0) {
+ switchToSquareRepresentationWithStructure(constraintBlockPropertyCompositeEditPart, figure);
+ }
+ else {
+ switchToRoundedRepresentationWithoutStructure(constraintBlockPropertyCompositeEditPart, figure);
+ }
+ }
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ private void switchToSquareRepresentationWithStructure(CustomConstraintBlockPropertyCompositeEditPart editPart, IFigure figure) {
+
+ // Set corner as square
+ int newCorner = 0;
+ ((ConstraintBlockPropertyCompositeFigure) figure).setCorner(newCorner);
+
+ // add structure compartment (create if does not exist, set visible if exist)
+ View structureCompartment = editPart.getChildViewBySemanticHint(SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ if (structureCompartment != null) {
+ structureCompartment.setVisible(true);
+ }
+ else {
+ structureCompartment = ViewService.createNode((View) editPart.getModel(), SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID, new PreferencesHint("org.eclipse.papyrus.sysml.diagram.parametric"));
+ if (structureCompartment != null) {
+ structureCompartment.setElement(editPart.resolveSemanticElement());
+ }
+ }
+
+ // add the << constraint >> tag
+ editPart.getPrimaryShape().setTagLabel(String.valueOf("\u00AB") + "constraint" + String.valueOf("\u00BB"));
+
+ // set the style to persist representation
+ StringValueStyle style = (StringValueStyle) ((View) editPart.getModel()).getStyle(NotationPackage.eINSTANCE.getStringValueStyle());
+ if (style == null) {
+ ((View) editPart.getModel()).getStyles().add(NotationFactory.eINSTANCE.createStringValueStyle());
+ }
+ style = (StringValueStyle) ((View) editPart.getModel()).getStyle(NotationPackage.eINSTANCE.getStringValueStyle());
+ style.setName(ConstraintBlockPropertyCompositeEditPart.REPRESENTATION_MODE_STYLE);
+ style.setStringValue(ConstraintBlockPropertyCompositeEditPart.SQUARE_REPRESENTATION_WITH_STRUCTURE);
+
+ // set the default style for new elements
+ ConstraintBlockPropertyCompositeEditPart.setLastRepresentation(ConstraintBlockPropertyCompositeEditPart.SQUARE_REPRESENTATION_WITH_STRUCTURE);
+ editPart.setCornerLocators(newCorner);
+ }
+
+ @SuppressWarnings("unchecked")
+ private void switchToRoundedRepresentationWithoutStructure(CustomConstraintBlockPropertyCompositeEditPart editPart, IFigure figure) {
+ // rounded corner
+ int newCorner = 50;
+ ((ConstraintBlockPropertyCompositeFigure) figure).setCorner(newCorner);
+
+
+ // hide structure compartment if exist
+ View structureCompartmentFigure = editPart.getChildViewBySemanticHint(SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ if (structureCompartmentFigure != null) {
+ structureCompartmentFigure.setVisible(false);
+ }
+
+ // remove the << constraint >> tag
+ editPart.getPrimaryShape().setTagLabel("");
+
+ // set the style to persist representation
+ StringValueStyle style = (StringValueStyle) ((View) editPart.getModel()).getStyle(NotationPackage.eINSTANCE.getStringValueStyle());
+ if (style == null) {
+ ((View) editPart.getModel()).getStyles().add(NotationFactory.eINSTANCE.createStringValueStyle());
+ }
+ style = (StringValueStyle) ((View) editPart.getModel()).getStyle(NotationPackage.eINSTANCE.getStringValueStyle());
+ style.setName(ConstraintBlockPropertyCompositeEditPart.REPRESENTATION_MODE_STYLE);
+ style.setStringValue(ConstraintBlockPropertyCompositeEditPart.ROUNDED_REPRESENTATION);
+
+ // set the default style for new elements
+ ConstraintBlockPropertyCompositeEditPart.setLastRepresentation(ConstraintBlockPropertyCompositeEditPart.ROUNDED_REPRESENTATION);
+ editPart.setCornerLocators(newCorner);
+ }
+
+ @Override
+ public void undo() {
+ execute(); // switch
+ }
+
+ @Override
+ public void redo() {
+ execute(); // switch
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/commands/switchrepresentation/SwitchConstraintPropertyRepresentationCommandHandler.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/commands/switchrepresentation/SwitchConstraintPropertyRepresentationCommandHandler.java
new file mode 100755
index 0000000..71ae63a
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/commands/switchrepresentation/SwitchConstraintPropertyRepresentationCommandHandler.java
@@ -0,0 +1,42 @@
+/*****************************************************************************
+ * 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:
+ * Régis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.commands.switchrepresentation;
+
+import java.util.List;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.CompoundCommand;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.papyrus.sysml.diagram.parametric.edit.part.CustomConstraintBlockPropertyCompositeEditPart;
+import org.eclipse.papyrus.uml.diagram.common.handlers.GraphicalCommandHandler;
+
+public class SwitchConstraintPropertyRepresentationCommandHandler extends GraphicalCommandHandler {
+
+ @Override
+ protected Command getCommand() {
+ CompoundCommand command = new CompoundCommand("Switch ConstraintProperty Representation");
+ final List<IGraphicalEditPart> selectedElements = getSelectedElements();
+ for (final IGraphicalEditPart selectedElement : selectedElements) {
+ if (selectedElement instanceof CustomConstraintBlockPropertyCompositeEditPart) {
+ if (selectedElement.getParent() instanceof GraphicalEditPart) {
+ command.add(new SwitchConstraintPropertyRepresentationCommand(selectedElement));
+ }
+ }
+ }
+ return command;
+ }
+
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/edit/part/CustomBlockCompositeEditPartTN.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/edit/part/CustomBlockCompositeEditPartTN.java
new file mode 100755
index 0000000..05e26dc
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/edit/part/CustomBlockCompositeEditPartTN.java
@@ -0,0 +1,153 @@
+/*****************************************************************************
+ * 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:
+ * Régis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.edit.part;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.editpolicies.LayoutEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.blocks.Block;
+import org.eclipse.papyrus.sysml.constraints.ConstraintBlock;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.BlockLabelNameEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.StructureCompartmentEditPart;
+import org.eclipse.papyrus.sysml.diagram.parametric.figures.ParametricDiagramFrameFigure;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.AbstractElementEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.ConstraintParameterAffixedNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideRelatedContentsEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.locator.FullInsidePortPositionLocator;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+
+public class CustomBlockCompositeEditPartTN extends AbstractElementEditPart {
+
+ public CustomBlockCompositeEditPartTN(View view) {
+ super(view);
+ }
+
+ @Override
+ protected void createDefaultEditPolicies() {
+ installEditPolicy(ShowHideRelatedContentsEditPolicy.SHOW_HIDE_RELATED_CONTENTS_POLICY, new ShowHideRelatedContentsEditPolicy());
+ installEditPolicy(AffixedNodeAlignmentEditPolicy.AFFIXED_CHILD_ALIGNMENT_ROLE, new AffixedNodeAlignmentEditPolicy());
+ super.createDefaultEditPolicies();
+ }
+
+ @Override
+ protected IFigure createNodeShape() {
+ return this.primaryShape = new ParametricDiagramFrameFigure();
+ }
+
+ @Override
+ public ParametricDiagramFrameFigure getPrimaryShape() {
+ return (ParametricDiagramFrameFigure) primaryShape;
+ }
+
+ @Override
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof BlockLabelNameEditPart) {
+ ((BlockLabelNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+ if (childEditPart instanceof StructureCompartmentEditPart) {
+ IFigure pane = getPrimaryShape();
+ setupContentPane(pane);
+ pane.add(((StructureCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof ConstraintParameterAffixedNodeEditPart) {
+ IBorderItemLocator locator = new FullInsidePortPositionLocator(getMainFigure(), PositionConstants.NONE);
+ getBorderedFigure().getBorderItemContainer().add(((ConstraintParameterAffixedNodeEditPart) childEditPart).getFigure(), locator);
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof BlockLabelNameEditPart) {
+ return true;
+ }
+ if (childEditPart instanceof StructureCompartmentEditPart) {
+ IFigure pane = getPrimaryShape();
+ setupContentPane(pane);
+ pane.remove(((StructureCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof ConstraintParameterAffixedNodeEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((ConstraintParameterAffixedNodeEditPart) childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ return getContentPane();
+ }
+
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return null;
+ }
+
+ @Override
+ protected LayoutEditPolicy createLayoutEditPolicy() {
+ return null;
+ }
+
+
+ @Override
+ protected void refreshVisuals() {
+ refreshStereotypes();
+ super.refreshVisuals();
+ }
+
+ protected void refreshStereotypes() {
+ Element resolveSemanticElement = (Element) this.resolveSemanticElement();
+ EList<EObject> stereotypeApplications = resolveSemanticElement.getStereotypeApplications();
+ List<EObject> additionnalStereotypeApplications = new ArrayList<EObject>();
+ for (EObject currentStereotypeApplication : stereotypeApplications) {
+ if (!(currentStereotypeApplication instanceof Block) && !(currentStereotypeApplication instanceof ConstraintBlock)) {
+ additionnalStereotypeApplications.add(currentStereotypeApplication);
+ }
+ }
+ StringBuilder stereotypeLabel = new StringBuilder();
+ String separator = ", ";
+ for (EObject eObject : additionnalStereotypeApplications) {
+ if (eObject != additionnalStereotypeApplications.get(0)) {
+ stereotypeLabel.append(separator);
+ }
+ stereotypeLabel.append(firstLetterToLowerCase(UMLUtil.getStereotype(eObject).getName()));
+ }
+ getPrimaryShape().setStereotypeLabel(stereotypeLabel.toString());
+ }
+
+ private String firstLetterToLowerCase(String string) {
+ String result = "";
+ if (string != null && string.length() != 0) {
+ String lowerCaseFirstLetter = string.substring(0, 1).toLowerCase();
+ result = lowerCaseFirstLetter + string.substring(1);
+ }
+ return result;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/edit/part/CustomBlockLabelNameEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/edit/part/CustomBlockLabelNameEditPart.java
new file mode 100755
index 0000000..f53b3b6
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/edit/part/CustomBlockLabelNameEditPart.java
@@ -0,0 +1,35 @@
+/*****************************************************************************
+ * 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:
+ * R�gis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.edit.part;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.internationalization.utils.utils.LabelInternationalization;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.BlockLabelNameEditPart;
+
+public class CustomBlockLabelNameEditPart extends BlockLabelNameEditPart {
+
+ public CustomBlockLabelNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * Respect the SysML diagram frame "par [Block] Block1 [DiagramName]"
+ */
+ @Override
+ protected String getLabelText() {
+ String diagramName = LabelInternationalization.getInstance().getDiagramLabel(getDiagramView());
+ return super.getLabelText() + " [" + diagramName + "]";
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/edit/part/CustomBlockPropertyCompositeEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/edit/part/CustomBlockPropertyCompositeEditPart.java
new file mode 100755
index 0000000..fcb15dc
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/edit/part/CustomBlockPropertyCompositeEditPart.java
@@ -0,0 +1,33 @@
+/*****************************************************************************
+ * 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:
+ * Régis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.edit.part;
+
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.BlockPropertyCompositeEditPart;
+import org.eclipse.papyrus.sysml.diagram.parametric.policies.CustomParametricSemanticPolicy;
+
+public class CustomBlockPropertyCompositeEditPart extends
+ BlockPropertyCompositeEditPart {
+
+ public CustomBlockPropertyCompositeEditPart(View view) {
+ super(view);
+ }
+
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomParametricSemanticPolicy());
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/edit/part/CustomConstraintBlockPropertyCompositeEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/edit/part/CustomConstraintBlockPropertyCompositeEditPart.java
new file mode 100755
index 0000000..e3da15a
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/edit/part/CustomConstraintBlockPropertyCompositeEditPart.java
@@ -0,0 +1,34 @@
+/*****************************************************************************
+ * 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:
+ * Régis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.edit.part;
+
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.ConstraintBlockPropertyCompositeEditPart;
+import org.eclipse.papyrus.sysml.diagram.parametric.policies.CustomParametricSemanticPolicy;
+
+public class CustomConstraintBlockPropertyCompositeEditPart extends
+ ConstraintBlockPropertyCompositeEditPart {
+
+ public CustomConstraintBlockPropertyCompositeEditPart(View view) {
+ super(view);
+ }
+
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomParametricSemanticPolicy());
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/edit/part/CustomConstraintParameterAffixedNodeEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/edit/part/CustomConstraintParameterAffixedNodeEditPart.java
new file mode 100755
index 0000000..51b0360
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/edit/part/CustomConstraintParameterAffixedNodeEditPart.java
@@ -0,0 +1,32 @@
+/*****************************************************************************
+ * 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:
+ * Régis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.edit.part;
+
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.parametric.policies.CustomParametricSemanticPolicy;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.ConstraintParameterAffixedNodeEditPart;
+
+public class CustomConstraintParameterAffixedNodeEditPart extends ConstraintParameterAffixedNodeEditPart {
+
+ public CustomConstraintParameterAffixedNodeEditPart(View view) {
+ super(view);
+ }
+
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomParametricSemanticPolicy());
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/edit/part/CustomPortAffixedNodeEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/edit/part/CustomPortAffixedNodeEditPart.java
new file mode 100755
index 0000000..7615559
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/edit/part/CustomPortAffixedNodeEditPart.java
@@ -0,0 +1,33 @@
+/*****************************************************************************
+ * 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:
+ * Régis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.edit.part;
+
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.parametric.policies.CustomParametricSemanticPolicy;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.PortAffixedNodeEditPart;
+
+public class CustomPortAffixedNodeEditPart extends PortAffixedNodeEditPart {
+
+ public CustomPortAffixedNodeEditPart(View view) {
+ super(view);
+ }
+
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomParametricSemanticPolicy());
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/figures/CustomBlockPropertyCompositeFigure.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/figures/CustomBlockPropertyCompositeFigure.java
new file mode 100755
index 0000000..40d68f2
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/figures/CustomBlockPropertyCompositeFigure.java
@@ -0,0 +1,38 @@
+/*****************************************************************************
+ * 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:
+ * R�gis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.figures;
+
+import org.eclipse.draw2d.Label;
+import org.eclipse.papyrus.sysml.diagram.common.figure.BlockPropertyCompositeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+
+public class CustomBlockPropertyCompositeFigure extends
+ BlockPropertyCompositeFigure {
+
+ @Override
+ protected void initTagLabel(String value) {
+ // do nothing: we don't want a two lines element (tag + name)
+ }
+
+ @Override
+ public PapyrusWrappingLabel getTaggedLabel() {
+ // return a mock Label
+ return new PapyrusWrappingLabel();
+ }
+
+ @Override
+ public void setNameLabelIcon(boolean displayNameLabelIcon) {
+ getNameLabel().setIcon(null);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/figures/ParametricDiagramFrameFigure.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/figures/ParametricDiagramFrameFigure.java
new file mode 100755
index 0000000..b3ac246
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/figures/ParametricDiagramFrameFigure.java
@@ -0,0 +1,20 @@
+/*****************************************************************************
+ * 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:
+ * Régis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.figures;
+
+import org.eclipse.papyrus.sysml.diagram.common.figure.SysMLDiagramFrameFigure;
+
+public class ParametricDiagramFrameFigure extends SysMLDiagramFrameFigure {
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/handler/ShowHideRelatedContentsAction.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/handler/ShowHideRelatedContentsAction.java
new file mode 100755
index 0000000..605e687
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/handler/ShowHideRelatedContentsAction.java
@@ -0,0 +1,120 @@
+/*****************************************************************************
+ * 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:
+ * Régis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.handler;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.sysml.diagram.common.utils.ConstraintBlockHelper;
+
+/**
+ * This class allow to take into account the ConstraintParameter which are AffixedNode, not a "classical" property (Part/Reference/ConstraintProperty in structure).
+ * Also filter non allowed elements from AffixedNode (Port).
+ */
+public class ShowHideRelatedContentsAction extends org.eclipse.papyrus.sysml.diagram.internalblock.handler.ShowHideRelatedContentsAction {
+
+ /** Constructor. */
+ public ShowHideRelatedContentsAction() {
+ super();
+ }
+
+ /**
+ * @see org.eclipse.papyrus.diagram.common.actions.AbstractShowHideAction#initAction()
+ */
+ @Override
+ protected void initAction() {
+ super.initAction();
+
+ // Only ConstraintParameter are allowed => remove Ports (and subclasses) from AffixedNode selection
+ List<EditPartRepresentation> editPartRepresentationsToRemove = new ArrayList<EditPartRepresentation>();
+ Set<EObject> representedAffixedElements = new HashSet<EObject>();
+ AffixedChildrenEditPartRepresentation affixedNodeRepresentations = getAffixedNodeRepresentation(this.representations);
+
+ // Select only affixedNode which semantic element could be a ConstraintParameter
+ for (EditPartRepresentation currentRepresentation : affixedNodeRepresentations.getPossibleElement()) {
+ EObject semanticElement = currentRepresentation.getSemanticElement();
+ if (!(semanticElement == null || ConstraintBlockHelper.couldBeConstraintParameter(semanticElement, getOwnerSemanticElement()))) {
+ editPartRepresentationsToRemove.add(currentRepresentation);
+ }
+ else {
+ representedAffixedElements.add(semanticElement);
+ }
+ }
+ for (EditPartRepresentation editPartRepresentationToRemove : editPartRepresentationsToRemove) {
+ affixedNodeRepresentations.getPossibleElement().remove(editPartRepresentationToRemove);
+ }
+
+ // Remove from structure category elements which match as AffixedNode
+ editPartRepresentationsToRemove = new ArrayList<EditPartRepresentation>();
+ CompartmentEditPartRepresentation compartmentEditPartRepresentation = getCompartmentEditPartRepresentation(this.representations);
+ if (compartmentEditPartRepresentation != null) {
+ for (EditPartRepresentation currentRepresentation : compartmentEditPartRepresentation.getPossibleElement()) {
+ EObject semanticElement = currentRepresentation.getSemanticElement();
+ if (representedAffixedElements.contains(semanticElement)) {
+ editPartRepresentationsToRemove.add(currentRepresentation);
+ }
+ }
+ for (EditPartRepresentation editPartRepresentationToRemove : editPartRepresentationsToRemove) {
+ compartmentEditPartRepresentation.getPossibleElement().remove(editPartRepresentationToRemove);
+ }
+ }
+ }
+
+ private EObject getOwnerSemanticElement() {
+ return this.representations.size() >= 1 ? this.representations.get(0).getSemanticElement() : null;
+ }
+
+ /**
+ *
+ * @param editPartRepresentations
+ * @return
+ */
+ private AffixedChildrenEditPartRepresentation getAffixedNodeRepresentation(List<EditPartRepresentation> editPartRepresentations) {
+
+ for (EditPartRepresentation representation : editPartRepresentations) {
+ if (representation instanceof AffixedChildrenEditPartRepresentation) {
+ return (AffixedChildrenEditPartRepresentation) representation;
+ }
+ // recursive search
+ AffixedChildrenEditPartRepresentation affixedNodeRepresentation = getAffixedNodeRepresentation(representation.getPossibleElement());
+ if (affixedNodeRepresentation != null) {
+ return affixedNodeRepresentation;
+ }
+ }
+ return null;
+ }
+
+ /**
+ *
+ * @param editPartRepresentations
+ * @return
+ */
+ private CompartmentEditPartRepresentation getCompartmentEditPartRepresentation(List<EditPartRepresentation> editPartRepresentations) {
+
+ for (EditPartRepresentation representation : editPartRepresentations) {
+ if (representation instanceof CompartmentEditPartRepresentation && !(representation instanceof AffixedChildrenEditPartRepresentation)) {
+ return (CompartmentEditPartRepresentation) representation;
+ }
+ // recursive search
+ CompartmentEditPartRepresentation compartmentEditPartRepresentation = getCompartmentEditPartRepresentation(representation.getPossibleElement());
+ if (compartmentEditPartRepresentation != null) {
+ return compartmentEditPartRepresentation;
+ }
+ }
+ return null;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/handler/ShowHideRelatedContentsHandler.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/handler/ShowHideRelatedContentsHandler.java
new file mode 100755
index 0000000..5a37e5f
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/handler/ShowHideRelatedContentsHandler.java
@@ -0,0 +1,28 @@
+/*****************************************************************************
+ * 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:
+ * Régis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.handler;
+
+import org.eclipse.papyrus.uml.diagram.common.actions.handlers.AbstractShowHideHandler;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideRelatedContentsEditPolicy;
+
+/**
+ * Handler for the {@link ShowHideRelatedContentsAction}
+ */
+public class ShowHideRelatedContentsHandler extends AbstractShowHideHandler {
+
+ /** Constructor. */
+ public ShowHideRelatedContentsHandler() {
+ super(new ShowHideRelatedContentsAction(), ShowHideRelatedContentsEditPolicy.SHOW_HIDE_RELATED_CONTENTS_POLICY);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/migration/ParametricReconciler_1_2_0.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/migration/ParametricReconciler_1_2_0.java
new file mode 100755
index 0000000..9a35355
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/migration/ParametricReconciler_1_2_0.java
@@ -0,0 +1,96 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Florian Noyrit (CEA) florian.noyrit@cea.fr - Initial API and Implementation
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - reconciler to add floating label
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.migration;
+
+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.gmf.runtime.common.core.command.AbstractCommand;
+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.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.reconciler.DiagramReconciler;
+
+/**
+ * Parametric Diagram Reconciler from 1.1.0 to 1.2.0
+ */
+public class ParametricReconciler_1_2_0 extends DiagramReconciler {
+
+ @Override
+ public ICommand getReconcileCommand(Diagram diagram) {
+ CompositeCommand cc = new CompositeCommand("Migrate diagram from 1.1.0 to 1.2.0");
+ cc.add(new ChangeVisualIDsCommand(diagram));
+ return cc;
+ }
+
+ protected class ChangeVisualIDsCommand extends AbstractCommand {
+
+ protected final Diagram diagram;
+
+ public ChangeVisualIDsCommand(Diagram diagram) {
+ super("Change the diagram's visual ids from 1.1.0 to 1.2.0");
+ this.diagram = diagram;
+ }
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ TreeIterator<EObject> allContentIterator = diagram.eAllContents();
+
+ while (allContentIterator.hasNext()) {
+ EObject eObject = allContentIterator.next();
+ if (eObject instanceof View) {
+ View view = (View) eObject;
+ view.setType(getNewVisualID(view.getType()));
+ }
+ }
+
+ return CommandResult.newOKCommandResult();
+ }
+
+ @Override
+ public boolean canUndo() {
+ return false;
+ }
+
+ @Override
+ public boolean canRedo() {
+ return false;
+ }
+
+ @Override
+ protected CommandResult doRedoWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ throw new ExecutionException("Should not be called, canRedo false");
+ }
+
+ @Override
+ protected CommandResult doUndoWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ throw new ExecutionException("Should not be called, canUndo false");
+ }
+ }
+
+ public static String getNewVisualID(String oldVisualID) {
+ switch (oldVisualID) {
+ case "8500":
+ return "Constraint_ContextEdge";
+ case "8501":
+ return "Constraint_KeywordLabel";
+ default:
+ return oldVisualID;
+ }
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/parser/ParametricFrameParser.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/parser/ParametricFrameParser.java
new file mode 100755
index 0000000..6cbbdb9
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/parser/ParametricFrameParser.java
@@ -0,0 +1,47 @@
+/*****************************************************************************
+ * 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:
+ * Régis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ * Trung-Truc Nguyen Bug 439935
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.parser;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.infra.gmfdiag.common.commands.SemanticAdapter;
+import org.eclipse.papyrus.sysml.constraints.ConstraintBlock;
+import org.eclipse.papyrus.uml.diagram.common.parser.NamedElementLabelParser;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+public class ParametricFrameParser extends NamedElementLabelParser {
+
+ /**
+ * /**
+ * Respect the SysML diagram frame "diagramKind [modelElementType] modelElementName [diagramName]"
+ * For the parametric diagram, the modelElementName might be a Block or a ConstraintBlock element
+ *
+ * A parametric diagram frame, therefore, may be:
+ *
+ * par [Block] blockName [diagramName] OR
+ * par [ConstraintBlock] constraintBlockName [diagramName]
+ *
+ */
+ @Override
+ public String getPrintString(IAdaptable element, int flags) {
+ String elementType = null;
+ if(element instanceof SemanticAdapter){
+ Object realObject = ((SemanticAdapter) element).getAdapter(EObject.class);
+ if (realObject instanceof org.eclipse.uml2.uml.Class) {
+ elementType = UMLUtil.getStereotypeApplication(((org.eclipse.uml2.uml.Class) realObject), ConstraintBlock.class) != null ? "ConstraintBlock" : "Block";
+ }
+ }
+ return "par [" + elementType + "] " + super.getPrintString(element, flags);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/policies/CustomBlockCompositeDropEditPolicy.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/policies/CustomBlockCompositeDropEditPolicy.java
new file mode 100755
index 0000000..8e553b2
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/policies/CustomBlockCompositeDropEditPolicy.java
@@ -0,0 +1,129 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2016 CEA LIST, Esterel Technologies SAS and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Régis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ * Alain Le Guennec (Esterel Technologies SAS) - bug 497400
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.policies;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.RunnableWithResult;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.CommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.commands.SelectAndExecuteCommand;
+import org.eclipse.papyrus.sysml.diagram.internalblock.utils.TypeDropHelper;
+import org.eclipse.papyrus.sysml.diagram.parametric.provider.CustomGraphicalTypeRegistry;
+import org.eclipse.papyrus.sysml.diagram.parametric.utils.ConstraintParameterDropHelper;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.uml2.uml.Property;
+
+/**
+ * <pre>
+ * Customization of the DND edit policy for BlockPropertyComposite that enables
+ * type modification, or creation of new Port and FlowPort by a drop on target.
+ * </pre>
+ */
+public class CustomBlockCompositeDropEditPolicy extends CustomDragDropEditPolicy {
+
+ /** Default constructor */
+ public CustomBlockCompositeDropEditPolicy() {
+ super();
+ registry = new CustomGraphicalTypeRegistry();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Set<String> getSpecificDropBehaviorTypes() {
+ Set<String> specificDropBehaviorTypes = super.getSpecificDropBehaviorTypes();
+
+ specificDropBehaviorTypes.add(UMLGraphicalTypes.SHAPE_UML_PROPERTY_AS_AFFIXED_ID);
+
+ return specificDropBehaviorTypes;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected ICommand getSpecificDropCommand(DropObjectsRequest dropRequest, EObject droppedEObject, String nodeType, String edgeType) {
+ if (UMLGraphicalTypes.SHAPE_UML_PROPERTY_AS_AFFIXED_ID.equals(nodeType)) {
+ ConstraintParameterDropHelper constraintParameterDropHelper = new ConstraintParameterDropHelper(getEditingDomain());
+ Command commandParameterDropCommand = constraintParameterDropHelper.getDropConstraintParameter((Property) droppedEObject, dropRequest.getLocation().getCopy(), (GraphicalEditPart) getHost());
+ return new CommandProxy(commandParameterDropCommand);
+ }
+
+ return super.getSpecificDropCommand(dropRequest, droppedEObject, nodeType, edgeType);
+ }
+
+ /**
+ * {@inheritedDoc}.
+ */
+ @Override
+ public Command getDropObjectsCommand(DropObjectsRequest dropRequest) {
+ TypeDropHelper helper = new TypeDropHelper(getEditingDomain());
+
+ // Single drop management possible drop action list can be proposed
+ if (dropRequest.getObjects().size() == 1) {
+
+ // List of available drop commands
+ final List<Command> commandChoice = new ArrayList<Command>();
+
+ // 1. Try to set the target element type with dropped object
+ Command dropAsSetType = helper.getDropAsTypedElementType(dropRequest, (GraphicalEditPart) getHost());
+ if ((dropAsSetType != null) && (dropAsSetType.canExecute())) {
+ commandChoice.add(dropAsSetType);
+ }
+
+ // 2. Build default drop command (show view of the dropped object)
+ Command defaultDropCommand = super.getDropObjectsCommand(dropRequest);
+ if ((defaultDropCommand != null) && (defaultDropCommand.canExecute())) {
+ defaultDropCommand.setLabel("Default drop (Show dropped object in diagram)");
+ commandChoice.add(defaultDropCommand);
+ }
+
+ // Prepare the selection command (if several command are available) or return the drop command
+ if (commandChoice.size() > 1) {
+ RunnableWithResult<ICommand> runnable;
+ Display.getDefault().syncExec(runnable = new RunnableWithResult.Impl<ICommand>() {
+
+ public void run() {
+ setResult(new SelectAndExecuteCommand("Select drop action for ", PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), commandChoice));
+ }
+ });
+
+ ICommand selectCommand = runnable.getResult();
+
+ return new ICommandProxy(selectCommand);
+ } else if (commandChoice.size() == 1) {
+ return commandChoice.get(0);
+ }
+
+ // else (command choice is empty)
+ return UnexecutableCommand.INSTANCE;
+
+ }
+
+ return super.getDropObjectsCommand(dropRequest);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/policies/CustomBlockPropertyCompositeDropEditPolicy.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/policies/CustomBlockPropertyCompositeDropEditPolicy.java
new file mode 100755
index 0000000..ea8909b
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/policies/CustomBlockPropertyCompositeDropEditPolicy.java
@@ -0,0 +1,129 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2016 CEA LIST, Esterel Technologies SAS and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Régis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ * Alain Le Guennec (Esterel Technologies SAS) - bug 497400
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.policies;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.RunnableWithResult;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.CommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.commands.SelectAndExecuteCommand;
+import org.eclipse.papyrus.sysml.diagram.internalblock.utils.TypeDropHelper;
+import org.eclipse.papyrus.sysml.diagram.parametric.provider.CustomGraphicalTypeRegistry;
+import org.eclipse.papyrus.sysml.diagram.parametric.utils.ConstraintParameterDropHelper;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.uml2.uml.Property;
+
+/**
+ * <pre>
+ * Customization of the DND edit policy for BlockPropertyComposite that enables
+ * type modification, or creation of new Port and FlowPort by a drop on target.
+ * </pre>
+ */
+public class CustomBlockPropertyCompositeDropEditPolicy extends CustomDragDropEditPolicy {
+
+ /** Default constructor */
+ public CustomBlockPropertyCompositeDropEditPolicy() {
+ super();
+ registry = new CustomGraphicalTypeRegistry();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Set<String> getSpecificDropBehaviorTypes() {
+ Set<String> specificDropBehaviorTypes = super.getSpecificDropBehaviorTypes();
+
+ specificDropBehaviorTypes.add(UMLGraphicalTypes.SHAPE_UML_PROPERTY_AS_AFFIXED_ID);
+
+ return specificDropBehaviorTypes;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected ICommand getSpecificDropCommand(DropObjectsRequest dropRequest, EObject droppedEObject, String nodeType, String edgeType) {
+ if (UMLGraphicalTypes.SHAPE_UML_PROPERTY_AS_AFFIXED_ID.equals(nodeType)) {
+ ConstraintParameterDropHelper constraintParameterDropHelper = new ConstraintParameterDropHelper(getEditingDomain());
+ Command commandParameterDropCommand = constraintParameterDropHelper.getDropConstraintParameterOnPart((Property) droppedEObject, dropRequest.getLocation().getCopy(), (GraphicalEditPart) getHost());
+ return new CommandProxy(commandParameterDropCommand);
+ }
+
+ return super.getSpecificDropCommand(dropRequest, droppedEObject, nodeType, edgeType);
+ }
+
+ /**
+ * {@inheritedDoc}.
+ */
+ @Override
+ public Command getDropObjectsCommand(DropObjectsRequest dropRequest) {
+ TypeDropHelper helper = new TypeDropHelper(getEditingDomain());
+
+ // Single drop management possible drop action list can be proposed
+ if (dropRequest.getObjects().size() == 1) {
+
+ // List of available drop commands
+ final List<Command> commandChoice = new ArrayList<Command>();
+
+ // 1. Try to set the target element type with dropped object
+ Command dropAsSetType = helper.getDropAsTypedElementType(dropRequest, (GraphicalEditPart) getHost());
+ if ((dropAsSetType != null) && (dropAsSetType.canExecute())) {
+ commandChoice.add(dropAsSetType);
+ }
+
+ // 2. Build default drop command (show view of the dropped object)
+ Command defaultDropCommand = super.getDropObjectsCommand(dropRequest);
+ if ((defaultDropCommand != null) && (defaultDropCommand.canExecute())) {
+ defaultDropCommand.setLabel("Default drop (Show dropped object in diagram)");
+ commandChoice.add(defaultDropCommand);
+ }
+
+ // Prepare the selection command (if several command are available) or return the drop command
+ if (commandChoice.size() > 1) {
+ RunnableWithResult<ICommand> runnable;
+ Display.getDefault().syncExec(runnable = new RunnableWithResult.Impl<ICommand>() {
+
+ public void run() {
+ setResult(new SelectAndExecuteCommand("Select drop action for ", PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), commandChoice));
+ }
+ });
+
+ ICommand selectCommand = runnable.getResult();
+
+ return new ICommandProxy(selectCommand);
+ } else if (commandChoice.size() == 1) {
+ return commandChoice.get(0);
+ }
+
+ // else (command choice is empty)
+ return UnexecutableCommand.INSTANCE;
+
+ }
+
+ return super.getDropObjectsCommand(dropRequest);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/policies/CustomBlockPropertyStructureCompartmentEditPartDropEditPolicy.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/policies/CustomBlockPropertyStructureCompartmentEditPartDropEditPolicy.java
new file mode 100755
index 0000000..9692542
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/policies/CustomBlockPropertyStructureCompartmentEditPartDropEditPolicy.java
@@ -0,0 +1,146 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2016 CEA LIST, Esterel Technologies SAS and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Régis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ * Alain Le Guennec (Esterel Technologies SAS) - bug 497400
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.policies;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.transaction.RunnableWithResult;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.commands.SelectAndExecuteCommand;
+import org.eclipse.papyrus.sysml.diagram.internalblock.utils.PartDropHelper;
+import org.eclipse.papyrus.sysml.diagram.parametric.utils.BlockDropHelper;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * <pre>
+ * Customization of the DND edit policy for BlockPropertyComposite that enables
+ * type modification, or creation of new Port and FlowPort by a drop on target.
+ * </pre>
+ */
+public class CustomBlockPropertyStructureCompartmentEditPartDropEditPolicy extends CustomDragDropEditPolicy {
+
+ /** Default constructor */
+ public CustomBlockPropertyStructureCompartmentEditPartDropEditPolicy() {
+ super();
+ }
+
+ /**
+ * {@inheritedDoc}.
+ */
+ @Override
+ public Command getDropObjectsCommand(DropObjectsRequest dropRequest) {
+
+ BlockDropHelper helper = new BlockDropHelper(getEditingDomain());
+
+ // Single drop management possible drop action list can be proposed
+ if (dropRequest.getObjects().size() == 1) {
+
+ // List of available drop commands
+ final List<Command> commandChoice = new ArrayList<Command>();
+
+ // 1. Build command to drop BlockProperty
+ PartDropHelper partDropHelper = new PartDropHelper(getEditingDomain());
+ Command dropPartOnPart = partDropHelper.getDropPartOnPart(dropRequest, (GraphicalEditPart) getHost());
+ if ((dropPartOnPart != null) && (dropPartOnPart.canExecute())) {
+ commandChoice.add(dropPartOnPart);
+ }
+
+ // 2. Try to create a Part typed by the dropped object
+ Command dropAsTypedPart = helper.getDropAsStructureItemOnPart(dropRequest, (GraphicalEditPart) getHost(), SysMLElementTypes.PART_PROPERTY);
+ if ((dropAsTypedPart != null) && (dropAsTypedPart.canExecute())) {
+ commandChoice.add(dropAsTypedPart);
+ }
+
+ // 3. Try to create a Reference typed by the dropped object
+ Command dropAsTypedReference = helper.getDropAsStructureItemOnPart(dropRequest, (GraphicalEditPart) getHost(), SysMLElementTypes.REFERENCE_PROPERTY);
+ if ((dropAsTypedReference != null) && (dropAsTypedReference.canExecute())) {
+ commandChoice.add(dropAsTypedReference);
+ }
+
+ // 4. Try to create an ActorPart typed by the dropped object
+ Command dropAsTypedActorPart = helper.getDropAsStructureItemOnPart(dropRequest, (GraphicalEditPart) getHost(), SysMLElementTypes.ACTOR_PART_PROPERTY);
+ if ((dropAsTypedActorPart != null) && (dropAsTypedActorPart.canExecute())) {
+ commandChoice.add(dropAsTypedActorPart);
+ }
+
+ // 5. Try to create a Value typed by the dropped object
+ Command dropAsTypedValue = helper.getDropAsStructureItemOnPart(dropRequest, (GraphicalEditPart) getHost(), SysMLElementTypes.VALUE_PROPERTY);
+ if ((dropAsTypedValue != null) && (dropAsTypedValue.canExecute())) {
+ commandChoice.add(dropAsTypedValue);
+ }
+
+ // 6. Try to create a Property typed by the dropped object
+ Command dropAsTypedProperty = helper.getDropAsStructureItemOnPart(dropRequest, (GraphicalEditPart) getHost(), UMLElementTypes.PROPERTY);
+ if ((dropAsTypedProperty != null) && (dropAsTypedProperty.canExecute())) {
+ commandChoice.add(dropAsTypedProperty);
+ }
+
+ // 7. Try to create a Property typed by the dropped object
+ Command dropAsTypedConstraintProperty = helper.getDropAsStructureItemOnPart(dropRequest, (GraphicalEditPart) getHost(), SysMLElementTypes.CONSTRAINT_PROPERTY);
+ if ((dropAsTypedConstraintProperty != null) && (dropAsTypedConstraintProperty.canExecute())) {
+ commandChoice.add(dropAsTypedConstraintProperty);
+ }
+
+ // 8. Build default drop command (show view of the dropped object)
+ Command defaultDropCommand = super.getDropObjectsCommand(dropRequest);
+ if ((defaultDropCommand != null) && (defaultDropCommand.canExecute())) {
+ defaultDropCommand.setLabel("Default drop (Show dropped object in diagram)");
+ commandChoice.add(defaultDropCommand);
+ }
+
+ // Prepare the selection command (if several command are available) or return the drop command
+ if (commandChoice.size() > 1) {
+ RunnableWithResult<ICommand> runnable;
+ Display.getDefault().syncExec(runnable = new RunnableWithResult.Impl<ICommand>() {
+
+ public void run() {
+ setResult(new SelectAndExecuteCommand("Select drop action for ", PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), commandChoice));
+ }
+ });
+
+ ICommand selectCommand = runnable.getResult();
+
+ return new ICommandProxy(selectCommand);
+ } else if (commandChoice.size() == 1) {
+ return commandChoice.get(0);
+ }
+
+ // else (command choice is empty)
+ return UnexecutableCommand.INSTANCE;
+
+ }
+
+ return super.getDropObjectsCommand(dropRequest);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected View getReferenceViewForConnectorEnd() {
+ return ViewUtil.getContainerView(super.getReferenceViewForConnectorEnd());
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/policies/CustomBlockPropertyStructureCompartmentSemanticEditPolicy.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/policies/CustomBlockPropertyStructureCompartmentSemanticEditPolicy.java
new file mode 100755
index 0000000..1d5d5ea
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/policies/CustomBlockPropertyStructureCompartmentSemanticEditPolicy.java
@@ -0,0 +1,65 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Régis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.policies;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.constraints.ConstraintBlock;
+import org.eclipse.papyrus.sysml.diagram.common.edit.policy.BlockPropertyStructureCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+public class CustomBlockPropertyStructureCompartmentSemanticEditPolicy extends
+ BlockPropertyStructureCompartmentSemanticEditPolicy {
+
+ @Override
+ protected Command getCreateCommand(CreateElementRequest req) {
+
+ View dropTargetView = ((IGraphicalEditPart) getHost()).getNotationView();
+ EObject eContainer = dropTargetView.eContainer();
+ Element parent = null;
+ if (eContainer != null && eContainer instanceof View) {
+ parent = (Element) ((View) eContainer).getElement();
+ }
+ if (parent instanceof Property) {
+ parent = ((Property) parent).getType();
+ }
+
+ if (parent != null) {
+ if (UMLUtil.getStereotypeApplication(parent, ConstraintBlock.class) != null) {
+ IElementType elementType = req.getElementType();
+ if (elementType != UMLElementTypes.CONSTRAINT
+ && elementType != UMLElementTypes.COMMENT) {
+ // ConstraintBlock
+ if (elementType != SysMLElementTypes.CONSTRAINT_PROPERTY) {
+ // only ConstraintProperty can be dropped in structure
+ // compartment of a diagram owned by a ConstraintBlock
+ // (except common Comment and Constraint)
+ return UnexecutableCommand.INSTANCE;
+ }
+ }
+ }
+ }
+
+ return super.getCreateCommand(req);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/policies/CustomDefaultSemanticEditPolicy.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/policies/CustomDefaultSemanticEditPolicy.java
new file mode 100755
index 0000000..f3e58be
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/policies/CustomDefaultSemanticEditPolicy.java
@@ -0,0 +1,103 @@
+/*****************************************************************************
+ * 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:
+ * Régis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.policies;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.gmf.diagram.common.provider.IGraphicalTypeRegistry;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
+import org.eclipse.papyrus.infra.services.edit.utils.RequestParameterConstants;
+import org.eclipse.papyrus.sysml.diagram.parametric.commands.CustomBindingConnectorReorientCommand;
+import org.eclipse.papyrus.sysml.diagram.parametric.commands.CustomParametricContextLinkCreateCommand;
+import org.eclipse.papyrus.sysml.diagram.parametric.commands.ReorientReferenceRelationshipRequestWithGraphical;
+import org.eclipse.papyrus.sysml.diagram.parametric.provider.CustomGraphicalTypeRegistry;
+import org.eclipse.papyrus.sysml.diagram.parametric.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.parametric.provider.GraphicalTypeRegistry;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.eclipse.papyrus.uml.service.types.command.CommentAnnotatedElementsCreateCommand;
+import org.eclipse.papyrus.uml.service.types.command.CommentAnnotatedElementsReorientCommand;
+import org.eclipse.papyrus.uml.service.types.command.ConnectorReorientCommand;
+
+/**
+ * <pre>
+ * Custom semantic edit policy that replace DefaultSemanticEditPolicy
+ * in order to manage Class Diagram specific elements (reference
+ * relationships COMMENT_ANNOTATED_ELEMENT and CONSTRAINT_CONSTRAINED_ELEMENT).
+ * </pre>
+ */
+public class CustomDefaultSemanticEditPolicy extends DefaultSemanticEditPolicy {
+
+ /** Local graphical type registry for graphical elements */
+ private IGraphicalTypeRegistry registry = new CustomGraphicalTypeRegistry();
+
+ /** Local graphical type registry for inherited graphical elements */
+ private IGraphicalTypeRegistry inheritedRegistry = new GraphicalTypeRegistry();
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+
+ if (ElementTypes.COMMENT_ANNOTATED_ELEMENT == req.getElementType()) {
+ return getGEFWrapper(new CommentAnnotatedElementsCreateCommand(req));
+ }
+
+ if (ElementTypes.CONTEXT_LINK == req.getElementType()) {
+ return getGEFWrapper(new CustomParametricContextLinkCreateCommand(req));
+ }
+
+ String newEdgeGraphicalType = registry.getEdgeGraphicalType(req.getElementType());
+
+ if (inheritedRegistry.isKnownEdgeType(newEdgeGraphicalType)) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ if (!registry.isKnownEdgeType(newEdgeGraphicalType)) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ return super.getCreateRelationshipCommand(req);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
+
+ View reconnectedView = (View) req.getParameter(RequestParameterConstants.GRAPHICAL_RECONNECTED_EDGE);
+ String reconnectedViewType = (reconnectedView != null) ? reconnectedView.getType() : org.eclipse.papyrus.infra.gmfdiag.common.providers.IGraphicalTypeRegistry.UNDEFINED_TYPE;
+
+ if (ElementTypes.COMMENT_ANNOTATED_ELEMENT.getSemanticHint().equals(reconnectedViewType)) {
+ return getGEFWrapper(new CommentAnnotatedElementsReorientCommand(req));
+ }
+
+ if (UMLGraphicalTypes.LINK_UML_CONNECTOR_ID.equals(reconnectedViewType)) {
+ if (req instanceof ReorientReferenceRelationshipRequestWithGraphical) {
+ return getGEFWrapper(new CustomBindingConnectorReorientCommand((ReorientReferenceRelationshipRequestWithGraphical) req));
+ }
+ else {
+ return getGEFWrapper(new ConnectorReorientCommand(req));
+ }
+ }
+
+
+ return super.getReorientReferenceRelationshipCommand(req);
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/policies/CustomDragDropEditPolicy.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/policies/CustomDragDropEditPolicy.java
new file mode 100755
index 0000000..7ce9930
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/policies/CustomDragDropEditPolicy.java
@@ -0,0 +1,278 @@
+/*****************************************************************************
+ * 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:
+ * Régis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.policies;
+
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest;
+import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.gmf.diagram.common.edit.policy.CommonDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.sysml.blocks.NestedConnectorEnd;
+import org.eclipse.papyrus.sysml.diagram.internalblock.dnd.helper.CustomLinkMappingHelper;
+import org.eclipse.papyrus.sysml.diagram.parametric.provider.CustomGraphicalTypeRegistry;
+import org.eclipse.papyrus.sysml.service.types.utils.ConnectorUtils;
+import org.eclipse.papyrus.uml.diagram.common.commands.CommonDeferredCreateConnectionViewCommand;
+import org.eclipse.papyrus.uml.diagram.common.commands.SemanticAdapter;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.eclipse.uml2.uml.Connector;
+import org.eclipse.uml2.uml.ConnectorEnd;
+import org.eclipse.uml2.uml.EncapsulatedClassifier;
+import org.eclipse.uml2.uml.Port;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+/** Customization of the DND edit policy for the Internal Block Diagram */
+public class CustomDragDropEditPolicy extends CommonDiagramDragDropEditPolicy {
+
+ private ConnectorUtils utils = new ConnectorUtils();
+
+ /** Default constructor. */
+ public CustomDragDropEditPolicy() {
+ super(new CustomLinkMappingHelper());
+ registry = new CustomGraphicalTypeRegistry();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Set<String> getSpecificDropBehaviorTypes() {
+ Set<String> specificDropBehaviorTypes = new HashSet<String>();
+
+ specificDropBehaviorTypes.add(UMLGraphicalTypes.LINK_UML_CONNECTOR_ID);
+
+ return specificDropBehaviorTypes;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected ICommand getSpecificDropCommand(DropObjectsRequest dropRequest, EObject droppedEObject, String nodeType, String edgeType) {
+ if ((UMLGraphicalTypes.LINK_UML_CONNECTOR_ID.equals(edgeType)) && (droppedEObject instanceof Connector)) {
+ return getConnectorDropCommand(dropRequest, (Connector) droppedEObject, edgeType);
+ }
+
+ return org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand.INSTANCE;
+ }
+
+ protected ICommand getConnectorDropCommand(DropObjectsRequest dropRequest, Connector droppedEObject, String edgeType) {
+
+ // Only manage binary link during drop
+ if (droppedEObject.getEnds().size() != 2) {
+ return org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand.INSTANCE;
+ }
+
+ ConnectorEnd source = droppedEObject.getEnds().get(0);
+ ConnectorEnd target = droppedEObject.getEnds().get(1);
+
+ // Find views in current diagram representing source and target
+ Collection<View> sourceViews = getViewsForConnectorEnd(source);
+ Collection<View> targetViews = getViewsForConnectorEnd(target);
+
+ IAdaptable sourceViewAdapter = null;
+ IAdaptable targetViewAdapter = null;
+
+ // If either a source or target lacks create view for these elements, abort...
+ if (sourceViews.isEmpty() || targetViews.isEmpty()) {
+ return org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand.INSTANCE;
+ }
+
+ View selectedSourceView = null;
+ View selectedTargetView = null;
+ // until a correct one is found, check that source and target views selected are correct given the current path for the connector...
+ for (View sourceView : sourceViews) {
+ View targetView = getFirstValidTargetViewForSource(sourceView, targetViews, droppedEObject);
+ if (targetView != null) {
+ selectedSourceView = sourceView;
+ selectedTargetView = targetView;
+ break;
+ }
+ }
+
+
+ // Create source adapter
+ if (selectedSourceView != null) { // sourceViewAdapter should still be null in this case
+ sourceViewAdapter = new SemanticAdapter(null, selectedSourceView);
+ } else {
+ return org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand.INSTANCE;
+ }
+
+ // Create target adapter
+ if (selectedTargetView != null) { // targetViewAdapter should still be null in this case
+ targetViewAdapter = new SemanticAdapter(null, selectedTargetView);
+ } else {
+ return org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand.INSTANCE;
+ }
+
+ // Create a view for the dropped link between the source and target view adapters
+ IAdaptable droppedObjectAdapter = new SemanticAdapter(droppedEObject, null);
+
+ CreateConnectionViewRequest.ConnectionViewDescriptor linkdescriptor = new CreateConnectionViewRequest.ConnectionViewDescriptor(droppedObjectAdapter, edgeType, getDiagramPreferencesHint());
+
+ CommonDeferredCreateConnectionViewCommand createConnectionViewCommand = new CommonDeferredCreateConnectionViewCommand(getEditingDomain(), edgeType, sourceViewAdapter, targetViewAdapter, getViewer(), getDiagramPreferencesHint(), linkdescriptor, null);
+ createConnectionViewCommand.setElement(droppedEObject);
+
+ return createConnectionViewCommand;
+ }
+
+ /**
+ * get the first valid target view for the given source. the couple source/target is valid if the path to them from the future container is valid
+ *
+ * @param sourceView
+ * @param targetViews
+ * @return
+ */
+ private View getFirstValidTargetViewForSource(View sourceView, Collection<View> targetViews, Connector droppedConnector) {
+ for (View targetView : targetViews) {
+ if (isValidTargetViewForSource(sourceView, targetView, droppedConnector)) {
+ return targetView;
+ }
+ }
+
+ return null;
+ }
+
+ private boolean isValidTargetViewForSource(View sourceView, View targetView, Connector droppedConnector) {
+ if (!(utils.isCrossingEncapsulation(sourceView, targetView))) {
+ // no encapsulation. Computes the end paths
+ List<Property> sourceNestedPaths = utils.getNestedPropertyPath(sourceView, targetView);
+ List<Property> targetNestedPaths = utils.getNestedPropertyPath(targetView, sourceView);
+
+ // check this is compatible with current connector
+ ConnectorEnd sourceConnectorEnd = utils.getSourceConnectorEnd(droppedConnector);
+ NestedConnectorEnd nestedSourceConnectorEnd = UMLUtil.getStereotypeApplication(sourceConnectorEnd, NestedConnectorEnd.class);
+ if (nestedSourceConnectorEnd != null) {
+ List<Property> currentSourceConnectorPropertyPath = nestedSourceConnectorEnd.getPropertyPath();
+ // compare the 2 list
+ if (!sourceNestedPaths.equals(currentSourceConnectorPropertyPath)) {
+ return false;
+ }
+
+ } else { // no end for the current connector, so the sourceNestedPath should be empty
+ if (!sourceNestedPaths.isEmpty()) {
+ return false;
+ }
+ }
+
+
+ ConnectorEnd targetConnectorEnd = utils.getTargetConnectorEnd(droppedConnector);
+ NestedConnectorEnd nestedTargetConnectorEnd = UMLUtil.getStereotypeApplication(targetConnectorEnd, NestedConnectorEnd.class);
+ if (nestedTargetConnectorEnd != null) {
+ List<Property> currentTargetConnectorPropertyPath = nestedTargetConnectorEnd.getPropertyPath();
+ // compare the 2 list
+ if (!targetNestedPaths.equals(currentTargetConnectorPropertyPath)) {
+ return false;
+ }
+
+ } else { // no end for the current connector, so the targetNestedPaths should be empty
+ if (!targetNestedPaths.isEmpty()) {
+ return false;
+ }
+ }
+ }
+ return true;
+ }
+
+ /**
+ * This methods looks for views representing a given {@link ConnectorEnd} in the host diagram.
+ *
+ * @param end
+ * the {@link ConnectorEnd} to look for.
+ * @return the list of {@link View} representing the eObject.
+ */
+ protected Set<View> getViewsForConnectorEnd(ConnectorEnd end) {
+ Set<View> views = new HashSet<View>();
+
+ // Retrieve host diagram
+ View hostView = ((IGraphicalEditPart) getHost()).getNotationView();
+ View hostDiagram = (hostView instanceof Diagram) ? hostView : hostView.getDiagram();
+
+ // Retrieve all views for the ConnectorEnd role
+ EReference[] refs = { NotationPackage.eINSTANCE.getView_Element() };
+ @SuppressWarnings("unchecked")
+ Collection<View> relatedViews = EMFCoreUtil.getReferencers(end.getRole(), refs);
+
+ // TODO: We should filter views not only for the current diagram,
+ // but also consider only views nested within the owner of the connector that are closest to the host view
+ // (in case there are several instances of a Part within which the connector could appear).
+ // Connector connector = (Connector)end.getOwner();
+ // StructuredClassifier connectorOwner = (StructuredClassifier)connector.getOwner();
+ // Parse and select views from host diagram only
+ Iterator<View> it = relatedViews.iterator();
+ while (it.hasNext()) {
+ View currentView = it.next();
+ if (currentView.getDiagram() == hostDiagram) { // FIXME: Cf TODO above.
+
+ boolean isInView = false;
+ View containerView = currentView;
+ while (containerView != null && !(containerView instanceof Diagram)) {
+ if (containerView == getReferenceViewForConnectorEnd()) {
+ isInView = true;
+ }
+ containerView = ViewUtil.getContainerView(containerView);
+ }
+
+ if (isInView) {
+
+ EObject containerElement = ViewUtil.getContainerView(currentView).getElement();
+
+ // If the ConnectorEnd partWithPort is not null, only select Views for which
+ // the graphical parent reference partWithPort.
+ if (end.getPartWithPort() != null) {
+ if (containerElement == end.getPartWithPort()) {
+ views.add(currentView);
+ }
+ } else {
+ // If the role is a Port, its graphical parent is a EncapsulatedClassifier
+ if (end.getRole() instanceof Port) {
+ if (containerElement instanceof EncapsulatedClassifier) {
+ views.add(currentView);
+ } else if (containerElement instanceof Property) {
+ Property property = (Property) containerElement;
+ if (property.getType() == end.getRole().getOwner()) {
+ views.add(currentView);
+ }
+ }
+ } else { // No further test needed
+ views.add(currentView);
+ }
+
+ }
+ }
+ }
+ }
+
+ return views;
+ }
+
+ protected View getReferenceViewForConnectorEnd() {
+ return ((IGraphicalEditPart) getHost()).getNotationView();
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/policies/CustomParametricSemanticPolicy.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/policies/CustomParametricSemanticPolicy.java
new file mode 100755
index 0000000..32c432e
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/policies/CustomParametricSemanticPolicy.java
@@ -0,0 +1,270 @@
+/*****************************************************************************
+ * 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:
+ * Régis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.policies;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gef.requests.ReconnectRequest;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher;
+import org.eclipse.gmf.runtime.emf.type.core.SpecializationType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRequest;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.constraints.ConstraintBlock;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.BlockPropertyCompositeEditPart;
+import org.eclipse.papyrus.sysml.diagram.parametric.commands.CustomBindingConnectorCreateCommand;
+import org.eclipse.papyrus.sysml.diagram.parametric.commands.CustomParametricContextLinkReorientCommand;
+import org.eclipse.papyrus.sysml.diagram.parametric.commands.ReorientReferenceRelationshipRequestWithGraphical;
+import org.eclipse.papyrus.sysml.diagram.parametric.edit.part.CustomBlockCompositeEditPartTN;
+import org.eclipse.papyrus.sysml.diagram.parametric.edit.part.CustomConstraintBlockPropertyCompositeEditPart;
+import org.eclipse.papyrus.sysml.diagram.parametric.edit.policy.DiagramSemanticEditPolicy;
+import org.eclipse.papyrus.sysml.service.types.matcher.PartPropertyMatcher;
+import org.eclipse.papyrus.sysml.service.types.matcher.ReferencePropertyMatcher;
+import org.eclipse.papyrus.sysml.service.types.matcher.ValuePropertyMatcher;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ContextLinkEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.ConstraintParameterAffixedNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.PortAffixedNodeEditPart;
+import org.eclipse.papyrus.uml.tools.utils.UMLUtil;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.UMLPackage;
+
+public class CustomParametricSemanticPolicy extends DiagramSemanticEditPolicy {
+
+ @Override
+ protected Command getSemanticCommand(IEditCommandRequest request) {
+ if (request instanceof CreateElementRequest) {
+ if (((CreateElementRequest) request).getElementType().getEClass() == UMLPackage.eINSTANCE.getProperty()) {
+ // Could create a ConstraintParameter on the diagram frame only if host element is a ConstraintBlock
+ Element semanticOwner = UMLUtil.resolveUMLElement(this.getHost());
+ if (semanticOwner instanceof Class && org.eclipse.uml2.uml.util.UMLUtil.getStereotypeApplication(semanticOwner, ConstraintBlock.class) == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ // Could not create Part/Reference/Value
+ if (request instanceof CreateElementRequest && ((CreateElementRequest) request).getElementType() instanceof SpecializationType) {
+ IElementMatcher matcher = ((SpecializationType) ((CreateElementRequest) request).getElementType()).getMatcher();
+ if (matcher instanceof PartPropertyMatcher) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ if (matcher instanceof ReferencePropertyMatcher) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ if (matcher instanceof ValuePropertyMatcher) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ }
+ }
+ }
+ return super.getSemanticCommand(request);
+ }
+
+ @Override
+ protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+ if (req.getElementType().getEClass() == UMLPackage.eINSTANCE.getConnector()) {
+ if (getHost() instanceof CustomBlockCompositeEditPartTN) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ if (getHost() instanceof CustomConstraintBlockPropertyCompositeEditPart) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ if (getHost() instanceof ConstraintParameterAffixedNodeEditPart) {
+ return getGEFWrapper(new CustomBindingConnectorCreateCommand(req));
+ }
+ if (getHost() instanceof PortAffixedNodeEditPart) {
+ return getGEFWrapper(new CustomBindingConnectorCreateCommand(req));
+ }
+ if (getHost() instanceof BlockPropertyCompositeEditPart) {
+ return getGEFWrapper(new CustomBindingConnectorCreateCommand(req));
+ }
+ }
+ return super.getCreateRelationshipCommand(req);
+ }
+
+ /**
+ * Method getReorientRefRelationshipTargetCommand. Removes the reference the
+ * ConnectionEditPart current has an add the new TargetEditPart
+ *
+ * @param request
+ * @return Command
+ */
+ @Override
+ protected Command getReorientRelationshipSourceCommand(
+ ReconnectRequest request) {
+
+ EditPart target = request.getTarget();
+ if (target instanceof CustomBlockCompositeEditPartTN) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ if (target instanceof CustomConstraintBlockPropertyCompositeEditPart) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ org.eclipse.gef.ConnectionEditPart connectionEP = (request).getConnectionEditPart();
+
+ if (connectionEP instanceof ConnectionEditPart) {
+ if (!((ConnectionEditPart) connectionEP).isSemanticConnection()) {
+ return null;
+ }
+ }
+
+ EditPart sourceEditPart = connectionEP.getSource();
+ EditPart targetEditPart = connectionEP.getTarget();
+ EObject referenceOwner = ViewUtil
+ .resolveSemanticElement((View) targetEditPart.getModel());
+ EObject oldTarget = ViewUtil
+ .resolveSemanticElement((View) sourceEditPart.getModel());
+ EObject newTarget = ViewUtil
+ .resolveSemanticElement((View) request.getTarget().getModel());
+
+ TransactionalEditingDomain editingDomain = ((IGraphicalEditPart) getHost())
+ .getEditingDomain();
+
+ ReorientReferenceRelationshipRequest semRequest = new ReorientReferenceRelationshipRequestWithGraphical(
+ editingDomain, referenceOwner, newTarget, oldTarget,
+ ReorientRequest.REORIENT_SOURCE,
+ request.getTarget(), targetEditPart);
+
+ semRequest.addParameters(request.getExtendedData());
+ return getSemanticCommand(semRequest);
+ }
+
+
+
+ /**
+ * Method getReorientRefRelationshipTargetCommand. Removes the reference the
+ * ConnectionEditPart current has an add the new TargetEditPart
+ *
+ * @param request
+ * @return Command
+ */
+ @Override
+ protected Command getReorientRelationshipTargetCommand(
+ ReconnectRequest request) {
+
+ EditPart target = request.getTarget();
+ if (target instanceof CustomBlockCompositeEditPartTN) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ if (target instanceof CustomConstraintBlockPropertyCompositeEditPart) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ org.eclipse.gef.ConnectionEditPart connectionEP = (request).getConnectionEditPart();
+
+ if (connectionEP instanceof ConnectionEditPart) {
+ if (!((ConnectionEditPart) connectionEP).isSemanticConnection()) {
+ return null;
+ }
+ }
+
+ EditPart sourceEditPart = connectionEP.getSource();
+ EditPart targetEditPart = connectionEP.getTarget();
+ EObject referenceOwner = ViewUtil
+ .resolveSemanticElement((View) sourceEditPart.getModel());
+ EObject oldTarget = ViewUtil
+ .resolveSemanticElement((View) targetEditPart.getModel());
+ EObject newTarget = ViewUtil
+ .resolveSemanticElement((View) request.getTarget().getModel());
+
+ TransactionalEditingDomain editingDomain = ((IGraphicalEditPart) getHost())
+ .getEditingDomain();
+
+ ReorientReferenceRelationshipRequest semRequest = new ReorientReferenceRelationshipRequestWithGraphical(
+ editingDomain, referenceOwner, newTarget, oldTarget,
+ ReorientRequest.REORIENT_TARGET,
+ sourceEditPart, request.getTarget());
+
+ semRequest.addParameters(request.getExtendedData());
+
+ return getSemanticCommand(semRequest);
+ }
+
+ @Override
+ protected Command getReorientRefRelationshipSourceCommand(
+ ReconnectRequest request) {
+
+ if (request.getConnectionEditPart() instanceof ContextLinkEditPart) {
+ org.eclipse.gef.ConnectionEditPart connectionEP = request.getConnectionEditPart();
+
+ if (connectionEP instanceof ConnectionEditPart) {
+ if (!((ConnectionEditPart) connectionEP).isSemanticConnection()) {
+ return null;
+ }
+ }
+
+ EditPart sourceEditPart = connectionEP.getSource();
+ EditPart targetEditPart = connectionEP.getTarget();
+ EObject referenceOwner = ViewUtil
+ .resolveSemanticElement((View) targetEditPart.getModel());
+ EObject oldTarget = ViewUtil
+ .resolveSemanticElement((View) sourceEditPart.getModel());
+ EObject newTarget = ViewUtil
+ .resolveSemanticElement((View) request.getTarget().getModel());
+
+ TransactionalEditingDomain editingDomain = ((IGraphicalEditPart) getHost())
+ .getEditingDomain();
+
+ ReorientReferenceRelationshipRequestWithGraphical semRequest = new ReorientReferenceRelationshipRequestWithGraphical(
+ editingDomain, referenceOwner, newTarget, oldTarget,
+ ReorientRequest.REORIENT_SOURCE,
+ sourceEditPart, targetEditPart);
+ return getGEFWrapper(new CustomParametricContextLinkReorientCommand(semRequest));
+ }
+ return super.getReorientRefRelationshipTargetCommand(request);
+ }
+
+ @Override
+ protected Command getReorientRefRelationshipTargetCommand(
+ ReconnectRequest request) {
+ if (request.getConnectionEditPart() instanceof ContextLinkEditPart) {
+ org.eclipse.gef.ConnectionEditPart connectionEP = request.getConnectionEditPart();
+
+ if (connectionEP instanceof ConnectionEditPart) {
+ if (!((ConnectionEditPart) connectionEP).isSemanticConnection()) {
+ return null;
+ }
+ }
+
+ EditPart sourceEditPart = connectionEP.getSource();
+ EditPart targetEditPart = connectionEP.getTarget();
+ EObject referenceOwner = ViewUtil
+ .resolveSemanticElement((View) sourceEditPart.getModel());
+ EObject oldTarget = ViewUtil
+ .resolveSemanticElement((View) targetEditPart.getModel());
+ EObject newTarget = ViewUtil
+ .resolveSemanticElement((View) request.getTarget().getModel());
+
+ TransactionalEditingDomain editingDomain = ((IGraphicalEditPart) getHost())
+ .getEditingDomain();
+
+ ReorientReferenceRelationshipRequestWithGraphical semRequest = new ReorientReferenceRelationshipRequestWithGraphical(
+ editingDomain, referenceOwner, newTarget, oldTarget,
+ ReorientRequest.REORIENT_TARGET,
+ sourceEditPart, targetEditPart);
+ return getGEFWrapper(new CustomParametricContextLinkReorientCommand(semRequest));
+ }
+ return super.getReorientRefRelationshipTargetCommand(request);
+ }
+
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/policies/CustomStructureClassifierDropEditPolicy.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/policies/CustomStructureClassifierDropEditPolicy.java
new file mode 100755
index 0000000..2b1881a
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/policies/CustomStructureClassifierDropEditPolicy.java
@@ -0,0 +1,167 @@
+/*****************************************************************************
+ * 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:
+ * Régis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.policies;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.RunnableWithResult;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.commands.SelectAndExecuteCommand;
+import org.eclipse.papyrus.sysml.constraints.ConstraintBlock;
+import org.eclipse.papyrus.sysml.constraints.ConstraintProperty;
+import org.eclipse.papyrus.sysml.diagram.parametric.utils.BlockDropHelper;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+/**
+ * <pre>
+ * Customization of the DND edit policy for the StructureClassifier compartments, that enables the direct
+ * creation of typed Part, Reference, ConstraintProperty, Value, ActorPart or Property by dragging types in a Block structure compartment.
+ * </pre>
+ */
+public class CustomStructureClassifierDropEditPolicy extends CustomDragDropEditPolicy {
+
+ /** Default constructor */
+ public CustomStructureClassifierDropEditPolicy() {
+ super();
+ }
+
+ /**
+ * {@inheritedDoc}.
+ */
+ @Override
+ public Command getDropObjectsCommand(DropObjectsRequest dropRequest) {
+
+ BlockDropHelper helper = new BlockDropHelper(getEditingDomain());
+
+ // Single drop management possible drop action list can be proposed
+ if (dropRequest.getObjects().size() == 1) {
+
+ // List of available drop commands
+ final List<Command> commandChoice = new ArrayList<Command>();
+
+ // 1. Try to create a Part typed by the dropped object
+ Command dropAsTypedPart = helper.getDropAsStructureItem(dropRequest, (GraphicalEditPart) getHost(), SysMLElementTypes.PART_PROPERTY);
+ if ((dropAsTypedPart != null) && (dropAsTypedPart.canExecute())) {
+ commandChoice.add(dropAsTypedPart);
+ }
+
+ // 2. Try to create a Reference typed by the dropped object
+ Command dropAsTypedReference = helper.getDropAsStructureItem(dropRequest, (GraphicalEditPart) getHost(), SysMLElementTypes.REFERENCE_PROPERTY);
+ if ((dropAsTypedReference != null) && (dropAsTypedReference.canExecute())) {
+ commandChoice.add(dropAsTypedReference);
+ }
+
+ // 3. Try to create an ActorPart typed by the dropped object
+ Command dropAsTypedActorPart = helper.getDropAsStructureItem(dropRequest, (GraphicalEditPart) getHost(), SysMLElementTypes.ACTOR_PART_PROPERTY);
+ if ((dropAsTypedActorPart != null) && (dropAsTypedActorPart.canExecute())) {
+ commandChoice.add(dropAsTypedActorPart);
+ }
+
+ // 4. Try to create a Value typed by the dropped object
+ Command dropAsTypedValue = helper.getDropAsStructureItem(dropRequest, (GraphicalEditPart) getHost(), SysMLElementTypes.VALUE_PROPERTY);
+ if ((dropAsTypedValue != null) && (dropAsTypedValue.canExecute())) {
+ commandChoice.add(dropAsTypedValue);
+ }
+
+ // 5. Try to create a Property typed by the dropped object
+ Command dropAsTypedProperty = helper.getDropAsStructureItem(dropRequest, (GraphicalEditPart) getHost(), UMLElementTypes.PROPERTY);
+ if ((dropAsTypedProperty != null) && (dropAsTypedProperty.canExecute())) {
+ commandChoice.add(dropAsTypedProperty);
+ }
+
+ // 6. Try to create a ConstraintProperty typed by the dropped object
+ Command dropAsTypedConstraintProperty = helper.getDropAsStructureItem(dropRequest, (GraphicalEditPart) getHost(), SysMLElementTypes.CONSTRAINT_PROPERTY);
+ if ((dropAsTypedConstraintProperty != null) && (dropAsTypedConstraintProperty.canExecute())) {
+ commandChoice.add(dropAsTypedConstraintProperty);
+ }
+
+ // 7. Build default drop command (show view of the dropped object)
+ Command defaultDropCommand = super.getDropObjectsCommand(dropRequest);
+ if ((defaultDropCommand != null) && (defaultDropCommand.canExecute())) {
+ defaultDropCommand.setLabel("Default drop (Show dropped object in diagram)");
+ commandChoice.add(defaultDropCommand);
+ }
+
+ // Prepare the selection command (if several command are available) or return the drop command
+ if (commandChoice.size() > 1) {
+ RunnableWithResult<ICommand> runnable;
+ Display.getDefault().syncExec(runnable = new RunnableWithResult.Impl<ICommand>() {
+
+ public void run() {
+ setResult(new SelectAndExecuteCommand("Select drop action for ", PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), commandChoice));
+ }
+ });
+
+ ICommand selectCommand = runnable.getResult();
+
+ return new ICommandProxy(selectCommand);
+
+ } else if (commandChoice.size() == 1) {
+ return commandChoice.get(0);
+ }
+
+ // else (command choice is empty)
+ return UnexecutableCommand.INSTANCE;
+
+ }
+
+ return super.getDropObjectsCommand(dropRequest);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected View getReferenceViewForConnectorEnd() {
+ return ViewUtil.getContainerView(super.getReferenceViewForConnectorEnd());
+ }
+
+ @Override
+ protected ICommand getDropObjectCommand(DropObjectsRequest dropRequest, EObject droppedObject) {
+ View dropTargetView = ((IGraphicalEditPart) getHost()).getNotationView();
+ EObject dropTargetElement = dropTargetView.getElement();
+
+ EObject diagramOwner = getDiagramOwner(dropTargetView);
+ if (UMLUtil.getStereotypeApplication((Element) diagramOwner, ConstraintBlock.class) != null) {
+ // ConstraintBlock
+ if (UMLUtil.getStereotypeApplication((Element) dropTargetElement, ConstraintProperty.class) == null) {
+ // only ConstraintProperty can be dropped in structure compartment of a diagram owned by a ConstraintBlock
+ return org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand.INSTANCE;
+ }
+ }
+ return super.getDropObjectCommand(dropRequest, droppedObject);
+ }
+
+ private EObject getDiagramOwner(View dropTargetView) {
+ Diagram diagram = dropTargetView.getDiagram();
+ EObject diagramOwer = diagram.getElement();
+ return diagramOwer;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/policies/CustomStructureCompartmentSemanticEditPolicy.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/policies/CustomStructureCompartmentSemanticEditPolicy.java
new file mode 100755
index 0000000..5d2aed5
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/policies/CustomStructureCompartmentSemanticEditPolicy.java
@@ -0,0 +1,65 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Régis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.policies;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.constraints.ConstraintBlock;
+import org.eclipse.papyrus.sysml.diagram.common.edit.policy.StructureCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+public class CustomStructureCompartmentSemanticEditPolicy extends
+ StructureCompartmentSemanticEditPolicy {
+
+ @Override
+ protected Command getCreateCommand(CreateElementRequest req) {
+
+ View dropTargetView = ((IGraphicalEditPart) getHost()).getNotationView();
+ EObject eContainer = dropTargetView.eContainer();
+ Element parent = null;
+ if (eContainer != null && eContainer instanceof View) {
+ parent = (Element) ((View) eContainer).getElement();
+ }
+ if (parent instanceof Property) {
+ parent = ((Property) parent).getType();
+ }
+
+ if (parent != null) {
+ if (UMLUtil.getStereotypeApplication(parent, ConstraintBlock.class) != null) {
+ IElementType elementType = req.getElementType();
+ if (elementType != UMLElementTypes.CONSTRAINT
+ && elementType != UMLElementTypes.COMMENT) {
+ // ConstraintBlock
+ if (elementType != SysMLElementTypes.CONSTRAINT_PROPERTY) {
+ // only ConstraintProperty can be dropped in structure
+ // compartment of a diagram owned by a ConstraintBlock
+ // (except common Comment and Constraint)
+ return UnexecutableCommand.INSTANCE;
+ }
+ }
+ }
+ }
+
+ return super.getCreateCommand(req);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/policies/StructureClassifierDropEditPolicy.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/policies/StructureClassifierDropEditPolicy.java
new file mode 100755
index 0000000..2fda694
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/policies/StructureClassifierDropEditPolicy.java
@@ -0,0 +1,139 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2016 CEA LIST, Esterel Technologies SAS and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Régis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ * Alain Le Guennec (Esterel Technologies SAS) - bug 497400
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.policies;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.transaction.RunnableWithResult;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.commands.SelectAndExecuteCommand;
+import org.eclipse.papyrus.sysml.diagram.parametric.utils.BlockDropHelper;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * <pre>
+ * Customization of the DND edit policy for the StructureClassifier compartments, that enables the direct
+ * creation of typed Part, Reference, Value, ActorPart or Property by dragging types in a Block structure compartment.
+ * </pre>
+ */
+public class StructureClassifierDropEditPolicy extends CustomDragDropEditPolicy {
+
+ /** Default constructor */
+ public StructureClassifierDropEditPolicy() {
+ super();
+ }
+
+ /**
+ * {@inheritedDoc}.
+ */
+ @Override
+ public Command getDropObjectsCommand(DropObjectsRequest dropRequest) {
+
+ BlockDropHelper helper = new BlockDropHelper(getEditingDomain());
+
+ // Single drop management possible drop action list can be proposed
+ if (dropRequest.getObjects().size() == 1) {
+
+ // List of available drop commands
+ final List<Command> commandChoice = new ArrayList<Command>();
+
+ // 1. Try to create a Part typed by the dropped object
+ Command dropAsTypedPart = helper.getDropAsStructureItem(dropRequest, (GraphicalEditPart) getHost(), SysMLElementTypes.PART_PROPERTY);
+ if ((dropAsTypedPart != null) && (dropAsTypedPart.canExecute())) {
+ commandChoice.add(dropAsTypedPart);
+ }
+
+ // 2. Try to create a Reference typed by the dropped object
+ Command dropAsTypedReference = helper.getDropAsStructureItem(dropRequest, (GraphicalEditPart) getHost(), SysMLElementTypes.REFERENCE_PROPERTY);
+ if ((dropAsTypedReference != null) && (dropAsTypedReference.canExecute())) {
+ commandChoice.add(dropAsTypedReference);
+ }
+
+ // 3. Try to create an ActorPart typed by the dropped object
+ Command dropAsTypedActorPart = helper.getDropAsStructureItem(dropRequest, (GraphicalEditPart) getHost(), SysMLElementTypes.ACTOR_PART_PROPERTY);
+ if ((dropAsTypedActorPart != null) && (dropAsTypedActorPart.canExecute())) {
+ commandChoice.add(dropAsTypedActorPart);
+ }
+
+ // 4. Try to create a Value typed by the dropped object
+ Command dropAsTypedValue = helper.getDropAsStructureItem(dropRequest, (GraphicalEditPart) getHost(), SysMLElementTypes.VALUE_PROPERTY);
+ if ((dropAsTypedValue != null) && (dropAsTypedValue.canExecute())) {
+ commandChoice.add(dropAsTypedValue);
+ }
+
+ // 5. Try to create a Property typed by the dropped object
+ Command dropAsTypedProperty = helper.getDropAsStructureItem(dropRequest, (GraphicalEditPart) getHost(), UMLElementTypes.PROPERTY);
+ if ((dropAsTypedProperty != null) && (dropAsTypedProperty.canExecute())) {
+ commandChoice.add(dropAsTypedProperty);
+ }
+
+ // 6. Try to create a ConstraintProperty typed by the dropped object
+ Command dropAsTypedConstraintProperty = helper.getDropAsStructureItem(dropRequest, (GraphicalEditPart) getHost(), SysMLElementTypes.CONSTRAINT_PROPERTY);
+ if ((dropAsTypedConstraintProperty != null) && (dropAsTypedConstraintProperty.canExecute())) {
+ commandChoice.add(dropAsTypedConstraintProperty);
+ }
+
+ // 7. Build default drop command (show view of the dropped object)
+ Command defaultDropCommand = super.getDropObjectsCommand(dropRequest);
+ if ((defaultDropCommand != null) && (defaultDropCommand.canExecute())) {
+ defaultDropCommand.setLabel("Default drop (Show dropped object in diagram)");
+ commandChoice.add(defaultDropCommand);
+ }
+
+ // Prepare the selection command (if several command are available) or return the drop command
+ if (commandChoice.size() > 1) {
+ RunnableWithResult<ICommand> runnable;
+ Display.getDefault().syncExec(runnable = new RunnableWithResult.Impl<ICommand>() {
+
+ public void run() {
+ setResult(new SelectAndExecuteCommand("Select drop action for ", PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), commandChoice));
+ }
+ });
+
+ ICommand selectCommand = runnable.getResult();
+
+ return new ICommandProxy(selectCommand);
+
+ } else if (commandChoice.size() == 1) {
+ return commandChoice.get(0);
+ }
+
+ // else (command choice is empty)
+ return UnexecutableCommand.INSTANCE;
+
+ }
+
+ return super.getDropObjectsCommand(dropRequest);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected View getReferenceViewForConnectorEnd() {
+ return ViewUtil.getContainerView(super.getReferenceViewForConnectorEnd());
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/preferences/BlockPropertyCompositePreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/preferences/BlockPropertyCompositePreferencePage.java
new file mode 100755
index 0000000..bbdd7af
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/preferences/BlockPropertyCompositePreferencePage.java
@@ -0,0 +1,42 @@
+/*****************************************************************************
+ * 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:
+ * Régis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.preferences;
+
+import org.eclipse.gmf.runtime.common.ui.preferences.AbstractPreferencePage;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.swt.widgets.Composite;
+
+public class BlockPropertyCompositePreferencePage extends AbstractPreferencePage {
+
+ /** Constructor */
+ public BlockPropertyCompositePreferencePage() {
+ super();
+ }
+
+ /** Default preferences initializer */
+ public static void initDefaults(IPreferenceStore store) {
+ CustomBlockPropertyCompositePreferencePage.initDefaults(store);
+ /* CustomNestedBlockPropertyCompositePreferencePage.initDefaults(store); */
+ }
+
+ @Override
+ protected void addFields(Composite parent) {
+
+ }
+
+ @Override
+ protected void initHelp() {
+
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/preferences/ConstraintParameterAsBorderItemPreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/preferences/ConstraintParameterAsBorderItemPreferencePage.java
new file mode 100755
index 0000000..f47329a
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/preferences/ConstraintParameterAsBorderItemPreferencePage.java
@@ -0,0 +1,44 @@
+/*****************************************************************************
+ * 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:
+ * R�gis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.sysml.diagram.parametric.provider.ElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+
+/**
+ * {@link Port} preference page.
+ */
+public class ConstraintParameterAsBorderItemPreferencePage extends ParametricDiagramNodePreferencePage {
+
+ /** Constant key to access preferences */
+ public static String prefKey = ElementTypes.DIAGRAM_ID + "_" + UMLGraphicalTypes.SHAPE_UML_PROPERTY_AS_AFFIXED_ID; //$NON-NLS-1$
+
+ public static String prefLabelKey = prefKey + "-" + UMLGraphicalTypes.AFFIXEDLABEL_UML_PORT_LABEL_ID; //$NON-NLS-1$
+
+ /** Constructor */
+ public ConstraintParameterAsBorderItemPreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_" + UMLGraphicalTypes.SHAPE_UML_PROPERTY_AS_AFFIXED_ID); //$NON-NLS-1$
+ }
+
+ /** Default preferences initializer */
+ public static void initDefaults(IPreferenceStore store) {
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.WIDTH), 20);
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.HEIGHT), 20);
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.ELEMENTICON), 0);
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/preferences/CustomBlockPropertyCompositePreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/preferences/CustomBlockPropertyCompositePreferencePage.java
new file mode 100755
index 0000000..2ffc26d
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/preferences/CustomBlockPropertyCompositePreferencePage.java
@@ -0,0 +1,105 @@
+/*****************************************************************************
+ * 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:
+ * R�gis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.preferences;
+
+import java.util.Collections;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.parametric.provider.ElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+
+/**
+ * Preference page for Part and References.
+ */
+public class CustomBlockPropertyCompositePreferencePage extends ParametricDiagramNodePreferencePage {
+
+ /** Constant key to access preferences */
+ public static String prefKey = ElementTypes.DIAGRAM_ID + "_" + SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID; //$NON-NLS-1$
+
+ public static String prefLabelKey = prefKey + "-" + UMLGraphicalTypes.LABEL_UML_PROPERTY_LABEL_ID; //$NON-NLS-1$
+
+ /** The compartments default visibility for preferences */
+ public static final Map<String, Boolean> compartmentDefaultVisibilityMap;
+
+ /** The compartment titles default visibility for preferences */
+ public static final Map<String, Boolean> compartmentTitleDefaultVisibilityMap;
+
+ /** Static attribute initialization */
+ static {
+ compartmentDefaultVisibilityMap = new LinkedHashMap<String, Boolean>();
+ compartmentDefaultVisibilityMap.put("structure", Boolean.TRUE); //$NON-NLS-1$
+
+ compartmentTitleDefaultVisibilityMap = new LinkedHashMap<String, Boolean>();
+ compartmentTitleDefaultVisibilityMap.put("structure", Boolean.TRUE); //$NON-NLS-1$
+
+ // Start of user code custom static initializations
+ compartmentTitleDefaultVisibilityMap.remove("structure"); //$NON-NLS-1$
+ compartmentTitleDefaultVisibilityMap.put("structure", Boolean.FALSE); //$NON-NLS-1$
+ // End of user code
+
+ Collections.unmodifiableMap(compartmentDefaultVisibilityMap);
+ Collections.unmodifiableMap(compartmentTitleDefaultVisibilityMap);
+ }
+
+ /** Constructor */
+ public CustomBlockPropertyCompositePreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_" + SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID); //$NON-NLS-1$
+ }
+
+ /** Default preferences initializer */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.WIDTH), 200);
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.HEIGHT), 100);
+ // End of user code
+
+ // Initialize default visibility for compartments in preference page.
+ for (String compartmentName : compartmentDefaultVisibilityMap.keySet()) {
+ String showCompartmentKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_VISIBILITY);
+ store.setDefault(showCompartmentKey, compartmentDefaultVisibilityMap.get(compartmentName));
+ }
+
+ // Initialize default title visibility for compartments in preference page.
+ for (String compartmentName : compartmentTitleDefaultVisibilityMap.keySet()) {
+ String showCompartmentTitleKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_NAME_VISIBILITY);
+ store.setDefault(showCompartmentTitleKey, compartmentTitleDefaultVisibilityMap.get(compartmentName));
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void initializeCompartmentNamesList() {
+ for (String name : compartmentDefaultVisibilityMap.keySet()) {
+ this.compartmentNamesList.add(name);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void initializeCompartmentTitlesList() {
+ for (String name : compartmentTitleDefaultVisibilityMap.keySet()) {
+ this.compartmentTitlesList.add(name);
+ }
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/preferences/CustomConstraintPropertyCompositePreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/preferences/CustomConstraintPropertyCompositePreferencePage.java
new file mode 100755
index 0000000..7634ef6
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/preferences/CustomConstraintPropertyCompositePreferencePage.java
@@ -0,0 +1,103 @@
+/*****************************************************************************
+ * 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:
+ * R�gis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.preferences;
+
+import java.util.Collections;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.parametric.provider.ElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+
+/**
+ * Preference page for Part and References.
+ */
+public class CustomConstraintPropertyCompositePreferencePage extends ParametricDiagramNodePreferencePage {
+
+ /** Constant key to access preferences */
+ public static String prefKey = ElementTypes.DIAGRAM_ID + "_" + SysMLGraphicalTypes.SHAPE_SYSML_CONSTRAINTBLOCKPROPERTY_AS_COMPOSITE_ID; //$NON-NLS-1$
+
+ public static String prefLabelKey = prefKey + "-" + UMLGraphicalTypes.LABEL_UML_PROPERTY_LABEL_ID; //$NON-NLS-1$
+
+ /** The compartments default visibility for preferences */
+ public static final Map<String, Boolean> compartmentDefaultVisibilityMap;
+
+ /** The compartment titles default visibility for preferences */
+ public static final Map<String, Boolean> compartmentTitleDefaultVisibilityMap;
+
+ /** Static attribute initialization */
+ static {
+ compartmentDefaultVisibilityMap = new LinkedHashMap<String, Boolean>();
+ compartmentDefaultVisibilityMap.put("structure", Boolean.TRUE); //$NON-NLS-1$
+
+ compartmentTitleDefaultVisibilityMap = new LinkedHashMap<String, Boolean>();
+ compartmentTitleDefaultVisibilityMap.put("structure", Boolean.TRUE); //$NON-NLS-1$
+
+ // Start of user code custom static initializations
+ compartmentTitleDefaultVisibilityMap.remove("structure"); //$NON-NLS-1$
+ compartmentTitleDefaultVisibilityMap.put("structure", Boolean.FALSE); //$NON-NLS-1$
+ // End of user code
+
+ Collections.unmodifiableMap(compartmentDefaultVisibilityMap);
+ Collections.unmodifiableMap(compartmentTitleDefaultVisibilityMap);
+ }
+
+ /** Constructor */
+ public CustomConstraintPropertyCompositePreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_" + SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID); //$NON-NLS-1$
+ }
+
+ /** Default preferences initializer */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ // End of user code
+
+ // Initialize default visibility for compartments in preference page.
+ for (String compartmentName : compartmentDefaultVisibilityMap.keySet()) {
+ String showCompartmentKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_VISIBILITY);
+ store.setDefault(showCompartmentKey, compartmentDefaultVisibilityMap.get(compartmentName));
+ }
+
+ // Initialize default title visibility for compartments in preference page.
+ for (String compartmentName : compartmentTitleDefaultVisibilityMap.keySet()) {
+ String showCompartmentTitleKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_NAME_VISIBILITY);
+ store.setDefault(showCompartmentTitleKey, compartmentTitleDefaultVisibilityMap.get(compartmentName));
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void initializeCompartmentNamesList() {
+ for (String name : compartmentDefaultVisibilityMap.keySet()) {
+ this.compartmentNamesList.add(name);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void initializeCompartmentTitlesList() {
+ for (String name : compartmentTitleDefaultVisibilityMap.keySet()) {
+ this.compartmentTitlesList.add(name);
+ }
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/preferences/CustomPreferenceInitializer.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/preferences/CustomPreferenceInitializer.java
new file mode 100755
index 0000000..7987ab7
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/preferences/CustomPreferenceInitializer.java
@@ -0,0 +1,75 @@
+/*****************************************************************************
+ * 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:
+ * R�gis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.sysml.diagram.parametric.Activator;
+import org.eclipse.papyrus.sysml.diagram.parametric.provider.ElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+
+/**
+ * Custom preferences initializer.
+ */
+public class CustomPreferenceInitializer extends ParametricDiagramPreferenceInitializer {
+
+ @Override
+ protected IPreferenceStore getPreferenceStore() {
+ return Activator.getInstance().getPreferenceStore();
+ }
+
+ @Override
+ public void initializeDefaultPreferences() {
+ super.initializeDefaultPreferences();
+
+ IPreferenceStore store = getPreferenceStore();
+
+ ConstraintParameterAsBorderItemPreferencePage.initDefaults(store);
+ BlockPropertyCompositePreferencePage.initDefaults(store);
+ CustomConstraintPropertyCompositePreferencePage.initDefaults(store);
+
+ // Initialize default positions for labels.
+ initDefaultPosition(UMLGraphicalTypes.LINK_UML_DEPENDENCY_ID, UMLGraphicalTypes.LINKLABEL_UML_NAMEDELEMENT_NAME_ID, 0, -10);
+ initDefaultPosition(UMLGraphicalTypes.LINK_UML_DEPENDENCY_ID, UMLGraphicalTypes.LINKLABEL_UML_APPLIEDSTEREOTYPE_ID, 0, -30);
+
+ initDefaultPosition(UMLGraphicalTypes.LINK_UML_CONNECTOR_ID, UMLGraphicalTypes.LINKLABEL_UML_CONNECTOR_LABEL_ID, 0, -10);
+ initDefaultPosition(UMLGraphicalTypes.LINK_UML_CONNECTOR_ID, UMLGraphicalTypes.LINKLABEL_UML_APPLIEDSTEREOTYPE_ID, 0, -30);
+ initDefaultPosition(UMLGraphicalTypes.LINK_UML_CONNECTOR_ID, UMLGraphicalTypes.LINKLABEL_UML_CONNECTOR_SOURCE_MULTIPLICITY_ID, 0, 10);
+ initDefaultPosition(UMLGraphicalTypes.LINK_UML_CONNECTOR_ID, UMLGraphicalTypes.LINKLABEL_UML_CONNECTOR_TARGET_MULTIPLICITY_ID, 0, 10);
+
+ initDefaultPosition(UMLGraphicalTypes.SHAPE_UML_PROPERTY_AS_AFFIXED_ID, UMLGraphicalTypes.AFFIXEDLABEL_UML_PORT_LABEL_ID, -40, -15);
+ initDefaultPosition(UMLGraphicalTypes.SHAPE_UML_PROPERTY_AS_AFFIXED_ID, UMLGraphicalTypes.AFFIXEDLABEL_UML_APPLIEDSTEREOTYPE_ID, 30, -20);
+
+ }
+
+ /**
+ * Initialize default position of a link label in preferences.
+ *
+ * @param parentGraphicalType
+ * the graphical type of the view owning the label
+ * @param graphicalType
+ * the graphical type of the label
+ * @param x
+ * @param y
+ */
+ protected void initDefaultPosition(String parentGraphicalType, String graphicalType, int x, int y) {
+ IPreferenceStore store = getPreferenceStore();
+
+ String xKey = PreferencesConstantsHelper.getElementConstant(ElementTypes.DIAGRAM_ID + "_" + parentGraphicalType + "-" + graphicalType, PreferencesConstantsHelper.LOCATION_X);
+ String yKey = PreferencesConstantsHelper.getElementConstant(ElementTypes.DIAGRAM_ID + "_" + parentGraphicalType + "-" + graphicalType, PreferencesConstantsHelper.LOCATION_Y);
+
+ store.setDefault(xKey, x);
+ store.setDefault(yKey, y);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/provider/CustomEditPolicyProvider.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/provider/CustomEditPolicyProvider.java
new file mode 100755
index 0000000..62f6b2a
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/provider/CustomEditPolicyProvider.java
@@ -0,0 +1,187 @@
+/*****************************************************************************
+ * 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:
+ * R�gis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.provider;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gmf.runtime.common.core.service.IOperation;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ResizableCompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.services.editpolicy.CreateEditPoliciesOperation;
+import org.eclipse.papyrus.gmf.diagram.common.edit.policy.DefaultXYLayoutEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.BlockPropertyCompositeEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.BlockPropertyStructureCompartmentEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.StructureCompartmentEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.edit.policy.CustomDuplicatePasteEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.internalblock.edit.policy.CustomBlockCompositeSemanticEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.internalblock.edit.policy.CustomDefaultSemanticEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.internalblock.edit.policy.CustomDiagramDropEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.internalblock.edit.policy.CustomDragDropEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.internalblock.edit.policy.TypedElementDropEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.parametric.edit.part.CustomBlockCompositeEditPartTN;
+import org.eclipse.papyrus.sysml.diagram.parametric.edit.part.CustomConstraintBlockPropertyCompositeEditPart;
+import org.eclipse.papyrus.sysml.diagram.parametric.edit.part.ParametricDiagramEditPart;
+import org.eclipse.papyrus.sysml.diagram.parametric.policies.CustomBlockCompositeDropEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.parametric.policies.CustomBlockPropertyCompositeDropEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.parametric.policies.CustomBlockPropertyStructureCompartmentEditPartDropEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.parametric.policies.CustomBlockPropertyStructureCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.parametric.policies.CustomParametricSemanticPolicy;
+import org.eclipse.papyrus.sysml.diagram.parametric.policies.CustomStructureClassifierDropEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.parametric.policies.CustomStructureCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.AbstractElementBorderEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.AbstractElementEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.AbstractElementLinkEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.ConnectorEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.ConstraintParameterAffixedNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.part.DependencyEditPart;
+import org.eclipse.papyrus.uml.diagram.common.edit.policy.StructuredClassifierCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentEditPart;
+import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintEditPart;
+import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintEditPartCN;
+import org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintSpecificationEditPartCN;
+
+/**
+ * Custom edit policy provider.
+ */
+public class CustomEditPolicyProvider extends ParametricDiagramEditPolicyProvider {
+
+ @Override
+ public boolean provides(IOperation operation) {
+
+ CreateEditPoliciesOperation epOperation = (CreateEditPoliciesOperation) operation;
+ if (!(epOperation.getEditPart() instanceof IGraphicalEditPart)) {
+ return false;
+ }
+
+ // Make sure this concern Parametric Diagram only
+ IGraphicalEditPart gep = (IGraphicalEditPart) epOperation.getEditPart();
+ String diagramType = gep.getNotationView().getDiagram().getType();
+ if (!ElementTypes.DIAGRAM_ID.equals(diagramType)) {
+ return false;
+ }
+
+ // provides for the main diagram edit part
+ if (gep instanceof ParametricDiagramEditPart) {
+ return true;
+ }
+
+ // Provides for edit parts that represent nodes in Internal Block diagram
+ if (gep instanceof AbstractElementEditPart) {
+ return true;
+ }
+ if (gep instanceof AbstractElementBorderEditPart) {
+ return true;
+ }
+
+ // Provides for edit parts that represent edges in Internal Block diagram
+ if (gep instanceof AbstractElementLinkEditPart) {
+ return true;
+ }
+
+ if (gep instanceof ResizableCompartmentEditPart) {
+ return true;
+ }
+
+ if (gep instanceof ConstraintSpecificationEditPartCN) {
+ return true;
+ }
+
+ if (gep instanceof ConstraintEditPartCN) {
+ return true;
+ }
+
+ return super.provides(operation);
+ }
+
+ @Override
+ public void createEditPolicies(EditPart editPart) {
+ super.createEditPolicies(editPart);
+ if(editPart instanceof ParametricDiagramEditPart) {
+ editPart.installEditPolicy(PasteEditPolicy.PASTE_ROLE, new CustomDuplicatePasteEditPolicy());
+ editPart.installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDropEditPolicy());
+ // no installation of other policies.
+ return;
+ }
+
+ editPart.installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDragDropEditPolicy());
+
+ if ((editPart instanceof ConstraintEditPart) || (editPart instanceof ConstraintEditPartCN)) {
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomParametricSemanticPolicy());
+ editPart.installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
+ editPart.installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
+ }
+
+ if ((editPart instanceof CommentEditPart) || (editPart instanceof CommentEditPartCN)) {
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomDefaultSemanticEditPolicy());
+ editPart.installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
+ editPart.installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
+ }
+
+ if (editPart instanceof BlockPropertyCompositeEditPart) {
+ editPart.installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomBlockPropertyCompositeDropEditPolicy());
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomParametricSemanticPolicy());
+ }
+
+ if (editPart instanceof BlockPropertyStructureCompartmentEditPart) {
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomBlockPropertyStructureCompartmentSemanticEditPolicy());
+ editPart.installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomBlockPropertyStructureCompartmentEditPartDropEditPolicy());
+ editPart.installEditPolicy(EditPolicy.LAYOUT_ROLE, new DefaultXYLayoutEditPolicy());
+ }
+
+ if (editPart instanceof CustomBlockCompositeEditPartTN) {
+ editPart.installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomBlockCompositeDropEditPolicy());
+ editPart.installEditPolicy(EditPolicyRoles.CREATION_ROLE, new StructuredClassifierCreationEditPolicy());
+
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomBlockCompositeSemanticEditPolicy());
+ }
+
+ if (editPart instanceof StructureCompartmentEditPart) {
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomStructureCompartmentSemanticEditPolicy());
+ editPart.installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomStructureClassifierDropEditPolicy());
+ editPart.installEditPolicy(EditPolicy.LAYOUT_ROLE, new DefaultXYLayoutEditPolicy());
+ }
+
+ if (editPart instanceof DependencyEditPart) {
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomDefaultSemanticEditPolicy());
+ }
+
+ if (editPart instanceof ConnectorEditPart) {
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomDefaultSemanticEditPolicy());
+ }
+
+ if (editPart instanceof CustomConstraintBlockPropertyCompositeEditPart) {
+ editPart.installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomBlockPropertyCompositeDropEditPolicy());
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomParametricSemanticPolicy());
+ }
+ if (editPart instanceof ConstraintParameterAffixedNodeEditPart) {
+ editPart.installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new TypedElementDropEditPolicy());
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomParametricSemanticPolicy());
+ }
+ if (editPart instanceof CustomBlockCompositeEditPartTN) {
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomParametricSemanticPolicy());
+ }
+ if (editPart instanceof ConstraintSpecificationEditPartCN) {
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomParametricSemanticPolicy());
+ }
+ if (editPart instanceof ConstraintEditPartCN) {
+ editPart.installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomParametricSemanticPolicy());
+ }
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/provider/ParametricVisualTypeProvider.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/provider/ParametricVisualTypeProvider.java
new file mode 100755
index 0000000..4a48162
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/provider/ParametricVisualTypeProvider.java
@@ -0,0 +1,28 @@
+/*****************************************************************************
+ * Copyright (c) 2015 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.diagram.parametric.provider;
+
+import org.eclipse.papyrus.gmf.diagram.common.provider.SysMLVisualTypeProvider;
+import org.eclipse.papyrus.uml.diagram.composite.providers.UMLVisualTypeProvider;
+
+/**
+ * Visual type provider for the SysML Parametric Diagram.
+ */
+public class ParametricVisualTypeProvider extends SysMLVisualTypeProvider {
+
+ public ParametricVisualTypeProvider() {
+ super(new CustomGraphicalTypeRegistry(), new UMLVisualTypeProvider());
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/provider/ParserProvider.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/provider/ParserProvider.java
new file mode 100755
index 0000000..da517cf
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/provider/ParserProvider.java
@@ -0,0 +1,107 @@
+/*****************************************************************************
+ * 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:
+ * Régis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.provider;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.gmf.runtime.common.core.service.AbstractProvider;
+import org.eclipse.gmf.runtime.common.core.service.IOperation;
+import org.eclipse.gmf.runtime.common.ui.services.parser.GetParserOperation;
+import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
+import org.eclipse.gmf.runtime.common.ui.services.parser.IParserProvider;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.parser.FlowPortLabelParser;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.parametric.parser.ParametricFrameParser;
+import org.eclipse.papyrus.uml.diagram.common.parser.ConnectorLabelParser;
+import org.eclipse.papyrus.uml.diagram.common.parser.ConstraintLabelParser;
+import org.eclipse.papyrus.uml.diagram.common.parser.MultiplicityElementLabelParser;
+import org.eclipse.papyrus.uml.diagram.common.parser.NamedElementLabelParser;
+import org.eclipse.papyrus.uml.diagram.common.parser.PropertyLabelParser;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+
+/**
+ * Parser provider for labels used by this diagram.
+ */
+public class ParserProvider extends AbstractProvider implements IParserProvider {
+
+ /** map from graphical hint to parsers */
+ private static final Map<String, IParser> graphicalHintToParser = new HashMap<String, IParser>();
+
+ static {
+ graphicalHintToParser.put(SysMLGraphicalTypes.LABEL_SYSML_BLOCK_NAME_ID, new ParametricFrameParser());
+ graphicalHintToParser.put(UMLGraphicalTypes.LABEL_UML_PROPERTY_LABEL_ID, new PropertyLabelParser());
+ graphicalHintToParser.put(UMLGraphicalTypes.SHAPE_UML_CONSTRAINT_AS_LABEL_ID, new ConstraintLabelParser());
+
+ graphicalHintToParser.put(UMLGraphicalTypes.AFFIXEDLABEL_UML_PORT_LABEL_ID, new PropertyLabelParser());
+ graphicalHintToParser.put(SysMLGraphicalTypes.AFFIXEDLABEL_SYSML_FLOWPORT_LABEL_ID, new FlowPortLabelParser());
+
+ graphicalHintToParser.put(UMLGraphicalTypes.LINKLABEL_UML_NAMEDELEMENT_NAME_ID, new NamedElementLabelParser());
+ graphicalHintToParser.put(UMLGraphicalTypes.LINKLABEL_UML_CONNECTOR_LABEL_ID, new ConnectorLabelParser());
+ graphicalHintToParser.put(UMLGraphicalTypes.LINKLABEL_UML_CONNECTOR_SOURCE_MULTIPLICITY_ID, new MultiplicityElementLabelParser());
+ graphicalHintToParser.put(UMLGraphicalTypes.LINKLABEL_UML_CONNECTOR_TARGET_MULTIPLICITY_ID, new MultiplicityElementLabelParser());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean provides(IOperation operation) {
+ if (operation instanceof GetParserOperation) {
+ IAdaptable hint = ((GetParserOperation) operation).getHint();
+
+ if (!ElementTypes.DIAGRAM_ID.equals(getDiagramType(hint))) {
+ return false;
+ }
+
+ return getParser(hint) != null;
+ }
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public IParser getParser(IAdaptable hint) {
+ String parserHint = (String) hint.getAdapter(String.class);
+ if (parserHint != null) {
+ IParser parser = graphicalHintToParser.get(parserHint);
+ if (parser != null) {
+ return parser;
+ }
+ }
+
+ View view = (View) hint.getAdapter(View.class);
+ if (view != null) {
+ IParser parser = graphicalHintToParser.get(view.getType());
+ if (parser != null) {
+ return parser;
+ }
+ }
+
+ return null;
+ }
+
+ private String getDiagramType(IAdaptable hint) {
+ Diagram diagram = (Diagram) hint.getAdapter(Diagram.class);
+ if (diagram != null) {
+ return diagram.getType();
+ }
+
+ return "undefined";
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/utils/BlockDropHelper.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/utils/BlockDropHelper.java
new file mode 100755
index 0000000..6f7d5d5
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/utils/BlockDropHelper.java
@@ -0,0 +1,301 @@
+/*****************************************************************************
+ * 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:
+ * Régis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.utils;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.CompoundCommand;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.core.edithelpers.CreateElementRequestAdapter;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest.ViewDescriptor;
+import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.ISpecializationType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.ViewDescriptorUtil;
+import org.eclipse.papyrus.infra.services.edit.commands.ConfigureFeatureCommandFactory;
+import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.helper.ElementHelper;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.uml2.uml.Actor;
+import org.eclipse.uml2.uml.Association;
+import org.eclipse.uml2.uml.DataType;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Type;
+import org.eclipse.uml2.uml.TypedElement;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * This class provides convenience methods to create Block specific drop action (Part, Reference or ConstraintProperty creation).
+ */
+public class BlockDropHelper extends ElementHelper {
+
+ public BlockDropHelper(TransactionalEditingDomain editDomain) {
+ this.editDomain = editDomain;
+ }
+
+ public Command getDropAsStructureItemOnPart(DropObjectsRequest request, GraphicalEditPart host, IElementType elementType) {
+ Object droppedEObject = request.getObjects().get(0);
+ String label = "";
+ if (elementType == SysMLElementTypes.PART_PROPERTY) {
+ label = "Create a new Part";
+ // Exclude ConstraintProperty
+ if (droppedEObject instanceof Type) {
+ if (((ISpecializationType) SysMLElementTypes.CONSTRAINT_BLOCK).getMatcher().matches((Type) droppedEObject)) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ }
+ // Exclude reference drop in diagram owned by a ConstraintBlock
+ Element editPartOwner = (Element) host.resolveSemanticElement();
+ if (editPartOwner instanceof Property) {
+ editPartOwner = ((Property) editPartOwner).getType();
+ }
+ if (editPartOwner != null && ((ISpecializationType) SysMLElementTypes.CONSTRAINT_BLOCK).getMatcher().matches(editPartOwner)) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ }
+ if (elementType == SysMLElementTypes.REFERENCE_PROPERTY) {
+ label = "Create a new Reference";
+ // Exclude ConstraintProperty
+ if (droppedEObject instanceof Type) {
+ if (((ISpecializationType) SysMLElementTypes.CONSTRAINT_BLOCK).getMatcher().matches((Type) droppedEObject)) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ }
+ // Exclude reference drop in diagram owned by a ConstraintBlock
+ Element editPartOwner = (Element) host.resolveSemanticElement();
+ if (editPartOwner instanceof Property) {
+ editPartOwner = ((Property) editPartOwner).getType();
+ }
+ if (editPartOwner != null && ((ISpecializationType) SysMLElementTypes.CONSTRAINT_BLOCK).getMatcher().matches(editPartOwner)) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ }
+ if (elementType == SysMLElementTypes.ACTOR_PART_PROPERTY) {
+ label = "Create a new ActorPart";
+ }
+ if (elementType == SysMLElementTypes.VALUE_PROPERTY) {
+ label = "Create a new Value";
+ }
+ if (elementType == UMLElementTypes.PROPERTY) {
+ label = "Create a new Property";
+ }
+ // New kind of element
+ if (elementType == SysMLElementTypes.CONSTRAINT_PROPERTY) {
+ label = "Create a new ConstraintProperty";
+ // Constraint Property on ConstraintBlock strictly
+ if (droppedEObject instanceof Type) {
+ if (!((ISpecializationType) SysMLElementTypes.CONSTRAINT_BLOCK).getMatcher().matches((Type) droppedEObject)) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ }
+ }
+
+ CompoundCommand cc = new CompoundCommand(label);
+
+ if (!isValidStructureItemType(droppedEObject, elementType)) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ // Verify target nature
+ EObject target = getHostEObject(host);
+ if ((!(target instanceof TypedElement)) || (((TypedElement) target).getType() == null)) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ // The target type has to be a Block (will hold the created Port)
+ Type targetType = ((TypedElement) target).getType();
+ if (!((ISpecializationType) SysMLElementTypes.BLOCK).getMatcher().matches(targetType)) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ // Prepare a command for the element creation and the drop in diagram
+
+ // 1. Prepare creation command
+ ICommand createElementCommand = null;
+ CreateElementRequest createElementRequest = new CreateElementRequest(getEditingDomain(), targetType, elementType);
+ createElementRequest.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new ConfigureFeatureCommandFactory(UMLPackage.eINSTANCE.getTypedElement_Type(), request.getObjects().get(0)));
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(targetType);
+ if (provider != null) {
+ createElementCommand = provider.getEditCommand(createElementRequest);
+ }
+ IAdaptable createElementRequestAdapter = new CreateElementRequestAdapter(createElementRequest);
+
+ // 2. Prepare the drop command
+ ViewDescriptor descriptor = new ViewDescriptor(createElementRequestAdapter, Node.class, /* explicit semantic hint is mandatory */null, ViewDescriptorUtil.PERSISTED, host.getDiagramPreferencesHint());
+ CreateViewRequest createViewRequest = new CreateViewRequest(descriptor);
+ createViewRequest.setLocation(request.getLocation().getCopy());
+ Command viewCreateCommand = host.getCommand(createViewRequest);
+
+ // 3. Create the compound command
+ cc.add(new ICommandProxy(createElementCommand));
+ cc.add(viewCreateCommand);
+
+ return cc;
+ }
+
+ public Command getDropAsStructureItem(DropObjectsRequest request, GraphicalEditPart host, IElementType elementType) {
+ Object droppedEObject = request.getObjects().get(0);
+ String label = "";
+
+ // Filter part/reference : a property type by a ConstraintBlock MUST be a ConstraintProperty
+ if (elementType == SysMLElementTypes.PART_PROPERTY) {
+ label = "Create a new Part";
+ // Exclude ConstraintProperty
+ if (droppedEObject instanceof Type) {
+ if (((ISpecializationType) SysMLElementTypes.CONSTRAINT_BLOCK).getMatcher().matches((Type) droppedEObject)) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ }
+ // Exclude reference drop in diagram owned by a ConstraintBlock
+ Element diagramOwner = getDiagramOwner(host);
+ if (diagramOwner != null && ((ISpecializationType) SysMLElementTypes.CONSTRAINT_BLOCK).getMatcher().matches(diagramOwner)) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ }
+ if (elementType == SysMLElementTypes.REFERENCE_PROPERTY) {
+ label = "Create a new Reference";
+ // Exclude ConstraintProperty
+ if (droppedEObject instanceof Type) {
+ if (((ISpecializationType) SysMLElementTypes.CONSTRAINT_BLOCK).getMatcher().matches((Type) droppedEObject)) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ }
+ // Exclude reference drop in diagram owned by a ConstraintBlock
+ Element diagramOwner = getDiagramOwner(host);
+ if (diagramOwner != null && ((ISpecializationType) SysMLElementTypes.CONSTRAINT_BLOCK).getMatcher().matches(diagramOwner)) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ }
+ if (elementType == SysMLElementTypes.ACTOR_PART_PROPERTY) {
+ label = "Create a new ActorPart";
+ }
+ if (elementType == SysMLElementTypes.VALUE_PROPERTY) {
+ label = "Create a new Value";
+ }
+ if (elementType == UMLElementTypes.PROPERTY) {
+ label = "Create a new Property";
+ }
+
+ // New kind of element
+ if (elementType == SysMLElementTypes.CONSTRAINT_PROPERTY) {
+ label = "Create a new ConstraintProperty";
+ // Constraint Property on ConstraintBlock strictly
+ if (droppedEObject instanceof Type) {
+ if (!((ISpecializationType) SysMLElementTypes.CONSTRAINT_BLOCK).getMatcher().matches((Type) droppedEObject)) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ }
+ }
+ CompoundCommand cc = new CompoundCommand(label);
+
+ if (!isValidStructureItemType(droppedEObject, elementType)) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ // Prepare a command for the element creation and the drop in diagram
+
+ // 1. Prepare creation command
+ ICommand createElementCommand = null;
+ CreateElementRequest createElementRequest = new CreateElementRequest(getEditingDomain(), getHostEObject(host), elementType);
+ createElementRequest.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new ConfigureFeatureCommandFactory(UMLPackage.eINSTANCE.getTypedElement_Type(), request.getObjects().get(0)));
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(getHostEObject(host));
+ if (provider != null) {
+ createElementCommand = provider.getEditCommand(createElementRequest);
+ }
+ IAdaptable createElementRequestAdapter = new CreateElementRequestAdapter(createElementRequest);
+
+ // 2. Prepare the drop command
+ ViewDescriptor descriptor = new ViewDescriptor(createElementRequestAdapter, Node.class, /* explicit semantic hint is mandatory */null, ViewDescriptorUtil.PERSISTED, host.getDiagramPreferencesHint());
+ CreateViewRequest createViewRequest = new CreateViewRequest(descriptor);
+ createViewRequest.setLocation(request.getLocation().getCopy());
+ Command viewCreateCommand = host.getCommand(createViewRequest);
+
+ // 3. Create the compound command
+ cc.add(new ICommandProxy(createElementCommand));
+ cc.add(viewCreateCommand);
+
+ return cc;
+ }
+
+ private Element getDiagramOwner(GraphicalEditPart host) {
+ Object model = host.getRoot().getContents().getModel();
+ if (model instanceof View) {
+ return (Element) ((View) model).getElement();
+ }
+ return null;
+ }
+
+ private boolean isValidStructureItemType(Object object, IElementType elementType) {
+ boolean isValid = false;
+
+ if ((object != null) && (object instanceof Type) && !(object instanceof Association)) {
+
+ Type type = (Type) object;
+ if ((elementType == SysMLElementTypes.PART_PROPERTY) || (elementType == SysMLElementTypes.REFERENCE_PROPERTY)) {
+ if (((ISpecializationType) SysMLElementTypes.BLOCK).getMatcher().matches(type)) {
+ isValid = true;
+ }
+ }
+ if (elementType == SysMLElementTypes.ACTOR_PART_PROPERTY) {
+ if (type instanceof Actor) {
+ isValid = true;
+ }
+ }
+ if (elementType == SysMLElementTypes.VALUE_PROPERTY) {
+ if (((ISpecializationType) SysMLElementTypes.VALUE_TYPE).getMatcher().matches(type) || (type instanceof DataType)) {
+ isValid = true;
+ }
+ }
+ if ((elementType == SysMLElementTypes.CONSTRAINT_PROPERTY)) {
+ if (((ISpecializationType) SysMLElementTypes.BLOCK).getMatcher().matches(type)) {
+ isValid = true;
+ }
+ }
+ if (elementType == UMLElementTypes.PROPERTY) {
+ if (!((ISpecializationType) SysMLElementTypes.BLOCK).getMatcher().matches(type)
+ && !(type instanceof Actor)
+ && !(type instanceof DataType)
+ && !((ISpecializationType) SysMLElementTypes.VALUE_TYPE).getMatcher().matches(type)) {
+ isValid = true;
+ }
+ }
+ }
+
+ return isValid;
+ }
+
+ /**
+ * return the host Edit Part's semantic element, if the semantic element
+ * is <code>null</code> or unresolvable it will return <code>null</code>
+ *
+ * @return EObject
+ */
+ protected EObject getHostEObject(GraphicalEditPart host) {
+ return ViewUtil.resolveSemanticElement((View) host.getModel());
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/utils/ConstraintParameterDropHelper.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/utils/ConstraintParameterDropHelper.java
new file mode 100755
index 0000000..957993c
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/utils/ConstraintParameterDropHelper.java
@@ -0,0 +1,94 @@
+/*****************************************************************************
+ * 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:
+ * Régis CHEVREL: chevrel.regis <at> gmail.com
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.utils;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest.ViewDescriptor;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.ViewDescriptorUtil;
+import org.eclipse.papyrus.sysml.constraints.ConstraintBlock;
+import org.eclipse.papyrus.sysml.constraints.ConstraintProperty;
+import org.eclipse.papyrus.uml.diagram.common.commands.SemanticAdapter;
+import org.eclipse.papyrus.uml.diagram.common.helper.ElementHelper;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.Port;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Type;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+/**
+ * This class provides convenience methods to create Type specific drop action (Show Port on BlockPropertyComposite).
+ */
+public class ConstraintParameterDropHelper extends ElementHelper {
+
+ public ConstraintParameterDropHelper(TransactionalEditingDomain editDomain) {
+ this.editDomain = editDomain;
+ }
+
+ public Command getDropConstraintParameter(Property droppedConstraintParameter, Point location, GraphicalEditPart host) {
+ return getDropConstraintParameterOnPart(droppedConstraintParameter, location, host);
+ }
+
+ public Command getDropConstraintParameterOnPart(Property droppedConstraintParameter, Point location, GraphicalEditPart host) {
+
+ if (!isValidConstraintParameter(droppedConstraintParameter, getHostEObject(host))) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ // Prepare the view creation command
+ ViewDescriptor descriptor = new ViewDescriptor(new SemanticAdapter(droppedConstraintParameter, null), Node.class, /* explicit semantic hint is mandatory */null, ViewDescriptorUtil.PERSISTED, host.getDiagramPreferencesHint());
+ CreateViewRequest createViewRequest = new CreateViewRequest(descriptor);
+ createViewRequest.setLocation(location);
+ Command viewCreateCommand = host.getCommand(createViewRequest);
+
+ return viewCreateCommand;
+ }
+
+ private boolean isValidConstraintParameter(Object object, EObject dropTarget) {
+ // check if not a Port/FlowPort ...
+ if (object instanceof Port) {
+ return false;
+ }
+ // drop on a Block/ConstraintBlock
+ if (dropTarget instanceof Class && UMLUtil.getStereotypeApplication((Class) dropTarget, ConstraintBlock.class) != null) {
+ return ((Class) dropTarget).getOwnedAttributes().contains(object);
+ }
+ // drop on a part
+ if (dropTarget instanceof Property && UMLUtil.getStereotypeApplication((Property) dropTarget, ConstraintProperty.class) != null) {
+ Type type = ((Property) dropTarget).getType();
+ if (type instanceof Class && UMLUtil.getStereotypeApplication(type, ConstraintBlock.class) != null) {
+ return ((Class) type).getOwnedAttributes().contains(object);
+ }
+ }
+ return false;
+ }
+
+ /**
+ * return the host Edit Part's semantic element, if the semantic element
+ * is <code>null</code> or unresolvable it will return <code>null</code>
+ *
+ * @return EObject
+ */
+ protected EObject getHostEObject(GraphicalEditPart host) {
+ return ViewUtil.resolveSemanticElement((View) host.getModel());
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/.classpath b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/.classpath
new file mode 100755
index 0000000..6a42377
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/.classpath
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="src-gen"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/.project b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/.project
new file mode 100755
index 0000000..9699eb6
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/.project
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.sysml.diagram.requirement</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>
+ <buildCommand>
+ <name>org.eclipse.oomph.version.VersionBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>check.maven.pom</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>ignore.lower.bound.dependency.ranges</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>release.path</key>
+ <value>/org.eclipse.papyrus.releng.main.release/release.xml</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.oomph.version.VersionNature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/.settings/org.eclipse.jdt.core.prefs b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 0000000..f08be2b
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,291 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/.settings/org.eclipse.jdt.ui.prefs b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/.settings/org.eclipse.jdt.ui.prefs
new file mode 100755
index 0000000..954281d
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,68 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+formatter_profile=_Papyrus
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/.settings/org.eclipse.pde.api.tools.prefs b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100755
index 0000000..23fb95e
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/.settings/org.eclipse.pde.api.tools.prefs
@@ -0,0 +1,98 @@
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+API_USE_SCAN_FIELD_SEVERITY=Error
+API_USE_SCAN_METHOD_SEVERITY=Error
+API_USE_SCAN_TYPE_SEVERITY=Error
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Ignore
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_ANNOTATION=Ignore
+INVALID_JAVADOC_TAG=Ignore
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Ignore
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+MISSING_EE_DESCRIPTIONS=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=Enabled
+eclipse.preferences.version=1
+incompatible_api_component_version=Error
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Warning
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/META-INF/MANIFEST.MF b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/META-INF/MANIFEST.MF
new file mode 100755
index 0000000..7998361
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/META-INF/MANIFEST.MF
@@ -0,0 +1,28 @@
+Manifest-Version: 1.0
+Export-Package: org.eclipse.papyrus.sysml.diagram.requirement,
+ org.eclipse.papyrus.sysml.diagram.requirement.edit.part,
+ org.eclipse.papyrus.sysml.diagram.requirement.edit.policy,
+ org.eclipse.papyrus.sysml.diagram.requirement.factory,
+ org.eclipse.papyrus.sysml.diagram.requirement.figure,
+ org.eclipse.papyrus.sysml.diagram.requirement.part,
+ org.eclipse.papyrus.sysml.diagram.requirement.preferences,
+ org.eclipse.papyrus.sysml.diagram.requirement.provider,
+ org.eclipse.papyrus.sysml.diagram.requirement.utils
+Require-Bundle: org.eclipse.papyrus.uml.diagram.common;bundle-version="[3.0.0,4.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.uml.diagram.clazz;bundle-version="[3.0.0,4.0.0)";visibility:=reexport,
+ org.eclipse.gmf.runtime.diagram.ui.providers;bundle-version="[1.7.0,2.0.0)",
+ org.eclipse.papyrus.infra.gmfdiag.navigation;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.sysml.diagram.common;bundle-version="[2.0.0,3.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.uml.appearance;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.infra.internationalization.utils;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.papyrus.uml.internationalization.utils;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.papyrus.sysml.service.types;bundle-version="2.0.0"
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 3.0.0.qualifier
+Bundle-Localization: plugin
+Bundle-Name: %pluginName
+Bundle-Activator: org.eclipse.papyrus.sysml.diagram.requirement.Activator
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.papyrus.sysml.diagram.requirement;singleton:=true
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/META-INF/MANIFEST.gen.MF b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/META-INF/MANIFEST.gen.MF
new file mode 100755
index 0000000..adeb4e8
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/META-INF/MANIFEST.gen.MF
@@ -0,0 +1,18 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-Localization: plugin
+Bundle-SymbolicName: org.eclipse.papyrus.sysml.diagram.requirement;singleton:=true
+Bundle-Version: 0.9.0.qualifier
+Bundle-Activator: org.eclipse.papyrus.sysml.diagram.requirement.Activator
+Bundle-Vendor: %providerName
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.papyrus.uml.diagram.common,
+ org.eclipse.papyrus.infra.gmfdiag.common,
+ org.eclipse.gmf.runtime.diagram.ui.providers,
+ org.eclipse.gmf.runtime.diagram.ui.resources.editor,
+ org.eclipse.papyrus.uml.diagram.clazz,
+ org.eclipse.papyrus.preferences
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-ActivationPolicy: lazy
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/about.html b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/about.html
new file mode 100755
index 0000000..d35d5ae
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/build.gen.properties b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/build.gen.properties
new file mode 100755
index 0000000..ca6d14e
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/build.gen.properties
@@ -0,0 +1,10 @@
+source.. = src/,\
+ src-gen/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ palettes/,\
+ icons/,\
+ about.html,\
+ plugin.properties
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/build.properties b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/build.properties
new file mode 100755
index 0000000..9f1af61
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/build.properties
@@ -0,0 +1,17 @@
+#
+#Mon Sep 12 09:30:15 CEST 2011
+bin.includes = .,\
+ plugin.xml,\
+ plugin.properties,\
+ about.html,\
+ META-INF/,\
+ icons/,\
+ messages.properties,\
+ palettes/,\
+ model/
+output..=bin/
+src.includes = about.html,\
+ model/
+source.. = src/,\
+ src-gen/
+bin..=bin/
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/icons/RequirementDiagramSysML.gif b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/icons/RequirementDiagramSysML.gif
new file mode 100755
index 0000000..7b8efd2
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/icons/RequirementDiagramSysML.gif
Binary files differ
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/icons/obj16/Diagram_Requirement.gif b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/icons/obj16/Diagram_Requirement.gif
new file mode 100755
index 0000000..f87c907
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/icons/obj16/Diagram_Requirement.gif
Binary files differ
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/messages.properties b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/messages.properties
new file mode 100755
index 0000000..315c143
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/messages.properties
@@ -0,0 +1,17 @@
+#################################################################################
+# Copyright (c) 2008 CEA LIST.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Hubert Dubois (CEA LIST) hubert.dubois@cea.fr - initial API and implementation
+##################################################################################
+# TODO: manually put keys and values
+
+Diagram_Name = ReqDiagram
+Problem_Opening = Problem Opening
+Cannot_Open_Input_Element = Cannot Open Input Element
+No_EditPart_Can_Be_Created = No EditPart Can Be created
+No_View_Can_Be_Created = No View Can Be Created
\ No newline at end of file
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/model/SysML.Requirement.idgen b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/model/SysML.Requirement.idgen
new file mode 100755
index 0000000..f12ab42
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/model/SysML.Requirement.idgen
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<idgen:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:gmfgen="http://www.eclipse.org/gmf/2009/GenModel" xmlns:idgen="http://www.eclipse.org/papyrus/0.7.0/idgen" name="Requirement" type="RequirementDiagram" icon="icons/obj16/Diagram_Requirement.gif" label="SysML Requirement Diagram" language="sysml" javaPackagePrefix="org.eclipse.papyrus.sysml.diagram.requirement" javaClassPrefix="RequirementDiagram" createCommandLabel="Create a new Requirement Diagram">
+ <diagramEditPart name="RequirementDiagramEditPart">
+ <behaviors javaClassQualifiedName="org.eclipse.papyrus.uml.diagram.common.editpolicies.DuplicatePasteEditPolicy" key="DuplicatePasteEditPolicy.PASTE_ROLE"/>
+ <behaviors javaClassQualifiedName="org.eclipse.papyrus.uml.diagram.clazz.edit.policies.ModelItemSemanticEditPolicy" key="EditPolicyRoles.SEMANTIC_ROLE"/>
+ <behaviors name="" javaClassQualifiedName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy" key=""RemoveOrphanView""/>
+ <behaviors javaClassQualifiedName="org.eclipse.papyrus.sysml.diagram.requirement.edit.policy.CustomDragDropEditPolicy" key="EditPolicyRoles.DRAG_DROP_ROLE"/>
+ </diagramEditPart>
+ <inheritedDiagrams name="ClassDiagram" viewProviderClassQualifiedName="" editPartProviderClassQualifiedName="" dndEditPolicyClassQualifiedName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy">
+ <genInheritedEditor href="../../org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen#PapyrusUMLClassDiagram"/>
+ <genNodes>
+ <genNode xsi:type="gmfgen:GenTopLevelNode" href="../../org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@topLevelNodes.9"/>
+ </genNodes>
+ <genNodes generatePreferencePage="false" generateTool="false">
+ <genNode xsi:type="gmfgen:GenChildNode" href="../../org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@childNodes.31"/>
+ </genNodes>
+ <genNodes generatePreferencePage="false" generateTool="false">
+ <genNode xsi:type="gmfgen:GenTopLevelNode" href="../../org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@topLevelNodes.11"/>
+ </genNodes>
+ <genNodes generatePreferencePage="false" generateTool="false">
+ <genNode xsi:type="gmfgen:GenChildNode" href="../../org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@childNodes.33"/>
+ </genNodes>
+ <genNodes name="">
+ <genNode xsi:type="gmfgen:GenTopLevelNode" href="../../org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@topLevelNodes.19"/>
+ </genNodes>
+ <genNodes name="" generatePreferencePage="false" generateTool="false">
+ <genNode xsi:type="gmfgen:GenChildSideAffixedNode" href="../../org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@childNodes.23"/>
+ </genNodes>
+ <genNodes>
+ <genNode xsi:type="gmfgen:GenTopLevelNode" href="../../org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@topLevelNodes.15"/>
+ </genNodes>
+ <genNodes generatePreferencePage="false" generateTool="false">
+ <genNode xsi:type="gmfgen:GenChildNode" href="../../org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@childNodes.36"/>
+ </genNodes>
+ <genNodes>
+ <genNode xsi:type="gmfgen:GenTopLevelNode" href="../../org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@topLevelNodes.14"/>
+ </genNodes>
+ <genNodes generatePreferencePage="false" generateTool="false">
+ <genNode xsi:type="gmfgen:GenChildNode" href="../../org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@childNodes.37"/>
+ </genNodes>
+ <genLinks>
+ <genLink href="../../org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@links.8"/>
+ </genLinks>
+ <genLinks name="">
+ <genLink href="../../org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@links.22"/>
+ </genLinks>
+ <genLinks generatePreferencePage="false" generateTool="false">
+ <genLink href="../../org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@links.21"/>
+ </genLinks>
+ <genLinks>
+ <genLink href="../../org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@links.10"/>
+ </genLinks>
+ <genLinks generatePreferencePage="false" generateTool="false">
+ <genLink href="../../org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@links.16"/>
+ </genLinks>
+ <genLinks generatePreferencePage="false" generateTool="false">
+ <genLink href="../../org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@links.17"/>
+ </genLinks>
+ <genLinks>
+ <genLink href="../../org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@links.7"/>
+ </genLinks>
+ <genLinks customPreferencePage="">
+ <genLink href="../../org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@links.13"/>
+ </genLinks>
+ </inheritedDiagrams>
+ <customJavaClasses customEditPolicyProvider="org.eclipse.papyrus.sysml.diagram.requirement.provider.CustomEditPolicyProvider"/>
+</idgen:Diagram>
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/palettes/Addition.palette.xml b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/palettes/Addition.palette.xml
new file mode 100755
index 0000000..c94942b
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/palettes/Addition.palette.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<paletteDefinition>
+ <content>
+ <drawer iconpath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif" id="requirement.drawer.Addition" name="Addition">
+ <aspectTool description="Create a refinement" id="requirement.tool.refine" name="Refine" refToolId="clazz.tool.abstraction">
+ <postAction id="org.eclipse.papyrus.applystereotypeactionprovider">
+ <stereotypesToApply>
+ <stereotype stereotypeName="StandardProfileL2::Refine"/>
+ </stereotypesToApply>
+ </postAction>
+ </aspectTool>
+ </drawer>
+ </content>
+</paletteDefinition>
\ No newline at end of file
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/palettes/PapyrusSYSMLRequirementDiagram.paletteconfiguration b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/palettes/PapyrusSYSMLRequirementDiagram.paletteconfiguration
new file mode 100755
index 0000000..2ae7d14
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/palettes/PapyrusSYSMLRequirementDiagram.paletteconfiguration
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<paletteconfiguration:PaletteConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:elementtypesconfigurations="http://www.eclipse.org/papyrus/infra/elementtypesconfigurations/1.2" xmlns:paletteconfiguration="http://www.eclipse.org/papyrus/diagram/paletteconfiguration/0.8" id="org.eclipse.papyrus.sysml.diagram.requirement.paletteconfiguration" label="org.eclipse.papyrus.sysml.diagram.requirement Palette">
+ <drawerConfigurations id="requirement.drawer.nodes" label="Nodes">
+ <icon pluginID="org.eclipse.gmf.runtime.diagram.ui" iconPath="/icons/group.gif"/>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="requirement.tool.package" label="Package" description="Create a new Package">
+ <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/Package.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Package"/>
+ </elementDescriptors>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/umldi.elementtypesconfigurations#org.eclipse.papyrus.umldi.Package_Shape_CN"/>
+ </elementDescriptors>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/umldi.elementtypesconfigurations#org.eclipse.papyrus.umldi.Package_Shape"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="requirement.tool.class" label="Requirement" description="Create a new Requirement">
+ <icon pluginID="org.eclipse.papyrus.sysml" iconPath="/icons/requirements/Requirement.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.Requirement"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="requirement.tool.problem" label="Problem" description="Create a new Problem">
+ <icon pluginID="org.eclipse.papyrus.sysml" iconPath="/icons/modelelements/Problem.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.Problem"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="requirement.tool.rational" label="Rationale" description="Create a new Rationale">
+ <icon pluginID="org.eclipse.papyrus.sysml" iconPath="/icons/modelelements/Rationale.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.Rationale"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="requirement.tool.comment" label="Comment" description="Create a new Comment">
+ <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/Comment.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/umldi.elementtypesconfigurations#org.eclipse.papyrus.umldi.Comment_Shape_CN"/>
+ </elementDescriptors>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/umldi.elementtypesconfigurations#org.eclipse.papyrus.umldi.Comment_Shape"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="requirement.tool.constraint" label="Constraint" description="Create a new Constraint">
+ <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/Constraint.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/umldi.elementtypesconfigurations#org.eclipse.papyrus.umldi.Constraint_PackagedElementShape_CN"/>
+ </elementDescriptors>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/umldi.elementtypesconfigurations#org.eclipse.papyrus.umldi.Constraint_PackagedElementShape"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ </drawerConfigurations>
+ <drawerConfigurations id="requirement.drawer.edges" label="Edges">
+ <icon pluginID="org.eclipse.gmf.runtime.diagram.ui" iconPath="/icons/group.gif"/>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="requirement.tool.copy" label="Copy" description="Create a Copy Link" kind="ConnectionTool">
+ <icon pluginID="org.eclipse.papyrus.sysml" iconPath="/icons/requirements/Copy.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.Copy"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="requirement.tool.dependency" label="Dependency" description="Create a new Dependency" kind="ConnectionTool">
+ <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/Dependency.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/umldi.elementtypesconfigurations#org.eclipse.papyrus.umldi.Dependency_Edge"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="requirement.tool.derive" label="Derive" description="Create a Derive Link" kind="ConnectionTool">
+ <icon pluginID="org.eclipse.papyrus.sysml" iconPath="/icons/requirements/DeriveReqt.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.DeriveReqt"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="requirement.tool.decompose" label="Decompose" description="Create a Decompose Link" kind="ConnectionTool">
+ <icon pluginID="org.eclipse.papyrus.uml.diagram.clazz" iconPath="/icons/obj16/ContainmentConnection.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/umldi.elementtypesconfigurations#org.eclipse.papyrus.umldi.Element_ContainmentEdge"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="requirement.tool.packageimport" label="PackageImport" description="Create a new PackageImport" kind="ConnectionTool">
+ <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/PackageImport.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/umldi.elementtypesconfigurations#org.eclipse.papyrus.umldi.PackageImport_Edge"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="requirement.tool.realization" label="Realization" description="Create a new Realization" kind="ConnectionTool">
+ <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/Realization.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/umldi.elementtypesconfigurations#org.eclipse.papyrus.umldi.Realization_Edge"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="requirement.tool.satisfy" label="Satisfy" description="Create a Satisfy Link" kind="ConnectionTool">
+ <icon pluginID="org.eclipse.papyrus.sysml" iconPath="/icons/requirements/Satisfy.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.Satisfy"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="requirement.tool.verify" label="Verify" description="Create a Verify Link" kind="ConnectionTool">
+ <icon pluginID="org.eclipse.papyrus.sysml" iconPath="/icons/requirements/Verify.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.Verify"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="package.tool.link" label="Link" description="Create a new Link" kind="ConnectionTool">
+ <icon pluginID="org.eclipse.papyrus.uml.diagram.clazz" iconPath="/icons/obj16/Link.gif"/>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/umldi.elementtypesconfigurations#org.eclipse.papyrus.umldi.Comment_AnnotatedElementEdge"/>
+ </elementDescriptors>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/umldi.elementtypesconfigurations#org.eclipse.papyrus.umldi.TimeObservation_EventEdge"/>
+ </elementDescriptors>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/umldi.elementtypesconfigurations#org.eclipse.papyrus.umldi.DurationObservation_EventEdge"/>
+ </elementDescriptors>
+ <elementDescriptors>
+ <elementType xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/umldi.elementtypesconfigurations#org.eclipse.papyrus.umldi.Constraint_ConstrainedElementEdge"/>
+ </elementDescriptors>
+ </ownedConfigurations>
+ </drawerConfigurations>
+</paletteconfiguration:PaletteConfiguration>
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/palettes/requirement.palette.gen.xml b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/palettes/requirement.palette.gen.xml
new file mode 100755
index 0000000..e7710da
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/palettes/requirement.palette.gen.xml
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<paletteDefinition>
+ <content>
+ <drawer
+ iconpath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ id="org.eclipse.papyrus.sysml.diagram.requirement.SYSML_Requirement__Tools" name="Tools">
+ <aspectTool description="Create a new Comment" id="requirement.tool.comment"
+ name="Comment" refToolId="clazz.tool.comment">
+ </aspectTool>
+ <aspectTool description="Create a new Constraint" id="requirement.tool.constraint"
+ name="Constraint" refToolId="clazz.tool.constraint">
+ </aspectTool>
+
+ <aspectTool description="Create a new Package" id="requirement.tool.package"
+ name="Package" refToolId="clazz.tool.package">
+ </aspectTool>
+ <aspectTool description="Create a new Class" id="requirement.tool.class"
+ name="Class" refToolId="clazz.tool.class">
+ </aspectTool>
+ <aspectTool description="Create a new DataType" id="requirement.tool.datatype"
+ name="DataType" refToolId="clazz.tool.datatype">
+ </aspectTool>
+ <aspectTool description="Create a new Enumeration" id="requirement.tool.enumeration"
+ name="Enumeration" refToolId="clazz.tool.enumeration">
+ </aspectTool>
+ <aspectTool description="Create a new Interface" id="requirement.tool.interface"
+ name="Interface" refToolId="clazz.tool.interface">
+ </aspectTool>
+ <aspectTool description="Create a new Operation" id="requirement.tool.operation"
+ name="Operation" refToolId="clazz.tool.operation">
+ </aspectTool>
+ <aspectTool description="Create a new PrimitiveType" id="requirement.tool.primitivetype"
+ name="PrimitiveType" refToolId="clazz.tool.primitivetype">
+ </aspectTool>
+ <aspectTool description="Create a new Property" id="requirement.tool.property"
+ name="Property" refToolId="clazz.tool.property">
+ </aspectTool>
+ <aspectTool description="Create a new Reception" id="requirement.tool.reception"
+ name="Reception" refToolId="clazz.tool.reception">
+ </aspectTool>
+ <aspectTool description="Create a new Signal" id="requirement.tool.signal"
+ name="Signal" refToolId="clazz.tool.signal">
+ </aspectTool>
+ <aspectTool description="Create a new Abstraction" id="requirement.tool.abstraction"
+ name="Abstraction" refToolId="clazz.tool.abstraction">
+ </aspectTool>
+ <aspectTool description="Create a new ContainmentLink" id="requirement.tool.containmentlink"
+ name="ContainmentLink" refToolId="clazz.tool.containmentlink">
+ </aspectTool>
+ <aspectTool description="Create a new Dependency" id="requirement.tool.dependency"
+ name="Dependency" refToolId="clazz.tool.dependency">
+ </aspectTool>
+ <aspectTool description="Create a new PackageImport" id="requirement.tool.packageimport"
+ name="PackageImport" refToolId="clazz.tool.packageimport">
+ </aspectTool>
+ <aspectTool description="Create a new Realization" id="requirement.tool.realization"
+ name="Realization" refToolId="clazz.tool.realization">
+ </aspectTool>
+
+ </drawer>
+ </content>
+</paletteDefinition>
+
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/palettes/requirement.palette.xml b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/palettes/requirement.palette.xml
new file mode 100755
index 0000000..7075f79
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/palettes/requirement.palette.xml
@@ -0,0 +1,132 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+ <paletteDefinition>
+ <content>
+ <drawer iconpath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif" id="requirement.drawer.nodes" name="Nodes">
+
+ <aspectTool description="Create a new Package"
+ id="requirement.tool.package"
+ name="Package" refToolId="clazz.tool.package">
+ </aspectTool>
+
+ <aspectTool description="Create a new Requirement"
+ id="requirement.tool.class" name="Requirement"
+ refToolId="clazz.tool.class" iconpath="platform:/plugin/org.eclipse.papyrus.sysml/icons/requirements/Requirement.gif">
+ <postAction id="org.eclipse.papyrus.postaction.displayAppliedStereotypePropertiesInCompartmentactionprovider">
+ <propertiesToDisplay>
+ <propertyToDisplay name="SysML::Requirements::Requirement.id"/>
+ <propertyToDisplay name="SysML::Requirements::Requirement.text"/>
+ </propertiesToDisplay>
+ </postAction>
+
+ <postAction id="org.eclipse.papyrus.applystereotypeactionprovider">
+ <stereotypesToApply>
+ <stereotype stereotypeName="SysML::Requirements::Requirement"/>
+ </stereotypesToApply>
+ </postAction>
+ </aspectTool>
+
+ <aspectTool description="Create a new Problem"
+ id="requirement.tool.comment" name="Problem"
+ refToolId="clazz.tool.comment" iconpath="platform:/plugin/org.eclipse.papyrus.sysml/icons/modelelements/Problem.gif">
+
+ <postAction id="org.eclipse.papyrus.applystereotypeactionprovider">
+ <stereotypesToApply>
+ <stereotype stereotypeName="SysML::ModelElements::Problem"/>
+ </stereotypesToApply>
+ </postAction>
+
+ </aspectTool>
+
+ <aspectTool description="Create a new Rationale"
+ id="requirement.tool.comment" name="Rationale"
+ refToolId="clazz.tool.comment" iconpath="platform:/plugin/org.eclipse.papyrus.sysml/icons/modelelements/Rationale.gif">
+
+ <postAction id="org.eclipse.papyrus.applystereotypeactionprovider">
+ <stereotypesToApply>
+ <stereotype stereotypeName="SysML::ModelElements::Rationale"/>
+ </stereotypesToApply>
+ </postAction>
+
+ </aspectTool>
+
+ <aspectTool description="Create a new Comment" id="requirement.tool.comment"
+ name="Comment" refToolId="clazz.tool.comment">
+ </aspectTool>
+
+ <aspectTool description="Create a new Constraint" id="requirement.tool.constraint"
+ name="Constraint" refToolId="clazz.tool.constraint">
+ </aspectTool>
+
+ </drawer>
+
+ <drawer iconpath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif" id="requirement.drawer.edges" name="Edges">
+
+ <aspectTool description="Create a Copy Link"
+ id="requirement.tool.copy" name="Copy"
+ refToolId="clazz.tool.abstraction" iconpath="platform:/plugin/org.eclipse.papyrus.sysml/icons/requirements/Copy.gif">
+ <postAction
+ id="org.eclipse.papyrus.applystereotypeactionprovider">
+ <stereotypesToApply>
+ <stereotype stereotypeName="SysML::Requirements::Copy" />
+ </stereotypesToApply>
+ </postAction>
+ </aspectTool>
+ <aspectTool description="Create a new Dependency" id="requirement.tool.dependency"
+ name="Dependency" refToolId="clazz.tool.dependency">
+ </aspectTool>
+
+ <aspectTool description="Create a Derive Link"
+ id="requirement.tool.derive" name="Derive"
+ refToolId="clazz.tool.abstraction" iconpath="platform:/plugin/org.eclipse.papyrus.sysml/icons/requirements/DeriveReqt.gif">
+ <postAction
+ id="org.eclipse.papyrus.applystereotypeactionprovider">
+ <stereotypesToApply>
+ <stereotype
+ stereotypeName="SysML::Requirements::DeriveReqt" />
+ </stereotypesToApply>
+ </postAction>
+ </aspectTool>
+
+ <aspectTool description="Create a Decompose Link"
+ id="requirement.tool.decompose" name="Decompose"
+ refToolId="clazz.tool.containmentlink"/>
+ <aspectTool description="Create a new PackageImport" id="requirement.tool.packageimport"
+ name="PackageImport" refToolId="clazz.tool.packageimport">
+ </aspectTool>
+ <aspectTool description="Create a new Realization" id="requirement.tool.realization"
+ name="Realization" refToolId="clazz.tool.realization">
+ </aspectTool>
+ <aspectTool description="Create a Satisfy Link"
+ id="requirement.tool.satisfy" name="Satisfy"
+ refToolId="clazz.tool.abstraction" iconpath="platform:/plugin/org.eclipse.papyrus.sysml/icons/requirements/Satisfy.gif">
+ <postAction
+ id="org.eclipse.papyrus.applystereotypeactionprovider">
+ <stereotypesToApply>
+ <stereotype
+ stereotypeName="SysML::Requirements::Satisfy" />
+ </stereotypesToApply>
+ </postAction>
+ </aspectTool>
+
+ <aspectTool description="Create a Verify Link"
+ id="requirement.tool.verify" name="Verify"
+ refToolId="clazz.tool.abstraction" iconpath="platform:/plugin/org.eclipse.papyrus.sysml/icons/requirements/Verify.gif">
+ <postAction
+ id="org.eclipse.papyrus.applystereotypeactionprovider">
+ <stereotypesToApply>
+ <stereotype
+ stereotypeName="SysML::Requirements::Verify" />
+ </stereotypesToApply>
+ </postAction>
+ </aspectTool>
+
+
+
+ <!-- Attention : The element is added manually, can combine the two links comment and constraint, and therefore is not deleted -->
+ <aspectTool description="Create a new Link" id="package.tool.link"
+ name="Link" refToolId="clazz.tool.link">
+ </aspectTool>
+
+ </drawer>
+ </content>
+</paletteDefinition>
\ No newline at end of file
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/plugin.gen.xml b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/plugin.gen.xml
new file mode 100755
index 0000000..b5ef119
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/plugin.gen.xml
@@ -0,0 +1,550 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+
+<!-- Diagram declaration -->
+<extension point="org.eclipse.papyrus.infra.core.papyrusDiagram">
+ <creationCommand
+ creationCommandClass="org.eclipse.papyrus.sysml.diagram.requirement.RequirementDiagramCreateCommand"
+ creationCondition="org.eclipse.papyrus.sysml.diagram.requirement.RequirementDiagramCreationCondition"
+ icon="icons/obj16/Diagram_Requirement.gif"
+ id="org.eclipse.papyrus.sysml.diagram.requirement.CreateCommand"
+ language="sysml"
+ label="Requirement Diagram"/>
+ <editorDiagram
+ actionBarContributorId="org.eclipse.papyrus.uml.diagram.common.part.UMLDiagramActionBarContributor"
+ factoryClass="org.eclipse.papyrus.sysml.diagram.requirement.RequirementDiagramEditorFactory"
+ icon="icons/obj16/Diagram_Requirement.gif" />
+</extension>
+
+<!-- Diagram creation command and handler -->
+<extension point="org.eclipse.ui.commands">
+ <command id="org.eclipse.papyrus.sysml.diagram.requirement.CreateCommand"
+ name="Create a new Requirement Diagram"
+ description="Create a new Requirement Diagram"
+ categoryId="org.eclipse.papyrus.editor.category"/>
+</extension>
+
+<extension point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.papyrus.sysml.diagram.requirement.CreateRequirementDiagramWithNavigationHandler"
+ commandId="org.eclipse.papyrus.sysml.diagram.requirement.CreateCommand">
+ <activeWhen>
+ <with variable="activeEditorId">
+ <equals value="org.eclipse.papyrus.infra.core.papyrusEditor" />
+ </with>
+ </activeWhen>
+ </handler>
+</extension>
+
+<!-- Diagram creation command registration in menu and toolbar -->
+<extension point="org.eclipse.ui.menus">
+
+ <menuContribution locationURI="menu:org.eclipse.papyrus.ui.menu">
+ <menu id="org.eclipse.papyrus.uml.diagram.ui.menu.diagrams" label="Diagrams">
+ <command commandId="org.eclipse.papyrus.sysml.diagram.requirement.CreateCommand"
+ icon="icons/obj16/Diagram_Requirement.gif" label="Create a new Requirement Diagram"
+ style="push" tooltip="Create a new Requirement Diagram">
+ <visibleWhen>
+ <reference definitionId="org.eclipse.papyrus.sysml.diagram.common.IsPapyrusActiveWithSysML"/>
+ </visibleWhen>
+
+ </command>
+ </menu>
+ </menuContribution>
+
+ <menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar">
+ <toolbar id="org.eclipse.papyrus.ui.toolbar">
+ <command commandId="org.eclipse.papyrus.sysml.diagram.requirement.CreateCommand"
+ icon="icons/obj16/Diagram_Requirement.gif" label="Create a new Requirement Diagram"
+ style="push" tooltip="Create a new Requirement Diagram">
+ <visibleWhen>
+ <reference definitionId="org.eclipse.papyrus.sysml.diagram.common.IsPapyrusActiveWithSysML"/>
+ </visibleWhen>
+
+ </command>
+ </toolbar>
+ </menuContribution>
+
+ <menuContribution locationURI="popup:org.eclipse.papyrus.views.modelexplorer.popupmenu.creatediagram">
+ <command commandId="org.eclipse.papyrus.sysml.diagram.requirement.CreateCommand"
+ icon="icons/obj16/Diagram_Requirement.gif"
+ label="Create a new Requirement Diagram"
+ style="push"
+ tooltip="Create a new Requirement Diagram">
+ <visibleWhen>
+ <reference definitionId="org.eclipse.papyrus.sysml.diagram.common.IsPapyrusActiveWithSysML"/>
+ </visibleWhen>
+
+ </command>
+ </menuContribution>
+
+</extension>
+
+<!-- Palette tool declaration (declares the real palette containment) -->
+<extension point="org.eclipse.papyrus.uml.diagram.common.paletteDefinition"
+ name="SYSML_Requirement">
+
+ <paletteDefinition ID="SYSML_Requirement"
+ class="org.eclipse.papyrus.uml.diagram.common.service.PluginPaletteProvider"
+ name="SYSML_Requirement" icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ path="palettes/requirement.palette.xml"
+ provider="CEA LIST">
+ <Priority name="Low"/>
+
+ <!-- Specify diagram this palette tools relate to -->
+ <editor id="org.eclipse.papyrus.sysml.diagram.requirement"/>
+ </paletteDefinition>
+</extension>
+
+<!-- Diagram view providers declaration -->
+<extension point="org.eclipse.gmf.runtime.diagram.core.viewProviders">
+ <!-- Diagram view provider -->
+ <viewProvider class="org.eclipse.papyrus.sysml.diagram.requirement.provider.RequirementDiagramViewProvider">
+ <Priority name="Low"/>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Diagram" semanticHints="RequirementDiagram"/>
+ </viewProvider>
+
+ <!-- ViewProvider for inherited elements (from ClassDiagram ViewProvider) -->
+ <viewProvider class="org.eclipse.papyrus.sysml.diagram.requirement.provider.InheritedClassDiagramViewProvider">
+ <Priority name="Low"/>
+
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="Package_Shape, Package_Shape_CN, Class_Shape, Class_Shape_CN, NamedElement_Shape, Comment_Shape, Comment_Shape_CN, Constraint_Shape, Constraint_Shape_CN"/>
+
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="Property_ClassAttributeLabel, Reception_ReceptionLabel, Operation_ClassOperationLabel, Class_ClassNestedClassifierLabel, Interface_ClassNestedClassifierLabel, Enumeration_ClassNestedClassifierLabel, PrimitiveType_ClassNestedClassifierLabel, DataType_ClassNestedClassifierLabel, Signal_ClassNestedClassifierLabel"/>
+
+ <context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="Abstraction_Edge, Element_ContainmentEdge, Dependency_Edge, Comment_AnnotatedElementEdge, Constraint_ConstrainedElementEdge, Realization_Edge, PackageImport_Edge"/>
+
+ <object id="elementtype.node"
+ class="org.eclipse.papyrus.gmf.diagram.common.commands.ISemanticHintAdapter(org.eclipse.papyrus.sysml.diagram.common)">
+
+ <method
+ name="getSemanticHint()"
+ value="Package_Shape, Package_Shape_CN, Class_Shape, Class_Shape_CN, NamedElement_Shape, Comment_Shape, Comment_Shape_CN, Constraint_Shape, Constraint_Shape_CN">
+ </method>
+ </object>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" elements="elementtype.node"/>
+
+ <object id="elementtype.edge"
+ class="org.eclipse.papyrus.gmf.diagram.common.commands.ISemanticHintAdapter(org.eclipse.papyrus.sysml.diagram.common)">
+
+ <method
+ name="getSemanticHint()"
+ value="Abstraction_Edge, Element_ContainmentEdge, Dependency_Edge, Comment_AnnotatedElementEdge, Constraint_ConstrainedElementEdge, Realization_Edge, PackageImport_Edge">
+ </method>
+ </object>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Edge" elements="elementtype.edge"/>
+
+
+ <!-- Additional descriptors provided in case the semantic hint is is not provided -->
+
+ <!-- "uml.Package" -->
+ <object id="uml.Package" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Package"/>
+ </object>
+
+ <!-- "uml.Class" -->
+ <object id="uml.Class" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Class"/>
+ </object>
+
+ <!-- "uml.NamedElement" -->
+ <object id="uml.NamedElement" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.NamedElement"/>
+ </object>
+
+ <!-- "uml.Comment" -->
+ <object id="uml.Comment" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Comment"/>
+ </object>
+
+ <!-- "uml.Constraint" -->
+ <object id="uml.Constraint" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Constraint"/>
+ </object>
+
+ <!-- "uml.Property" -->
+ <object id="uml.Property" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Property"/>
+ </object>
+
+ <!-- "uml.Reception" -->
+ <object id="uml.Reception" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Reception"/>
+ </object>
+
+ <!-- "uml.Operation" -->
+ <object id="uml.Operation" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Operation"/>
+ </object>
+
+ <!-- "uml.Interface" -->
+ <object id="uml.Interface" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Interface"/>
+ </object>
+
+ <!-- "uml.Enumeration" -->
+ <object id="uml.Enumeration" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Enumeration"/>
+ </object>
+
+ <!-- "uml.PrimitiveType" -->
+ <object id="uml.PrimitiveType" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.PrimitiveType"/>
+ </object>
+
+ <!-- "uml.DataType" -->
+ <object id="uml.DataType" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.DataType"/>
+ </object>
+
+ <!-- "uml.Signal" -->
+ <object id="uml.Signal" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Signal"/>
+ </object>
+
+ <!-- "uml.Abstraction" -->
+ <object id="uml.Abstraction" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Abstraction"/>
+ </object>
+
+ <!-- "uml.Dependency" -->
+ <object id="uml.Dependency" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Dependency"/>
+ </object>
+
+ <!-- "uml.Realization" -->
+ <object id="uml.Realization" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Realization"/>
+ </object>
+
+ <!-- "uml.PackageImport" -->
+ <object id="uml.PackageImport" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.PackageImport"/>
+ </object>
+
+ <!-- Additional activation contexts for nodes semantic objects -->
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node"
+ elements="uml.Package, uml.Class, uml.NamedElement, uml.Comment, uml.Constraint, uml.Property, uml.Reception, uml.Operation, uml.Interface, uml.Enumeration, uml.PrimitiveType, uml.DataType, uml.Signal"/>
+
+ <!-- Additional activation contexts for edges semantic objects -->
+ <context viewClass="org.eclipse.gmf.runtime.notation.Edge"
+ elements="uml.Abstraction, uml.Dependency, uml.Realization, uml.PackageImport"/>
+
+ </viewProvider>
+</extension>
+
+<!-- Diagram edit part providers declaration -->
+<extension point="org.eclipse.gmf.runtime.diagram.ui.editpartProviders">
+
+ <!-- Diagram edit part provider -->
+ <editpartProvider class="org.eclipse.papyrus.sysml.diagram.requirement.provider.RequirementDiagramEditPartProvider">
+ <Priority name="Low"/>
+ <object
+ id="org.eclipse.papyrus.sysml.diagram.requirement.Diagram"
+ class="org.eclipse.gmf.runtime.notation.Diagram">
+ <method name="getType()" value="RequirementDiagram"/>
+ </object>
+ <context views="org.eclipse.papyrus.sysml.diagram.requirement.Diagram"/>
+ </editpartProvider>
+
+ <!-- EditPartProvider for inherited elements (from ClassDiagram) -->
+ <editpartProvider class="org.eclipse.papyrus.sysml.diagram.requirement.provider.InheritedClassDiagramEditPartProvider">
+ <Priority name="Low"/>
+ <object
+ id="PACKAGE"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="Package_Shape, Package_NameLabel, Package_PackagedElementCompartment"/>
+ </object>
+ <object
+ id="PACKAGE_CN"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="Package_Shape_CN, Package_NameLabel_CN, Package_PackagedElementCompartment_CN"/>
+ </object>
+ <object
+ id="CLASS"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="Class_Shape, Class_NameLabel, Class_AttributeCompartment, Class_OperationCompartment, Class_NestedClassifierCompartment"/>
+ </object>
+ <object
+ id="CLASS_CN"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="Class_Shape_CN, Class_NameLabel_CN, Class_AttributeCompartment_CN, Class_OperationCompartment_CN, Class_NestedClassifierCompartment_CN"/>
+ </object>
+ <object
+ id="DEFAULT_NAMED_ELEMENT"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="NamedElement_Shape, NamedElement_NameLabel"/>
+ </object>
+ <object
+ id="COMMENT"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="Comment_Shape, Comment_BodyLabel"/>
+ </object>
+ <object
+ id="COMMENT_CN"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="Comment_Shape_CN, Comment_BodyLabel_CN"/>
+ </object>
+ <object
+ id="CONSTRAINT"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="Constraint_Shape, Constraint_NameLabel, Constraint_BodyLabel"/>
+ </object>
+ <object
+ id="CONSTRAINT_CN"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="Constraint_Shape_CN, Constraint_NameLabel_CN, Constraint_FloatingNameLabel_CN"/>
+ </object>
+
+ <object
+ id="CLASS_PROPERTY_CLN"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="Property_ClassAttributeLabel"/>
+ </object>
+ <object
+ id="CLASS_RECEPTION_CLN"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="Reception_ReceptionLabel"/>
+ </object>
+ <object
+ id="CLASS_OPERATION_CLN"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="Operation_ClassOperationLabel"/>
+ </object>
+ <object
+ id="CLASS_CLASS_CLN"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="Class_ClassNestedClassifierLabel"/>
+ </object>
+ <object
+ id="CLASS_INTERFACE_CLN"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="Interface_ClassNestedClassifierLabel"/>
+ </object>
+ <object
+ id="CLASS_ENUMERATION_CLN"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="Enumeration_ClassNestedClassifierLabel"/>
+ </object>
+ <object
+ id="CLASS_PRIMITIVE_TYPE_CLN"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="PrimitiveType_ClassNestedClassifierLabel"/>
+ </object>
+ <object
+ id="CLASS_DATA_TYPE_CLN"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="DataType_ClassNestedClassifierLabel"/>
+ </object>
+ <object
+ id="CLASS_SIGNAL_CLN"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="Signal_ClassNestedClassifierLabel"/>
+ </object>
+
+ <object
+ id="ABSTRACTION"
+ class="org.eclipse.gmf.runtime.notation.Edge">
+ <method name="getType()" value="Abstraction_Edge, Abstraction_NameLabel, Abstraction_StereotypeLabel"/>
+ </object>
+ <object
+ id="CONTAINMENT_LINK"
+ class="org.eclipse.gmf.runtime.notation.Edge">
+ <method name="getType()" value="Element_ContainmentEdge"/>
+ </object>
+ <object
+ id="DEPENDENCY"
+ class="org.eclipse.gmf.runtime.notation.Edge">
+ <method name="getType()" value="Dependency_Edge, Dependency_NameLabel, Dependency_StereotypeLabel"/>
+ </object>
+ <object
+ id="COMMENT_ANNOTATED_ELEMENT"
+ class="org.eclipse.gmf.runtime.notation.Edge">
+ <method name="getType()" value="Comment_AnnotatedElementEdge"/>
+ </object>
+ <object
+ id="CONSTRAINT_CONSTRAINED_ELEMENT"
+ class="org.eclipse.gmf.runtime.notation.Edge">
+ <method name="getType()" value="Constraint_ConstrainedElementEdge"/>
+ </object>
+ <object
+ id="REALIZATION"
+ class="org.eclipse.gmf.runtime.notation.Edge">
+ <method name="getType()" value="Realization_Edge, Realization_StereotypeLabel, Realization_NameLabel"/>
+ </object>
+ <object
+ id="PACKAGE_IMPORT"
+ class="org.eclipse.gmf.runtime.notation.Edge">
+ <method name="getType()" value="PackageImport_Edge, PackageImport_StereotypeLabel"/>
+ </object>
+
+ <context views="PACKAGE, PACKAGE_CN, CLASS, CLASS_CN, NAMED_ELEMENT, COMMENT, COMMENT_CN, CONSTRAINT, CONSTRAINT_CN"/>
+ <context views="CLASS_PROPERTY_CLN, CLASS_RECEPTION_CLN, CLASS_OPERATION_CLN, CLASS_CLASS_CLN, CLASS_INTERFACE_CLN, CLASS_ENUMERATION_CLN, CLASS_PRIMITIVE_TYPE_CLN, CLASS_DATA_TYPE_CLN, CLASS_SIGNAL_CLN"/>
+ <context views="ABSTRACTION, CONTAINMENT_LINK, DEPENDENCY, COMMENT_ANNOTATED_ELEMENT, CONSTRAINT_CONSTRAINED_ELEMENT, REALIZATION, PACKAGE_IMPORT"/>
+
+ </editpartProvider>
+</extension>
+
+<!-- Diagram edit policy provider -->
+<extension
+ point="org.eclipse.gmf.runtime.diagram.ui.editpolicyProviders">
+ <editpolicyProvider
+ class="org.eclipse.papyrus.sysml.diagram.requirement.provider.CustomEditPolicyProvider">
+ <Priority name="Low"/>
+ </editpolicyProvider>
+</extension>
+
+<!-- Preference pages declaration -->
+<extension point="org.eclipse.ui.preferencePages" id="prefpages">
+
+ <!-- Diagram Preference pages declaration -->
+ <page
+ id="org.eclipse.papyrus.sysml.diagram.requirement.preferences"
+ name="Requirement Diagram"
+ category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams"
+ class="org.eclipse.papyrus.sysml.diagram.requirement.preferences.RequirementDiagramGeneralPreferencePage">
+ </page>
+
+ <!-- Element Preference pages declaration -->
+ <page category="org.eclipse.papyrus.sysml.diagram.requirement.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.requirement.preferences.PackagePreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.requirement.preferences.PackagePreferencePage"
+ name="Package">
+ </page>
+
+
+
+
+
+
+
+
+ <page category="org.eclipse.papyrus.sysml.diagram.requirement.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.requirement.preferences.NamedElementPreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.requirement.preferences.NamedElementPreferencePage"
+ name="NamedElement">
+ </page>
+
+
+
+
+ <page category="org.eclipse.papyrus.sysml.diagram.requirement.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.requirement.preferences.CommentPreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.requirement.preferences.CommentPreferencePage"
+ name="Comment">
+ </page>
+
+
+
+
+ <page category="org.eclipse.papyrus.sysml.diagram.requirement.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.requirement.preferences.ConstraintPreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.requirement.preferences.ConstraintPreferencePage"
+ name="Constraint">
+ </page>
+
+
+
+
+ <page category="org.eclipse.papyrus.sysml.diagram.requirement.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.requirement.preferences.AbstractionPreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.requirement.preferences.AbstractionPreferencePage"
+ name="Abstraction">
+ </page>
+
+
+ <page category="org.eclipse.papyrus.sysml.diagram.requirement.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.requirement.preferences.ContainmentLinkPreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.requirement.preferences.ContainmentLinkPreferencePage"
+ name="ContainmentLink">
+ </page>
+
+
+
+
+ <page category="org.eclipse.papyrus.sysml.diagram.requirement.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.requirement.preferences.DependencyPreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.requirement.preferences.DependencyPreferencePage"
+ name="Dependency">
+ </page>
+
+
+
+
+
+
+ <page category="org.eclipse.papyrus.sysml.diagram.requirement.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.requirement.preferences.RealizationPreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.requirement.preferences.RealizationPreferencePage"
+ name="Realization">
+ </page>
+
+
+ <page category="org.eclipse.papyrus.sysml.diagram.requirement.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.requirement.preferences.PackageImportPreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.requirement.preferences.PackageImportPreferencePage"
+ name="PackageImport">
+ </page>
+
+
+ <page category="org.eclipse.papyrus.sysml.diagram.requirement.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.requirement.preferences.PropertyPreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.requirement.preferences.PropertyPreferencePage"
+ name="Property">
+ </page>
+
+ <page category="org.eclipse.papyrus.sysml.diagram.requirement.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.requirement.preferences.ReceptionPreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.requirement.preferences.ReceptionPreferencePage"
+ name="Reception">
+ </page>
+
+ <page category="org.eclipse.papyrus.sysml.diagram.requirement.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.requirement.preferences.OperationPreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.requirement.preferences.OperationPreferencePage"
+ name="Operation">
+ </page>
+
+ <page category="org.eclipse.papyrus.sysml.diagram.requirement.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.requirement.preferences.InterfacePreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.requirement.preferences.InterfacePreferencePage"
+ name="Interface">
+ </page>
+
+ <page category="org.eclipse.papyrus.sysml.diagram.requirement.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.requirement.preferences.EnumerationPreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.requirement.preferences.EnumerationPreferencePage"
+ name="Enumeration">
+ </page>
+
+ <page category="org.eclipse.papyrus.sysml.diagram.requirement.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.requirement.preferences.PrimitiveTypePreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.requirement.preferences.PrimitiveTypePreferencePage"
+ name="PrimitiveType">
+ </page>
+
+ <page category="org.eclipse.papyrus.sysml.diagram.requirement.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.requirement.preferences.DataTypePreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.requirement.preferences.DataTypePreferencePage"
+ name="DataType">
+ </page>
+
+ <page category="org.eclipse.papyrus.sysml.diagram.requirement.preferences"
+ class="org.eclipse.papyrus.sysml.diagram.requirement.preferences.SignalPreferencePage"
+ id="org.eclipse.papyrus.sysml.diagram.requirement.preferences.SignalPreferencePage"
+ name="Signal">
+ </page>
+
+
+</extension>
+
+<!-- // Start of user code custom extensions
+ -->
+
+<!-- Insert custom extensions here. -->
+
+<!-- // End of user code
+ -->
+
+</plugin>
\ No newline at end of file
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/plugin.properties b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/plugin.properties
new file mode 100755
index 0000000..55423f7
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/plugin.properties
@@ -0,0 +1,12 @@
+#################################################################################
+# Copyright (c) 2010 CEA LIST.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - initial API and implementation
+##################################################################################
+pluginName=SysML Requirement Diagram
+providerName=Eclipse Modeling Project
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/plugin.xml b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/plugin.xml
new file mode 100755
index 0000000..a1f7f3a
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/plugin.xml
@@ -0,0 +1,857 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+
+<!-- Diagram declaration -->
+<extension point="org.eclipse.papyrus.infra.ui.papyrusDiagram">
+ <creationCommand
+ creationCommandClass="org.eclipse.papyrus.sysml.diagram.requirement.RequirementDiagramCreateCommand"
+ creationCondition="org.eclipse.papyrus.sysml.diagram.requirement.RequirementDiagramCreationCondition"
+ icon="icons/obj16/Diagram_Requirement.gif"
+ id="org.eclipse.papyrus.sysml.diagram.requirement.CreateCommand"
+ language="sysml"
+ label="SysML Requirement Diagram"/>
+ <editorDiagram
+ actionBarContributorId="org.eclipse.papyrus.uml.diagram.common.part.UMLDiagramActionBarContributor"
+ factoryClass="org.eclipse.papyrus.sysml.diagram.requirement.RequirementDiagramEditorFactory"
+ icon="icons/obj16/Diagram_Requirement.gif" />
+</extension>
+
+<!-- Diagram creation command and handler -->
+<extension point="org.eclipse.ui.commands">
+ <command id="org.eclipse.papyrus.sysml.diagram.requirement.CreateCommand"
+ name="Create a new Requirement Diagram"
+ description="Create a new Requirement Diagram"
+ categoryId="org.eclipse.papyrus.editor.category"/>
+</extension>
+
+<!-- Diagram view providers declaration -->
+<extension point="org.eclipse.gmf.runtime.diagram.core.viewProviders">
+ <!-- Diagram view provider -->
+ <viewProvider class="org.eclipse.papyrus.sysml.diagram.requirement.provider.RequirementDiagramViewProvider">
+ <Priority name="Low"/>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Diagram" semanticHints="RequirementDiagram"/>
+ </viewProvider>
+
+ <!-- ViewProvider for inherited elements (from ClassDiagram ViewProvider) -->
+ <viewProvider class="org.eclipse.papyrus.sysml.diagram.requirement.provider.CustomInheritedElementViewProvider">
+ <Priority name="Low"/>
+
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="Package_Shape, Package_Shape_CN, Class_Shape, Class_Shape_CN, NamedElement_Shape, Comment_Shape, Comment_Shape_CN, Constraint_Shape, Constraint_Shape_CN"/>
+
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="Property_ClassAttributeLabel, Reception_ReceptionLabel, Operation_ClassOperationLabel, Class_ClassNestedClassifierLabel, Interface_ClassNestedClassifierLabel, Enumeration_ClassNestedClassifierLabel, PrimitiveType_ClassNestedClassifierLabel, DataType_ClassNestedClassifierLabel, Signal_ClassNestedClassifierLabel"/>
+
+ <context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="Abstraction_Edge, Element_ContainmentEdge, Dependency_Edge, Comment_AnnotatedElementEdge, Constraint_ConstrainedElementEdge"/>
+
+ <object id="elementtype.node"
+ class="org.eclipse.papyrus.gmf.diagram.common.commands.ISemanticHintAdapter(org.eclipse.papyrus.sysml.diagram.common)">
+ <method
+ name="getSemanticHint()"
+ value="Package_Shape, Package_Shape_CN, Class_Shape, Class_Shape_CN, NamedElement_Shape, Comment_Shape, Comment_Shape_CN, Constraint_Shape, Constraint_Shape_CN">
+ </method>
+ </object>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" elements="elementtype.node"/>
+
+ <object id="elementtype.edge"
+ class="org.eclipse.papyrus.gmf.diagram.common.commands.ISemanticHintAdapter(org.eclipse.papyrus.sysml.diagram.common)">
+ <method
+ name="getSemanticHint()"
+ value="Abstraction_Edge, Element_ContainmentEdge, Dependency_Edge, Comment_AnnotatedElementEdge, Constraint_ConstrainedElementEdge">
+ </method>
+ </object>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Edge" elements="elementtype.edge"/>
+
+
+ <!-- Additional descriptors provided in case the semantic hint is is not provided -->
+
+ <!-- "uml.Package" -->
+ <object id="uml.Package" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Package"/>
+ </object>
+
+ <!-- "uml.Class" -->
+ <object id="uml.Class" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Class"/>
+ </object>
+
+ <!-- "uml.NamedElement" -->
+ <object id="uml.NamedElement" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.NamedElement"/>
+ </object>
+
+ <!-- "uml.Comment" -->
+ <object id="uml.Comment" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Comment"/>
+ </object>
+
+ <!-- "uml.Constraint" -->
+ <object id="uml.Constraint" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Constraint"/>
+ </object>
+
+ <!-- "uml.Property" -->
+ <object id="uml.Property" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Property"/>
+ </object>
+
+ <!-- "uml.Reception" -->
+ <object id="uml.Reception" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Reception"/>
+ </object>
+
+ <!-- "uml.Operation" -->
+ <object id="uml.Operation" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Operation"/>
+ </object>
+
+ <!-- "uml.Interface" -->
+ <object id="uml.Interface" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Interface"/>
+ </object>
+
+ <!-- "uml.Enumeration" -->
+ <object id="uml.Enumeration" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Enumeration"/>
+ </object>
+
+ <!-- "uml.PrimitiveType" -->
+ <object id="uml.PrimitiveType" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.PrimitiveType"/>
+ </object>
+
+ <!-- "uml.DataType" -->
+ <object id="uml.DataType" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.DataType"/>
+ </object>
+
+ <!-- "uml.Signal" -->
+ <object id="uml.Signal" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Signal"/>
+ </object>
+
+ <!-- "uml.Abstraction" -->
+ <object id="uml.Abstraction" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Abstraction"/>
+ </object>
+
+ <!-- "uml.Dependency" -->
+ <object id="uml.Dependency" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
+ <method name="getProxyClassID()" value="uml.Dependency"/>
+ </object>
+
+ <!-- Additional activation contexts for nodes semantic objects -->
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node"
+ elements="uml.Package, uml.Class, uml.NamedElement, uml.Comment, uml.Constraint, uml.Property, uml.Reception, uml.Operation, uml.Interface, uml.Enumeration, uml.PrimitiveType, uml.DataType, uml.Signal"/>
+
+ <!-- Additional activation contexts for edges semantic objects -->
+ <context viewClass="org.eclipse.gmf.runtime.notation.Edge"
+ elements="uml.Abstraction, uml.Dependency"/>
+
+ </viewProvider>
+
+ <!-- Custom graphical types view provider -->
+</extension>
+
+<!-- Diagram edit part providers declaration -->
+<extension point="org.eclipse.gmf.runtime.diagram.ui.editpartProviders">
+
+ <!-- Diagram edit part provider -->
+ <editpartProvider class="org.eclipse.papyrus.sysml.diagram.requirement.provider.RequirementDiagramEditPartProvider">
+ <Priority name="Low"/>
+ <object
+ id="org.eclipse.papyrus.sysml.diagram.requirement.Diagram"
+ class="org.eclipse.gmf.runtime.notation.Diagram">
+ <method name="getType()" value="RequirementDiagram"/>
+ </object>
+ <context views="org.eclipse.papyrus.sysml.diagram.requirement.Diagram"/>
+ </editpartProvider>
+
+ <!-- EditPartProvider for inherited elements (from ClassDiagram) -->
+ <editpartProvider class="org.eclipse.papyrus.sysml.diagram.requirement.provider.InheritedClassDiagramEditPartProvider">
+ <Priority name="Low"/>
+ <object
+ id="PACKAGE"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="Package_Shape, Package_NameLabel, Package_PackagedElementCompartment"/>
+ </object>
+ <object
+ id="PACKAGE_CN"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="Package_Shape_CN, Package_NameLabel_CN, Package_PackagedElementCompartment_CN"/>
+ </object>
+ <object
+ id="CLASS"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="Class_Shape, Class_NameLabel, Class_AttributeCompartment, Class_OperationCompartment, Class_NestedClassifierCompartment"/>
+ </object>
+ <object
+ id="CLASS_CN"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="Class_Shape_CN, Class_NameLabel_CN, Class_AttributeCompartment_CN, Class_OperationCompartment_CN, Class_NestedClassifierCompartment_CN"/>
+ </object>
+ <object
+ id="DEFAULT_NAMED_ELEMENT"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="NamedElement_Shape, NamedElement_NameLabel"/>
+ </object>
+ <object
+ id="COMMENT"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="Comment_Shape, Comment_BodyLabel"/>
+ </object>
+ <object
+ id="COMMENT_CN"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="Comment_Shape_CN, Comment_BodyLabel_CN"/>
+ </object>
+ <object
+ id="CONSTRAINT"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="Constraint_Shape, Constraint_NameLabel, Constraint_BodyLabel"/>
+ </object>
+ <object
+ id="CONSTRAINT_CN"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="Constraint_Shape_CN, Constraint_NameLabel_CN, Constraint_FloatingNameLabel_CN"/>
+ </object>
+
+ <object
+ id="CLASS_PROPERTY_CLN"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="Property_ClassAttributeLabel"/>
+ </object>
+ <object
+ id="CLASS_RECEPTION_CLN"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="Reception_ReceptionLabel"/>
+ </object>
+ <object
+ id="CLASS_OPERATION_CLN"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="Operation_ClassOperationLabel"/>
+ </object>
+ <object
+ id="CLASS_CLASS_CLN"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="Class_ClassNestedClassifierLabel"/>
+ </object>
+ <object
+ id="CLASS_INTERFACE_CLN"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="Interface_ClassNestedClassifierLabel"/>
+ </object>
+ <object
+ id="CLASS_ENUMERATION_CLN"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="Enumeration_ClassNestedClassifierLabel"/>
+ </object>
+ <object
+ id="CLASS_PRIMITIVE_TYPE_CLN"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="PrimitiveType_ClassNestedClassifierLabel"/>
+ </object>
+ <object
+ id="CLASS_DATA_TYPE_CLN"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="DataType_ClassNestedClassifierLabel"/>
+ </object>
+ <object
+ id="CLASS_SIGNAL_CLN"
+ class="org.eclipse.gmf.runtime.notation.Node">
+ <method name="getType()" value="Signal_ClassNestedClassifierLabel"/>
+ </object>
+
+ <object
+ id="ABSTRACTION"
+ class="org.eclipse.gmf.runtime.notation.Edge">
+ <method name="getType()" value="Abstraction_Edge, Abstraction_NameLabel, Abstraction_StereotypeLabel"/>
+ </object>
+ <object
+ id="CONTAINMENT_LINK"
+ class="org.eclipse.gmf.runtime.notation.Edge">
+ <method name="getType()" value="Element_ContainmentEdge"/>
+ </object>
+ <object
+ id="DEPENDENCY"
+ class="org.eclipse.gmf.runtime.notation.Edge">
+ <method name="getType()" value="Dependency_Edge, Dependency_NameLabel, Dependency_StereotypeLabel"/>
+ </object>
+ <object
+ id="COMMENT_ANNOTATED_ELEMENT"
+ class="org.eclipse.gmf.runtime.notation.Edge">
+ <method name="getType()" value="Comment_AnnotatedElementEdge"/>
+ </object>
+ <object
+ id="CONSTRAINT_CONSTRAINED_ELEMENT"
+ class="org.eclipse.gmf.runtime.notation.Edge">
+ <method name="getType()" value="Constraint_ConstrainedElementEdge"/>
+ </object>
+
+ <context views="PACKAGE, PACKAGE_CN, CLASS, CLASS_CN, DEFAULT_NAMED_ELEMENT, COMMENT, COMMENT_CN, CONSTRAINT, CONSTRAINT_CN"/>
+ <context views="CLASS_PROPERTY_CLN, CLASS_RECEPTION_CLN, CLASS_OPERATION_CLN, CLASS_CLASS_CLN, CLASS_INTERFACE_CLN, CLASS_ENUMERATION_CLN, CLASS_PRIMITIVE_TYPE_CLN, CLASS_DATA_TYPE_CLN, CLASS_SIGNAL_CLN"/>
+ <context views="ABSTRACTION, CONTAINMENT_LINK, DEPENDENCY, COMMENT_ANNOTATED_ELEMENT, CONSTRAINT_CONSTRAINED_ELEMENT"/>
+
+ </editpartProvider>
+</extension>
+
+<!-- Diagram edit policy provider -->
+<extension
+ point="org.eclipse.gmf.runtime.diagram.ui.editpolicyProviders">
+ <editpolicyProvider
+ class="org.eclipse.papyrus.sysml.diagram.requirement.provider.CustomEditPolicyProvider">
+ <Priority name="Low"/>
+ </editpolicyProvider>
+</extension>
+
+<!-- Preference pages declaration -->
+<extension point="org.eclipse.ui.preferencePages" id="prefpages">
+
+ <!-- Diagram Preference pages declaration -->
+ <page
+ id="org.eclipse.papyrus.sysml.diagram.requirement.preferences"
+ name="Requirement Diagram"
+ category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams"
+ class="org.eclipse.papyrus.sysml.diagram.requirement.preferences.RequirementDiagramGeneralPreferencePage">
+ </page>
+
+ <!-- Element Preference pages declaration -->
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+</extension>
+
+
+<!-- // Start of user code custom extensions
+ -->
+
+<!-- Insert custom extensions here. -->
+ <extension
+ id="ep-provider"
+ point="org.eclipse.gmf.runtime.diagram.ui.editpartProviders">
+ <editpartProvider
+ class="org.eclipse.papyrus.sysml.diagram.requirement.provider.CustomRequirementEditPartProvider">
+ <Priority
+ name="High">
+ </Priority>
+ <object
+ class="org.eclipse.gmf.runtime.notation.Diagram"
+ id="generated-diagram">
+ <method name="getType()" value="Requirement"/>
+ </object>
+ <object
+ class="org.eclipse.gmf.runtime.notation.Node"
+ id="generated-nodes">
+ <method name="getType()" value="Dependency_Shape,AssociationClass_Shape,Association_Shape,InstanceSpecification_Shape,Component_Shape,Signal_Shape,Interface_Shape,Model_Shape,Enumeration_Shape,Package_Shape,InformationItem_Shape,Class_Shape,PrimitiveType_Shape,DataType_Shape,,Comment_Shape,Diagram_ShortcutShape,DurationObservation_Shape,TimeObservation_Shape,NamedElement_DefaultShape,Property_ClassAttributeLabel,Property_ComponentAttributeLabel,Property_SignalAttributeLabel,Property_InterfaceAttributeLabel,Property_PrimitiveTypeAttributeLabel,Property_DataTypeAttributeLabel,Class_ClassNestedClassifierLabel,Class_ComponentNestedClassifierLabel,Class_InterfaceNestedClassifierLabel,Operation_ClassOperationLabel,Operation_ComponentOperationLabel,Operation_InterfaceOperationLabel,Operation_PrimitiveTypeOperationLabel,Operation_DataTypeOperationLabel,ConnectableElementTemplateParameter_TemplateParameterLabel,OperationTemplateParameter_TemplateParameterLabel,ClassifierTemplateParameter_TemplateParameterLabel,TemplateParameter_TemplateParameterLabel,EnumerationLiteral_LiteralLabel,Reception_ReceptionLabel,Reception_InterfaceReceptionLabel,Slot_SlotLabel,RedefinableTemplateSignature_Shape,TemplateSignature_Shape,InstanceSpecification_Shape_CN,Component_Shape_CN,Signal_Shape_CN,Interface_Shape_CN,Model_Shape_CN,Enumeration_Shape_CN,Package_Shape_CN,InformationItem_Shape_CN,Class_Shape_CN,PrimitiveType_Shape_CN,DataType_Shape_CN,Comment_Shape_CN,_CN,Interface_ClassNestedClassifierLabel,Interface_ComponentNestedClassifierLabel,Interface_InterfaceNestedClassifierLabel,Enumeration_ClassNestedClassifierLabel,Enumeration_ComponentNestedClassifierLabel,Enumeration_InterfaceNestedClassifierLabel,PrimitiveType_ClassNestedClassifierLabel,PrimitiveType_ComponentNestedClassifierLabel,PrimitiveType_InterfaceNestedClassifierLabel,DataType_ClassNestedClassifierLabel,DataType_ComponentNestedClassifierLabel,DataType_InterfaceNestedClassifierLabel,Signal_ClassNestedClassifierLabel,Signal_ComponentNestedClassifierLabel,Signal_InterfaceNestedClassifierLabel,Component_ClassNestedClassifierLabel,Component_InterfaceNestedClassifierLabel,Component_ComponentNestedClassifierLabel"/>
+ </object>
+ <object
+ class="org.eclipse.gmf.runtime.notation.Edge"
+ id="generated-links">
+ <method name="getType()" value="AssociationClass_TetherEdge,AssociationClass_Edge,Association_Edge,Association_BranchEdge,Generalization_Edge,InterfaceRealization_Edge,Substitution_Edge,Realization_Edge,Abstraction_Edge,Usage_Edge,Dependency_Edge,Dependency_BranchEdge,ElementImport_Edge,PackageImport_Edge,PackageMerge_Edge,ProfileApplication_Edge,Comment_AnnotatedElementEdge,Constraint_ConstrainedElementEdge,TemplateBinding_Edge,GeneralizationSet_Edge,InstanceSpecification_Edge,Element_ContainmentEdge,TimeObservation_EventEdge,DurationObservation_EventEdge,InformationFlow_Edge,Constraint_ContextEdge"/>
+ </object>
+ <object
+ class="org.eclipse.gmf.runtime.notation.Node"
+ id="generated-labels">
+ <method name="getType()" value="Dependency_MultiNameLabel,Dependency_FloatingNameLabel,AssociationClass_NameLabel,AssociationClass_FloatingNameLabel,Association_FloatingNameLabel,InstanceSpecification_NameLabel,InstanceSpecification_FloatingNameLabel,Component_NameLabel,Component_FloatingNameLabel,Signal_NameLabel,Signal_FloatingNameLabel,Interface_NameLabel,Interface_FloatingNameLabel,Model_NameLabel,Enumeration_NameLabel,Enumeration_FloatingNameLabel,Package_NameLabel,InformationItem_NameLabel,InformationItem_FloatingNameLabel,Class_NameLabel,Class_FloatingNameLabel,PrimitiveType_NameLabel,PrimitiveType_FloatingNameLabel,DataType_NameLabel,DataType_FloatingNameLabel,Constraint_NameLabel,Constraint_BodyLabel,Comment_BodyLabel,Diagram_NameLabel,DurationObservation_FloatingNameLabel,DurationObservation_StereotypeLabel,TimeObservation_FloatingNameLabel,TimeObservation_StereotypeLabel,NamedElement_NameLabel,InstanceSpecification_NameLabel_CN,InstanceSpecification_FloatingNameLabel_CN,Component_NameLabel_CN,Component_FloatingNameLabel_CN,Signal_NameLabel_CN,Signal_FloatingNameLabel_CN,Interface_NameLabel_CN,Interface_FloatingNameLabel_CN,Model_NameLabel_CN,Enumeration_NameLabel_CN,Enumeration_FloatingNameLabel_CN,Package_NameLabel_CN,InformationItem_NameLabel_CN,InformationItem_FloatingNameLabel_CN,Class_NameLabel_CN,Class_FloatingNameLabel_CN,PrimitiveType_NameLabel_CN,PrimitiveType_FloatingNameLabel_CN,DataType_NameLabel_CN,DataType_FloatingNameLabel_CN,Comment_BodyLabel_CN,Constraint_NameLabel_CN,Constraint_FloatingNameLabel_CN"/>
+ </object>
+ <object
+ class="org.eclipse.gmf.runtime.notation.Node"
+ id="generated-compartments">
+ <method name="getType()" value="Class_AttributeCompartment_CN,Class_OperationCompartment_CN,Class_NestedClassifierCompartment_CN,Component_AttributeCompartment_CN,Component_OperationCompartment_CN,Component_NestedClassifierCompartment_CN,Signal_AttributeCompartment_CN,Interface_AttributeCompartment_CN,Interface_OperationCompartment_CN,Interface_NestedClassifierCompartment_CN,PrimitiveType_AttributeCompartment_CN,PrimitiveType_OperationCompartment_CN,DataType_AttributeCompartment_CN,DataType_OperationCompartment_CN,Model_PackagedElementCompartment_CN,Package_PackagedElementCompartment_CN,Enumeration_LiteralCompartment_CN,InstanceSpecification_SlotCompartment_CN,Class_AttributeCompartment,Class_OperationCompartment,Class_NestedClassifierCompartment,Component_AttributeCompartment,Component_OperationCompartment,Component_NestedClassifierCompartment,Interface_AttributeCompartment,Interface_OperationCompartment,Interface_NestedClassifierCompartment,PrimitiveType_AttributeCompartment,PrimitiveType_OperationCompartment,DataType_AttributeCompartment,DataType_OperationCompartment,AssociationClass_AttributeCompartment,InstanceSpecification_SlotCompartment,Signal_AttributeCompartment,Model_PackagedElementCompartment,Package_PackagedElementCompartment,Enumeration_LiteralCompartment,AssociationClass_OperationCompartment,AssociationClass_NestedClassifierCompartment,RedefinableTemplateSignature_TemplateParameterCompartment,TemplateSignature_TemplateParameterCompartment"/>
+ </object>
+ <object
+ id="generated-diagram,generated-nodes,generated-links,generated-labels,generated-compartments">
+ </object>
+ </editpartProvider>
+</extension>
+<extension point="org.eclipse.papyrus.infra.gmfdiag.common.notationTypesMapping">
+ <diagramMappings diagramID="RequirementDiagram">
+ <mapping
+ humanReadableType="attributes"
+ type="Class_AttributeCompartment_CN">
+ </mapping>
+ <mapping
+ humanReadableType="operations"
+ type="Class_OperationCompartment_CN">
+ </mapping>
+ <mapping
+ humanReadableType="nested classifiers"
+ type="Class_NestedClassifierCompartment_CN">
+ </mapping>
+ <mapping
+ humanReadableType="attributes"
+ type="Component_AttributeCompartment_CN">
+ </mapping>
+ <mapping
+ humanReadableType="operations"
+ type="Component_OperationCompartment_CN">
+ </mapping>
+ <mapping
+ humanReadableType="nested classifiers"
+ type="Component_NestedClassifierCompartment_CN">
+ </mapping>
+ <mapping
+ humanReadableType="attributes"
+ type="Signal_AttributeCompartment_CN">
+ </mapping>
+ <mapping
+ humanReadableType="attributes"
+ type="Interface_AttributeCompartment_CN">
+ </mapping>
+ <mapping
+ humanReadableType="operations"
+ type="Interface_OperationCompartment_CN">
+ </mapping>
+ <mapping
+ humanReadableType="nested classifiers"
+ type="Interface_NestedClassifierCompartment_CN">
+ </mapping>
+ <mapping
+ humanReadableType="attributes"
+ type="PrimitiveType_AttributeCompartment_CN">
+ </mapping>
+ <mapping
+ humanReadableType="operations"
+ type="PrimitiveType_OperationCompartment_CN">
+ </mapping>
+ <mapping
+ humanReadableType="attributes"
+ type="DataType_AttributeCompartment_CN">
+ </mapping>
+ <mapping
+ humanReadableType="operations"
+ type="DataType_OperationCompartment_CN">
+ </mapping>
+ <mapping
+ humanReadableType="packaged elements"
+ type="Model_PackagedElementCompartment_CN">
+ </mapping>
+ <mapping
+ humanReadableType="packaged elements"
+ type="Package_PackagedElementCompartment_CN">
+ </mapping>
+ <mapping
+ humanReadableType="literals"
+ type="Enumeration_LiteralCompartment_CN">
+ </mapping>
+ <mapping
+ humanReadableType="slots"
+ type="InstanceSpecification_SlotCompartment_CN">
+ </mapping>
+ <mapping
+ humanReadableType="attributes"
+ type="Class_AttributeCompartment">
+ </mapping>
+ <mapping
+ humanReadableType="operations"
+ type="Class_OperationCompartment">
+ </mapping>
+ <mapping
+ humanReadableType="nested classifiers"
+ type="Class_NestedClassifierCompartment">
+ </mapping>
+ <mapping
+ humanReadableType="attributes"
+ type="Component_AttributeCompartment">
+ </mapping>
+ <mapping
+ humanReadableType="operations"
+ type="Component_OperationCompartment">
+ </mapping>
+ <mapping
+ humanReadableType="nested classifiers"
+ type="Component_NestedClassifierCompartment">
+ </mapping>
+ <mapping
+ humanReadableType="attributes"
+ type="Interface_AttributeCompartment">
+ </mapping>
+ <mapping
+ humanReadableType="operations"
+ type="Interface_OperationCompartment">
+ </mapping>
+ <mapping
+ humanReadableType="nested classifiers"
+ type="Interface_NestedClassifierCompartment">
+ </mapping>
+ <mapping
+ humanReadableType="attributes"
+ type="PrimitiveType_AttributeCompartment">
+ </mapping>
+ <mapping
+ humanReadableType="operations"
+ type="PrimitiveType_OperationCompartment">
+ </mapping>
+ <mapping
+ humanReadableType="attributes"
+ type="DataType_AttributeCompartment">
+ </mapping>
+ <mapping
+ humanReadableType="operations"
+ type="DataType_OperationCompartment">
+ </mapping>
+ <mapping
+ humanReadableType="attributes"
+ type="AssociationClass_AttributeCompartment">
+ </mapping>
+ <mapping
+ humanReadableType="slots"
+ type="InstanceSpecification_SlotCompartment">
+ </mapping>
+ <mapping
+ humanReadableType="attributes"
+ type="Signal_AttributeCompartment">
+ </mapping>
+ <mapping
+ humanReadableType="packaged elements"
+ type="Model_PackagedElementCompartment">
+ </mapping>
+ <mapping
+ humanReadableType="packaged elements"
+ type="Package_PackagedElementCompartment">
+ </mapping>
+ <mapping
+ humanReadableType="literals"
+ type="Enumeration_LiteralCompartment">
+ </mapping>
+ <mapping
+ humanReadableType="operations"
+ type="AssociationClass_OperationCompartment">
+ </mapping>
+ <mapping
+ humanReadableType="nested classifiers"
+ type="AssociationClass_NestedClassifierCompartment">
+ </mapping>
+ <mapping
+ humanReadableType="TemplateParameter"
+ type="RedefinableTemplateSignature_TemplateParameterCompartment">
+ </mapping>
+ <mapping
+ humanReadableType="TemplateParameter"
+ type="TemplateSignature_TemplateParameterCompartment">
+ </mapping>
+ <mapping
+ humanReadableType="SourceRole"
+ type="AssociationClass_SourceRoleLabel">
+ </mapping>
+ <mapping
+ humanReadableType="TargetRole"
+ type="AssociationClass_TargetRoleLabel">
+ </mapping>
+ <mapping
+ humanReadableType="Stereotype"
+ type="Association_StereotypeLabel">
+ </mapping>
+ <mapping
+ humanReadableType="Name"
+ type="Association_NameLabel">
+ </mapping>
+ <mapping
+ humanReadableType="TargetRole"
+ type="Association_TargetRoleLabel">
+ </mapping>
+ <mapping
+ humanReadableType="SourceRole"
+ type="Association_SourceRoleLabel">
+ </mapping>
+ <mapping
+ humanReadableType="SourceMultiplicity"
+ type="Association_SourceMultiplicityLabel">
+ </mapping>
+ <mapping
+ humanReadableType="TargetMultiplicity"
+ type="Association_TargetMultiplicityLabel">
+ </mapping>
+ <mapping
+ humanReadableType="TargetRole"
+ type="Association_BranchRoleLabel">
+ </mapping>
+ <mapping
+ humanReadableType="TargetMultiplicity"
+ type="Association_BranchMultiplicityLabel">
+ </mapping>
+ <mapping
+ humanReadableType="Stereotype"
+ type="Generalization_StereotypeLabel">
+ </mapping>
+ <mapping
+ humanReadableType="Stereotype"
+ type="InterfaceRealization_StereotypeLabel">
+ </mapping>
+ <mapping
+ humanReadableType="Name"
+ type="InterfaceRealization_NameLabel">
+ </mapping>
+ <mapping
+ humanReadableType="Stereotype"
+ type="Substitution_StereotypeLabel">
+ </mapping>
+ <mapping
+ humanReadableType="Name"
+ type="Substitution_NameLabel">
+ </mapping>
+ <mapping
+ humanReadableType="Stereotype"
+ type="Realization_StereotypeLabel">
+ </mapping>
+ <mapping
+ humanReadableType="Name"
+ type="Realization_NameLabel">
+ </mapping>
+ <mapping
+ humanReadableType="Name"
+ type="Abstraction_NameLabel">
+ </mapping>
+ <mapping
+ humanReadableType="Stereotype"
+ type="Abstraction_StereotypeLabel">
+ </mapping>
+ <mapping
+ humanReadableType="Name"
+ type="Usage_NameLabel">
+ </mapping>
+ <mapping
+ humanReadableType="Stereotype"
+ type="Usage_StereotypeLabel">
+ </mapping>
+ <mapping
+ humanReadableType="Name"
+ type="Dependency_NameLabel">
+ </mapping>
+ <mapping
+ humanReadableType="Stereotype"
+ type="Dependency_StereotypeLabel">
+ </mapping>
+ <mapping
+ humanReadableType="Alias"
+ type="ElementImport_AliasLabel">
+ </mapping>
+ <mapping
+ humanReadableType="Stereotype"
+ type="ElementImport_StereotypeLabel">
+ </mapping>
+ <mapping
+ humanReadableType="Stereotype"
+ type="PackageImport_StereotypeLabel">
+ </mapping>
+ <mapping
+ humanReadableType="Stereotype"
+ type="PackageMerge_StereotypeLabel">
+ </mapping>
+ <mapping
+ humanReadableType="TemplateParameterSubstitution"
+ type="TemplateBinding_SubstitutionLabel">
+ </mapping>
+ <mapping
+ humanReadableType="Stereotype"
+ type="TemplateBinding_StereotypeLabel">
+ </mapping>
+ <mapping
+ humanReadableType="Stereotype"
+ type="GeneralizationSet_StereotypeLabel">
+ </mapping>
+ <mapping
+ humanReadableType="SourceRole"
+ type="InstanceSpecification_SourceRoleLabel">
+ </mapping>
+ <mapping
+ humanReadableType="TargetRole"
+ type="InstanceSpecification_TargetRoleLabel">
+ </mapping>
+ <mapping
+ humanReadableType="Stereotype"
+ type="InformationFlow_StereotypeLabel">
+ </mapping>
+ <mapping
+ humanReadableType="Stereotype"
+ type="Constraint_KeywordLabel">
+ </mapping>
+ <mapping
+ humanReadableType="Floating Label"
+ type="InstanceSpecification_FloatingNameLabel_CN">
+ </mapping>
+ <mapping
+ humanReadableType="Floating Label"
+ type="Component_FloatingNameLabel_CN">
+ </mapping>
+ <mapping
+ humanReadableType="Floating Label"
+ type="Signal_FloatingNameLabel_CN">
+ </mapping>
+ <mapping
+ humanReadableType="Floating Label"
+ type="Interface_FloatingNameLabel_CN">
+ </mapping>
+ <mapping
+ humanReadableType="Floating Label"
+ type="Enumeration_FloatingNameLabel_CN">
+ </mapping>
+ <mapping
+ humanReadableType="Floating Label"
+ type="InformationItem_FloatingNameLabel_CN">
+ </mapping>
+ <mapping
+ humanReadableType="Floating Label"
+ type="Class_FloatingNameLabel_CN">
+ </mapping>
+ <mapping
+ humanReadableType="Floating Label"
+ type="PrimitiveType_FloatingNameLabel_CN">
+ </mapping>
+ <mapping
+ humanReadableType="Floating Label"
+ type="DataType_FloatingNameLabel_CN">
+ </mapping>
+ <mapping
+ humanReadableType="Floating Label"
+ type="Dependency_FloatingNameLabel">
+ </mapping>
+ <mapping
+ humanReadableType="Floating Label"
+ type="AssociationClass_FloatingNameLabel">
+ </mapping>
+ <mapping
+ humanReadableType="Floating Label"
+ type="Association_FloatingNameLabel">
+ </mapping>
+ <mapping
+ humanReadableType="Floating Label"
+ type="InstanceSpecification_FloatingNameLabel">
+ </mapping>
+ <mapping
+ humanReadableType="Floating Label"
+ type="Component_FloatingNameLabel">
+ </mapping>
+ <mapping
+ humanReadableType="Floating Label"
+ type="Signal_FloatingNameLabel">
+ </mapping>
+ <mapping
+ humanReadableType="Floating Label"
+ type="Interface_FloatingNameLabel">
+ </mapping>
+ <mapping
+ humanReadableType="Floating Label"
+ type="Enumeration_FloatingNameLabel">
+ </mapping>
+ <mapping
+ humanReadableType="Floating Label"
+ type="InformationItem_FloatingNameLabel">
+ </mapping>
+ <mapping
+ humanReadableType="Floating Label"
+ type="Class_FloatingNameLabel">
+ </mapping>
+ <mapping
+ humanReadableType="Floating Label"
+ type="PrimitiveType_FloatingNameLabel">
+ </mapping>
+ <mapping
+ humanReadableType="Floating Label"
+ type="DataType_FloatingNameLabel">
+ </mapping>
+ <mapping
+ humanReadableType="Floating Label"
+ type="DurationObservation_FloatingNameLabel">
+ </mapping>
+ <mapping
+ humanReadableType="Stereotype"
+ type="DurationObservation_StereotypeLabel">
+ </mapping>
+ <mapping
+ humanReadableType="Floating Label"
+ type="TimeObservation_FloatingNameLabel">
+ </mapping>
+ <mapping
+ humanReadableType="Stereotype"
+ type="TimeObservation_StereotypeLabel">
+ </mapping>
+ </diagramMappings>
+ </extension>
+<extension
+ point="org.eclipse.papyrus.infra.gmfdiag.common.diagramReconciler">
+ <diagramReconciler
+ diagramType="RequirementDiagram"
+ reconcilerClass="org.eclipse.papyrus.uml.diagram.clazz.custom.migration.ClassReconciler_1_1_0"
+ source="1.0.0"
+ target="1.3.0">
+ </diagramReconciler>
+ <diagramReconciler
+ diagramType="RequirementDiagram"
+ reconcilerClass="org.eclipse.papyrus.uml.diagram.clazz.custom.migration.ClassReconcilerForCompartment_1_2_0"
+ source="1.1.0"
+ target="1.3.0">
+ </diagramReconciler>
+ <diagramReconciler
+ diagramType="RequirementDiagram"
+ reconcilerClass="org.eclipse.papyrus.uml.diagram.clazz.custom.migration.ClassReconciler_1_2_0"
+ source="1.1.0"
+ target="1.3.0">
+ </diagramReconciler>
+</extension>
+<!-- // End of user code
+ -->
+
+
+ <extension
+ point="org.eclipse.papyrus.infra.gmfdiag.common.visualTypeProviders">
+ <visualTypeProvider
+ class="org.eclipse.papyrus.sysml.diagram.requirement.provider.RequirementVisualTypeProvider"
+ diagramType="RequirementDiagram">
+ </visualTypeProvider>
+ </extension>
+
+ <extension point="org.eclipse.papyrus.infra.gmfdiag.common.paletteDefinition">
+ <paletteDefinition
+ ID="org.eclipse.papyrus.sysml.diagram.requirement.paletteconfiguration"
+ class="org.eclipse.papyrus.infra.gmfdiag.common.service.palette.ExtendedPluginPaletteProvider"
+ name="Papyrus SysML requirement editor Plugin Palette"
+ path="palettes/PapyrusSYSMLRequirementDiagram.paletteconfiguration"
+ provider="Eclipse Modeling Project">
+ <Priority
+ name="Lowest">
+ </Priority>
+ <!-- Specify diagram this palette tools relate to -->
+ <editor
+ id="org.eclipse.papyrus.sysml.diagram.requirement">
+ </editor>
+ </paletteDefinition>
+</extension>
+</plugin>
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/pom.xml b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/pom.xml
new file mode 100755
index 0000000..65b09ac
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/pom.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.papyrus.sysml</groupId>
+ <artifactId>org.eclipse.papyrus.sysml-diagram</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.papyrus.sysml.diagram.requirement</artifactId>
+ <version>3.0.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project>
\ No newline at end of file
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/Activator.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/Activator.java
new file mode 100755
index 0000000..46d1755
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/Activator.java
@@ -0,0 +1,107 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nizar GUEDIDI (CEA LIST) - Initial API and implementation
+ /*****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement;
+
+import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.papyrus.infra.core.log.LogHelper;
+import org.eclipse.papyrus.sysml.diagram.requirement.preferences.RequirementDiagramPreferenceInitializer;
+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.sysml.diagram.requirement";
+
+ /** The plug-in shared instance */
+ private static Activator plugin;
+
+ /** The logging helper */
+ public static LogHelper log;
+
+ /** The plug-in Preference store */
+ public static final PreferencesHint DIAGRAM_PREFERENCES_HINT = new PreferencesHint(PLUGIN_ID);
+
+ /** Default constructor */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+
+ // register the login helper
+ log = new LogHelper(plugin);
+
+ // register the preference store
+ PreferencesHint.registerPreferenceStore(DIAGRAM_PREFERENCES_HINT, getPreferenceStore());
+
+ // Preferences initialization
+ RequirementDiagramPreferenceInitializer diagramPreferenceInitializer = new RequirementDiagramPreferenceInitializer();
+ diagramPreferenceInitializer.initializeDefaultPreferences();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getInstance() {
+ return plugin;
+ }
+
+ /**
+ * Returns an image descriptor for the image file at the given plug-in relative path.
+ *
+ * @generated
+ * @param path
+ * the path
+ * @return the image descriptor
+ */
+ public static ImageDescriptor getBundledImageDescriptor(String path) {
+ return AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, path);
+ }
+
+ /**
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#getPreferenceStore()
+ *
+ * @return Shared Preference Store.
+ */
+ @Override
+ public IPreferenceStore getPreferenceStore() {
+ IPreferenceStore store = org.eclipse.papyrus.infra.gmfdiag.preferences.Activator.getDefault().getPreferenceStore();
+ return store;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/RequirementDiagramCreateCommand.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/RequirementDiagramCreateCommand.java
new file mode 100755
index 0000000..9cd0ea0
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/RequirementDiagramCreateCommand.java
@@ -0,0 +1,52 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST- Initial API and implementation
+ * Nizar GUEDIDI (CEA LIST)- modification
+ * Laurent Wouters (CEA LIST) laurent.wouters@cea.fr - Viewpoints application
+ *
+ ****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement;
+
+import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
+import org.eclipse.papyrus.infra.gmfdiag.common.AbstractPapyrusGmfCreateDiagramCommandHandler;
+import org.eclipse.papyrus.sysml.diagram.requirement.provider.ElementTypes;
+
+/**
+ * Represents the creation command for a SysML requirements diagram
+ *
+ * @author Laurent Wouters
+ */
+public class RequirementDiagramCreateCommand extends AbstractPapyrusGmfCreateDiagramCommandHandler {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getDefaultDiagramName() {
+ return "New Requirements Diagram"; // //$NON-NLS-1$
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getDiagramNotationID() {
+ return ElementTypes.DIAGRAM_ID;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected PreferencesHint getPreferenceHint() {
+ return Activator.DIAGRAM_PREFERENCES_HINT;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/RequirementDiagramEditorFactory.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/RequirementDiagramEditorFactory.java
new file mode 100755
index 0000000..4bcb876
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/RequirementDiagramEditorFactory.java
@@ -0,0 +1,26 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST- Initial API and implementation
+ * Nizar GUEDIDI (CEA LIST)- modification
+ *
+ ****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement;
+
+import org.eclipse.papyrus.infra.gmfdiag.common.GmfEditorFactory;
+import org.eclipse.papyrus.sysml.diagram.requirement.provider.ElementTypes;
+
+public class RequirementDiagramEditorFactory extends GmfEditorFactory {
+
+ public RequirementDiagramEditorFactory() {
+ super(RequirementDiagramForMultiEditor.class, ElementTypes.DIAGRAM_ID);
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/RequirementDiagramForMultiEditor.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/RequirementDiagramForMultiEditor.java
new file mode 100755
index 0000000..ad4bba4
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/RequirementDiagramForMultiEditor.java
@@ -0,0 +1,134 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2014 CEA LIST and others.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST- Initial API and implementation
+ * Nizar GUEDIDI (CEA LIST)- modification
+ * Christian W. Damus (CEA) - bug 392301
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
+ *
+ ****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.emf.common.ui.URIEditorInput;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.papyrus.infra.core.editor.BackboneException;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.internationalization.utils.utils.LabelInternationalization;
+import org.eclipse.papyrus.sysml.diagram.requirement.part.RequirementDiagramEditor;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.PartInitException;
+
+/**
+ * An editor to be used in multitabs editor. This editor extends the original UML Diagram.
+ *
+ */
+public class RequirementDiagramForMultiEditor extends RequirementDiagramEditor {
+
+ /**
+ * The location of diagram icon in the plug-in
+ */
+ private static final String DIAG_IMG_PATH = "icons/obj16/Diagram_Requirement.gif";
+
+ /**
+ * The image descriptor of the diagram icon
+ */
+ private static final ImageDescriptor DIAG_IMG_DESC = Activator.getBundledImageDescriptor(RequirementDiagramForMultiEditor.DIAG_IMG_PATH);
+
+ /** The editor splitter. */
+ private Composite splitter;
+
+ private Image titleImage;
+
+ /**
+ * Constructor for SashSystem v2. Context and required objects are retrieved from the
+ * ServiceRegistry.
+ *
+ * @throws BackboneException
+ * @throws ServiceException
+ *
+ */
+ public RequirementDiagramForMultiEditor(ServicesRegistry servicesRegistry, Diagram diagram) throws BackboneException, ServiceException {
+ super(servicesRegistry, diagram);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void init(IEditorSite site, IEditorInput input) throws PartInitException {
+ super.init(site, input);
+ setPartName(LabelInternationalization.getInstance().getDiagramLabel(getDiagram()));
+ titleImage = DIAG_IMG_DESC.createImage();
+ setTitleImage(titleImage);
+ }
+
+ @Override
+ public void dispose() {
+ if (titleImage != null) {
+ titleImage.dispose();
+ titleImage = null;
+ }
+
+ super.dispose();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void setInput(IEditorInput input) {
+ try {
+ // Provide an URI with fragment in order to reuse the same Resource
+ // and set the diagram to the fragment.
+ URIEditorInput uriInput = new URIEditorInput(EcoreUtil.getURI(getDiagram()));
+ doSetInput(uriInput, true);
+ } catch (CoreException x) {
+ String title = "Problem opening";
+ String msg = "Cannot open input element:";
+ Shell shell = getSite().getShell();
+ ErrorDialog.openError(shell, title, msg, x.getStatus());
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void createGraphicalViewer(Composite parent) {
+ splitter = parent;
+ super.createGraphicalViewer(parent);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void setFocus() {
+ splitter.setFocus();
+ super.setFocus();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getEditingDomainID() {
+ return "org.eclipse.papyrus.sysml.diagram.requirement.EditingDomain";
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/edit/part/RequirementDiagramEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/edit/part/RequirementDiagramEditPart.java
new file mode 100755
index 0000000..cfae03d
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/edit/part/RequirementDiagramEditPart.java
@@ -0,0 +1,49 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST- Initial API and implementation
+ * Nizar GUEDIDI (CEA LIST)- modification
+ *
+ ****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.edit.part;
+
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusDiagramEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.sysml.diagram.requirement.edit.policy.CustomDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
+
+
+/**
+ *
+ * @Generated NOT //change the super class
+ */
+public class RequirementDiagramEditPart extends PapyrusDiagramEditPart {
+
+
+
+
+ public RequirementDiagramEditPart(View view) {
+ super(view);
+ }
+
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
+ installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultCompartmentSemanticEditPolicy());
+ installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDragDropEditPolicy());
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/edit/policy/RequirementDiagramDragDropEditPolicy.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/edit/policy/RequirementDiagramDragDropEditPolicy.java
new file mode 100755
index 0000000..a66a022
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/edit/policy/RequirementDiagramDragDropEditPolicy.java
@@ -0,0 +1,52 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST- Initial API and implementation
+ * Nizar GUEDIDI (CEA LIST)- modification
+ *
+ ****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.edit.policy;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.requirement.provider.GraphicalTypeRegistry;
+import org.eclipse.papyrus.sysml.diagram.requirement.provider.IGraphicalTypeRegistry;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy;
+
+/** Customization of the DND edit policy for the Requirement Diagram */
+public class RequirementDiagramDragDropEditPolicy extends ClassDiagramDragDropEditPolicy {
+
+ /** Local graphical type registry */
+ protected IGraphicalTypeRegistry registry = new GraphicalTypeRegistry();
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getNodeVisualID(View containerView, EObject domainElement) {
+ String domainType = registry.getNodeGraphicalType(domainElement, containerView.getType());
+ if (IGraphicalTypeRegistry.UNDEFINED_TYPE.equals(domainType)) {
+ return null; // undefined
+ }
+ return domainType;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getLinkWithClassVisualID(EObject domainElement) {
+ String domainType = registry.getEdgeGraphicalType(domainElement);
+ if (IGraphicalTypeRegistry.UNDEFINED_TYPE.equals(domainType)) {
+ return null; // undefined
+ }
+ return domainType;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/factory/RequirementDiagramViewFactory.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/factory/RequirementDiagramViewFactory.java
new file mode 100755
index 0000000..90a8202
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/factory/RequirementDiagramViewFactory.java
@@ -0,0 +1,26 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST- Initial API and implementation
+ * Nizar GUEDIDI (CEA LIST)- modification
+ *
+ ****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.factory;
+
+import org.eclipse.gmf.runtime.diagram.ui.view.factories.DiagramViewFactory;
+import org.eclipse.gmf.runtime.notation.MeasurementUnit;
+
+public class RequirementDiagramViewFactory extends DiagramViewFactory {
+
+ @Override
+ protected MeasurementUnit getMeasurementUnit() {
+ return MeasurementUnit.PIXEL_LITERAL;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/part/RequirementDiagramEditor.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/part/RequirementDiagramEditor.java
new file mode 100755
index 0000000..cad1483
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/part/RequirementDiagramEditor.java
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nizar GUEDIDI (CEA LIST) - Initial API and implementation
+ /*****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.part;
+
+import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.sysml.diagram.requirement.Activator;
+
+/**
+ * Diagram editor that extends the UMLDiagramEditor editor.
+ */
+public class RequirementDiagramEditor extends org.eclipse.papyrus.uml.diagram.clazz.part.UMLDiagramEditor {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getContributorId() {
+ return Activator.PLUGIN_ID;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected PreferencesHint getPreferencesHint() {
+ return Activator.DIAGRAM_PREFERENCES_HINT;
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param servicesRegistry
+ * registry to find services (label providers, editing domain, etc.)
+ * @param diagram
+ * edited diagram
+ * @throws ServiceException
+ * exception thrown ni case of issue during initialization
+ */
+ public RequirementDiagramEditor(ServicesRegistry servicesRegistry, Diagram diagram) throws ServiceException {
+ super(servicesRegistry, diagram);
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/preferences/AbstractionPreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/preferences/AbstractionPreferencePage.java
new file mode 100755
index 0000000..0767723
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/preferences/AbstractionPreferencePage.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST- Initial API and implementation
+ * Nizar GUEDIDI (CEA LIST)- modification
+ *
+ ****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.sysml.diagram.requirement.provider.ElementTypes;
+
+public class AbstractionPreferencePage extends RequirementDiagramLinkPreferencePage {
+
+ /** Constant key to access preferences */
+ protected static String prefKey = ElementTypes.DIAGRAM_ID + "_Abstraction"; //$NON-NLS-1$
+
+ /** Default constructor */
+ public AbstractionPreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_Abstraction"); //$NON-NLS-1$
+ }
+
+ /**
+ * Initialize defaults using a specified {@link IPreferenceStore}
+ *
+ * @param store
+ * the preference store.
+ */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ // End of user code
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/preferences/CommentPreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/preferences/CommentPreferencePage.java
new file mode 100755
index 0000000..5ba3aaa
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/preferences/CommentPreferencePage.java
@@ -0,0 +1,45 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST- Initial API and implementation
+ * Nizar GUEDIDI (CEA LIST)- modification
+ *
+ ****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.sysml.diagram.requirement.provider.ElementTypes;
+
+public class CommentPreferencePage extends RequirementDiagramNodePreferencePage {
+
+ /** Constant key to access preferences */
+ protected static String prefKey = ElementTypes.DIAGRAM_ID + "_Comment"; //$NON-NLS-1$
+
+
+ /** Default constructor */
+ public CommentPreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_Comment"); //$NON-NLS-1$
+ }
+
+ /**
+ * Initialize defaults using a specified {@link IPreferenceStore}
+ *
+ * @param store
+ * the preference store.
+ */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ // End of user code
+
+ }
+
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/preferences/ConstraintPreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/preferences/ConstraintPreferencePage.java
new file mode 100755
index 0000000..23f9610
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/preferences/ConstraintPreferencePage.java
@@ -0,0 +1,45 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST- Initial API and implementation
+ * Nizar GUEDIDI (CEA LIST)- modification
+ *
+ ****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.sysml.diagram.requirement.provider.ElementTypes;
+
+public class ConstraintPreferencePage extends RequirementDiagramNodePreferencePage {
+
+ /** Constant key to access preferences */
+ protected static String prefKey = ElementTypes.DIAGRAM_ID + "_Constraint"; //$NON-NLS-1$
+
+
+ /** Default constructor */
+ public ConstraintPreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_Constraint"); //$NON-NLS-1$
+ }
+
+ /**
+ * Initialize defaults using a specified {@link IPreferenceStore}
+ *
+ * @param store
+ * the preference store.
+ */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ // End of user code
+
+ }
+
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/preferences/ContainmentLinkPreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/preferences/ContainmentLinkPreferencePage.java
new file mode 100755
index 0000000..3898510
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/preferences/ContainmentLinkPreferencePage.java
@@ -0,0 +1,44 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST- Initial API and implementation
+ * Nizar GUEDIDI (CEA LIST)- modification
+ *
+ ****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.sysml.diagram.requirement.provider.ElementTypes;
+
+public class ContainmentLinkPreferencePage extends RequirementDiagramLinkPreferencePage {
+
+ /** Constant key to access preferences */
+ protected static String prefKey = ElementTypes.DIAGRAM_ID + "_ContainmentLink"; //$NON-NLS-1$
+
+
+ /** Default constructor */
+ public ContainmentLinkPreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_ContainmentLink"); //$NON-NLS-1$
+ }
+
+ /**
+ * Initialize defaults using a specified {@link IPreferenceStore}
+ *
+ * @param store
+ * the preference store.
+ */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ // End of user code
+
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/preferences/DataTypePreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/preferences/DataTypePreferencePage.java
new file mode 100755
index 0000000..8983bb2
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/preferences/DataTypePreferencePage.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST- Initial API and implementation
+ * Nizar GUEDIDI (CEA LIST)- modification
+ *
+ ****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.sysml.diagram.requirement.provider.ElementTypes;
+
+public class DataTypePreferencePage extends RequirementDiagramNodePreferencePage {
+
+ /** Constant key to access preferences */
+ protected static String prefKey = ElementTypes.DIAGRAM_ID + "_DataType"; //$NON-NLS-1$
+
+ /** Default constructor */
+ public DataTypePreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_DataType"); //$NON-NLS-1$
+ }
+
+ /**
+ * Initialize defaults using a specified {@link IPreferenceStore}
+ *
+ * @param store
+ * the preference store.
+ */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ // End of user code
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/preferences/DependencyPreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/preferences/DependencyPreferencePage.java
new file mode 100755
index 0000000..6e63109
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/preferences/DependencyPreferencePage.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST- Initial API and implementation
+ * Nizar GUEDIDI (CEA LIST)- modification
+ *
+ ****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.sysml.diagram.requirement.provider.ElementTypes;
+
+public class DependencyPreferencePage extends RequirementDiagramLinkPreferencePage {
+
+ /** Constant key to access preferences */
+ protected static String prefKey = ElementTypes.DIAGRAM_ID + "_DependencyLink"; //$NON-NLS-1$
+
+ /** Default constructor */
+ public DependencyPreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_DependencyLink"); //$NON-NLS-1$
+ }
+
+ /**
+ * Initialize defaults using a specified {@link IPreferenceStore}
+ *
+ * @param store
+ * the preference store.
+ */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ // End of user code
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/preferences/EnumerationPreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/preferences/EnumerationPreferencePage.java
new file mode 100755
index 0000000..084d055
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/preferences/EnumerationPreferencePage.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST- Initial API and implementation
+ * Nizar GUEDIDI (CEA LIST)- modification
+ *
+ ****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.sysml.diagram.requirement.provider.ElementTypes;
+
+public class EnumerationPreferencePage extends RequirementDiagramNodePreferencePage {
+
+ /** Constant key to access preferences */
+ protected static String prefKey = ElementTypes.DIAGRAM_ID + "_Enumeration"; //$NON-NLS-1$
+
+ /** Default constructor */
+ public EnumerationPreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_Enumeration"); //$NON-NLS-1$
+ }
+
+ /**
+ * Initialize defaults using a specified {@link IPreferenceStore}
+ *
+ * @param store
+ * the preference store.
+ */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ // End of user code
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/preferences/InterfacePreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/preferences/InterfacePreferencePage.java
new file mode 100755
index 0000000..96d23f5
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/preferences/InterfacePreferencePage.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST- Initial API and implementation
+ * Nizar GUEDIDI (CEA LIST)- modification
+ *
+ ****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.sysml.diagram.requirement.provider.ElementTypes;
+
+public class InterfacePreferencePage extends RequirementDiagramNodePreferencePage {
+
+ /** Constant key to access preferences */
+ protected static String prefKey = ElementTypes.DIAGRAM_ID + "_Interface"; //$NON-NLS-1$
+
+ /** Default constructor */
+ public InterfacePreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_Interface"); //$NON-NLS-1$
+ }
+
+ /**
+ * Initialize defaults using a specified {@link IPreferenceStore}
+ *
+ * @param store
+ * the preference store.
+ */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ // End of user code
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/preferences/NamedElementPreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/preferences/NamedElementPreferencePage.java
new file mode 100755
index 0000000..6228737
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/preferences/NamedElementPreferencePage.java
@@ -0,0 +1,48 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST- Initial API and implementation
+ * Nizar GUEDIDI (CEA LIST)- modification
+ *
+ ****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.sysml.diagram.requirement.provider.ElementTypes;
+
+public class NamedElementPreferencePage extends RequirementDiagramNodePreferencePage {
+
+ /** Constant key to access preferences */
+ protected static String prefKey = ElementTypes.DIAGRAM_ID + "_DefaultNamedElement"; //$NON-NLS-1$
+
+
+ /** Default constructor */
+ public NamedElementPreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_DefaultNamedElement"); //$NON-NLS-1$
+ }
+
+ /**
+ * Initialize defaults using a specified {@link IPreferenceStore}
+ *
+ * @param store
+ * the preference store.
+ */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ // End of user code
+
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.WIDTH), 100);
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.HEIGHT), 50);
+ }
+
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/preferences/OperationPreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/preferences/OperationPreferencePage.java
new file mode 100755
index 0000000..7288117
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/preferences/OperationPreferencePage.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST- Initial API and implementation
+ * Nizar GUEDIDI (CEA LIST)- modification
+ *
+ ****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.sysml.diagram.requirement.provider.ElementTypes;
+
+public class OperationPreferencePage extends RequirementDiagramNodePreferencePage {
+
+ /** Constant key to access preferences */
+ protected static String prefKey = ElementTypes.DIAGRAM_ID + "_Operation"; //$NON-NLS-1$
+
+ /** Default constructor */
+ public OperationPreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_Operation"); //$NON-NLS-1$
+ }
+
+ /**
+ * Initialize defaults using a specified {@link IPreferenceStore}
+ *
+ * @param store
+ * the preference store.
+ */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ // End of user code
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/preferences/PackageImportPreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/preferences/PackageImportPreferencePage.java
new file mode 100755
index 0000000..89471a0
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/preferences/PackageImportPreferencePage.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST- Initial API and implementation
+ * Nizar GUEDIDI (CEA LIST)- modification
+ *
+ ****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.sysml.diagram.requirement.provider.ElementTypes;
+
+public class PackageImportPreferencePage extends RequirementDiagramLinkPreferencePage {
+
+ /** Constant key to access preferences */
+ protected static String prefKey = ElementTypes.DIAGRAM_ID + "_PackageImport"; //$NON-NLS-1$
+
+ /** Default constructor */
+ public PackageImportPreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_PackageImport"); //$NON-NLS-1$
+ }
+
+ /**
+ * Initialize defaults using a specified {@link IPreferenceStore}
+ *
+ * @param store
+ * the preference store.
+ */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ // End of user code
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/preferences/PackagePreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/preferences/PackagePreferencePage.java
new file mode 100755
index 0000000..4878080
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/preferences/PackagePreferencePage.java
@@ -0,0 +1,103 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST- Initial API and implementation
+ * Nizar GUEDIDI (CEA LIST)- modification
+ *
+ ****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.preferences;
+
+import java.util.Collections;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.sysml.diagram.requirement.provider.ElementTypes;
+
+public class PackagePreferencePage extends RequirementDiagramNodePreferencePage {
+
+ /** Constant key to access preferences */
+ protected static String prefKey = ElementTypes.DIAGRAM_ID + "_Package"; //$NON-NLS-1$
+
+ /** The compartments default visibility for preferences */
+ public static final Map<String, Boolean> compartmentDefaultVisibilityMap;
+
+ /** The compartment titles default visibility for preferences */
+ public static final Map<String, Boolean> compartmentTitleDefaultVisibilityMap;
+
+ /** Static attribute initialization */
+ static {
+ compartmentDefaultVisibilityMap = new LinkedHashMap<String, Boolean>();
+ compartmentDefaultVisibilityMap.put("PackageableElementCompartment", Boolean.TRUE); //$NON-NLS-1$
+
+ compartmentTitleDefaultVisibilityMap = new LinkedHashMap<String, Boolean>();
+ compartmentTitleDefaultVisibilityMap.put("PackageableElementCompartment", Boolean.TRUE); //$NON-NLS-1$
+
+
+ // Start of user code custom static initializations
+ // End of user code
+
+ Collections.unmodifiableMap(compartmentDefaultVisibilityMap);
+ Collections.unmodifiableMap(compartmentTitleDefaultVisibilityMap);
+ }
+
+ /** Default constructor */
+ public PackagePreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_Package"); //$NON-NLS-1$
+ }
+
+ /**
+ * Initialize defaults using a specified {@link IPreferenceStore}
+ *
+ * @param store
+ * the preference store.
+ */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ // End of user code
+
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.WIDTH), 200);
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.HEIGHT), 100);
+ // Initialize default visibility for compartments in preference page.
+ for (String compartmentName : compartmentDefaultVisibilityMap.keySet()) {
+ String showCompartmentKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_VISIBILITY);
+ store.setDefault(showCompartmentKey, compartmentDefaultVisibilityMap.get(compartmentName));
+ }
+
+ // Initialize default title visibility for compartments in preference page.
+ for (String compartmentName : compartmentTitleDefaultVisibilityMap.keySet()) {
+ String showCompartmentTitleKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_NAME_VISIBILITY);
+ store.setDefault(showCompartmentTitleKey, compartmentTitleDefaultVisibilityMap.get(compartmentName));
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void initializeCompartmentNamesList() {
+ for (String name : compartmentDefaultVisibilityMap.keySet()) {
+ this.compartmentNamesList.add(name);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void initializeCompartmentTitlesList() {
+ for (String name : compartmentTitleDefaultVisibilityMap.keySet()) {
+ this.compartmentTitlesList.add(name);
+ }
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/preferences/PrimitiveTypePreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/preferences/PrimitiveTypePreferencePage.java
new file mode 100755
index 0000000..5caa287
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/preferences/PrimitiveTypePreferencePage.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST- Initial API and implementation
+ * Nizar GUEDIDI (CEA LIST)- modification
+ *
+ ****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.sysml.diagram.requirement.provider.ElementTypes;
+
+public class PrimitiveTypePreferencePage extends RequirementDiagramNodePreferencePage {
+
+ /** Constant key to access preferences */
+ protected static String prefKey = ElementTypes.DIAGRAM_ID + "_PrimitiveType"; //$NON-NLS-1$
+
+ /** Default constructor */
+ public PrimitiveTypePreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_PrimitiveType"); //$NON-NLS-1$
+ }
+
+ /**
+ * Initialize defaults using a specified {@link IPreferenceStore}
+ *
+ * @param store
+ * the preference store.
+ */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ // End of user code
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/preferences/PropertyPreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/preferences/PropertyPreferencePage.java
new file mode 100755
index 0000000..254b22a
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/preferences/PropertyPreferencePage.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST- Initial API and implementation
+ * Nizar GUEDIDI (CEA LIST)- modification
+ *
+ ****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.sysml.diagram.requirement.provider.ElementTypes;
+
+public class PropertyPreferencePage extends RequirementDiagramNodePreferencePage {
+
+ /** Constant key to access preferences */
+ protected static String prefKey = ElementTypes.DIAGRAM_ID + "_Property"; //$NON-NLS-1$
+
+ /** Default constructor */
+ public PropertyPreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_Property"); //$NON-NLS-1$
+ }
+
+ /**
+ * Initialize defaults using a specified {@link IPreferenceStore}
+ *
+ * @param store
+ * the preference store.
+ */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ // End of user code
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/preferences/RealizationPreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/preferences/RealizationPreferencePage.java
new file mode 100755
index 0000000..782d4b7
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/preferences/RealizationPreferencePage.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST- Initial API and implementation
+ * Nizar GUEDIDI (CEA LIST)- modification
+ *
+ ****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.sysml.diagram.requirement.provider.ElementTypes;
+
+public class RealizationPreferencePage extends RequirementDiagramLinkPreferencePage {
+
+ /** Constant key to access preferences */
+ protected static String prefKey = ElementTypes.DIAGRAM_ID + "_Realization"; //$NON-NLS-1$
+
+ /** Default constructor */
+ public RealizationPreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_Realization"); //$NON-NLS-1$
+ }
+
+ /**
+ * Initialize defaults using a specified {@link IPreferenceStore}
+ *
+ * @param store
+ * the preference store.
+ */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ // End of user code
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/preferences/ReceptionPreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/preferences/ReceptionPreferencePage.java
new file mode 100755
index 0000000..53cb8ba
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/preferences/ReceptionPreferencePage.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST- Initial API and implementation
+ * Nizar GUEDIDI (CEA LIST)- modification
+ *
+ ****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.sysml.diagram.requirement.provider.ElementTypes;
+
+public class ReceptionPreferencePage extends RequirementDiagramNodePreferencePage {
+
+ /** Constant key to access preferences */
+ protected static String prefKey = ElementTypes.DIAGRAM_ID + "_Reception"; //$NON-NLS-1$
+
+ /** Default constructor */
+ public ReceptionPreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_Reception"); //$NON-NLS-1$
+ }
+
+ /**
+ * Initialize defaults using a specified {@link IPreferenceStore}
+ *
+ * @param store
+ * the preference store.
+ */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ // End of user code
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/preferences/RequirementDiagramGeneralPreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/preferences/RequirementDiagramGeneralPreferencePage.java
new file mode 100755
index 0000000..4852b83
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/preferences/RequirementDiagramGeneralPreferencePage.java
@@ -0,0 +1,33 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST- Initial API and implementation
+ * Nizar GUEDIDI (CEA LIST)- modification
+ *
+ ****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.preferences;
+
+import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.DiagramPreferencePage;
+import org.eclipse.papyrus.sysml.diagram.requirement.Activator;
+import org.eclipse.papyrus.sysml.diagram.requirement.provider.ElementTypes;
+
+public class RequirementDiagramGeneralPreferencePage extends DiagramPreferencePage {
+
+ /**
+ *
+ * Constructor.
+ *
+ * @G
+ */
+ public RequirementDiagramGeneralPreferencePage() {
+ setPreferenceStore(Activator.getInstance().getPreferenceStore());
+ setPreferenceKey(ElementTypes.DIAGRAM_ID);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/preferences/RequirementDiagramLinkPreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/preferences/RequirementDiagramLinkPreferencePage.java
new file mode 100755
index 0000000..543a1ff
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/preferences/RequirementDiagramLinkPreferencePage.java
@@ -0,0 +1,74 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST- Initial API and implementation
+ * Nizar GUEDIDI (CEA LIST)- modification
+ *
+ ****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.preferences;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.TreeMap;
+
+import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusLinkPreferencePage;
+import org.eclipse.papyrus.infra.gmfdiag.preferences.ui.OrderedLabelGroup;
+import org.eclipse.papyrus.sysml.diagram.requirement.Activator;
+import org.eclipse.swt.widgets.Composite;
+
+public class RequirementDiagramLinkPreferencePage extends AbstractPapyrusLinkPreferencePage {
+
+ /** The list of label names for this link */
+ protected List<String> labelsList;
+
+ /** Constructor */
+ public RequirementDiagramLinkPreferencePage() {
+ labelsList = new ArrayList<String>();
+ initializeLabelsList();
+ Collections.unmodifiableList(labelsList);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void createPageContents(Composite parent) {
+ super.createPageContents(parent);
+
+ // Add label visibility group
+ if (!labelsList.isEmpty()) {
+ OrderedLabelGroup compartmentGroup = new OrderedLabelGroup(parent, getPreferenceKey(), this, labelsList);
+ addPreferenceGroup(compartmentGroup);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getBundleId() {
+ return Activator.PLUGIN_ID;
+ }
+
+ /** Initialize the list containing names of labels. */
+ protected void initializeLabelsList() {
+ // Implemented by subclasses.
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected final TreeMap<String, String> getLabelRole() {
+ return new TreeMap<String, String>();
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/preferences/RequirementDiagramNodePreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/preferences/RequirementDiagramNodePreferencePage.java
new file mode 100755
index 0000000..2585930
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/preferences/RequirementDiagramNodePreferencePage.java
@@ -0,0 +1,120 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST- Initial API and implementation
+ * Nizar GUEDIDI (CEA LIST)- modification
+ *
+ ****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.preferences;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.TreeMap;
+
+import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusNodePreferencePage;
+import org.eclipse.papyrus.infra.gmfdiag.preferences.ui.OrderedCompartmentGroup;
+import org.eclipse.papyrus.infra.gmfdiag.preferences.ui.OrderedLabelGroup;
+import org.eclipse.papyrus.sysml.diagram.requirement.Activator;
+import org.eclipse.swt.widgets.Composite;
+
+public class RequirementDiagramNodePreferencePage extends AbstractPapyrusNodePreferencePage {
+
+ /** The list owning the names of compartments */
+ protected List<String> compartmentNamesList;
+
+ /** The list owning the names of compartment that have a title */
+ protected List<String> compartmentTitlesList;
+
+ /** The list of label names for this node */
+ protected List<String> labelsList;
+
+ /** Constructor */
+ public RequirementDiagramNodePreferencePage() {
+ this.labelsList = new ArrayList<String>();
+ this.compartmentNamesList = new ArrayList<String>();
+ this.compartmentTitlesList = new ArrayList<String>();
+
+ initializeLabelsList();
+ initializeCompartmentNamesList();
+ initializeCompartmentTitlesList();
+
+ Collections.unmodifiableList(labelsList);
+ Collections.unmodifiableList(compartmentNamesList);
+ Collections.unmodifiableList(compartmentTitlesList);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void createPageContents(Composite parent) {
+ super.createPageContents(parent);
+
+ // Add compartments visibility group
+ if (!compartmentNamesList.isEmpty()) {
+ OrderedCompartmentGroup compartmentGroup = new OrderedCompartmentGroup(parent, getPreferenceKey(), this, compartmentNamesList, compartmentTitlesList, getPreferenceStore());
+ addPreferenceGroup(compartmentGroup);
+ }
+
+ // Add label visibility group
+ if (!labelsList.isEmpty()) {
+ OrderedLabelGroup compartmentGroup = new OrderedLabelGroup(parent, getPreferenceKey(), this, labelsList);
+ addPreferenceGroup(compartmentGroup);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getBundleId() {
+ return Activator.PLUGIN_ID;
+ }
+
+ /** Initialize the list containing names of labels. */
+ protected void initializeLabelsList() {
+ // Implemented by subclasses.
+ }
+
+ /** Initialize the list containing the names of compartments. */
+ protected void initializeCompartmentNamesList() {
+ // Implemented by subclasses.
+ }
+
+ /** Initialize the list containing the names of compartment that have titles. */
+ protected void initializeCompartmentTitlesList() {
+ // Implemented by subclasses.
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected final TreeMap<String, String> getLabelRole() {
+ return new TreeMap<String, String>();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected final TreeMap<String, Boolean> getCompartmentTitleVisibilityPreferences() {
+ return new TreeMap<String, Boolean>();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected final void initializeCompartmentsList() {
+ compartmentsList = Collections.emptyList();
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/preferences/RequirementDiagramPreferenceInitializer.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/preferences/RequirementDiagramPreferenceInitializer.java
new file mode 100755
index 0000000..70a3ba9
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/preferences/RequirementDiagramPreferenceInitializer.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST- Initial API and implementation
+ * Nizar GUEDIDI (CEA LIST)- modification
+ *
+ ****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.preferences;
+
+import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.sysml.diagram.requirement.Activator;
+
+public class RequirementDiagramPreferenceInitializer extends AbstractPreferenceInitializer {
+
+ protected IPreferenceStore getPreferenceStore() {
+ return Activator.getInstance().getPreferenceStore();
+ }
+
+ @Override
+ public void initializeDefaultPreferences() {
+ IPreferenceStore store = getPreferenceStore();
+
+ org.eclipse.papyrus.sysml.diagram.requirement.preferences.PackagePreferencePage.initDefaults(store);
+ org.eclipse.papyrus.sysml.diagram.requirement.preferences.NamedElementPreferencePage.initDefaults(store);
+ org.eclipse.papyrus.sysml.diagram.requirement.preferences.CommentPreferencePage.initDefaults(store);
+ org.eclipse.papyrus.sysml.diagram.requirement.preferences.ConstraintPreferencePage.initDefaults(store);
+ org.eclipse.papyrus.sysml.diagram.requirement.preferences.AbstractionPreferencePage.initDefaults(store);
+ org.eclipse.papyrus.sysml.diagram.requirement.preferences.ContainmentLinkPreferencePage.initDefaults(store);
+ org.eclipse.papyrus.sysml.diagram.requirement.preferences.DependencyPreferencePage.initDefaults(store);
+ org.eclipse.papyrus.sysml.diagram.requirement.preferences.RealizationPreferencePage.initDefaults(store);
+ org.eclipse.papyrus.sysml.diagram.requirement.preferences.PackageImportPreferencePage.initDefaults(store);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/preferences/SignalPreferencePage.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/preferences/SignalPreferencePage.java
new file mode 100755
index 0000000..516470f
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/preferences/SignalPreferencePage.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST- Initial API and implementation
+ * Nizar GUEDIDI (CEA LIST)- modification
+ *
+ ****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.sysml.diagram.requirement.provider.ElementTypes;
+
+public class SignalPreferencePage extends RequirementDiagramNodePreferencePage {
+
+ /** Constant key to access preferences */
+ protected static String prefKey = ElementTypes.DIAGRAM_ID + "_Signal"; //$NON-NLS-1$
+
+ /** Default constructor */
+ public SignalPreferencePage() {
+ super();
+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_Signal"); //$NON-NLS-1$
+ }
+
+ /**
+ * Initialize defaults using a specified {@link IPreferenceStore}
+ *
+ * @param store
+ * the preference store.
+ */
+ public static void initDefaults(IPreferenceStore store) {
+ // Start of user code custom default initializations
+ // End of user code
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/provider/ElementTypes.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/provider/ElementTypes.java
new file mode 100755
index 0000000..f925c69
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/provider/ElementTypes.java
@@ -0,0 +1,186 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST- Initial API and implementation
+ * Nizar GUEDIDI (CEA LIST)- modification
+ *
+ ****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.provider;
+
+import org.eclipse.gmf.runtime.emf.type.core.AbstractElementTypeEnumerator;
+import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AbstractionNameEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AppliedStereotypeAbstractionEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AppliedStereotypeDependencyEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AppliedStereotypePackageImportEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AppliedStereotypeRealizationEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassAttributeCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassAttributeCompartmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassNameEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassNameEditPartCN;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassNestedClassifierCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassNestedClassifierCompartmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassOperationCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassOperationCompartmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.CommentBodyEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.CommentBodyEditPartCN;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ConstraintBodyEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ConstraintBodyEditPartCN;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ConstraintNameEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ConstraintNameEditPartCN;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.DefaultNamedElementNameEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.DependencyNameEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PackageNameEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PackageNameEditPartCN;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PackagePackageableElementCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PackagePackageableElementCompartmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.RealizationNameEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+
+public class ElementTypes extends AbstractElementTypeEnumerator {
+
+ /** ********************************************************* */
+ /** SysML Requirement Diagram specific elements **************** */
+ /** ********************************************************* */
+
+ /** SysML Requirement Diagram :: Diagram */
+ public static final String DIAGRAM_ID = "RequirementDiagram"; //$NON-NLS-1$
+
+
+
+
+ /** ********************************************************* */
+ /** SysML Requirement Diagram - ClassDiagram related elements */
+ /** ********************************************************* */
+
+
+ /** ClassDiagram :: PACKAGE */
+ public static final IHintedType PACKAGE = (IHintedType) UMLElementTypes.Package_Shape;
+
+ public static final String PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT = PackagePackageableElementCompartmentEditPart.VISUAL_ID;
+
+ public static final String PACKAGE_LABEL_NAME_HINT = PackageNameEditPart.VISUAL_ID;
+
+ /** ClassDiagram :: PACKAGE_CN */
+ public static final IHintedType PACKAGE_CN = (IHintedType) UMLElementTypes.Package_Shape_CN;
+
+ public static final String PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT = PackagePackageableElementCompartmentEditPartCN.VISUAL_ID;
+
+ public static final String PACKAGE_CN_LABEL_NAME_HINT = PackageNameEditPartCN.VISUAL_ID;
+
+ /** ClassDiagram :: CLASS */
+ public static final IHintedType CLASS = (IHintedType) UMLElementTypes.Class_Shape;
+
+ public static final String CLASS_COMPARTMENT_ATTRIBUTE_HINT = ClassAttributeCompartmentEditPart.VISUAL_ID;
+
+ public static final String CLASS_COMPARTMENT_OPERATION_HINT = ClassOperationCompartmentEditPart.VISUAL_ID;
+
+ public static final String CLASS_COMPARTMENT_NESTED_CLASSIFIER_HINT = ClassNestedClassifierCompartmentEditPart.VISUAL_ID;
+
+ public static final String CLASS_LABEL_NAME_HINT = ClassNameEditPart.VISUAL_ID;
+
+ /** ClassDiagram :: CLASS_CN */
+ public static final IHintedType CLASS_CN = (IHintedType) UMLElementTypes.Class_Shape_CN;
+
+ public static final String CLASS_CN_COMPARTMENT_ATTRIBUTE_HINT = ClassAttributeCompartmentEditPartCN.VISUAL_ID;
+
+ public static final String CLASS_CN_COMPARTMENT_OPERATION_HINT = ClassOperationCompartmentEditPartCN.VISUAL_ID;
+
+ public static final String CLASS_CN_COMPARTMENT_NESTED_CLASSIFIER_HINT = ClassNestedClassifierCompartmentEditPartCN.VISUAL_ID;
+
+ public static final String CLASS_CN_LABEL_NAME_HINT = ClassNameEditPartCN.VISUAL_ID;
+
+ /** ClassDiagram :: DEFAULT_NAMED_ELEMENT */
+ public static final IHintedType DEFAULT_NAMED_ELEMENT = (IHintedType) UMLElementTypes.NamedElement_DefaultShape;
+
+ public static final String DEFAULT_NAMED_ELEMENT_LABEL_NAME_HINT = DefaultNamedElementNameEditPart.VISUAL_ID;
+
+
+ /** ClassDiagram :: COMMENT */
+ public static final IHintedType COMMENT = (IHintedType) UMLElementTypes.Comment_Shape;
+
+ public static final String COMMENT_LABEL_BODY_HINT = CommentBodyEditPart.VISUAL_ID;
+
+ /** ClassDiagram :: COMMENT_CN */
+ public static final IHintedType COMMENT_CN = (IHintedType) UMLElementTypes.Comment_Shape_CN;
+
+ public static final String COMMENT_CN_LABEL_BODY_HINT = CommentBodyEditPartCN.VISUAL_ID;
+
+ /** ClassDiagram :: CONSTRAINT */
+ public static final IHintedType CONSTRAINT = (IHintedType) UMLElementTypes.Constraint_PackagedElementShape;
+
+ public static final String CONSTRAINT_LABEL_NAME_HINT = ConstraintNameEditPart.VISUAL_ID;
+
+ public static final String CONSTRAINT_LABEL_BODY_HINT = ConstraintBodyEditPart.VISUAL_ID;
+
+ /** ClassDiagram :: CONSTRAINT_CN */
+ public static final IHintedType CONSTRAINT_CN = (IHintedType) UMLElementTypes.Constraint_PackagedElementShape_CN;
+
+ public static final String CONSTRAINT_CN_LABEL_NAME_HINT = ConstraintNameEditPartCN.VISUAL_ID;
+
+ public static final String CONSTRAINT_CN_LABEL_BODY_HINT = ConstraintBodyEditPartCN.VISUAL_ID;
+
+
+ /** ClassDiagram :: ABSTRACTION */
+ public static final IHintedType ABSTRACTION = (IHintedType) UMLElementTypes.Abstraction_Edge;
+
+ public static final String ABSTRACTION_LABEL_NAME_HINT = AbstractionNameEditPart.VISUAL_ID;
+
+ public static final String ABSTRACTION_LABEL_APPLIED_STEREOTYPE_HINT = AppliedStereotypeAbstractionEditPart.VISUAL_ID;
+
+ /** ClassDiagram :: CONTAINMENT_LINK */
+ public static final IHintedType CONTAINMENT_LINK = (IHintedType) UMLElementTypes.Element_ContainmentEdge;
+
+
+ /** ClassDiagram :: DEPENDENCY */
+ public static final IHintedType DEPENDENCY = (IHintedType) UMLElementTypes.Dependency_Edge;
+
+ public static final String DEPENDENCY_LABEL_NAME_HINT = DependencyNameEditPart.VISUAL_ID;
+
+ public static final String DEPENDENCY_LABEL_APPLIED_STEREOTYPE_HINT = AppliedStereotypeDependencyEditPart.VISUAL_ID;
+
+ /** ClassDiagram :: COMMENT_ANNOTATED_ELEMENT */
+ public static final IHintedType COMMENT_ANNOTATED_ELEMENT = (IHintedType) UMLElementTypes.Comment_AnnotatedElementEdge;
+
+ /** ClassDiagram :: CONSTRAINT_CONSTRAINED_ELEMENT */
+ public static final IHintedType CONSTRAINT_CONSTRAINED_ELEMENT = (IHintedType) UMLElementTypes.Constraint_ConstrainedElementEdge;
+
+ /** ClassDiagram :: REALIZATION */
+ public static final IHintedType REALIZATION = (IHintedType) UMLElementTypes.Realization_Edge;
+
+ public static final String REALIZATION_LABEL_APPLIED_STEREOTYPE_HINT = AppliedStereotypeRealizationEditPart.VISUAL_ID;
+
+ public static final String REALIZATION_LABEL_NAME_HINT = RealizationNameEditPart.VISUAL_ID;
+
+ /** ClassDiagram :: PACKAGE_IMPORT */
+ public static final IHintedType PACKAGE_IMPORT = (IHintedType) UMLElementTypes.PackageImport_Edge;
+
+ public static final String PACKAGE_IMPORT_LABEL_APPLIED_STEREOTYPE_HINT = AppliedStereotypePackageImportEditPart.VISUAL_ID;
+
+ /** ClassDiagram :: ChildLabelNodes */
+ public static final IHintedType CLASS_PROPERTY_CLN = (IHintedType) UMLElementTypes.Property_ClassAttributeLabel;
+
+ public static final IHintedType CLASS_RECEPTION_CLN = (IHintedType) UMLElementTypes.Reception_ReceptionLabel;
+
+ public static final IHintedType CLASS_OPERATION_CLN = (IHintedType) UMLElementTypes.Operation_ClassOperationLabel;
+
+ public static final IHintedType CLASS_CLASS_CLN = (IHintedType) UMLElementTypes.Class_ClassNestedClassifierLabel;
+
+ public static final IHintedType CLASS_INTERFACE_CLN = (IHintedType) UMLElementTypes.Interface_ClassNestedClassifierLabel;
+
+ public static final IHintedType CLASS_ENUMERATION_CLN = (IHintedType) UMLElementTypes.Enumeration_ClassNestedClassifierLabel;
+
+ public static final IHintedType CLASS_PRIMITIVE_TYPE_CLN = (IHintedType) UMLElementTypes.PrimitiveType_ClassNestedClassifierLabel;
+
+ public static final IHintedType CLASS_DATA_TYPE_CLN = (IHintedType) UMLElementTypes.DataType_ClassNestedClassifierLabel;
+
+ public static final IHintedType CLASS_SIGNAL_CLN = (IHintedType) UMLElementTypes.Signal_ClassNestedClassifierLabel;
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/provider/GraphicalTypeRegistry.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/provider/GraphicalTypeRegistry.java
new file mode 100755
index 0000000..4ea87a2
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/provider/GraphicalTypeRegistry.java
@@ -0,0 +1,322 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST- Initial API and implementation
+ * Nizar GUEDIDI (CEA LIST)- modification
+ *
+ ****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.provider;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
+
+/**
+ * <pre>
+ * This class provides graphical type id (used as View type) for
+ * domain element according to their actual or expected graphical
+ * container type.
+ * </pre>
+ */
+public class GraphicalTypeRegistry implements IGraphicalTypeRegistry {
+
+ /** A Set containing all known node graphical types */
+ protected Set<String> knownNodes = new HashSet<String>();
+
+ /** A Set containing all known edge graphical types */
+ protected Set<String> knownEdges = new HashSet<String>();
+
+ /** Default constructor */
+ public GraphicalTypeRegistry() {
+
+ // Fill known edges set
+ knownEdges.add(ElementTypes.ABSTRACTION.getSemanticHint());
+ knownEdges.add(ElementTypes.DEPENDENCY.getSemanticHint());
+ knownEdges.add(ElementTypes.REALIZATION.getSemanticHint());
+ knownEdges.add(ElementTypes.PACKAGE_IMPORT.getSemanticHint());
+ knownEdges.add(ElementTypes.COMMENT_ANNOTATED_ELEMENT.getSemanticHint());
+ knownEdges.add(ElementTypes.CONSTRAINT_CONSTRAINED_ELEMENT.getSemanticHint());
+
+ // Fill known nodes set (primary nodes)
+ knownNodes.add(ElementTypes.PACKAGE.getSemanticHint());
+ knownNodes.add(ElementTypes.PACKAGE_CN.getSemanticHint());
+ knownNodes.add(ElementTypes.CLASS.getSemanticHint());
+ knownNodes.add(ElementTypes.CLASS_CN.getSemanticHint());
+ knownNodes.add(ElementTypes.DEFAULT_NAMED_ELEMENT.getSemanticHint());
+ knownNodes.add(ElementTypes.COMMENT.getSemanticHint());
+ knownNodes.add(ElementTypes.COMMENT_CN.getSemanticHint());
+ knownNodes.add(ElementTypes.CONSTRAINT.getSemanticHint());
+ knownNodes.add(ElementTypes.CONSTRAINT_CN.getSemanticHint());
+
+ // Fill known nodes set (child label nodes)
+ knownNodes.add(ElementTypes.CLASS_PROPERTY_CLN.getSemanticHint());
+ knownNodes.add(ElementTypes.CLASS_RECEPTION_CLN.getSemanticHint());
+ knownNodes.add(ElementTypes.CLASS_OPERATION_CLN.getSemanticHint());
+ knownNodes.add(ElementTypes.CLASS_CLASS_CLN.getSemanticHint());
+ knownNodes.add(ElementTypes.CLASS_INTERFACE_CLN.getSemanticHint());
+ knownNodes.add(ElementTypes.CLASS_ENUMERATION_CLN.getSemanticHint());
+ knownNodes.add(ElementTypes.CLASS_PRIMITIVE_TYPE_CLN.getSemanticHint());
+ knownNodes.add(ElementTypes.CLASS_DATA_TYPE_CLN.getSemanticHint());
+ knownNodes.add(ElementTypes.CLASS_SIGNAL_CLN.getSemanticHint());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getEdgeGraphicalType(EObject domainElement) {
+
+ String graphicalType = UNDEFINED_TYPE;
+ if (domainElement == null) {
+ return UNDEFINED_TYPE;
+ }
+ if (domainElement instanceof org.eclipse.uml2.uml.Abstraction) {
+ graphicalType = ElementTypes.ABSTRACTION.getSemanticHint();
+ }
+ if (domainElement instanceof org.eclipse.uml2.uml.Dependency) {
+ graphicalType = ElementTypes.DEPENDENCY.getSemanticHint();
+ }
+ if (domainElement instanceof org.eclipse.uml2.uml.Realization) {
+ graphicalType = ElementTypes.REALIZATION.getSemanticHint();
+ }
+ if (domainElement instanceof org.eclipse.uml2.uml.PackageImport) {
+ graphicalType = ElementTypes.PACKAGE_IMPORT.getSemanticHint();
+ }
+ return graphicalType;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getEdgeGraphicalType(IElementType elementType) {
+ if (elementType instanceof IHintedType) {
+ String semanticHint = ((IHintedType) elementType).getSemanticHint();
+ return getEdgeGraphicalType(semanticHint);
+ }
+
+ return UNDEFINED_TYPE;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getEdgeGraphicalType(String proposedType) {
+ if (isKnownEdgeType(proposedType)) {
+ return proposedType;
+ }
+
+ return UNDEFINED_TYPE;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getNodeGraphicalType(EObject domainElement, String containerType) {
+
+ String graphicalType = UNDEFINED_TYPE;
+ if ((containerType == null) || (domainElement == null)) {
+ return UNDEFINED_TYPE;
+ }
+
+ if (domainElement instanceof org.eclipse.uml2.uml.Package) {
+ if (ElementTypes.DIAGRAM_ID.equals(containerType)) { // Package TopNode
+ graphicalType = ElementTypes.PACKAGE.getSemanticHint();
+ }
+ if (ElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Package ChildNode
+ graphicalType = ElementTypes.PACKAGE_CN.getSemanticHint();
+ }
+ if (ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Package ChildNode
+ graphicalType = ElementTypes.PACKAGE_CN.getSemanticHint();
+ }
+
+ }
+
+ if (domainElement instanceof org.eclipse.uml2.uml.Class) {
+ if (ElementTypes.DIAGRAM_ID.equals(containerType)) { // Class TopNode
+ graphicalType = ElementTypes.CLASS.getSemanticHint();
+ }
+ if (ElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Class ChildNode
+ graphicalType = ElementTypes.CLASS_CN.getSemanticHint();
+ }
+ if (ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Class ChildNode
+ graphicalType = ElementTypes.CLASS_CN.getSemanticHint();
+ }
+
+ if (ElementTypes.CLASS_CN_COMPARTMENT_NESTED_CLASSIFIER_HINT.equals(containerType)) { // Class ChildLabelNode
+ graphicalType = ElementTypes.CLASS_CLASS_CLN.getSemanticHint();
+ }
+ if (ElementTypes.CLASS_COMPARTMENT_NESTED_CLASSIFIER_HINT.equals(containerType)) { // Class ChildLabelNode
+ graphicalType = ElementTypes.CLASS_CLASS_CLN.getSemanticHint();
+ }
+ }
+
+ if (domainElement instanceof org.eclipse.uml2.uml.NamedElement) {
+ if (ElementTypes.DIAGRAM_ID.equals(containerType)) { // NamedElement TopNode
+ graphicalType = ElementTypes.DEFAULT_NAMED_ELEMENT.getSemanticHint();
+ }
+
+ }
+
+ if (domainElement instanceof org.eclipse.uml2.uml.Comment) {
+ if (ElementTypes.DIAGRAM_ID.equals(containerType)) { // Comment TopNode
+ graphicalType = ElementTypes.COMMENT.getSemanticHint();
+ }
+ if (ElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Comment ChildNode
+ graphicalType = ElementTypes.COMMENT_CN.getSemanticHint();
+ }
+ if (ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Comment ChildNode
+ graphicalType = ElementTypes.COMMENT_CN.getSemanticHint();
+ }
+
+ }
+
+ if (domainElement instanceof org.eclipse.uml2.uml.Constraint) {
+ if (ElementTypes.DIAGRAM_ID.equals(containerType)) { // Constraint TopNode
+ graphicalType = ElementTypes.CONSTRAINT.getSemanticHint();
+ }
+ if (ElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Constraint ChildNode
+ graphicalType = ElementTypes.CONSTRAINT_CN.getSemanticHint();
+ }
+ if (ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Constraint ChildNode
+ graphicalType = ElementTypes.CONSTRAINT_CN.getSemanticHint();
+ }
+
+ }
+
+ if (domainElement instanceof org.eclipse.uml2.uml.Property) {
+
+ if (ElementTypes.CLASS_COMPARTMENT_ATTRIBUTE_HINT.equals(containerType)) { // Property ChildLabelNode
+ graphicalType = ElementTypes.CLASS_PROPERTY_CLN.getSemanticHint();
+ }
+ if (ElementTypes.CLASS_CN_COMPARTMENT_ATTRIBUTE_HINT.equals(containerType)) { // Property ChildLabelNode
+ graphicalType = ElementTypes.CLASS_PROPERTY_CLN.getSemanticHint();
+ }
+ }
+
+ if (domainElement instanceof org.eclipse.uml2.uml.Reception) {
+
+ if (ElementTypes.CLASS_COMPARTMENT_OPERATION_HINT.equals(containerType)) { // Reception ChildLabelNode
+ graphicalType = ElementTypes.CLASS_RECEPTION_CLN.getSemanticHint();
+ }
+ if (ElementTypes.CLASS_CN_COMPARTMENT_OPERATION_HINT.equals(containerType)) { // Reception ChildLabelNode
+ graphicalType = ElementTypes.CLASS_RECEPTION_CLN.getSemanticHint();
+ }
+ }
+
+ if (domainElement instanceof org.eclipse.uml2.uml.Operation) {
+
+ if (ElementTypes.CLASS_COMPARTMENT_OPERATION_HINT.equals(containerType)) { // Operation ChildLabelNode
+ graphicalType = ElementTypes.CLASS_OPERATION_CLN.getSemanticHint();
+ }
+ if (ElementTypes.CLASS_CN_COMPARTMENT_OPERATION_HINT.equals(containerType)) { // Operation ChildLabelNode
+ graphicalType = ElementTypes.CLASS_OPERATION_CLN.getSemanticHint();
+ }
+ }
+
+ if (domainElement instanceof org.eclipse.uml2.uml.Interface) {
+
+ if (ElementTypes.CLASS_COMPARTMENT_NESTED_CLASSIFIER_HINT.equals(containerType)) { // Interface ChildLabelNode
+ graphicalType = ElementTypes.CLASS_INTERFACE_CLN.getSemanticHint();
+ }
+ if (ElementTypes.CLASS_CN_COMPARTMENT_NESTED_CLASSIFIER_HINT.equals(containerType)) { // Interface ChildLabelNode
+ graphicalType = ElementTypes.CLASS_INTERFACE_CLN.getSemanticHint();
+ }
+ }
+
+ if (domainElement instanceof org.eclipse.uml2.uml.Enumeration) {
+
+ if (ElementTypes.CLASS_CN_COMPARTMENT_NESTED_CLASSIFIER_HINT.equals(containerType)) { // Enumeration ChildLabelNode
+ graphicalType = ElementTypes.CLASS_ENUMERATION_CLN.getSemanticHint();
+ }
+ if (ElementTypes.CLASS_COMPARTMENT_NESTED_CLASSIFIER_HINT.equals(containerType)) { // Enumeration ChildLabelNode
+ graphicalType = ElementTypes.CLASS_ENUMERATION_CLN.getSemanticHint();
+ }
+ }
+
+ if (domainElement instanceof org.eclipse.uml2.uml.PrimitiveType) {
+
+ if (ElementTypes.CLASS_CN_COMPARTMENT_NESTED_CLASSIFIER_HINT.equals(containerType)) { // PrimitiveType ChildLabelNode
+ graphicalType = ElementTypes.CLASS_PRIMITIVE_TYPE_CLN.getSemanticHint();
+ }
+ if (ElementTypes.CLASS_COMPARTMENT_NESTED_CLASSIFIER_HINT.equals(containerType)) { // PrimitiveType ChildLabelNode
+ graphicalType = ElementTypes.CLASS_PRIMITIVE_TYPE_CLN.getSemanticHint();
+ }
+ }
+
+ if (domainElement instanceof org.eclipse.uml2.uml.DataType) {
+
+ if (ElementTypes.CLASS_CN_COMPARTMENT_NESTED_CLASSIFIER_HINT.equals(containerType)) { // DataType ChildLabelNode
+ graphicalType = ElementTypes.CLASS_DATA_TYPE_CLN.getSemanticHint();
+ }
+ if (ElementTypes.CLASS_COMPARTMENT_NESTED_CLASSIFIER_HINT.equals(containerType)) { // DataType ChildLabelNode
+ graphicalType = ElementTypes.CLASS_DATA_TYPE_CLN.getSemanticHint();
+ }
+ }
+
+ if (domainElement instanceof org.eclipse.uml2.uml.Signal) {
+
+ if (ElementTypes.CLASS_CN_COMPARTMENT_NESTED_CLASSIFIER_HINT.equals(containerType)) { // Signal ChildLabelNode
+ graphicalType = ElementTypes.CLASS_SIGNAL_CLN.getSemanticHint();
+ }
+ if (ElementTypes.CLASS_COMPARTMENT_NESTED_CLASSIFIER_HINT.equals(containerType)) { // Signal ChildLabelNode
+ graphicalType = ElementTypes.CLASS_SIGNAL_CLN.getSemanticHint();
+ }
+ }
+
+ return graphicalType;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getNodeGraphicalType(IElementType elementType, String containerType) {
+ if (elementType instanceof IHintedType) {
+ String semanticHint = ((IHintedType) elementType).getSemanticHint();
+ return getNodeGraphicalType(semanticHint, containerType);
+ }
+
+ return UNDEFINED_TYPE;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getNodeGraphicalType(String proposedType, String containerType) {
+ if (isKnownNodeType(proposedType)) {
+ return proposedType;
+ }
+
+ return UNDEFINED_TYPE;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean isKnownEdgeType(String type) {
+ return knownEdges.contains(type);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean isKnownNodeType(String type) {
+ return knownNodes.contains(type);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/provider/IGraphicalTypeRegistry.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/provider/IGraphicalTypeRegistry.java
new file mode 100755
index 0000000..24e23ee
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/provider/IGraphicalTypeRegistry.java
@@ -0,0 +1,123 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2015 CEA LIST, Christian W. Damus, and others.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST- Initial API and implementation
+ * Nizar GUEDIDI (CEA LIST)- modification
+ * Christian W. Damus - bug 477384
+ *
+ ****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.provider;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+
+/**
+ * This interface provides an API for accessing the local graphical type registry.
+ * This registry provides a graphical type for existing model elements.
+ *
+ * @deprecated Use the {@link org.eclipse.papyrus.gmf.diagram.common.provider.IGraphicalTypeRegistry} type, instead.
+ */
+@Deprecated
+public interface IGraphicalTypeRegistry extends org.eclipse.papyrus.gmf.diagram.common.provider.IGraphicalTypeRegistry {
+
+ /** Constant for undefined graphical type */
+ public static final String UNDEFINED_TYPE = "undefined_type";
+
+ /**
+ * Get a valid edge graphical type for the domain element.
+ *
+ * @param domainElement
+ * the domain element.
+ * @return the domain element graphical type.
+ */
+ @Override
+ public String getEdgeGraphicalType(EObject domainElement);
+
+ /**
+ * Get a valid edge graphical type for the element type.
+ *
+ * @param elementType
+ * the element type.
+ * @param containerType
+ * the type of the graphical owner of the domain element.
+ * @return the domain element graphical type.
+ */
+ @Override
+ public String getEdgeGraphicalType(IElementType elementType);
+
+ /**
+ * Get a valid edge graphical type for the proposed type.
+ *
+ * @param proposedType
+ * the proposed type.
+ * @param containerType
+ * the type of the graphical owner of the domain element.
+ * @return the domain element graphical type.
+ */
+ @Override
+ public String getEdgeGraphicalType(String proposedType);
+
+ /**
+ * Get a valid node graphical type for the domain element.
+ *
+ * @param domainElement
+ * the domain element.
+ * @param containerType
+ * the type of the graphical owner of the domain element.
+ * @return the domain element graphical type.
+ */
+ @Override
+ public String getNodeGraphicalType(EObject domainElement, String containerType);
+
+ /**
+ * Get a valid node graphical type for the element type.
+ *
+ * @param elementType
+ * the element type.
+ * @param containerType
+ * the type of the graphical owner of the domain element.
+ * @return the domain element graphical type.
+ */
+ @Override
+ public String getNodeGraphicalType(IElementType elementType, String containerType);
+
+ /**
+ * Get a valid node graphical type for the proposed type.
+ *
+ * @param proposedType
+ * the proposed type.
+ * @param containerType
+ * the type of the graphical owner of the domain element.
+ * @return the domain element graphical type.
+ */
+ @Override
+ public String getNodeGraphicalType(String proposedType, String containerType);
+
+ /**
+ * Test if the type is a known edge graphical type in this diagram
+ *
+ * @param type
+ * the type to test
+ * @return true if the type is known
+ */
+ @Override
+ public boolean isKnownEdgeType(String type);
+
+ /**
+ * Test if the type is a known node graphical type in this diagram
+ *
+ * @param type
+ * the type to test
+ * @return true if the type is known
+ */
+ @Override
+ public boolean isKnownNodeType(String type);
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/provider/InheritedClassDiagramEditPartProvider.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/provider/InheritedClassDiagramEditPartProvider.java
new file mode 100755
index 0000000..144dc48
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/provider/InheritedClassDiagramEditPartProvider.java
@@ -0,0 +1,118 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST- Initial API and implementation
+ * Nizar GUEDIDI (CEA LIST)- modification
+ *
+ ****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.provider;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.service.IOperation;
+import org.eclipse.gmf.runtime.diagram.ui.services.editpart.CreateGraphicEditPartOperation;
+import org.eclipse.gmf.runtime.diagram.ui.services.editpart.IEditPartOperation;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLEditPartProvider;
+
+public class InheritedClassDiagramEditPartProvider extends UMLEditPartProvider {
+
+ @Override
+ public synchronized boolean provides(IOperation operation) {
+ if (operation instanceof CreateGraphicEditPartOperation) {
+ View view = ((IEditPartOperation) operation).getView();
+
+ // Ensure current diagram is a Requirement Diagram
+ if (!ElementTypes.DIAGRAM_ID.equals(view.getDiagram().getType())) {
+ return false;
+ }
+
+ // Test supported inherited types
+ EObject eobject = view.getElement();
+
+ /** Nodes (and ChildLabelNodes) *********** */
+ if (eobject instanceof org.eclipse.uml2.uml.Package) {
+ return true;
+ }
+ if (eobject instanceof org.eclipse.uml2.uml.Class) {
+ return true;
+ }
+ if (eobject instanceof org.eclipse.uml2.uml.NamedElement) {
+ return true;
+ }
+ if (eobject instanceof org.eclipse.uml2.uml.Comment) {
+ return true;
+ }
+ if (eobject instanceof org.eclipse.uml2.uml.Constraint) {
+ return true;
+ }
+ if (eobject instanceof org.eclipse.uml2.uml.Property) {
+ return true;
+ }
+ if (eobject instanceof org.eclipse.uml2.uml.Reception) {
+ return true;
+ }
+ if (eobject instanceof org.eclipse.uml2.uml.Operation) {
+ return true;
+ }
+ if (eobject instanceof org.eclipse.uml2.uml.Interface) {
+ return true;
+ }
+ if (eobject instanceof org.eclipse.uml2.uml.Enumeration) {
+ return true;
+ }
+ if (eobject instanceof org.eclipse.uml2.uml.PrimitiveType) {
+ return true;
+ }
+ if (eobject instanceof org.eclipse.uml2.uml.DataType) {
+ return true;
+ }
+ if (eobject instanceof org.eclipse.uml2.uml.Signal) {
+ return true;
+ }
+
+ /** Edges *********** */
+ if (eobject instanceof org.eclipse.uml2.uml.Abstraction) {
+ return true;
+ }
+ if (eobject instanceof org.eclipse.uml2.uml.Dependency) {
+ return true;
+ }
+ if (eobject instanceof org.eclipse.uml2.uml.Realization) {
+ return true;
+ }
+ if (eobject instanceof org.eclipse.uml2.uml.PackageImport) {
+ return true;
+ }
+
+ // Additional test needed here to decide whether to support Feature type links.
+ // As feature type link are not related to a MetaClass from the domain model
+ // they are not already handled by previous tests.
+ // Also concerns NotationType.
+ String hint = view.getType();
+
+ /** Edges (Feature) : COMMENT_ANNOTATED_ELEMENT *********** */
+ if (ElementTypes.COMMENT_ANNOTATED_ELEMENT.getSemanticHint().equals(hint)) {
+ return true;
+ }
+ /** Edges (Feature) : CONSTRAINT_CONSTRAINED_ELEMENT *********** */
+ if (ElementTypes.CONSTRAINT_CONSTRAINED_ELEMENT.getSemanticHint().equals(hint)) {
+ return true;
+ }
+
+ /** Edges (NotationType) : CONTAINMENT_LINK *********** */
+ if (ElementTypes.CONTAINMENT_LINK.getSemanticHint().equals(hint)) {
+ return true;
+ }
+
+
+ }
+ return false;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/provider/InheritedClassDiagramViewProvider.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/provider/InheritedClassDiagramViewProvider.java
new file mode 100755
index 0000000..be4e202
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/provider/InheritedClassDiagramViewProvider.java
@@ -0,0 +1,362 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nizar GUEDIDI (CEA LIST) - Initial API and implementation
+ /*****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.provider;
+
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EcoreFactory;
+import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
+import org.eclipse.gmf.runtime.diagram.core.services.view.CreateEdgeViewOperation;
+import org.eclipse.gmf.runtime.diagram.core.services.view.CreateNodeViewOperation;
+import org.eclipse.gmf.runtime.diagram.core.services.view.CreateViewForKindOperation;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.requirement.Activator;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLViewProvider;
+
+public class InheritedClassDiagramViewProvider extends UMLViewProvider {
+
+ /** Local graphical type registry */
+ protected IGraphicalTypeRegistry registry = new GraphicalTypeRegistry();
+
+ @Override
+ public Edge createEdge(IAdaptable semanticAdapter, View containerView, String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Edge createdEdge = null;
+
+ IElementType elementType = (IElementType) semanticAdapter.getAdapter(IElementType.class);
+ if (elementType != null) {
+ createdEdge = super.createEdge(semanticAdapter, containerView, semanticHint, index, persisted, preferencesHint);
+ } else {
+
+ EObject domainElement = (EObject) semanticAdapter.getAdapter(EObject.class);
+
+ String domainElementGraphicalType = semanticHint;
+ if (domainElementGraphicalType == null) {
+ domainElementGraphicalType = registry.getEdgeGraphicalType(domainElement);
+ }
+
+ if ((!IGraphicalTypeRegistry.UNDEFINED_TYPE.equals(domainElementGraphicalType)) && (registry.isKnownEdgeType(domainElementGraphicalType))) {
+ // Cannot use createEdge from super class as it never take the graphical type (semanticHint) into account.
+ // createdEdge = super.createEdge(semanticAdapter, containerView, domainElementGraphicalType, index, persisted, preferencesHint);
+
+ if (ElementTypes.ABSTRACTION.getSemanticHint().equals(domainElementGraphicalType)) {
+ createdEdge = createAbstraction_Edge(domainElement, containerView, index, persisted, preferencesHint);
+ }
+ if (ElementTypes.CONTAINMENT_LINK.getSemanticHint().equals(domainElementGraphicalType)) {
+ createdEdge = createElement_ContainmentEdge(containerView, index, persisted, preferencesHint);
+ }
+ if (ElementTypes.DEPENDENCY.getSemanticHint().equals(domainElementGraphicalType)) {
+ createdEdge = createDependency_Edge(domainElement, containerView, index, persisted, preferencesHint);
+ }
+ if (ElementTypes.COMMENT_ANNOTATED_ELEMENT.getSemanticHint().equals(domainElementGraphicalType)) {
+ createdEdge = createComment_AnnotatedElementEdge(containerView, index, persisted, preferencesHint);
+ }
+ if (ElementTypes.CONSTRAINT_CONSTRAINED_ELEMENT.getSemanticHint().equals(domainElementGraphicalType)) {
+ createdEdge = createConstraint_ConstrainedElementEdge(containerView, index, persisted, preferencesHint);
+ }
+ if (ElementTypes.REALIZATION.getSemanticHint().equals(domainElementGraphicalType)) {
+ createdEdge = createRealization_Edge(domainElement, containerView, index, persisted, preferencesHint);
+ }
+ if (ElementTypes.PACKAGE_IMPORT.getSemanticHint().equals(domainElementGraphicalType)) {
+ createdEdge = createPackageImport_Edge(domainElement, containerView, index, persisted, preferencesHint);
+ }
+ }
+ }
+
+ if (createdEdge == null) {
+ Activator.log.error(new Exception("Could not create Edge."));
+ }
+
+ return createdEdge;
+ }
+
+ @Override
+ protected boolean provides(CreateViewForKindOperation op) {
+
+ // This provider is registered for Requirement Diagram only
+ String diagramType = op.getContainerView().getDiagram().getType();
+ if (!ElementTypes.DIAGRAM_ID.equals(diagramType)) {
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ protected boolean provides(CreateEdgeViewOperation op) {
+
+ // Must have a container
+ if (op.getContainerView() == null) {
+ return false;
+ }
+
+ // This provider is registered for Requirement Diagram only
+ String diagramType = op.getContainerView().getDiagram().getType();
+ if (!ElementTypes.DIAGRAM_ID.equals(diagramType)) {
+ return false;
+ }
+
+ IElementType elementType = getSemanticElementType(op.getSemanticAdapter());
+ if (elementType == ElementTypes.ABSTRACTION) {
+ return true;
+ }
+ if (elementType == ElementTypes.CONTAINMENT_LINK) {
+ return true;
+ }
+ if (elementType == ElementTypes.DEPENDENCY) {
+ return true;
+ }
+ if (elementType == ElementTypes.COMMENT_ANNOTATED_ELEMENT) {
+ return true;
+ }
+ if (elementType == ElementTypes.CONSTRAINT_CONSTRAINED_ELEMENT) {
+ return true;
+ }
+ if (elementType == ElementTypes.REALIZATION) {
+ return true;
+ }
+ if (elementType == ElementTypes.PACKAGE_IMPORT) {
+ return true;
+ }
+
+ // /////////////////////////////////////////////////////////////////////
+ // Test possibility to provide a view based on the semantic nature and its expected container.
+ // /////////////////////////////////////////////////////////////////////
+
+ // IElementType may be null (especially when drop from ModelExplorer).
+ // In such a case, test the semantic EObject instead.
+ if (elementType == null) {
+ EObject domainElement = (EObject) op.getSemanticAdapter().getAdapter(EObject.class);
+ String domainElementGraphicalType = op.getSemanticHint();
+ if (domainElementGraphicalType == null) {
+ domainElementGraphicalType = registry.getEdgeGraphicalType(domainElement);
+ }
+
+ if ((!IGraphicalTypeRegistry.UNDEFINED_TYPE.equals(domainElementGraphicalType)) && (registry.isKnownEdgeType(domainElementGraphicalType))) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ @Override
+ protected boolean provides(CreateNodeViewOperation op) {
+ // Must have a container
+ if (op.getContainerView() == null) {
+ return false;
+ }
+ // Get the type of the container
+ String containerGraphicalType = op.getContainerView().getType();
+
+ // This provider is registered for Requirement Diagram only
+ String diagramType = op.getContainerView().getDiagram().getType();
+ if (!ElementTypes.DIAGRAM_ID.equals(diagramType)) {
+ return false;
+ }
+
+ // /////////////////////////////////////////////////////////////////////
+ // Test possibility to provide a view based on the ElementType and its expected container.
+ // /////////////////////////////////////////////////////////////////////
+
+ IElementType elementType = (IElementType) op.getSemanticAdapter().getAdapter(IElementType.class);
+ if (elementType == ElementTypes.PACKAGE) {
+ if (ElementTypes.DIAGRAM_ID.equals(containerGraphicalType)) {
+ return true;
+ }
+ }
+ if (elementType == ElementTypes.PACKAGE_CN) {
+ if (ElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) {
+ return true;
+ }
+ if (ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) {
+ return true;
+ }
+ }
+ if (elementType == ElementTypes.CLASS) {
+ if (ElementTypes.DIAGRAM_ID.equals(containerGraphicalType)) {
+ return true;
+ }
+ }
+ if (elementType == ElementTypes.CLASS_CN) {
+ if (ElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) {
+ return true;
+ }
+ if (ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) {
+ return true;
+ }
+ }
+ if (elementType == ElementTypes.DEFAULT_NAMED_ELEMENT) {
+ if (ElementTypes.DIAGRAM_ID.equals(containerGraphicalType)) {
+ return true;
+ }
+ }
+
+ if (elementType == ElementTypes.COMMENT) {
+ if (ElementTypes.DIAGRAM_ID.equals(containerGraphicalType)) {
+ return true;
+ }
+ }
+ if (elementType == ElementTypes.COMMENT_CN) {
+ if (ElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) {
+ return true;
+ }
+ if (ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) {
+ return true;
+ }
+ }
+ if (elementType == ElementTypes.CONSTRAINT) {
+ if (ElementTypes.DIAGRAM_ID.equals(containerGraphicalType)) {
+ return true;
+ }
+ }
+ if (elementType == ElementTypes.CONSTRAINT_CN) {
+ if (ElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) {
+ return true;
+ }
+ if (ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) {
+ return true;
+ }
+ }
+ if (elementType == ElementTypes.CLASS_PROPERTY_CLN) {
+ if (ElementTypes.CLASS_COMPARTMENT_ATTRIBUTE_HINT.equals(containerGraphicalType)) {
+ return true;
+ }
+ if (ElementTypes.CLASS_CN_COMPARTMENT_ATTRIBUTE_HINT.equals(containerGraphicalType)) {
+ return true;
+ }
+ }
+ if (elementType == ElementTypes.CLASS_RECEPTION_CLN) {
+ if (ElementTypes.CLASS_COMPARTMENT_OPERATION_HINT.equals(containerGraphicalType)) {
+ return true;
+ }
+ if (ElementTypes.CLASS_CN_COMPARTMENT_OPERATION_HINT.equals(containerGraphicalType)) {
+ return true;
+ }
+ }
+ if (elementType == ElementTypes.CLASS_OPERATION_CLN) {
+ if (ElementTypes.CLASS_COMPARTMENT_OPERATION_HINT.equals(containerGraphicalType)) {
+ return true;
+ }
+ if (ElementTypes.CLASS_CN_COMPARTMENT_OPERATION_HINT.equals(containerGraphicalType)) {
+ return true;
+ }
+ }
+ if (elementType == ElementTypes.CLASS_CLASS_CLN) {
+ if (ElementTypes.CLASS_CN_COMPARTMENT_NESTED_CLASSIFIER_HINT.equals(containerGraphicalType)) {
+ return true;
+ }
+ if (ElementTypes.CLASS_COMPARTMENT_NESTED_CLASSIFIER_HINT.equals(containerGraphicalType)) {
+ return true;
+ }
+ }
+ if (elementType == ElementTypes.CLASS_INTERFACE_CLN) {
+ if (ElementTypes.CLASS_COMPARTMENT_NESTED_CLASSIFIER_HINT.equals(containerGraphicalType)) {
+ return true;
+ }
+ if (ElementTypes.CLASS_CN_COMPARTMENT_NESTED_CLASSIFIER_HINT.equals(containerGraphicalType)) {
+ return true;
+ }
+ }
+ if (elementType == ElementTypes.CLASS_ENUMERATION_CLN) {
+ if (ElementTypes.CLASS_CN_COMPARTMENT_NESTED_CLASSIFIER_HINT.equals(containerGraphicalType)) {
+ return true;
+ }
+ if (ElementTypes.CLASS_COMPARTMENT_NESTED_CLASSIFIER_HINT.equals(containerGraphicalType)) {
+ return true;
+ }
+ }
+ if (elementType == ElementTypes.CLASS_PRIMITIVE_TYPE_CLN) {
+ if (ElementTypes.CLASS_CN_COMPARTMENT_NESTED_CLASSIFIER_HINT.equals(containerGraphicalType)) {
+ return true;
+ }
+ if (ElementTypes.CLASS_COMPARTMENT_NESTED_CLASSIFIER_HINT.equals(containerGraphicalType)) {
+ return true;
+ }
+ }
+ if (elementType == ElementTypes.CLASS_DATA_TYPE_CLN) {
+ if (ElementTypes.CLASS_CN_COMPARTMENT_NESTED_CLASSIFIER_HINT.equals(containerGraphicalType)) {
+ return true;
+ }
+ if (ElementTypes.CLASS_COMPARTMENT_NESTED_CLASSIFIER_HINT.equals(containerGraphicalType)) {
+ return true;
+ }
+ }
+ if (elementType == ElementTypes.CLASS_SIGNAL_CLN) {
+ if (ElementTypes.CLASS_CN_COMPARTMENT_NESTED_CLASSIFIER_HINT.equals(containerGraphicalType)) {
+ return true;
+ }
+ if (ElementTypes.CLASS_COMPARTMENT_NESTED_CLASSIFIER_HINT.equals(containerGraphicalType)) {
+ return true;
+ }
+ }
+
+ // /////////////////////////////////////////////////////////////////////
+ // Test possibility to provide a view based on the semantic nature and its expected container.
+ // /////////////////////////////////////////////////////////////////////
+
+ // IElementType may be null (especially when drop from ModelExplorer).
+ // In such a case, test the semantic EObject instead.
+ if (elementType == null) {
+ EObject domainElement = (EObject) op.getSemanticAdapter().getAdapter(EObject.class);
+ String domainElementGraphicalType = op.getSemanticHint();
+ if (domainElementGraphicalType == null) {
+ domainElementGraphicalType = registry.getNodeGraphicalType(domainElement, containerGraphicalType);
+ } else {
+ domainElementGraphicalType = registry.getNodeGraphicalType(domainElementGraphicalType, containerGraphicalType);
+ }
+
+ if ((!IGraphicalTypeRegistry.UNDEFINED_TYPE.equals(domainElementGraphicalType)) && (registry.isKnownNodeType(domainElementGraphicalType))) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ @Override
+ public Node createNode(IAdaptable semanticAdapter, View containerView, String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) {
+
+ if (semanticHint != null) {
+ return super.createNode(semanticAdapter, containerView, semanticHint, index, persisted, preferencesHint);
+ }
+
+ // Use the GraphicalTypeRegistry to find the expected type for a domain element
+ // Get the type of the container
+ String containerGraphicalType = containerView.getType();
+ // Get the type of the domain element
+ EObject domainElement = (EObject) semanticAdapter.getAdapter(EObject.class);
+ String domainElementGraphicalType = registry.getNodeGraphicalType(domainElement, containerGraphicalType);
+
+ // Create the expected node
+ if (!IGraphicalTypeRegistry.UNDEFINED_TYPE.equals(domainElementGraphicalType)) {
+ return super.createNode(semanticAdapter, containerView, domainElementGraphicalType, index, persisted, preferencesHint);
+ }
+
+ Activator.log.error(new Exception("Could not create Node."));
+ return null;
+ }
+
+ @Override
+ protected void stampShortcut(View containerView, Node target) {
+ if (!ElementTypes.DIAGRAM_ID.equals(containerView.getDiagram().getType())) {
+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation();
+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$
+ shortcutAnnotation.getDetails().put("modelID", ElementTypes.DIAGRAM_ID); //$NON-NLS-1$
+ target.getEAnnotations().add(shortcutAnnotation);
+ }
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/provider/RequirementDiagramEditPartProvider.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/provider/RequirementDiagramEditPartProvider.java
new file mode 100755
index 0000000..728917a
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/provider/RequirementDiagramEditPartProvider.java
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST- Initial API and implementation
+ * Nizar GUEDIDI (CEA LIST)- modification
+ *
+ ****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.provider;
+
+import org.eclipse.gmf.runtime.common.core.service.IOperation;
+import org.eclipse.gmf.runtime.diagram.ui.services.editpart.AbstractEditPartProvider;
+import org.eclipse.gmf.runtime.diagram.ui.services.editpart.CreateGraphicEditPartOperation;
+import org.eclipse.gmf.runtime.diagram.ui.services.editpart.IEditPartOperation;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.requirement.Activator;
+import org.eclipse.papyrus.sysml.diagram.requirement.edit.part.RequirementDiagramEditPart;
+
+public class RequirementDiagramEditPartProvider extends AbstractEditPartProvider {
+
+ @Override
+ public boolean provides(IOperation operation) {
+ if (operation instanceof CreateGraphicEditPartOperation) {
+ View view = ((IEditPartOperation) operation).getView();
+
+ // Ensure current diagram is Requirement Diagram
+ if (ElementTypes.DIAGRAM_ID.equals(view.getType())) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ @Override
+ protected Class<?> getDiagramEditPartClass(View view) {
+ if (ElementTypes.DIAGRAM_ID.equals(view.getType())) {
+ return RequirementDiagramEditPart.class;
+ }
+
+ Activator.log.error(new Exception("Could not create EditPart."));
+ return null;
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/provider/RequirementDiagramEditPolicyProvider.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/provider/RequirementDiagramEditPolicyProvider.java
new file mode 100755
index 0000000..15c6f02
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/provider/RequirementDiagramEditPolicyProvider.java
@@ -0,0 +1,101 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST- Initial API and implementation
+ * Nizar GUEDIDI (CEA LIST)- modification
+ *
+ ****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.provider;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.common.core.service.AbstractProvider;
+import org.eclipse.gmf.runtime.common.core.service.IOperation;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.services.editpolicy.CreateEditPoliciesOperation;
+import org.eclipse.gmf.runtime.diagram.ui.services.editpolicy.IEditPolicyProvider;
+import org.eclipse.papyrus.sysml.diagram.requirement.edit.policy.CustomDragDropEditPolicy;
+
+public class RequirementDiagramEditPolicyProvider extends AbstractProvider implements IEditPolicyProvider {
+
+ @Override
+ public boolean provides(IOperation operation) {
+
+ CreateEditPoliciesOperation epOperation = (CreateEditPoliciesOperation) operation;
+ if (!(epOperation.getEditPart() instanceof GraphicalEditPart)) {
+ return false;
+ }
+ GraphicalEditPart gep = (GraphicalEditPart) epOperation.getEditPart();
+ String diagramType = gep.getNotationView().getDiagram().getType();
+ if (!ElementTypes.DIAGRAM_ID.equals(diagramType)) {
+ return false;
+ }
+
+ if (gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PackageEditPart) {
+ return true;
+ }
+ if (gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PackagePackageableElementCompartmentEditPart) {
+ return true;
+ }
+ if (gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PackageEditPartCN) {
+ return true;
+ }
+ if (gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PackagePackageableElementCompartmentEditPartCN) {
+ return true;
+ }
+ if (gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassEditPart) {
+ return true;
+ }
+ if (gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassAttributeCompartmentEditPart) {
+ return true;
+ }
+ if (gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassOperationCompartmentEditPart) {
+ return true;
+ }
+ if (gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassNestedClassifierCompartmentEditPart) {
+ return true;
+ }
+ if (gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassEditPartCN) {
+ return true;
+ }
+ if (gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassAttributeCompartmentEditPartCN) {
+ return true;
+ }
+ if (gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassOperationCompartmentEditPartCN) {
+ return true;
+ }
+ if (gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassNestedClassifierCompartmentEditPartCN) {
+ return true;
+ }
+ if (gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.DefaultNamedElementEditPart) {
+ return true;
+ }
+ if (gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.CommentEditPart) {
+ return true;
+ }
+ if (gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.CommentEditPartCN) {
+ return true;
+ }
+ if (gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ConstraintEditPart) {
+ return true;
+ }
+ if (gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ConstraintEditPartCN) {
+ return true;
+ }
+
+ return false;
+ }
+
+ @Override
+ public void createEditPolicies(EditPart editPart) {
+ editPart.installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDragDropEditPolicy());
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/provider/RequirementDiagramViewProvider.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/provider/RequirementDiagramViewProvider.java
new file mode 100755
index 0000000..e2f43e5
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/provider/RequirementDiagramViewProvider.java
@@ -0,0 +1,44 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST- Initial API and implementation
+ * Nizar GUEDIDI (CEA LIST)- modification
+ *
+ ****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.provider;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.gmf.runtime.diagram.core.providers.AbstractViewProvider;
+import org.eclipse.gmf.runtime.diagram.core.services.view.CreateDiagramViewOperation;
+import org.eclipse.papyrus.sysml.diagram.requirement.Activator;
+import org.eclipse.papyrus.sysml.diagram.requirement.factory.RequirementDiagramViewFactory;
+
+public class RequirementDiagramViewProvider extends AbstractViewProvider {
+
+ @Override
+ protected boolean provides(CreateDiagramViewOperation operation) {
+
+ if (ElementTypes.DIAGRAM_ID.equals(operation.getSemanticHint())) {
+ return true;
+ }
+
+ return false;
+ }
+
+ @Override
+ protected Class<?> getDiagramViewClass(IAdaptable semanticAdapter, String diagramKind) {
+ if (ElementTypes.DIAGRAM_ID.equals(diagramKind)) {
+ return RequirementDiagramViewFactory.class;
+ }
+
+ Activator.log.error(new Exception("Could not create View."));
+ return null;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/utils/RequirementDiagramGraphicalTypes.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/utils/RequirementDiagramGraphicalTypes.java
new file mode 100755
index 0000000..3651d89
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/utils/RequirementDiagramGraphicalTypes.java
@@ -0,0 +1,27 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST- Initial API and implementation
+ * Nizar GUEDIDI (CEA LIST)- modification
+ *
+ ****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.utils;
+
+public class RequirementDiagramGraphicalTypes {
+
+ /** ********************************************************* */
+ /** Diagram custom graphical types id *********************** */
+ /** ********************************************************* */
+
+
+
+
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/Messages.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/Messages.java
new file mode 100755
index 0000000..58c8d71
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/Messages.java
@@ -0,0 +1,63 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Hubert Dubois (CEA LIST) hubert.dubois@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * @generated
+ */
+public class Messages extends NLS {
+
+ /**
+ * @generated
+ */
+ public static String Diagram_Name;
+
+ /**
+ * @generated
+ */
+ public static String Problem_Opening;
+
+ /**
+ * @generated
+ */
+ public static String Cannot_Open_Input_Element;
+
+ /**
+ * @generated
+ */
+ public static String No_EditPart_Can_Be_Created;
+
+ /**
+ * @generated
+ */
+ public static String No_View_Can_Be_Created;
+
+ /**
+ * @generated
+ */
+ static {
+ NLS.initializeMessages("messages", Messages.class);
+ }
+
+ // TODO: put accessor fields manually
+
+ /**
+ * @generated
+ */
+ private Messages() {
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/RequirementDiagramCreationCondition.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/RequirementDiagramCreationCondition.java
new file mode 100755
index 0000000..9e74d42
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/RequirementDiagramCreationCondition.java
@@ -0,0 +1,32 @@
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Emilien Perico (Atos Origin) emilien.perico@atosorigin.com - Initial API and implementation
+ * Laurent Wouters (CEA LIST) laurent.wouters@cea.fr - Viewpoints application
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.infra.ui.extension.commands.PerspectiveContextDependence;
+
+/**
+ * RequirementDiagramCondition to set conditions for the diagram creation
+ */
+public class RequirementDiagramCreationCondition extends PerspectiveContextDependence {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean create(EObject selectedElement) {
+ return false;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/edit/part/CustomAbstractRequirementInformationLabelEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/edit/part/CustomAbstractRequirementInformationLabelEditPart.java
new file mode 100755
index 0000000..4e3bead
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/edit/part/CustomAbstractRequirementInformationLabelEditPart.java
@@ -0,0 +1,95 @@
+/*****************************************************************************
+ * 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 Mélois (ATOS) - Initial API and implementation
+ *
+ ******************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.edit.part;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.LabelEditPart;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.requirement.edit.policy.CustomRequirementInfoLabelUpdateEditPolicy;
+import org.eclipse.papyrus.sysml.requirements.Requirement;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.uml2.uml.Element;
+
+public abstract class CustomAbstractRequirementInformationLabelEditPart extends LabelEditPart {
+
+ Requirement requirement;
+
+ public CustomAbstractRequirementInformationLabelEditPart(View view) {
+ super(view);
+ }
+
+ @Override
+ protected void createDefaultEditPolicies() {
+
+ /*
+ * edit policy used to refresh the labels when the stereotype application "Requirement" is updated.
+ */
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new CustomRequirementInfoLabelUpdateEditPolicy());
+ super.createDefaultEditPolicies();
+ // Removing useless edit policies installed by superclasses.
+ removeEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ removeEditPolicy(EditPolicy.COMPONENT_ROLE);
+ }
+
+ @Override
+ protected IFigure createFigure() {
+ IFigure figure = new WrappingLabel();
+ ((WrappingLabel) figure).setTextWrap(true);
+ figure.setFont(Display.getDefault().getSystemFont());
+ return figure;
+ }
+
+ @Override
+ public IFigure getFigure() {
+ IFigure figure = super.getFigure();
+ refreshLabelText();
+ return figure;
+ }
+
+ public abstract void refreshLabelText();
+
+ /**
+ * Refreshes the text of the label.
+ */
+ @Override
+ public void refresh() {
+ this.refreshLabelText();
+ super.refresh();
+ }
+
+ /**
+ * Gets the requirement associated to this edit part.
+ */
+ protected Requirement getRequirement() {
+ EditPart compartment = this.getParent();
+ EditPart classEditPart = compartment.getParent();
+ // Getting the class out of the edit part.
+ Element clazz = (Element) ((View) classEditPart.getModel()).getElement();
+ // Getting the requirement out of the class.
+ if (clazz != null) {
+ for (EObject appliedStereotype : clazz.getStereotypeApplications()) {
+ if (appliedStereotype instanceof Requirement) {
+ return ((Requirement) appliedStereotype);
+ }
+ }
+ }
+ return null;
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/edit/part/CustomRequirementEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/edit/part/CustomRequirementEditPart.java
new file mode 100755
index 0000000..fc917ca
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/edit/part/CustomRequirementEditPart.java
@@ -0,0 +1,88 @@
+/*****************************************************************************
+ * 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 Mélois (ATOS) - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
+ *
+ ******************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.edit.part;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.requirement.figure.CustomRequirementFigure;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassEditPart;
+import org.eclipse.papyrus.uml.diagram.common.commands.ShowHideCompartmentRequest;
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
+import org.eclipse.uml2.uml.NamedElement;
+
+public class CustomRequirementEditPart extends ClassEditPart {
+
+ //protected static final String ICONS_PATH = "/org.eclipse.papyrus.sysml/icons/requirements/Requirement.gif"; //$NON-NLS-1$
+
+ public CustomRequirementEditPart(View view) {
+ super(view);
+ }
+
+
+ @Override
+ protected IFigure createNodeShape() {
+ // Showing the information compartment.
+ View notationView = getNotationView();
+ Request request = new ShowHideCompartmentRequest(ShowHideCompartmentRequest.SHOW, notationView);
+ request.setType(ShowHideCompartmentRequest.SHOW_HIDE_COMPARTMENT);
+ Command showCompartmentCommand = this.getCommand(request);
+ getEditDomain().getCommandStack().execute(showCompartmentCommand);
+
+ primaryShape = new CustomRequirementFigure();
+ // ((CustomRequirementFigure)primaryShape).setTagIcon(Activator.getPluginIconImage(Activator.ID, ICONS_PATH));
+ return primaryShape;
+ }
+
+ public void refreshTitle() {
+ NamedElement clazz = (NamedElement) ((View) this.getModel()).getElement();
+ String requirementName = UMLLabelInternationalization.getInstance().getLabel(clazz);
+ ((CustomRequirementFigure) this.getFigure()).setName(requirementName);
+ }
+
+ @Override
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof CustomRequirementInformationCompartmentEditPart) {
+ IFigure pane = ((CustomRequirementFigure) getPrimaryShape()).getRequirementIdInformationCompartmentFigure();
+ setupContentPane(pane); // FIXME each compartment should handle his content pane in his own way
+ pane.add(((CustomRequirementInformationCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ return super.addFixedChild(childEditPart);
+ }
+
+ @Override
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof CustomRequirementInformationCompartmentEditPart) {
+ IFigure pane = ((CustomRequirementFigure) getPrimaryShape()).getRequirementIdInformationCompartmentFigure();
+ setupContentPane(pane); // FIXME each compartment should handle his content pane in his own way
+ pane.remove(((CustomRequirementInformationCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ return super.removeFixedChild(childEditPart);
+ }
+
+ @Override
+ public IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ if (editPart instanceof CustomRequirementInformationCompartmentEditPart) {
+ return ((CustomRequirementFigure) getPrimaryShape()).getRequirementIdInformationCompartmentFigure();
+ }
+ return super.getContentPaneFor(editPart);
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/edit/part/CustomRequirementIdLabelEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/edit/part/CustomRequirementIdLabelEditPart.java
new file mode 100755
index 0000000..05046a8
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/edit/part/CustomRequirementIdLabelEditPart.java
@@ -0,0 +1,42 @@
+/*****************************************************************************
+ * 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 Mélois (ATOS) - Initial API and implementation
+ *
+ ******************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.edit.part;
+
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.requirements.Requirement;
+
+/**
+ * Label used to display the id of a requirement
+ */
+public class CustomRequirementIdLabelEditPart extends CustomAbstractRequirementInformationLabelEditPart {
+
+ public CustomRequirementIdLabelEditPart(View view) {
+ super(view);
+ }
+
+ @Override
+ public void refreshLabelText() {
+ if (this.figure != null && this.getRequirement() != null) {
+ WrappingLabel wrappingLabel = (WrappingLabel) figure;
+ Requirement req = this.getRequirement();
+ String id = req.getId();
+ if (id == null) {
+ id = ""; //$NON-NLS-1$
+ }
+ wrappingLabel.setText("id = \"" + id + "\""); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/edit/part/CustomRequirementInformationCompartmentEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/edit/part/CustomRequirementInformationCompartmentEditPart.java
new file mode 100755
index 0000000..ee5ddf6
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/edit/part/CustomRequirementInformationCompartmentEditPart.java
@@ -0,0 +1,98 @@
+/*****************************************************************************
+ * 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 Mélois (ATOS) - Initial API and implementation
+ *
+ ******************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.edit.part;
+
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CreationEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ResizableCompartmentEditPolicy;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.ResizeableListCompartmentEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
+
+/**
+ * Compartment used to display the id and the text of the requirement.
+ * The actual display of these information is performed by
+ * RequirementIdLabelEditPart and RequirementTextLabelEditPart
+ *
+ */
+public class CustomRequirementInformationCompartmentEditPart extends ResizeableListCompartmentEditPart {
+
+ public static final String COMPARTMENT_NAME = "InformationCompartment"; //$NON-NLS-1$
+
+ public CustomRequirementInformationCompartmentEditPart(EObject model) {
+ super(model);
+ }
+
+ @Override
+ protected boolean hasModelChildrenChanged(Notification evt) {
+ return false;
+ }
+
+ @Override
+ public String getCompartmentName() {
+ return COMPARTMENT_NAME;
+ }
+
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultCompartmentSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CreationEditPolicy());
+ installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
+ }
+
+ @Override
+ protected void setRatio(Double ratio) {
+ if (getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+
+ @Override
+ protected void handleNotificationEvent(Notification notification) {
+ Object feature = notification.getFeature();
+ if (NotationPackage.eINSTANCE.getSize_Width().equals(feature) || NotationPackage.eINSTANCE.getSize_Height().equals(feature) || NotationPackage.eINSTANCE.getLocation_X().equals(feature) || NotationPackage.eINSTANCE.getLocation_Y().equals(feature)) {
+ refreshBounds();
+ }
+ super.handleNotificationEvent(notification);
+ }
+
+ @Override
+ protected void refreshBounds() {
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ Dimension size = new Dimension(width, height);
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ Point loc = new Point(x, y);
+ ((GraphicalEditPart) getParent()).setLayoutConstraint(this, getFigure(), new Rectangle(loc, size));
+ }
+
+ @Override
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshBounds();
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/edit/part/CustomRequirementNameEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/edit/part/CustomRequirementNameEditPart.java
new file mode 100755
index 0000000..caf6d8e
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/edit/part/CustomRequirementNameEditPart.java
@@ -0,0 +1,48 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.edit.part;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.emf.appearance.helper.AppearanceHelper;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassNameEditPart;
+import org.eclipse.papyrus.uml.diagram.common.util.DiagramEditPartsUtil;
+import org.eclipse.swt.graphics.Image;
+
+public class CustomRequirementNameEditPart extends ClassNameEditPart { // NamedElementNodeLabelNameEditPart {
+
+ /** Constructor */
+ public CustomRequirementNameEditPart(View view) {
+ super(view);
+ }
+
+ @Override
+ protected Image getLabelIcon() {
+ EObject parserElement = getParserElement();
+ if (parserElement == null) {
+ return null;
+ }
+
+ List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
+ for (View view : views) {
+ if (AppearanceHelper.showElementIcon(view)) {
+ return org.eclipse.papyrus.sysml.diagram.common.Activator.getInstance().getLabelProvider().getImage(parserElement);
+ }
+ }
+ return null;
+
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/edit/part/CustomRequirementTextLabelEditPart.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/edit/part/CustomRequirementTextLabelEditPart.java
new file mode 100755
index 0000000..fb3d0d6
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/edit/part/CustomRequirementTextLabelEditPart.java
@@ -0,0 +1,42 @@
+/*****************************************************************************
+ * 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 Mélois (ATOS) - Initial API and implementation
+ *
+ ******************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.edit.part;
+
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.requirements.Requirement;
+
+/**
+ * Label used to display the text of a requirement
+ */
+public class CustomRequirementTextLabelEditPart extends CustomAbstractRequirementInformationLabelEditPart {
+
+ public CustomRequirementTextLabelEditPart(View view) {
+ super(view);
+ }
+
+ @Override
+ public void refreshLabelText() {
+ if (this.figure != null && this.getRequirement() != null) {
+ WrappingLabel wrappingLabel = (WrappingLabel) figure;
+ Requirement req = this.getRequirement();
+ String text = req.getText();
+ if (text == null) {
+ text = ""; //$NON-NLS-1$
+ }
+ wrappingLabel.setText("text = \"" + text + "\""); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/edit/policy/CustomAppliedStereotypeLabelDisplayEditPolicy.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/edit/policy/CustomAppliedStereotypeLabelDisplayEditPolicy.java
new file mode 100755
index 0000000..e4e2054
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/edit/policy/CustomAppliedStereotypeLabelDisplayEditPolicy.java
@@ -0,0 +1,30 @@
+/*****************************************************************************
+ * 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 Mélois (Atos) olivier.melois@atos.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.diagram.requirement.edit.policy;
+
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy;
+
+/**
+ * Edit policy responsible of the display of stereotypes. It does not rely
+ * on commands to get the stereotypes (the computation of the text was
+ * formerly processed by commands executed when the object was dragged
+ * from a palette, from instance).
+ *
+ * @author omelois
+ */
+public class CustomAppliedStereotypeLabelDisplayEditPolicy extends AppliedStereotypeNodeLabelDisplayEditPolicy {
+
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/edit/policy/CustomDragDropEditPolicy.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/edit/policy/CustomDragDropEditPolicy.java
new file mode 100755
index 0000000..b64f4cb
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/edit/policy/CustomDragDropEditPolicy.java
@@ -0,0 +1,123 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nizar GUEDIDI (CEA LIST) - Initial API and implementation
+ /*****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.edit.policy;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.requirement.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.util.SysmlResource;
+import org.eclipse.uml2.uml.Abstraction;
+import org.eclipse.uml2.uml.Comment;
+import org.eclipse.uml2.uml.Constraint;
+import org.eclipse.uml2.uml.Dependency;
+import org.eclipse.uml2.uml.PackageImport;
+import org.eclipse.uml2.uml.Realization;
+
+public class CustomDragDropEditPolicy extends RequirementDiagramDragDropEditPolicy {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Set<String> getDroppableElementVisualId() {
+ Set<String> droppableElementsVisualID = new HashSet<String>();
+ return droppableElementsVisualID;
+ }
+
+ @Override
+ public String getNodeVisualID(View containerView, EObject domainElement) {
+ String semanticHint = null;
+
+ // Fill the semantic hint during the drop when the top level is the Requirement Diagram
+ if (containerView instanceof Diagram) {
+ if (domainElement instanceof org.eclipse.uml2.uml.Package) {
+ semanticHint = ElementTypes.PACKAGE.getSemanticHint();
+ }
+ if ((domainElement instanceof org.eclipse.uml2.uml.Class)) {
+ org.eclipse.uml2.uml.Class domainElementClass = (org.eclipse.uml2.uml.Class) domainElement;
+ if (domainElementClass.getAppliedStereotype(SysmlResource.REQUIREMENT_ID) != null) {
+ semanticHint = ElementTypes.CLASS.getSemanticHint();
+ }
+ }
+
+ if (domainElement instanceof Comment) {
+ semanticHint = ElementTypes.COMMENT.getSemanticHint();
+ }
+
+ if (domainElement instanceof Constraint) {
+ semanticHint = ElementTypes.CONSTRAINT.getSemanticHint();
+ }
+
+ }
+
+ // Fill the semantic hint during the drop when the top level is the an element in the Requirement Diagram (a Package for instance)
+ else {
+ if (domainElement instanceof org.eclipse.uml2.uml.Package) {
+ semanticHint = ElementTypes.PACKAGE_CN.getSemanticHint();
+ }
+ if ((domainElement instanceof org.eclipse.uml2.uml.Class)) {
+ org.eclipse.uml2.uml.Class domainElementClass = (org.eclipse.uml2.uml.Class) domainElement;
+ if (domainElementClass.getAppliedStereotype(SysmlResource.REQUIREMENT_ID) != null) {
+ semanticHint = ElementTypes.CLASS_CN.getSemanticHint();
+ }
+ }
+
+ if (domainElement instanceof Comment) {
+ semanticHint = ElementTypes.COMMENT_CN.getSemanticHint();
+ }
+
+ if (domainElement instanceof Constraint) {
+ semanticHint = ElementTypes.CONSTRAINT_CN.getSemanticHint();
+ }
+
+ }
+
+ // In the case of we want to Drag and drop something else than a package or a Requirement, if this is a NamedElement,
+ // we can fill the semanticHint with the NamedElement dedicated Value
+ if (semanticHint == null) {
+ if ((domainElement instanceof org.eclipse.uml2.uml.NamedElement)) {
+ semanticHint = ElementTypes.DEFAULT_NAMED_ELEMENT.getSemanticHint();
+ }
+ }
+
+ return semanticHint;
+ }
+
+ @Override
+ public String getLinkWithClassVisualID(EObject domainElement) {
+ String semanticHint = null;
+
+ if (domainElement instanceof Abstraction) {
+ semanticHint = ElementTypes.ABSTRACTION.getSemanticHint();
+ }
+
+ if (domainElement instanceof Dependency) {
+ semanticHint = ElementTypes.DEPENDENCY.getSemanticHint();
+ }
+
+ if (domainElement instanceof PackageImport) {
+ semanticHint = ElementTypes.PACKAGE_IMPORT.getSemanticHint();
+ }
+ if (domainElement instanceof Realization) {
+ semanticHint = ElementTypes.REALIZATION.getSemanticHint();
+ }
+
+ return semanticHint;
+
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/edit/policy/CustomRequirementInfoLabelUpdateEditPolicy.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/edit/policy/CustomRequirementInfoLabelUpdateEditPolicy.java
new file mode 100755
index 0000000..1695166
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/edit/policy/CustomRequirementInfoLabelUpdateEditPolicy.java
@@ -0,0 +1,49 @@
+/*****************************************************************************
+ * 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 Mélois (ATOS) - Initial API and implementation
+ *
+ ******************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.edit.policy;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy;
+import org.eclipse.uml2.uml.Element;
+
+/**
+ * Edit policy used to refresh the label that display the id and the text of a requirement.
+ *
+ */
+public class CustomRequirementInfoLabelUpdateEditPolicy extends AbstractAppliedStereotypeDisplayEditPolicy {
+
+
+ @Override
+ protected Element getUMLElement() {
+ EditPart host = this.getHost();
+ // Reminder : the label is in the compartment, which is in the class edit part.
+ EditPart compartment = host.getParent();
+ EditPart classEditPart = compartment.getParent();
+ // Getting the class out of the edit part.
+ Element clazz = (Element) ((View) classEditPart.getModel()).getElement();
+ return clazz;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy#refreshDisplay()
+ *
+ */
+ @Override
+ public void refreshDisplay() {
+ // Do nothing
+
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/factory/CustomRequirementUMLEditPartFactory.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/factory/CustomRequirementUMLEditPartFactory.java
new file mode 100755
index 0000000..2fdf218
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/factory/CustomRequirementUMLEditPartFactory.java
@@ -0,0 +1,44 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.factory;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.requirement.edit.part.CustomRequirementNameEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.factory.CustomUMLEditPartFactory;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassNameEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+
+/**
+ * this is custom editpart factory to create our own editpart
+ */
+public class CustomRequirementUMLEditPartFactory extends CustomUMLEditPartFactory {
+
+ @Override
+ public EditPart createEditPart(EditPart context, Object model) {
+ if (model instanceof View) {
+ View view = (View) model;
+ String visualID = UMLVisualIDRegistry.getVisualID(view);
+
+ if (visualID != null) {
+ switch (visualID) {
+ // redefined classes to modify the method createNodePlate
+ case ClassNameEditPart.VISUAL_ID:
+ return new CustomRequirementNameEditPart(view);
+ }
+ }
+ }
+ return super.createEditPart(context, model);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/figure/CustomRequirementFigure.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/figure/CustomRequirementFigure.java
new file mode 100755
index 0000000..663628f
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/figure/CustomRequirementFigure.java
@@ -0,0 +1,57 @@
+/*****************************************************************************
+ * 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 Mélois (ATOS) - Initial API and implementation
+ *
+ ******************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.figure;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ClassFigure;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ClassifierFigure;
+
+public class CustomRequirementFigure extends ClassFigure {
+
+ /** The Attribute Compartment */
+ private final static String ATTRIBUTE_COMPARTMENT = "attributeCompartment";
+
+ /** The Operation Compartment */
+ private final static String OPERATION_COMPARTMENT = "operationCompartment";
+
+ /** The NestedClassifier Compartment */
+ private final static String NESTEDCLASSIFIER_COMPARTMENT = "nestedClassifierCompartment";
+
+ /** The RequirementIdInformation Compartment */
+ private final static String REQUIREMENT_ID_INFO_COMPARTMENT = "requirementIdInformationCompartment";
+
+ /** The List of Compartment */
+ private final static List<String> COMPARTMENT = new ArrayList<String>() {
+
+ private static final long serialVersionUID = 1L;
+ {
+ add(ATTRIBUTE_COMPARTMENT);
+ add(OPERATION_COMPARTMENT);
+ add(NESTEDCLASSIFIER_COMPARTMENT);
+ add(REQUIREMENT_ID_INFO_COMPARTMENT);
+ }
+ };
+
+ public CustomRequirementFigure() {
+ super();
+ createContentPane(COMPARTMENT);
+ }
+
+ public IFigure getRequirementIdInformationCompartmentFigure() {
+ return getCompartment(REQUIREMENT_ID_INFO_COMPARTMENT);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/provider/CUMLEditPartProvider.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/provider/CUMLEditPartProvider.java
new file mode 100755
index 0000000..06a0d7e
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/provider/CUMLEditPartProvider.java
@@ -0,0 +1,25 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nizar GUEDIDI (CEA LIST) - Initial API and implementation
+ /*****************************************************************************/
+
+package org.eclipse.papyrus.sysml.diagram.requirement.provider;
+
+import org.eclipse.papyrus.sysml.diagram.requirement.factory.CustomRequirementUMLEditPartFactory;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLEditPartProvider;
+
+public class CUMLEditPartProvider extends UMLEditPartProvider {
+
+ public CUMLEditPartProvider() {
+ setFactory(new CustomRequirementUMLEditPartFactory());
+ setAllowCaching(true);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/provider/CustomEditPolicyProvider.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/provider/CustomEditPolicyProvider.java
new file mode 100755
index 0000000..a7f20e6
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/provider/CustomEditPolicyProvider.java
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.provider;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.common.core.service.IOperation;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.services.editpolicy.CreateEditPoliciesOperation;
+import org.eclipse.papyrus.sysml.diagram.requirement.edit.policy.CustomDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PackagePackageableElementCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PackagePackageableElementCompartmentEditPartCN;
+
+/**
+ * Requirement Diagram edit policy provider
+ */
+public class CustomEditPolicyProvider extends RequirementDiagramEditPolicyProvider {
+
+ @Override
+ public boolean provides(IOperation operation) {
+ CreateEditPoliciesOperation epOperation = (CreateEditPoliciesOperation) operation;
+ if (!(epOperation.getEditPart() instanceof GraphicalEditPart)) {
+ return false;
+ }
+ GraphicalEditPart gep = (GraphicalEditPart) epOperation.getEditPart();
+ String diagramType = gep.getNotationView().getDiagram().getType();
+ if (!ElementTypes.DIAGRAM_ID.equals(diagramType)) {
+ return false;
+ }
+
+ if ((gep instanceof PackagePackageableElementCompartmentEditPart) || (gep instanceof PackagePackageableElementCompartmentEditPartCN)) {
+ return true;
+ }
+
+ return false;
+ }
+
+ @Override
+ public void createEditPolicies(EditPart editPart) {
+ editPart.installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDragDropEditPolicy());
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/provider/CustomInheritedElementViewProvider.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/provider/CustomInheritedElementViewProvider.java
new file mode 100755
index 0000000..bfaf034
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/provider/CustomInheritedElementViewProvider.java
@@ -0,0 +1,199 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Mickaël ADAM (ALL4TEC) mickael.adam@all4tec.net - Bug 510587
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.provider;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
+import org.eclipse.gmf.runtime.diagram.core.services.view.CreateEdgeViewOperation;
+import org.eclipse.gmf.runtime.diagram.core.services.view.CreateNodeViewOperation;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.NotationFactory;
+import org.eclipse.gmf.runtime.notation.Shape;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassAttributeCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassNameEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassNestedClassifierCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassOperationCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
+
+/**
+ * SysML Requirement diagram inherited elements view providers from UML Class diagram view providers
+ *
+ */
+public class CustomInheritedElementViewProvider extends InheritedClassDiagramViewProvider {
+
+ public CustomInheritedElementViewProvider() {
+ super();
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.sysml.diagram.requirement.provider.InheritedClassDiagramViewProvider#provides(org.eclipse.gmf.runtime.diagram.core.services.view.CreateNodeViewOperation)
+ */
+ @Override
+ protected boolean provides(final CreateNodeViewOperation operation) {
+ boolean provides = false;
+
+ // Must have a container
+ if (operation.getContainerView() != null) {
+
+ // This provider is registered for Requirement Diagram only
+ String diagramType = operation.getContainerView().getDiagram().getType();
+ if (ElementTypes.DIAGRAM_ID.equals(diagramType)) {
+
+ // Get the type of the container
+ String containerGraphicalType = operation.getContainerView().getType();
+ if (ElementTypes.DIAGRAM_ID.equals(containerGraphicalType)) {
+
+ // get the type
+ IElementType elementType = (IElementType) operation.getSemanticAdapter().getAdapter(IElementType.class);
+ if (SysMLElementTypes.REQUIREMENT == elementType
+ || SysMLElementTypes.PROBLEM == elementType
+ || SysMLElementTypes.RATIONALE == elementType) {
+ provides = true;
+ }
+ }
+ }
+ }
+ return provides || super.provides(operation);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.sysml.diagram.requirement.provider.InheritedClassDiagramViewProvider#provides(org.eclipse.gmf.runtime.diagram.core.services.view.CreateEdgeViewOperation)
+ */
+ @Override
+ protected boolean provides(final CreateEdgeViewOperation operation) {
+ boolean provides = false;
+
+ // Must have a container
+ if (operation.getContainerView() != null) {
+
+ String diagramType = operation.getContainerView().getDiagram().getType();
+ if (ElementTypes.DIAGRAM_ID.equals(diagramType)) {
+
+ // get the type
+ IElementType elementType = (IElementType) operation.getSemanticAdapter().getAdapter(IElementType.class);
+ if (SysMLElementTypes.COPY == elementType
+ || SysMLElementTypes.DERIVE_REQT == elementType
+ || SysMLElementTypes.SATISFY == elementType
+ || SysMLElementTypes.VERIFY == elementType) {
+ provides = true;
+ }
+ }
+ }
+ return provides || super.provides(operation);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.sysml.diagram.requirement.provider.InheritedClassDiagramViewProvider#createNode(org.eclipse.core.runtime.IAdaptable, org.eclipse.gmf.runtime.notation.View, java.lang.String, int, boolean,
+ * org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint)
+ */
+ @Override
+ public Node createNode(final IAdaptable semanticAdapter, final View containerView, final String semanticHint, final int index, final boolean persisted, final PreferencesHint preferencesHint) {
+ Node node = null;
+ if (SysMLElementTypes.REQUIREMENT.getDisplayName().equals(semanticHint)) {
+ node = createRequirementNode(semanticAdapter, containerView, index, persisted, preferencesHint);
+ } else if (SysMLElementTypes.PROBLEM.getDisplayName().equals(semanticHint)
+ || SysMLElementTypes.RATIONALE.getDisplayName().equals(semanticHint)) {
+
+ final EObject domainElement = getSemanticElement(semanticAdapter);
+ node = createComment_Shape(domainElement, containerView, index, persisted, preferencesHint);
+ }
+
+ return null != node ? node : super.createNode(semanticAdapter, containerView, semanticHint, index, persisted, preferencesHint);
+ }
+
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.sysml.diagram.requirement.provider.InheritedClassDiagramViewProvider#createEdge(org.eclipse.core.runtime.IAdaptable, org.eclipse.gmf.runtime.notation.View, java.lang.String, int, boolean,
+ * org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint)
+ */
+ @Override
+ public Edge createEdge(final IAdaptable semanticAdapter, final View containerView, final String semanticHint, final int index, final boolean persisted, final PreferencesHint preferencesHint) {
+ Edge edge = null;
+
+ if (SysMLElementTypes.COPY.getDisplayName().equals(semanticHint)
+ || SysMLElementTypes.DERIVE_REQT.getDisplayName().equals(semanticHint)
+ || SysMLElementTypes.SATISFY.getDisplayName().equals(semanticHint)
+ || SysMLElementTypes.VERIFY.getDisplayName().equals(semanticHint)) {
+ final EObject domainElement = getSemanticElement(semanticAdapter);
+ edge = createAbstraction_Edge(domainElement, containerView, index, persisted, preferencesHint);
+ }
+
+ return null != edge ? edge : super.createEdge(semanticAdapter, containerView, semanticHint, index, persisted, preferencesHint);
+ }
+
+ /**
+ * create a <code>Requirement Node</code>.
+ *
+ * @param IAdaptable
+ * (for semantic element)
+ * @param containerView
+ * the container view that will contain the created view.
+ * @param index
+ * position in the container view's list of children views.
+ * @param persisted
+ * indicates if the created view will be persisted or not
+ * @param preferencesHint
+ * The preference hint that is to be used to find the appropriate
+ * preference store from which to retrieve diagram preference
+ * values. The preference hint is mapped to a preference store in
+ * the preference registry <@link DiagramPreferencesRegistry>.
+ * @return the created <code>Requirement Node</code>
+ */
+ protected Shape createRequirementNode(final IAdaptable semanticAdapter, final View containerView, final int index, final boolean persisted, final PreferencesHint preferencesHint) {
+ Shape node;
+ node = NotationFactory.eINSTANCE.createShape();
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(SysMLGraphicalTypes.SHAPE_SYSML_REQUIREMENT_AS_CLASSIFER_ID);
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ final EObject domainElement = getSemanticElement(semanticAdapter);
+ node.setElement(domainElement);
+ stampShortcut(containerView, node);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "Class");//$NON-NLS-1$
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Class");//$NON-NLS-1$
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "Class");//$NON-NLS-1$
+
+ // createLabel(node, UMLVisualIDRegistry.getType(ClassNameEditPart.VISUAL_ID));
+
+ createLabel(node, UMLVisualIDRegistry.getType(ClassNameEditPart.VISUAL_ID));
+
+ createCompartment(node, UMLVisualIDRegistry.getType(ClassAttributeCompartmentEditPart.VISUAL_ID), true, true, true, true);
+ createCompartment(node, UMLVisualIDRegistry.getType(ClassOperationCompartmentEditPart.VISUAL_ID), true, true, true, true);
+ createCompartment(node, UMLVisualIDRegistry.getType(ClassNestedClassifierCompartmentEditPart.VISUAL_ID), true, true, true, true);
+
+ /*
+ * Addition of the information compartment, and the labels it contains.
+ */
+ Node compartment = createCompartment(node, SysMLGraphicalTypes.COMPARTMENT_SYSML_REQUIREMENT_IDINFO_AS_LIST_ID, true, true, true, true);
+ createLabel(compartment, SysMLGraphicalTypes.LABEL_SYSML_REQUIREMENT_ID_ID);
+ createLabel(compartment, SysMLGraphicalTypes.LABEL_SYSML_REQUIREMENT_TEXT_ID);
+
+ PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "Class");//$NON-NLS-1$
+ return node;
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/provider/CustomRequirementEditPartProvider.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/provider/CustomRequirementEditPartProvider.java
new file mode 100755
index 0000000..c9aef81
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/provider/CustomRequirementEditPartProvider.java
@@ -0,0 +1,69 @@
+/*****************************************************************************
+ * 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:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.provider;
+
+import org.eclipse.gmf.runtime.common.core.service.IOperation;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.services.editpart.CreateGraphicEditPartOperation;
+import org.eclipse.gmf.runtime.diagram.ui.services.editpart.IEditPartOperation;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.requirement.edit.part.CustomRequirementEditPart;
+import org.eclipse.papyrus.sysml.diagram.requirement.edit.part.CustomRequirementIdLabelEditPart;
+import org.eclipse.papyrus.sysml.diagram.requirement.edit.part.CustomRequirementInformationCompartmentEditPart;
+import org.eclipse.papyrus.sysml.diagram.requirement.edit.part.CustomRequirementTextLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+
+/**
+ * Reuse the Custom EditPartProvider from the Class Diagram
+ *
+ * @author Nizar GUEDIDI
+ */
+public class CustomRequirementEditPartProvider extends CUMLEditPartProvider {
+
+ @Override
+ public synchronized boolean provides(IOperation operation) {
+ super.provides(operation);
+ if (operation instanceof CreateGraphicEditPartOperation) {
+ View view = ((IEditPartOperation) operation).getView();
+ if (!ElementTypes.DIAGRAM_ID.equals(UMLVisualIDRegistry.getModelID(view))) {
+ return false;
+ }
+ if (isAllowCaching() && getCachedPart(view) != null) {
+ return true;
+ }
+ IGraphicalEditPart part = createEditPart(view);
+ if (part != null) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ @Override
+ protected IGraphicalEditPart createEditPart(View view) {
+ if (view.getType().equals(SysMLGraphicalTypes.COMPARTMENT_SYSML_REQUIREMENT_IDINFO_AS_LIST_ID)) {
+ return new CustomRequirementInformationCompartmentEditPart(view);
+ }
+ if (view.getType().equals(SysMLGraphicalTypes.SHAPE_SYSML_REQUIREMENT_AS_CLASSIFER_ID)) {
+ return new CustomRequirementEditPart(view);
+ }
+ if (view.getType().equals(SysMLGraphicalTypes.LABEL_SYSML_REQUIREMENT_ID_ID)) {
+ return new CustomRequirementIdLabelEditPart(view);
+ }
+ if (view.getType().equals(SysMLGraphicalTypes.LABEL_SYSML_REQUIREMENT_TEXT_ID)) {
+ return new CustomRequirementTextLabelEditPart(view);
+ }
+
+ return super.createEditPart(view);
+ }
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/provider/RequirementVisualTypeProvider.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/provider/RequirementVisualTypeProvider.java
new file mode 100755
index 0000000..55025bf
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/provider/RequirementVisualTypeProvider.java
@@ -0,0 +1,28 @@
+/*****************************************************************************
+ * Copyright (c) 2015 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.diagram.requirement.provider;
+
+import org.eclipse.papyrus.gmf.diagram.common.provider.SysMLVisualTypeProvider;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLVisualTypeProvider;
+
+/**
+ * Visual type provider for the SysML Requirement Diagram.
+ */
+public class RequirementVisualTypeProvider extends SysMLVisualTypeProvider {
+
+ public RequirementVisualTypeProvider() {
+ super(new GraphicalTypeRegistry(), new UMLVisualTypeProvider());
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.ui/.classpath b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.ui/.classpath
new file mode 100755
index 0000000..64c5e31
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.ui/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.ui/.project b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.ui/.project
new file mode 100755
index 0000000..32eb33f
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.ui/.project
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.sysml.diagram.ui</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.oomph.version.VersionBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>check.maven.pom</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>ignore.lower.bound.dependency.ranges</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>release.path</key>
+ <value>/org.eclipse.papyrus.releng.main.release/release.xml</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.oomph.version.VersionNature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.ui/.settings/org.eclipse.jdt.core.prefs b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.ui/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 0000000..c585cc4
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.ui/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,291 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.ui/.settings/org.eclipse.jdt.ui.prefs b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.ui/.settings/org.eclipse.jdt.ui.prefs
new file mode 100755
index 0000000..954281d
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.ui/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,68 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+formatter_profile=_Papyrus
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.ui/.settings/org.eclipse.pde.api.tools.prefs b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.ui/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100755
index 0000000..23fb95e
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.ui/.settings/org.eclipse.pde.api.tools.prefs
@@ -0,0 +1,98 @@
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+API_USE_SCAN_FIELD_SEVERITY=Error
+API_USE_SCAN_METHOD_SEVERITY=Error
+API_USE_SCAN_TYPE_SEVERITY=Error
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Ignore
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_ANNOTATION=Ignore
+INVALID_JAVADOC_TAG=Ignore
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Ignore
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+MISSING_EE_DESCRIPTIONS=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=Enabled
+eclipse.preferences.version=1
+incompatible_api_component_version=Error
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Warning
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.ui/META-INF/MANIFEST.MF b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.ui/META-INF/MANIFEST.MF
new file mode 100755
index 0000000..2a0618d
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.ui/META-INF/MANIFEST.MF
@@ -0,0 +1,14 @@
+Manifest-Version: 1.0
+Export-Package: org.eclipse.papyrus.sysml.diagram.ui
+Require-Bundle: org.eclipse.papyrus.uml.diagram.wizards;bundle-version="[3.0.0,4.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.sysml.diagram.common;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.sysml.architecture;bundle-version="[1.0.0,2.0.0)"
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 2.0.0.qualifier
+Bundle-Localization: plugin
+Bundle-Name: %pluginName
+Bundle-Activator: org.eclipse.papyrus.sysml.diagram.ui.Activator
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.papyrus.sysml.diagram.ui;singleton:=true
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.ui/about.html b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.ui/about.html
new file mode 100755
index 0000000..d35d5ae
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.ui/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.ui/build.properties b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.ui/build.properties
new file mode 100755
index 0000000..0b21723
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.ui/build.properties
@@ -0,0 +1,7 @@
+#
+#Mon Sep 12 09:30:15 CEST 2011
+bin.includes=META-INF/,.,about.html,icons/,plugin.xml,plugin.properties
+output..=bin/
+src.includes = about.html
+source..=src/
+bin..=bin/
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.ui/icons/papyrus/new_sysml_model.gif b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.ui/icons/papyrus/new_sysml_model.gif
new file mode 100755
index 0000000..ecc0b71
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.ui/icons/papyrus/new_sysml_model.gif
Binary files differ
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.ui/icons/papyrus/new_sysml_project.gif b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.ui/icons/papyrus/new_sysml_project.gif
new file mode 100755
index 0000000..3637e8a
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.ui/icons/papyrus/new_sysml_project.gif
Binary files differ
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.ui/org.eclipse.papyrus.sysml.diagram.ui.iml b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.ui/org.eclipse.papyrus.sysml.diagram.ui.iml
new file mode 100755
index 0000000..e77c99a
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.ui/org.eclipse.papyrus.sysml.diagram.ui.iml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+ <component name="NewModuleRootManager" inherit-compiler-output="false">
+ <output url="file://$MODULE_DIR$/bin" />
+ <exclude-output />
+ <content url="file://$MODULE_DIR$">
+ <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
+ </content>
+ <orderEntry type="jdk" jdkName="J2SE-1.5" jdkType="JavaSDK" />
+ <orderEntry type="module" module-name="org.eclipse.papyrus.uml.diagram.wizards" />
+ <orderEntry type="module" module-name="org.eclipse.papyrus.sysml.diagram.common" />
+ <orderEntry type="library" name="ECLIPSE" level="application" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ </component>
+</module>
\ No newline at end of file
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.ui/plugin.properties b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.ui/plugin.properties
new file mode 100755
index 0000000..405eace
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.ui/plugin.properties
@@ -0,0 +1,12 @@
+#################################################################################
+# Copyright (c) 2010 CEA LIST.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Tatiana Fesenko (CEA LIST) tatiana.fesenko@cea.fr - initial API and implementation
+##################################################################################
+pluginName=UI Plugin for papyrus SysML diagrams
+providerName=Eclipse Modeling Project
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.ui/plugin.xml b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.ui/plugin.xml
new file mode 100755
index 0000000..81a652b
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.ui/plugin.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<plugin>
+<extension point="org.eclipse.ui.newWizards">
+ <wizard
+ category="org.eclipse.papyrus.wizards.category"
+ class="org.eclipse.papyrus.sysml.diagram.ui.NewSysMLProjectWizard"
+ finalPerspective="org.eclipse.papyrus.infra.core.perspective"
+ icon="icons/papyrus/new_sysml_project.gif"
+ id="org.eclipse.papyrus.uml.diagram.wizards.createsysmlproject"
+ name="%wizardSysMLProject"
+ project="true">
+ <description>
+ New SysML Project
+ </description>
+ </wizard>
+ <wizard
+ category="org.eclipse.papyrus.wizards.category"
+ class="org.eclipse.papyrus.sysml.diagram.ui.NewSysMLModelWizard"
+ finalPerspective="org.eclipse.papyrus.infra.core.perspective"
+ icon="icons/papyrus/new_sysml_model.gif"
+ id="org.eclipse.papyrus.uml.diagram.wizards.createsysmlmodel"
+ name="%wizardSysMLModel">
+ <selection
+ class="org.eclipse.core.resources.IResource">
+ </selection>
+ </wizard>
+</extension>
+
+<!--<extension-point id="templates" name="UML2 Model Templates" schema="schema/templates.exsd"/>-->
+
+</plugin>
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.ui/pom.xml b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.ui/pom.xml
new file mode 100755
index 0000000..ed752b7
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.ui/pom.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.papyrus.sysml</groupId>
+ <artifactId>org.eclipse.papyrus.sysml-diagram</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.papyrus.sysml.diagram.ui</artifactId>
+ <version>2.0.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project>
\ No newline at end of file
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.ui/src/org/eclipse/papyrus/sysml/diagram/ui/Activator.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.ui/src/org/eclipse/papyrus/sysml/diagram/ui/Activator.java
new file mode 100755
index 0000000..6e09ef0
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.ui/src/org/eclipse/papyrus/sysml/diagram/ui/Activator.java
@@ -0,0 +1,63 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Tatiana Fesenko (CEA LIST) - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.ui;
+
+import org.eclipse.core.runtime.Plugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends Plugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.sysml.diagram.ui"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.ui/src/org/eclipse/papyrus/sysml/diagram/ui/NewSysMLModelWizard.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.ui/src/org/eclipse/papyrus/sysml/diagram/ui/NewSysMLModelWizard.java
new file mode 100755
index 0000000..396da4b
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.ui/src/org/eclipse/papyrus/sysml/diagram/ui/NewSysMLModelWizard.java
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 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:
+ * Tatiana Fesenko (CEA LIST) - Initial API and implementation
+ * Christian W. Damus (CEA) - Support creating models in repositories (CDO)
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.ui;
+
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.papyrus.sysml.architecture.SysMLArchitectureContextIds;
+import org.eclipse.papyrus.uml.diagram.wizards.pages.SelectArchitectureContextPage;
+import org.eclipse.papyrus.uml.diagram.wizards.wizards.CreateModelWizard;
+import org.eclipse.ui.IWorkbench;
+
+
+/**
+ * The Class NewSysMLModelWizard.
+ */
+public class NewSysMLModelWizard extends CreateModelWizard {
+
+ /**
+ * Instantiates a new new sys ml model wizard.
+ */
+ public NewSysMLModelWizard() {
+ super();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void init(IWorkbench workbench, IStructuredSelection selection) {
+ super.init(workbench, selection);
+ setWindowTitle("New SysML Model");
+ }
+
+ @Override
+ public String getModelKindName() {
+ return "Papyrus SysML";
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String[] getSelectedContexts() {
+ return new String[] { SysMLArchitectureContextIds.SysML };
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected SelectArchitectureContextPage createSelectArchitectureContextPage() {
+ // here SysML is the only available category
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void saveDiagramCategorySettings() {
+ // here SysML is the only available category
+ }
+
+ @Override
+ public boolean isPapyrusRootWizard() {
+ return false;
+ }
+
+}
diff --git a/plugins/diagram/org.eclipse.papyrus.sysml.diagram.ui/src/org/eclipse/papyrus/sysml/diagram/ui/NewSysMLProjectWizard.java b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.ui/src/org/eclipse/papyrus/sysml/diagram/ui/NewSysMLProjectWizard.java
new file mode 100755
index 0000000..1d868b8
--- /dev/null
+++ b/plugins/diagram/org.eclipse.papyrus.sysml.diagram.ui/src/org/eclipse/papyrus/sysml/diagram/ui/NewSysMLProjectWizard.java
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Tatiana Fesenko (CEA LIST) - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.ui;
+
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.papyrus.sysml.architecture.SysMLArchitectureContextIds;
+import org.eclipse.papyrus.uml.diagram.wizards.pages.SelectArchitectureContextPage;
+import org.eclipse.papyrus.uml.diagram.wizards.wizards.NewPapyrusProjectWizard;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.dialogs.WizardNewProjectCreationPage;
+
+
+/**
+ * The Class NewSysMLProjectWizard.
+ */
+public class NewSysMLProjectWizard extends NewPapyrusProjectWizard {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void init(IWorkbench workbench, IStructuredSelection selection) {
+ super.init(workbench, selection);
+ setWindowTitle("New SysML Project");
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected WizardNewProjectCreationPage createNewProjectCreationPage() {
+ WizardNewProjectCreationPage newProjectPage = super.createNewProjectCreationPage();
+ newProjectPage.setTitle("Papyrus SysML Project");
+ newProjectPage.setDescription("Create a New Papyrus SysML Project");
+ return newProjectPage;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected SelectArchitectureContextPage createSelectArchitectureContextPage() {
+ // here SysML is the only available category
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void saveDiagramCategorySettings() {
+ // do nothing
+ // here SysML is the only available category
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String[] getSelectedContexts() {
+ return new String[] { SysMLArchitectureContextIds.SysML };
+ }
+
+ @Override
+ public boolean isPapyrusRootWizard() {
+ return false;
+ }
+
+}
diff --git a/plugins/diagram/pom.xml b/plugins/diagram/pom.xml
new file mode 100755
index 0000000..3451743
--- /dev/null
+++ b/plugins/diagram/pom.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>org.eclipse.papyrus.sysml-diagram</artifactId>
+ <packaging>pom</packaging>
+ <parent>
+ <groupId>org.eclipse.papyrus.sysml</groupId>
+ <artifactId>org.eclipse.papyrus.sysml</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <name>Papyrus SysSML Diagrams</name>
+ <description>The Papyrus implementations of the SysML 1.1 diagram editors.</description>
+
+ <modules>
+ <module>org.eclipse.papyrus.sysml.diagram.blockdefinition</module>
+ <module>org.eclipse.papyrus.sysml.diagram.common</module>
+ <module>org.eclipse.papyrus.sysml.diagram.css</module>
+ <module>org.eclipse.papyrus.sysml.diagram.internalblock</module>
+ <module>org.eclipse.papyrus.sysml.diagram.parametric</module>
+ <module>org.eclipse.papyrus.sysml.diagram.requirement</module>
+ <module>org.eclipse.papyrus.sysml.diagram.ui</module>
+ </modules>
+</project>
diff --git a/plugins/modelexplorer/.project b/plugins/modelexplorer/.project
new file mode 100755
index 0000000..452d999
--- /dev/null
+++ b/plugins/modelexplorer/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>modelexplorer</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/modelexplorer/.settings/org.eclipse.core.resources.prefs b/plugins/modelexplorer/.settings/org.eclipse.core.resources.prefs
new file mode 100755
index 0000000..99f26c0
--- /dev/null
+++ b/plugins/modelexplorer/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/.classpath b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/.classpath
new file mode 100755
index 0000000..856d2dc
--- /dev/null
+++ b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/.classpath
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="src-gen"/>
+ <classpathentry exported="true" kind="lib" path="bin" sourcepath="bin"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/.project b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/.project
new file mode 100755
index 0000000..f44b102
--- /dev/null
+++ b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/.project
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.sysml.modelexplorer</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>
+ <buildCommand>
+ <name>org.eclipse.oomph.version.VersionBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>check.maven.pom</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>ignore.lower.bound.dependency.ranges</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>release.path</key>
+ <value>/org.eclipse.papyrus.releng.main.release/release.xml</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.papyrus.emf.facet.common.ProjectNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.oomph.version.VersionNature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/.settings/org.eclipse.jdt.core.prefs b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 0000000..94d61f0
--- /dev/null
+++ b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,291 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/.settings/org.eclipse.jdt.ui.prefs b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/.settings/org.eclipse.jdt.ui.prefs
new file mode 100755
index 0000000..954281d
--- /dev/null
+++ b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,68 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+formatter_profile=_Papyrus
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/.settings/org.eclipse.pde.api.tools.prefs b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100755
index 0000000..23fb95e
--- /dev/null
+++ b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/.settings/org.eclipse.pde.api.tools.prefs
@@ -0,0 +1,98 @@
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+API_USE_SCAN_FIELD_SEVERITY=Error
+API_USE_SCAN_METHOD_SEVERITY=Error
+API_USE_SCAN_TYPE_SEVERITY=Error
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Ignore
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_ANNOTATION=Ignore
+INVALID_JAVADOC_TAG=Ignore
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Ignore
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+MISSING_EE_DESCRIPTIONS=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=Enabled
+eclipse.preferences.version=1
+incompatible_api_component_version=Error
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Warning
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
diff --git a/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/META-INF/MANIFEST.MF b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/META-INF/MANIFEST.MF
new file mode 100755
index 0000000..72c81a4
--- /dev/null
+++ b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/META-INF/MANIFEST.MF
@@ -0,0 +1,19 @@
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.papyrus.sysml.service.types;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.sysml.diagram.common;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.uml.modelexplorer;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.infra.newchild;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.views.modelexplorer;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.uml.internationalization.utils;bundle-version="[1.0.0,2.0.0)"
+Export-Package: org.eclipse.papyrus.sysml.modelexplorer
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-ClassPath: .,
+ bin
+Bundle-Version: 1.2.0.qualifier
+Bundle-Localization: plugin
+Bundle-Name: %pluginName
+Bundle-Activator: org.eclipse.papyrus.sysml.modelexplorer.Activator
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.papyrus.sysml.modelexplorer;singleton:=true
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
diff --git a/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/about.html b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/about.html
new file mode 100755
index 0000000..d35d5ae
--- /dev/null
+++ b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/build.properties b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/build.properties
new file mode 100755
index 0000000..9df3ee6
--- /dev/null
+++ b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/build.properties
@@ -0,0 +1,7 @@
+#
+#Mon Sep 12 09:30:16 CEST 2011
+bin.includes=META-INF/,.,plugin.xml,resources/,about.html,plugin.properties
+output..=bin/
+src.includes = about.html
+source..=src/,src-gen/
+bin..=bin/
diff --git a/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/plugin.properties b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/plugin.properties
new file mode 100755
index 0000000..16569df
--- /dev/null
+++ b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/plugin.properties
@@ -0,0 +1,16 @@
+##########################################################################################
+# Copyright (c) 2010 CEA LIST.
+#
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+#
+########################################################################################
+pluginName=ModelExplorer customization for SysML
+providerName=Eclipse Modeling Project
+
diff --git a/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/plugin.xml b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/plugin.xml
new file mode 100755
index 0000000..6024232
--- /dev/null
+++ b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/plugin.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?eclipse version="3.4"?>
+<plugin>
+
+<extension
+ point="org.eclipse.papyrus.infra.newchild">
+ <menuCreationModel
+ model="resources/SysML.creationmenumodel">
+ </menuCreationModel>
+</extension>
+</plugin>
diff --git a/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/pom.xml b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/pom.xml
new file mode 100755
index 0000000..0330a11
--- /dev/null
+++ b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/pom.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.papyrus.sysml</groupId>
+ <artifactId>org.eclipse.papyrus.sysml-modelexplorer</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.papyrus.sysml.modelexplorer</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/resources/SimpleSysML.custom b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/resources/SimpleSysML.custom
new file mode 100755
index 0000000..b447195
--- /dev/null
+++ b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/resources/SimpleSysML.custom
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<custom:Customization xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:custom="http://www.eclipse.org/papyrus/emf/facet/custom/0.2.incubation/custom" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:efacet="http://www.eclipse.org/papyrus/emf/facet/efacet/0.2.incubation/efacet" xmlns:javaQuery="http://www.eclipse.org/papyrus/emf/facet/query/java/0.2.incubation/javaquery" name="SimpleSysML" documentation="Display SysML elements">
+ <eClassifiers xsi:type="custom:EClassCustomization" name="SysMLElement">
+ <extendedMetaclass href="http://www.eclipse.org/uml2/5.0.0/UML#//Element"/>
+ <facetOperations name="GetSysMLElementIcon">
+ <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/papyrus/emf/facet/custom/0.2.incubation/custom_primitive_types#//Image"/>
+ <eParameters name="eStructuralElement">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EStructuralFeature"/>
+ </eParameters>
+ <query xsi:type="javaQuery:JavaQuery" implementationClassName="org.eclipse.papyrus.sysml.modelexplorer.query.GetImageQuery"/>
+ <override xsi:type="efacet:FacetOperation" href="../../../plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject/image"/>
+ </facetOperations>
+ </eClassifiers>
+ <eClassifiers xsi:type="custom:EClassCustomization" name="NamedElement">
+ <extendedMetaclass href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement"/>
+ <facetOperations name="GetSysMLElementLabel">
+ <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eParameters name="eObject">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ </eParameters>
+ <query xsi:type="javaQuery:JavaQuery" implementationClassName="org.eclipse.papyrus.sysml.modelexplorer.query.GetLabelQuery"/>
+ <override xsi:type="efacet:FacetOperation" href="../../../plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject/label"/>
+ </facetOperations>
+ <extendedFacets href="../../../plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject"/>
+ </eClassifiers>
+</custom:Customization>
diff --git a/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/resources/SysML.creationmenumodel b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/resources/SysML.creationmenumodel
new file mode 100755
index 0000000..3fa3015
--- /dev/null
+++ b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/resources/SysML.creationmenumodel
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<ElementCreationMenuModel:Folder xmlns:ElementCreationMenuModel="http://www.eclipse.org/papyrus/infra/newchild/elementcreationmenumodel" xmlns:elementtypesconfigurations="http://www.eclipse.org/papyrus/infra/elementtypesconfigurations/1.2" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" label="New SysML Child" xmi:id="_R2sjUOJYEeOKT_prO3j7bg" xmi:version="2.0">
+ <menu displayAllRoles="false" label="ActorPart" xmi:id="_ENmJAOJbEeOKdcZwTkb3kA" xsi:type="ElementCreationMenuModel:CreationMenu">
+ <elementType href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.ActorPartProperty" xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration"/>
+ </menu>
+ <menu displayAllRoles="false" label="Allocate" xmi:id="_ENmJAeJbEeOKdcZwTkb3kA" xsi:type="ElementCreationMenuModel:CreationMenu">
+ <elementType href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.Allocate" xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration"/>
+ </menu>
+ <menu displayAllRoles="false" label="Block" xmi:id="_ENmJCeJbEeOKdcZwTkb3kA" xsi:type="ElementCreationMenuModel:CreationMenu">
+ <elementType href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.Block" xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration"/>
+ </menu>
+ <menu displayAllRoles="false" label="Conform" xmi:id="_ENmJCuJbEeOKdcZwTkb3kA" xsi:type="ElementCreationMenuModel:CreationMenu">
+ <elementType href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.Conform" xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration"/>
+ </menu>
+ <menu displayAllRoles="false" label="ConstraintBlock" xmi:id="_ENmJC-JbEeOKdcZwTkb3kA" xsi:type="ElementCreationMenuModel:CreationMenu">
+ <elementType href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.ConstraintBlock" xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration"/>
+ </menu>
+ <menu displayAllRoles="false" label="ConstraintProperty" xmi:id="_ENmJDOJbEeOKdcZwTkb3kA" xsi:type="ElementCreationMenuModel:CreationMenu">
+ <elementType href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.ConstraintProperty" xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration"/>
+ </menu>
+ <menu displayAllRoles="false" label="Copy" xmi:id="_ENmJDeJbEeOKdcZwTkb3kA" xsi:type="ElementCreationMenuModel:CreationMenu">
+ <elementType href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.Copy" xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration"/>
+ </menu>
+ <menu displayAllRoles="false" label="DeriveReqt" xmi:id="_ENmJDuJbEeOKdcZwTkb3kA" xsi:type="ElementCreationMenuModel:CreationMenu">
+ <elementType href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.DeriveReqt" xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration"/>
+ </menu>
+ <menu displayAllRoles="false" label="Dimension" xmi:id="_ENmJD-JbEeOKdcZwTkb3kA" xsi:type="ElementCreationMenuModel:CreationMenu">
+ <elementType href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.Dimension" xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration"/>
+ </menu>
+ <menu displayAllRoles="false" label="FlowPort" xmi:id="_ENmJEOJbEeOKdcZwTkb3kA" xsi:type="ElementCreationMenuModel:CreationMenu">
+ <elementType href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.FlowPort" xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration"/>
+ </menu>
+ <menu displayAllRoles="false" label="FlowPort In" xmi:id="_ENmJEeJbEeOKdcZwTkb3kA" xsi:type="ElementCreationMenuModel:CreationMenu">
+ <elementType href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.FlowPort_In" xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration"/>
+ </menu>
+ <menu displayAllRoles="false" label="FlowPort Out" xmi:id="_ENmJFOJbEeOKdcZwTkb3kA" xsi:type="ElementCreationMenuModel:CreationMenu">
+ <elementType href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.FlowPort_Out" xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration"/>
+ </menu>
+ <menu displayAllRoles="false" label="FlowPort InOut" xmi:id="_ENmJEuJbEeOKdcZwTkb3kA" xsi:type="ElementCreationMenuModel:CreationMenu">
+ <elementType href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.FlowPort_InOut" xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration"/>
+ </menu>
+ <menu displayAllRoles="false" label="FlowPort (non atomic)" xmi:id="_ENmJE-JbEeOKdcZwTkb3kA" xsi:type="ElementCreationMenuModel:CreationMenu">
+ <elementType href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.FlowPort_NA" xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration"/>
+ </menu>
+ <menu displayAllRoles="false" label="FlowProperty" xmi:id="_ENmJFeJbEeOKdcZwTkb3kA" xsi:type="ElementCreationMenuModel:CreationMenu">
+ <elementType href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.FlowProperty" xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration"/>
+ </menu>
+ <menu displayAllRoles="false" label="FlowSpecification" xmi:id="_ENmJFuJbEeOKdcZwTkb3kA" xsi:type="ElementCreationMenuModel:CreationMenu">
+ <elementType href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.FlowSpecification" xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration"/>
+ </menu>
+ <menu displayAllRoles="false" label="ItemFlow" xmi:id="_ENmJF-JbEeOKdcZwTkb3kA" xsi:type="ElementCreationMenuModel:CreationMenu">
+ <elementType href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.ItemFlow" xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration"/>
+ </menu>
+ <menu displayAllRoles="false" icon="" label="Parameter" xmi:id="_0BGyoOJiEeOfp_s9yPC7Ww" xsi:type="ElementCreationMenuModel:CreationMenu">
+ <elementType href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.ConstraintBlockParameter" xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration"/>
+ </menu>
+ <menu displayAllRoles="false" label="Part" xmi:id="_ENmJGOJbEeOKdcZwTkb3kA" xsi:type="ElementCreationMenuModel:CreationMenu">
+ <elementType href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.PartProperty" xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration"/>
+ </menu>
+ <menu displayAllRoles="false" label="Problem" xmi:id="_ENmJGeJbEeOKdcZwTkb3kA" xsi:type="ElementCreationMenuModel:CreationMenu">
+ <elementType href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.Problem" xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration"/>
+ </menu>
+ <menu displayAllRoles="false" label="Rationale" xmi:id="_ENmJGuJbEeOKdcZwTkb3kA" xsi:type="ElementCreationMenuModel:CreationMenu">
+ <elementType href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.Rationale" xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration"/>
+ </menu>
+ <menu displayAllRoles="false" label="Reference" xmi:id="_ENmJG-JbEeOKdcZwTkb3kA" xsi:type="ElementCreationMenuModel:CreationMenu">
+ <elementType href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.ReferenceProperty" xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration"/>
+ </menu>
+ <menu displayAllRoles="false" label="Requirement" xmi:id="_ENmJHOJbEeOKdcZwTkb3kA" xsi:type="ElementCreationMenuModel:CreationMenu">
+ <elementType href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.Requirement" xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration"/>
+ </menu>
+ <menu displayAllRoles="false" label="Satisfy" xmi:id="_ENmJHeJbEeOKdcZwTkb3kA" xsi:type="ElementCreationMenuModel:CreationMenu">
+ <elementType href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.Satisfy" xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration"/>
+ </menu>
+ <menu displayAllRoles="false" label="Unit" xmi:id="_ENmJHuJbEeOKdcZwTkb3kA" xsi:type="ElementCreationMenuModel:CreationMenu">
+ <elementType href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.Unit" xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration"/>
+ </menu>
+ <menu displayAllRoles="false" label="Value" xmi:id="_ENmJH-JbEeOKdcZwTkb3kA" xsi:type="ElementCreationMenuModel:CreationMenu">
+ <elementType href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.ValueProperty" xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration"/>
+ </menu>
+ <menu displayAllRoles="false" label="ValueType" xmi:id="_ENmJIOJbEeOKdcZwTkb3kA" xsi:type="ElementCreationMenuModel:CreationMenu">
+ <elementType href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.ValueType" xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration"/>
+ </menu>
+ <menu displayAllRoles="false" label="Verify" xmi:id="_ENmJI-JbEeOKdcZwTkb3kA" xsi:type="ElementCreationMenuModel:CreationMenu">
+ <elementType href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.Verify" xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration"/>
+ </menu>
+ <menu displayAllRoles="false" label="View" xmi:id="_ENmJJOJbEeOKdcZwTkb3kA" xsi:type="ElementCreationMenuModel:CreationMenu">
+ <elementType href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.View" xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration"/>
+ </menu>
+ <menu displayAllRoles="false" label="ViewPoint" xmi:id="_ENmJJeJbEeOKdcZwTkb3kA" xsi:type="ElementCreationMenuModel:CreationMenu">
+ <elementType href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.ViewPoint" xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration"/>
+ </menu>
+</ElementCreationMenuModel:Folder>
diff --git a/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/filter/CommandFilter.java b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/filter/CommandFilter.java
new file mode 100755
index 0000000..fb27838
--- /dev/null
+++ b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/filter/CommandFilter.java
@@ -0,0 +1,79 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelexplorer.filter;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.papyrus.views.modelexplorer.ICommandFilter;
+
+public class CommandFilter implements ICommandFilter {
+
+ private List<IElementType> visibleCommands;
+
+ @Override
+ public List<IElementType> getVisibleCommands() {
+ if (visibleCommands == null) {
+ visibleCommands = new ArrayList<IElementType>();
+
+ visibleCommands.add(SysMLElementTypes.ACTOR_PART_PROPERTY);
+ // visibleCommands.add(SysMLElementTypes.ALLOCATE);
+ // visibleCommands.add(SysMLElementTypes.ASSOCIATION);
+ // visibleCommands.add(SysMLElementTypes.ASSOCIATION_COMPOSITE);
+ // visibleCommands.add(SysMLElementTypes.ASSOCIATION_COMPOSITE_DIRECTED);
+ // visibleCommands.add(SysMLElementTypes.ASSOCIATION_NONE);
+ // visibleCommands.add(SysMLElementTypes.ASSOCIATION_NONE_DIRECTED);
+ // visibleCommands.add(SysMLElementTypes.ASSOCIATION_SHARED);
+ // visibleCommands.add(SysMLElementTypes.ASSOCIATION_SHARED_DIRECTED);
+ visibleCommands.add(SysMLElementTypes.BLOCK);
+ // visibleCommands.add(SysMLElementTypes.CONFORM);
+ visibleCommands.add(SysMLElementTypes.CONSTRAINT_BLOCK);
+ visibleCommands.add(SysMLElementTypes.CONSTRAINT_PROPERTY);
+ // visibleCommands.add(SysMLElementTypes.COPY);
+ // visibleCommands.add(SysMLElementTypes.DERIVE_REQT);
+ visibleCommands.add(SysMLElementTypes.DIMENSION);
+ visibleCommands.add(SysMLElementTypes.FLOW_PORT);
+ visibleCommands.add(SysMLElementTypes.FLOW_PORT_IN_OUT);
+ visibleCommands.add(SysMLElementTypes.FLOW_PORT_IN);
+ visibleCommands.add(SysMLElementTypes.FLOW_PORT_OUT);
+ // visibleCommands.add(SysMLElementTypes.FLOW_PORT_NA);
+ visibleCommands.add(SysMLElementTypes.FLOW_PROPERTY);
+ visibleCommands.add(SysMLElementTypes.FLOW_SPECIFICATION);
+ // visibleCommands.add(SysMLElementTypes.ITEM_FLOW);
+ visibleCommands.add(SysMLElementTypes.PART_PROPERTY);
+ visibleCommands.add(SysMLElementTypes.PROBLEM);
+ visibleCommands.add(SysMLElementTypes.RATIONALE);
+ visibleCommands.add(SysMLElementTypes.REFERENCE_PROPERTY);
+ visibleCommands.add(SysMLElementTypes.REQUIREMENT);
+ // visibleCommands.add(SysMLElementTypes.SATISFY);
+ visibleCommands.add(SysMLElementTypes.UNIT);
+ visibleCommands.add(SysMLElementTypes.VALUE_PROPERTY);
+ visibleCommands.add(SysMLElementTypes.VALUE_TYPE);
+ // visibleCommands.add(SysMLElementTypes.VALUE_TYPE_ENUMERATION);
+ // visibleCommands.add(SysMLElementTypes.VALUE_TYPE_PRIMITIVE_TYPE);
+ // visibleCommands.add(SysMLElementTypes.VERIFY);
+ visibleCommands.add(SysMLElementTypes.VIEW);
+ visibleCommands.add(SysMLElementTypes.VIEW_POINT);
+
+ // UMLElementTypes.PROPERTY is required by ConstraintBlock Parameter
+ visibleCommands.add(UMLElementTypes.PROPERTY);
+
+ }
+
+ return visibleCommands;
+ }
+}
diff --git a/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/ActorPartPropertyHandler.java b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/ActorPartPropertyHandler.java
new file mode 100755
index 0000000..21ef8d1
--- /dev/null
+++ b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/ActorPartPropertyHandler.java
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelexplorer.handler;
+
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.UnexecutableCommand;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.papyrus.infra.emf.gmf.command.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.sysml.diagram.common.commands.CreateActorPartWithTypeConfigureCommandFactory;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for ActorPart (Property) creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class ActorPartPropertyHandler extends AbstractSysmlModelExplorerCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.creation.handler.CreateHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.ACTOR_PART_PROPERTY;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command buildCommand() {
+
+ if (getCommandContext() == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ EObject container = getCommandContext().getContainer();
+ EReference reference = getCommandContext().getReference();
+
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(container);
+ if (provider == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ CreateElementRequest createRequest = null;
+ if (reference == null) {
+ createRequest = new CreateElementRequest(container, getElementTypeToCreate());
+ } else {
+ createRequest = new CreateElementRequest(container, getElementTypeToCreate(), reference);
+ }
+ createRequest.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateActorPartWithTypeConfigureCommandFactory());
+
+ // Retrieve create command from the Element Edit service
+ ICommand createGMFCommand = provider.getEditCommand(createRequest);
+ if (createGMFCommand != null) {
+ Command emfCommand = new GMFtoEMFCommandWrapper(createGMFCommand);
+ return emfCommand;
+ }
+ return UnexecutableCommand.INSTANCE;
+ }
+}
diff --git a/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/AllocateHandler.java b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/AllocateHandler.java
new file mode 100755
index 0000000..07b63b0
--- /dev/null
+++ b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/AllocateHandler.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelexplorer.handler;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for Allocate creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class AllocateHandler extends AbstractSysmlModelExplorerCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.types.ui.handlers.AbstractCreateCommandHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.ALLOCATE;
+ }
+}
diff --git a/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/AssociationCompositeDirectedHandler.java b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/AssociationCompositeDirectedHandler.java
new file mode 100755
index 0000000..a647bb0
--- /dev/null
+++ b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/AssociationCompositeDirectedHandler.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelexplorer.handler;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for AssociationCompositeDirected creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class AssociationCompositeDirectedHandler extends AbstractSysmlModelExplorerCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.types.ui.handlers.AbstractCreateCommandHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.ASSOCIATION_COMPOSITE_DIRECTED;
+ }
+}
diff --git a/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/AssociationCompositeHandler.java b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/AssociationCompositeHandler.java
new file mode 100755
index 0000000..61a4c1f
--- /dev/null
+++ b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/AssociationCompositeHandler.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelexplorer.handler;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for AssociationComposite creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class AssociationCompositeHandler extends AbstractSysmlModelExplorerCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.types.ui.handlers.AbstractCreateCommandHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.ASSOCIATION_COMPOSITE;
+ }
+}
diff --git a/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/AssociationHandler.java b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/AssociationHandler.java
new file mode 100755
index 0000000..28bb2cc
--- /dev/null
+++ b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/AssociationHandler.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelexplorer.handler;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for Association creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class AssociationHandler extends AbstractSysmlModelExplorerCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.types.ui.handlers.AbstractCreateCommandHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.ASSOCIATION;
+ }
+}
diff --git a/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/AssociationNoneDirectedHandler.java b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/AssociationNoneDirectedHandler.java
new file mode 100755
index 0000000..bb11abf
--- /dev/null
+++ b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/AssociationNoneDirectedHandler.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelexplorer.handler;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for AssociationNoneDirected creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class AssociationNoneDirectedHandler extends AbstractSysmlModelExplorerCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.types.ui.handlers.AbstractCreateCommandHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.ASSOCIATION_NONE_DIRECTED;
+ }
+}
diff --git a/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/AssociationNoneHandler.java b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/AssociationNoneHandler.java
new file mode 100755
index 0000000..ecbe2d7
--- /dev/null
+++ b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/AssociationNoneHandler.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelexplorer.handler;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for AssociationNone creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class AssociationNoneHandler extends AbstractSysmlModelExplorerCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.types.ui.handlers.AbstractCreateCommandHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.ASSOCIATION_NONE;
+ }
+}
diff --git a/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/AssociationSharedDirectedHandler.java b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/AssociationSharedDirectedHandler.java
new file mode 100755
index 0000000..514aa14
--- /dev/null
+++ b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/AssociationSharedDirectedHandler.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelexplorer.handler;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for AssociationSharedDirected creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class AssociationSharedDirectedHandler extends AbstractSysmlModelExplorerCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.types.ui.handlers.AbstractCreateCommandHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.ASSOCIATION_SHARED_DIRECTED;
+ }
+}
diff --git a/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/AssociationSharedHandler.java b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/AssociationSharedHandler.java
new file mode 100755
index 0000000..ab5d3e8
--- /dev/null
+++ b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/AssociationSharedHandler.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelexplorer.handler;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for AssociationShared creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class AssociationSharedHandler extends AbstractSysmlModelExplorerCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.types.ui.handlers.AbstractCreateCommandHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.ASSOCIATION_SHARED;
+ }
+}
diff --git a/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/BlockHandler.java b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/BlockHandler.java
new file mode 100755
index 0000000..d333eaf
--- /dev/null
+++ b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/BlockHandler.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelexplorer.handler;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for Block creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class BlockHandler extends AbstractSysmlModelExplorerCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.creation.handler.CreateHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.BLOCK;
+ }
+}
diff --git a/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/ConformHandler.java b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/ConformHandler.java
new file mode 100755
index 0000000..f442300
--- /dev/null
+++ b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/ConformHandler.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelexplorer.handler;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for Conform creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class ConformHandler extends AbstractSysmlModelExplorerCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.types.ui.handlers.AbstractCreateCommandHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.CONFORM;
+ }
+}
diff --git a/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/ConstraintBlockHandler.java b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/ConstraintBlockHandler.java
new file mode 100755
index 0000000..dd139c3
--- /dev/null
+++ b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/ConstraintBlockHandler.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelexplorer.handler;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for ConstraintBlock creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class ConstraintBlockHandler extends AbstractSysmlModelExplorerCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.types.ui.handlers.AbstractCreateCommandHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.CONSTRAINT_BLOCK;
+ }
+}
diff --git a/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/ConstraintBlockParameterHandler.java b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/ConstraintBlockParameterHandler.java
new file mode 100755
index 0000000..1c8cc33
--- /dev/null
+++ b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/ConstraintBlockParameterHandler.java
@@ -0,0 +1,96 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelexplorer.handler;
+
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.UnexecutableCommand;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.papyrus.infra.emf.gmf.command.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.infra.services.edit.commands.ConfigureFeatureCommandFactory;
+import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * <pre>
+ * Command handler for Problem creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class ConstraintBlockParameterHandler extends AbstractSysmlModelExplorerCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.types.ui.handlers.AbstractCreateCommandHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return UMLElementTypes.PROPERTY;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command buildCommand() {
+
+ if (getCommandContext() == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ EObject container = getCommandContext().getContainer();
+ EReference reference = getCommandContext().getReference();
+
+ if (!(container instanceof Element)) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(container);
+ if (provider == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ CreateElementRequest createRequest = null;
+ if (reference == null) {
+ createRequest = new CreateElementRequest(container, getElementTypeToCreate());
+ } else {
+ createRequest = new CreateElementRequest(container, getElementTypeToCreate(), reference);
+ }
+
+ String name = NamedElementUtil.getDefaultNameWithIncrementFromBase("parameter", ((Element) container).eContents()); //$NON-NLS-1$
+ createRequest.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new ConfigureFeatureCommandFactory(UMLPackage.eINSTANCE.getNamedElement_Name(), name));
+
+ // Retrieve create command from the Element Edit service
+ ICommand createGMFCommand = provider.getEditCommand(createRequest);
+ if (createGMFCommand != null) {
+ Command emfCommand = new GMFtoEMFCommandWrapper(createGMFCommand);
+ return emfCommand;
+ }
+ return UnexecutableCommand.INSTANCE;
+ }
+}
diff --git a/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/ConstraintPropertyHandler.java b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/ConstraintPropertyHandler.java
new file mode 100755
index 0000000..12e7b98
--- /dev/null
+++ b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/ConstraintPropertyHandler.java
@@ -0,0 +1,85 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelexplorer.handler;
+
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.UnexecutableCommand;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.papyrus.infra.emf.gmf.command.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.sysml.diagram.common.commands.CreateConstraintPropertyWithTypeConfigureCommandFactory;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for ConstraintProperty creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class ConstraintPropertyHandler extends AbstractSysmlModelExplorerCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.types.ui.handlers.AbstractCreateCommandHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.CONSTRAINT_PROPERTY;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command buildCommand() {
+
+ if (getCommandContext() == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ EObject container = getCommandContext().getContainer();
+ EReference reference = getCommandContext().getReference();
+
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(container);
+ if (provider == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ CreateElementRequest createRequest = null;
+ if (reference == null) {
+ createRequest = new CreateElementRequest(container, getElementTypeToCreate());
+ } else {
+ createRequest = new CreateElementRequest(container, getElementTypeToCreate(), reference);
+ }
+ createRequest.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateConstraintPropertyWithTypeConfigureCommandFactory());
+
+ // Retrieve create command from the Element Edit service
+ ICommand createGMFCommand = provider.getEditCommand(createRequest);
+ Command emfCommand = new GMFtoEMFCommandWrapper(createGMFCommand);
+ return emfCommand;
+ }
+
+}
diff --git a/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/CopyHandler.java b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/CopyHandler.java
new file mode 100755
index 0000000..4b68163
--- /dev/null
+++ b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/CopyHandler.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelexplorer.handler;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for Copy creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class CopyHandler extends AbstractSysmlModelExplorerCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.types.ui.handlers.AbstractCreateCommandHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.COPY;
+ }
+}
diff --git a/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/DeriveReqtHandler.java b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/DeriveReqtHandler.java
new file mode 100755
index 0000000..43fd8d5
--- /dev/null
+++ b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/DeriveReqtHandler.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelexplorer.handler;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for DeriveReqt creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class DeriveReqtHandler extends AbstractSysmlModelExplorerCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.creation.handler.CreateHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.DERIVE_REQT;
+ }
+}
diff --git a/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/DimensionHandler.java b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/DimensionHandler.java
new file mode 100755
index 0000000..eb07175
--- /dev/null
+++ b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/DimensionHandler.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelexplorer.handler;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for Dimension creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class DimensionHandler extends AbstractSysmlModelExplorerCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.types.ui.handlers.AbstractCreateCommandHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.DIMENSION;
+ }
+}
diff --git a/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/FlowPortHandler.java b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/FlowPortHandler.java
new file mode 100755
index 0000000..bd523b2
--- /dev/null
+++ b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/FlowPortHandler.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelexplorer.handler;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for FlowPort creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class FlowPortHandler extends AbstractSysmlModelExplorerCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.creation.handler.CreateHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.FLOW_PORT;
+ }
+}
diff --git a/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/FlowPort_InHandler.java b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/FlowPort_InHandler.java
new file mode 100755
index 0000000..221f7f3
--- /dev/null
+++ b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/FlowPort_InHandler.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelexplorer.handler;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for FlowPort_In creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class FlowPort_InHandler extends AbstractSysmlModelExplorerCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.types.ui.handlers.AbstractCreateCommandHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.FLOW_PORT_IN;
+ }
+}
diff --git a/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/FlowPort_InOutHandler.java b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/FlowPort_InOutHandler.java
new file mode 100755
index 0000000..760e439
--- /dev/null
+++ b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/FlowPort_InOutHandler.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelexplorer.handler;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for FlowPort_InOut creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class FlowPort_InOutHandler extends AbstractSysmlModelExplorerCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.types.ui.handlers.AbstractCreateCommandHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.FLOW_PORT_IN_OUT;
+ }
+}
diff --git a/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/FlowPort_NAHandler.java b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/FlowPort_NAHandler.java
new file mode 100755
index 0000000..a7fbd60
--- /dev/null
+++ b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/FlowPort_NAHandler.java
@@ -0,0 +1,70 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelexplorer.handler;
+
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.UnexecutableCommand;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.papyrus.infra.emf.gmf.command.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.sysml.diagram.common.commands.CreateFlowPortWithFlowSpecificationConfigureCommandFactory;
+
+/**
+ * <pre>
+ * Command handler for FlowPort non atomic creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class FlowPort_NAHandler extends FlowPortHandler {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command buildCommand() {
+
+ if (getCommandContext() == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ EObject container = getCommandContext().getContainer();
+ EReference reference = getCommandContext().getReference();
+
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(container);
+ if (provider == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ CreateElementRequest createRequest = null;
+ if (reference == null) {
+ createRequest = new CreateElementRequest(container, getElementTypeToCreate());
+ } else {
+ createRequest = new CreateElementRequest(container, getElementTypeToCreate(), reference);
+ }
+ createRequest.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateFlowPortWithFlowSpecificationConfigureCommandFactory());
+
+ // Retrieve create command from the Element Edit service
+ ICommand createGMFCommand = provider.getEditCommand(createRequest);
+ if (createGMFCommand != null) {
+ Command emfCommand = new GMFtoEMFCommandWrapper(createGMFCommand);
+ return emfCommand;
+ }
+ return UnexecutableCommand.INSTANCE;
+ }
+}
diff --git a/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/FlowPort_OutHandler.java b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/FlowPort_OutHandler.java
new file mode 100755
index 0000000..540868f
--- /dev/null
+++ b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/FlowPort_OutHandler.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelexplorer.handler;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for FlowPort_Out creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class FlowPort_OutHandler extends AbstractSysmlModelExplorerCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.types.ui.handlers.AbstractCreateCommandHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.FLOW_PORT_OUT;
+ }
+}
diff --git a/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/FlowPropertyHandler.java b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/FlowPropertyHandler.java
new file mode 100755
index 0000000..2dfe047
--- /dev/null
+++ b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/FlowPropertyHandler.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelexplorer.handler;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for FlowProperty creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class FlowPropertyHandler extends AbstractSysmlModelExplorerCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.creation.handler.CreateHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.FLOW_PROPERTY;
+ }
+}
diff --git a/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/FlowSpecificationHandler.java b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/FlowSpecificationHandler.java
new file mode 100755
index 0000000..a4551a9
--- /dev/null
+++ b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/FlowSpecificationHandler.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelexplorer.handler;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for FlowSpecification creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class FlowSpecificationHandler extends AbstractSysmlModelExplorerCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.creation.handler.CreateHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.FLOW_SPECIFICATION;
+ }
+}
diff --git a/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/ItemFlowHandler.java b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/ItemFlowHandler.java
new file mode 100755
index 0000000..10485ba
--- /dev/null
+++ b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/ItemFlowHandler.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelexplorer.handler;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for ItemFlow creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class ItemFlowHandler extends AbstractSysmlModelExplorerCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.types.ui.handlers.AbstractCreateCommandHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.ITEM_FLOW;
+ }
+}
diff --git a/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/PartPropertyHandler.java b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/PartPropertyHandler.java
new file mode 100755
index 0000000..2d46527
--- /dev/null
+++ b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/PartPropertyHandler.java
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelexplorer.handler;
+
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.UnexecutableCommand;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.papyrus.infra.emf.gmf.command.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.sysml.diagram.common.commands.CreatePartWithTypeConfigureCommandFactory;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for Part (Property) creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class PartPropertyHandler extends AbstractSysmlModelExplorerCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.creation.handler.CreateHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.PART_PROPERTY;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command buildCommand() {
+
+ if (getCommandContext() == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ EObject container = getCommandContext().getContainer();
+ EReference reference = getCommandContext().getReference();
+
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(container);
+ if (provider == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ CreateElementRequest createRequest = null;
+ if (reference == null) {
+ createRequest = new CreateElementRequest(container, getElementTypeToCreate());
+ } else {
+ createRequest = new CreateElementRequest(container, getElementTypeToCreate(), reference);
+ }
+ createRequest.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreatePartWithTypeConfigureCommandFactory());
+
+ // Retrieve create command from the Element Edit service
+ ICommand createGMFCommand = provider.getEditCommand(createRequest);
+ if (createGMFCommand != null) {
+ Command emfCommand = new GMFtoEMFCommandWrapper(createGMFCommand);
+ return emfCommand;
+ }
+ return UnexecutableCommand.INSTANCE;
+ }
+}
diff --git a/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/ProblemHandler.java b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/ProblemHandler.java
new file mode 100755
index 0000000..8d25a4d
--- /dev/null
+++ b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/ProblemHandler.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelexplorer.handler;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for Problem creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class ProblemHandler extends AbstractSysmlModelExplorerCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.types.ui.handlers.AbstractCreateCommandHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.PROBLEM;
+ }
+}
diff --git a/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/RationaleHandler.java b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/RationaleHandler.java
new file mode 100755
index 0000000..c48f97d
--- /dev/null
+++ b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/RationaleHandler.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelexplorer.handler;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for Rationale creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class RationaleHandler extends AbstractSysmlModelExplorerCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.types.ui.handlers.AbstractCreateCommandHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.RATIONALE;
+ }
+}
diff --git a/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/ReferencePropertyHandler.java b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/ReferencePropertyHandler.java
new file mode 100755
index 0000000..8c06719
--- /dev/null
+++ b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/ReferencePropertyHandler.java
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelexplorer.handler;
+
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.UnexecutableCommand;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.papyrus.infra.emf.gmf.command.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.sysml.diagram.common.commands.CreateReferenceWithTypeConfigureCommandFactory;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for Reference (Property) creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class ReferencePropertyHandler extends AbstractSysmlModelExplorerCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.creation.handler.CreateHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.REFERENCE_PROPERTY;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command buildCommand() {
+
+ if (getCommandContext() == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ EObject container = getCommandContext().getContainer();
+ EReference reference = getCommandContext().getReference();
+
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(container);
+ if (provider == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ CreateElementRequest createRequest = null;
+ if (reference == null) {
+ createRequest = new CreateElementRequest(container, getElementTypeToCreate());
+ } else {
+ createRequest = new CreateElementRequest(container, getElementTypeToCreate(), reference);
+ }
+ createRequest.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateReferenceWithTypeConfigureCommandFactory());
+
+ // Retrieve create command from the Element Edit service
+ ICommand createGMFCommand = provider.getEditCommand(createRequest);
+ if (createGMFCommand != null) {
+ Command emfCommand = new GMFtoEMFCommandWrapper(createGMFCommand);
+ return emfCommand;
+ }
+ return UnexecutableCommand.INSTANCE;
+ }
+}
diff --git a/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/RequirementHandler.java b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/RequirementHandler.java
new file mode 100755
index 0000000..2efaa5c
--- /dev/null
+++ b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/RequirementHandler.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelexplorer.handler;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for Requirement creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class RequirementHandler extends AbstractSysmlModelExplorerCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.creation.handler.CreateHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.REQUIREMENT;
+ }
+}
diff --git a/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/SatisfyHandler.java b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/SatisfyHandler.java
new file mode 100755
index 0000000..93bdceb
--- /dev/null
+++ b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/SatisfyHandler.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelexplorer.handler;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for Satisfy creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class SatisfyHandler extends AbstractSysmlModelExplorerCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.types.ui.handlers.AbstractCreateCommandHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.SATISFY;
+ }
+}
diff --git a/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/UnitHandler.java b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/UnitHandler.java
new file mode 100755
index 0000000..17ac159
--- /dev/null
+++ b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/UnitHandler.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelexplorer.handler;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for Unit creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class UnitHandler extends AbstractSysmlModelExplorerCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.types.ui.handlers.AbstractCreateCommandHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.UNIT;
+ }
+}
diff --git a/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/ValuePropertyHandler.java b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/ValuePropertyHandler.java
new file mode 100755
index 0000000..c5b3079
--- /dev/null
+++ b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/ValuePropertyHandler.java
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelexplorer.handler;
+
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.UnexecutableCommand;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.papyrus.infra.emf.gmf.command.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.sysml.diagram.common.commands.CreateValueWithTypeConfigureCommandFactory;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for Value (Property) creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class ValuePropertyHandler extends AbstractSysmlModelExplorerCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.creation.handler.CreateHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.VALUE_PROPERTY;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command buildCommand() {
+
+ if (getCommandContext() == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ EObject container = getCommandContext().getContainer();
+ EReference reference = getCommandContext().getReference();
+
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(container);
+ if (provider == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ CreateElementRequest createRequest = null;
+ if (reference == null) {
+ createRequest = new CreateElementRequest(container, getElementTypeToCreate());
+ } else {
+ createRequest = new CreateElementRequest(container, getElementTypeToCreate(), reference);
+ }
+ createRequest.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateValueWithTypeConfigureCommandFactory());
+
+ // Retrieve create command from the Element Edit service
+ ICommand createGMFCommand = provider.getEditCommand(createRequest);
+ if (createGMFCommand != null) {
+ Command emfCommand = new GMFtoEMFCommandWrapper(createGMFCommand);
+ return emfCommand;
+ }
+ return UnexecutableCommand.INSTANCE;
+ }
+}
diff --git a/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/ValueTypeHandler.java b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/ValueTypeHandler.java
new file mode 100755
index 0000000..02ac11c
--- /dev/null
+++ b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/ValueTypeHandler.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelexplorer.handler;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for ValueType creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class ValueTypeHandler extends AbstractSysmlModelExplorerCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.types.ui.handlers.AbstractCreateCommandHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.VALUE_TYPE;
+ }
+}
diff --git a/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/ValueType_EnumerationHandler.java b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/ValueType_EnumerationHandler.java
new file mode 100755
index 0000000..2cdd503
--- /dev/null
+++ b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/ValueType_EnumerationHandler.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelexplorer.handler;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for ValueType_Enumeration creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class ValueType_EnumerationHandler extends AbstractSysmlModelExplorerCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.types.ui.handlers.AbstractCreateCommandHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.VALUE_TYPE_ENUMERATION;
+ }
+}
diff --git a/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/ValueType_PrimitiveTypeHandler.java b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/ValueType_PrimitiveTypeHandler.java
new file mode 100755
index 0000000..10f29ac
--- /dev/null
+++ b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/ValueType_PrimitiveTypeHandler.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelexplorer.handler;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for ValueType_PrimitiveType creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class ValueType_PrimitiveTypeHandler extends AbstractSysmlModelExplorerCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.types.ui.handlers.AbstractCreateCommandHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.VALUE_TYPE_PRIMITIVE_TYPE;
+ }
+}
diff --git a/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/VerifyHandler.java b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/VerifyHandler.java
new file mode 100755
index 0000000..2ff47d5
--- /dev/null
+++ b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/VerifyHandler.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelexplorer.handler;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for Verify creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class VerifyHandler extends AbstractSysmlModelExplorerCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.types.ui.handlers.AbstractCreateCommandHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.VERIFY;
+ }
+}
diff --git a/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/ViewHandler.java b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/ViewHandler.java
new file mode 100755
index 0000000..681eff0
--- /dev/null
+++ b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/ViewHandler.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelexplorer.handler;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for View creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class ViewHandler extends AbstractSysmlModelExplorerCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.types.ui.handlers.AbstractCreateCommandHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.VIEW;
+ }
+}
diff --git a/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/ViewPointHandler.java b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/ViewPointHandler.java
new file mode 100755
index 0000000..db18e9f
--- /dev/null
+++ b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/ViewPointHandler.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelexplorer.handler;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for ViewPoint creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class ViewPointHandler extends AbstractSysmlModelExplorerCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.types.ui.handlers.AbstractCreateCommandHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.VIEW_POINT;
+ }
+}
diff --git a/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src/org/eclipse/papyrus/sysml/modelexplorer/Activator.java b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src/org/eclipse/papyrus/sysml/modelexplorer/Activator.java
new file mode 100755
index 0000000..5e9a146
--- /dev/null
+++ b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src/org/eclipse/papyrus/sysml/modelexplorer/Activator.java
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) - Initial API and implementation
+ /*****************************************************************************/
+package org.eclipse.papyrus.sysml.modelexplorer;
+
+import org.eclipse.core.runtime.Plugin;
+import org.eclipse.papyrus.infra.core.log.LogHelper;
+import org.osgi.framework.BundleContext;
+
+/** The activator class controls the plug-in life cycle */
+public class Activator extends Plugin {
+
+ /** The plug-in ID */
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.sysml.modelexplorer"; //$NON-NLS-1$
+
+ /** The plug-in shared instance */
+ private static Activator plugin;
+
+ /** The log service */
+ public static LogHelper log;
+
+ /** Default constructor */
+ public Activator() {
+ }
+
+ @Override
+ public void start(final BundleContext context) throws Exception {
+ super.start(context);
+ Activator.plugin = this;
+ log = new LogHelper(plugin);
+ }
+
+ @Override
+ public void stop(final BundleContext context) throws Exception {
+ Activator.plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return Activator.plugin;
+ }
+}
diff --git a/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src/org/eclipse/papyrus/sysml/modelexplorer/handler/AbstractSysmlModelExplorerCreateCommandHandler.java b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src/org/eclipse/papyrus/sysml/modelexplorer/handler/AbstractSysmlModelExplorerCreateCommandHandler.java
new file mode 100755
index 0000000..8955c0d
--- /dev/null
+++ b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src/org/eclipse/papyrus/sysml/modelexplorer/handler/AbstractSysmlModelExplorerCreateCommandHandler.java
@@ -0,0 +1,35 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelexplorer.handler;
+
+import org.eclipse.papyrus.sysml.service.types.handlers.AbstractSysmlCreateCommandHandler;
+import org.eclipse.papyrus.uml.modelexplorer.util.ModelExplorerUtils;
+import org.eclipse.papyrus.uml.service.types.utils.ICommandContext;
+
+
+/**
+ * Abstract handler supertype for every generated handler for the creation of SysML elements from the model explorer.
+ * (Create SysML child...)
+ */
+public abstract class AbstractSysmlModelExplorerCreateCommandHandler extends AbstractSysmlCreateCommandHandler {
+
+ /**
+ *
+ * @see org.eclipse.papyrus.uml.service.types.ui.handlers.AbstractCommandHandler#getCommandContext()
+ *
+ * @return
+ */
+ @Override
+ protected ICommandContext getCommandContext() {
+ return ModelExplorerUtils.getSelectionCommandContext();
+ }
+}
diff --git a/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src/org/eclipse/papyrus/sysml/modelexplorer/query/GetImageQuery.java b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src/org/eclipse/papyrus/sysml/modelexplorer/query/GetImageQuery.java
new file mode 100755
index 0000000..39e1a40
--- /dev/null
+++ b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src/org/eclipse/papyrus/sysml/modelexplorer/query/GetImageQuery.java
@@ -0,0 +1,62 @@
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) - Initial API and implementation
+ /*****************************************************************************/
+package org.eclipse.papyrus.sysml.modelexplorer.query;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.papyrus.emf.facet.custom.metamodel.custompt.IImage;
+import org.eclipse.papyrus.emf.facet.custom.ui.ImageUtils;
+import org.eclipse.papyrus.emf.facet.custom.ui.internal.query.ImageQuery;
+import org.eclipse.papyrus.emf.facet.efacet.core.IFacetManager;
+import org.eclipse.papyrus.emf.facet.efacet.core.exception.DerivedTypedElementException;
+import org.eclipse.papyrus.emf.facet.query.java.core.IJavaQuery2;
+import org.eclipse.papyrus.emf.facet.query.java.core.IParameterValueList2;
+import org.eclipse.papyrus.uml.tools.utils.ElementUtil;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Stereotype;
+
+/** Create a basic label based on element name */
+public class GetImageQuery implements IJavaQuery2<Element, IImage> {
+
+ public static final String sysml_plugin_path = "platform:/plugin/org.eclipse.papyrus.sysml/";
+
+
+ @Override
+ public IImage evaluate(Element source, IParameterValueList2 parameterValues, IFacetManager facetManager) throws DerivedTypedElementException {
+ String iconPath = "";
+ if (!source.getAppliedStereotypes().isEmpty()) {
+ Stereotype first_stereotype = source.getAppliedStereotypes().get(0);
+
+ if (!first_stereotype.getIcons().isEmpty()) {
+ org.eclipse.uml2.uml.Image icon = ElementUtil.getStereotypeImage(source, first_stereotype, "icon");
+ if (icon != null) {
+ iconPath = icon.getLocation();
+ }
+ }
+ }
+
+ String imagePath = "";
+
+ if (iconPath != null && !"".equals(iconPath)) {
+ URI iconURI = URI.createURI(iconPath);
+ if (iconURI.isRelative()) {
+ imagePath = sysml_plugin_path + iconPath;
+ } else {
+ imagePath = iconURI.toString();
+ }
+ }
+ if ("".equals(imagePath)) {
+ return ImageQuery.getEObjectImage(source);
+ }
+ return ImageUtils.wrap(imagePath);
+ }
+}
diff --git a/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src/org/eclipse/papyrus/sysml/modelexplorer/query/GetLabelQuery.java b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src/org/eclipse/papyrus/sysml/modelexplorer/query/GetLabelQuery.java
new file mode 100755
index 0000000..0eb523d
--- /dev/null
+++ b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src/org/eclipse/papyrus/sysml/modelexplorer/query/GetLabelQuery.java
@@ -0,0 +1,44 @@
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
+ /*****************************************************************************/
+package org.eclipse.papyrus.sysml.modelexplorer.query;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.papyrus.emf.facet.efacet.core.IFacetManager;
+import org.eclipse.papyrus.emf.facet.efacet.core.exception.DerivedTypedElementException;
+import org.eclipse.papyrus.emf.facet.efacet.metamodel.v0_2_0.efacet.ParameterValue;
+import org.eclipse.papyrus.emf.facet.query.java.core.IJavaQuery2;
+import org.eclipse.papyrus.emf.facet.query.java.core.IParameterValueList2;
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
+import org.eclipse.uml2.uml.NamedElement;
+
+/** Create a basic label based on element name */
+public class GetLabelQuery implements IJavaQuery2<NamedElement, String> {
+
+ public static final String UNNAMED = "";
+
+
+ @Override
+ public String evaluate(NamedElement source, IParameterValueList2 parameterValues, IFacetManager facetManager) throws DerivedTypedElementException {
+ ParameterValue parameterValue = parameterValues.getParameterValueByName("eObject");
+ if (parameterValue.getValue() instanceof EStructuralFeature) {
+ return ((EStructuralFeature) parameterValue.getValue()).getName();
+ }
+
+ String label = UNNAMED;
+ if (source.isSetName() && (!"".equals(source.getName().trim()))) {
+ label = UMLLabelInternationalization.getInstance().getLabel(source);
+ }
+ return label;
+ }
+}
diff --git a/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src/org/eclipse/papyrus/sysml/modelexplorer/query/HasImageQuery.java b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src/org/eclipse/papyrus/sysml/modelexplorer/query/HasImageQuery.java
new file mode 100755
index 0000000..7c07417
--- /dev/null
+++ b/plugins/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src/org/eclipse/papyrus/sysml/modelexplorer/query/HasImageQuery.java
@@ -0,0 +1,35 @@
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) - Initial API and implementation
+ /*****************************************************************************/
+package org.eclipse.papyrus.sysml.modelexplorer.query;
+
+import org.eclipse.papyrus.emf.facet.efacet.core.IFacetManager;
+import org.eclipse.papyrus.emf.facet.efacet.core.exception.DerivedTypedElementException;
+import org.eclipse.papyrus.emf.facet.query.java.core.IJavaQuery2;
+import org.eclipse.papyrus.emf.facet.query.java.core.IParameterValueList2;
+import org.eclipse.uml2.uml.Element;
+
+/** Check is the element has a stereotype icon that can be used */
+public class HasImageQuery implements IJavaQuery2<Element, Boolean> {
+
+
+ @Override
+ public Boolean evaluate(Element source, IParameterValueList2 parameterValues, IFacetManager facetManager) throws DerivedTypedElementException {
+ // IJavaQuery2<Element, String> ImgageGetter = new GetImageQuery();
+ // String temp_img_path = ImgageGetter.evaluate(source, parameterValues,facetManager);
+ // if(!"".equals(temp_img_path)) {
+ // return true;
+ // }
+
+ return false;
+ }
+}
diff --git a/plugins/modelexplorer/pom.xml b/plugins/modelexplorer/pom.xml
new file mode 100755
index 0000000..6e52a21
--- /dev/null
+++ b/plugins/modelexplorer/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>org.eclipse.papyrus.sysml-modelexplorer</artifactId>
+ <packaging>pom</packaging>
+ <parent>
+ <groupId>org.eclipse.papyrus.sysml</groupId>
+ <artifactId>org.eclipse.papyrus.sysml</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <name>Papyrus SysML Model Explorer</name>
+ <description>Papyrus Model Explorer content providers for SysML.</description>
+
+ <modules>
+ <module>org.eclipse.papyrus.sysml.modelexplorer</module>
+ </modules>
+</project>
diff --git a/plugins/nattable/.project b/plugins/nattable/.project
new file mode 100755
index 0000000..7fb5372
--- /dev/null
+++ b/plugins/nattable/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>nattable</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/nattable/.settings/org.eclipse.core.resources.prefs b/plugins/nattable/.settings/org.eclipse.core.resources.prefs
new file mode 100755
index 0000000..99f26c0
--- /dev/null
+++ b/plugins/nattable/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/.classpath b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/.classpath
new file mode 100755
index 0000000..ad32c83
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/.project b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/.project
new file mode 100755
index 0000000..e23f3f7
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/.project
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.sysml.nattable.allocation.config</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>
+ <buildCommand>
+ <name>org.eclipse.oomph.version.VersionBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>check.maven.pom</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>ignore.lower.bound.dependency.ranges</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>release.path</key>
+ <value>/org.eclipse.papyrus.releng.main.release/release.xml</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.oomph.version.VersionNature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/.settings/org.eclipse.jdt.core.prefs b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 0000000..94d61f0
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,291 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/.settings/org.eclipse.jdt.ui.prefs b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/.settings/org.eclipse.jdt.ui.prefs
new file mode 100755
index 0000000..954281d
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,68 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+formatter_profile=_Papyrus
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/.settings/org.eclipse.pde.api.tools.prefs b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100755
index 0000000..23fb95e
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/.settings/org.eclipse.pde.api.tools.prefs
@@ -0,0 +1,98 @@
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+API_USE_SCAN_FIELD_SEVERITY=Error
+API_USE_SCAN_METHOD_SEVERITY=Error
+API_USE_SCAN_TYPE_SEVERITY=Error
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Ignore
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_ANNOTATION=Ignore
+INVALID_JAVADOC_TAG=Ignore
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Ignore
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+MISSING_EE_DESCRIPTIONS=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=Enabled
+eclipse.preferences.version=1
+incompatible_api_component_version=Error
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Warning
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/META-INF/MANIFEST.MF b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/META-INF/MANIFEST.MF
new file mode 100755
index 0000000..cdb2a9f
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/META-INF/MANIFEST.MF
@@ -0,0 +1,14 @@
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.papyrus.sysml;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.papyrus.infra.nattable.common;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.sysml.nattable.menu;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.papyrus.uml.nattable.menu;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.papyrus.sysml.service.types;bundle-version="[2.0.0,3.0.0)"
+Bundle-Vendor: %Bundle-Vendor
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 1.2.0.qualifier
+Bundle-Name: %Bundle-Name
+Bundle-Activator: org.eclipse.papyrus.sysml.nattable.allocation.config.Activator
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.papyrus.sysml.nattable.allocation.config;singleton:=true
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/OSGI-INF/l10n/bundle.properties b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/OSGI-INF/l10n/bundle.properties
new file mode 100755
index 0000000..9a85096
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/OSGI-INF/l10n/bundle.properties
@@ -0,0 +1,3 @@
+#Properties file for org.eclipse.papyrus.sysml.nattable.allocation.config
+Bundle-Vendor = Eclipse Modeling Project
+Bundle-Name = SysML Allocation Table Configuration
\ No newline at end of file
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/about.html b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/about.html
new file mode 100755
index 0000000..598b368
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>May 12, 2008</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/build.properties b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/build.properties
new file mode 100755
index 0000000..c84abdd
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/build.properties
@@ -0,0 +1,11 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ build.properties,\
+ icons/,\
+ resources/,\
+ about.html,\
+ OSGI-INF/
+src.includes = about.html
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/icons/old/table_SysML_Allocation.gif b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/icons/old/table_SysML_Allocation.gif
new file mode 100755
index 0000000..6d9e22c
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/icons/old/table_SysML_Allocation.gif
Binary files differ
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/icons/old/table_SysML_Allocation.png b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/icons/old/table_SysML_Allocation.png
new file mode 100755
index 0000000..761ea00
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/icons/old/table_SysML_Allocation.png
Binary files differ
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/icons/table_SysML_Allocation.png b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/icons/table_SysML_Allocation.png
new file mode 100755
index 0000000..ad1a933
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/icons/table_SysML_Allocation.png
Binary files differ
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/org.eclipse.papyrus.sysml.nattable.allocation.config.iml b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/org.eclipse.papyrus.sysml.nattable.allocation.config.iml
new file mode 100755
index 0000000..2e524f5
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/org.eclipse.papyrus.sysml.nattable.allocation.config.iml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+ <component name="NewModuleRootManager" inherit-compiler-output="false">
+ <output url="file://$MODULE_DIR$/bin" />
+ <exclude-output />
+ <content url="file://$MODULE_DIR$">
+ <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
+ </content>
+ <orderEntry type="jdk" jdkName="JavaSE-1.6" jdkType="JavaSDK" />
+ <orderEntry type="module" module-name="org.eclipse.papyrus.sysml" />
+ <orderEntry type="module" module-name="org.eclipse.papyrus.infra.nattable.common" />
+ <orderEntry type="module" module-name="org.eclipse.papyrus.sysml.nattable.menu" />
+ <orderEntry type="module" module-name="org.eclipse.papyrus.uml.nattable.menu" />
+ <orderEntry type="module" module-name="org.eclipse.papyrus.sysml.service.types" />
+ <orderEntry type="library" name="ECLIPSE" level="application" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ </component>
+</module>
\ No newline at end of file
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/plugin.xml b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/plugin.xml
new file mode 100755
index 0000000..5c1e1a8
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/plugin.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.papyrus.infra.nattable.tester">
+ <tester
+ class="org.eclipse.papyrus.sysml.nattable.allocation.config.tester.TableAllocationCreationTester"
+ id="org.eclipse.papyrus.sysml.nattable.allocation.config.allocationtablecreationtester">
+ </tester>
+ </extension>
+ <extension
+ point="org.eclipse.papyrus.infra.nattable.configuration">
+ <configuration
+ file="resources/allocation.nattableconfiguration"
+ type="PapyrusSysMLAllocationTable">
+ </configuration>
+ </extension>
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.papyrus.sysml.nattable.allocation.config.handler.CreateAllocateHandler"
+ commandId="org.eclipse.papyrus.sysml.service.types.AllocateCreateCommand">
+ <activeWhen>
+ <with
+ variable="selection">
+ <test
+ forcePluginActivation="true"
+ property="org.eclipse.papyrus.sysml.nattable.allocation.config.allocationtable.propertyTester.isAllocationTable"
+ value="true">
+ </test>
+ </with>
+ </activeWhen>
+ </handler>
+ </extension>
+ <extension
+ point="org.eclipse.core.expressions.propertyTesters">
+ <propertyTester
+ class="org.eclipse.papyrus.sysml.nattable.allocation.config.tester.AllocationPropertyTester"
+ id="org.eclipse.papyrus.sysml.nattable.allocation.config.allocationtable.propertyTester"
+ namespace="org.eclipse.papyrus.sysml.nattable.allocation.config.allocationtable.propertyTester"
+ properties="isAllocationTable"
+ type="org.eclipse.jface.viewers.IStructuredSelection">
+ </propertyTester>
+ </extension>
+
+</plugin>
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/pom.xml b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/pom.xml
new file mode 100755
index 0000000..669df0e
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/pom.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>org.eclipse.papyrus.sysml-nattable</artifactId>
+ <groupId>org.eclipse.papyrus.sysml</groupId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.papyrus.sysml.nattable.allocation.config</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/resources/allocation.nattableconfiguration b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/resources/allocation.nattableconfiguration
new file mode 100755
index 0000000..ee15a6e
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/resources/allocation.nattableconfiguration
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nattableconfiguration:TableConfiguration 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:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:nattablelabelprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattablecontentprovider" xmlns:nattablestyle="http://www.eclipse.org/papyrus/nattable/model/table/nattablestyle" xmlns:nattabletester="http://www.eclipse.org/papyrus/nattable/model/table/nattabletester" description="This table is used to display SysML Allocation" name="AllocationTable" type="PapyrusSysMLAllocationTable" iconPath="platform:/plugin/org.eclipse.papyrus.sysml.nattable.allocation.config/icons/table_SysML_Allocation.png" defaultRowAxisProvider="//@rowAxisProviders.0" defaultColumnAxisProvider="//@columnAxisProviders.0">
+ <styles xsi:type="nattablestyle:StringListValueStyle" name="dragRegions">
+ <stringListValue>ROW_HEADER</stringListValue>
+ </styles>
+ <creationTester xsi:type="nattabletester:JavaTableTester" tester="org.eclipse.papyrus.sysml.nattable.allocation.config.allocationtablecreationtester"/>
+ <rowHeaderAxisConfiguration xsi:type="nattableaxisconfiguration:TableHeaderAxisConfiguration" indexStyle="NUMERIC">
+ <ownedLabelConfigurations xsi:type="nattablelabelprovider:ObjectLabelProviderConfiguration"/>
+ <ownedLabelConfigurations xsi:type="nattablelabelprovider:OperationLabelProviderConfiguration" displayType="false" displayMultiplicity="false"/>
+ <ownedAxisConfigurations xsi:type="nattableaxisconfiguration:EStructuralFeatureValueFillingConfiguration">
+ <listenFeature xsi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Namespace/ownedMember"/>
+ </ownedAxisConfigurations>
+ <ownedAxisConfigurations xsi:type="nattableaxisconfiguration:PasteEObjectConfiguration" pastedElementId="org.eclipse.papyrus.sysml.Allocate">
+ <pasteElementContainementFeature xsi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Package/packagedElement"/>
+ <postActions>applyStereotype:/SysML::Allocations::Allocate</postActions>
+ <axisIdentifier xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_OgydQXmoEeWVZIGG1XbiFw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.allocation.config/resources/allocation.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axisIdentifier>
+ </ownedAxisConfigurations>
+ <axisManagers xsi:type="nattableaxisconfiguration:AxisManagerRepresentation" axisManagerId="org.eclipse.papyrus.sysml.nattable.allocate.axis.manager" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.labelprovider" headerLabelConfiguration="//@rowHeaderAxisConfiguration/@ownedLabelConfigurations.0" specificAxisConfigurations="//@rowHeaderAxisConfiguration/@ownedAxisConfigurations.0"/>
+ </rowHeaderAxisConfiguration>
+ <columnHeaderAxisConfiguration xsi:type="nattableaxisconfiguration:TableHeaderAxisConfiguration">
+ <ownedLabelConfigurations xsi:type="nattablelabelprovider:FeatureLabelProviderConfiguration"/>
+ <ownedLabelConfigurations xsi:type="nattablelabelprovider:OperationLabelProviderConfiguration"/>
+ <axisManagers xsi:type="nattableaxisconfiguration:AxisManagerRepresentation" axisManagerId="org.eclipse.papyrus.uml.nattable.feature.axis.manager" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.feature.labelprovider" headerLabelConfiguration="//@columnHeaderAxisConfiguration/@ownedLabelConfigurations.0"/>
+ <axisManagers xsi:type="nattableaxisconfiguration:AxisManagerRepresentation" axisManagerId="org.eclipse.papyrus.uml.nattable.stereotype.property.axis.manager" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.feature.labelprovider" headerLabelConfiguration="//@columnHeaderAxisConfiguration/@ownedLabelConfigurations.0"/>
+ <axisManagers xsi:type="nattableaxisconfiguration:AxisManagerRepresentation" axisManagerId="org.eclipse.papyrus.uml.nattable.operation.axis.manager" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.operation.labelprovider" headerLabelConfiguration="//@columnHeaderAxisConfiguration/@ownedLabelConfigurations.1"/>
+ </columnHeaderAxisConfiguration>
+ <columnAxisProviders xsi:type="nattableaxisprovider:SlaveObjectAxisProvider" description="This provider provides the default columns for the SysML Allocation Table" name="SysMLAllocationFeatureProvider">
+ <axis xsi:type="nattableaxis:EStructuralFeatureAxis" manager="//@columnHeaderAxisConfiguration/@axisManagers.0">
+ <element xsi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xsi:type="nattableaxis:EStructuralFeatureAxis" manager="//@columnHeaderAxisConfiguration/@axisManagers.0">
+ <element xsi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Dependency/client"/>
+ </axis>
+ <axis xsi:type="nattableaxis:EStructuralFeatureAxis" manager="//@columnHeaderAxisConfiguration/@axisManagers.0">
+ <element xsi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Dependency/supplier"/>
+ </axis>
+ <axis xsi:type="nattableaxis:EStructuralFeatureAxis" manager="//@columnHeaderAxisConfiguration/@axisManagers.0">
+ <element xsi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Element/owner"/>
+ </axis>
+ </columnAxisProviders>
+ <rowAxisProviders xsi:type="nattableaxisprovider:MasterObjectAxisProvider" description="This row providers allows to display all Allocation in a Table" name="SysMLAllocationProvider" disconnectSlave="true"/>
+</nattableconfiguration:TableConfiguration>
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/src/org/eclipse/papyrus/sysml/nattable/allocation/config/Activator.java b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/src/org/eclipse/papyrus/sysml/nattable/allocation/config/Activator.java
new file mode 100755
index 0000000..093b7b8
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/src/org/eclipse/papyrus/sysml/nattable/allocation/config/Activator.java
@@ -0,0 +1,71 @@
+/*****************************************************************************
+ * 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.sysml.nattable.allocation.config;
+
+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.sysml.nattable.allocation.config"; //$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)
+ */
+ @Override
+ 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)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/src/org/eclipse/papyrus/sysml/nattable/allocation/config/handler/CreateAllocateHandler.java b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/src/org/eclipse/papyrus/sysml/nattable/allocation/config/handler/CreateAllocateHandler.java
new file mode 100755
index 0000000..a61300d
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/src/org/eclipse/papyrus/sysml/nattable/allocation/config/handler/CreateAllocateHandler.java
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ * 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.sysml.nattable.allocation.config.handler;
+
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+import org.eclipse.papyrus.infra.nattable.utils.INattableModelManagerUtils;
+import org.eclipse.papyrus.sysml.nattable.menu.handlers.AllocateHandler;
+
+/**
+ * This handler allows to create an Allocate object, only if the table is a PapyrusSysMLAllocationTable
+ *
+ * @author vl222926
+ *
+ */
+public class CreateAllocateHandler extends AllocateHandler {
+
+ /**
+ * the id used for the Papyrus SysML Allocation Table
+ */
+ public static final String TABLE_ALLOCATION_TYPE = "PapyrusSysMLAllocationTable"; //$NON-NLS-1$
+
+ /**
+ *
+ * @see org.eclipse.papyrus.sysml.nattable.menu.handlers.AbstractSysmlNattableCreateCommandHandler#setEnabled(java.lang.Object)
+ *
+ * @param evaluationContext
+ */
+ @Override
+ public void setEnabled(Object evaluationContext) {
+ Command command = getCommand();
+ boolean isEnabled = command.canExecute();
+ INattableModelManager tableManager = INattableModelManagerUtils.getTableManagerFromWorkbenchPart(getActiveWorkbenchPart());
+ isEnabled = isEnabled && tableManager.getTable().getTableConfiguration().getType().equals(TABLE_ALLOCATION_TYPE);
+ if (isEnabled) {
+ IElementType newElementType = getElementTypeToCreate();
+ String id = newElementType.getId();
+ isEnabled = tableManager.canCreateRowElement(id);
+ }
+ setBaseEnabled(isEnabled);
+
+ }
+
+}
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/src/org/eclipse/papyrus/sysml/nattable/allocation/config/messages/Messages.java b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/src/org/eclipse/papyrus/sysml/nattable/allocation/config/messages/Messages.java
new file mode 100755
index 0000000..8f9dc93
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/src/org/eclipse/papyrus/sysml/nattable/allocation/config/messages/Messages.java
@@ -0,0 +1,21 @@
+package org.eclipse.papyrus.sysml.nattable.allocation.config.messages;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+
+ private static final String BUNDLE_NAME = "org.eclipse.papyrus.sysml.nattable.allocation.config.messages.messages"; //$NON-NLS-1$
+
+ public static String TableAllocationCreationTester_NotAnUMLElement;
+
+ public static String TableAllocationCreationTester_OKMessage;
+
+ public static String TableAllocationCreationTester_ProfileNotApplied;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/src/org/eclipse/papyrus/sysml/nattable/allocation/config/messages/messages.properties b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/src/org/eclipse/papyrus/sysml/nattable/allocation/config/messages/messages.properties
new file mode 100755
index 0000000..5e40b70
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/src/org/eclipse/papyrus/sysml/nattable/allocation/config/messages/messages.properties
@@ -0,0 +1,3 @@
+TableAllocationCreationTester_NotAnUMLElement=The context is not an UML Element
+TableAllocationCreationTester_OKMessage=The context allows to create an Allocation Table
+TableAllocationCreationTester_ProfileNotApplied=The profile {0} is not applied on the model
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/src/org/eclipse/papyrus/sysml/nattable/allocation/config/tester/AllocationPropertyTester.java b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/src/org/eclipse/papyrus/sysml/nattable/allocation/config/tester/AllocationPropertyTester.java
new file mode 100755
index 0000000..76d728b
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/src/org/eclipse/papyrus/sysml/nattable/allocation/config/tester/AllocationPropertyTester.java
@@ -0,0 +1,35 @@
+/*****************************************************************************
+ * 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.sysml.nattable.allocation.config.tester;
+
+import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+import org.eclipse.papyrus.infra.nattable.utils.NattableWidgetPropertyTester;
+import org.eclipse.papyrus.sysml.nattable.allocation.config.handler.CreateAllocateHandler;
+
+
+public class AllocationPropertyTester extends NattableWidgetPropertyTester {
+
+ private static final String IS_ALLOCATION_TABLE = "isAllocationTable"; //$NON-NLS-1$
+
+ @Override
+ public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
+ final INattableModelManager manager = getNattableModelManager();
+ if (manager != null) {
+ if (IS_ALLOCATION_TABLE.equals(property) && expectedValue instanceof Boolean) {
+ return expectedValue.equals(manager.getTable().getTableConfiguration().getType().equals(CreateAllocateHandler.TABLE_ALLOCATION_TYPE));
+ }
+ }
+ return false;
+ }
+}
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/src/org/eclipse/papyrus/sysml/nattable/allocation/config/tester/TableAllocationCreationTester.java b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/src/org/eclipse/papyrus/sysml/nattable/allocation/config/tester/TableAllocationCreationTester.java
new file mode 100755
index 0000000..a610544
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/src/org/eclipse/papyrus/sysml/nattable/allocation/config/tester/TableAllocationCreationTester.java
@@ -0,0 +1,53 @@
+/*****************************************************************************
+ * 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.sysml.nattable.allocation.config.tester;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.papyrus.infra.nattable.tester.ITableTester;
+import org.eclipse.papyrus.sysml.allocations.AllocationsPackage;
+import org.eclipse.papyrus.sysml.nattable.allocation.config.Activator;
+import org.eclipse.papyrus.sysml.nattable.allocation.config.messages.Messages;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+public class TableAllocationCreationTester implements ITableTester {
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.tester.ITableTester#isAllowed(java.lang.Object)
+ *
+ * @param context
+ * @return
+ */
+ @Override
+ public IStatus isAllowed(Object context) {
+ if (context instanceof Element) {
+ Element el = (Element) context;
+ boolean result = context instanceof Package;
+ if (result) {
+ final String packageQN = UMLUtil.getProfile(AllocationsPackage.eINSTANCE, el).getQualifiedName();
+ result = result && el.getNearestPackage().getAppliedProfile(packageQN, true) != null;
+ if (result) {
+ return new Status(IStatus.OK, Activator.PLUGIN_ID, Messages.TableAllocationCreationTester_OKMessage);
+ } else {
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, String.format(Messages.TableAllocationCreationTester_ProfileNotApplied, packageQN));
+ }
+ }
+ }
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.TableAllocationCreationTester_NotAnUMLElement);
+ }
+
+}
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation/.classpath b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation/.classpath
new file mode 100755
index 0000000..ad32c83
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation/.project b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation/.project
new file mode 100755
index 0000000..3a7399c
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation/.project
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.sysml.nattable.allocation</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>
+ <buildCommand>
+ <name>org.eclipse.oomph.version.VersionBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>check.maven.pom</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>ignore.lower.bound.dependency.ranges</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>release.path</key>
+ <value>/org.eclipse.papyrus.releng.main.release/release.xml</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.oomph.version.VersionNature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation/.settings/org.eclipse.jdt.core.prefs b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 0000000..94d61f0
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,291 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation/.settings/org.eclipse.jdt.ui.prefs b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation/.settings/org.eclipse.jdt.ui.prefs
new file mode 100755
index 0000000..954281d
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,68 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+formatter_profile=_Papyrus
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation/.settings/org.eclipse.pde.api.tools.prefs b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100755
index 0000000..23fb95e
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation/.settings/org.eclipse.pde.api.tools.prefs
@@ -0,0 +1,98 @@
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+API_USE_SCAN_FIELD_SEVERITY=Error
+API_USE_SCAN_METHOD_SEVERITY=Error
+API_USE_SCAN_TYPE_SEVERITY=Error
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Ignore
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_ANNOTATION=Ignore
+INVALID_JAVADOC_TAG=Ignore
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Ignore
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+MISSING_EE_DESCRIPTIONS=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=Enabled
+eclipse.preferences.version=1
+incompatible_api_component_version=Error
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Warning
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation/META-INF/MANIFEST.MF b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation/META-INF/MANIFEST.MF
new file mode 100755
index 0000000..2f64a4d
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation/META-INF/MANIFEST.MF
@@ -0,0 +1,11 @@
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.papyrus.sysml.nattable.allocation.config;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.papyrus.infra.nattable.common;bundle-version="[3.0.0,4.0.0)"
+Bundle-Vendor: %Bundle-Vendor
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 1.2.0.qualifier
+Bundle-Name: %Bundle-Name
+Bundle-Activator: org.eclipse.papyrus.sysml.nattable.allocation.Activator
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.papyrus.sysml.nattable.allocation;singleton:=true
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation/OSGI-INF/l10n/bundle.properties b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation/OSGI-INF/l10n/bundle.properties
new file mode 100755
index 0000000..5c71bc7
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation/OSGI-INF/l10n/bundle.properties
@@ -0,0 +1,3 @@
+#Properties file for org.eclipse.papyrus.sysml.nattable.allocation
+Bundle-Vendor = Eclipse Modeling Project
+Bundle-Name = SysML Allocation Table
\ No newline at end of file
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation/about.html b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation/about.html
new file mode 100755
index 0000000..598b368
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>May 12, 2008</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation/build.properties b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation/build.properties
new file mode 100755
index 0000000..759c1f2
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation/build.properties
@@ -0,0 +1,10 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ about.html,\
+ OSGI-INF/,\
+ build.properties,\
+ icons/
+src.includes = about.html
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation/icons/table_SysML_Allocation_new.png b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation/icons/table_SysML_Allocation_new.png
new file mode 100755
index 0000000..fc8ff25
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation/icons/table_SysML_Allocation_new.png
Binary files differ
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation/org.eclipse.papyrus.sysml.nattable.allocation.iml b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation/org.eclipse.papyrus.sysml.nattable.allocation.iml
new file mode 100755
index 0000000..123f4de
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation/org.eclipse.papyrus.sysml.nattable.allocation.iml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+ <component name="NewModuleRootManager" inherit-compiler-output="false">
+ <output url="file://$MODULE_DIR$/bin" />
+ <exclude-output />
+ <content url="file://$MODULE_DIR$">
+ <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
+ </content>
+ <orderEntry type="jdk" jdkName="JavaSE-1.6" jdkType="JavaSDK" />
+ <orderEntry type="module" module-name="org.eclipse.papyrus.sysml.nattable.allocation.config" />
+ <orderEntry type="module" module-name="org.eclipse.papyrus.infra.nattable.common" />
+ <orderEntry type="library" name="ECLIPSE" level="application" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ </component>
+</module>
\ No newline at end of file
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation/plugin.xml b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation/plugin.xml
new file mode 100755
index 0000000..d0f4786
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation/plugin.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.ui.commands">
+ <command
+ categoryId="org.eclipse.papyrus.editor.category"
+ description="Create a SysML Allocation NatTable Editor"
+ id="org.eclipse.papyrus.sysml.nattable.allocation.create.command"
+ name="Create a new Allocation Table">
+ </command>
+ </extension>
+ <extension
+ point="org.eclipse.ui.commandImages">
+ <image
+ commandId="org.eclipse.papyrus.sysml.nattable.allocation.create.command"
+ icon="icons/table_SysML_Allocation_new.png">
+ </image>
+ </extension>
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ commandId="org.eclipse.papyrus.sysml.nattable.allocation.create.command">
+ <activeWhen>
+ <or>
+ <with
+ variable="activeEditorId">
+ <equals
+ value="org.eclipse.papyrus.infra.core.papyrusEditor">
+ </equals>
+ </with>
+ </or>
+ </activeWhen>
+ <class
+ class="org.eclipse.papyrus.infra.nattable.common.handlers.CreateNatTableEditorHandler">
+ <parameter
+ name="tableType"
+ value="PapyrusSysMLAllocationTable">
+ </parameter>
+ </class>
+ </handler>
+ </extension>
+
+</plugin>
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation/pom.xml b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation/pom.xml
new file mode 100755
index 0000000..7a6fca0
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation/pom.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>org.eclipse.papyrus.sysml-nattable</artifactId>
+ <groupId>org.eclipse.papyrus.sysml</groupId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.papyrus.sysml.nattable.allocation</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation/src/org/eclipse/papyrus/sysml/nattable/allocation/Activator.java b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation/src/org/eclipse/papyrus/sysml/nattable/allocation/Activator.java
new file mode 100755
index 0000000..cc2fcf9
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.allocation/src/org/eclipse/papyrus/sysml/nattable/allocation/Activator.java
@@ -0,0 +1,54 @@
+package org.eclipse.papyrus.sysml.nattable.allocation;
+
+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.sysml.nattable.allocation"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/.classpath b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/.classpath
new file mode 100755
index 0000000..0c22b5d
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/.classpath
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="src-gen"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/.project b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/.project
new file mode 100755
index 0000000..fbcfc11
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/.project
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.sysml.nattable.menu</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>
+ <buildCommand>
+ <name>org.eclipse.oomph.version.VersionBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>check.maven.pom</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>ignore.lower.bound.dependency.ranges</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>release.path</key>
+ <value>/org.eclipse.papyrus.releng.main.release/release.xml</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.oomph.version.VersionNature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/.settings/org.eclipse.jdt.core.prefs b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 0000000..4d72ad1
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,288 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/.settings/org.eclipse.jdt.ui.prefs b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/.settings/org.eclipse.jdt.ui.prefs
new file mode 100755
index 0000000..954281d
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,68 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+formatter_profile=_Papyrus
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/.settings/org.eclipse.pde.api.tools.prefs b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100755
index 0000000..23fb95e
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/.settings/org.eclipse.pde.api.tools.prefs
@@ -0,0 +1,98 @@
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+API_USE_SCAN_FIELD_SEVERITY=Error
+API_USE_SCAN_METHOD_SEVERITY=Error
+API_USE_SCAN_TYPE_SEVERITY=Error
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Ignore
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_ANNOTATION=Ignore
+INVALID_JAVADOC_TAG=Ignore
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Ignore
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+MISSING_EE_DESCRIPTIONS=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=Enabled
+eclipse.preferences.version=1
+incompatible_api_component_version=Error
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Warning
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/META-INF/MANIFEST.MF b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/META-INF/MANIFEST.MF
new file mode 100755
index 0000000..eb998c3
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/META-INF/MANIFEST.MF
@@ -0,0 +1,15 @@
+Manifest-Version: 1.0
+Export-Package: org.eclipse.papyrus.sysml.nattable.menu.handlers
+Require-Bundle: org.eclipse.papyrus.uml.nattable.menu;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.papyrus.sysml.service.types;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.sysml.diagram.common;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.infra.nattable;bundle-version="[3.0.0,4.0.0)"
+Bundle-Vendor: %Bundle-Vendor
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 1.2.0.qualifier
+Bundle-Name: %Bundle-Name
+Bundle-Activator: org.eclipse.papyrus.sysml.nattable.menu.Activator
+Bundle-ManifestVersion: 2
+Bundle-Description: %pluginDescription
+Bundle-SymbolicName: org.eclipse.papyrus.sysml.nattable.menu;singleton:=true
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/OSGI-INF/l10n/bundle.properties b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/OSGI-INF/l10n/bundle.properties
new file mode 100755
index 0000000..5084fbc
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/OSGI-INF/l10n/bundle.properties
@@ -0,0 +1,3 @@
+#Properties file for org.eclipse.papyrus.sysml.nattable.menu
+Bundle-Vendor = Eclipse Modeling Project
+Bundle-Name = Menu for the creation of Sysml elements in the tabular editor
\ No newline at end of file
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/about.html b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/about.html
new file mode 100755
index 0000000..598b368
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>May 12, 2008</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/build.properties b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/build.properties
new file mode 100755
index 0000000..7fbb117
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/build.properties
@@ -0,0 +1,9 @@
+source.. = src/,\
+ src-gen/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ about.html,\
+ OSGI-INF/
+src.includes = about.html
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/org.eclipse.papyrus.sysml.nattable.menu.iml b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/org.eclipse.papyrus.sysml.nattable.menu.iml
new file mode 100755
index 0000000..43a1f91
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/org.eclipse.papyrus.sysml.nattable.menu.iml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+ <component name="NewModuleRootManager" inherit-compiler-output="false">
+ <output url="file://$MODULE_DIR$/bin" />
+ <exclude-output />
+ <content url="file://$MODULE_DIR$">
+ <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/src-gen" isTestSource="false" />
+ </content>
+ <orderEntry type="jdk" jdkName="JavaSE-1.6" jdkType="JavaSDK" />
+ <orderEntry type="module" module-name="org.eclipse.papyrus.uml.nattable.menu" />
+ <orderEntry type="module" module-name="org.eclipse.papyrus.sysml.service.types" />
+ <orderEntry type="module" module-name="org.eclipse.papyrus.sysml.diagram.common" />
+ <orderEntry type="module" module-name="org.eclipse.papyrus.infra.nattable" />
+ <orderEntry type="library" name="ECLIPSE" level="application" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ </component>
+</module>
\ No newline at end of file
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/plugin.properties b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/plugin.properties
new file mode 100755
index 0000000..69523a8
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/plugin.properties
@@ -0,0 +1,12 @@
+#################################################################################
+# Copyright (c) 2015 CEA LIST.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Benoit Maggi (CEA LIST) benoit.maggi@cea.fr - initial API and implementation
+##################################################################################)
+
+pluginDescription=This plugin provides the context menu for the tabular editor in SysML, with handlers for the creation of SysML model elements
\ No newline at end of file
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/plugin.xml b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/plugin.xml
new file mode 100755
index 0000000..2177c50
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/plugin.xml
@@ -0,0 +1,439 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+<extension point="org.eclipse.ui.handlers">
+ <handler class= "org.eclipse.papyrus.sysml.nattable.menu.handlers.ActorPartPropertyHandler" commandId="org.eclipse.papyrus.sysml.service.types.ActorPartCreateCommand" >
+ <activeWhen>
+ <with
+ variable="selection">
+ <test
+ property="org.eclipse.papyrus.infra.nattable.tester.isNattableWidget"
+ value="true">
+ </test>
+ </with>
+ </activeWhen></handler>
+ <!-- commented because unactivated by the filter see bug 408984
+ <handler class= "org.eclipse.papyrus.sysml.nattable.menu.handlers.AllocateHandler" commandId="org.eclipse.papyrus.sysml.service.types.AllocateCreateCommand" >
+ <activeWhen>
+ <with
+ variable="selection">
+ <test
+ property="org.eclipse.papyrus.infra.nattable.tester.isNattableWidget"
+ value="true">
+ </test>
+ </with>
+ </activeWhen></handler>
+ -->
+ <!-- commented because unactivated by the filter see bug 408984
+ <handler class= "org.eclipse.papyrus.sysml.nattable.menu.handlers.AssociationHandler" commandId="org.eclipse.papyrus.sysml.service.types.AssociationCreateCommand" >
+ <activeWhen>
+ <with
+ variable="selection">
+ <test
+ property="org.eclipse.papyrus.infra.nattable.tester.isNattableWidget"
+ value="true">
+ </test>
+ </with>
+ </activeWhen></handler>
+ <handler class= "org.eclipse.papyrus.sysml.nattable.menu.handlers.AssociationCompositeHandler" commandId="org.eclipse.papyrus.sysml.service.types.AssociationCompositeCreateCommand" >
+ <activeWhen>
+ <with
+ variable="selection">
+ <test
+ property="org.eclipse.papyrus.infra.nattable.tester.isNattableWidget"
+ value="true">
+ </test>
+ </with>
+ </activeWhen></handler>
+ <handler class= "org.eclipse.papyrus.sysml.nattable.menu.handlers.AssociationCompositeDirectedHandler" commandId="org.eclipse.papyrus.sysml.service.types.AssociationCompositeDirectedCreateCommand" >
+ <activeWhen>
+ <with
+ variable="selection">
+ <test
+ property="org.eclipse.papyrus.infra.nattable.tester.isNattableWidget"
+ value="true">
+ </test>
+ </with>
+ </activeWhen></handler>
+ <handler class= "org.eclipse.papyrus.sysml.nattable.menu.handlers.AssociationNoneHandler" commandId="org.eclipse.papyrus.sysml.service.types.AssociationNoneCreateCommand" >
+ <activeWhen>
+ <with
+ variable="selection">
+ <test
+ property="org.eclipse.papyrus.infra.nattable.tester.isNattableWidget"
+ value="true">
+ </test>
+ </with>
+ </activeWhen></handler>
+ <handler class= "org.eclipse.papyrus.sysml.nattable.menu.handlers.AssociationNoneDirectedHandler" commandId="org.eclipse.papyrus.sysml.service.types.AssociationNoneDirectedCreateCommand" >
+ <activeWhen>
+ <with
+ variable="selection">
+ <test
+ property="org.eclipse.papyrus.infra.nattable.tester.isNattableWidget"
+ value="true">
+ </test>
+ </with>
+ </activeWhen></handler>
+ <handler class= "org.eclipse.papyrus.sysml.nattable.menu.handlers.AssociationSharedHandler" commandId="org.eclipse.papyrus.sysml.service.types.AssociationSharedCreateCommand" >
+ <activeWhen>
+ <with
+ variable="selection">
+ <test
+ property="org.eclipse.papyrus.infra.nattable.tester.isNattableWidget"
+ value="true">
+ </test>
+ </with>
+ </activeWhen></handler>
+ <handler class= "org.eclipse.papyrus.sysml.nattable.menu.handlers.AssociationSharedDirectedHandler" commandId="org.eclipse.papyrus.sysml.service.types.AssociationSharedDirectedCreateCommand" >
+ <activeWhen>
+ <with
+ variable="selection">
+ <test
+ property="org.eclipse.papyrus.infra.nattable.tester.isNattableWidget"
+ value="true">
+ </test>
+ </with>
+ </activeWhen></handler>
+ -->
+ <handler class= "org.eclipse.papyrus.sysml.nattable.menu.handlers.BlockHandler" commandId="org.eclipse.papyrus.sysml.service.types.BlockCreateCommand" >
+ <activeWhen>
+ <with
+ variable="selection">
+ <test
+ property="org.eclipse.papyrus.infra.nattable.tester.isNattableWidget"
+ value="true">
+ </test>
+ </with>
+ </activeWhen></handler>
+ <!-- commented because unactivated by the filter see bug 408984
+ <handler class= "org.eclipse.papyrus.sysml.nattable.menu.handlers.ConformHandler" commandId="org.eclipse.papyrus.sysml.service.types.ConformCreateCommand" >
+ <activeWhen>
+ <with
+ variable="selection">
+ <test
+ property="org.eclipse.papyrus.infra.nattable.tester.isNattableWidget"
+ value="true">
+ </test>
+ </with>
+ </activeWhen></handler>
+ -->
+ <handler class= "org.eclipse.papyrus.sysml.nattable.menu.handlers.ConstraintBlockHandler" commandId="org.eclipse.papyrus.sysml.service.types.ConstraintBlockCreateCommand" >
+ <activeWhen>
+ <with
+ variable="selection">
+ <test
+ property="org.eclipse.papyrus.infra.nattable.tester.isNattableWidget"
+ value="true">
+ </test>
+ </with>
+ </activeWhen></handler>
+ <handler class= "org.eclipse.papyrus.sysml.nattable.menu.handlers.ConstraintBlockParameterHandler" commandId="org.eclipse.papyrus.sysml.service.types.ConstraintBlockParameterCreateCommand" >
+ <activeWhen>
+ <with
+ variable="selection">
+ <test
+ property="org.eclipse.papyrus.infra.nattable.tester.isNattableWidget"
+ value="true">
+ </test>
+ </with>
+ </activeWhen></handler>
+ <handler class= "org.eclipse.papyrus.sysml.nattable.menu.handlers.ConstraintPropertyHandler" commandId="org.eclipse.papyrus.sysml.service.types.ConstraintPropertyCreateCommand" >
+ <activeWhen>
+ <with
+ variable="selection">
+ <test
+ property="org.eclipse.papyrus.infra.nattable.tester.isNattableWidget"
+ value="true">
+ </test>
+ </with>
+ </activeWhen></handler>
+ <!-- commented because unactivated by the filter see bug 408984
+ <handler class= "org.eclipse.papyrus.sysml.nattable.menu.handlers.CopyHandler" commandId="org.eclipse.papyrus.sysml.service.types.CopyCreateCommand" >
+ <activeWhen>
+ <with
+ variable="selection">
+ <test
+ property="org.eclipse.papyrus.infra.nattable.tester.isNattableWidget"
+ value="true">
+ </test>
+ </with>
+ </activeWhen></handler>
+ <handler class= "org.eclipse.papyrus.sysml.nattable.menu.handlers.DeriveReqtHandler" commandId="org.eclipse.papyrus.sysml.service.types.DeriveReqtCreateCommand" >
+ <activeWhen>
+ <with
+ variable="selection">
+ <test
+ property="org.eclipse.papyrus.infra.nattable.tester.isNattableWidget"
+ value="true">
+ </test>
+ </with>
+ </activeWhen></handler>
+ -->
+ <handler class= "org.eclipse.papyrus.sysml.nattable.menu.handlers.DimensionHandler" commandId="org.eclipse.papyrus.sysml.service.types.DimensionCreateCommand" >
+ <activeWhen>
+ <with
+ variable="selection">
+ <test
+ property="org.eclipse.papyrus.infra.nattable.tester.isNattableWidget"
+ value="true">
+ </test>
+ </with>
+ </activeWhen></handler>
+ <handler class= "org.eclipse.papyrus.sysml.nattable.menu.handlers.FlowPortHandler" commandId="org.eclipse.papyrus.sysml.service.types.FlowPortCreateCommand" >
+ <activeWhen>
+ <with
+ variable="selection">
+ <test
+ property="org.eclipse.papyrus.infra.nattable.tester.isNattableWidget"
+ value="true">
+ </test>
+ </with>
+ </activeWhen></handler>
+ <handler class= "org.eclipse.papyrus.sysml.nattable.menu.handlers.FlowPort_InOutHandler" commandId="org.eclipse.papyrus.sysml.service.types.FlowPort_InOutCreateCommand" >
+ <activeWhen>
+ <with
+ variable="selection">
+ <test
+ property="org.eclipse.papyrus.infra.nattable.tester.isNattableWidget"
+ value="true">
+ </test>
+ </with>
+ </activeWhen></handler>
+ <handler class= "org.eclipse.papyrus.sysml.nattable.menu.handlers.FlowPort_InHandler" commandId="org.eclipse.papyrus.sysml.service.types.FlowPort_InCreateCommand" >
+ <activeWhen>
+ <with
+ variable="selection">
+ <test
+ property="org.eclipse.papyrus.infra.nattable.tester.isNattableWidget"
+ value="true">
+ </test>
+ </with>
+ </activeWhen></handler>
+ <handler class= "org.eclipse.papyrus.sysml.nattable.menu.handlers.FlowPort_OutHandler" commandId="org.eclipse.papyrus.sysml.service.types.FlowPort_OutCreateCommand" >
+ <activeWhen>
+ <with
+ variable="selection">
+ <test
+ property="org.eclipse.papyrus.infra.nattable.tester.isNattableWidget"
+ value="true">
+ </test>
+ </with>
+ </activeWhen></handler>
+ <handler class= "org.eclipse.papyrus.sysml.nattable.menu.handlers.FlowPort_NAHandler" commandId="org.eclipse.papyrus.sysml.service.types.FlowPort_NACreateCommand" >
+ <activeWhen>
+ <with
+ variable="selection">
+ <test
+ property="org.eclipse.papyrus.infra.nattable.tester.isNattableWidget"
+ value="true">
+ </test>
+ </with>
+ </activeWhen></handler>
+ <handler class= "org.eclipse.papyrus.sysml.nattable.menu.handlers.FlowPropertyHandler" commandId="org.eclipse.papyrus.sysml.service.types.FlowPropertyCreateCommand" >
+ <activeWhen>
+ <with
+ variable="selection">
+ <test
+ property="org.eclipse.papyrus.infra.nattable.tester.isNattableWidget"
+ value="true">
+ </test>
+ </with>
+ </activeWhen></handler>
+ <handler class= "org.eclipse.papyrus.sysml.nattable.menu.handlers.FlowSpecificationHandler" commandId="org.eclipse.papyrus.sysml.service.types.FlowSpecificationCreateCommand" >
+ <activeWhen>
+ <with
+ variable="selection">
+ <test
+ property="org.eclipse.papyrus.infra.nattable.tester.isNattableWidget"
+ value="true">
+ </test>
+ </with>
+ </activeWhen></handler>
+ <!-- commented because unactivated by the filter see bug 408984
+ <handler class= "org.eclipse.papyrus.sysml.nattable.menu.handlers.ItemFlowHandler" commandId="org.eclipse.papyrus.sysml.service.types.ItemFlowCreateCommand" >
+ <activeWhen>
+ <with
+ variable="selection">
+ <test
+ property="org.eclipse.papyrus.infra.nattable.tester.isNattableWidget"
+ value="true">
+ </test>
+ </with>
+ </activeWhen></handler>
+ -->
+ <handler class= "org.eclipse.papyrus.sysml.nattable.menu.handlers.PartPropertyHandler" commandId="org.eclipse.papyrus.sysml.service.types.PartPropertyCreateCommand" >
+ <activeWhen>
+ <with
+ variable="selection">
+ <test
+ property="org.eclipse.papyrus.infra.nattable.tester.isNattableWidget"
+ value="true">
+ </test>
+ </with>
+ </activeWhen></handler>
+ <handler class= "org.eclipse.papyrus.sysml.nattable.menu.handlers.ProblemHandler" commandId="org.eclipse.papyrus.sysml.service.types.ProblemCreateCommand" >
+ <activeWhen>
+ <with
+ variable="selection">
+ <test
+ property="org.eclipse.papyrus.infra.nattable.tester.isNattableWidget"
+ value="true">
+ </test>
+ </with>
+ </activeWhen></handler>
+ <handler class= "org.eclipse.papyrus.sysml.nattable.menu.handlers.RationaleHandler" commandId="org.eclipse.papyrus.sysml.service.types.RationaleCreateCommand" >
+ <activeWhen>
+ <with
+ variable="selection">
+ <test
+ property="org.eclipse.papyrus.infra.nattable.tester.isNattableWidget"
+ value="true">
+ </test>
+ </with>
+ </activeWhen></handler>
+ <handler class= "org.eclipse.papyrus.sysml.nattable.menu.handlers.ReferencePropertyHandler" commandId="org.eclipse.papyrus.sysml.service.types.ReferencePropertyCreateCommand" >
+ <activeWhen>
+ <with
+ variable="selection">
+ <test
+ property="org.eclipse.papyrus.infra.nattable.tester.isNattableWidget"
+ value="true">
+ </test>
+ </with>
+ </activeWhen></handler>
+ <handler class= "org.eclipse.papyrus.sysml.nattable.menu.handlers.RequirementHandler" commandId="org.eclipse.papyrus.sysml.service.types.RequirementCreateCommand" >
+ <activeWhen>
+ <with
+ variable="selection">
+ <test
+ property="org.eclipse.papyrus.infra.nattable.tester.isNattableWidget"
+ value="true">
+ </test>
+ </with>
+ </activeWhen></handler>
+ <!-- commented because unactivated by the filter see bug 408984
+ <handler class= "org.eclipse.papyrus.sysml.nattable.menu.handlers.SatisfyHandler" commandId="org.eclipse.papyrus.sysml.service.types.SatisfyCreateCommand" >
+ <activeWhen>
+ <with
+ variable="selection">
+ <test
+ property="org.eclipse.papyrus.infra.nattable.tester.isNattableWidget"
+ value="true">
+ </test>
+ </with>
+ </activeWhen></handler>
+ -->
+ <handler class= "org.eclipse.papyrus.sysml.nattable.menu.handlers.UnitHandler" commandId="org.eclipse.papyrus.sysml.service.types.UnitCreateCommand" >
+ <activeWhen>
+ <with
+ variable="selection">
+ <test
+ property="org.eclipse.papyrus.infra.nattable.tester.isNattableWidget"
+ value="true">
+ </test>
+ </with>
+ </activeWhen></handler>
+ <handler class= "org.eclipse.papyrus.sysml.nattable.menu.handlers.ValuePropertyHandler" commandId="org.eclipse.papyrus.sysml.service.types.ValuePropertyCreateCommand" >
+ <activeWhen>
+ <with
+ variable="selection">
+ <test
+ property="org.eclipse.papyrus.infra.nattable.tester.isNattableWidget"
+ value="true">
+ </test>
+ </with>
+ </activeWhen></handler>
+ <handler class= "org.eclipse.papyrus.sysml.nattable.menu.handlers.ValueTypeHandler" commandId="org.eclipse.papyrus.sysml.service.types.ValueTypeCreateCommand" >
+ <activeWhen>
+ <with
+ variable="selection">
+ <test
+ property="org.eclipse.papyrus.infra.nattable.tester.isNattableWidget"
+ value="true">
+ </test>
+ </with>
+ </activeWhen></handler>
+ <!-- commented because unactivated by the filter see bug 408984
+ <handler class= "org.eclipse.papyrus.sysml.nattable.menu.handlers.ValueType_EnumerationHandler" commandId="org.eclipse.papyrus.sysml.service.types.ValueType_EnumerationCreateCommand" >
+ <activeWhen>
+ <with
+ variable="selection">
+ <test
+ property="org.eclipse.papyrus.infra.nattable.tester.isNattableWidget"
+ value="true">
+ </test>
+ </with>
+ </activeWhen></handler>
+ <handler class= "org.eclipse.papyrus.sysml.nattable.menu.handlers.ValueType_PrimitiveTypeHandler" commandId="org.eclipse.papyrus.sysml.service.types.ValueType_PrimitiveTypeCreateCommand" >
+ <activeWhen>
+ <with
+ variable="selection">
+ <test
+ property="org.eclipse.papyrus.infra.nattable.tester.isNattableWidget"
+ value="true">
+ </test>
+ </with>
+ </activeWhen></handler>
+ <handler class= "org.eclipse.papyrus.sysml.nattable.menu.handlers.VerifyHandler" commandId="org.eclipse.papyrus.sysml.service.types.VerifyCreateCommand" >
+ <activeWhen>
+ <with
+ variable="selection">
+ <test
+ property="org.eclipse.papyrus.infra.nattable.tester.isNattableWidget"
+ value="true">
+ </test>
+ </with>
+ </activeWhen></handler>
+ -->
+ <handler class= "org.eclipse.papyrus.sysml.nattable.menu.handlers.ViewHandler" commandId="org.eclipse.papyrus.sysml.service.types.ViewCreateCommand" >
+ <activeWhen>
+ <with
+ variable="selection">
+ <test
+ property="org.eclipse.papyrus.infra.nattable.tester.isNattableWidget"
+ value="true">
+ </test>
+ </with>
+ </activeWhen></handler>
+ <handler class= "org.eclipse.papyrus.sysml.nattable.menu.handlers.ViewPointHandler" commandId="org.eclipse.papyrus.sysml.service.types.ViewPointCreateCommand" >
+ <activeWhen>
+ <with
+ variable="selection">
+ <test
+ property="org.eclipse.papyrus.infra.nattable.tester.isNattableWidget"
+ value="true">
+ </test>
+ </with>
+ </activeWhen></handler>
+</extension>
+
+<extension
+ point="org.eclipse.ui.menus">
+ <menuContribution
+ allPopups="true"
+ locationURI="popup:org.eclipse.papyrus.infra.nattable.widget.menu?after=org.eclipse.papyrus.uml.nattable.create.uml.menu">
+ <menu
+ id="org.eclipse.papyrus.sysml.nattable.create.sysml.menu"
+ label="Create SysML Element">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="selection">
+ <test
+ property="org.eclipse.papyrus.infra.nattable.tester.isNattableWidget"
+ value="true">
+ </test>
+ </with>
+ </visibleWhen>
+ </menu>
+ </menuContribution>
+ <menuContribution
+ allPopups="false"
+ class="org.eclipse.papyrus.sysml.nattable.menu.handlers.SysmlNattableCreateMenu"
+ locationURI="popup:org.eclipse.papyrus.sysml.nattable.create.sysml.menu">
+ </menuContribution>
+
+
+ </extension>
+</plugin>
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/pom.xml b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/pom.xml
new file mode 100755
index 0000000..90ecabd
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/pom.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>org.eclipse.papyrus.sysml-nattable</artifactId>
+ <groupId>org.eclipse.papyrus.sysml</groupId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.papyrus.sysml.nattable.menu</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/ActorPartPropertyHandler.java b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/ActorPartPropertyHandler.java
new file mode 100755
index 0000000..629fa11
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/ActorPartPropertyHandler.java
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.nattable.menu.handlers;
+
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.UnexecutableCommand;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.papyrus.infra.emf.gmf.command.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.sysml.diagram.common.commands.CreateActorPartWithTypeConfigureCommandFactory;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for ActorPart (Property) creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class ActorPartPropertyHandler extends AbstractSysmlNattableCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.creation.handler.CreateHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.ACTOR_PART_PROPERTY;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command buildCommand() {
+
+ if (getCommandContext() == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ EObject container = getCommandContext().getContainer();
+ EReference reference = getCommandContext().getReference();
+
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(container);
+ if (provider == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ CreateElementRequest createRequest = null;
+ if (reference == null) {
+ createRequest = new CreateElementRequest(container, getElementTypeToCreate());
+ } else {
+ createRequest = new CreateElementRequest(container, getElementTypeToCreate(), reference);
+ }
+ createRequest.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateActorPartWithTypeConfigureCommandFactory());
+
+ // Retrieve create command from the Element Edit service
+ ICommand createGMFCommand = provider.getEditCommand(createRequest);
+ if (createGMFCommand != null) {
+ Command emfCommand = new GMFtoEMFCommandWrapper(createGMFCommand);
+ return emfCommand;
+ }
+ return UnexecutableCommand.INSTANCE;
+ }
+}
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/AllocateHandler.java b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/AllocateHandler.java
new file mode 100755
index 0000000..e8490f4
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/AllocateHandler.java
@@ -0,0 +1,43 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.nattable.menu.handlers;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for Allocate creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class AllocateHandler extends AbstractSysmlNattableCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.types.ui.handlers.AbstractCreateCommandHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.ALLOCATE;
+ }
+
+
+}
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/AssociationCompositeDirectedHandler.java b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/AssociationCompositeDirectedHandler.java
new file mode 100755
index 0000000..6267a35
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/AssociationCompositeDirectedHandler.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.nattable.menu.handlers;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for AssociationCompositeDirected creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class AssociationCompositeDirectedHandler extends AbstractSysmlNattableCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.types.ui.handlers.AbstractCreateCommandHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.ASSOCIATION_COMPOSITE_DIRECTED;
+ }
+}
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/AssociationCompositeHandler.java b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/AssociationCompositeHandler.java
new file mode 100755
index 0000000..b7f134c
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/AssociationCompositeHandler.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.nattable.menu.handlers;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for AssociationComposite creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class AssociationCompositeHandler extends AbstractSysmlNattableCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.types.ui.handlers.AbstractCreateCommandHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.ASSOCIATION_COMPOSITE;
+ }
+}
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/AssociationHandler.java b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/AssociationHandler.java
new file mode 100755
index 0000000..2e1583d
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/AssociationHandler.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.nattable.menu.handlers;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for Association creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class AssociationHandler extends AbstractSysmlNattableCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.types.ui.handlers.AbstractCreateCommandHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.ASSOCIATION;
+ }
+}
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/AssociationNoneDirectedHandler.java b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/AssociationNoneDirectedHandler.java
new file mode 100755
index 0000000..14cf814
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/AssociationNoneDirectedHandler.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.nattable.menu.handlers;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for AssociationNoneDirected creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class AssociationNoneDirectedHandler extends AbstractSysmlNattableCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.types.ui.handlers.AbstractCreateCommandHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.ASSOCIATION_NONE_DIRECTED;
+ }
+}
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/AssociationNoneHandler.java b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/AssociationNoneHandler.java
new file mode 100755
index 0000000..c502e73
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/AssociationNoneHandler.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.nattable.menu.handlers;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for AssociationNone creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class AssociationNoneHandler extends AbstractSysmlNattableCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.types.ui.handlers.AbstractCreateCommandHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.ASSOCIATION_NONE;
+ }
+}
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/AssociationSharedDirectedHandler.java b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/AssociationSharedDirectedHandler.java
new file mode 100755
index 0000000..f8890d0
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/AssociationSharedDirectedHandler.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.nattable.menu.handlers;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for AssociationSharedDirected creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class AssociationSharedDirectedHandler extends AbstractSysmlNattableCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.types.ui.handlers.AbstractCreateCommandHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.ASSOCIATION_SHARED_DIRECTED;
+ }
+}
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/AssociationSharedHandler.java b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/AssociationSharedHandler.java
new file mode 100755
index 0000000..f525a7d
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/AssociationSharedHandler.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.nattable.menu.handlers;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for AssociationShared creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class AssociationSharedHandler extends AbstractSysmlNattableCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.types.ui.handlers.AbstractCreateCommandHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.ASSOCIATION_SHARED;
+ }
+}
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/BlockHandler.java b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/BlockHandler.java
new file mode 100755
index 0000000..6e7fa9d
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/BlockHandler.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.nattable.menu.handlers;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for Block creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class BlockHandler extends AbstractSysmlNattableCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.creation.handler.CreateHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.BLOCK;
+ }
+}
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/ConformHandler.java b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/ConformHandler.java
new file mode 100755
index 0000000..2369b67
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/ConformHandler.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.nattable.menu.handlers;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for Conform creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class ConformHandler extends AbstractSysmlNattableCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.types.ui.handlers.AbstractCreateCommandHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.CONFORM;
+ }
+}
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/ConstraintBlockHandler.java b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/ConstraintBlockHandler.java
new file mode 100755
index 0000000..2127cf9
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/ConstraintBlockHandler.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.nattable.menu.handlers;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for ConstraintBlock creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class ConstraintBlockHandler extends AbstractSysmlNattableCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.types.ui.handlers.AbstractCreateCommandHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.CONSTRAINT_BLOCK;
+ }
+}
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/ConstraintBlockParameterHandler.java b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/ConstraintBlockParameterHandler.java
new file mode 100755
index 0000000..ed345c0
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/ConstraintBlockParameterHandler.java
@@ -0,0 +1,92 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.nattable.menu.handlers;
+
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.UnexecutableCommand;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.papyrus.infra.emf.gmf.command.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.infra.services.edit.commands.ConfigureFeatureCommandFactory;
+import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * <pre>
+ * Command handler for Problem creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class ConstraintBlockParameterHandler extends AbstractSysmlNattableCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.types.ui.handlers.AbstractCreateCommandHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return UMLElementTypes.PROPERTY;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command buildCommand() {
+
+ if (getCommandContext() == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ EObject container = getCommandContext().getContainer();
+ EReference reference = getCommandContext().getReference();
+
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(container);
+ if (provider == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ CreateElementRequest createRequest = null;
+ if (reference == null) {
+ createRequest = new CreateElementRequest(container, getElementTypeToCreate());
+ } else {
+ createRequest = new CreateElementRequest(container, getElementTypeToCreate(), reference);
+ }
+
+ String name = NamedElementUtil.getDefaultNameWithIncrementFromBase("parameter", ((Element) container).eContents()); //$NON-NLS-1$
+ createRequest.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new ConfigureFeatureCommandFactory(UMLPackage.eINSTANCE.getNamedElement_Name(), name));
+
+ // Retrieve create command from the Element Edit service
+ ICommand createGMFCommand = provider.getEditCommand(createRequest);
+ if (createGMFCommand != null) {
+ Command emfCommand = new GMFtoEMFCommandWrapper(createGMFCommand);
+ return emfCommand;
+ }
+ return UnexecutableCommand.INSTANCE;
+ }
+}
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/ConstraintPropertyHandler.java b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/ConstraintPropertyHandler.java
new file mode 100755
index 0000000..6d27054
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/ConstraintPropertyHandler.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.nattable.menu.handlers;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for ConstraintProperty creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class ConstraintPropertyHandler extends AbstractSysmlNattableCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.types.ui.handlers.AbstractCreateCommandHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.CONSTRAINT_PROPERTY;
+ }
+}
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/CopyHandler.java b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/CopyHandler.java
new file mode 100755
index 0000000..6fc699f
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/CopyHandler.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.nattable.menu.handlers;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for Copy creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class CopyHandler extends AbstractSysmlNattableCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.types.ui.handlers.AbstractCreateCommandHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.COPY;
+ }
+}
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/DeriveReqtHandler.java b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/DeriveReqtHandler.java
new file mode 100755
index 0000000..6b6297b
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/DeriveReqtHandler.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.nattable.menu.handlers;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for DeriveReqt creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class DeriveReqtHandler extends AbstractSysmlNattableCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.creation.handler.CreateHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.DERIVE_REQT;
+ }
+}
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/DimensionHandler.java b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/DimensionHandler.java
new file mode 100755
index 0000000..bdbea1f
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/DimensionHandler.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.nattable.menu.handlers;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for Dimension creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class DimensionHandler extends AbstractSysmlNattableCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.types.ui.handlers.AbstractCreateCommandHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.DIMENSION;
+ }
+}
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/FlowPortHandler.java b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/FlowPortHandler.java
new file mode 100755
index 0000000..2aca031
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/FlowPortHandler.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.nattable.menu.handlers;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for FlowPort creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class FlowPortHandler extends AbstractSysmlNattableCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.creation.handler.CreateHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.FLOW_PORT;
+ }
+}
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/FlowPort_InHandler.java b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/FlowPort_InHandler.java
new file mode 100755
index 0000000..e0b6b2a
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/FlowPort_InHandler.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.nattable.menu.handlers;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for FlowPort_In creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class FlowPort_InHandler extends AbstractSysmlNattableCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.types.ui.handlers.AbstractCreateCommandHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.FLOW_PORT_IN;
+ }
+}
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/FlowPort_InOutHandler.java b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/FlowPort_InOutHandler.java
new file mode 100755
index 0000000..9e044ef
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/FlowPort_InOutHandler.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.nattable.menu.handlers;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for FlowPort_InOut creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class FlowPort_InOutHandler extends AbstractSysmlNattableCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.types.ui.handlers.AbstractCreateCommandHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.FLOW_PORT_IN_OUT;
+ }
+}
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/FlowPort_NAHandler.java b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/FlowPort_NAHandler.java
new file mode 100755
index 0000000..8027c73
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/FlowPort_NAHandler.java
@@ -0,0 +1,70 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.nattable.menu.handlers;
+
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.UnexecutableCommand;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.papyrus.infra.emf.gmf.command.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.sysml.diagram.common.commands.CreateFlowPortWithFlowSpecificationConfigureCommandFactory;
+
+/**
+ * <pre>
+ * Command handler for FlowPort non atomic creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class FlowPort_NAHandler extends FlowPortHandler {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command buildCommand() {
+
+ if (getCommandContext() == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ EObject container = getCommandContext().getContainer();
+ EReference reference = getCommandContext().getReference();
+
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(container);
+ if (provider == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ CreateElementRequest createRequest = null;
+ if (reference == null) {
+ createRequest = new CreateElementRequest(container, getElementTypeToCreate());
+ } else {
+ createRequest = new CreateElementRequest(container, getElementTypeToCreate(), reference);
+ }
+ createRequest.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateFlowPortWithFlowSpecificationConfigureCommandFactory());
+
+ // Retrieve create command from the Element Edit service
+ ICommand createGMFCommand = provider.getEditCommand(createRequest);
+ if (createGMFCommand != null) {
+ Command emfCommand = new GMFtoEMFCommandWrapper(createGMFCommand);
+ return emfCommand;
+ }
+ return UnexecutableCommand.INSTANCE;
+ }
+}
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/FlowPort_OutHandler.java b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/FlowPort_OutHandler.java
new file mode 100755
index 0000000..235a5aa
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/FlowPort_OutHandler.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.nattable.menu.handlers;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for FlowPort_Out creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class FlowPort_OutHandler extends AbstractSysmlNattableCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.types.ui.handlers.AbstractCreateCommandHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.FLOW_PORT_OUT;
+ }
+}
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/FlowPropertyHandler.java b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/FlowPropertyHandler.java
new file mode 100755
index 0000000..99afcce
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/FlowPropertyHandler.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.nattable.menu.handlers;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for FlowProperty creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class FlowPropertyHandler extends AbstractSysmlNattableCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.creation.handler.CreateHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.FLOW_PROPERTY;
+ }
+}
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/FlowSpecificationHandler.java b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/FlowSpecificationHandler.java
new file mode 100755
index 0000000..25b7544
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/FlowSpecificationHandler.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.nattable.menu.handlers;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for FlowSpecification creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class FlowSpecificationHandler extends AbstractSysmlNattableCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.creation.handler.CreateHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.FLOW_SPECIFICATION;
+ }
+}
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/ItemFlowHandler.java b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/ItemFlowHandler.java
new file mode 100755
index 0000000..c2a124b
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/ItemFlowHandler.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.nattable.menu.handlers;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for ItemFlow creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class ItemFlowHandler extends AbstractSysmlNattableCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.types.ui.handlers.AbstractCreateCommandHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.ITEM_FLOW;
+ }
+}
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/PartPropertyHandler.java b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/PartPropertyHandler.java
new file mode 100755
index 0000000..35ddeb7
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/PartPropertyHandler.java
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.nattable.menu.handlers;
+
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.UnexecutableCommand;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.papyrus.infra.emf.gmf.command.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.sysml.diagram.common.commands.CreatePartWithTypeConfigureCommandFactory;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for Part (Property) creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class PartPropertyHandler extends AbstractSysmlNattableCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.creation.handler.CreateHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.PART_PROPERTY;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command buildCommand() {
+
+ if (getCommandContext() == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ EObject container = getCommandContext().getContainer();
+ EReference reference = getCommandContext().getReference();
+
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(container);
+ if (provider == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ CreateElementRequest createRequest = null;
+ if (reference == null) {
+ createRequest = new CreateElementRequest(container, getElementTypeToCreate());
+ } else {
+ createRequest = new CreateElementRequest(container, getElementTypeToCreate(), reference);
+ }
+ createRequest.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreatePartWithTypeConfigureCommandFactory());
+
+ // Retrieve create command from the Element Edit service
+ ICommand createGMFCommand = provider.getEditCommand(createRequest);
+ if (createGMFCommand != null) {
+ Command emfCommand = new GMFtoEMFCommandWrapper(createGMFCommand);
+ return emfCommand;
+ }
+ return UnexecutableCommand.INSTANCE;
+ }
+}
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/ProblemHandler.java b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/ProblemHandler.java
new file mode 100755
index 0000000..97a39a5
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/ProblemHandler.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.nattable.menu.handlers;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for Problem creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class ProblemHandler extends AbstractSysmlNattableCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.types.ui.handlers.AbstractCreateCommandHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.PROBLEM;
+ }
+}
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/RationaleHandler.java b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/RationaleHandler.java
new file mode 100755
index 0000000..096ead2
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/RationaleHandler.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.nattable.menu.handlers;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for Rationale creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class RationaleHandler extends AbstractSysmlNattableCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.types.ui.handlers.AbstractCreateCommandHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.RATIONALE;
+ }
+}
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/ReferencePropertyHandler.java b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/ReferencePropertyHandler.java
new file mode 100755
index 0000000..dc419d5
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/ReferencePropertyHandler.java
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.nattable.menu.handlers;
+
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.UnexecutableCommand;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.papyrus.infra.emf.gmf.command.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.sysml.diagram.common.commands.CreateReferenceWithTypeConfigureCommandFactory;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for Reference (Property) creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class ReferencePropertyHandler extends AbstractSysmlNattableCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.creation.handler.CreateHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.REFERENCE_PROPERTY;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command buildCommand() {
+
+ if (getCommandContext() == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ EObject container = getCommandContext().getContainer();
+ EReference reference = getCommandContext().getReference();
+
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(container);
+ if (provider == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ CreateElementRequest createRequest = null;
+ if (reference == null) {
+ createRequest = new CreateElementRequest(container, getElementTypeToCreate());
+ } else {
+ createRequest = new CreateElementRequest(container, getElementTypeToCreate(), reference);
+ }
+ createRequest.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateReferenceWithTypeConfigureCommandFactory());
+
+ // Retrieve create command from the Element Edit service
+ ICommand createGMFCommand = provider.getEditCommand(createRequest);
+ if (createGMFCommand != null) {
+ Command emfCommand = new GMFtoEMFCommandWrapper(createGMFCommand);
+ return emfCommand;
+ }
+ return UnexecutableCommand.INSTANCE;
+ }
+}
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/RequirementHandler.java b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/RequirementHandler.java
new file mode 100755
index 0000000..618b6e8
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/RequirementHandler.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.nattable.menu.handlers;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for Requirement creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class RequirementHandler extends AbstractSysmlNattableCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.creation.handler.CreateHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.REQUIREMENT;
+ }
+}
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/SatisfyHandler.java b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/SatisfyHandler.java
new file mode 100755
index 0000000..7ccea60
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/SatisfyHandler.java
@@ -0,0 +1,42 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.nattable.menu.handlers;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for Satisfy creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class SatisfyHandler extends AbstractSysmlNattableCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.types.ui.handlers.AbstractCreateCommandHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.SATISFY;
+ }
+
+}
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/UnitHandler.java b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/UnitHandler.java
new file mode 100755
index 0000000..ac027f3
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/UnitHandler.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.nattable.menu.handlers;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for Unit creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class UnitHandler extends AbstractSysmlNattableCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.types.ui.handlers.AbstractCreateCommandHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.UNIT;
+ }
+}
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/ValuePropertyHandler.java b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/ValuePropertyHandler.java
new file mode 100755
index 0000000..770f13f
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/ValuePropertyHandler.java
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.nattable.menu.handlers;
+
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.UnexecutableCommand;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.papyrus.infra.emf.gmf.command.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.sysml.diagram.common.commands.CreateValueWithTypeConfigureCommandFactory;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for Value (Property) creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class ValuePropertyHandler extends AbstractSysmlNattableCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.creation.handler.CreateHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.VALUE_PROPERTY;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command buildCommand() {
+
+ if (getCommandContext() == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ EObject container = getCommandContext().getContainer();
+ EReference reference = getCommandContext().getReference();
+
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(container);
+ if (provider == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ CreateElementRequest createRequest = null;
+ if (reference == null) {
+ createRequest = new CreateElementRequest(container, getElementTypeToCreate());
+ } else {
+ createRequest = new CreateElementRequest(container, getElementTypeToCreate(), reference);
+ }
+ createRequest.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateValueWithTypeConfigureCommandFactory());
+
+ // Retrieve create command from the Element Edit service
+ ICommand createGMFCommand = provider.getEditCommand(createRequest);
+ if (createGMFCommand != null) {
+ Command emfCommand = new GMFtoEMFCommandWrapper(createGMFCommand);
+ return emfCommand;
+ }
+ return UnexecutableCommand.INSTANCE;
+ }
+}
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/ValueTypeHandler.java b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/ValueTypeHandler.java
new file mode 100755
index 0000000..a39d928
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/ValueTypeHandler.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.nattable.menu.handlers;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for ValueType creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class ValueTypeHandler extends AbstractSysmlNattableCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.types.ui.handlers.AbstractCreateCommandHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.VALUE_TYPE;
+ }
+}
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/ValueType_EnumerationHandler.java b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/ValueType_EnumerationHandler.java
new file mode 100755
index 0000000..5612bce
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/ValueType_EnumerationHandler.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.nattable.menu.handlers;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for ValueType_Enumeration creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class ValueType_EnumerationHandler extends AbstractSysmlNattableCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.types.ui.handlers.AbstractCreateCommandHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.VALUE_TYPE_ENUMERATION;
+ }
+}
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/ValueType_PrimitiveTypeHandler.java b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/ValueType_PrimitiveTypeHandler.java
new file mode 100755
index 0000000..8588412
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/ValueType_PrimitiveTypeHandler.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.nattable.menu.handlers;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for ValueType_PrimitiveType creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class ValueType_PrimitiveTypeHandler extends AbstractSysmlNattableCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.types.ui.handlers.AbstractCreateCommandHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.VALUE_TYPE_PRIMITIVE_TYPE;
+ }
+}
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/VerifyHandler.java b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/VerifyHandler.java
new file mode 100755
index 0000000..8620f3b
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/VerifyHandler.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.nattable.menu.handlers;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for Verify creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class VerifyHandler extends AbstractSysmlNattableCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.types.ui.handlers.AbstractCreateCommandHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.VERIFY;
+ }
+}
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/ViewHandler.java b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/ViewHandler.java
new file mode 100755
index 0000000..3519efd
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/ViewHandler.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.nattable.menu.handlers;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for View creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class ViewHandler extends AbstractSysmlNattableCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.types.ui.handlers.AbstractCreateCommandHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.VIEW;
+ }
+}
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/ViewPointHandler.java b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/ViewPointHandler.java
new file mode 100755
index 0000000..429643d
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/ViewPointHandler.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.nattable.menu.handlers;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for ViewPoint creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class ViewPointHandler extends AbstractSysmlNattableCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.types.ui.handlers.AbstractCreateCommandHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.VIEW_POINT;
+ }
+}
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src/org/eclipse/papyrus/sysml/nattable/menu/Activator.java b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src/org/eclipse/papyrus/sysml/nattable/menu/Activator.java
new file mode 100755
index 0000000..a062acd
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src/org/eclipse/papyrus/sysml/nattable/menu/Activator.java
@@ -0,0 +1,69 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.nattable.menu;
+
+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.sysml.nattable.menu"; //$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)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ log = new LogHelper(plugin);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src/org/eclipse/papyrus/sysml/nattable/menu/handlers/AbstractSysmlNattableCreateCommandHandler.java b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src/org/eclipse/papyrus/sysml/nattable/menu/handlers/AbstractSysmlNattableCreateCommandHandler.java
new file mode 100755
index 0000000..f879569
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src/org/eclipse/papyrus/sysml/nattable/menu/handlers/AbstractSysmlNattableCreateCommandHandler.java
@@ -0,0 +1,78 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.nattable.menu.handlers;
+
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+import org.eclipse.papyrus.infra.nattable.utils.INattableModelManagerUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.sysml.service.types.handlers.AbstractSysmlCreateElementCommandHandler;
+import org.eclipse.papyrus.uml.nattable.menu.util.TableMenuUtils;
+import org.eclipse.papyrus.uml.service.types.utils.ICommandContext;
+
+/**
+ * Abstract handler for the creation commands of Sysml elements in the Nattable editor
+ *
+ */
+public abstract class AbstractSysmlNattableCreateCommandHandler extends AbstractSysmlCreateElementCommandHandler {
+
+ /**
+ * <pre>
+ *
+ * Build the create command for an element creation in the selected container.
+ * The create command is given by the {@link IElementEditService} of selected
+ * element.
+ *
+ * @return the composite creation command for current selection
+ *
+ * </pre>
+ */
+ @Override
+ protected Command buildCommand() {
+ Command createCmd = super.buildCommand();
+ return TableMenuUtils.buildNattableCreationCommand(createCmd, this.createRequest);
+ }
+
+ /**
+ * Obtain the context of the active table editor.
+ *
+ * @see org.eclipse.papyrus.uml.service.types.ui.handlers.AbstractCommandHandler#getCommandContext()
+ *
+ * @return
+ */
+ @Override
+ protected ICommandContext getCommandContext() {
+ return TableMenuUtils.getTableCreateElementCommandContext(INattableModelManagerUtils.getTableManagerFromWorkbenchPart(getActiveWorkbenchPart()));
+
+ }
+
+ /**
+ * Verify if this handler is currently active and the command can execute. Additionally, verify if this table can add this type of element.
+ *
+ * @see org.eclipse.papyrus.uml.service.types.ui.handlers.AbstractCreateCommandHandler#setEnabled(java.lang.Object)
+ *
+ * @param evaluationContext
+ */
+ @Override
+ public void setEnabled(Object evaluationContext) {
+ INattableModelManager tableManager = INattableModelManagerUtils.getTableManagerFromWorkbenchPart(getActiveWorkbenchPart());
+ boolean isEnabled = tableManager.canCreateRowElement(getElementTypeToCreate().getId());
+ if (isEnabled) {
+ // we test the enable of the super implementation
+ super.setEnabled(evaluationContext);
+ isEnabled = super.isEnabled();
+ }
+ setBaseEnabled(isEnabled);
+
+ }
+
+}
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src/org/eclipse/papyrus/sysml/nattable/menu/handlers/SysmlNattableCreateMenu.java b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src/org/eclipse/papyrus/sysml/nattable/menu/handlers/SysmlNattableCreateMenu.java
new file mode 100755
index 0000000..e342112
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.menu/src/org/eclipse/papyrus/sysml/nattable/menu/handlers/SysmlNattableCreateMenu.java
@@ -0,0 +1,35 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.nattable.menu.handlers;
+
+import org.eclipse.papyrus.infra.nattable.utils.NattableWidgetPropertyTester;
+import org.eclipse.papyrus.sysml.service.types.menu.AbstractCreateSysmlChildMenu;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.menus.IContributionRoot;
+import org.eclipse.ui.services.IServiceLocator;
+
+/**
+ * Menu contributions for the creation of Sysml elements from the Nattable editor
+ */
+public class SysmlNattableCreateMenu extends AbstractCreateSysmlChildMenu {
+
+ private NattableWidgetPropertyTester tester = new NattableWidgetPropertyTester();
+
+ @Override
+ public void createContributionItems(IServiceLocator serviceLocator, IContributionRoot additions) {
+ IWorkbenchPart part = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActivePart();
+ if (tester.test(part, NattableWidgetPropertyTester.IS_NATTABLE_WIDGET, null, Boolean.TRUE)) {
+ super.createContributionItems(serviceLocator, additions);
+ }
+ }
+}
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config/.classpath b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config/.classpath
new file mode 100755
index 0000000..ad32c83
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config/.project b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config/.project
new file mode 100755
index 0000000..6c7037e
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config/.project
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.sysml.nattable.requirement.config</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>
+ <buildCommand>
+ <name>org.eclipse.oomph.version.VersionBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>check.maven.pom</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>ignore.lower.bound.dependency.ranges</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>release.path</key>
+ <value>/org.eclipse.papyrus.releng.main.release/release.xml</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.oomph.version.VersionNature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config/.settings/org.eclipse.jdt.core.prefs b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 0000000..94d61f0
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,291 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config/.settings/org.eclipse.jdt.ui.prefs b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config/.settings/org.eclipse.jdt.ui.prefs
new file mode 100755
index 0000000..954281d
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,68 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+formatter_profile=_Papyrus
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config/.settings/org.eclipse.pde.api.tools.prefs b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100755
index 0000000..23fb95e
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config/.settings/org.eclipse.pde.api.tools.prefs
@@ -0,0 +1,98 @@
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+API_USE_SCAN_FIELD_SEVERITY=Error
+API_USE_SCAN_METHOD_SEVERITY=Error
+API_USE_SCAN_TYPE_SEVERITY=Error
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Ignore
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_ANNOTATION=Ignore
+INVALID_JAVADOC_TAG=Ignore
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Ignore
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+MISSING_EE_DESCRIPTIONS=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=Enabled
+eclipse.preferences.version=1
+incompatible_api_component_version=Error
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Warning
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config/META-INF/MANIFEST.MF b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config/META-INF/MANIFEST.MF
new file mode 100755
index 0000000..190f0ff
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config/META-INF/MANIFEST.MF
@@ -0,0 +1,14 @@
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.papyrus.sysml.nattable;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.infra.nattable.common;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.sysml.service.types;bundle-version="[2.0.0,3.0.0)"
+Export-Package: org.eclipse.papyrus.sysml.nattable.requirement.config
+Bundle-Vendor: %Bundle-Vendor
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 1.2.0.qualifier
+Bundle-Name: %Bundle-Name
+Bundle-Activator: org.eclipse.papyrus.sysml.nattable.requirement.config.Activator
+Bundle-ManifestVersion: 2
+Bundle-Description: %pluginDescription
+Bundle-SymbolicName: org.eclipse.papyrus.sysml.nattable.requirement.config;singleton:=true
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config/OSGI-INF/l10n/bundle.properties b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config/OSGI-INF/l10n/bundle.properties
new file mode 100755
index 0000000..93532ab
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config/OSGI-INF/l10n/bundle.properties
@@ -0,0 +1,3 @@
+#Properties file for org.eclipse.papyrus.sysml.nattable.requirement.config
+Bundle-Vendor = Eclipse Modeling Project
+Bundle-Name = Nattable Requirement Configuration
\ No newline at end of file
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config/about.html b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config/about.html
new file mode 100755
index 0000000..598b368
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>May 12, 2008</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config/build.properties b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config/build.properties
new file mode 100755
index 0000000..0633bff
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config/build.properties
@@ -0,0 +1,10 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ OSGI-INF/,\
+ configs/,\
+ icons/,\
+ about.html
+src.includes = about.html
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration
new file mode 100755
index 0000000..621c262
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nattableconfiguration:TableConfiguration 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:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:nattablelabelprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattablecontentprovider" xmlns:nattablestyle="http://www.eclipse.org/papyrus/nattable/model/table/nattablestyle" xmlns:nattabletester="http://www.eclipse.org/papyrus/nattable/model/table/nattabletester" description="A synchronized table for SysML Requirements" name="RequirementTable" type="PapyrusSysMLRequirementTable" iconPath="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/icons/table_SysML_Requirement.png" defaultRowAxisProvider="//@rowAxisProviders.0" defaultColumnAxisProvider="//@columnAxisProviders.0">
+ <styles xsi:type="nattablestyle:StringListValueStyle" name="dragRegions">
+ <stringListValue>ROW_HEADER</stringListValue>
+ </styles>
+ <creationTester xsi:type="nattabletester:JavaTableTester" tester="org.eclipse.papyrus.sysml.nattable.config.canCreateRequirementTable"/>
+ <rowHeaderAxisConfiguration xsi:type="nattableaxisconfiguration:TableHeaderAxisConfiguration" indexStyle="NUMERIC">
+ <ownedLabelConfigurations xsi:type="nattablelabelprovider:ObjectLabelProviderConfiguration"/>
+ <ownedLabelConfigurations xsi:type="nattablelabelprovider:OperationLabelProviderConfiguration" displayType="false" displayMultiplicity="false"/>
+ <ownedAxisConfigurations xsi:type="nattableaxisconfiguration:EStructuralFeatureValueFillingConfiguration">
+ <listenFeature xsi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Namespace/ownedMember"/>
+ </ownedAxisConfigurations>
+ <ownedAxisConfigurations xsi:type="nattableaxisconfiguration:PasteEObjectConfiguration" pastedElementId="org.eclipse.papyrus.sysml.Requirement">
+ <postActions>applyStereotype:/SysML::Requirements::Requirement</postActions>
+ <pasteElementContainementFeature xsi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Package/packagedElement"/>
+ <axisIdentifier xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_OgydQXmoEeWVZIGG1XbiFw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axisIdentifier>
+ </ownedAxisConfigurations>
+ <axisManagers xsi:type="nattableaxisconfiguration:AxisManagerRepresentation" axisManagerId="org.eclipse.papyrus.sysml.nattable.requirement.axis.manager" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.labelprovider" headerLabelConfiguration="//@rowHeaderAxisConfiguration/@ownedLabelConfigurations.0" specificAxisConfigurations="//@rowHeaderAxisConfiguration/@ownedAxisConfigurations.0"/>
+ </rowHeaderAxisConfiguration>
+ <columnHeaderAxisConfiguration xsi:type="nattableaxisconfiguration:TableHeaderAxisConfiguration">
+ <ownedLabelConfigurations xsi:type="nattablelabelprovider:FeatureLabelProviderConfiguration"/>
+ <ownedLabelConfigurations xsi:type="nattablelabelprovider:OperationLabelProviderConfiguration"/>
+ <axisManagers xsi:type="nattableaxisconfiguration:AxisManagerRepresentation" axisManagerId="org.eclipse.papyrus.uml.nattable.feature.axis.manager" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.feature.labelprovider" headerLabelConfiguration="//@columnHeaderAxisConfiguration/@ownedLabelConfigurations.0"/>
+ <axisManagers xsi:type="nattableaxisconfiguration:AxisManagerRepresentation" axisManagerId="org.eclipse.papyrus.uml.nattable.stereotype.property.axis.manager" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.feature.labelprovider" headerLabelConfiguration="//@columnHeaderAxisConfiguration/@ownedLabelConfigurations.0"/>
+ <axisManagers xsi:type="nattableaxisconfiguration:AxisManagerRepresentation" axisManagerId="org.eclipse.papyrus.uml.nattable.operation.axis.manager" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.operation.labelprovider" headerLabelConfiguration="//@columnHeaderAxisConfiguration/@ownedLabelConfigurations.1"/>
+ </columnHeaderAxisConfiguration>
+ <columnAxisProviders xsi:type="nattableaxisprovider:SlaveObjectAxisProvider" description="Provides the columns of the tables with a default configuration" name="Requirements Feature Columns Provider">
+ <axis xsi:type="nattableaxis:FeatureIdAxis" manager="//@columnHeaderAxisConfiguration/@axisManagers.1" element="property_of_stereotype:/SysML::Requirements::Requirement::id"/>
+ <axis xsi:type="nattableaxis:EStructuralFeatureAxis" manager="//@columnHeaderAxisConfiguration/@axisManagers.0">
+ <element xsi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xsi:type="nattableaxis:FeatureIdAxis" manager="//@columnHeaderAxisConfiguration/@axisManagers.1" element="property_of_stereotype:/SysML::Requirements::Requirement::text"/>
+ </columnAxisProviders>
+ <rowAxisProviders xsi:type="nattableaxisprovider:MasterObjectAxisProvider" description="Provides the requirements directly owned by the context of the table" name="Requirement Axis Provider" disconnectSlave="true"/>
+</nattableconfiguration:TableConfiguration>
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config/icons/old/table_SysML_Requirement.gif b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config/icons/old/table_SysML_Requirement.gif
new file mode 100755
index 0000000..91fc98b
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config/icons/old/table_SysML_Requirement.gif
Binary files differ
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config/icons/table_SysML_Requirement.png b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config/icons/table_SysML_Requirement.png
new file mode 100755
index 0000000..a325432
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config/icons/table_SysML_Requirement.png
Binary files differ
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config/org.eclipse.papyrus.sysml.nattable.requirement.config.iml b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config/org.eclipse.papyrus.sysml.nattable.requirement.config.iml
new file mode 100755
index 0000000..9b729b0
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config/org.eclipse.papyrus.sysml.nattable.requirement.config.iml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+ <component name="NewModuleRootManager" inherit-compiler-output="false">
+ <output url="file://$MODULE_DIR$/bin" />
+ <exclude-output />
+ <content url="file://$MODULE_DIR$">
+ <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
+ </content>
+ <orderEntry type="jdk" jdkName="JavaSE-1.6" jdkType="JavaSDK" />
+ <orderEntry type="module" module-name="org.eclipse.papyrus.sysml.nattable" />
+ <orderEntry type="module" module-name="org.eclipse.papyrus.infra.nattable.common" />
+ <orderEntry type="module" module-name="org.eclipse.papyrus.sysml.service.types" />
+ <orderEntry type="library" name="ECLIPSE" level="application" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ </component>
+</module>
\ No newline at end of file
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config/plugin.properties b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config/plugin.properties
new file mode 100755
index 0000000..f4c3f32
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config/plugin.properties
@@ -0,0 +1,12 @@
+#################################################################################
+# Copyright (c) 2015 CEA LIST.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Benoit Maggi (CEA LIST) benoit.maggi@cea.fr - initial API and implementation
+##################################################################################)
+
+pluginDescription=This plugin provides the configuration to use for Requirement Table.
\ No newline at end of file
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config/plugin.xml b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config/plugin.xml
new file mode 100755
index 0000000..da01c0a
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config/plugin.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.papyrus.infra.nattable.configuration">
+ <configuration
+ file="configs/requirement.nattableconfiguration"
+ type="PapyrusSysMLRequirementTable">
+ </configuration>
+ </extension>
+ <extension
+ point="org.eclipse.papyrus.infra.nattable.tester">
+ <tester
+ class="org.eclipse.papyrus.sysml.nattable.requirement.tester.RequirementTableTester"
+ id="org.eclipse.papyrus.sysml.nattable.config.canCreateRequirementTable">
+ </tester>
+ </extension>
+</plugin>
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config/pom.xml b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config/pom.xml
new file mode 100755
index 0000000..d2ab400
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config/pom.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>org.eclipse.papyrus.sysml-nattable</artifactId>
+ <groupId>org.eclipse.papyrus.sysml</groupId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.papyrus.sysml.nattable.requirement.config</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config/src/org/eclipse/papyrus/sysml/nattable/requirement/config/Activator.java b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config/src/org/eclipse/papyrus/sysml/nattable/requirement/config/Activator.java
new file mode 100755
index 0000000..d41598a
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config/src/org/eclipse/papyrus/sysml/nattable/requirement/config/Activator.java
@@ -0,0 +1,56 @@
+package org.eclipse.papyrus.sysml.nattable.requirement.config;
+
+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.sysml.nattable.requirement.config"; //$NON-NLS-1$
+
+ public static final String TABLE_TYPE = "PapyrusSysMLRequirementTable"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config/src/org/eclipse/papyrus/sysml/nattable/requirement/tester/RequirementTableTester.java b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config/src/org/eclipse/papyrus/sysml/nattable/requirement/tester/RequirementTableTester.java
new file mode 100755
index 0000000..0b6d256
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config/src/org/eclipse/papyrus/sysml/nattable/requirement/tester/RequirementTableTester.java
@@ -0,0 +1,62 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.nattable.requirement.tester;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher;
+import org.eclipse.papyrus.infra.nattable.tester.ITableTester;
+import org.eclipse.papyrus.sysml.nattable.requirement.config.Activator;
+import org.eclipse.papyrus.sysml.requirements.RequirementsPackage;
+import org.eclipse.papyrus.sysml.service.types.matcher.RequirementMatcher;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+/**
+ * The tester used to know if we can create requirement table
+ *
+ * @author Vincent Lorenzo
+ *
+ */
+public class RequirementTableTester implements ITableTester {
+
+ private static final IElementMatcher matcher = new RequirementMatcher();
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.tester.ITableTester#isAllowed(java.lang.Object)
+ *
+ * @param context
+ * @return
+ */
+ @Override
+ public IStatus isAllowed(Object context) {
+ if (context instanceof Element) {
+ Element el = (Element) context;
+ boolean result = context instanceof Package || matcher.matches(el);
+ if (result) {
+ final String packageQN = UMLUtil.getProfile(RequirementsPackage.eINSTANCE, el).getQualifiedName();
+ result = result && el.getNearestPackage().getAppliedProfile(packageQN, true) != null;
+ if (result) {
+ return new Status(IStatus.OK, Activator.PLUGIN_ID, "The context allowed to create a Requirement Table");
+ } else {
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, String.format("The profile {0} is not applied on the model", packageQN));
+ }
+ }
+ }
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, "The context is not an UML Element");
+ }
+
+}
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement/.classpath b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement/.classpath
new file mode 100755
index 0000000..ad32c83
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement/.project b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement/.project
new file mode 100755
index 0000000..f501be3
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement/.project
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.sysml.nattable.requirement</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>
+ <buildCommand>
+ <name>org.eclipse.oomph.version.VersionBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>check.maven.pom</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>ignore.lower.bound.dependency.ranges</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>release.path</key>
+ <value>/org.eclipse.papyrus.releng.main.release/release.xml</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.oomph.version.VersionNature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement/.settings/org.eclipse.jdt.core.prefs b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 0000000..4d72ad1
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,288 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement/.settings/org.eclipse.jdt.ui.prefs b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement/.settings/org.eclipse.jdt.ui.prefs
new file mode 100755
index 0000000..954281d
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,68 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+formatter_profile=_Papyrus
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement/.settings/org.eclipse.pde.api.tools.prefs b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100755
index 0000000..23fb95e
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement/.settings/org.eclipse.pde.api.tools.prefs
@@ -0,0 +1,98 @@
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+API_USE_SCAN_FIELD_SEVERITY=Error
+API_USE_SCAN_METHOD_SEVERITY=Error
+API_USE_SCAN_TYPE_SEVERITY=Error
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Ignore
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_ANNOTATION=Ignore
+INVALID_JAVADOC_TAG=Ignore
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Ignore
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+MISSING_EE_DESCRIPTIONS=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=Enabled
+eclipse.preferences.version=1
+incompatible_api_component_version=Error
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Warning
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement/META-INF/MANIFEST.MF b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement/META-INF/MANIFEST.MF
new file mode 100755
index 0000000..00aabed
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement/META-INF/MANIFEST.MF
@@ -0,0 +1,15 @@
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.papyrus.sysml.service.types;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.uml.nattable;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.infra.nattable.common;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.sysml;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.papyrus.sysml.nattable.requirement.config;bundle-version="[1.2.0,2.0.0)"
+Bundle-Vendor: %Bundle-Vendor
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 1.2.0.qualifier
+Bundle-Name: %Bundle-Name
+Bundle-Activator: org.eclipse.papyrus.sysml.nattable.requirement.Activator
+Bundle-ManifestVersion: 2
+Bundle-Description: %pluginDescription
+Bundle-SymbolicName: org.eclipse.papyrus.sysml.nattable.requirement;singleton:=true
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement/OSGI-INF/l10n/bundle.properties b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement/OSGI-INF/l10n/bundle.properties
new file mode 100755
index 0000000..21fd045
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement/OSGI-INF/l10n/bundle.properties
@@ -0,0 +1,3 @@
+#Properties file for org.eclipse.papyrus.sysml.nattable.requirement
+Bundle-Vendor = Eclipse Modeling Project
+Bundle-Name = Nattable Requirement Editor
\ No newline at end of file
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement/about.html b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement/about.html
new file mode 100755
index 0000000..598b368
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>May 12, 2008</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement/build.properties b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement/build.properties
new file mode 100755
index 0000000..7cae118
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement/build.properties
@@ -0,0 +1,9 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ about.html,\
+ OSGI-INF/,\
+ icons/
+src.includes = about.html
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement/icons/table_SysML_Requirement_new.png b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement/icons/table_SysML_Requirement_new.png
new file mode 100755
index 0000000..ed086b5
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement/icons/table_SysML_Requirement_new.png
Binary files differ
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement/org.eclipse.papyrus.sysml.nattable.requirement.iml b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement/org.eclipse.papyrus.sysml.nattable.requirement.iml
new file mode 100755
index 0000000..1fc2a89
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement/org.eclipse.papyrus.sysml.nattable.requirement.iml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+ <component name="NewModuleRootManager" inherit-compiler-output="false">
+ <output url="file://$MODULE_DIR$/bin" />
+ <exclude-output />
+ <content url="file://$MODULE_DIR$">
+ <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
+ </content>
+ <orderEntry type="jdk" jdkName="JavaSE-1.6" jdkType="JavaSDK" />
+ <orderEntry type="module" module-name="org.eclipse.papyrus.sysml.service.types" />
+ <orderEntry type="module" module-name="org.eclipse.papyrus.uml.nattable" />
+ <orderEntry type="module" module-name="org.eclipse.papyrus.infra.nattable.common" />
+ <orderEntry type="module" module-name="org.eclipse.papyrus.sysml" />
+ <orderEntry type="module" module-name="org.eclipse.papyrus.sysml.nattable.requirement.config" />
+ <orderEntry type="library" name="ECLIPSE" level="application" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ </component>
+</module>
\ No newline at end of file
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement/plugin.properties b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement/plugin.properties
new file mode 100755
index 0000000..8895526
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement/plugin.properties
@@ -0,0 +1,12 @@
+#################################################################################
+# Copyright (c) 2015 CEA LIST.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Benoit Maggi (CEA LIST) benoit.maggi@cea.fr - initial API and implementation
+##################################################################################)
+
+pluginDescription=This plugin provides the nattable editor for SysML Requirements.
\ No newline at end of file
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement/plugin.xml b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement/plugin.xml
new file mode 100755
index 0000000..82090d2
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement/plugin.xml
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.ui.commands">
+ <command
+ categoryId="org.eclipse.papyrus.editor.category"
+ description="Create a SysML Requirement NatTable Editor"
+ id="org.eclipse.papyrus.sysml.nattable.requirement.create.command"
+ name="Create a new Requirement Table">
+ </command>
+ <command
+ categoryId="org.eclipse.papyrus.editor.category"
+ description="Create a SysML Requirement NatTable Editor Without Dialog for Name"
+ id="org.eclipse.papyrus.sysml.nattable.requirement.create.withoutdialog.command"
+ name="Create a new Requirement Table">
+ </command>
+ </extension>
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ commandId="org.eclipse.papyrus.sysml.nattable.requirement.create.command">
+ <activeWhen>
+ <or>
+ <with
+ variable="activeEditorId">
+ <equals
+ value="org.eclipse.papyrus.infra.core.papyrusEditor">
+ </equals>
+ </with>
+ </or>
+ </activeWhen>
+ <class
+ class="org.eclipse.papyrus.infra.nattable.common.handlers.CreateNatTableEditorHandler">
+ <parameter
+ name="tableType"
+ value="PapyrusSysMLRequirementTable">
+ </parameter>
+ </class>
+ </handler>
+ <handler
+ commandId="org.eclipse.papyrus.sysml.nattable.requirement.create.withoutdialog.command">
+ <activeWhen>
+ <or>
+ <with
+ variable="activeEditorId">
+ <equals
+ value="org.eclipse.papyrus.infra.core.papyrusEditor">
+ </equals>
+ </with>
+ </or>
+ </activeWhen>
+ <class
+ class="org.eclipse.papyrus.infra.nattable.common.handlers.CreateNatTableEditorWithoutDialogHandler">
+ <parameter
+ name="tableType"
+ value="PapyrusSysMLRequirementTable">
+ </parameter>
+ </class>
+ </handler>
+ </extension>
+ <extension
+ point="org.eclipse.ui.commandImages">
+ <image
+ commandId="org.eclipse.papyrus.sysml.nattable.requirement.create.command"
+ icon="icons/table_SysML_Requirement_new.png">
+ </image>
+ <image
+ commandId="org.eclipse.papyrus.sysml.nattable.requirement.create.withoutdialog.command"
+ icon="icons/table_SysML_Requirement_new.png">
+ </image>
+ </extension>
+</plugin>
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement/pom.xml b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement/pom.xml
new file mode 100755
index 0000000..6b1176b
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement/pom.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>org.eclipse.papyrus.sysml-nattable</artifactId>
+ <groupId>org.eclipse.papyrus.sysml</groupId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.papyrus.sysml.nattable.requirement</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement/src/org/eclipse/papyrus/sysml/nattable/requirement/Activator.java b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement/src/org/eclipse/papyrus/sysml/nattable/requirement/Activator.java
new file mode 100755
index 0000000..b1608f0
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable.requirement/src/org/eclipse/papyrus/sysml/nattable/requirement/Activator.java
@@ -0,0 +1,67 @@
+/*****************************************************************************
+ * 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.sysml.nattable.requirement;
+
+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.sysml.nattable.requirement"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable/.classpath b/plugins/nattable/org.eclipse.papyrus.sysml.nattable/.classpath
new file mode 100755
index 0000000..ad32c83
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable/.project b/plugins/nattable/org.eclipse.papyrus.sysml.nattable/.project
new file mode 100755
index 0000000..8576e75
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable/.project
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.sysml.nattable</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>
+ <buildCommand>
+ <name>org.eclipse.oomph.version.VersionBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>check.maven.pom</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>ignore.lower.bound.dependency.ranges</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>release.path</key>
+ <value>/org.eclipse.papyrus.releng.main.release/release.xml</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.oomph.version.VersionNature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable/.settings/org.eclipse.jdt.core.prefs b/plugins/nattable/org.eclipse.papyrus.sysml.nattable/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 0000000..4d72ad1
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,288 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable/.settings/org.eclipse.jdt.ui.prefs b/plugins/nattable/org.eclipse.papyrus.sysml.nattable/.settings/org.eclipse.jdt.ui.prefs
new file mode 100755
index 0000000..954281d
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,68 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+formatter_profile=_Papyrus
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable/.settings/org.eclipse.pde.api.tools.prefs b/plugins/nattable/org.eclipse.papyrus.sysml.nattable/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100755
index 0000000..23fb95e
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable/.settings/org.eclipse.pde.api.tools.prefs
@@ -0,0 +1,98 @@
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+API_USE_SCAN_FIELD_SEVERITY=Error
+API_USE_SCAN_METHOD_SEVERITY=Error
+API_USE_SCAN_TYPE_SEVERITY=Error
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Ignore
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_ANNOTATION=Ignore
+INVALID_JAVADOC_TAG=Ignore
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Ignore
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+MISSING_EE_DESCRIPTIONS=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=Enabled
+eclipse.preferences.version=1
+incompatible_api_component_version=Error
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Warning
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable/META-INF/MANIFEST.MF b/plugins/nattable/org.eclipse.papyrus.sysml.nattable/META-INF/MANIFEST.MF
new file mode 100755
index 0000000..8048f71
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable/META-INF/MANIFEST.MF
@@ -0,0 +1,14 @@
+Manifest-Version: 1.0
+Export-Package: org.eclipse.papyrus.sysml.nattable.manager.axis
+Require-Bundle: org.eclipse.papyrus.uml.nattable;bundle-version="[3.0.0,4.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.sysml.service.types;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.sysml;bundle-version="[1.2.0,2.0.0)";visibility:=reexport
+Bundle-Vendor: %Bundle-Vendor
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 2.0.0.qualifier
+Bundle-Name: %Bundle-Name
+Bundle-Activator: org.eclipse.papyrus.sysml.nattable.Activator
+Bundle-ManifestVersion: 2
+Bundle-Description: %pluginDescription
+Bundle-SymbolicName: org.eclipse.papyrus.sysml.nattable;singleton:=true
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable/OSGI-INF/l10n/bundle.properties b/plugins/nattable/org.eclipse.papyrus.sysml.nattable/OSGI-INF/l10n/bundle.properties
new file mode 100755
index 0000000..bf8b4f2
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable/OSGI-INF/l10n/bundle.properties
@@ -0,0 +1,3 @@
+#Properties file for org.eclipse.papyrus.sysml.nattable
+Bundle-Vendor = Eclipse Modeling Project
+Bundle-Name = SysML Nattable
\ No newline at end of file
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable/about.html b/plugins/nattable/org.eclipse.papyrus.sysml.nattable/about.html
new file mode 100755
index 0000000..598b368
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>May 12, 2008</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable/build.properties b/plugins/nattable/org.eclipse.papyrus.sysml.nattable/build.properties
new file mode 100755
index 0000000..f8d41a3
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable/build.properties
@@ -0,0 +1,8 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ OSGI-INF/,\
+ about.html
+src.includes = about.html
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable/org.eclipse.papyrus.sysml.nattable.iml b/plugins/nattable/org.eclipse.papyrus.sysml.nattable/org.eclipse.papyrus.sysml.nattable.iml
new file mode 100755
index 0000000..70036f4
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable/org.eclipse.papyrus.sysml.nattable.iml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+ <component name="NewModuleRootManager" inherit-compiler-output="false">
+ <output url="file://$MODULE_DIR$/bin" />
+ <exclude-output />
+ <content url="file://$MODULE_DIR$">
+ <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
+ </content>
+ <orderEntry type="jdk" jdkName="JavaSE-1.6" jdkType="JavaSDK" />
+ <orderEntry type="module" module-name="org.eclipse.papyrus.uml.nattable" />
+ <orderEntry type="module" module-name="org.eclipse.papyrus.sysml.service.types" />
+ <orderEntry type="module" module-name="org.eclipse.papyrus.sysml" />
+ <orderEntry type="library" name="ECLIPSE" level="application" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ </component>
+</module>
\ No newline at end of file
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable/plugin.properties b/plugins/nattable/org.eclipse.papyrus.sysml.nattable/plugin.properties
new file mode 100755
index 0000000..37d8486
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable/plugin.properties
@@ -0,0 +1,12 @@
+#################################################################################
+# Copyright (c) 2015 CEA LIST.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Benoit Maggi (CEA LIST) benoit.maggi@cea.fr - initial API and implementation
+##################################################################################)
+
+pluginDescription=This plugin provides common classes for the sysml nattable.
\ No newline at end of file
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable/plugin.xml b/plugins/nattable/org.eclipse.papyrus.sysml.nattable/plugin.xml
new file mode 100755
index 0000000..d3b9295
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable/plugin.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.papyrus.infra.services.labelprovider.labelProvider">
+ <labelProvider
+ priority="1700"
+ provider="org.eclipse.papyrus.sysml.nattable.provider.SysMLFlowPortDirectionLabelProvider">
+ <labelProviderContext
+ context="org.eclipse.papyrus.infra.nattable.body.labelprovider">
+ </labelProviderContext>
+ </labelProvider>
+ </extension>
+ <extension
+ point="org.eclipse.papyrus.infra.nattable.cellmanager">
+ <cellManager
+ id="org.eclipse.papyrus.sysml.nattable.common.stereotype.property.cell.manager"
+ manager="org.eclipse.papyrus.sysml.nattable.manager.cell.SysMLStereotypePropertyCellManager"
+ order="250">
+ </cellManager>
+ </extension>
+ <extension
+ point="org.eclipse.papyrus.infra.nattable.axismanager">
+ <axisManager
+ id="org.eclipse.papyrus.sysml.nattable.requirement.axis.manager"
+ manager="org.eclipse.papyrus.sysml.nattable.manager.axis.RequirementAxisManager">
+ </axisManager>
+ <axisManager
+ id="org.eclipse.papyrus.sysml.nattable.allocate.axis.manager"
+ manager="org.eclipse.papyrus.sysml.nattable.manager.axis.AllocateAxisManager">
+ </axisManager>
+ </extension>
+</plugin>
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable/pom.xml b/plugins/nattable/org.eclipse.papyrus.sysml.nattable/pom.xml
new file mode 100755
index 0000000..8a24d4e
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable/pom.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>org.eclipse.papyrus.sysml-nattable</artifactId>
+ <groupId>org.eclipse.papyrus.sysml</groupId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.papyrus.sysml.nattable</artifactId>
+ <version>2.0.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project>
\ No newline at end of file
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable/src/org/eclipse/papyrus/sysml/nattable/Activator.java b/plugins/nattable/org.eclipse.papyrus.sysml.nattable/src/org/eclipse/papyrus/sysml/nattable/Activator.java
new file mode 100755
index 0000000..756a846
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable/src/org/eclipse/papyrus/sysml/nattable/Activator.java
@@ -0,0 +1,58 @@
+package org.eclipse.papyrus.sysml.nattable;
+
+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.sysml.nattable"; //$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)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ log = new LogHelper(this);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable/src/org/eclipse/papyrus/sysml/nattable/manager/axis/AllocateAxisManager.java b/plugins/nattable/org.eclipse.papyrus.sysml.nattable/src/org/eclipse/papyrus/sysml/nattable/manager/axis/AllocateAxisManager.java
new file mode 100755
index 0000000..226b4b2
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable/src/org/eclipse/papyrus/sysml/nattable/manager/axis/AllocateAxisManager.java
@@ -0,0 +1,108 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.nattable.manager.axis;
+
+import org.eclipse.gmf.runtime.emf.type.core.ISpecializationType;
+import org.eclipse.papyrus.sysml.allocations.Allocate;
+import org.eclipse.papyrus.sysml.allocations.AllocationsPackage;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.nattable.manager.axis.AbstractStereotypedElementUMLSynchronizedOnFeatureAxisManager;
+import org.eclipse.uml2.uml.Abstraction;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+/**
+ * Axis Manager for Allocate
+ *
+ * @author vl222926
+ *
+ */
+public class AllocateAxisManager extends AbstractStereotypedElementUMLSynchronizedOnFeatureAxisManager<Allocate> {
+
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager#canCreateAxisElement(java.lang.String)
+ *
+ * @param elementId
+ * @return
+ */
+ @Override
+ public boolean canCreateAxisElement(final String elementId) {
+ return ((ISpecializationType) SysMLElementTypes.ALLOCATE).getId().equals(elementId);
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.uml.nattable.manager.axis.AbstractStereotypedElementUMLSynchronizedOnFeatureAxisManager#isInstanceOfRequiredStereotypeApplication(java.lang.Object)
+ *
+ * @param object
+ * @return
+ */
+ @Override
+ protected boolean isInstanceOfRequiredStereotypeApplication(Object object) {
+ return object instanceof Allocate;
+ }
+
+
+ /**
+ *
+ * @see org.eclipse.papyrus.uml.nattable.manager.axis.AbstractStereotypedElementUMLSynchronizedOnFeatureAxisManager#getStereotypeApplication(org.eclipse.uml2.uml.Element)
+ *
+ * @param el
+ * @return
+ */
+ @Override
+ protected Allocate getStereotypeApplication(final Element el) {
+ return UMLUtil.getStereotypeApplication(el, Allocate.class);
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.uml.nattable.manager.axis.AbstractStereotypedElementUMLSynchronizedOnFeatureAxisManager#getStereotypeBaseElement(org.eclipse.emf.ecore.EObject)
+ *
+ * @param stereotypeApplication
+ * @return
+ */
+ @Override
+ protected Element getStereotypeBaseElement(final Allocate stereotypeApplication) {
+ return stereotypeApplication.getBase_Abstraction();
+ }
+
+
+ /**
+ *
+ * @see org.eclipse.papyrus.uml.nattable.manager.axis.AbstractStereotypedElementUMLSynchronizedOnFeatureAxisManager#getStereotypeApplicationBasePropertyName()
+ *
+ * @return
+ */
+ @Override
+ protected String getStereotypeApplicationBasePropertyName() {
+ return AllocationsPackage.eINSTANCE.getAllocate_Base_Abstraction().getName();
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.uml.nattable.manager.axis.AbstractStereotypedElementUMLSynchronizedOnFeatureAxisManager#isAllowedAsBaseElement(org.eclipse.uml2.uml.Element)
+ *
+ * @param element
+ * @return
+ */
+ @Override
+ protected boolean isAllowedAsBaseElement(Element element) {
+ return element instanceof Abstraction;
+ }
+
+
+}
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable/src/org/eclipse/papyrus/sysml/nattable/manager/axis/RequirementAxisManager.java b/plugins/nattable/org.eclipse.papyrus.sysml.nattable/src/org/eclipse/papyrus/sysml/nattable/manager/axis/RequirementAxisManager.java
new file mode 100755
index 0000000..1b1be32
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable/src/org/eclipse/papyrus/sysml/nattable/manager/axis/RequirementAxisManager.java
@@ -0,0 +1,108 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.nattable.manager.axis;
+
+import org.eclipse.gmf.runtime.emf.type.core.ISpecializationType;
+import org.eclipse.papyrus.sysml.requirements.Requirement;
+import org.eclipse.papyrus.sysml.requirements.RequirementsPackage;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.nattable.manager.axis.AbstractStereotypedElementUMLSynchronizedOnFeatureAxisManager;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+
+
+/**
+ * AxisManager for SysML Requirements
+ *
+ * @author Vincent Lorenzo
+ *
+ */
+public class RequirementAxisManager extends AbstractStereotypedElementUMLSynchronizedOnFeatureAxisManager<Requirement> {
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager#canCreateAxisElement(java.lang.String)
+ *
+ * @param elementId
+ * @return
+ */
+ @Override
+ public boolean canCreateAxisElement(String elementId) {
+ return ((ISpecializationType) SysMLElementTypes.REQUIREMENT).getId().equals(elementId);
+ }
+
+
+ /**
+ *
+ * @see org.eclipse.papyrus.uml.nattable.manager.axis.AbstractStereotypedElementUMLSynchronizedOnFeatureAxisManager#getStereotypeApplication(org.eclipse.uml2.uml.Element)
+ *
+ * @param el
+ * @return
+ */
+ @Override
+ protected Requirement getStereotypeApplication(Element el) {
+ return UMLUtil.getStereotypeApplication(el, Requirement.class);
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.uml.nattable.manager.axis.AbstractStereotypedElementUMLSynchronizedOnFeatureAxisManager#isInstanceOfRequiredStereotypeApplication(java.lang.Object)
+ *
+ * @param object
+ * @return
+ */
+ @Override
+ protected boolean isInstanceOfRequiredStereotypeApplication(final Object object) {
+ return object instanceof Requirement;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.uml.nattable.manager.axis.AbstractStereotypedElementUMLSynchronizedOnFeatureAxisManager#getStereotypeBaseElement(org.eclipse.emf.ecore.EObject)
+ *
+ * @param stereotypeApplication
+ * @return
+ */
+ @Override
+ protected Element getStereotypeBaseElement(final Requirement stereotypeApplication) {
+ return stereotypeApplication.getBase_Class();
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.uml.nattable.manager.axis.AbstractStereotypedElementUMLSynchronizedOnFeatureAxisManager#isAllowedAsBaseElement(org.eclipse.uml2.uml.Element)
+ *
+ * @param element
+ * @return
+ */
+ @Override
+ protected boolean isAllowedAsBaseElement(final Element element) {
+ return element instanceof Class;
+ }
+
+
+ /**
+ *
+ * @see org.eclipse.papyrus.uml.nattable.manager.axis.AbstractStereotypedElementUMLSynchronizedOnFeatureAxisManager#getStereotypeApplicationBasePropertyName()
+ *
+ * @return
+ */
+ @Override
+ protected String getStereotypeApplicationBasePropertyName() {
+ return RequirementsPackage.eINSTANCE.getRequirement_Base_Class().getName();
+ }
+
+}
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable/src/org/eclipse/papyrus/sysml/nattable/manager/cell/SysMLStereotypePropertyCellManager.java b/plugins/nattable/org.eclipse.papyrus.sysml.nattable/src/org/eclipse/papyrus/sysml/nattable/manager/cell/SysMLStereotypePropertyCellManager.java
new file mode 100755
index 0000000..7c5f8f1
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable/src/org/eclipse/papyrus/sysml/nattable/manager/cell/SysMLStereotypePropertyCellManager.java
@@ -0,0 +1,86 @@
+/*****************************************************************************
+ * 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.sysml.nattable.manager.cell;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+import org.eclipse.papyrus.sysml.service.types.matcher.FlowPortNAMatcher;
+import org.eclipse.papyrus.uml.nattable.manager.cell.StereotypePropertyCellManager;
+import org.eclipse.papyrus.uml.nattable.utils.Constants;
+import org.eclipse.uml2.uml.Port;
+
+/**
+ *
+ * This cell manager manages the cell displaying the direction of the FlowPort.
+ * If the flowport is not atomic, the cell is not editable and the direction is N/A.
+ *
+ */
+public class SysMLStereotypePropertyCellManager extends StereotypePropertyCellManager {
+
+ /**
+ * the FlowPort isAtomicMatcher
+ */
+ private static FlowPortNAMatcher matcher = new FlowPortNAMatcher();
+
+
+ /**
+ *
+ * @see org.eclipse.papyrus.uml.nattable.manager.cell.manager.StereotypePropertyCellManager#handles(java.lang.Object, java.lang.Object, INattableModelManager)
+ *
+ * @param columnElement
+ * @param rowElement
+ * @return
+ */
+ @Override
+ public boolean handles(final Object columnElement, final Object rowElement, final INattableModelManager tableManager) {
+ if (super.handles(columnElement, rowElement, tableManager)) {
+ final List<Object> objects = organizeAndResolvedObjects(columnElement, rowElement, null);
+ if (objects.size() == 2) {
+ final EObject object = (EObject) objects.get(0);
+ if (object instanceof Port) {
+ String propertyQualifiedName = (String) objects.get(1);
+ propertyQualifiedName = propertyQualifiedName.substring(Constants.PROPERTY_OF_STEREOTYPE_PREFIX.length(), propertyQualifiedName.length());
+ return propertyQualifiedName.equals(org.eclipse.papyrus.sysml.nattable.utils.Constants.STEREOTYPE_FLOWPORT_DIRECTION);
+ }
+ }
+ }
+ return false;
+ }
+
+
+ /**
+ *
+ * @see org.eclipse.papyrus.uml.nattable.manager.cell.manager.StereotypePropertyCellManager#isCellEditable(java.lang.Object, java.lang.Object, INattableModelManager)
+ *
+ * @param columnElement
+ * @param rowElement
+ * @return
+ */
+ @Override
+ public boolean isCellEditable(final Object columnElement, final Object rowElement, final INattableModelManager tableManager) {
+ boolean value = super.isCellEditable(columnElement, rowElement, tableManager);
+ if (value) {
+ final List<Object> objects = organizeAndResolvedObjects(columnElement, rowElement, null);
+ if (objects.size() == 2) {
+ final EObject object = (EObject) objects.get(0);
+ if (matcher.matches(object)) {
+ value = false;
+ }
+ }
+ }
+ return value;
+ }
+}
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable/src/org/eclipse/papyrus/sysml/nattable/provider/SysMLFlowPortDirectionLabelProvider.java b/plugins/nattable/org.eclipse.papyrus.sysml.nattable/src/org/eclipse/papyrus/sysml/nattable/provider/SysMLFlowPortDirectionLabelProvider.java
new file mode 100755
index 0000000..0d3c40a
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable/src/org/eclipse/papyrus/sysml/nattable/provider/SysMLFlowPortDirectionLabelProvider.java
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ * 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.sysml.nattable.provider;
+
+import org.eclipse.nebula.widgets.nattable.config.IConfigRegistry;
+import org.eclipse.nebula.widgets.nattable.layer.cell.ILayerCell;
+import org.eclipse.papyrus.infra.nattable.utils.AxisUtils;
+import org.eclipse.papyrus.infra.nattable.utils.Constants;
+import org.eclipse.papyrus.infra.nattable.utils.LabelProviderCellContextElementWrapper;
+import org.eclipse.papyrus.sysml.service.types.matcher.FlowPortNAMatcher;
+import org.eclipse.papyrus.uml.nattable.provider.AbstractUMLNattableCellLabelProvider;
+import org.eclipse.uml2.uml.Port;
+
+/**
+ * This label provider allows to display N/A for the direction of the FlowPort when its requred!
+ *
+ * @author Vincent Lorenzo
+ *
+ */
+public class SysMLFlowPortDirectionLabelProvider extends AbstractUMLNattableCellLabelProvider {
+
+ /**
+ * N/A FlowPort matcher
+ */
+ private static final FlowPortNAMatcher matcher = new FlowPortNAMatcher();
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.provider.GenericCellLabelProvider#accept(java.lang.Object)
+ *
+ * @param element
+ * @return
+ */
+ @Override
+ public boolean accept(final Object element) {
+ if (element instanceof LabelProviderCellContextElementWrapper) {
+ final ILayerCell cell = ((LabelProviderCellContextElementWrapper) element);
+ final IConfigRegistry registry = ((LabelProviderCellContextElementWrapper) element).getConfigRegistry();
+ final Object columnObject = getColumnObject(cell, registry);
+ String str = AxisUtils.getPropertyId(columnObject);
+ if (str == null) {
+ final Object rowObject = getRowObject(cell, registry);
+ str = AxisUtils.getPropertyId(rowObject);
+ }
+ if (str != null) {
+ return str.endsWith(org.eclipse.papyrus.sysml.nattable.utils.Constants.STEREOTYPE_FLOWPORT_DIRECTION);
+ }
+ }
+ return false;
+ }
+
+ @Override
+ public String getText(Object element) {
+ final ILayerCell cell = ((LabelProviderCellContextElementWrapper) element);
+ final IConfigRegistry configRegistry = ((LabelProviderCellContextElementWrapper) element).getConfigRegistry();
+ final Object rowObject = getRowObject(cell, configRegistry);
+ final Object columObject = getColumnObject(cell, configRegistry);
+ Port port = null;
+ if (rowObject instanceof Port) {
+ port = (Port) rowObject;
+ } else if (columObject instanceof Port) {
+ port = (Port) columObject;
+ }
+ if (port != null && matcher.matches(port)) {
+ return Constants.NOT_AVALAIBLE;
+ }
+ return super.getText(element);
+ }
+}
diff --git a/plugins/nattable/org.eclipse.papyrus.sysml.nattable/src/org/eclipse/papyrus/sysml/nattable/utils/Constants.java b/plugins/nattable/org.eclipse.papyrus.sysml.nattable/src/org/eclipse/papyrus/sysml/nattable/utils/Constants.java
new file mode 100755
index 0000000..d07c138
--- /dev/null
+++ b/plugins/nattable/org.eclipse.papyrus.sysml.nattable/src/org/eclipse/papyrus/sysml/nattable/utils/Constants.java
@@ -0,0 +1,28 @@
+/*****************************************************************************
+ * 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.sysml.nattable.utils;
+
+
+public class Constants {
+
+ private Constants() {
+ // to prevent instanciation
+ }
+
+
+ /**
+ * The qualified name of the property direction
+ */
+ public static final String STEREOTYPE_FLOWPORT_DIRECTION = "SysML::PortAndFlows::FlowPort::direction";
+}
diff --git a/plugins/nattable/pom.xml b/plugins/nattable/pom.xml
new file mode 100755
index 0000000..74a6dbf
--- /dev/null
+++ b/plugins/nattable/pom.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>org.eclipse.papyrus.sysml</artifactId>
+ <groupId>org.eclipse.papyrus.sysml</groupId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.papyrus.sysml-nattable</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <packaging>pom</packaging>
+ <name>Papyrus SysML NatTable</name>
+ <description>Papyrus Nattable are a set of plugins dedicated to manage tables in relation with models.</description>
+
+ <modules>
+ <module>org.eclipse.papyrus.sysml.nattable</module>
+ <module>org.eclipse.papyrus.sysml.nattable.allocation</module>
+ <module>org.eclipse.papyrus.sysml.nattable.allocation.config</module>
+ <module>org.eclipse.papyrus.sysml.nattable.menu</module>
+ <module>org.eclipse.papyrus.sysml.nattable.requirement</module>
+ <module>org.eclipse.papyrus.sysml.nattable.requirement.config</module>
+ </modules>
+</project>
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/.classpath b/plugins/org.eclipse.papyrus.sysml.edit/.classpath
new file mode 100755
index 0000000..b3d4acc
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/.classpath
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="custom-src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/.project b/plugins/org.eclipse.papyrus.sysml.edit/.project
new file mode 100755
index 0000000..74419a6
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/.project
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.sysml.edit</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>
+ <buildCommand>
+ <name>org.eclipse.oomph.version.VersionBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>check.maven.pom</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>ignore.lower.bound.dependency.ranges</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>release.path</key>
+ <value>/org.eclipse.papyrus.releng.main.release/release.xml</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.oomph.version.VersionNature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.papyrus.sysml.edit/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 0000000..94d61f0
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,291 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/.settings/org.eclipse.jdt.ui.prefs b/plugins/org.eclipse.papyrus.sysml.edit/.settings/org.eclipse.jdt.ui.prefs
new file mode 100755
index 0000000..954281d
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,68 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+formatter_profile=_Papyrus
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/.settings/org.eclipse.pde.api.tools.prefs b/plugins/org.eclipse.papyrus.sysml.edit/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100755
index 0000000..23fb95e
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/.settings/org.eclipse.pde.api.tools.prefs
@@ -0,0 +1,98 @@
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+API_USE_SCAN_FIELD_SEVERITY=Error
+API_USE_SCAN_METHOD_SEVERITY=Error
+API_USE_SCAN_TYPE_SEVERITY=Error
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Ignore
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_ANNOTATION=Ignore
+INVALID_JAVADOC_TAG=Ignore
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Ignore
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+MISSING_EE_DESCRIPTIONS=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=Enabled
+eclipse.preferences.version=1
+incompatible_api_component_version=Error
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Warning
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/META-INF/MANIFEST.MF b/plugins/org.eclipse.papyrus.sysml.edit/META-INF/MANIFEST.MF
new file mode 100755
index 0000000..d9510f3
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/META-INF/MANIFEST.MF
@@ -0,0 +1,32 @@
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.papyrus.sysml;bundle-version="[1.2.0,2.0.0)";visibility:=reexport,
+ org.eclipse.core.runtime;bundle-version="[3.12.0,4.0.0)",
+ org.eclipse.emf.ecore;bundle-version="[2.12.0,3.0.0)";visibility:=reexport,
+ org.eclipse.emf.ecore.edit;bundle-version="[2.9.0,3.0.0)";visibility:=reexport,
+ org.eclipse.uml2.uml.profile.standard;bundle-version="[1.0.0,2.0.0)";visibility:=reexport,
+ org.eclipse.uml2.types;bundle-version="[2.0.0,3.0.0)";visibility:=reexport,
+ org.eclipse.uml2.uml;bundle-version="[5.2.0,6.0.0)";visibility:=reexport,
+ org.eclipse.uml2.uml.edit;bundle-version="[5.1.0,6.0.0)",
+ org.eclipse.uml2.common.edit;bundle-version="[2.1.0,3.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.uml.internationalization.edit;bundle-version="[1.0.0,2.0.0)"
+Export-Package: org.eclipse.papyrus.sysml.activities.provider,
+ org.eclipse.papyrus.sysml.allocations.provider,
+ org.eclipse.papyrus.sysml.blocks.provider,
+ org.eclipse.papyrus.sysml.constraints.provider,
+ org.eclipse.papyrus.sysml.edit.provider,
+ org.eclipse.papyrus.sysml.edit.umllayer,
+ org.eclipse.papyrus.sysml.modelelements.provider,
+ org.eclipse.papyrus.sysml.portandflows.provider,
+ org.eclipse.papyrus.sysml.provider,
+ org.eclipse.papyrus.sysml.registry,
+ org.eclipse.papyrus.sysml.requirements.provider
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-ClassPath: .
+Bundle-Version: 1.2.0.qualifier
+Bundle-Localization: plugin
+Bundle-Name: %pluginName
+Bundle-Activator: org.eclipse.papyrus.sysml.provider.SysmlEditPlugin$Implementation
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.papyrus.sysml.edit;singleton:=true
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/about.html b/plugins/org.eclipse.papyrus.sysml.edit/about.html
new file mode 100755
index 0000000..d35d5ae
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/build.properties b/plugins/org.eclipse.papyrus.sysml.edit/build.properties
new file mode 100755
index 0000000..409c3eb
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/build.properties
@@ -0,0 +1,16 @@
+#
+#Mon Sep 12 09:30:15 CEST 2011
+output..=bin/
+bin.includes = .,\
+ icons/,\
+ META-INF/,\
+ plugin.xml,\
+ plugin.properties,\
+ about.html,\
+ custom-src/
+jars.compile.order=.
+src.includes = icons/,\
+ about.html
+source.. = src/,\
+ custom-src/
+bin..=bin/
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/custom-src/org/eclipse/papyrus/sysml/edit/provider/IComposableAdapterFactory.java b/plugins/org.eclipse.papyrus.sysml.edit/custom-src/org/eclipse/papyrus/sysml/edit/provider/IComposableAdapterFactory.java
new file mode 100755
index 0000000..9341bbe
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/custom-src/org/eclipse/papyrus/sysml/edit/provider/IComposableAdapterFactory.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * Copyright (c) 2011 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:
+ * Atos - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.edit.provider;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+
+
+/**
+ * The purpose of this interface is to create composable adapterFactory but in a
+ * way much simpler than EMF does.
+ *
+ * @author "Arthur Daussy <a href="mailto:arthur.daussy@atos.net
+ * ">arthur.daussy@atos.net</a>"
+ *
+ */
+public interface IComposableAdapterFactory {
+
+ /**
+ * Return the root of the adapter factory
+ *
+ * @return {@link AdapterFactory}
+ */
+ public IRootAdapterFactory getIRootAdapterFactory();
+
+ /**
+ * Set the root AdapterFactory
+ *
+ * @param root
+ */
+ public void setRootAdapterFactory(IRootAdapterFactory root);
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/custom-src/org/eclipse/papyrus/sysml/edit/provider/IRootAdapterFactory.java b/plugins/org.eclipse.papyrus.sysml.edit/custom-src/org/eclipse/papyrus/sysml/edit/provider/IRootAdapterFactory.java
new file mode 100755
index 0000000..4c0bafa
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/custom-src/org/eclipse/papyrus/sysml/edit/provider/IRootAdapterFactory.java
@@ -0,0 +1,31 @@
+/*****************************************************************************
+ * Copyright (c) 2011 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:
+ * Atos - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.edit.provider;
+
+/**
+ * Interfaces which has to be implemented by Root AdapterFactory
+ */
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+
+public interface IRootAdapterFactory {
+
+ /**
+ * Give back the itemProvider which correspond to the given EClass In this
+ * prog : used to get back the UML ItemProvider of the EClass
+ *
+ * @param eClass
+ * @return
+ */
+ public ItemProviderAdapter getItemProvider(EClass eClass);
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/custom-src/org/eclipse/papyrus/sysml/edit/provider/IVisibilityOverlayImage.java b/plugins/org.eclipse.papyrus.sysml.edit/custom-src/org/eclipse/papyrus/sysml/edit/provider/IVisibilityOverlayImage.java
new file mode 100755
index 0000000..a117c9c
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/custom-src/org/eclipse/papyrus/sysml/edit/provider/IVisibilityOverlayImage.java
@@ -0,0 +1,28 @@
+/*****************************************************************************
+ * Copyright (c) 2011 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:
+ * Atos - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.edit.provider;
+
+import org.eclipse.emf.edit.provider.ComposedImage;
+
+/**
+ * Interface that allow an ItemProvider to compose an overlay that handle
+ * visibility logo
+ *
+ * @author Arthur Daussy <a
+ * href=mailto:arthur.daussy@atos.net>arthur.daussy@atos.net</a>
+ *
+ */
+public interface IVisibilityOverlayImage {
+
+ ComposedImage composeVisibilityImage(Object object, ComposedImage composedImage);
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/custom-src/org/eclipse/papyrus/sysml/edit/provider/SysMLItemProviderAdapter.java b/plugins/org.eclipse.papyrus.sysml.edit/custom-src/org/eclipse/papyrus/sysml/edit/provider/SysMLItemProviderAdapter.java
new file mode 100755
index 0000000..1d13d8a
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/custom-src/org/eclipse/papyrus/sysml/edit/provider/SysMLItemProviderAdapter.java
@@ -0,0 +1,53 @@
+/*****************************************************************************
+ * Copyright (c) 2011 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Atos Origin - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.edit.provider;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.edit.provider.ComposedImage;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.edit.UMLEditPlugin;
+
+/**
+ * Extends org.eclipse.emf.edit.provider.ItemProviderAdapter in order to
+ * implement specific SysML itemProvider fonctions
+ *
+ * @author "Arthur Daussy <a href="mailto:arthur.daussy@atos.net
+ * ">arthur.daussy@atos.net</a>"
+ *
+ */
+public class SysMLItemProviderAdapter extends ItemProviderAdapter implements IVisibilityOverlayImage {
+
+ public SysMLItemProviderAdapter(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * Compose the image with specific visibility logo Copied from UML
+ * implementation
+ *
+ * @param object
+ * @param composedImage
+ * @return {@link ComposedImage}
+ */
+ @Override
+ public ComposedImage composeVisibilityImage(Object object, ComposedImage composedImage) {
+ NamedElement namedElement = (NamedElement) object;
+ if (namedElement.isSetVisibility()) {
+ composedImage.getImages().add(UMLEditPlugin.INSTANCE.getImage("full/ovr16/VisibilityKind_" //$NON-NLS-1$
+ + namedElement.getVisibility().getName()));
+ }
+ return composedImage;
+ }
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/custom-src/org/eclipse/papyrus/sysml/edit/umllayer/SysLMOverUMLItemProviderAdapterFactory.java b/plugins/org.eclipse.papyrus.sysml.edit/custom-src/org/eclipse/papyrus/sysml/edit/umllayer/SysLMOverUMLItemProviderAdapterFactory.java
new file mode 100755
index 0000000..a2fb4a1
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/custom-src/org/eclipse/papyrus/sysml/edit/umllayer/SysLMOverUMLItemProviderAdapterFactory.java
@@ -0,0 +1,207 @@
+/**
+ * Copyright (c) 2011 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:
+ * Atos - Initial API and implementation
+ *
+ */
+package org.eclipse.papyrus.sysml.edit.umllayer;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Map;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notifier;
+import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.edit.provider.ChildCreationExtenderManager;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.IChildCreationExtender;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.papyrus.sysml.edit.provider.IRootAdapterFactory;
+import org.eclipse.papyrus.sysml.provider.SysmlEditPlugin;
+import org.eclipse.papyrus.sysml.registry.SysmlRegistryAdapterFactoryRegistry;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * This class implement an ItemProvider for all sysml elements. It will add a
+ * new layer in order to have only one ItemProvider instead of one for each
+ * EPackage. Moreover this ItemProvider will accept UML elements stereotypes by
+ * SysML profile in order to display them as SysML elements
+ *
+ * @author Arthur Daussy - arthur.daussy@atos.net
+ *
+ */
+public class SysLMOverUMLItemProviderAdapterFactory extends AdapterFactoryImpl implements IChildCreationExtender, IRootAdapterFactory, ComposeableAdapterFactory {
+
+ /**
+ * registry of all needed UMLItemProvider
+ */
+ private Map<EClass, ItemProviderAdapter> umlItemProviderRegistery;
+
+ /**
+ * This helps manage the child creation extenders. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ */
+ protected ChildCreationExtenderManager childCreationExtenderManager = new ChildCreationExtenderManager(SysmlEditPlugin.INSTANCE, UMLPackage.eNS_URI);
+
+ /**
+ * The cached model package. <!-- begin-user-doc --> <!-- end-user-doc -->
+ */
+ protected static EPackage modelPackage;
+
+ /**
+ * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ */
+ protected Collection<Object> supportedTypes = new ArrayList<Object>();
+
+ /**
+ * Keet track of the Adapter registery
+ */
+ protected SysmlRegistryAdapterFactoryRegistry registery = null;
+
+ /**
+ * Creates an instance of the adapter factory.
+ */
+ public SysLMOverUMLItemProviderAdapterFactory() {
+ /**
+ * Initialise all composable factory
+ */
+ getSysmlRegistryAdapterFactoryRegistry().setRootAdapterFactory(this);
+ /*
+ * Supported type
+ */
+ supportedTypes.add(IEditingDomainItemProvider.class);
+ supportedTypes.add(IStructuredItemContentProvider.class);
+ supportedTypes.add(ITreeItemContentProvider.class);
+ supportedTypes.add(IItemLabelProvider.class);
+ /*
+ * Initialize model package
+ */
+ supportedTypes.add(IItemPropertySource.class);
+ if (modelPackage == null) {
+ modelPackage = UMLPackage.eINSTANCE;
+ }
+ /**
+ * Initialize all UMLItemProviderNeeded
+ */
+ umlItemProviderRegistery = getSysmlRegistryAdapterFactoryRegistry().getUMLItemProviderClassifedByUMLElement(this);
+ }
+
+ /**
+ * {@link AdapterFactoryImpl#adapt(Notifier, Object)} Look among the sysml
+ * item provider adapter factory if on is correct. If not use the UML item
+ * provider adapter factory
+ */
+ @Override
+ public Adapter adapt(Notifier target, Object type) {
+ Adapter result = null;
+ for (AdapterFactory adFac : getSysmlRegistryAdapterFactoryRegistry().getAdapterFactoriesForType(target)) {
+ result = adFac.adaptNew(target, type);
+ if (result != null) {
+ return result;
+ }
+ }
+ return getSysmlRegistryAdapterFactoryRegistry().getDefaultAdapterFactory().adapt(target, type);
+ }
+
+ /**
+ * Get the getSysmlRegistryAdapterFactoryRegistry
+ *
+ * @return
+ */
+ private SysmlRegistryAdapterFactoryRegistry getSysmlRegistryAdapterFactoryRegistry() {
+ if (registery == null) {
+ registery = SysmlRegistryAdapterFactoryRegistry.getSingleton();
+ }
+ return registery;
+ }
+
+ /**
+ * {@link AdapterFactoryImpl#adapt(Object, Object)}
+ */
+ @Override
+ public Object adapt(Object object, Object type) {
+ if (isFactoryForType(type)) {
+ Object adapter = super.adapt(object, type);
+ if (!(type instanceof Class<?>) || (((Class<?>) type).isInstance(adapter))) {
+ return adapter;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * {@link AdapterFactoryImpl#isFactoryForType(Object)}
+ */
+ @Override
+ public boolean isFactoryForType(Object type) {
+ return supportedTypes.contains(type) || superIsFactoryForType(type);
+ }
+
+ /**
+ * Test if the EPackage correspond to UML
+ *
+ * @param object
+ * @return
+ */
+ public boolean superIsFactoryForType(Object object) {
+ if (object == modelPackage) {
+ return true;
+ }
+ if (object instanceof EObject) {
+ return (((EObject) object).eClass().getEPackage() == modelPackage);
+ }
+ return false;
+ }
+
+ /**
+ * {@link IChildCreationExtender}
+ */
+ @Override
+ public Collection<?> getNewChildDescriptors(Object object, EditingDomain editingDomain) {
+ return childCreationExtenderManager.getNewChildDescriptors(object, editingDomain);
+ }
+
+ /**
+ * {@link IChildCreationExtender}
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return childCreationExtenderManager;
+ }
+
+ @Override
+ public ItemProviderAdapter getItemProvider(EClass eClass) {
+ return umlItemProviderRegistery.get(eClass);
+ }
+
+ @Override
+ public ComposeableAdapterFactory getRootAdapterFactory() {
+ return this;
+ }
+
+ @Override
+ public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) {
+ }
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/Allocate.gif b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/Allocate.gif
new file mode 100755
index 0000000..9250fec
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/Allocate.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/AllocateActivityPartition.gif b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/AllocateActivityPartition.gif
new file mode 100755
index 0000000..338fb8d
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/AllocateActivityPartition.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/Allocated.gif b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/Allocated.gif
new file mode 100755
index 0000000..c673a52
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/Allocated.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/BindingConnector.gif b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/BindingConnector.gif
new file mode 100755
index 0000000..2124f3e
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/BindingConnector.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/Block.gif b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/Block.gif
new file mode 100755
index 0000000..bc5ab83
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/Block.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/Conform.gif b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/Conform.gif
new file mode 100755
index 0000000..1c2c5c2
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/Conform.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/ConnectorProperty.gif b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/ConnectorProperty.gif
new file mode 100755
index 0000000..45731fe
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/ConnectorProperty.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/ConstraintBlock.gif b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/ConstraintBlock.gif
new file mode 100755
index 0000000..3e7750a
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/ConstraintBlock.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/ConstraintProperty.gif b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/ConstraintProperty.gif
new file mode 100755
index 0000000..7c948e8
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/ConstraintProperty.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/Continuous.gif b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/Continuous.gif
new file mode 100755
index 0000000..1e5345f
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/Continuous.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/ControlOperator.gif b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/ControlOperator.gif
new file mode 100755
index 0000000..136e3b2
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/ControlOperator.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/Copy.gif b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/Copy.gif
new file mode 100755
index 0000000..47caa0b
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/Copy.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/DeriveReqt.gif b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/DeriveReqt.gif
new file mode 100755
index 0000000..6217748
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/DeriveReqt.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/Dimension.gif b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/Dimension.gif
new file mode 100755
index 0000000..eb861a0
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/Dimension.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/Discrete.gif b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/Discrete.gif
new file mode 100755
index 0000000..2b69256
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/Discrete.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/DistributedProperty.gif b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/DistributedProperty.gif
new file mode 100755
index 0000000..739ebbf
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/DistributedProperty.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/FlowPort.gif b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/FlowPort.gif
new file mode 100755
index 0000000..1f675ce
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/FlowPort.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/FlowProperty.gif b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/FlowProperty.gif
new file mode 100755
index 0000000..9b87262
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/FlowProperty.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/FlowSpecification.gif b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/FlowSpecification.gif
new file mode 100755
index 0000000..1df635f
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/FlowSpecification.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/ItemFlow.gif b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/ItemFlow.gif
new file mode 100755
index 0000000..31c9dc8
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/ItemFlow.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/NestedConnectorEnd.gif b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/NestedConnectorEnd.gif
new file mode 100755
index 0000000..c00aedf
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/NestedConnectorEnd.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/NoBuffer.gif b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/NoBuffer.gif
new file mode 100755
index 0000000..420eee1
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/NoBuffer.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/Optional.gif b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/Optional.gif
new file mode 100755
index 0000000..7b7c428
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/Optional.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/Optionnal.gif b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/Optionnal.gif
new file mode 100755
index 0000000..7b7c428
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/Optionnal.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/Overwrite.gif b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/Overwrite.gif
new file mode 100755
index 0000000..d92f34c
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/Overwrite.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/ParticipantProperty.gif b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/ParticipantProperty.gif
new file mode 100755
index 0000000..db7414e
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/ParticipantProperty.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/Probability.gif b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/Probability.gif
new file mode 100755
index 0000000..d92f34c
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/Probability.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/Problem.gif b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/Problem.gif
new file mode 100755
index 0000000..cd989e8
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/Problem.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/PropertySpecificType.gif b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/PropertySpecificType.gif
new file mode 100755
index 0000000..7b7c428
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/PropertySpecificType.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/Rate.gif b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/Rate.gif
new file mode 100755
index 0000000..94c953e
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/Rate.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/Rationale.gif b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/Rationale.gif
new file mode 100755
index 0000000..a82851f
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/Rationale.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/Requirement.gif b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/Requirement.gif
new file mode 100755
index 0000000..50618e0
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/Requirement.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/RequirementRelated.gif b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/RequirementRelated.gif
new file mode 100755
index 0000000..33854e9
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/RequirementRelated.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/Satisfy.gif b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/Satisfy.gif
new file mode 100755
index 0000000..00848d8
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/Satisfy.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/TestCase.gif b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/TestCase.gif
new file mode 100755
index 0000000..ac29611
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/TestCase.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/Unit.gif b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/Unit.gif
new file mode 100755
index 0000000..33bfb26
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/Unit.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/ValueType.gif b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/ValueType.gif
new file mode 100755
index 0000000..eb54412
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/ValueType.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/Verify.gif b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/Verify.gif
new file mode 100755
index 0000000..2d54efc
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/Verify.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/View.gif b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/View.gif
new file mode 100755
index 0000000..2d874ff
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/View.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/ViewPoint.gif b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/ViewPoint.gif
new file mode 100755
index 0000000..a1cd285
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/icons/full/obj16/ViewPoint.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/org.eclipse.papyrus.sysml.edit.iml b/plugins/org.eclipse.papyrus.sysml.edit/org.eclipse.papyrus.sysml.edit.iml
new file mode 100755
index 0000000..9e96929
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/org.eclipse.papyrus.sysml.edit.iml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+ <component name="NewModuleRootManager" inherit-compiler-output="false">
+ <output url="file://$MODULE_DIR$/bin" />
+ <exclude-output />
+ <content url="file://$MODULE_DIR$">
+ <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/custom-src" isTestSource="false" />
+ </content>
+ <orderEntry type="jdk" jdkName="JavaSE-1.6" jdkType="JavaSDK" />
+ <orderEntry type="module" module-name="org.eclipse.papyrus.sysml" />
+ <orderEntry type="module" module-name="org.eclipse.papyrus.uml.internationalization.edit" />
+ <orderEntry type="library" name="ECLIPSE" level="application" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ </component>
+</module>
\ No newline at end of file
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/plugin.properties b/plugins/org.eclipse.papyrus.sysml.edit/plugin.properties
new file mode 100755
index 0000000..9fb5430
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/plugin.properties
@@ -0,0 +1,207 @@
+#################################################################################
+# Copyright (c) 2010 CEA LIST.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - initial API and implementation
+##################################################################################
+pluginName = Edit support for SysML
+providerName=Eclipse Modeling Project
+
+_UI_CreateChild_text = {0}
+_UI_CreateChild_text2 = {1} {0}
+_UI_CreateChild_text3 = {1}
+_UI_CreateChild_tooltip = Create New {0} Under {1} Feature
+_UI_CreateChild_description = Create a new child of type {0} for the {1} feature of the selected {2}.
+_UI_CreateSibling_description = Create a new sibling of type {0} for the selected {2}, under the {1} feature of their parent.
+
+_UI_PropertyDescriptor_description = The {0} of the {1}
+
+_UI_Conform_type = Conform
+_UI_View_type = View
+_UI_ViewPoint_type = View Point
+_UI_Rationale_type = Rationale
+_UI_Problem_type = Problem
+_UI_Block_type = Block
+_UI_DistributedProperty_type = Distributed Property
+_UI_Dimension_type = Dimension
+_UI_Unit_type = Unit
+_UI_ValueType_type = Value Type
+_UI_NestedConnectorEnd_type = Nested Connector End
+_UI_ParticipantProperty_type = Participant Property
+_UI_ConnectorProperty_type = Connector Property
+_UI_BindingConnector_type = Binding Connector
+_UI_PropertySpecificType_type = Property Specific Type
+_UI_FlowPort_type = Flow Port
+_UI_FlowProperty_type = Flow Property
+_UI_FlowSpecification_type = Flow Specification
+_UI_ItemFlow_type = Item Flow
+_UI_ConstraintBlock_type = Constraint Block
+_UI_ConstraintProperty_type = Constraint Property
+_UI_Optionnal_type = Optionnal
+_UI_Rate_type = Rate
+_UI_Probability_type = Probability
+_UI_Continuous_type = Continuous
+_UI_Discrete_type = Discrete
+_UI_ControlOperator_type = Control Operator
+_UI_NoBuffer_type = No Buffer
+_UI_Overwrite_type = Overwrite
+_UI_Allocate_type = Allocate
+_UI_Allocated_type = Allocated
+_UI_AllocateActivityPartition_type = Allocate Activity Partition
+_UI_DeriveReqt_type = Derive Reqt
+_UI_Verify_type = Verify
+_UI_Copy_type = Copy
+_UI_Satisfy_type = Satisfy
+_UI_TestCase_type = Test Case
+_UI_Requirement_type = Requirement
+_UI_RequirementRelated_type = Requirement Related
+_UI_Unknown_type = Object
+
+_UI_Unknown_datatype= Value
+
+_UI_Conform_base_Dependency_feature = Base Dependency
+_UI_View_viewPoint_feature = View Point
+_UI_View_base_Package_feature = Base Package
+_UI_ViewPoint_base_Class_feature = Base Class
+_UI_ViewPoint_stakeHolders_feature = Stake Holders
+_UI_ViewPoint_purpose_feature = Purpose
+_UI_ViewPoint_concerns_feature = Concerns
+_UI_ViewPoint_languages_feature = Languages
+_UI_ViewPoint_methods_feature = Methods
+_UI_Rationale_base_Comment_feature = Base Comment
+_UI_Problem_base_Comment_feature = Base Comment
+_UI_Block_isEncapsulated_feature = Is Encapsulated
+_UI_Block_base_Class_feature = Base Class
+_UI_DistributedProperty_base_Property_feature = Base Property
+_UI_Dimension_base_InstanceSpecification_feature = Base Instance Specification
+_UI_Unit_base_InstanceSpecification_feature = Base Instance Specification
+_UI_Unit_dimension_feature = Dimension
+_UI_ValueType_base_DataType_feature = Base Data Type
+_UI_ValueType_unit_feature = Unit
+_UI_ValueType_dimension_feature = Dimension
+_UI_NestedConnectorEnd_propertyPath_feature = Property Path
+_UI_NestedConnectorEnd_base_ConnectorEnd_feature = Base Connector End
+_UI_ParticipantProperty_base_Property_feature = Base Property
+_UI_ParticipantProperty_end_feature = End
+_UI_ConnectorProperty_base_Property_feature = Base Property
+_UI_ConnectorProperty_connector_feature = Connector
+_UI_BindingConnector_base_Connector_feature = Base Connector
+_UI_PropertySpecificType_base_Classifier_feature = Base Classifier
+_UI_FlowPort_base_Port_feature = Base Port
+_UI_FlowPort_isAtomic_feature = Is Atomic
+_UI_FlowPort_isConjugated_feature = Is Conjugated
+_UI_FlowPort_direction_feature = Direction
+_UI_FlowProperty_base_Property_feature = Base Property
+_UI_FlowProperty_direction_feature = Direction
+_UI_FlowSpecification_base_Interface_feature = Base Interface
+_UI_ItemFlow_base_InformationFlow_feature = Base Information Flow
+_UI_ItemFlow_itemProperty_feature = Item Property
+_UI_ConstraintProperty_base_Property_feature = Base Property
+_UI_Optionnal_base_Parameter_feature = Base Parameter
+_UI_Rate_base_Parameter_feature = Base Parameter
+_UI_Rate_base_ActivityEdge_feature = Base Activity Edge
+_UI_Rate_rate_feature = Rate
+_UI_Probability_base_ActivityEdge_feature = Base Activity Edge
+_UI_Probability_base_ParameterSet_feature = Base Parameter Set
+_UI_Probability_probability_feature = Probability
+_UI_ControlOperator_base_Operation_feature = Base Operation
+_UI_ControlOperator_base_Behavior_feature = Base Behavior
+_UI_NoBuffer_base_ObjectNode_feature = Base Object Node
+_UI_Overwrite_base_ObjectNode_feature = Base Object Node
+_UI_Allocate_base_Abstraction_feature = Base Abstraction
+_UI_Allocated_base_NamedElement_feature = Base Named Element
+_UI_Allocated_allocatedFrom_feature = Allocated From
+_UI_Allocated_allocatedTo_feature = Allocated To
+_UI_AllocateActivityPartition_base_ActivityPartition_feature = Base Activity Partition
+_UI_TestCase_base_Behavior_feature = Base Behavior
+_UI_TestCase_base_Operation_feature = Base Operation
+_UI_TestCase_verifies_feature = Verifies
+_UI_Requirement_text_feature = Text
+_UI_Requirement_id_feature = Id
+_UI_Requirement_derived_feature = Derived
+_UI_Requirement_derivedFrom_feature = Derived From
+_UI_Requirement_satisfiedBy_feature = Satisfied By
+_UI_Requirement_refinedBy_feature = Refined By
+_UI_Requirement_tracedTo_feature = Traced To
+_UI_Requirement_verifiedBy_feature = Verified By
+_UI_Requirement_master_feature = Master
+_UI_Requirement_base_Class_feature = Base Class
+_UI_RequirementRelated_base_NamedElement_feature = Base Named Element
+_UI_RequirementRelated_tracedFrom_feature = Traced From
+_UI_RequirementRelated_satisfies_feature = Satisfies
+_UI_RequirementRelated_refines_feature = Refines
+_UI_RequirementRelated_verifies_feature = Verifies
+_UI_Unknown_feature = Unspecified
+
+_UI_FlowDirection_in_literal = in
+_UI_FlowDirection_out_literal = out
+_UI_FlowDirection_inout_literal = inout
+_UI_Optional_type = Optional
+_UI_Optional_base_Parameter_feature = Base Parameter
+_UI_Auxiliary_type = Auxiliary
+_UI_Call_type = Call
+_UI_Create_type = Create
+_UI_Derive_type = Derive
+_UI_Destroy_type = Destroy
+_UI_Document_type = Document
+_UI_File_type = File
+_UI_Entity_type = Entity
+_UI_Executable_type = Executable
+_UI_Focus_type = Focus
+_UI_Framework_type = Framework
+_UI_Implement_type = Implement
+_UI_ImplementationClass_type = Implementation Class
+_UI_Instantiate_type = Instantiate
+_UI_Library_type = Library
+_UI_Metaclass_type = Metaclass
+_UI_ModelLibrary_type = Model Library
+_UI_Process_type = Process
+_UI_Realization_type = Realization
+_UI_Refine_type = Refine
+_UI_Responsibility_type = Responsibility
+_UI_Script_type = Script
+_UI_Send_type = Send
+_UI_Service_type = Service
+_UI_Source_type = Source
+_UI_Specification_type = Specification
+_UI_Subsystem_type = Subsystem
+_UI_Trace_type = Trace
+_UI_Type_type = Type
+_UI_Utility_type = Utility
+_UI_Auxiliary_base_Class_feature = Base Class
+_UI_Call_base_Usage_feature = Base Usage
+_UI_Create_base_BehavioralFeature_feature = Base Behavioral Feature
+_UI_Create_base_Usage_feature = Base Usage
+_UI_Derive_base_Abstraction_feature = Base Abstraction
+_UI_Derive_computation_feature = Computation
+_UI_Destroy_base_BehavioralFeature_feature = Base Behavioral Feature
+_UI_File_base_Artifact_feature = Base Artifact
+_UI_Entity_base_Component_feature = Base Component
+_UI_Focus_base_Class_feature = Base Class
+_UI_Framework_base_Package_feature = Base Package
+_UI_Implement_base_Component_feature = Base Component
+_UI_ImplementationClass_base_Class_feature = Base Class
+_UI_Instantiate_base_Usage_feature = Base Usage
+_UI_Metaclass_base_Class_feature = Base Class
+_UI_ModelLibrary_base_Package_feature = Base Package
+_UI_Process_base_Component_feature = Base Component
+_UI_Realization_base_Classifier_feature = Base Classifier
+_UI_Refine_base_Abstraction_feature = Base Abstraction
+_UI_Responsibility_base_Usage_feature = Base Usage
+_UI_Send_base_Usage_feature = Base Usage
+_UI_Service_base_Component_feature = Base Component
+_UI_Specification_base_Classifier_feature = Base Classifier
+_UI_Subsystem_base_Component_feature = Base Component
+_UI_Trace_base_Abstraction_feature = Base Abstraction
+_UI_Type_base_Class_feature = Base Class
+_UI_Utility_base_Class_feature = Base Class
+_UI_BuildComponent_type = Build Component
+_UI_Metamodel_type = Metamodel
+_UI_SystemModel_type = System Model
+_UI_BuildComponent_base_Component_feature = Base Component
+_UI_Metamodel_base_Model_feature = Base Model
+_UI_SystemModel_base_Model_feature = Base Model
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/plugin.xml b/plugins/org.eclipse.papyrus.sysml.edit/plugin.xml
new file mode 100755
index 0000000..913d941
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/plugin.xml
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<!--
+ <copyright>
+ </copyright>
+
+ $Id$
+-->
+
+<plugin>
+
+ <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
+ <factory
+ uri="http://www.eclipse.org/papyrus/0.7.0/SysML/ModelElements"
+ class="org.eclipse.papyrus.sysml.modelelements.provider.ModelelementsItemProviderAdapterFactory"
+ supportedTypes=
+ "org.eclipse.emf.edit.provider.IEditingDomainItemProvider
+ org.eclipse.emf.edit.provider.IStructuredItemContentProvider
+ org.eclipse.emf.edit.provider.ITreeItemContentProvider
+ org.eclipse.emf.edit.provider.IItemLabelProvider
+ org.eclipse.emf.edit.provider.IItemPropertySource"/>
+ </extension>
+
+ <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
+ <factory
+ uri="http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks"
+ class="org.eclipse.papyrus.sysml.blocks.provider.BlocksItemProviderAdapterFactory"
+ supportedTypes=
+ "org.eclipse.emf.edit.provider.IEditingDomainItemProvider
+ org.eclipse.emf.edit.provider.IStructuredItemContentProvider
+ org.eclipse.emf.edit.provider.ITreeItemContentProvider
+ org.eclipse.emf.edit.provider.IItemLabelProvider
+ org.eclipse.emf.edit.provider.IItemPropertySource"/>
+ </extension>
+
+ <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
+ <factory
+ uri="http://www.eclipse.org/papyrus/0.7.0/SysML/PortAndFlows"
+ class="org.eclipse.papyrus.sysml.portandflows.provider.PortandflowsItemProviderAdapterFactory"
+ supportedTypes=
+ "org.eclipse.emf.edit.provider.IEditingDomainItemProvider
+ org.eclipse.emf.edit.provider.IStructuredItemContentProvider
+ org.eclipse.emf.edit.provider.ITreeItemContentProvider
+ org.eclipse.emf.edit.provider.IItemLabelProvider
+ org.eclipse.emf.edit.provider.IItemPropertySource"/>
+ </extension>
+
+ <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
+ <factory
+ uri="http://www.eclipse.org/papyrus/0.7.0/SysML/Constraints"
+ class="org.eclipse.papyrus.sysml.constraints.provider.ConstraintsItemProviderAdapterFactory"
+ supportedTypes=
+ "org.eclipse.emf.edit.provider.IEditingDomainItemProvider
+ org.eclipse.emf.edit.provider.IStructuredItemContentProvider
+ org.eclipse.emf.edit.provider.ITreeItemContentProvider
+ org.eclipse.emf.edit.provider.IItemLabelProvider
+ org.eclipse.emf.edit.provider.IItemPropertySource"/>
+ </extension>
+
+ <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
+ <factory
+ uri="http://www.eclipse.org/papyrus/0.7.0/SysML/Activities"
+ class="org.eclipse.papyrus.sysml.activities.provider.ActivitiesItemProviderAdapterFactory"
+ supportedTypes=
+ "org.eclipse.emf.edit.provider.IEditingDomainItemProvider
+ org.eclipse.emf.edit.provider.IStructuredItemContentProvider
+ org.eclipse.emf.edit.provider.ITreeItemContentProvider
+ org.eclipse.emf.edit.provider.IItemLabelProvider
+ org.eclipse.emf.edit.provider.IItemPropertySource"/>
+ </extension>
+
+ <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
+ <factory
+ uri="http://www.eclipse.org/papyrus/0.7.0/SysML/Allocations"
+ class="org.eclipse.papyrus.sysml.allocations.provider.AllocationsItemProviderAdapterFactory"
+ supportedTypes=
+ "org.eclipse.emf.edit.provider.IEditingDomainItemProvider
+ org.eclipse.emf.edit.provider.IStructuredItemContentProvider
+ org.eclipse.emf.edit.provider.ITreeItemContentProvider
+ org.eclipse.emf.edit.provider.IItemLabelProvider
+ org.eclipse.emf.edit.provider.IItemPropertySource"/>
+ </extension>
+
+ <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
+ <factory
+ uri="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements"
+ class="org.eclipse.papyrus.sysml.requirements.provider.RequirementsItemProviderAdapterFactory"
+ supportedTypes=
+ "org.eclipse.emf.edit.provider.IEditingDomainItemProvider
+ org.eclipse.emf.edit.provider.IStructuredItemContentProvider
+ org.eclipse.emf.edit.provider.ITreeItemContentProvider
+ org.eclipse.emf.edit.provider.IItemLabelProvider
+ org.eclipse.emf.edit.provider.IItemPropertySource"/>
+ </extension>
+
+</plugin>
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/pom.xml b/plugins/org.eclipse.papyrus.sysml.edit/pom.xml
new file mode 100755
index 0000000..f961299
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/pom.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>org.eclipse.papyrus.sysml</artifactId>
+ <groupId>org.eclipse.papyrus.sysml</groupId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.papyrus.sysml.edit</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/activities/provider/ActivitiesItemProviderAdapterFactory.java b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/activities/provider/ActivitiesItemProviderAdapterFactory.java
new file mode 100755
index 0000000..b255bf6
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/activities/provider/ActivitiesItemProviderAdapterFactory.java
@@ -0,0 +1,402 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.activities.provider;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.Notifier;
+import org.eclipse.emf.edit.provider.ChangeNotifier;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.IChangeNotifier;
+import org.eclipse.emf.edit.provider.IDisposable;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.INotifyChangedListener;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.papyrus.sysml.activities.util.ActivitiesAdapterFactory;
+
+/**
+ * This is the factory that is used to provide the interfaces needed to support Viewers.
+ * The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}.
+ * The adapters also support Eclipse property sheets.
+ * Note that most of the adapters are shared among multiple instances.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+public class ActivitiesItemProviderAdapterFactory extends ActivitiesAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable {
+
+ /**
+ * This keeps track of the root adapter factory that delegates to this adapter factory.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ComposedAdapterFactory parentAdapterFactory;
+
+ /**
+ * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected IChangeNotifier changeNotifier = new ChangeNotifier();
+
+ /**
+ * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ protected Collection<Object> supportedTypes = new ArrayList<Object>();
+
+ /**
+ * This constructs an instance. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ public ActivitiesItemProviderAdapterFactory() {
+ supportedTypes.add(IEditingDomainItemProvider.class);
+ supportedTypes.add(IStructuredItemContentProvider.class);
+ supportedTypes.add(ITreeItemContentProvider.class);
+ supportedTypes.add(IItemLabelProvider.class);
+ supportedTypes.add(IItemPropertySource.class);
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.sysml.activities.Optional} instances. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected OptionalItemProvider optionalItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.sysml.activities.Optional}. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createOptionalAdapter() {
+ if (optionalItemProvider == null) {
+ optionalItemProvider = new OptionalItemProvider(this);
+ }
+
+ return optionalItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.sysml.activities.Rate} instances. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected RateItemProvider rateItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.sysml.activities.Rate}.
+ * <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createRateAdapter() {
+ if (rateItemProvider == null) {
+ rateItemProvider = new RateItemProvider(this);
+ }
+
+ return rateItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.sysml.activities.Probability} instances. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ProbabilityItemProvider probabilityItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.sysml.activities.Probability}. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createProbabilityAdapter() {
+ if (probabilityItemProvider == null) {
+ probabilityItemProvider = new ProbabilityItemProvider(this);
+ }
+
+ return probabilityItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.sysml.activities.Continuous} instances. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ContinuousItemProvider continuousItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.sysml.activities.Continuous}. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createContinuousAdapter() {
+ if (continuousItemProvider == null) {
+ continuousItemProvider = new ContinuousItemProvider(this);
+ }
+
+ return continuousItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.sysml.activities.Discrete} instances. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected DiscreteItemProvider discreteItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.sysml.activities.Discrete}. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createDiscreteAdapter() {
+ if (discreteItemProvider == null) {
+ discreteItemProvider = new DiscreteItemProvider(this);
+ }
+
+ return discreteItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.sysml.activities.ControlOperator} instances.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ControlOperatorItemProvider controlOperatorItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.sysml.activities.ControlOperator}. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createControlOperatorAdapter() {
+ if (controlOperatorItemProvider == null) {
+ controlOperatorItemProvider = new ControlOperatorItemProvider(this);
+ }
+
+ return controlOperatorItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.sysml.activities.NoBuffer} instances. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected NoBufferItemProvider noBufferItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.sysml.activities.NoBuffer}. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createNoBufferAdapter() {
+ if (noBufferItemProvider == null) {
+ noBufferItemProvider = new NoBufferItemProvider(this);
+ }
+
+ return noBufferItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.sysml.activities.Overwrite} instances. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected OverwriteItemProvider overwriteItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.sysml.activities.Overwrite}. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createOverwriteAdapter() {
+ if (overwriteItemProvider == null) {
+ overwriteItemProvider = new OverwriteItemProvider(this);
+ }
+
+ return overwriteItemProvider;
+ }
+
+ /**
+ * This returns the root adapter factory that contains this factory. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ComposeableAdapterFactory getRootAdapterFactory() {
+ return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
+ }
+
+ /**
+ * This sets the composed adapter factory that contains this factory. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) {
+ this.parentAdapterFactory = parentAdapterFactory;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object type) {
+ return supportedTypes.contains(type) || super.isFactoryForType(type);
+ }
+
+ /**
+ * This implementation substitutes the factory itself as the key for the adapter.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter adapt(Notifier notifier, Object type) {
+ return super.adapt(notifier, this);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object adapt(Object object, Object type) {
+ if (isFactoryForType(type)) {
+ Object adapter = super.adapt(object, type);
+ if (!(type instanceof Class<?>) || (((Class<?>) type).isInstance(adapter))) {
+ return adapter;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * This adds a listener.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void addListener(INotifyChangedListener notifyChangedListener) {
+ changeNotifier.addListener(notifyChangedListener);
+ }
+
+ /**
+ * This removes a listener.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void removeListener(INotifyChangedListener notifyChangedListener) {
+ changeNotifier.removeListener(notifyChangedListener);
+ }
+
+ /**
+ * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ @Override
+ public void fireNotifyChanged(Notification notification) {
+ changeNotifier.fireNotifyChanged(notification);
+
+ if (parentAdapterFactory != null) {
+ parentAdapterFactory.fireNotifyChanged(notification);
+ }
+ }
+
+ /**
+ * This disposes all of the item providers created by this factory. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void dispose() {
+ if (optionalItemProvider != null) {
+ optionalItemProvider.dispose();
+ }
+ if (rateItemProvider != null) {
+ rateItemProvider.dispose();
+ }
+ if (probabilityItemProvider != null) {
+ probabilityItemProvider.dispose();
+ }
+ if (continuousItemProvider != null) {
+ continuousItemProvider.dispose();
+ }
+ if (discreteItemProvider != null) {
+ discreteItemProvider.dispose();
+ }
+ if (controlOperatorItemProvider != null) {
+ controlOperatorItemProvider.dispose();
+ }
+ if (noBufferItemProvider != null) {
+ noBufferItemProvider.dispose();
+ }
+ if (overwriteItemProvider != null) {
+ overwriteItemProvider.dispose();
+ }
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/activities/provider/ContinuousItemProvider.java b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/activities/provider/ContinuousItemProvider.java
new file mode 100755
index 0000000..2e707eb
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/activities/provider/ContinuousItemProvider.java
@@ -0,0 +1,139 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.activities.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.edit.provider.ComposedImage;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.edit.UMLEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.sysml.activities.Continuous} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class ContinuousItemProvider extends RateItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
+
+{
+
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ContinuousItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This returns Continuous.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Continuous"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ return getString("_UI_Continuous_type");
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Compose the image with specific visibility logo
+ * Copied from UML implementation
+ *
+ * @param object
+ * @param composedImage
+ * @return {@link ComposedImage}
+ */
+ public ComposedImage composeVisibilityImage(Object object, ComposedImage composedImage) {
+ NamedElement namedElement = (NamedElement) object;
+
+ if (namedElement.isSetVisibility()) {
+ composedImage.getImages().add(UMLEditPlugin.INSTANCE.getImage("full/ovr16/VisibilityKind_" //$NON-NLS-1$
+ + namedElement.getVisibility().getName()));
+ }
+
+ return composedImage;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/activities/provider/ControlOperatorItemProvider.java b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/activities/provider/ControlOperatorItemProvider.java
new file mode 100755
index 0000000..206c050
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/activities/provider/ControlOperatorItemProvider.java
@@ -0,0 +1,160 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.activities.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.papyrus.sysml.activities.ActivitiesPackage;
+import org.eclipse.papyrus.sysml.provider.SysmlEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.sysml.activities.ControlOperator} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class ControlOperatorItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
+
+{
+
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ControlOperatorItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addBase_OperationPropertyDescriptor(object);
+ addBase_BehaviorPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Base Operation feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addBase_OperationPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ControlOperator_base_Operation_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_ControlOperator_base_Operation_feature", "_UI_ControlOperator_type"), ActivitiesPackage.Literals.CONTROL_OPERATOR__BASE_OPERATION, true, false, true, null, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Base Behavior feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addBase_BehaviorPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ControlOperator_base_Behavior_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_ControlOperator_base_Behavior_feature", "_UI_ControlOperator_type"), ActivitiesPackage.Literals.CONTROL_OPERATOR__BASE_BEHAVIOR, true, false, true, null, null, null));
+ }
+
+ /**
+ * This returns ControlOperator.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/ControlOperator"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ return getString("_UI_ControlOperator_type");
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return SysmlEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/activities/provider/DiscreteItemProvider.java b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/activities/provider/DiscreteItemProvider.java
new file mode 100755
index 0000000..9229c31
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/activities/provider/DiscreteItemProvider.java
@@ -0,0 +1,139 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.activities.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.edit.provider.ComposedImage;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.edit.UMLEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.sysml.activities.Discrete} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class DiscreteItemProvider extends RateItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
+
+{
+
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public DiscreteItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This returns Discrete.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Discrete"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ return getString("_UI_Discrete_type");
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Compose the image with specific visibility logo
+ * Copied from UML implementation
+ *
+ * @param object
+ * @param composedImage
+ * @return {@link ComposedImage}
+ */
+ public ComposedImage composeVisibilityImage(Object object, ComposedImage composedImage) {
+ NamedElement namedElement = (NamedElement) object;
+
+ if (namedElement.isSetVisibility()) {
+ composedImage.getImages().add(UMLEditPlugin.INSTANCE.getImage("full/ovr16/VisibilityKind_" //$NON-NLS-1$
+ + namedElement.getVisibility().getName()));
+ }
+
+ return composedImage;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/activities/provider/NoBufferItemProvider.java b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/activities/provider/NoBufferItemProvider.java
new file mode 100755
index 0000000..3c232d0
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/activities/provider/NoBufferItemProvider.java
@@ -0,0 +1,147 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.activities.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.papyrus.sysml.activities.ActivitiesPackage;
+import org.eclipse.papyrus.sysml.provider.SysmlEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.sysml.activities.NoBuffer} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class NoBufferItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
+
+{
+
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public NoBufferItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addBase_ObjectNodePropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Base Object Node feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addBase_ObjectNodePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_NoBuffer_base_ObjectNode_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_NoBuffer_base_ObjectNode_feature", "_UI_NoBuffer_type"), ActivitiesPackage.Literals.NO_BUFFER__BASE_OBJECT_NODE, true, false, true, null, null, null));
+ }
+
+ /**
+ * This returns NoBuffer.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/NoBuffer"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ return getString("_UI_NoBuffer_type");
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return SysmlEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/activities/provider/OptionalItemProvider.java b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/activities/provider/OptionalItemProvider.java
new file mode 100755
index 0000000..1ef8752
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/activities/provider/OptionalItemProvider.java
@@ -0,0 +1,147 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.activities.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.papyrus.sysml.activities.ActivitiesPackage;
+import org.eclipse.papyrus.sysml.provider.SysmlEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.sysml.activities.Optional} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class OptionalItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
+
+{
+
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public OptionalItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addBase_ParameterPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Base Parameter feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addBase_ParameterPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Optional_base_Parameter_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Optional_base_Parameter_feature", "_UI_Optional_type"), ActivitiesPackage.Literals.OPTIONAL__BASE_PARAMETER, true, false, true, null, null, null));
+ }
+
+ /**
+ * This returns Optional.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Optional"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ return getString("_UI_Optional_type");
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return SysmlEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/activities/provider/OverwriteItemProvider.java b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/activities/provider/OverwriteItemProvider.java
new file mode 100755
index 0000000..e6cd09a
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/activities/provider/OverwriteItemProvider.java
@@ -0,0 +1,147 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.activities.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.papyrus.sysml.activities.ActivitiesPackage;
+import org.eclipse.papyrus.sysml.provider.SysmlEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.sysml.activities.Overwrite} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class OverwriteItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
+
+{
+
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public OverwriteItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addBase_ObjectNodePropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Base Object Node feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addBase_ObjectNodePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Overwrite_base_ObjectNode_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Overwrite_base_ObjectNode_feature", "_UI_Overwrite_type"), ActivitiesPackage.Literals.OVERWRITE__BASE_OBJECT_NODE, true, false, true, null, null, null));
+ }
+
+ /**
+ * This returns Overwrite.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Overwrite"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ return getString("_UI_Overwrite_type");
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return SysmlEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/activities/provider/ProbabilityItemProvider.java b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/activities/provider/ProbabilityItemProvider.java
new file mode 100755
index 0000000..8509807
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/activities/provider/ProbabilityItemProvider.java
@@ -0,0 +1,173 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.activities.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.papyrus.sysml.activities.ActivitiesPackage;
+import org.eclipse.papyrus.sysml.provider.SysmlEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.sysml.activities.Probability} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class ProbabilityItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
+
+{
+
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ProbabilityItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addBase_ActivityEdgePropertyDescriptor(object);
+ addBase_ParameterSetPropertyDescriptor(object);
+ addProbabilityPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Base Activity Edge feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addBase_ActivityEdgePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Probability_base_ActivityEdge_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Probability_base_ActivityEdge_feature", "_UI_Probability_type"), ActivitiesPackage.Literals.PROBABILITY__BASE_ACTIVITY_EDGE, true, false, true, null, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Base Parameter Set feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addBase_ParameterSetPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Probability_base_ParameterSet_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Probability_base_ParameterSet_feature", "_UI_Probability_type"), ActivitiesPackage.Literals.PROBABILITY__BASE_PARAMETER_SET, true, false, true, null, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Probability feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addProbabilityPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Probability_probability_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Probability_probability_feature", "_UI_Probability_type"), ActivitiesPackage.Literals.PROBABILITY__PROBABILITY, true, false, true, null, null, null));
+ }
+
+ /**
+ * This returns Probability.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Probability"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ return getString("_UI_Probability_type");
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return SysmlEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/activities/provider/RateItemProvider.java b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/activities/provider/RateItemProvider.java
new file mode 100755
index 0000000..8171fd0
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/activities/provider/RateItemProvider.java
@@ -0,0 +1,173 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.activities.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.papyrus.sysml.activities.ActivitiesPackage;
+import org.eclipse.papyrus.sysml.provider.SysmlEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.sysml.activities.Rate} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class RateItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
+
+{
+
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public RateItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addBase_ParameterPropertyDescriptor(object);
+ addBase_ActivityEdgePropertyDescriptor(object);
+ addRatePropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Base Parameter feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addBase_ParameterPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Rate_base_Parameter_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Rate_base_Parameter_feature", "_UI_Rate_type"), ActivitiesPackage.Literals.RATE__BASE_PARAMETER, true, false, true, null, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Base Activity Edge feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addBase_ActivityEdgePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Rate_base_ActivityEdge_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Rate_base_ActivityEdge_feature", "_UI_Rate_type"), ActivitiesPackage.Literals.RATE__BASE_ACTIVITY_EDGE, true, false, true, null, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Rate feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addRatePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Rate_rate_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Rate_rate_feature", "_UI_Rate_type"), ActivitiesPackage.Literals.RATE__RATE, true, false, true, null, null, null));
+ }
+
+ /**
+ * This returns Rate.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Rate"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ return getString("_UI_Rate_type");
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return SysmlEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/allocations/provider/AllocateActivityPartitionItemProvider.java b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/allocations/provider/AllocateActivityPartitionItemProvider.java
new file mode 100755
index 0000000..47f5ae9
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/allocations/provider/AllocateActivityPartitionItemProvider.java
@@ -0,0 +1,148 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.allocations.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.papyrus.sysml.allocations.AllocationsPackage;
+import org.eclipse.papyrus.sysml.provider.SysmlEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.sysml.allocations.AllocateActivityPartition} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class AllocateActivityPartitionItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
+
+{
+
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public AllocateActivityPartitionItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addBase_ActivityPartitionPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Base Activity Partition feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addBase_ActivityPartitionPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_AllocateActivityPartition_base_ActivityPartition_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_AllocateActivityPartition_base_ActivityPartition_feature", "_UI_AllocateActivityPartition_type"), AllocationsPackage.Literals.ALLOCATE_ACTIVITY_PARTITION__BASE_ACTIVITY_PARTITION, true,
+ false, true, null, null, null));
+ }
+
+ /**
+ * This returns AllocateActivityPartition.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/AllocateActivityPartition"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ return getString("_UI_AllocateActivityPartition_type");
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return SysmlEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/allocations/provider/AllocateItemProvider.java b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/allocations/provider/AllocateItemProvider.java
new file mode 100755
index 0000000..d3915b6
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/allocations/provider/AllocateItemProvider.java
@@ -0,0 +1,147 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.allocations.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.papyrus.sysml.allocations.AllocationsPackage;
+import org.eclipse.papyrus.sysml.provider.SysmlEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.sysml.allocations.Allocate} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class AllocateItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
+
+{
+
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public AllocateItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addBase_AbstractionPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Base Abstraction feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addBase_AbstractionPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Allocate_base_Abstraction_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Allocate_base_Abstraction_feature", "_UI_Allocate_type"), AllocationsPackage.Literals.ALLOCATE__BASE_ABSTRACTION, true, false, true, null, null, null));
+ }
+
+ /**
+ * This returns Allocate.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Allocate"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ return getString("_UI_Allocate_type");
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return SysmlEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/allocations/provider/AllocatedItemProvider.java b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/allocations/provider/AllocatedItemProvider.java
new file mode 100755
index 0000000..9fbc8c4
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/allocations/provider/AllocatedItemProvider.java
@@ -0,0 +1,173 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.allocations.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.papyrus.sysml.allocations.AllocationsPackage;
+import org.eclipse.papyrus.sysml.provider.SysmlEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.sysml.allocations.Allocated} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class AllocatedItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
+
+{
+
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public AllocatedItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addBase_NamedElementPropertyDescriptor(object);
+ addAllocatedFromPropertyDescriptor(object);
+ addAllocatedToPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Base Named Element feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addBase_NamedElementPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Allocated_base_NamedElement_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Allocated_base_NamedElement_feature", "_UI_Allocated_type"), AllocationsPackage.Literals.ALLOCATED__BASE_NAMED_ELEMENT, true, false, true, null, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Allocated From feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addAllocatedFromPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Allocated_allocatedFrom_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Allocated_allocatedFrom_feature", "_UI_Allocated_type"), AllocationsPackage.Literals.ALLOCATED__ALLOCATED_FROM, false, false, false, null, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Allocated To feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addAllocatedToPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Allocated_allocatedTo_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Allocated_allocatedTo_feature", "_UI_Allocated_type"), AllocationsPackage.Literals.ALLOCATED__ALLOCATED_TO, false, false, false, null, null, null));
+ }
+
+ /**
+ * This returns Allocated.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Allocated"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ return getString("_UI_Allocated_type");
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return SysmlEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/allocations/provider/AllocationsItemProviderAdapterFactory.java b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/allocations/provider/AllocationsItemProviderAdapterFactory.java
new file mode 100755
index 0000000..d0cc57b
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/allocations/provider/AllocationsItemProviderAdapterFactory.java
@@ -0,0 +1,271 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.allocations.provider;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.Notifier;
+import org.eclipse.emf.edit.provider.ChangeNotifier;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.IChangeNotifier;
+import org.eclipse.emf.edit.provider.IDisposable;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.INotifyChangedListener;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.papyrus.sysml.allocations.util.AllocationsAdapterFactory;
+
+/**
+ * This is the factory that is used to provide the interfaces needed to support Viewers.
+ * The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}.
+ * The adapters also support Eclipse property sheets.
+ * Note that most of the adapters are shared among multiple instances.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+public class AllocationsItemProviderAdapterFactory extends AllocationsAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable {
+
+ /**
+ * This keeps track of the root adapter factory that delegates to this adapter factory.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ComposedAdapterFactory parentAdapterFactory;
+
+ /**
+ * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected IChangeNotifier changeNotifier = new ChangeNotifier();
+
+ /**
+ * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ protected Collection<Object> supportedTypes = new ArrayList<Object>();
+
+ /**
+ * This constructs an instance. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ public AllocationsItemProviderAdapterFactory() {
+ supportedTypes.add(IEditingDomainItemProvider.class);
+ supportedTypes.add(IStructuredItemContentProvider.class);
+ supportedTypes.add(ITreeItemContentProvider.class);
+ supportedTypes.add(IItemLabelProvider.class);
+ supportedTypes.add(IItemPropertySource.class);
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.sysml.allocations.Allocate} instances. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected AllocateItemProvider allocateItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.sysml.allocations.Allocate}. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createAllocateAdapter() {
+ if (allocateItemProvider == null) {
+ allocateItemProvider = new AllocateItemProvider(this);
+ }
+
+ return allocateItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.sysml.allocations.Allocated} instances. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected AllocatedItemProvider allocatedItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.sysml.allocations.Allocated}. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createAllocatedAdapter() {
+ if (allocatedItemProvider == null) {
+ allocatedItemProvider = new AllocatedItemProvider(this);
+ }
+
+ return allocatedItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.sysml.allocations.AllocateActivityPartition} instances. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected AllocateActivityPartitionItemProvider allocateActivityPartitionItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.sysml.allocations.AllocateActivityPartition}.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createAllocateActivityPartitionAdapter() {
+ if (allocateActivityPartitionItemProvider == null) {
+ allocateActivityPartitionItemProvider = new AllocateActivityPartitionItemProvider(this);
+ }
+
+ return allocateActivityPartitionItemProvider;
+ }
+
+ /**
+ * This returns the root adapter factory that contains this factory. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ComposeableAdapterFactory getRootAdapterFactory() {
+ return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
+ }
+
+ /**
+ * This sets the composed adapter factory that contains this factory. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) {
+ this.parentAdapterFactory = parentAdapterFactory;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object type) {
+ return supportedTypes.contains(type) || super.isFactoryForType(type);
+ }
+
+ /**
+ * This implementation substitutes the factory itself as the key for the adapter.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter adapt(Notifier notifier, Object type) {
+ return super.adapt(notifier, this);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object adapt(Object object, Object type) {
+ if (isFactoryForType(type)) {
+ Object adapter = super.adapt(object, type);
+ if (!(type instanceof Class<?>) || (((Class<?>) type).isInstance(adapter))) {
+ return adapter;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * This adds a listener.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void addListener(INotifyChangedListener notifyChangedListener) {
+ changeNotifier.addListener(notifyChangedListener);
+ }
+
+ /**
+ * This removes a listener.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void removeListener(INotifyChangedListener notifyChangedListener) {
+ changeNotifier.removeListener(notifyChangedListener);
+ }
+
+ /**
+ * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ @Override
+ public void fireNotifyChanged(Notification notification) {
+ changeNotifier.fireNotifyChanged(notification);
+
+ if (parentAdapterFactory != null) {
+ parentAdapterFactory.fireNotifyChanged(notification);
+ }
+ }
+
+ /**
+ * This disposes all of the item providers created by this factory. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void dispose() {
+ if (allocateItemProvider != null) {
+ allocateItemProvider.dispose();
+ }
+ if (allocatedItemProvider != null) {
+ allocatedItemProvider.dispose();
+ }
+ if (allocateActivityPartitionItemProvider != null) {
+ allocateActivityPartitionItemProvider.dispose();
+ }
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/blocks/provider/BindingConnectorItemProvider.java b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/blocks/provider/BindingConnectorItemProvider.java
new file mode 100755
index 0000000..bc5d523
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/blocks/provider/BindingConnectorItemProvider.java
@@ -0,0 +1,147 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.blocks.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.papyrus.sysml.blocks.BlocksPackage;
+import org.eclipse.papyrus.sysml.provider.SysmlEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.sysml.blocks.BindingConnector} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class BindingConnectorItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
+
+{
+
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public BindingConnectorItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addBase_ConnectorPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Base Connector feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addBase_ConnectorPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_BindingConnector_base_Connector_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_BindingConnector_base_Connector_feature", "_UI_BindingConnector_type"), BlocksPackage.Literals.BINDING_CONNECTOR__BASE_CONNECTOR, true, false, true, null, null, null));
+ }
+
+ /**
+ * This returns BindingConnector.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/BindingConnector"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ return getString("_UI_BindingConnector_type");
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return SysmlEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/blocks/provider/BlockItemProvider.java b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/blocks/provider/BlockItemProvider.java
new file mode 100755
index 0000000..18f5ce1
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/blocks/provider/BlockItemProvider.java
@@ -0,0 +1,170 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.blocks.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+import org.eclipse.papyrus.sysml.blocks.Block;
+import org.eclipse.papyrus.sysml.blocks.BlocksPackage;
+import org.eclipse.papyrus.sysml.provider.SysmlEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.sysml.blocks.Block} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class BlockItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
+
+{
+
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public BlockItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addIsEncapsulatedPropertyDescriptor(object);
+ addBase_ClassPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Is Encapsulated feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addIsEncapsulatedPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Block_isEncapsulated_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Block_isEncapsulated_feature", "_UI_Block_type"), BlocksPackage.Literals.BLOCK__IS_ENCAPSULATED, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Base Class feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addBase_ClassPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Block_base_Class_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Block_base_Class_feature", "_UI_Block_type"), BlocksPackage.Literals.BLOCK__BASE_CLASS, true, false, true, null, null, null));
+ }
+
+ /**
+ * This returns Block.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Block"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ Block block = (Block) object;
+ return getString("_UI_Block_type") + " " + block.isEncapsulated();
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(Block.class)) {
+ case BlocksPackage.BLOCK__IS_ENCAPSULATED:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return SysmlEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/blocks/provider/BlocksItemProviderAdapterFactory.java b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/blocks/provider/BlocksItemProviderAdapterFactory.java
new file mode 100755
index 0000000..9e081bd
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/blocks/provider/BlocksItemProviderAdapterFactory.java
@@ -0,0 +1,457 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.blocks.provider;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.Notifier;
+import org.eclipse.emf.edit.provider.ChangeNotifier;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.IChangeNotifier;
+import org.eclipse.emf.edit.provider.IDisposable;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.INotifyChangedListener;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.papyrus.sysml.blocks.util.BlocksAdapterFactory;
+
+/**
+ * This is the factory that is used to provide the interfaces needed to support Viewers.
+ * The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}.
+ * The adapters also support Eclipse property sheets.
+ * Note that most of the adapters are shared among multiple instances.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+public class BlocksItemProviderAdapterFactory extends BlocksAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable {
+
+ /**
+ * This keeps track of the root adapter factory that delegates to this adapter factory.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ComposedAdapterFactory parentAdapterFactory;
+
+ /**
+ * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected IChangeNotifier changeNotifier = new ChangeNotifier();
+
+ /**
+ * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ protected Collection<Object> supportedTypes = new ArrayList<Object>();
+
+ /**
+ * This constructs an instance. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ public BlocksItemProviderAdapterFactory() {
+ supportedTypes.add(IEditingDomainItemProvider.class);
+ supportedTypes.add(IStructuredItemContentProvider.class);
+ supportedTypes.add(ITreeItemContentProvider.class);
+ supportedTypes.add(IItemLabelProvider.class);
+ supportedTypes.add(IItemPropertySource.class);
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.sysml.blocks.Block} instances. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected BlockItemProvider blockItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.sysml.blocks.Block}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createBlockAdapter() {
+ if (blockItemProvider == null) {
+ blockItemProvider = new BlockItemProvider(this);
+ }
+
+ return blockItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.sysml.blocks.DistributedProperty} instances.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected DistributedPropertyItemProvider distributedPropertyItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.sysml.blocks.DistributedProperty}. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createDistributedPropertyAdapter() {
+ if (distributedPropertyItemProvider == null) {
+ distributedPropertyItemProvider = new DistributedPropertyItemProvider(this);
+ }
+
+ return distributedPropertyItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.sysml.blocks.Dimension} instances. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected DimensionItemProvider dimensionItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.sysml.blocks.Dimension}.
+ * <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createDimensionAdapter() {
+ if (dimensionItemProvider == null) {
+ dimensionItemProvider = new DimensionItemProvider(this);
+ }
+
+ return dimensionItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.sysml.blocks.Unit} instances. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected UnitItemProvider unitItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.sysml.blocks.Unit}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createUnitAdapter() {
+ if (unitItemProvider == null) {
+ unitItemProvider = new UnitItemProvider(this);
+ }
+
+ return unitItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.sysml.blocks.ValueType} instances. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ValueTypeItemProvider valueTypeItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.sysml.blocks.ValueType}.
+ * <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createValueTypeAdapter() {
+ if (valueTypeItemProvider == null) {
+ valueTypeItemProvider = new ValueTypeItemProvider(this);
+ }
+
+ return valueTypeItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.sysml.blocks.NestedConnectorEnd} instances.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected NestedConnectorEndItemProvider nestedConnectorEndItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.sysml.blocks.NestedConnectorEnd}. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createNestedConnectorEndAdapter() {
+ if (nestedConnectorEndItemProvider == null) {
+ nestedConnectorEndItemProvider = new NestedConnectorEndItemProvider(this);
+ }
+
+ return nestedConnectorEndItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.sysml.blocks.ParticipantProperty} instances.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ParticipantPropertyItemProvider participantPropertyItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.sysml.blocks.ParticipantProperty}. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createParticipantPropertyAdapter() {
+ if (participantPropertyItemProvider == null) {
+ participantPropertyItemProvider = new ParticipantPropertyItemProvider(this);
+ }
+
+ return participantPropertyItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.sysml.blocks.ConnectorProperty} instances.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ConnectorPropertyItemProvider connectorPropertyItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.sysml.blocks.ConnectorProperty}. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createConnectorPropertyAdapter() {
+ if (connectorPropertyItemProvider == null) {
+ connectorPropertyItemProvider = new ConnectorPropertyItemProvider(this);
+ }
+
+ return connectorPropertyItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.sysml.blocks.BindingConnector} instances. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected BindingConnectorItemProvider bindingConnectorItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.sysml.blocks.BindingConnector}. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createBindingConnectorAdapter() {
+ if (bindingConnectorItemProvider == null) {
+ bindingConnectorItemProvider = new BindingConnectorItemProvider(this);
+ }
+
+ return bindingConnectorItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.sysml.blocks.PropertySpecificType} instances.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected PropertySpecificTypeItemProvider propertySpecificTypeItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.sysml.blocks.PropertySpecificType}. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createPropertySpecificTypeAdapter() {
+ if (propertySpecificTypeItemProvider == null) {
+ propertySpecificTypeItemProvider = new PropertySpecificTypeItemProvider(this);
+ }
+
+ return propertySpecificTypeItemProvider;
+ }
+
+ /**
+ * This returns the root adapter factory that contains this factory. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ComposeableAdapterFactory getRootAdapterFactory() {
+ return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
+ }
+
+ /**
+ * This sets the composed adapter factory that contains this factory. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) {
+ this.parentAdapterFactory = parentAdapterFactory;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object type) {
+ return supportedTypes.contains(type) || super.isFactoryForType(type);
+ }
+
+ /**
+ * This implementation substitutes the factory itself as the key for the adapter.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter adapt(Notifier notifier, Object type) {
+ return super.adapt(notifier, this);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object adapt(Object object, Object type) {
+ if (isFactoryForType(type)) {
+ Object adapter = super.adapt(object, type);
+ if (!(type instanceof Class<?>) || (((Class<?>) type).isInstance(adapter))) {
+ return adapter;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * This adds a listener.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void addListener(INotifyChangedListener notifyChangedListener) {
+ changeNotifier.addListener(notifyChangedListener);
+ }
+
+ /**
+ * This removes a listener.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void removeListener(INotifyChangedListener notifyChangedListener) {
+ changeNotifier.removeListener(notifyChangedListener);
+ }
+
+ /**
+ * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ @Override
+ public void fireNotifyChanged(Notification notification) {
+ changeNotifier.fireNotifyChanged(notification);
+
+ if (parentAdapterFactory != null) {
+ parentAdapterFactory.fireNotifyChanged(notification);
+ }
+ }
+
+ /**
+ * This disposes all of the item providers created by this factory. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void dispose() {
+ if (blockItemProvider != null) {
+ blockItemProvider.dispose();
+ }
+ if (distributedPropertyItemProvider != null) {
+ distributedPropertyItemProvider.dispose();
+ }
+ if (dimensionItemProvider != null) {
+ dimensionItemProvider.dispose();
+ }
+ if (unitItemProvider != null) {
+ unitItemProvider.dispose();
+ }
+ if (valueTypeItemProvider != null) {
+ valueTypeItemProvider.dispose();
+ }
+ if (nestedConnectorEndItemProvider != null) {
+ nestedConnectorEndItemProvider.dispose();
+ }
+ if (participantPropertyItemProvider != null) {
+ participantPropertyItemProvider.dispose();
+ }
+ if (connectorPropertyItemProvider != null) {
+ connectorPropertyItemProvider.dispose();
+ }
+ if (bindingConnectorItemProvider != null) {
+ bindingConnectorItemProvider.dispose();
+ }
+ if (propertySpecificTypeItemProvider != null) {
+ propertySpecificTypeItemProvider.dispose();
+ }
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/blocks/provider/ConnectorPropertyItemProvider.java b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/blocks/provider/ConnectorPropertyItemProvider.java
new file mode 100755
index 0000000..c6f0a0d
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/blocks/provider/ConnectorPropertyItemProvider.java
@@ -0,0 +1,160 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.blocks.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.papyrus.sysml.blocks.BlocksPackage;
+import org.eclipse.papyrus.sysml.provider.SysmlEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.sysml.blocks.ConnectorProperty} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class ConnectorPropertyItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
+
+{
+
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ConnectorPropertyItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addBase_PropertyPropertyDescriptor(object);
+ addConnectorPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Base Property feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addBase_PropertyPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ConnectorProperty_base_Property_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_ConnectorProperty_base_Property_feature", "_UI_ConnectorProperty_type"), BlocksPackage.Literals.CONNECTOR_PROPERTY__BASE_PROPERTY, true, false, true, null, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Connector feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addConnectorPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ConnectorProperty_connector_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_ConnectorProperty_connector_feature", "_UI_ConnectorProperty_type"), BlocksPackage.Literals.CONNECTOR_PROPERTY__CONNECTOR, true, false, true, null, null, null));
+ }
+
+ /**
+ * This returns ConnectorProperty.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/ConnectorProperty"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ return getString("_UI_ConnectorProperty_type");
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return SysmlEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/blocks/provider/DimensionItemProvider.java b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/blocks/provider/DimensionItemProvider.java
new file mode 100755
index 0000000..2415aff
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/blocks/provider/DimensionItemProvider.java
@@ -0,0 +1,147 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.blocks.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.papyrus.sysml.blocks.BlocksPackage;
+import org.eclipse.papyrus.sysml.provider.SysmlEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.sysml.blocks.Dimension} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class DimensionItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
+
+{
+
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public DimensionItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addBase_InstanceSpecificationPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Base Instance Specification feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addBase_InstanceSpecificationPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Dimension_base_InstanceSpecification_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Dimension_base_InstanceSpecification_feature", "_UI_Dimension_type"), BlocksPackage.Literals.DIMENSION__BASE_INSTANCE_SPECIFICATION, true, false, true, null, null, null));
+ }
+
+ /**
+ * This returns Dimension.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Dimension"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ return getString("_UI_Dimension_type");
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return SysmlEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/blocks/provider/DistributedPropertyItemProvider.java b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/blocks/provider/DistributedPropertyItemProvider.java
new file mode 100755
index 0000000..4908234
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/blocks/provider/DistributedPropertyItemProvider.java
@@ -0,0 +1,147 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.blocks.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.papyrus.sysml.blocks.BlocksPackage;
+import org.eclipse.papyrus.sysml.provider.SysmlEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.sysml.blocks.DistributedProperty} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class DistributedPropertyItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
+
+{
+
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public DistributedPropertyItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addBase_PropertyPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Base Property feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addBase_PropertyPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_DistributedProperty_base_Property_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_DistributedProperty_base_Property_feature", "_UI_DistributedProperty_type"), BlocksPackage.Literals.DISTRIBUTED_PROPERTY__BASE_PROPERTY, true, false, true, null, null, null));
+ }
+
+ /**
+ * This returns DistributedProperty.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/DistributedProperty"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ return getString("_UI_DistributedProperty_type");
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return SysmlEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/blocks/provider/NestedConnectorEndItemProvider.java b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/blocks/provider/NestedConnectorEndItemProvider.java
new file mode 100755
index 0000000..3ba2b5a
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/blocks/provider/NestedConnectorEndItemProvider.java
@@ -0,0 +1,160 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.blocks.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.papyrus.sysml.blocks.BlocksPackage;
+import org.eclipse.papyrus.sysml.provider.SysmlEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.sysml.blocks.NestedConnectorEnd} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class NestedConnectorEndItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
+
+{
+
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public NestedConnectorEndItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addPropertyPathPropertyDescriptor(object);
+ addBase_ConnectorEndPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Property Path feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addPropertyPathPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_NestedConnectorEnd_propertyPath_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_NestedConnectorEnd_propertyPath_feature", "_UI_NestedConnectorEnd_type"), BlocksPackage.Literals.NESTED_CONNECTOR_END__PROPERTY_PATH, true, false, true, null, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Base Connector End feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addBase_ConnectorEndPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_NestedConnectorEnd_base_ConnectorEnd_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_NestedConnectorEnd_base_ConnectorEnd_feature", "_UI_NestedConnectorEnd_type"), BlocksPackage.Literals.NESTED_CONNECTOR_END__BASE_CONNECTOR_END, true, false, true, null, null, null));
+ }
+
+ /**
+ * This returns NestedConnectorEnd.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/NestedConnectorEnd"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ return getString("_UI_NestedConnectorEnd_type");
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return SysmlEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/blocks/provider/ParticipantPropertyItemProvider.java b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/blocks/provider/ParticipantPropertyItemProvider.java
new file mode 100755
index 0000000..85c9ed8
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/blocks/provider/ParticipantPropertyItemProvider.java
@@ -0,0 +1,160 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.blocks.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.papyrus.sysml.blocks.BlocksPackage;
+import org.eclipse.papyrus.sysml.provider.SysmlEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.sysml.blocks.ParticipantProperty} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class ParticipantPropertyItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
+
+{
+
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ParticipantPropertyItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addBase_PropertyPropertyDescriptor(object);
+ addEndPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Base Property feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addBase_PropertyPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ParticipantProperty_base_Property_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_ParticipantProperty_base_Property_feature", "_UI_ParticipantProperty_type"), BlocksPackage.Literals.PARTICIPANT_PROPERTY__BASE_PROPERTY, true, false, true, null, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the End feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addEndPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ParticipantProperty_end_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_ParticipantProperty_end_feature", "_UI_ParticipantProperty_type"), BlocksPackage.Literals.PARTICIPANT_PROPERTY__END, true, false, true, null, null, null));
+ }
+
+ /**
+ * This returns ParticipantProperty.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/ParticipantProperty"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ return getString("_UI_ParticipantProperty_type");
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return SysmlEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/blocks/provider/PropertySpecificTypeItemProvider.java b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/blocks/provider/PropertySpecificTypeItemProvider.java
new file mode 100755
index 0000000..0331591
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/blocks/provider/PropertySpecificTypeItemProvider.java
@@ -0,0 +1,147 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.blocks.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.papyrus.sysml.blocks.BlocksPackage;
+import org.eclipse.papyrus.sysml.provider.SysmlEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.sysml.blocks.PropertySpecificType} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class PropertySpecificTypeItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
+
+{
+
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public PropertySpecificTypeItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addBase_ClassifierPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Base Classifier feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addBase_ClassifierPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_PropertySpecificType_base_Classifier_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_PropertySpecificType_base_Classifier_feature", "_UI_PropertySpecificType_type"), BlocksPackage.Literals.PROPERTY_SPECIFIC_TYPE__BASE_CLASSIFIER, true, false, true, null, null, null));
+ }
+
+ /**
+ * This returns PropertySpecificType.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/PropertySpecificType"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ return getString("_UI_PropertySpecificType_type");
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return SysmlEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/blocks/provider/UnitItemProvider.java b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/blocks/provider/UnitItemProvider.java
new file mode 100755
index 0000000..a7683aa
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/blocks/provider/UnitItemProvider.java
@@ -0,0 +1,160 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.blocks.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.papyrus.sysml.blocks.BlocksPackage;
+import org.eclipse.papyrus.sysml.provider.SysmlEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.sysml.blocks.Unit} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class UnitItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
+
+{
+
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public UnitItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addBase_InstanceSpecificationPropertyDescriptor(object);
+ addDimensionPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Base Instance Specification feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addBase_InstanceSpecificationPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Unit_base_InstanceSpecification_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Unit_base_InstanceSpecification_feature", "_UI_Unit_type"), BlocksPackage.Literals.UNIT__BASE_INSTANCE_SPECIFICATION, true, false, true, null, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Dimension feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addDimensionPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Unit_dimension_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Unit_dimension_feature", "_UI_Unit_type"), BlocksPackage.Literals.UNIT__DIMENSION, true, false, true, null, null, null));
+ }
+
+ /**
+ * This returns Unit.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Unit"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ return getString("_UI_Unit_type");
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return SysmlEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/blocks/provider/ValueTypeItemProvider.java b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/blocks/provider/ValueTypeItemProvider.java
new file mode 100755
index 0000000..2772759
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/blocks/provider/ValueTypeItemProvider.java
@@ -0,0 +1,173 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.blocks.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.papyrus.sysml.blocks.BlocksPackage;
+import org.eclipse.papyrus.sysml.provider.SysmlEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.sysml.blocks.ValueType} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class ValueTypeItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
+
+{
+
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ValueTypeItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addBase_DataTypePropertyDescriptor(object);
+ addUnitPropertyDescriptor(object);
+ addDimensionPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Base Data Type feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addBase_DataTypePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ValueType_base_DataType_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_ValueType_base_DataType_feature", "_UI_ValueType_type"), BlocksPackage.Literals.VALUE_TYPE__BASE_DATA_TYPE, true, false, true, null, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Unit feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addUnitPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ValueType_unit_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_ValueType_unit_feature", "_UI_ValueType_type"), BlocksPackage.Literals.VALUE_TYPE__UNIT, true, false, true, null, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Dimension feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addDimensionPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ValueType_dimension_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_ValueType_dimension_feature", "_UI_ValueType_type"), BlocksPackage.Literals.VALUE_TYPE__DIMENSION, true, false, true, null, null, null));
+ }
+
+ /**
+ * This returns ValueType.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/ValueType"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ return getString("_UI_ValueType_type");
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return SysmlEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/constraints/provider/ConstraintBlockItemProvider.java b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/constraints/provider/ConstraintBlockItemProvider.java
new file mode 100755
index 0000000..e62481a
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/constraints/provider/ConstraintBlockItemProvider.java
@@ -0,0 +1,156 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.constraints.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.ComposedImage;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.papyrus.sysml.blocks.provider.BlockItemProvider;
+import org.eclipse.papyrus.sysml.constraints.ConstraintBlock;
+import org.eclipse.papyrus.sysml.provider.SysmlEditPlugin;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.edit.UMLEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.sysml.constraints.ConstraintBlock} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class ConstraintBlockItemProvider extends BlockItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
+
+{
+
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ConstraintBlockItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This returns ConstraintBlock.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/ConstraintBlock"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ ConstraintBlock constraintBlock = (ConstraintBlock) object;
+ return getString("_UI_ConstraintBlock_type") + " " + constraintBlock.isEncapsulated();
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return SysmlEditPlugin.INSTANCE;
+ }
+
+ /**
+ * Compose the image with specific visibility logo
+ * Copied from UML implementation
+ *
+ * @param object
+ * @param composedImage
+ * @return {@link ComposedImage}
+ */
+ public ComposedImage composeVisibilityImage(Object object, ComposedImage composedImage) {
+ NamedElement namedElement = (NamedElement) object;
+
+ if (namedElement.isSetVisibility()) {
+ composedImage.getImages().add(UMLEditPlugin.INSTANCE.getImage("full/ovr16/VisibilityKind_" //$NON-NLS-1$
+ + namedElement.getVisibility().getName()));
+ }
+
+ return composedImage;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/constraints/provider/ConstraintPropertyItemProvider.java b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/constraints/provider/ConstraintPropertyItemProvider.java
new file mode 100755
index 0000000..8b7b948
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/constraints/provider/ConstraintPropertyItemProvider.java
@@ -0,0 +1,147 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.constraints.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.papyrus.sysml.constraints.ConstraintsPackage;
+import org.eclipse.papyrus.sysml.provider.SysmlEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.sysml.constraints.ConstraintProperty} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class ConstraintPropertyItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
+
+{
+
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ConstraintPropertyItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addBase_PropertyPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Base Property feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addBase_PropertyPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ConstraintProperty_base_Property_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_ConstraintProperty_base_Property_feature", "_UI_ConstraintProperty_type"), ConstraintsPackage.Literals.CONSTRAINT_PROPERTY__BASE_PROPERTY, true, false, true, null, null, null));
+ }
+
+ /**
+ * This returns ConstraintProperty.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/ConstraintProperty"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ return getString("_UI_ConstraintProperty_type");
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return SysmlEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/constraints/provider/ConstraintsItemProviderAdapterFactory.java b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/constraints/provider/ConstraintsItemProviderAdapterFactory.java
new file mode 100755
index 0000000..32318ef
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/constraints/provider/ConstraintsItemProviderAdapterFactory.java
@@ -0,0 +1,245 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.constraints.provider;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.Notifier;
+import org.eclipse.emf.edit.provider.ChangeNotifier;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.IChangeNotifier;
+import org.eclipse.emf.edit.provider.IDisposable;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.INotifyChangedListener;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.papyrus.sysml.constraints.util.ConstraintsAdapterFactory;
+
+/**
+ * This is the factory that is used to provide the interfaces needed to support Viewers.
+ * The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}.
+ * The adapters also support Eclipse property sheets.
+ * Note that most of the adapters are shared among multiple instances.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+public class ConstraintsItemProviderAdapterFactory extends ConstraintsAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable {
+
+ /**
+ * This keeps track of the root adapter factory that delegates to this adapter factory.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ComposedAdapterFactory parentAdapterFactory;
+
+ /**
+ * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected IChangeNotifier changeNotifier = new ChangeNotifier();
+
+ /**
+ * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ protected Collection<Object> supportedTypes = new ArrayList<Object>();
+
+ /**
+ * This constructs an instance. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ public ConstraintsItemProviderAdapterFactory() {
+ supportedTypes.add(IEditingDomainItemProvider.class);
+ supportedTypes.add(IStructuredItemContentProvider.class);
+ supportedTypes.add(ITreeItemContentProvider.class);
+ supportedTypes.add(IItemLabelProvider.class);
+ supportedTypes.add(IItemPropertySource.class);
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.sysml.constraints.ConstraintBlock} instances.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ConstraintBlockItemProvider constraintBlockItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.sysml.constraints.ConstraintBlock}. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createConstraintBlockAdapter() {
+ if (constraintBlockItemProvider == null) {
+ constraintBlockItemProvider = new ConstraintBlockItemProvider(this);
+ }
+
+ return constraintBlockItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.sysml.constraints.ConstraintProperty} instances. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ConstraintPropertyItemProvider constraintPropertyItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.sysml.constraints.ConstraintProperty}. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createConstraintPropertyAdapter() {
+ if (constraintPropertyItemProvider == null) {
+ constraintPropertyItemProvider = new ConstraintPropertyItemProvider(this);
+ }
+
+ return constraintPropertyItemProvider;
+ }
+
+ /**
+ * This returns the root adapter factory that contains this factory. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ComposeableAdapterFactory getRootAdapterFactory() {
+ return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
+ }
+
+ /**
+ * This sets the composed adapter factory that contains this factory. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) {
+ this.parentAdapterFactory = parentAdapterFactory;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object type) {
+ return supportedTypes.contains(type) || super.isFactoryForType(type);
+ }
+
+ /**
+ * This implementation substitutes the factory itself as the key for the adapter.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter adapt(Notifier notifier, Object type) {
+ return super.adapt(notifier, this);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object adapt(Object object, Object type) {
+ if (isFactoryForType(type)) {
+ Object adapter = super.adapt(object, type);
+ if (!(type instanceof Class<?>) || (((Class<?>) type).isInstance(adapter))) {
+ return adapter;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * This adds a listener.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void addListener(INotifyChangedListener notifyChangedListener) {
+ changeNotifier.addListener(notifyChangedListener);
+ }
+
+ /**
+ * This removes a listener.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void removeListener(INotifyChangedListener notifyChangedListener) {
+ changeNotifier.removeListener(notifyChangedListener);
+ }
+
+ /**
+ * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ @Override
+ public void fireNotifyChanged(Notification notification) {
+ changeNotifier.fireNotifyChanged(notification);
+
+ if (parentAdapterFactory != null) {
+ parentAdapterFactory.fireNotifyChanged(notification);
+ }
+ }
+
+ /**
+ * This disposes all of the item providers created by this factory. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void dispose() {
+ if (constraintBlockItemProvider != null) {
+ constraintBlockItemProvider.dispose();
+ }
+ if (constraintPropertyItemProvider != null) {
+ constraintPropertyItemProvider.dispose();
+ }
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/modelelements/provider/ConformItemProvider.java b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/modelelements/provider/ConformItemProvider.java
new file mode 100755
index 0000000..9117ff6
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/modelelements/provider/ConformItemProvider.java
@@ -0,0 +1,147 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelelements.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.papyrus.sysml.modelelements.ModelelementsPackage;
+import org.eclipse.papyrus.sysml.provider.SysmlEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.sysml.modelelements.Conform} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class ConformItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
+
+{
+
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ConformItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addBase_DependencyPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Base Dependency feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addBase_DependencyPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Conform_base_Dependency_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Conform_base_Dependency_feature", "_UI_Conform_type"), ModelelementsPackage.Literals.CONFORM__BASE_DEPENDENCY, true, false, true, null, null, null));
+ }
+
+ /**
+ * This returns Conform.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Conform"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ return getString("_UI_Conform_type");
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return SysmlEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/modelelements/provider/ModelelementsItemProviderAdapterFactory.java b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/modelelements/provider/ModelelementsItemProviderAdapterFactory.java
new file mode 100755
index 0000000..5034acf
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/modelelements/provider/ModelelementsItemProviderAdapterFactory.java
@@ -0,0 +1,324 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelelements.provider;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.Notifier;
+import org.eclipse.emf.edit.provider.ChangeNotifier;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.IChangeNotifier;
+import org.eclipse.emf.edit.provider.IDisposable;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.INotifyChangedListener;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.papyrus.sysml.modelelements.util.ModelelementsAdapterFactory;
+
+/**
+ * This is the factory that is used to provide the interfaces needed to support Viewers.
+ * The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}.
+ * The adapters also support Eclipse property sheets.
+ * Note that most of the adapters are shared among multiple instances.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+public class ModelelementsItemProviderAdapterFactory extends ModelelementsAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable {
+
+ /**
+ * This keeps track of the root adapter factory that delegates to this adapter factory.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ComposedAdapterFactory parentAdapterFactory;
+
+ /**
+ * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected IChangeNotifier changeNotifier = new ChangeNotifier();
+
+ /**
+ * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ protected Collection<Object> supportedTypes = new ArrayList<Object>();
+
+ /**
+ * This constructs an instance. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ public ModelelementsItemProviderAdapterFactory() {
+ supportedTypes.add(IEditingDomainItemProvider.class);
+ supportedTypes.add(IStructuredItemContentProvider.class);
+ supportedTypes.add(ITreeItemContentProvider.class);
+ supportedTypes.add(IItemLabelProvider.class);
+ supportedTypes.add(IItemPropertySource.class);
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.sysml.modelelements.Conform} instances. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ConformItemProvider conformItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.sysml.modelelements.Conform}. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createConformAdapter() {
+ if (conformItemProvider == null) {
+ conformItemProvider = new ConformItemProvider(this);
+ }
+
+ return conformItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.sysml.modelelements.View} instances. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ViewItemProvider viewItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.sysml.modelelements.View}.
+ * <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createViewAdapter() {
+ if (viewItemProvider == null) {
+ viewItemProvider = new ViewItemProvider(this);
+ }
+
+ return viewItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.sysml.modelelements.ViewPoint} instances. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ViewPointItemProvider viewPointItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.sysml.modelelements.ViewPoint}. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createViewPointAdapter() {
+ if (viewPointItemProvider == null) {
+ viewPointItemProvider = new ViewPointItemProvider(this);
+ }
+
+ return viewPointItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.sysml.modelelements.Rationale} instances. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected RationaleItemProvider rationaleItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.sysml.modelelements.Rationale}. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createRationaleAdapter() {
+ if (rationaleItemProvider == null) {
+ rationaleItemProvider = new RationaleItemProvider(this);
+ }
+
+ return rationaleItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.sysml.modelelements.Problem} instances. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ProblemItemProvider problemItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.sysml.modelelements.Problem}. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createProblemAdapter() {
+ if (problemItemProvider == null) {
+ problemItemProvider = new ProblemItemProvider(this);
+ }
+
+ return problemItemProvider;
+ }
+
+ /**
+ * This returns the root adapter factory that contains this factory. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ComposeableAdapterFactory getRootAdapterFactory() {
+ return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
+ }
+
+ /**
+ * This sets the composed adapter factory that contains this factory. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) {
+ this.parentAdapterFactory = parentAdapterFactory;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object type) {
+ return supportedTypes.contains(type) || super.isFactoryForType(type);
+ }
+
+ /**
+ * This implementation substitutes the factory itself as the key for the adapter.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter adapt(Notifier notifier, Object type) {
+ return super.adapt(notifier, this);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object adapt(Object object, Object type) {
+ if (isFactoryForType(type)) {
+ Object adapter = super.adapt(object, type);
+ if (!(type instanceof Class<?>) || (((Class<?>) type).isInstance(adapter))) {
+ return adapter;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * This adds a listener.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void addListener(INotifyChangedListener notifyChangedListener) {
+ changeNotifier.addListener(notifyChangedListener);
+ }
+
+ /**
+ * This removes a listener.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void removeListener(INotifyChangedListener notifyChangedListener) {
+ changeNotifier.removeListener(notifyChangedListener);
+ }
+
+ /**
+ * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ @Override
+ public void fireNotifyChanged(Notification notification) {
+ changeNotifier.fireNotifyChanged(notification);
+
+ if (parentAdapterFactory != null) {
+ parentAdapterFactory.fireNotifyChanged(notification);
+ }
+ }
+
+ /**
+ * This disposes all of the item providers created by this factory. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void dispose() {
+ if (conformItemProvider != null) {
+ conformItemProvider.dispose();
+ }
+ if (viewItemProvider != null) {
+ viewItemProvider.dispose();
+ }
+ if (viewPointItemProvider != null) {
+ viewPointItemProvider.dispose();
+ }
+ if (rationaleItemProvider != null) {
+ rationaleItemProvider.dispose();
+ }
+ if (problemItemProvider != null) {
+ problemItemProvider.dispose();
+ }
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/modelelements/provider/ProblemItemProvider.java b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/modelelements/provider/ProblemItemProvider.java
new file mode 100755
index 0000000..9736369
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/modelelements/provider/ProblemItemProvider.java
@@ -0,0 +1,147 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelelements.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.papyrus.sysml.modelelements.ModelelementsPackage;
+import org.eclipse.papyrus.sysml.provider.SysmlEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.sysml.modelelements.Problem} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class ProblemItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
+
+{
+
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ProblemItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addBase_CommentPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Base Comment feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addBase_CommentPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Problem_base_Comment_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Problem_base_Comment_feature", "_UI_Problem_type"), ModelelementsPackage.Literals.PROBLEM__BASE_COMMENT, true, false, true, null, null, null));
+ }
+
+ /**
+ * This returns Problem.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Problem"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ return getString("_UI_Problem_type");
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return SysmlEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/modelelements/provider/RationaleItemProvider.java b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/modelelements/provider/RationaleItemProvider.java
new file mode 100755
index 0000000..8b48708
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/modelelements/provider/RationaleItemProvider.java
@@ -0,0 +1,147 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelelements.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.papyrus.sysml.modelelements.ModelelementsPackage;
+import org.eclipse.papyrus.sysml.provider.SysmlEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.sysml.modelelements.Rationale} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class RationaleItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
+
+{
+
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public RationaleItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addBase_CommentPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Base Comment feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addBase_CommentPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Rationale_base_Comment_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Rationale_base_Comment_feature", "_UI_Rationale_type"), ModelelementsPackage.Literals.RATIONALE__BASE_COMMENT, true, false, true, null, null, null));
+ }
+
+ /**
+ * This returns Rationale.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Rationale"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ return getString("_UI_Rationale_type");
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return SysmlEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/modelelements/provider/ViewItemProvider.java b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/modelelements/provider/ViewItemProvider.java
new file mode 100755
index 0000000..fae825a
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/modelelements/provider/ViewItemProvider.java
@@ -0,0 +1,160 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelelements.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.papyrus.sysml.modelelements.ModelelementsPackage;
+import org.eclipse.papyrus.sysml.provider.SysmlEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.sysml.modelelements.View} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class ViewItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
+
+{
+
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ViewItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addViewPointPropertyDescriptor(object);
+ addBase_PackagePropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the View Point feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addViewPointPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_View_viewPoint_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_View_viewPoint_feature", "_UI_View_type"), ModelelementsPackage.Literals.VIEW__VIEW_POINT, false, false, false, null, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Base Package feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addBase_PackagePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_View_base_Package_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_View_base_Package_feature", "_UI_View_type"), ModelelementsPackage.Literals.VIEW__BASE_PACKAGE, true, false, true, null, null, null));
+ }
+
+ /**
+ * This returns View.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/View"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ return getString("_UI_View_type");
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return SysmlEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/modelelements/provider/ViewPointItemProvider.java b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/modelelements/provider/ViewPointItemProvider.java
new file mode 100755
index 0000000..bee70e8
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/modelelements/provider/ViewPointItemProvider.java
@@ -0,0 +1,226 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelelements.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+import org.eclipse.papyrus.sysml.modelelements.ModelelementsPackage;
+import org.eclipse.papyrus.sysml.modelelements.ViewPoint;
+import org.eclipse.papyrus.sysml.provider.SysmlEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.sysml.modelelements.ViewPoint} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class ViewPointItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
+
+{
+
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ViewPointItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addBase_ClassPropertyDescriptor(object);
+ addStakeHoldersPropertyDescriptor(object);
+ addPurposePropertyDescriptor(object);
+ addConcernsPropertyDescriptor(object);
+ addLanguagesPropertyDescriptor(object);
+ addMethodsPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Base Class feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addBase_ClassPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ViewPoint_base_Class_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_ViewPoint_base_Class_feature", "_UI_ViewPoint_type"), ModelelementsPackage.Literals.VIEW_POINT__BASE_CLASS, true, false, true, null, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Stake Holders feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addStakeHoldersPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ViewPoint_stakeHolders_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_ViewPoint_stakeHolders_feature", "_UI_ViewPoint_type"), ModelelementsPackage.Literals.VIEW_POINT__STAKE_HOLDERS, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Purpose feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addPurposePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ViewPoint_purpose_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_ViewPoint_purpose_feature", "_UI_ViewPoint_type"), ModelelementsPackage.Literals.VIEW_POINT__PURPOSE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Concerns feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addConcernsPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ViewPoint_concerns_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_ViewPoint_concerns_feature", "_UI_ViewPoint_type"), ModelelementsPackage.Literals.VIEW_POINT__CONCERNS, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Languages feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addLanguagesPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ViewPoint_languages_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_ViewPoint_languages_feature", "_UI_ViewPoint_type"), ModelelementsPackage.Literals.VIEW_POINT__LANGUAGES, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Methods feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addMethodsPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ViewPoint_methods_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_ViewPoint_methods_feature", "_UI_ViewPoint_type"), ModelelementsPackage.Literals.VIEW_POINT__METHODS, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This returns ViewPoint.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/ViewPoint"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((ViewPoint) object).getPurpose();
+ return label == null || label.length() == 0 ? getString("_UI_ViewPoint_type") : getString("_UI_ViewPoint_type") + " " + label;
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(ViewPoint.class)) {
+ case ModelelementsPackage.VIEW_POINT__STAKE_HOLDERS:
+ case ModelelementsPackage.VIEW_POINT__PURPOSE:
+ case ModelelementsPackage.VIEW_POINT__CONCERNS:
+ case ModelelementsPackage.VIEW_POINT__LANGUAGES:
+ case ModelelementsPackage.VIEW_POINT__METHODS:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return SysmlEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/portandflows/provider/FlowPortItemProvider.java b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/portandflows/provider/FlowPortItemProvider.java
new file mode 100755
index 0000000..3b8a5c1
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/portandflows/provider/FlowPortItemProvider.java
@@ -0,0 +1,198 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.portandflows.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+import org.eclipse.papyrus.sysml.portandflows.FlowPort;
+import org.eclipse.papyrus.sysml.portandflows.PortandflowsPackage;
+import org.eclipse.papyrus.sysml.provider.SysmlEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.sysml.portandflows.FlowPort} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class FlowPortItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
+
+{
+
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public FlowPortItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addBase_PortPropertyDescriptor(object);
+ addIsAtomicPropertyDescriptor(object);
+ addIsConjugatedPropertyDescriptor(object);
+ addDirectionPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Base Port feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addBase_PortPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_FlowPort_base_Port_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_FlowPort_base_Port_feature", "_UI_FlowPort_type"), PortandflowsPackage.Literals.FLOW_PORT__BASE_PORT, true, false, true, null, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Is Atomic feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addIsAtomicPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_FlowPort_isAtomic_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_FlowPort_isAtomic_feature", "_UI_FlowPort_type"), PortandflowsPackage.Literals.FLOW_PORT__IS_ATOMIC, false, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Is Conjugated feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addIsConjugatedPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_FlowPort_isConjugated_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_FlowPort_isConjugated_feature", "_UI_FlowPort_type"), PortandflowsPackage.Literals.FLOW_PORT__IS_CONJUGATED, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Direction feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addDirectionPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_FlowPort_direction_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_FlowPort_direction_feature", "_UI_FlowPort_type"), PortandflowsPackage.Literals.FLOW_PORT__DIRECTION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This returns FlowPort.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/FlowPort"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ FlowPort flowPort = (FlowPort) object;
+ return getString("_UI_FlowPort_type") + " " + flowPort.isAtomic();
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(FlowPort.class)) {
+ case PortandflowsPackage.FLOW_PORT__IS_ATOMIC:
+ case PortandflowsPackage.FLOW_PORT__IS_CONJUGATED:
+ case PortandflowsPackage.FLOW_PORT__DIRECTION:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return SysmlEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/portandflows/provider/FlowPropertyItemProvider.java b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/portandflows/provider/FlowPropertyItemProvider.java
new file mode 100755
index 0000000..56fe47c
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/portandflows/provider/FlowPropertyItemProvider.java
@@ -0,0 +1,172 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.portandflows.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+import org.eclipse.papyrus.sysml.portandflows.FlowDirection;
+import org.eclipse.papyrus.sysml.portandflows.FlowProperty;
+import org.eclipse.papyrus.sysml.portandflows.PortandflowsPackage;
+import org.eclipse.papyrus.sysml.provider.SysmlEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.sysml.portandflows.FlowProperty} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class FlowPropertyItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
+
+{
+
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public FlowPropertyItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addBase_PropertyPropertyDescriptor(object);
+ addDirectionPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Base Property feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addBase_PropertyPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_FlowProperty_base_Property_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_FlowProperty_base_Property_feature", "_UI_FlowProperty_type"), PortandflowsPackage.Literals.FLOW_PROPERTY__BASE_PROPERTY, true, false, true, null, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Direction feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addDirectionPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_FlowProperty_direction_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_FlowProperty_direction_feature", "_UI_FlowProperty_type"), PortandflowsPackage.Literals.FLOW_PROPERTY__DIRECTION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This returns FlowProperty.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/FlowProperty"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ FlowDirection labelValue = ((FlowProperty) object).getDirection();
+ String label = labelValue == null ? null : labelValue.toString();
+ return label == null || label.length() == 0 ? getString("_UI_FlowProperty_type") : getString("_UI_FlowProperty_type") + " " + label;
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(FlowProperty.class)) {
+ case PortandflowsPackage.FLOW_PROPERTY__DIRECTION:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return SysmlEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/portandflows/provider/FlowSpecificationItemProvider.java b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/portandflows/provider/FlowSpecificationItemProvider.java
new file mode 100755
index 0000000..00ef247
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/portandflows/provider/FlowSpecificationItemProvider.java
@@ -0,0 +1,147 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.portandflows.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.papyrus.sysml.portandflows.PortandflowsPackage;
+import org.eclipse.papyrus.sysml.provider.SysmlEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.sysml.portandflows.FlowSpecification} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class FlowSpecificationItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
+
+{
+
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public FlowSpecificationItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addBase_InterfacePropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Base Interface feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addBase_InterfacePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_FlowSpecification_base_Interface_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_FlowSpecification_base_Interface_feature", "_UI_FlowSpecification_type"), PortandflowsPackage.Literals.FLOW_SPECIFICATION__BASE_INTERFACE, true, false, true, null, null, null));
+ }
+
+ /**
+ * This returns FlowSpecification.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/FlowSpecification"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ return getString("_UI_FlowSpecification_type");
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return SysmlEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/portandflows/provider/ItemFlowItemProvider.java b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/portandflows/provider/ItemFlowItemProvider.java
new file mode 100755
index 0000000..575cedb
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/portandflows/provider/ItemFlowItemProvider.java
@@ -0,0 +1,160 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.portandflows.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.papyrus.sysml.portandflows.PortandflowsPackage;
+import org.eclipse.papyrus.sysml.provider.SysmlEditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.sysml.portandflows.ItemFlow} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class ItemFlowItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
+
+{
+
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ItemFlowItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addBase_InformationFlowPropertyDescriptor(object);
+ addItemPropertyPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Base Information Flow feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addBase_InformationFlowPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ItemFlow_base_InformationFlow_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_ItemFlow_base_InformationFlow_feature", "_UI_ItemFlow_type"), PortandflowsPackage.Literals.ITEM_FLOW__BASE_INFORMATION_FLOW, true, false, true, null, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Item Property feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addItemPropertyPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ItemFlow_itemProperty_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_ItemFlow_itemProperty_feature", "_UI_ItemFlow_type"), PortandflowsPackage.Literals.ITEM_FLOW__ITEM_PROPERTY, true, false, true, null, null, null));
+ }
+
+ /**
+ * This returns ItemFlow.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/ItemFlow"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ return getString("_UI_ItemFlow_type");
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return SysmlEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/portandflows/provider/PortandflowsItemProviderAdapterFactory.java b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/portandflows/provider/PortandflowsItemProviderAdapterFactory.java
new file mode 100755
index 0000000..5763ed7
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/portandflows/provider/PortandflowsItemProviderAdapterFactory.java
@@ -0,0 +1,297 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.portandflows.provider;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.Notifier;
+import org.eclipse.emf.edit.provider.ChangeNotifier;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.IChangeNotifier;
+import org.eclipse.emf.edit.provider.IDisposable;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.INotifyChangedListener;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.papyrus.sysml.portandflows.util.PortandflowsAdapterFactory;
+
+/**
+ * This is the factory that is used to provide the interfaces needed to support Viewers.
+ * The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}.
+ * The adapters also support Eclipse property sheets.
+ * Note that most of the adapters are shared among multiple instances.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+public class PortandflowsItemProviderAdapterFactory extends PortandflowsAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable {
+
+ /**
+ * This keeps track of the root adapter factory that delegates to this adapter factory.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ComposedAdapterFactory parentAdapterFactory;
+
+ /**
+ * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected IChangeNotifier changeNotifier = new ChangeNotifier();
+
+ /**
+ * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ protected Collection<Object> supportedTypes = new ArrayList<Object>();
+
+ /**
+ * This constructs an instance. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ public PortandflowsItemProviderAdapterFactory() {
+ supportedTypes.add(IEditingDomainItemProvider.class);
+ supportedTypes.add(IStructuredItemContentProvider.class);
+ supportedTypes.add(ITreeItemContentProvider.class);
+ supportedTypes.add(IItemLabelProvider.class);
+ supportedTypes.add(IItemPropertySource.class);
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.sysml.portandflows.FlowPort} instances. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected FlowPortItemProvider flowPortItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.sysml.portandflows.FlowPort}. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createFlowPortAdapter() {
+ if (flowPortItemProvider == null) {
+ flowPortItemProvider = new FlowPortItemProvider(this);
+ }
+
+ return flowPortItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.sysml.portandflows.FlowProperty} instances.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected FlowPropertyItemProvider flowPropertyItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.sysml.portandflows.FlowProperty}. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createFlowPropertyAdapter() {
+ if (flowPropertyItemProvider == null) {
+ flowPropertyItemProvider = new FlowPropertyItemProvider(this);
+ }
+
+ return flowPropertyItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.sysml.portandflows.FlowSpecification} instances. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected FlowSpecificationItemProvider flowSpecificationItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.sysml.portandflows.FlowSpecification}. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createFlowSpecificationAdapter() {
+ if (flowSpecificationItemProvider == null) {
+ flowSpecificationItemProvider = new FlowSpecificationItemProvider(this);
+ }
+
+ return flowSpecificationItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.sysml.portandflows.ItemFlow} instances. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ItemFlowItemProvider itemFlowItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.sysml.portandflows.ItemFlow}. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createItemFlowAdapter() {
+ if (itemFlowItemProvider == null) {
+ itemFlowItemProvider = new ItemFlowItemProvider(this);
+ }
+
+ return itemFlowItemProvider;
+ }
+
+ /**
+ * This returns the root adapter factory that contains this factory. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ComposeableAdapterFactory getRootAdapterFactory() {
+ return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
+ }
+
+ /**
+ * This sets the composed adapter factory that contains this factory. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) {
+ this.parentAdapterFactory = parentAdapterFactory;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object type) {
+ return supportedTypes.contains(type) || super.isFactoryForType(type);
+ }
+
+ /**
+ * This implementation substitutes the factory itself as the key for the adapter.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter adapt(Notifier notifier, Object type) {
+ return super.adapt(notifier, this);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object adapt(Object object, Object type) {
+ if (isFactoryForType(type)) {
+ Object adapter = super.adapt(object, type);
+ if (!(type instanceof Class<?>) || (((Class<?>) type).isInstance(adapter))) {
+ return adapter;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * This adds a listener.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void addListener(INotifyChangedListener notifyChangedListener) {
+ changeNotifier.addListener(notifyChangedListener);
+ }
+
+ /**
+ * This removes a listener.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void removeListener(INotifyChangedListener notifyChangedListener) {
+ changeNotifier.removeListener(notifyChangedListener);
+ }
+
+ /**
+ * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ @Override
+ public void fireNotifyChanged(Notification notification) {
+ changeNotifier.fireNotifyChanged(notification);
+
+ if (parentAdapterFactory != null) {
+ parentAdapterFactory.fireNotifyChanged(notification);
+ }
+ }
+
+ /**
+ * This disposes all of the item providers created by this factory. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void dispose() {
+ if (flowPortItemProvider != null) {
+ flowPortItemProvider.dispose();
+ }
+ if (flowPropertyItemProvider != null) {
+ flowPropertyItemProvider.dispose();
+ }
+ if (flowSpecificationItemProvider != null) {
+ flowSpecificationItemProvider.dispose();
+ }
+ if (itemFlowItemProvider != null) {
+ itemFlowItemProvider.dispose();
+ }
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/provider/SysmlEditPlugin.java b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/provider/SysmlEditPlugin.java
new file mode 100755
index 0000000..ca0599d
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/provider/SysmlEditPlugin.java
@@ -0,0 +1,104 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.provider;
+
+import org.eclipse.emf.common.EMFPlugin;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.ecore.provider.EcoreEditPlugin;
+import org.eclipse.uml2.uml.edit.UMLEditPlugin;
+
+/**
+ * This is the central singleton for the SysML edit plugin.
+ * <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public final class SysmlEditPlugin extends EMFPlugin {
+
+ /**
+ * Keep track of the singleton. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ public static final SysmlEditPlugin INSTANCE = new SysmlEditPlugin();
+
+ /**
+ * Keep track of the singleton. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ private static Implementation plugin;
+
+ /**
+ * Create the instance.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public SysmlEditPlugin() {
+ super(new ResourceLocator[] { EcoreEditPlugin.INSTANCE, UMLEditPlugin.INSTANCE, });
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @return the singleton instance.
+ * @generated
+ */
+ @Override
+ public ResourceLocator getPluginResourceLocator() {
+ return plugin;
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @return the singleton instance.
+ * @generated
+ */
+ public static Implementation getPlugin() {
+ return plugin;
+ }
+
+ /**
+ * The actual implementation of the Eclipse <b>Plugin</b>. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static class Implementation extends EclipsePlugin {
+
+ /**
+ * Creates an instance.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Implementation() {
+ super();
+
+ // Remember the static instance.
+ //
+ plugin = this;
+ }
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/registry/SysmlRegistryAdapterFactoryRegistry.java b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/registry/SysmlRegistryAdapterFactoryRegistry.java
new file mode 100755
index 0000000..28655ca
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/registry/SysmlRegistryAdapterFactoryRegistry.java
@@ -0,0 +1,433 @@
+/*****************************************************************************
+ * Copyright (c) 2011 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:
+ * Atos - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.registry;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.papyrus.sysml.activities.provider.ActivitiesItemProviderAdapterFactory;
+import org.eclipse.papyrus.sysml.allocations.provider.AllocationsItemProviderAdapterFactory;
+import org.eclipse.papyrus.sysml.blocks.provider.BlocksItemProviderAdapterFactory;
+import org.eclipse.papyrus.sysml.constraints.provider.ConstraintsItemProviderAdapterFactory;
+import org.eclipse.papyrus.sysml.edit.provider.IComposableAdapterFactory;
+import org.eclipse.papyrus.sysml.edit.provider.IRootAdapterFactory;
+import org.eclipse.papyrus.sysml.modelelements.provider.ModelelementsItemProviderAdapterFactory;
+import org.eclipse.papyrus.sysml.portandflows.provider.PortandflowsItemProviderAdapterFactory;
+import org.eclipse.papyrus.sysml.requirements.provider.RequirementsItemProviderAdapterFactory;
+import org.eclipse.papyrus.uml.internationalization.edit.providers.InternationalizationUMLItemProviderAdapterFactory;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.eclipse.uml2.uml.edit.providers.AbstractionItemProvider;
+import org.eclipse.uml2.uml.edit.providers.ActivityEdgeItemProvider;
+import org.eclipse.uml2.uml.edit.providers.ActivityPartitionItemProvider;
+import org.eclipse.uml2.uml.edit.providers.BehaviorItemProvider;
+import org.eclipse.uml2.uml.edit.providers.ClassItemProvider;
+import org.eclipse.uml2.uml.edit.providers.ClassifierItemProvider;
+import org.eclipse.uml2.uml.edit.providers.CommentItemProvider;
+import org.eclipse.uml2.uml.edit.providers.ConnectorEndItemProvider;
+import org.eclipse.uml2.uml.edit.providers.ConnectorItemProvider;
+import org.eclipse.uml2.uml.edit.providers.DataTypeItemProvider;
+import org.eclipse.uml2.uml.edit.providers.DependencyItemProvider;
+import org.eclipse.uml2.uml.edit.providers.InformationFlowItemProvider;
+import org.eclipse.uml2.uml.edit.providers.InstanceSpecificationItemProvider;
+import org.eclipse.uml2.uml.edit.providers.InterfaceItemProvider;
+import org.eclipse.uml2.uml.edit.providers.NamedElementItemProvider;
+import org.eclipse.uml2.uml.edit.providers.ObjectNodeItemProvider;
+import org.eclipse.uml2.uml.edit.providers.OperationItemProvider;
+import org.eclipse.uml2.uml.edit.providers.PackageItemProvider;
+import org.eclipse.uml2.uml.edit.providers.ParameterItemProvider;
+import org.eclipse.uml2.uml.edit.providers.ParameterSetItemProvider;
+import org.eclipse.uml2.uml.edit.providers.PortItemProvider;
+import org.eclipse.uml2.uml.edit.providers.PropertyItemProvider;
+
+/**
+ * Get a registry of all SysML Adapter Factory classified by the UML class their
+ * correspond.
+ *
+ * Example:
+ *
+ * <Class.class> ->[ModelelementsItemProviderAdapterFactory,
+ * BlocksAdapterItemProviderFactory, RequirementsAdapterItemProviderFactory]
+ *
+ * @generated
+ */
+public class SysmlRegistryAdapterFactoryRegistry {
+
+ /**
+ * Keep track of the item provider of type ModelelementsItemProviderAdapterFactory
+ *
+ * @generated
+ */
+
+ protected ModelelementsItemProviderAdapterFactory modelelementsAdapterFactoryItemProvider;
+
+ /**
+ * Keep track of the item provider of type BlocksItemProviderAdapterFactory
+ *
+ * @generated
+ */
+
+ protected BlocksItemProviderAdapterFactory blocksAdapterFactoryItemProvider;
+
+ /**
+ * Keep track of the item provider of type PortandflowsItemProviderAdapterFactory
+ *
+ * @generated
+ */
+
+ protected PortandflowsItemProviderAdapterFactory portandflowsAdapterFactoryItemProvider;
+
+ /**
+ * Keep track of the item provider of type ConstraintsItemProviderAdapterFactory
+ *
+ * @generated
+ */
+
+ protected ConstraintsItemProviderAdapterFactory constraintsAdapterFactoryItemProvider;
+
+ /**
+ * Keep track of the item provider of type ActivitiesItemProviderAdapterFactory
+ *
+ * @generated
+ */
+
+ protected ActivitiesItemProviderAdapterFactory activitiesAdapterFactoryItemProvider;
+
+ /**
+ * Keep track of the item provider of type AllocationsItemProviderAdapterFactory
+ *
+ * @generated
+ */
+
+ protected AllocationsItemProviderAdapterFactory allocationsAdapterFactoryItemProvider;
+
+ /**
+ * Keep track of the item provider of type RequirementsItemProviderAdapterFactory
+ *
+ * @generated
+ */
+
+ protected RequirementsItemProviderAdapterFactory requirementsAdapterFactoryItemProvider;
+
+ /**
+ * Registry for all SysML AdapterFactory
+ *
+ * @generated
+ */
+ private List<AdapterFactory> adapterFactoryRegistry = new ArrayList<AdapterFactory>(7);
+
+ /**
+ * Registry of all {@link AdapterFactory} classified by corresponding UML element
+ *
+ * @generated
+ */
+ private HashMap<EClass, ArrayList<AdapterFactory>> adapterFactoryRegistryMap = new HashMap<EClass, ArrayList<AdapterFactory>>();
+
+ /**
+ * Default adapterFactory
+ *
+ * @generated
+ */
+ private InternationalizationUMLItemProviderAdapterFactory defaultAdapterFactory = new InternationalizationUMLItemProviderAdapterFactory();
+
+ /**
+ * Constructor + initialize
+ *
+ * @generated
+ */
+ private SysmlRegistryAdapterFactoryRegistry() {
+ /**
+ * Initialize all AdapterFactories
+ */
+
+ modelelementsAdapterFactoryItemProvider = new ModelelementsItemProviderAdapterFactory();
+ adapterFactoryRegistry.add(modelelementsAdapterFactoryItemProvider);
+
+ blocksAdapterFactoryItemProvider = new BlocksItemProviderAdapterFactory();
+ adapterFactoryRegistry.add(blocksAdapterFactoryItemProvider);
+
+ portandflowsAdapterFactoryItemProvider = new PortandflowsItemProviderAdapterFactory();
+ adapterFactoryRegistry.add(portandflowsAdapterFactoryItemProvider);
+
+ constraintsAdapterFactoryItemProvider = new ConstraintsItemProviderAdapterFactory();
+ adapterFactoryRegistry.add(constraintsAdapterFactoryItemProvider);
+
+ activitiesAdapterFactoryItemProvider = new ActivitiesItemProviderAdapterFactory();
+ adapterFactoryRegistry.add(activitiesAdapterFactoryItemProvider);
+
+ allocationsAdapterFactoryItemProvider = new AllocationsItemProviderAdapterFactory();
+ adapterFactoryRegistry.add(allocationsAdapterFactoryItemProvider);
+
+ requirementsAdapterFactoryItemProvider = new RequirementsItemProviderAdapterFactory();
+ adapterFactoryRegistry.add(requirementsAdapterFactoryItemProvider);
+
+ /**
+ * AdapterFactories for the ABSTRACTION elements
+ */
+ adapterFactoryRegistryMap.put(UMLPackage.Literals.ABSTRACTION, new ArrayList<AdapterFactory>(Collections.singletonList(requirementsAdapterFactoryItemProvider)));
+
+ adapterFactoryRegistryMap.get(UMLPackage.Literals.ABSTRACTION).add(allocationsAdapterFactoryItemProvider);
+
+ /**
+ * AdapterFactories for the ACTIVITY_EDGE elements
+ */
+ adapterFactoryRegistryMap.put(UMLPackage.Literals.ACTIVITY_EDGE, new ArrayList<AdapterFactory>(Collections.singletonList(activitiesAdapterFactoryItemProvider)));
+
+ /**
+ * AdapterFactories for the ACTIVITY_PARTITION elements
+ */
+ adapterFactoryRegistryMap.put(UMLPackage.Literals.ACTIVITY_PARTITION, new ArrayList<AdapterFactory>(Collections.singletonList(allocationsAdapterFactoryItemProvider)));
+
+ /**
+ * AdapterFactories for the BEHAVIOR elements
+ */
+ adapterFactoryRegistryMap.put(UMLPackage.Literals.BEHAVIOR, new ArrayList<AdapterFactory>(Collections.singletonList(requirementsAdapterFactoryItemProvider)));
+
+ adapterFactoryRegistryMap.get(UMLPackage.Literals.BEHAVIOR).add(activitiesAdapterFactoryItemProvider);
+
+ /**
+ * AdapterFactories for the CLASS elements
+ */
+ adapterFactoryRegistryMap.put(UMLPackage.Literals.CLASS, new ArrayList<AdapterFactory>(Collections.singletonList(requirementsAdapterFactoryItemProvider)));
+
+ adapterFactoryRegistryMap.get(UMLPackage.Literals.CLASS).add(modelelementsAdapterFactoryItemProvider);
+
+ adapterFactoryRegistryMap.get(UMLPackage.Literals.CLASS).add(constraintsAdapterFactoryItemProvider);
+
+ adapterFactoryRegistryMap.get(UMLPackage.Literals.CLASS).add(blocksAdapterFactoryItemProvider);
+
+ /**
+ * AdapterFactories for the CLASSIFIER elements
+ */
+ adapterFactoryRegistryMap.put(UMLPackage.Literals.CLASSIFIER, new ArrayList<AdapterFactory>(Collections.singletonList(blocksAdapterFactoryItemProvider)));
+
+ /**
+ * AdapterFactories for the COMMENT elements
+ */
+ adapterFactoryRegistryMap.put(UMLPackage.Literals.COMMENT, new ArrayList<AdapterFactory>(Collections.singletonList(modelelementsAdapterFactoryItemProvider)));
+
+ /**
+ * AdapterFactories for the CONNECTOR elements
+ */
+ adapterFactoryRegistryMap.put(UMLPackage.Literals.CONNECTOR, new ArrayList<AdapterFactory>(Collections.singletonList(blocksAdapterFactoryItemProvider)));
+
+ /**
+ * AdapterFactories for the CONNECTOR_END elements
+ */
+ adapterFactoryRegistryMap.put(UMLPackage.Literals.CONNECTOR_END, new ArrayList<AdapterFactory>(Collections.singletonList(blocksAdapterFactoryItemProvider)));
+
+ /**
+ * AdapterFactories for the DATA_TYPE elements
+ */
+ adapterFactoryRegistryMap.put(UMLPackage.Literals.DATA_TYPE, new ArrayList<AdapterFactory>(Collections.singletonList(blocksAdapterFactoryItemProvider)));
+
+ /**
+ * AdapterFactories for the DEPENDENCY elements
+ */
+ adapterFactoryRegistryMap.put(UMLPackage.Literals.DEPENDENCY, new ArrayList<AdapterFactory>(Collections.singletonList(modelelementsAdapterFactoryItemProvider)));
+
+ /**
+ * AdapterFactories for the INFORMATION_FLOW elements
+ */
+ adapterFactoryRegistryMap.put(UMLPackage.Literals.INFORMATION_FLOW, new ArrayList<AdapterFactory>(Collections.singletonList(portandflowsAdapterFactoryItemProvider)));
+
+ /**
+ * AdapterFactories for the INSTANCE_SPECIFICATION elements
+ */
+ adapterFactoryRegistryMap.put(UMLPackage.Literals.INSTANCE_SPECIFICATION, new ArrayList<AdapterFactory>(Collections.singletonList(blocksAdapterFactoryItemProvider)));
+
+ /**
+ * AdapterFactories for the INTERFACE elements
+ */
+ adapterFactoryRegistryMap.put(UMLPackage.Literals.INTERFACE, new ArrayList<AdapterFactory>(Collections.singletonList(portandflowsAdapterFactoryItemProvider)));
+
+ /**
+ * AdapterFactories for the NAMED_ELEMENT elements
+ */
+ adapterFactoryRegistryMap.put(UMLPackage.Literals.NAMED_ELEMENT, new ArrayList<AdapterFactory>(Collections.singletonList(requirementsAdapterFactoryItemProvider)));
+
+ adapterFactoryRegistryMap.get(UMLPackage.Literals.NAMED_ELEMENT).add(allocationsAdapterFactoryItemProvider);
+
+ /**
+ * AdapterFactories for the OBJECT_NODE elements
+ */
+ adapterFactoryRegistryMap.put(UMLPackage.Literals.OBJECT_NODE, new ArrayList<AdapterFactory>(Collections.singletonList(activitiesAdapterFactoryItemProvider)));
+
+ /**
+ * AdapterFactories for the OPERATION elements
+ */
+ adapterFactoryRegistryMap.put(UMLPackage.Literals.OPERATION, new ArrayList<AdapterFactory>(Collections.singletonList(requirementsAdapterFactoryItemProvider)));
+
+ adapterFactoryRegistryMap.get(UMLPackage.Literals.OPERATION).add(activitiesAdapterFactoryItemProvider);
+
+ /**
+ * AdapterFactories for the PACKAGE elements
+ */
+ adapterFactoryRegistryMap.put(UMLPackage.Literals.PACKAGE, new ArrayList<AdapterFactory>(Collections.singletonList(modelelementsAdapterFactoryItemProvider)));
+
+ /**
+ * AdapterFactories for the PARAMETER elements
+ */
+ adapterFactoryRegistryMap.put(UMLPackage.Literals.PARAMETER, new ArrayList<AdapterFactory>(Collections.singletonList(activitiesAdapterFactoryItemProvider)));
+
+ /**
+ * AdapterFactories for the PARAMETER_SET elements
+ */
+ adapterFactoryRegistryMap.put(UMLPackage.Literals.PARAMETER_SET, new ArrayList<AdapterFactory>(Collections.singletonList(activitiesAdapterFactoryItemProvider)));
+
+ /**
+ * AdapterFactories for the PORT elements
+ */
+ adapterFactoryRegistryMap.put(UMLPackage.Literals.PORT, new ArrayList<AdapterFactory>(Collections.singletonList(portandflowsAdapterFactoryItemProvider)));
+
+ /**
+ * AdapterFactories for the PROPERTY elements
+ */
+ adapterFactoryRegistryMap.put(UMLPackage.Literals.PROPERTY, new ArrayList<AdapterFactory>(Collections.singletonList(portandflowsAdapterFactoryItemProvider)));
+
+ adapterFactoryRegistryMap.get(UMLPackage.Literals.PROPERTY).add(constraintsAdapterFactoryItemProvider);
+
+ adapterFactoryRegistryMap.get(UMLPackage.Literals.PROPERTY).add(blocksAdapterFactoryItemProvider);
+
+ }
+
+ /**
+ * Singleton holder
+ *
+ * @generated
+ */
+ private static class SingletonHolder {
+
+ protected static SysmlRegistryAdapterFactoryRegistry instance = null;
+ static {
+ instance = new SysmlRegistryAdapterFactoryRegistry();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public static SysmlRegistryAdapterFactoryRegistry getSingleton() {
+ return SingletonHolder.instance;
+ }
+
+ /**
+ * Get the default AdapterFactory
+ *
+ * @return List<AdapterFactory> return the default adapter factory (UML)
+ * @generated
+ */
+ public AdapterFactory getDefaultAdapterFactory() {
+ return defaultAdapterFactory;
+ }
+
+ /**
+ * Get the list of all AdapterFactory for this type
+ *
+ * @param Object
+ * element
+ * @return List<AdapterFactory> List of all the adapter factories which can handle the object element
+ * @generated
+ */
+ public List<AdapterFactory> getAdapterFactoriesForType(Object element) {
+ if (element instanceof EObject) {
+ EObject eObject = (EObject) element;
+ ArrayList<AdapterFactory> result = adapterFactoryRegistryMap.get(eObject.eClass());
+ if (result != null) {
+ return result;
+ } else {
+ return Collections.singletonList(getDefaultAdapterFactory());
+ }
+ } else {
+ throw new RuntimeException("org.eclipse.papyrus.sysml.edit.utils.SysmlRegistryAdapterFactoryRegistery : This factory only works with EOBjects");
+ }
+ }
+
+ /**
+ * Set the the root AdapterFactory for all registered adapter factory
+ *
+ * @param AdapterFactory
+ * The adapter factory which will be the root
+ * @generated
+ */
+ public void setRootAdapterFactory(IRootAdapterFactory adapter) {
+ for (AdapterFactory adap : adapterFactoryRegistry) {
+ if (adap instanceof IComposableAdapterFactory) {
+ ((IComposableAdapterFactory) adap).setRootAdapterFactory(adapter);
+ }
+ }
+ }
+
+ /**
+ * Get a map of all UML ItemProvider needed
+ *
+ * @generated
+ */
+ public HashMap<EClass, ItemProviderAdapter> getUMLItemProviderClassifedByUMLElement(AdapterFactory rootAdapterFactory) {
+ HashMap<EClass, ItemProviderAdapter> result = new HashMap<EClass, ItemProviderAdapter>();
+
+ result.put(UMLPackage.Literals.INSTANCE_SPECIFICATION, new InstanceSpecificationItemProvider(rootAdapterFactory));
+
+ result.put(UMLPackage.Literals.CONNECTOR_END, new ConnectorEndItemProvider(rootAdapterFactory));
+
+ result.put(UMLPackage.Literals.OPERATION, new OperationItemProvider(rootAdapterFactory));
+
+ result.put(UMLPackage.Literals.DEPENDENCY, new DependencyItemProvider(rootAdapterFactory));
+
+ result.put(UMLPackage.Literals.OBJECT_NODE, new ObjectNodeItemProvider(rootAdapterFactory));
+
+ result.put(UMLPackage.Literals.DATA_TYPE, new DataTypeItemProvider(rootAdapterFactory));
+
+ result.put(UMLPackage.Literals.PROPERTY, new PropertyItemProvider(rootAdapterFactory));
+
+ result.put(UMLPackage.Literals.BEHAVIOR, new BehaviorItemProvider(rootAdapterFactory));
+
+ result.put(UMLPackage.Literals.COMMENT, new CommentItemProvider(rootAdapterFactory));
+
+ result.put(UMLPackage.Literals.INTERFACE, new InterfaceItemProvider(rootAdapterFactory));
+
+ result.put(UMLPackage.Literals.ABSTRACTION, new AbstractionItemProvider(rootAdapterFactory));
+
+ result.put(UMLPackage.Literals.ACTIVITY_PARTITION, new ActivityPartitionItemProvider(rootAdapterFactory));
+
+ result.put(UMLPackage.Literals.CONNECTOR, new ConnectorItemProvider(rootAdapterFactory));
+
+ result.put(UMLPackage.Literals.PARAMETER_SET, new ParameterSetItemProvider(rootAdapterFactory));
+
+ result.put(UMLPackage.Literals.ACTIVITY_EDGE, new ActivityEdgeItemProvider(rootAdapterFactory));
+
+ result.put(UMLPackage.Literals.CLASSIFIER, new ClassifierItemProvider(rootAdapterFactory));
+
+ result.put(UMLPackage.Literals.NAMED_ELEMENT, new NamedElementItemProvider(rootAdapterFactory));
+
+ result.put(UMLPackage.Literals.PARAMETER, new ParameterItemProvider(rootAdapterFactory));
+
+ result.put(UMLPackage.Literals.PORT, new PortItemProvider(rootAdapterFactory));
+
+ result.put(UMLPackage.Literals.INFORMATION_FLOW, new InformationFlowItemProvider(rootAdapterFactory));
+
+ result.put(UMLPackage.Literals.CLASS, new ClassItemProvider(rootAdapterFactory));
+
+ result.put(UMLPackage.Literals.PACKAGE, new PackageItemProvider(rootAdapterFactory));
+
+ return result;
+ }
+
+} // org.eclipse.papyrus.sysml.registry;
+
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/requirements/provider/CopyItemProvider.java b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/requirements/provider/CopyItemProvider.java
new file mode 100755
index 0000000..c5d9d92
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/requirements/provider/CopyItemProvider.java
@@ -0,0 +1,169 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.requirements.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.ComposedImage;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.papyrus.sysml.provider.SysmlEditPlugin;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.edit.UMLEditPlugin;
+import org.eclipse.uml2.uml.profile.standard.StandardPackage;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.sysml.requirements.Copy} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class CopyItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
+
+{
+
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public CopyItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addBase_AbstractionPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Base Abstraction feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addBase_AbstractionPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Trace_base_Abstraction_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Trace_base_Abstraction_feature", "_UI_Trace_type"), StandardPackage.Literals.TRACE__BASE_ABSTRACTION, true, false, true, null, null, null));
+ }
+
+ /**
+ * This returns Copy.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Copy"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ return getString("_UI_Copy_type");
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return SysmlEditPlugin.INSTANCE;
+ }
+
+ /**
+ * Compose the image with specific visibility logo
+ * Copied from UML implementation
+ *
+ * @param object
+ * @param composedImage
+ * @return {@link ComposedImage}
+ */
+ public ComposedImage composeVisibilityImage(Object object, ComposedImage composedImage) {
+ NamedElement namedElement = (NamedElement) object;
+
+ if (namedElement.isSetVisibility()) {
+ composedImage.getImages().add(UMLEditPlugin.INSTANCE.getImage("full/ovr16/VisibilityKind_" //$NON-NLS-1$
+ + namedElement.getVisibility().getName()));
+ }
+
+ return composedImage;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/requirements/provider/DeriveReqtItemProvider.java b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/requirements/provider/DeriveReqtItemProvider.java
new file mode 100755
index 0000000..2708b25
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/requirements/provider/DeriveReqtItemProvider.java
@@ -0,0 +1,169 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.requirements.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.ComposedImage;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.papyrus.sysml.provider.SysmlEditPlugin;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.edit.UMLEditPlugin;
+import org.eclipse.uml2.uml.profile.standard.StandardPackage;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.sysml.requirements.DeriveReqt} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class DeriveReqtItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
+
+{
+
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public DeriveReqtItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addBase_AbstractionPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Base Abstraction feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addBase_AbstractionPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Trace_base_Abstraction_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Trace_base_Abstraction_feature", "_UI_Trace_type"), StandardPackage.Literals.TRACE__BASE_ABSTRACTION, true, false, true, null, null, null));
+ }
+
+ /**
+ * This returns DeriveReqt.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/DeriveReqt"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ return getString("_UI_DeriveReqt_type");
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return SysmlEditPlugin.INSTANCE;
+ }
+
+ /**
+ * Compose the image with specific visibility logo
+ * Copied from UML implementation
+ *
+ * @param object
+ * @param composedImage
+ * @return {@link ComposedImage}
+ */
+ public ComposedImage composeVisibilityImage(Object object, ComposedImage composedImage) {
+ NamedElement namedElement = (NamedElement) object;
+
+ if (namedElement.isSetVisibility()) {
+ composedImage.getImages().add(UMLEditPlugin.INSTANCE.getImage("full/ovr16/VisibilityKind_" //$NON-NLS-1$
+ + namedElement.getVisibility().getName()));
+ }
+
+ return composedImage;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/requirements/provider/RequirementItemProvider.java b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/requirements/provider/RequirementItemProvider.java
new file mode 100755
index 0000000..3eade41
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/requirements/provider/RequirementItemProvider.java
@@ -0,0 +1,275 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.requirements.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+import org.eclipse.papyrus.sysml.provider.SysmlEditPlugin;
+import org.eclipse.papyrus.sysml.requirements.Requirement;
+import org.eclipse.papyrus.sysml.requirements.RequirementsPackage;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.sysml.requirements.Requirement} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class RequirementItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
+
+{
+
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public RequirementItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addTextPropertyDescriptor(object);
+ addIdPropertyDescriptor(object);
+ addDerivedPropertyDescriptor(object);
+ addDerivedFromPropertyDescriptor(object);
+ addSatisfiedByPropertyDescriptor(object);
+ addRefinedByPropertyDescriptor(object);
+ addTracedToPropertyDescriptor(object);
+ addVerifiedByPropertyDescriptor(object);
+ addMasterPropertyDescriptor(object);
+ addBase_ClassPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Text feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addTextPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Requirement_text_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Requirement_text_feature", "_UI_Requirement_type"), RequirementsPackage.Literals.REQUIREMENT__TEXT, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Id feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addIdPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Requirement_id_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Requirement_id_feature", "_UI_Requirement_type"), RequirementsPackage.Literals.REQUIREMENT__ID, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Derived feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addDerivedPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Requirement_derived_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Requirement_derived_feature", "_UI_Requirement_type"), RequirementsPackage.Literals.REQUIREMENT__DERIVED, false, false, false, null, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Derived From feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addDerivedFromPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Requirement_derivedFrom_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Requirement_derivedFrom_feature", "_UI_Requirement_type"), RequirementsPackage.Literals.REQUIREMENT__DERIVED_FROM, false, false, false, null, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Satisfied By feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addSatisfiedByPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Requirement_satisfiedBy_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Requirement_satisfiedBy_feature", "_UI_Requirement_type"), RequirementsPackage.Literals.REQUIREMENT__SATISFIED_BY, false, false, false, null, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Refined By feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addRefinedByPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Requirement_refinedBy_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Requirement_refinedBy_feature", "_UI_Requirement_type"), RequirementsPackage.Literals.REQUIREMENT__REFINED_BY, false, false, false, null, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Traced To feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addTracedToPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Requirement_tracedTo_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Requirement_tracedTo_feature", "_UI_Requirement_type"), RequirementsPackage.Literals.REQUIREMENT__TRACED_TO, false, false, false, null, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Verified By feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addVerifiedByPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Requirement_verifiedBy_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Requirement_verifiedBy_feature", "_UI_Requirement_type"), RequirementsPackage.Literals.REQUIREMENT__VERIFIED_BY, false, false, false, null, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Master feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addMasterPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Requirement_master_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Requirement_master_feature", "_UI_Requirement_type"), RequirementsPackage.Literals.REQUIREMENT__MASTER, false, false, false, null, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Base Class feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addBase_ClassPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Requirement_base_Class_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Requirement_base_Class_feature", "_UI_Requirement_type"), RequirementsPackage.Literals.REQUIREMENT__BASE_CLASS, true, false, true, null, null, null));
+ }
+
+ /**
+ * This returns Requirement.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Requirement"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((Requirement) object).getId();
+ return label == null || label.length() == 0 ? getString("_UI_Requirement_type") : getString("_UI_Requirement_type") + " " + label;
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(Requirement.class)) {
+ case RequirementsPackage.REQUIREMENT__TEXT:
+ case RequirementsPackage.REQUIREMENT__ID:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return SysmlEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/requirements/provider/RequirementRelatedItemProvider.java b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/requirements/provider/RequirementRelatedItemProvider.java
new file mode 100755
index 0000000..a8690e1
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/requirements/provider/RequirementRelatedItemProvider.java
@@ -0,0 +1,199 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.requirements.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.papyrus.sysml.provider.SysmlEditPlugin;
+import org.eclipse.papyrus.sysml.requirements.RequirementsPackage;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.sysml.requirements.RequirementRelated} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class RequirementRelatedItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
+
+{
+
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public RequirementRelatedItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addBase_NamedElementPropertyDescriptor(object);
+ addTracedFromPropertyDescriptor(object);
+ addSatisfiesPropertyDescriptor(object);
+ addRefinesPropertyDescriptor(object);
+ addVerifiesPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Base Named Element feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addBase_NamedElementPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_RequirementRelated_base_NamedElement_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_RequirementRelated_base_NamedElement_feature", "_UI_RequirementRelated_type"), RequirementsPackage.Literals.REQUIREMENT_RELATED__BASE_NAMED_ELEMENT, true, false, true, null, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Traced From feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addTracedFromPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_RequirementRelated_tracedFrom_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_RequirementRelated_tracedFrom_feature", "_UI_RequirementRelated_type"), RequirementsPackage.Literals.REQUIREMENT_RELATED__TRACED_FROM, false, false, false, null, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Satisfies feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addSatisfiesPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_RequirementRelated_satisfies_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_RequirementRelated_satisfies_feature", "_UI_RequirementRelated_type"), RequirementsPackage.Literals.REQUIREMENT_RELATED__SATISFIES, false, false, false, null, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Refines feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addRefinesPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_RequirementRelated_refines_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_RequirementRelated_refines_feature", "_UI_RequirementRelated_type"), RequirementsPackage.Literals.REQUIREMENT_RELATED__REFINES, false, false, false, null, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Verifies feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addVerifiesPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_RequirementRelated_verifies_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_RequirementRelated_verifies_feature", "_UI_RequirementRelated_type"), RequirementsPackage.Literals.REQUIREMENT_RELATED__VERIFIES, false, false, false, null, null, null));
+ }
+
+ /**
+ * This returns RequirementRelated.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/RequirementRelated"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ return getString("_UI_RequirementRelated_type");
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return SysmlEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/requirements/provider/RequirementsItemProviderAdapterFactory.java b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/requirements/provider/RequirementsItemProviderAdapterFactory.java
new file mode 100755
index 0000000..5ae74a2
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/requirements/provider/RequirementsItemProviderAdapterFactory.java
@@ -0,0 +1,376 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.requirements.provider;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.Notifier;
+import org.eclipse.emf.edit.provider.ChangeNotifier;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.IChangeNotifier;
+import org.eclipse.emf.edit.provider.IDisposable;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.INotifyChangedListener;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.papyrus.sysml.requirements.util.RequirementsAdapterFactory;
+
+/**
+ * This is the factory that is used to provide the interfaces needed to support Viewers.
+ * The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}.
+ * The adapters also support Eclipse property sheets.
+ * Note that most of the adapters are shared among multiple instances.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+public class RequirementsItemProviderAdapterFactory extends RequirementsAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable {
+
+ /**
+ * This keeps track of the root adapter factory that delegates to this adapter factory.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ComposedAdapterFactory parentAdapterFactory;
+
+ /**
+ * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected IChangeNotifier changeNotifier = new ChangeNotifier();
+
+ /**
+ * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ protected Collection<Object> supportedTypes = new ArrayList<Object>();
+
+ /**
+ * This constructs an instance. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ public RequirementsItemProviderAdapterFactory() {
+ supportedTypes.add(IEditingDomainItemProvider.class);
+ supportedTypes.add(IStructuredItemContentProvider.class);
+ supportedTypes.add(ITreeItemContentProvider.class);
+ supportedTypes.add(IItemLabelProvider.class);
+ supportedTypes.add(IItemPropertySource.class);
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.sysml.requirements.DeriveReqt} instances. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected DeriveReqtItemProvider deriveReqtItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.sysml.requirements.DeriveReqt}. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createDeriveReqtAdapter() {
+ if (deriveReqtItemProvider == null) {
+ deriveReqtItemProvider = new DeriveReqtItemProvider(this);
+ }
+
+ return deriveReqtItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.sysml.requirements.Verify} instances. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected VerifyItemProvider verifyItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.sysml.requirements.Verify}. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createVerifyAdapter() {
+ if (verifyItemProvider == null) {
+ verifyItemProvider = new VerifyItemProvider(this);
+ }
+
+ return verifyItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.sysml.requirements.Copy} instances. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected CopyItemProvider copyItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.sysml.requirements.Copy}.
+ * <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createCopyAdapter() {
+ if (copyItemProvider == null) {
+ copyItemProvider = new CopyItemProvider(this);
+ }
+
+ return copyItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.sysml.requirements.Satisfy} instances. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected SatisfyItemProvider satisfyItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.sysml.requirements.Satisfy}. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createSatisfyAdapter() {
+ if (satisfyItemProvider == null) {
+ satisfyItemProvider = new SatisfyItemProvider(this);
+ }
+
+ return satisfyItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.sysml.requirements.TestCase} instances. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected TestCaseItemProvider testCaseItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.sysml.requirements.TestCase}. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createTestCaseAdapter() {
+ if (testCaseItemProvider == null) {
+ testCaseItemProvider = new TestCaseItemProvider(this);
+ }
+
+ return testCaseItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.sysml.requirements.Requirement} instances.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected RequirementItemProvider requirementItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.sysml.requirements.Requirement}. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createRequirementAdapter() {
+ if (requirementItemProvider == null) {
+ requirementItemProvider = new RequirementItemProvider(this);
+ }
+
+ return requirementItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.sysml.requirements.RequirementRelated} instances. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected RequirementRelatedItemProvider requirementRelatedItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.sysml.requirements.RequirementRelated}. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createRequirementRelatedAdapter() {
+ if (requirementRelatedItemProvider == null) {
+ requirementRelatedItemProvider = new RequirementRelatedItemProvider(this);
+ }
+
+ return requirementRelatedItemProvider;
+ }
+
+ /**
+ * This returns the root adapter factory that contains this factory. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ComposeableAdapterFactory getRootAdapterFactory() {
+ return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
+ }
+
+ /**
+ * This sets the composed adapter factory that contains this factory. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) {
+ this.parentAdapterFactory = parentAdapterFactory;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object type) {
+ return supportedTypes.contains(type) || super.isFactoryForType(type);
+ }
+
+ /**
+ * This implementation substitutes the factory itself as the key for the adapter.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter adapt(Notifier notifier, Object type) {
+ return super.adapt(notifier, this);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object adapt(Object object, Object type) {
+ if (isFactoryForType(type)) {
+ Object adapter = super.adapt(object, type);
+ if (!(type instanceof Class<?>) || (((Class<?>) type).isInstance(adapter))) {
+ return adapter;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * This adds a listener.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void addListener(INotifyChangedListener notifyChangedListener) {
+ changeNotifier.addListener(notifyChangedListener);
+ }
+
+ /**
+ * This removes a listener.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void removeListener(INotifyChangedListener notifyChangedListener) {
+ changeNotifier.removeListener(notifyChangedListener);
+ }
+
+ /**
+ * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ @Override
+ public void fireNotifyChanged(Notification notification) {
+ changeNotifier.fireNotifyChanged(notification);
+
+ if (parentAdapterFactory != null) {
+ parentAdapterFactory.fireNotifyChanged(notification);
+ }
+ }
+
+ /**
+ * This disposes all of the item providers created by this factory. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void dispose() {
+ if (deriveReqtItemProvider != null) {
+ deriveReqtItemProvider.dispose();
+ }
+ if (verifyItemProvider != null) {
+ verifyItemProvider.dispose();
+ }
+ if (copyItemProvider != null) {
+ copyItemProvider.dispose();
+ }
+ if (satisfyItemProvider != null) {
+ satisfyItemProvider.dispose();
+ }
+ if (testCaseItemProvider != null) {
+ testCaseItemProvider.dispose();
+ }
+ if (requirementItemProvider != null) {
+ requirementItemProvider.dispose();
+ }
+ if (requirementRelatedItemProvider != null) {
+ requirementRelatedItemProvider.dispose();
+ }
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/requirements/provider/SatisfyItemProvider.java b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/requirements/provider/SatisfyItemProvider.java
new file mode 100755
index 0000000..dbc3c48
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/requirements/provider/SatisfyItemProvider.java
@@ -0,0 +1,169 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.requirements.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.ComposedImage;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.papyrus.sysml.provider.SysmlEditPlugin;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.edit.UMLEditPlugin;
+import org.eclipse.uml2.uml.profile.standard.StandardPackage;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.sysml.requirements.Satisfy} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class SatisfyItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
+
+{
+
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public SatisfyItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addBase_AbstractionPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Base Abstraction feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addBase_AbstractionPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Trace_base_Abstraction_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Trace_base_Abstraction_feature", "_UI_Trace_type"), StandardPackage.Literals.TRACE__BASE_ABSTRACTION, true, false, true, null, null, null));
+ }
+
+ /**
+ * This returns Satisfy.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Satisfy"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ return getString("_UI_Satisfy_type");
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return SysmlEditPlugin.INSTANCE;
+ }
+
+ /**
+ * Compose the image with specific visibility logo
+ * Copied from UML implementation
+ *
+ * @param object
+ * @param composedImage
+ * @return {@link ComposedImage}
+ */
+ public ComposedImage composeVisibilityImage(Object object, ComposedImage composedImage) {
+ NamedElement namedElement = (NamedElement) object;
+
+ if (namedElement.isSetVisibility()) {
+ composedImage.getImages().add(UMLEditPlugin.INSTANCE.getImage("full/ovr16/VisibilityKind_" //$NON-NLS-1$
+ + namedElement.getVisibility().getName()));
+ }
+
+ return composedImage;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/requirements/provider/TestCaseItemProvider.java b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/requirements/provider/TestCaseItemProvider.java
new file mode 100755
index 0000000..6483831
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/requirements/provider/TestCaseItemProvider.java
@@ -0,0 +1,173 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.requirements.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.papyrus.sysml.provider.SysmlEditPlugin;
+import org.eclipse.papyrus.sysml.requirements.RequirementsPackage;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.sysml.requirements.TestCase} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class TestCaseItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
+
+{
+
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public TestCaseItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addBase_BehaviorPropertyDescriptor(object);
+ addBase_OperationPropertyDescriptor(object);
+ addVerifiesPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Base Behavior feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addBase_BehaviorPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_TestCase_base_Behavior_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_TestCase_base_Behavior_feature", "_UI_TestCase_type"), RequirementsPackage.Literals.TEST_CASE__BASE_BEHAVIOR, true, false, true, null, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Base Operation feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addBase_OperationPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_TestCase_base_Operation_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_TestCase_base_Operation_feature", "_UI_TestCase_type"), RequirementsPackage.Literals.TEST_CASE__BASE_OPERATION, true, false, true, null, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Verifies feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addVerifiesPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_TestCase_verifies_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_TestCase_verifies_feature", "_UI_TestCase_type"), RequirementsPackage.Literals.TEST_CASE__VERIFIES, false, false, false, null, null, null));
+ }
+
+ /**
+ * This returns TestCase.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/TestCase"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ return getString("_UI_TestCase_type");
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return SysmlEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/requirements/provider/VerifyItemProvider.java b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/requirements/provider/VerifyItemProvider.java
new file mode 100755
index 0000000..0eb0376
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/requirements/provider/VerifyItemProvider.java
@@ -0,0 +1,169 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.requirements.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.ComposedImage;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.papyrus.sysml.provider.SysmlEditPlugin;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.edit.UMLEditPlugin;
+import org.eclipse.uml2.uml.profile.standard.StandardPackage;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.sysml.requirements.Verify} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class VerifyItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
+
+{
+
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public VerifyItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addBase_AbstractionPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Base Abstraction feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addBase_AbstractionPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Trace_base_Abstraction_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Trace_base_Abstraction_feature", "_UI_Trace_type"), StandardPackage.Literals.TRACE__BASE_ABSTRACTION, true, false, true, null, null, null));
+ }
+
+ /**
+ * This returns Verify.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Verify"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ return getString("_UI_Verify_type");
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return SysmlEditPlugin.INSTANCE;
+ }
+
+ /**
+ * Compose the image with specific visibility logo
+ * Copied from UML implementation
+ *
+ * @param object
+ * @param composedImage
+ * @return {@link ComposedImage}
+ */
+ public ComposedImage composeVisibilityImage(Object object, ComposedImage composedImage) {
+ NamedElement namedElement = (NamedElement) object;
+
+ if (namedElement.isSetVisibility()) {
+ composedImage.getImages().add(UMLEditPlugin.INSTANCE.getImage("full/ovr16/VisibilityKind_" //$NON-NLS-1$
+ + namedElement.getVisibility().getName()));
+ }
+
+ return composedImage;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/.classpath b/plugins/org.eclipse.papyrus.sysml.service.types/.classpath
new file mode 100755
index 0000000..59cf397
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/.classpath
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="src-gen"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/.gitignore b/plugins/org.eclipse.papyrus.sysml.service.types/.gitignore
new file mode 100755
index 0000000..bca9b39
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/.gitignore
@@ -0,0 +1,3 @@
+/bin
+/bin
+/bin
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/.project b/plugins/org.eclipse.papyrus.sysml.service.types/.project
new file mode 100755
index 0000000..99bce0a
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/.project
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.sysml.service.types</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>
+ <buildCommand>
+ <name>org.eclipse.oomph.version.VersionBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>check.maven.pom</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>ignore.lower.bound.dependency.ranges</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>release.path</key>
+ <value>/org.eclipse.papyrus.releng.main.release/release.xml</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.oomph.version.VersionNature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.papyrus.sysml.service.types/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 0000000..648568a
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,304 @@
+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.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=disabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=error
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=error
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
+org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/.settings/org.eclipse.jdt.ui.prefs b/plugins/org.eclipse.papyrus.sysml.service.types/.settings/org.eclipse.jdt.ui.prefs
new file mode 100755
index 0000000..954281d
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,68 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+formatter_profile=_Papyrus
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/.settings/org.eclipse.pde.api.tools.prefs b/plugins/org.eclipse.papyrus.sysml.service.types/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100755
index 0000000..23fb95e
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/.settings/org.eclipse.pde.api.tools.prefs
@@ -0,0 +1,98 @@
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+API_USE_SCAN_FIELD_SEVERITY=Error
+API_USE_SCAN_METHOD_SEVERITY=Error
+API_USE_SCAN_TYPE_SEVERITY=Error
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Ignore
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_ANNOTATION=Ignore
+INVALID_JAVADOC_TAG=Ignore
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Ignore
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+MISSING_EE_DESCRIPTIONS=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=Enabled
+eclipse.preferences.version=1
+incompatible_api_component_version=Error
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Warning
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/META-INF/MANIFEST.MF b/plugins/org.eclipse.papyrus.sysml.service.types/META-INF/MANIFEST.MF
new file mode 100755
index 0000000..afeb006
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/META-INF/MANIFEST.MF
@@ -0,0 +1,21 @@
+Manifest-Version: 1.0
+Export-Package: org.eclipse.papyrus.sysml.service.types,
+ org.eclipse.papyrus.sysml.service.types.command,
+ org.eclipse.papyrus.sysml.service.types.element,
+ org.eclipse.papyrus.sysml.service.types.handlers,
+ org.eclipse.papyrus.sysml.service.types.helper,
+ org.eclipse.papyrus.sysml.service.types.matcher,
+ org.eclipse.papyrus.sysml.service.types.menu,
+ org.eclipse.papyrus.sysml.service.types.utils
+Require-Bundle: org.eclipse.papyrus.sysml;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.papyrus.uml.service.types.ui;bundle-version="[2.0.0,3.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.uml.internationalization.utils;bundle-version="[1.0.0,2.0.0)"
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 2.0.0.qualifier
+Bundle-Localization: plugin
+Bundle-Name: %pluginName
+Bundle-Activator: org.eclipse.papyrus.sysml.service.types.Activator
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.papyrus.sysml.service.types;singleton:=true
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/about.html b/plugins/org.eclipse.papyrus.sysml.service.types/about.html
new file mode 100755
index 0000000..d35d5ae
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/build.properties b/plugins/org.eclipse.papyrus.sysml.service.types/build.properties
new file mode 100755
index 0000000..6f116be
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/build.properties
@@ -0,0 +1,12 @@
+bin.includes = META-INF/,\
+ .,\
+ plugin.properties,\
+ about.html,\
+ plugin.xml,\
+ about.html,\
+ model/
+output..=bin/
+src.includes = about.html
+source..=src/,src-gen/
+bin..=bin/
+bin.excludes = model/ElementTypeModelForSySML.domaincontextcodegen
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/model/ElementTypeModelForSySML.domaincontextcodegen b/plugins/org.eclipse.papyrus.sysml.service.types/model/ElementTypeModelForSySML.domaincontextcodegen
new file mode 100755
index 0000000..4c24909
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/model/ElementTypeModelForSySML.domaincontextcodegen
@@ -0,0 +1,150 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<domaincontextcodegen:DomainContext xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:domaincontextcodegen="http://www.eclipse.org/papyrus/2010/domaincontextcodegen" typeProjectName="org.eclipse.papyrus.sysml.service.types" handlerProjectName="org.eclipse.papyrus.sysml.modelexplorer" IClientContextID="" elementTypeIDPrefix="org.eclipse.papyrus.sysml" elementTypeNamePrefix="SysML" defaultHelperPath="" generatedSourceFolder="src-gen">
+ <metamodel href="../../../plugin/org.eclipse.uml2.uml/model/UML.ecore#/"/>
+ <specializationOf href="../../org.eclipse.papyrus.uml.service.types/model/ElementTypeModelForUML.domaincontextcodegen#/"/>
+ <elementTypes>
+ <types xsi:type="domaincontextcodegen:SpecializationType" name="Allocate" helper="org.eclipse.papyrus.sysml.service.types.helper.AllocateEditHelperAdvice" matcher="org.eclipse.papyrus.sysml.service.types.matcher.AllocateMatcher">
+ <ref xsi:type="domaincontextcodegen:MetaClassType" href="../../org.eclipse.papyrus.uml.service.types/model/ElementTypeModelForUML.domaincontextcodegen#//@elementTypes/@types.0"/>
+ </types>
+ <types xsi:type="domaincontextcodegen:SpecializationType" name="Association" helper="org.eclipse.papyrus.sysml.service.types.helper.advice.AssociationEditHelperAdvice" matcher="org.eclipse.papyrus.sysml.service.types.matcher.AssociationMatcher">
+ <ref xsi:type="domaincontextcodegen:MetaClassType" href="../../org.eclipse.papyrus.uml.service.types/model/ElementTypeModelForUML.domaincontextcodegen#//@elementTypes/@types.18"/>
+ </types>
+ <types xsi:type="domaincontextcodegen:SpecializationType" name="AssociationComposite" helper="org.eclipse.papyrus.sysml.service.types.helper.advice.AssociationCompositeEditHelperAdvice" ref="//@elementTypes/@types.1" matcher="org.eclipse.papyrus.sysml.service.types.matcher.NoMatcher"/>
+ <types xsi:type="domaincontextcodegen:SpecializationType" name="AssociationCompositeDirected" helper="org.eclipse.papyrus.sysml.service.types.helper.advice.AssociationCompositeDirectedEditHelperAdvice" ref="//@elementTypes/@types.1" matcher="org.eclipse.papyrus.sysml.service.types.matcher.NoMatcher"/>
+ <types xsi:type="domaincontextcodegen:SpecializationType" name="AssociationNone" helper="org.eclipse.papyrus.sysml.service.types.helper.advice.AssociationNoneEditHelperAdvice" ref="//@elementTypes/@types.1" matcher="org.eclipse.papyrus.sysml.service.types.matcher.NoMatcher"/>
+ <types xsi:type="domaincontextcodegen:SpecializationType" name="AssociationNoneDirected" helper="org.eclipse.papyrus.sysml.service.types.helper.advice.AssociationNoneDirectedEditHelperAdvice" ref="//@elementTypes/@types.1" matcher="org.eclipse.papyrus.sysml.service.types.matcher.NoMatcher"/>
+ <types xsi:type="domaincontextcodegen:SpecializationType" name="AssociationShared" helper="org.eclipse.papyrus.sysml.service.types.helper.advice.AssociationSharedEditHelperAdvice" ref="//@elementTypes/@types.1" matcher="org.eclipse.papyrus.sysml.service.types.matcher.NoMatcher"/>
+ <types xsi:type="domaincontextcodegen:SpecializationType" name="AssociationSharedDirected" helper="org.eclipse.papyrus.sysml.service.types.helper.advice.AssociationSharedDirectedEditHelperAdvice" ref="//@elementTypes/@types.1" matcher="org.eclipse.papyrus.sysml.service.types.matcher.NoMatcher"/>
+ <types xsi:type="domaincontextcodegen:SpecializationType" name="Block" helper="org.eclipse.papyrus.sysml.service.types.helper.BlockEditHelperAdvice" icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/blocks/Block.gif" matcher="org.eclipse.papyrus.sysml.service.types.matcher.BlockMatcher">
+ <ref xsi:type="domaincontextcodegen:MetaClassType" href="../../org.eclipse.papyrus.uml.service.types/model/ElementTypeModelForUML.domaincontextcodegen#//@elementTypes/@types.31"/>
+ </types>
+ <types xsi:type="domaincontextcodegen:SpecializationType" name="Conform" helper="org.eclipse.papyrus.sysml.service.types.helper.ConformEditHelperAdvice" icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/modelelements/Conform.gif" matcher="org.eclipse.papyrus.sysml.service.types.matcher.ConformMatcher">
+ <ref xsi:type="domaincontextcodegen:MetaClassType" href="../../org.eclipse.papyrus.uml.service.types/model/ElementTypeModelForUML.domaincontextcodegen#//@elementTypes/@types.62"/>
+ </types>
+ <types xsi:type="domaincontextcodegen:SpecializationType" name="ConstraintBlock" helper="org.eclipse.papyrus.sysml.service.types.helper.ConstraintBlockEditHelperAdvice" icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/constraints/ConstraintBlock.gif" matcher="org.eclipse.papyrus.sysml.service.types.matcher.ConstraintBlockMatcher">
+ <ref xsi:type="domaincontextcodegen:MetaClassType" href="../../org.eclipse.papyrus.uml.service.types/model/ElementTypeModelForUML.domaincontextcodegen#//@elementTypes/@types.31"/>
+ </types>
+ <types xsi:type="domaincontextcodegen:SpecializationType" name="ConstraintProperty" helper="org.eclipse.papyrus.sysml.service.types.helper.ConstraintPropertyEditHelperAdvice" icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/constraints/ConstraintProperty.gif" matcher="org.eclipse.papyrus.sysml.service.types.matcher.ConstraintPropertyMatcher">
+ <ref xsi:type="domaincontextcodegen:MetaClassType" href="../../org.eclipse.papyrus.uml.service.types/model/ElementTypeModelForUML.domaincontextcodegen#//@elementTypes/@types.171"/>
+ </types>
+ <types xsi:type="domaincontextcodegen:SpecializationType" name="Copy" helper="org.eclipse.papyrus.sysml.service.types.helper.CopyEditHelperAdvice" icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/requirements/Copy.gif" matcher="org.eclipse.papyrus.sysml.service.types.matcher.CopyMatcher">
+ <ref xsi:type="domaincontextcodegen:MetaClassType" href="../../org.eclipse.papyrus.uml.service.types/model/ElementTypeModelForUML.domaincontextcodegen#//@elementTypes/@types.0"/>
+ </types>
+ <types xsi:type="domaincontextcodegen:SpecializationType" name="DeriveReqt" helper="org.eclipse.papyrus.sysml.service.types.helper.DeriveReqtEditHelperAdvice" icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/requirements/DeriveReqt.gif" matcher="org.eclipse.papyrus.sysml.service.types.matcher.DeriveReqtMatcher">
+ <ref xsi:type="domaincontextcodegen:MetaClassType" href="../../org.eclipse.papyrus.uml.service.types/model/ElementTypeModelForUML.domaincontextcodegen#//@elementTypes/@types.0"/>
+ </types>
+ <types xsi:type="domaincontextcodegen:SpecializationType" name="Dimension" helper="org.eclipse.papyrus.sysml.service.types.helper.DimensionEditHelperAdvice" icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/blocks/Dimension.gif" matcher="org.eclipse.papyrus.sysml.service.types.matcher.DimensionMatcher">
+ <ref xsi:type="domaincontextcodegen:MetaClassType" href="../../org.eclipse.papyrus.uml.service.types/model/ElementTypeModelForUML.domaincontextcodegen#//@elementTypes/@types.110"/>
+ </types>
+ <types xsi:type="domaincontextcodegen:SpecializationType" name="FlowPort" helper="org.eclipse.papyrus.sysml.service.types.helper.FlowPortEditHelperAdvice" icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/portandflows/FlowPort.gif" matcher="org.eclipse.papyrus.sysml.service.types.matcher.FlowPortMatcher">
+ <ref xsi:type="domaincontextcodegen:MetaClassType" href="../../org.eclipse.papyrus.uml.service.types/model/ElementTypeModelForUML.domaincontextcodegen#//@elementTypes/@types.167"/>
+ </types>
+ <types xsi:type="domaincontextcodegen:SpecializationType" name="FlowPort_InOut" helper="org.eclipse.papyrus.sysml.service.types.helper.FlowPortInOutEditHelperAdvice" icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/portandflows/FlowPort_INOUT.gif" ref="//@elementTypes/@types.15" matcher="org.eclipse.papyrus.sysml.service.types.matcher.FlowPortInOutMatcher"/>
+ <types xsi:type="domaincontextcodegen:SpecializationType" name="FlowPort_In" helper="org.eclipse.papyrus.sysml.service.types.helper.FlowPortInEditHelperAdvice" icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/portandflows/FlowPort_IN.gif" ref="//@elementTypes/@types.15" matcher="org.eclipse.papyrus.sysml.service.types.matcher.FlowPortInMatcher"/>
+ <types xsi:type="domaincontextcodegen:SpecializationType" name="FlowPort_Out" helper="org.eclipse.papyrus.sysml.service.types.helper.FlowPortOutEditHelperAdvice" icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/portandflows/FlowPort_OUT.gif" ref="//@elementTypes/@types.15" matcher="org.eclipse.papyrus.sysml.service.types.matcher.FlowPortOutMatcher"/>
+ <types xsi:type="domaincontextcodegen:SpecializationType" name="FlowPort_NA" helper="org.eclipse.papyrus.sysml.service.types.helper.FlowPortNAEditHelperAdvice" icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/portandflows/FlowPort_NA.gif" ref="//@elementTypes/@types.15" matcher="org.eclipse.papyrus.sysml.service.types.matcher.FlowPortNAMatcher"/>
+ <types xsi:type="domaincontextcodegen:SpecializationType" name="FlowProperty" helper="org.eclipse.papyrus.sysml.service.types.helper.FlowPropertyEditHelperAdvice" icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/portandflows/FlowProperty.gif" matcher="org.eclipse.papyrus.sysml.service.types.matcher.FlowPropertyMatcher">
+ <ref xsi:type="domaincontextcodegen:MetaClassType" href="../../org.eclipse.papyrus.uml.service.types/model/ElementTypeModelForUML.domaincontextcodegen#//@elementTypes/@types.171"/>
+ </types>
+ <types xsi:type="domaincontextcodegen:SpecializationType" name="FlowSpecification" helper="org.eclipse.papyrus.sysml.service.types.helper.FlowSpecificationEditHelperAdvice" icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/portandflows/FlowSpecification.gif" matcher="org.eclipse.papyrus.sysml.service.types.matcher.FlowSpecificationMatcher">
+ <ref xsi:type="domaincontextcodegen:MetaClassType" href="../../org.eclipse.papyrus.uml.service.types/model/ElementTypeModelForUML.domaincontextcodegen#//@elementTypes/@types.117"/>
+ </types>
+ <types xsi:type="domaincontextcodegen:SpecializationType" name="ItemFlow" helper="org.eclipse.papyrus.sysml.service.types.helper.ItemFlowEditHelperAdvice" icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/portandflows/ItemFlow.gif" matcher="org.eclipse.papyrus.sysml.service.types.matcher.ItemFlowMatcher">
+ <ref xsi:type="domaincontextcodegen:MetaClassType" href="../../org.eclipse.papyrus.uml.service.types/model/ElementTypeModelForUML.domaincontextcodegen#//@elementTypes/@types.106"/>
+ </types>
+ <types xsi:type="domaincontextcodegen:SpecializationType" name="PartProperty" helper="org.eclipse.papyrus.sysml.service.types.helper.PartPropertyEditHelperAdvice" icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif" matcher="org.eclipse.papyrus.sysml.service.types.matcher.PartPropertyMatcher">
+ <ref xsi:type="domaincontextcodegen:MetaClassType" href="../../org.eclipse.papyrus.uml.service.types/model/ElementTypeModelForUML.domaincontextcodegen#//@elementTypes/@types.171"/>
+ </types>
+ <types xsi:type="domaincontextcodegen:SpecializationType" name="Problem" helper="org.eclipse.papyrus.sysml.service.types.helper.ProblemEditHelperAdvice" icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/modelelements/Problem.gif" matcher="org.eclipse.papyrus.sysml.service.types.matcher.ProblemMatcher">
+ <ref xsi:type="domaincontextcodegen:MetaClassType" href="../../org.eclipse.papyrus.uml.service.types/model/ElementTypeModelForUML.domaincontextcodegen#//@elementTypes/@types.41"/>
+ </types>
+ <types xsi:type="domaincontextcodegen:SpecializationType" name="Rationale" helper="org.eclipse.papyrus.sysml.service.types.helper.RationaleEditHelperAdvice" icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/modelelements/Rationale.gif" matcher="org.eclipse.papyrus.sysml.service.types.matcher.RationaleMatcher">
+ <ref xsi:type="domaincontextcodegen:MetaClassType" href="../../org.eclipse.papyrus.uml.service.types/model/ElementTypeModelForUML.domaincontextcodegen#//@elementTypes/@types.41"/>
+ </types>
+ <types xsi:type="domaincontextcodegen:SpecializationType" name="ReferenceProperty" helper="org.eclipse.papyrus.sysml.service.types.helper.ReferencePropertyEditHelperAdvice" icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif" matcher="org.eclipse.papyrus.sysml.service.types.matcher.ReferencePropertyMatcher">
+ <ref xsi:type="domaincontextcodegen:MetaClassType" href="../../org.eclipse.papyrus.uml.service.types/model/ElementTypeModelForUML.domaincontextcodegen#//@elementTypes/@types.171"/>
+ </types>
+ <types xsi:type="domaincontextcodegen:SpecializationType" name="Requirement" helper="org.eclipse.papyrus.sysml.service.types.helper.RequirementEditHelperAdvice" icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/requirements/Requirement.gif" matcher="org.eclipse.papyrus.sysml.service.types.matcher.RequirementMatcher">
+ <ref xsi:type="domaincontextcodegen:MetaClassType" href="../../org.eclipse.papyrus.uml.service.types/model/ElementTypeModelForUML.domaincontextcodegen#//@elementTypes/@types.31"/>
+ </types>
+ <types xsi:type="domaincontextcodegen:SpecializationType" name="Satisfy" helper="org.eclipse.papyrus.sysml.service.types.helper.SatisfyEditHelperAdvice" icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/requirements/Satisfy.gif" matcher="org.eclipse.papyrus.sysml.service.types.matcher.SatisfyMatcher">
+ <ref xsi:type="domaincontextcodegen:MetaClassType" href="../../org.eclipse.papyrus.uml.service.types/model/ElementTypeModelForUML.domaincontextcodegen#//@elementTypes/@types.0"/>
+ </types>
+ <types xsi:type="domaincontextcodegen:SpecializationType" name="Unit" helper="org.eclipse.papyrus.sysml.service.types.helper.UnitEditHelperAdvice" icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/blocks/Unit.gif" matcher="org.eclipse.papyrus.sysml.service.types.matcher.UnitMatcher">
+ <ref xsi:type="domaincontextcodegen:MetaClassType" href="../../org.eclipse.papyrus.uml.service.types/model/ElementTypeModelForUML.domaincontextcodegen#//@elementTypes/@types.110"/>
+ </types>
+ <types xsi:type="domaincontextcodegen:SpecializationType" name="ValueProperty" helper="org.eclipse.papyrus.sysml.service.types.helper.ValuePropertyEditHelperAdvice" icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif" matcher="org.eclipse.papyrus.sysml.service.types.matcher.ValuePropertyMatcher">
+ <ref xsi:type="domaincontextcodegen:MetaClassType" href="../../org.eclipse.papyrus.uml.service.types/model/ElementTypeModelForUML.domaincontextcodegen#//@elementTypes/@types.171"/>
+ </types>
+ <types xsi:type="domaincontextcodegen:SpecializationType" name="ValueType" helper="org.eclipse.papyrus.sysml.service.types.helper.ValueTypeEditHelperAdvice" icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/blocks/ValueType.gif" matcher="org.eclipse.papyrus.sysml.service.types.matcher.ValueTypeMatcher">
+ <ref xsi:type="domaincontextcodegen:MetaClassType" href="../../org.eclipse.papyrus.uml.service.types/model/ElementTypeModelForUML.domaincontextcodegen#//@elementTypes/@types.60"/>
+ </types>
+ <types xsi:type="domaincontextcodegen:SpecializationType" name="ValueType_Enumeration" helper="org.eclipse.papyrus.sysml.service.types.helper.ValueTypeEditHelperAdvice" icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/blocks/ValueType.gif" matcher="org.eclipse.papyrus.sysml.service.types.matcher.ValueTypeEnumerationMatcher">
+ <ref xsi:type="domaincontextcodegen:MetaClassType" href="../../org.eclipse.papyrus.uml.service.types/model/ElementTypeModelForUML.domaincontextcodegen#//@elementTypes/@types.79"/>
+ </types>
+ <types xsi:type="domaincontextcodegen:SpecializationType" name="ValueType_PrimitiveType" helper="org.eclipse.papyrus.sysml.service.types.helper.ValueTypeEditHelperAdvice" icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/blocks/ValueType.gif" matcher="org.eclipse.papyrus.sysml.service.types.matcher.ValueTypePrimitiveTypeMatcher">
+ <ref xsi:type="domaincontextcodegen:MetaClassType" href="../../org.eclipse.papyrus.uml.service.types/model/ElementTypeModelForUML.domaincontextcodegen#//@elementTypes/@types.168"/>
+ </types>
+ <types xsi:type="domaincontextcodegen:SpecializationType" name="Verify" helper="org.eclipse.papyrus.sysml.service.types.helper.VerifyEditHelperAdvice" icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/requirements/Verify.gif" matcher="org.eclipse.papyrus.sysml.service.types.matcher.VerifyMatcher">
+ <ref xsi:type="domaincontextcodegen:MetaClassType" href="../../org.eclipse.papyrus.uml.service.types/model/ElementTypeModelForUML.domaincontextcodegen#//@elementTypes/@types.0"/>
+ </types>
+ <types xsi:type="domaincontextcodegen:SpecializationType" name="View" helper="org.eclipse.papyrus.sysml.service.types.helper.ViewEditHelperAdvice" icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/modelelements/View.gif" matcher="org.eclipse.papyrus.sysml.service.types.matcher.ViewMatcher">
+ <ref xsi:type="domaincontextcodegen:MetaClassType" href="../../org.eclipse.papyrus.uml.service.types/model/ElementTypeModelForUML.domaincontextcodegen#//@elementTypes/@types.158"/>
+ </types>
+ <types xsi:type="domaincontextcodegen:SpecializationType" name="ViewPoint" helper="org.eclipse.papyrus.sysml.service.types.helper.ViewPointEditHelperAdvice" icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/modelelements/Viewpoint.gif" matcher="org.eclipse.papyrus.sysml.service.types.matcher.ViewPointMatcher">
+ <ref xsi:type="domaincontextcodegen:MetaClassType" href="../../org.eclipse.papyrus.uml.service.types/model/ElementTypeModelForUML.domaincontextcodegen#//@elementTypes/@types.31"/>
+ </types>
+ </elementTypes>
+ <advices adviceID="org.eclipse.papyrus.sysml.advice.ConstraintBlockPropertyHelperAdvice" advicePath="org.eclipse.papyrus.sysml.service.types.helper.ConstraintBlockPropertyEditHelperAdvice" inheritance="all">
+ <ref xsi:type="domaincontextcodegen:MetaClassType" href="../../org.eclipse.papyrus.uml.service.types/model/ElementTypeModelForUML.domaincontextcodegen#//@elementTypes/@types.171"/>
+ </advices>
+ <advices adviceID="org.eclipse.papyrus.sysml.advice.Classifier" advicePath="org.eclipse.papyrus.sysml.service.types.helper.advice.ClassifierEditHelperAdvice" inheritance="all">
+ <ref xsi:type="domaincontextcodegen:MetaClassType" href="../../org.eclipse.papyrus.uml.service.types/model/ElementTypeModelForUML.domaincontextcodegen#//@elementTypes/@types.32"/>
+ </advices>
+ <advices adviceID="org.eclipse.papyrus.sysml.advice.Property" advicePath="org.eclipse.papyrus.sysml.service.types.helper.advice.PropertyEditHelperAdvice" inheritance="all">
+ <ref xsi:type="domaincontextcodegen:MetaClassType" href="../../org.eclipse.papyrus.uml.service.types/model/ElementTypeModelForUML.domaincontextcodegen#//@elementTypes/@types.171"/>
+ </advices>
+ <bindings clientContextID="org.eclipse.papyrus.infra.services.edit.TypeContext">
+ <bindings xsi:type="domaincontextcodegen:ElementTypeBinding" ref="//@elementTypes/@types.0"/>
+ <bindings xsi:type="domaincontextcodegen:ElementTypeBinding" ref="//@elementTypes/@types.1"/>
+ <bindings xsi:type="domaincontextcodegen:ElementTypeBinding" ref="//@elementTypes/@types.2"/>
+ <bindings xsi:type="domaincontextcodegen:ElementTypeBinding" ref="//@elementTypes/@types.3"/>
+ <bindings xsi:type="domaincontextcodegen:ElementTypeBinding" ref="//@elementTypes/@types.4"/>
+ <bindings xsi:type="domaincontextcodegen:ElementTypeBinding" ref="//@elementTypes/@types.5"/>
+ <bindings xsi:type="domaincontextcodegen:ElementTypeBinding" ref="//@elementTypes/@types.6"/>
+ <bindings xsi:type="domaincontextcodegen:ElementTypeBinding" ref="//@elementTypes/@types.7"/>
+ <bindings xsi:type="domaincontextcodegen:ElementTypeBinding" ref="//@elementTypes/@types.8"/>
+ <bindings xsi:type="domaincontextcodegen:ElementTypeBinding" ref="//@elementTypes/@types.9"/>
+ <bindings xsi:type="domaincontextcodegen:ElementTypeBinding" ref="//@elementTypes/@types.10"/>
+ <bindings xsi:type="domaincontextcodegen:ElementTypeBinding" ref="//@elementTypes/@types.11"/>
+ <bindings xsi:type="domaincontextcodegen:ElementTypeBinding" ref="//@elementTypes/@types.12"/>
+ <bindings xsi:type="domaincontextcodegen:ElementTypeBinding" ref="//@elementTypes/@types.13"/>
+ <bindings xsi:type="domaincontextcodegen:ElementTypeBinding" ref="//@elementTypes/@types.14"/>
+ <bindings xsi:type="domaincontextcodegen:ElementTypeBinding" ref="//@elementTypes/@types.15"/>
+ <bindings xsi:type="domaincontextcodegen:ElementTypeBinding" ref="//@elementTypes/@types.16"/>
+ <bindings xsi:type="domaincontextcodegen:ElementTypeBinding" ref="//@elementTypes/@types.17"/>
+ <bindings xsi:type="domaincontextcodegen:ElementTypeBinding" ref="//@elementTypes/@types.18"/>
+ <bindings xsi:type="domaincontextcodegen:ElementTypeBinding" ref="//@elementTypes/@types.19"/>
+ <bindings xsi:type="domaincontextcodegen:ElementTypeBinding" ref="//@elementTypes/@types.20"/>
+ <bindings xsi:type="domaincontextcodegen:ElementTypeBinding" ref="//@elementTypes/@types.21"/>
+ <bindings xsi:type="domaincontextcodegen:ElementTypeBinding" ref="//@elementTypes/@types.22"/>
+ <bindings xsi:type="domaincontextcodegen:ElementTypeBinding" ref="//@elementTypes/@types.23"/>
+ <bindings xsi:type="domaincontextcodegen:ElementTypeBinding" ref="//@elementTypes/@types.24"/>
+ <bindings xsi:type="domaincontextcodegen:ElementTypeBinding" ref="//@elementTypes/@types.25"/>
+ <bindings xsi:type="domaincontextcodegen:ElementTypeBinding" ref="//@elementTypes/@types.26"/>
+ <bindings xsi:type="domaincontextcodegen:ElementTypeBinding" ref="//@elementTypes/@types.27"/>
+ <bindings xsi:type="domaincontextcodegen:ElementTypeBinding" ref="//@elementTypes/@types.28"/>
+ <bindings xsi:type="domaincontextcodegen:ElementTypeBinding" ref="//@elementTypes/@types.29"/>
+ <bindings xsi:type="domaincontextcodegen:ElementTypeBinding" ref="//@elementTypes/@types.30"/>
+ <bindings xsi:type="domaincontextcodegen:ElementTypeBinding" ref="//@elementTypes/@types.31"/>
+ <bindings xsi:type="domaincontextcodegen:ElementTypeBinding" ref="//@elementTypes/@types.32"/>
+ <bindings xsi:type="domaincontextcodegen:ElementTypeBinding" ref="//@elementTypes/@types.33"/>
+ <bindings xsi:type="domaincontextcodegen:ElementTypeBinding" ref="//@elementTypes/@types.34"/>
+ <bindings xsi:type="domaincontextcodegen:ElementTypeBinding" ref="//@elementTypes/@types.35"/>
+ <bindings xsi:type="domaincontextcodegen:ElementTypeBinding" ref="//@elementTypes/@types.36"/>
+ <bindings xsi:type="domaincontextcodegen:AdviceBinding" ref="//@advices.0"/>
+ <bindings xsi:type="domaincontextcodegen:AdviceBinding" ref="//@advices.1"/>
+ <bindings xsi:type="domaincontextcodegen:AdviceBinding" ref="//@advices.2"/>
+ </bindings>
+ <genHandlers handlerPackage="org.eclipse.papyrus.sysml.modelexplorer.handler" superClass="CreateCommandHandler" superClassPackage="org.eclipse.papyrus.sysml.modelexplorer.handler" elementTypeEnumerator="SysMLElementTypes" elementTypeEnumeratorPackage="org.eclipse.papyrus.sysml.service.types.element" visibleCreateChildHandlers="//@elementTypes/@types.8 //@elementTypes/@types.10 //@elementTypes/@types.11 //@elementTypes/@types.14 //@elementTypes/@types.15 //@elementTypes/@types.17 //@elementTypes/@types.16 //@elementTypes/@types.18 //@elementTypes/@types.20 //@elementTypes/@types.21 //@elementTypes/@types.23 //@elementTypes/@types.24 //@elementTypes/@types.25 //@elementTypes/@types.26 //@elementTypes/@types.27 //@elementTypes/@types.29 //@elementTypes/@types.30 //@elementTypes/@types.31 //@elementTypes/@types.35 //@elementTypes/@types.36" createChildMenuLocationURI="popup:org.eclipse.papyrus.views.modelexplorer.popupmenu.createsysmlchild"/>
+</domaincontextcodegen:DomainContext>
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/model/sysml-activities.elementtypesconfigurations b/plugins/org.eclipse.papyrus.sysml.service.types/model/sysml-activities.elementtypesconfigurations
new file mode 100755
index 0000000..9fdbc78
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/model/sysml-activities.elementtypesconfigurations
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<elementtypesconfigurations:ElementTypeSetConfiguration xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:elementtypesconfigurations="http://www.eclipse.org/papyrus/infra/elementtypesconfigurations/1.2" xmi:id="_rRIxgLOjEeWH6Y3Wi2YKxg" identifier="org.eclipse.papyrus.sysml.service.types.elementTypeSetActivities" name="elementTypeSetActivities" metamodelNsURI="http://www.eclipse.org/papyrus/0.7.0/SysML/Activities">
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.stereotype.Optional" identifier="org.eclipse.papyrus.sysml.stereotype.Optional" name="SysML::Stereotype::Optional" hint="SysML::Stereotype::Optional" editHelperClassName="org.eclipse.papyrus.infra.gmfdiag.common.helper.DefaultEditHelper">
+ <eClass href="../../org.eclipse.papyrus.sysml/model/sysml.ecore#//activities/Optional"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.stereotype.Rate" identifier="org.eclipse.papyrus.sysml.stereotype.Rate" name="SysML::Stereotype::Rate" hint="SysML::Stereotype::Rate" editHelperClassName="org.eclipse.papyrus.infra.gmfdiag.common.helper.DefaultEditHelper">
+ <eClass href="../../org.eclipse.papyrus.sysml/model/sysml.ecore#//activities/Rate"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.stereotype.Probability" identifier="org.eclipse.papyrus.sysml.stereotype.Probability" name="SysML::Stereotype::Probability" hint="SysML::Stereotype::Probability" editHelperClassName="org.eclipse.papyrus.infra.gmfdiag.common.helper.DefaultEditHelper">
+ <eClass href="../../org.eclipse.papyrus.sysml/model/sysml.ecore#//activities/Probability"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.stereotype.Continuous" identifier="org.eclipse.papyrus.sysml.stereotype.Continuous" name="SysML::Stereotype::Continuous" hint="SysML::Stereotype::Continuous" editHelperClassName="org.eclipse.papyrus.infra.gmfdiag.common.helper.DefaultEditHelper">
+ <eClass href="../../org.eclipse.papyrus.sysml/model/sysml.ecore#//activities/Continuous"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.stereotype.Discrete" identifier="org.eclipse.papyrus.sysml.stereotype.Discrete" name="SysML::Stereotype::Discrete" hint="SysML::Stereotype::Discrete" editHelperClassName="org.eclipse.papyrus.infra.gmfdiag.common.helper.DefaultEditHelper">
+ <eClass href="../../org.eclipse.papyrus.sysml/model/sysml.ecore#//activities/Discrete"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.stereotype.ControlOperator" identifier="org.eclipse.papyrus.sysml.stereotype.ControlOperator" name="SysML::Stereotype::ControlOperator" hint="SysML::Stereotype::ControlOperator" editHelperClassName="org.eclipse.papyrus.infra.gmfdiag.common.helper.DefaultEditHelper">
+ <eClass href="../../org.eclipse.papyrus.sysml/model/sysml.ecore#//activities/ControlOperator"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.stereotype.NoBuffer" identifier="org.eclipse.papyrus.sysml.stereotype.NoBuffer" name="SysML::Stereotype::NoBuffer" hint="SysML::Stereotype::NoBuffer" editHelperClassName="org.eclipse.papyrus.infra.gmfdiag.common.helper.DefaultEditHelper">
+ <eClass href="../../org.eclipse.papyrus.sysml/model/sysml.ecore#//activities/NoBuffer"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.stereotype.Overwrite" identifier="org.eclipse.papyrus.sysml.stereotype.Overwrite" name="SysML::Stereotype::Overwrite" hint="SysML::Stereotype::Overwrite" editHelperClassName="org.eclipse.papyrus.infra.gmfdiag.common.helper.DefaultEditHelper">
+ <eClass href="../../org.eclipse.papyrus.sysml/model/sysml.ecore#//activities/Overwrite"/>
+ </elementTypeConfigurations>
+</elementtypesconfigurations:ElementTypeSetConfiguration>
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/model/sysml-allocations.elementtypesconfigurations b/plugins/org.eclipse.papyrus.sysml.service.types/model/sysml-allocations.elementtypesconfigurations
new file mode 100755
index 0000000..b4fdb07
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/model/sysml-allocations.elementtypesconfigurations
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<elementtypesconfigurations:ElementTypeSetConfiguration xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:elementtypesconfigurations="http://www.eclipse.org/papyrus/infra/elementtypesconfigurations/1.2" xmi:id="_u9Zn4LOjEeWH6Y3Wi2YKxg" identifier="org.eclipse.papyrus.sysml.service.types.elementTypeSetAllocations" name="elementTypeSetAllocations" metamodelNsURI="http://www.eclipse.org/papyrus/0.7.0/SysML/Allocations">
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.stereotype.Allocate" identifier="org.eclipse.papyrus.sysml.stereotype.Allocate" name="SysML::Stereotype::Allocate" hint="SysML::Stereotype::Allocate" editHelperClassName="org.eclipse.papyrus.infra.gmfdiag.common.helper.DefaultEditHelper">
+ <eClass href="../../org.eclipse.papyrus.sysml/model/sysml.ecore#//allocations/Allocate"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.stereotype.Allocated" identifier="org.eclipse.papyrus.sysml.stereotype.Allocated" name="SysML::Stereotype::Allocated" hint="SysML::Stereotype::Allocated" editHelperClassName="org.eclipse.papyrus.infra.gmfdiag.common.helper.DefaultEditHelper">
+ <eClass href="../../org.eclipse.papyrus.sysml/model/sysml.ecore#//allocations/Allocated"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.stereotype.AllocateActivityPartition" identifier="org.eclipse.papyrus.sysml.stereotype.AllocateActivityPartition" name="SysML::Stereotype::AllocateActivityPartition" hint="SysML::Stereotype::AllocateActivityPartition" editHelperClassName="org.eclipse.papyrus.infra.gmfdiag.common.helper.DefaultEditHelper">
+ <eClass href="../../org.eclipse.papyrus.sysml/model/sysml.ecore#//allocations/AllocateActivityPartition"/>
+ </elementTypeConfigurations>
+</elementtypesconfigurations:ElementTypeSetConfiguration>
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/model/sysml-blocks.elementtypesconfigurations b/plugins/org.eclipse.papyrus.sysml.service.types/model/sysml-blocks.elementtypesconfigurations
new file mode 100755
index 0000000..3775c2d
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/model/sysml-blocks.elementtypesconfigurations
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<elementtypesconfigurations:ElementTypeSetConfiguration xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:elementtypesconfigurations="http://www.eclipse.org/papyrus/infra/elementtypesconfigurations/1.2" xmi:id="_3i038FYIEeS0WsAAtVmToA" identifier="org.eclipse.papyrus.sysml.service.types.elementTypeSetBlocks" name="elementTypeSetBlocks" metamodelNsURI="http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks">
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.stereotype.Block" identifier="org.eclipse.papyrus.sysml.stereotype.Block" name="SysML::Stereotype::Block" hint="SysML::Stereotype::Block" editHelperClassName="org.eclipse.papyrus.infra.gmfdiag.common.helper.DefaultEditHelper">
+ <eClass href="../../org.eclipse.papyrus.sysml/model/sysml.ecore#//blocks/Block"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.stereotype.DistributedProperty" identifier="org.eclipse.papyrus.sysml.stereotype.DistributedProperty" name="SysML::Stereotype::DistributedProperty" hint="SysML::Stereotype::DistributedProperty" editHelperClassName="org.eclipse.papyrus.infra.gmfdiag.common.helper.DefaultEditHelper">
+ <eClass href="../../org.eclipse.papyrus.sysml/model/sysml.ecore#//blocks/DistributedProperty"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.stereotype.Dimension" identifier="org.eclipse.papyrus.sysml.stereotype.Dimension" name="SysML::Stereotype::Dimension" hint="SysML::Stereotype::Dimension" editHelperClassName="org.eclipse.papyrus.infra.gmfdiag.common.helper.DefaultEditHelper">
+ <eClass href="../../org.eclipse.papyrus.sysml/model/sysml.ecore#//blocks/Dimension"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.stereotype.Unit" identifier="org.eclipse.papyrus.sysml.stereotype.Unit" name="SysML::Stereotype::Unit" hint="SysML::Stereotype::Unit" editHelperClassName="org.eclipse.papyrus.infra.gmfdiag.common.helper.DefaultEditHelper">
+ <eClass href="../../org.eclipse.papyrus.sysml/model/sysml.ecore#//blocks/Unit"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.stereotype.ValueType" identifier="org.eclipse.papyrus.sysml.stereotype.ValueType" name="SysML::Stereotype::ValueType" hint="SysML::Stereotype::ValueType" editHelperClassName="org.eclipse.papyrus.infra.gmfdiag.common.helper.DefaultEditHelper">
+ <eClass href="../../org.eclipse.papyrus.sysml/model/sysml.ecore#//blocks/ValueType"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.stereotype.NestedConnectorEnd" identifier="org.eclipse.papyrus.sysml.stereotype.NestedConnectorEnd" name="SysML::Stereotype::NestedConnectorEnd" hint="SysML::Stereotype::NestedConnectorEnd" editHelperClassName="org.eclipse.papyrus.infra.gmfdiag.common.helper.DefaultEditHelper">
+ <eClass href="../../org.eclipse.papyrus.sysml/model/sysml.ecore#//blocks/NestedConnectorEnd"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.stereotype.ParticipantProperty" identifier="org.eclipse.papyrus.sysml.stereotype.ParticipantProperty" name="SysML::Stereotype::ParticipantProperty" hint="SysML::Stereotype::ParticipantProperty" editHelperClassName="org.eclipse.papyrus.infra.gmfdiag.common.helper.DefaultEditHelper">
+ <eClass href="../../org.eclipse.papyrus.sysml/model/sysml.ecore#//blocks/ParticipantProperty"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.stereotype.ConnectorProperty" identifier="org.eclipse.papyrus.sysml.stereotype.ConnectorProperty" name="SysML::Stereotype::ConnectorProperty" hint="SysML::Stereotype::ConnectorProperty" editHelperClassName="org.eclipse.papyrus.infra.gmfdiag.common.helper.DefaultEditHelper">
+ <eClass href="../../org.eclipse.papyrus.sysml/model/sysml.ecore#//blocks/ConnectorProperty"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.stereotype.BindingConnector" identifier="org.eclipse.papyrus.sysml.stereotype.BindingConnector" name="SysML::Stereotype::BindingConnector" hint="SysML::Stereotype::BindingConnector" editHelperClassName="org.eclipse.papyrus.infra.gmfdiag.common.helper.DefaultEditHelper">
+ <eClass href="../../org.eclipse.papyrus.sysml/model/sysml.ecore#//blocks/BindingConnector"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.stereotype.PropertySpecificType" identifier="org.eclipse.papyrus.sysml.stereotype.PropertySpecificType" name="SysML::Stereotype::PropertySpecificType" hint="SysML::Stereotype::PropertySpecificType" editHelperClassName="org.eclipse.papyrus.infra.gmfdiag.common.helper.DefaultEditHelper">
+ <eClass href="../../org.eclipse.papyrus.sysml/model/sysml.ecore#//blocks/PropertySpecificType"/>
+ </elementTypeConfigurations>
+ <adviceBindingsConfigurations xsi:type="elementtypesconfigurations:AdviceBindingConfiguration" xmi:id="_4Jt40FYIEeS0WsAAtVmToA" identifier="org.eclipse.papyrus.sysml.stereotype.advice.Block" target="org.eclipse.papyrus.sysml.stereotype.Block" inheritance="all" editHelperAdviceClassName="org.eclipse.papyrus.sysml.service.types.stereotype.helper.advice.BlockEditHelperAdvice"/>
+</elementtypesconfigurations:ElementTypeSetConfiguration>
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/model/sysml-constraints.elementtypesconfigurations b/plugins/org.eclipse.papyrus.sysml.service.types/model/sysml-constraints.elementtypesconfigurations
new file mode 100755
index 0000000..49ed416
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/model/sysml-constraints.elementtypesconfigurations
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<elementtypesconfigurations:ElementTypeSetConfiguration xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:elementtypesconfigurations="http://www.eclipse.org/papyrus/infra/elementtypesconfigurations/1.2" xmi:id="_0h9coLOjEeWH6Y3Wi2YKxg" identifier="org.eclipse.papyrus.sysml.service.types.elementTypeSetConstraints" name="elementTypeSetConstraints" metamodelNsURI="http://www.eclipse.org/papyrus/0.7.0/SysML/Constraints">
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.stereotype.ConstraintBlock" identifier="org.eclipse.papyrus.sysml.stereotype.ConstraintBlock" name="SysML::Stereotype::ConstraintBlock" hint="SysML::Stereotype::ConstraintBlock" editHelperClassName="org.eclipse.papyrus.infra.gmfdiag.common.helper.DefaultEditHelper">
+ <eClass href="../../org.eclipse.papyrus.sysml/model/sysml.ecore#//constraints/ConstraintBlock"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.stereotype.ConstraintProperty" identifier="org.eclipse.papyrus.sysml.stereotype.ConstraintProperty" name="SysML::Stereotype::ConstraintProperty" hint="SysML::Stereotype::ConstraintProperty" editHelperClassName="org.eclipse.papyrus.infra.gmfdiag.common.helper.DefaultEditHelper">
+ <eClass href="../../org.eclipse.papyrus.sysml/model/sysml.ecore#//constraints/ConstraintProperty"/>
+ </elementTypeConfigurations>
+</elementtypesconfigurations:ElementTypeSetConfiguration>
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/model/sysml-modelelements.elementtypesconfigurations b/plugins/org.eclipse.papyrus.sysml.service.types/model/sysml-modelelements.elementtypesconfigurations
new file mode 100755
index 0000000..957e7e3
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/model/sysml-modelelements.elementtypesconfigurations
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<elementtypesconfigurations:ElementTypeSetConfiguration xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:elementtypesconfigurations="http://www.eclipse.org/papyrus/infra/elementtypesconfigurations/1.2" xmi:id="_2o9lYLOjEeWH6Y3Wi2YKxg" identifier="org.eclipse.papyrus.sysml.service.types.elementTypeSetModelElements" name="elementTypeSetModelElements" metamodelNsURI="http://www.eclipse.org/papyrus/0.7.0/SysML/ModelElements">
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.stereotype.Conform" identifier="org.eclipse.papyrus.sysml.stereotype.Conform" name="SysML::Stereotype::Conform" hint="SysML::Stereotype::Conform" editHelperClassName="org.eclipse.papyrus.infra.gmfdiag.common.helper.DefaultEditHelper">
+ <eClass href="../../org.eclipse.papyrus.sysml/model/sysml.ecore#//modelelements/Conform"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.stereotype.View" identifier="org.eclipse.papyrus.sysml.stereotype.View" name="SysML::Stereotype::View" hint="SysML::Stereotype::View" editHelperClassName="org.eclipse.papyrus.infra.gmfdiag.common.helper.DefaultEditHelper">
+ <eClass href="../../org.eclipse.papyrus.sysml/model/sysml.ecore#//modelelements/View"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.stereotype.ViewPoint" identifier="org.eclipse.papyrus.sysml.stereotype.ViewPoint" name="SysML::Stereotype::ViewPoint" hint="SysML::Stereotype::ViewPoint" editHelperClassName="org.eclipse.papyrus.infra.gmfdiag.common.helper.DefaultEditHelper">
+ <eClass href="../../org.eclipse.papyrus.sysml/model/sysml.ecore#//modelelements/ViewPoint"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.stereotype.Rationale" identifier="org.eclipse.papyrus.sysml.stereotype.Rationale" name="SysML::Stereotype::Rationale" hint="SysML::Stereotype::Rationale" editHelperClassName="org.eclipse.papyrus.infra.gmfdiag.common.helper.DefaultEditHelper">
+ <eClass href="../../org.eclipse.papyrus.sysml/model/sysml.ecore#//modelelements/Rationale"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.stereotype.Problem" identifier="org.eclipse.papyrus.sysml.stereotype.Problem" name="SysML::Stereotype::Problem" hint="SysML::Stereotype::Problem" editHelperClassName="org.eclipse.papyrus.infra.gmfdiag.common.helper.DefaultEditHelper">
+ <eClass href="../../org.eclipse.papyrus.sysml/model/sysml.ecore#//modelelements/Problem"/>
+ </elementTypeConfigurations>
+</elementtypesconfigurations:ElementTypeSetConfiguration>
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/model/sysml-portsandflows.elementtypesconfigurations b/plugins/org.eclipse.papyrus.sysml.service.types/model/sysml-portsandflows.elementtypesconfigurations
new file mode 100755
index 0000000..53bf769
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/model/sysml-portsandflows.elementtypesconfigurations
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<elementtypesconfigurations:ElementTypeSetConfiguration xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:elementtypesconfigurations="http://www.eclipse.org/papyrus/infra/elementtypesconfigurations/1.2" xmi:id="_6wATQLOjEeWH6Y3Wi2YKxg" identifier="org.eclipse.papyrus.sysml.service.types.elementTypeSetPortsAndFlows" name="elementTypeSetPortsAndFlows" metamodelNsURI="http://www.eclipse.org/papyrus/0.7.0/SysML/PortAndFlows">
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.stereotype.FlowPort" identifier="org.eclipse.papyrus.sysml.stereotype.FlowPort" name="SysML::Stereotype::FlowPort" hint="SysML::Stereotype::FlowPort" editHelperClassName="org.eclipse.papyrus.infra.gmfdiag.common.helper.DefaultEditHelper">
+ <eClass href="../../org.eclipse.papyrus.sysml/model/sysml.ecore#//portandflows/FlowPort"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.stereotype.FlowProperty" identifier="org.eclipse.papyrus.sysml.stereotype.FlowProperty" name="SysML::Stereotype::FlowProperty" hint="SysML::Stereotype::FlowProperty" editHelperClassName="org.eclipse.papyrus.infra.gmfdiag.common.helper.DefaultEditHelper">
+ <eClass href="../../org.eclipse.papyrus.sysml/model/sysml.ecore#//portandflows/FlowProperty"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.stereotype.FlowSpecification" identifier="org.eclipse.papyrus.sysml.stereotype.FlowSpecification" name="SysML::Stereotype::FlowSpecification" hint="SysML::Stereotype::FlowSpecification" editHelperClassName="org.eclipse.papyrus.infra.gmfdiag.common.helper.DefaultEditHelper">
+ <eClass href="../../org.eclipse.papyrus.sysml/model/sysml.ecore#//portandflows/FlowSpecification"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.stereotype.ItemFlow" identifier="org.eclipse.papyrus.sysml.stereotype.ItemFlow" name="SysML::Stereotype::ItemFlow" hint="SysML::Stereotype::ItemFlow" editHelperClassName="org.eclipse.papyrus.infra.gmfdiag.common.helper.DefaultEditHelper">
+ <eClass href="../../org.eclipse.papyrus.sysml/model/sysml.ecore#//portandflows/ItemFlow"/>
+ </elementTypeConfigurations>
+</elementtypesconfigurations:ElementTypeSetConfiguration>
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/model/sysml-requirements.elementtypesconfigurations b/plugins/org.eclipse.papyrus.sysml.service.types/model/sysml-requirements.elementtypesconfigurations
new file mode 100755
index 0000000..8fdf1f3
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/model/sysml-requirements.elementtypesconfigurations
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<elementtypesconfigurations:ElementTypeSetConfiguration xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:elementtypesconfigurations="http://www.eclipse.org/papyrus/infra/elementtypesconfigurations/1.2" xmi:id="_LYuC4LOtEeWH6Y3Wi2YKxg" identifier="org.eclipse.papyrus.sysml.service.types.elementTypeSetRequirements" name="elementTypeSetRequirements" metamodelNsURI="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements">
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.stereotype.DeriveReqt" identifier="org.eclipse.papyrus.sysml.stereotype.DeriveReqt" name="SysML::Stereotype::DeriveReqt" hint="SysML::Stereotype::DeriveReqt" editHelperClassName="org.eclipse.papyrus.infra.gmfdiag.common.helper.DefaultEditHelper">
+ <eClass href="../../org.eclipse.papyrus.sysml/model/sysml.ecore#//requirements/DeriveReqt"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.stereotype.Verify" identifier="org.eclipse.papyrus.sysml.stereotype.Verify" name="SysML::Stereotype::Verify" hint="SysML::Stereotype::Verify" editHelperClassName="org.eclipse.papyrus.infra.gmfdiag.common.helper.DefaultEditHelper">
+ <eClass href="../../org.eclipse.papyrus.sysml/model/sysml.ecore#//requirements/Verify"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.stereotype.Copy" identifier="org.eclipse.papyrus.sysml.stereotype.Copy" name="SysML::Stereotype::Copy" hint="SysML::Stereotype::Copy" editHelperClassName="org.eclipse.papyrus.infra.gmfdiag.common.helper.DefaultEditHelper">
+ <eClass href="../../org.eclipse.papyrus.sysml/model/sysml.ecore#//requirements/Copy"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.stereotype.Satisfy" identifier="org.eclipse.papyrus.sysml.stereotype.Satisfy" name="SysML::Stereotype::Satisfy" hint="SysML::Stereotype::Satisfy" editHelperClassName="org.eclipse.papyrus.infra.gmfdiag.common.helper.DefaultEditHelper">
+ <eClass href="../../org.eclipse.papyrus.sysml/model/sysml.ecore#//requirements/Satisfy"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.stereotype.TestCase" identifier="org.eclipse.papyrus.sysml.stereotype.TestCase" name="SysML::Stereotype::TestCase" hint="SysML::Stereotype::TestCase" editHelperClassName="org.eclipse.papyrus.infra.gmfdiag.common.helper.DefaultEditHelper">
+ <eClass href="../../org.eclipse.papyrus.sysml/model/sysml.ecore#//requirements/TestCase"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.stereotype.Requirement" identifier="org.eclipse.papyrus.sysml.stereotype.Requirement" name="SysML::Stereotype::Requirement" hint="SysML::Stereotype::Requirement" editHelperClassName="org.eclipse.papyrus.infra.gmfdiag.common.helper.DefaultEditHelper">
+ <eClass href="../../org.eclipse.papyrus.sysml/model/sysml.ecore#//requirements/Requirement"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.stereotype.RequirementRelated" identifier="org.eclipse.papyrus.sysml.stereotype.RequirementRelated" name="SysML::Stereotype::RequirementRelated" hint="SysML::Stereotype::RequirementRelated" editHelperClassName="org.eclipse.papyrus.infra.gmfdiag.common.helper.DefaultEditHelper">
+ <eClass href="../../org.eclipse.papyrus.sysml/model/sysml.ecore#//requirements/RequirementRelated"/>
+ </elementTypeConfigurations>
+</elementtypesconfigurations:ElementTypeSetConfiguration>
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations b/plugins/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations
new file mode 100755
index 0000000..9e32cc7
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations
@@ -0,0 +1,248 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<elementtypesconfigurations:ElementTypeSetConfiguration xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:elementtypesconfigurations="http://www.eclipse.org/papyrus/infra/elementtypesconfigurations/1.2" xmi:id="_649xgFYBEeS0WsAAtVmToA" identifier="org.eclipse.papyrus.sysml.service.types.elementTypeSetSysML" name="elementTypeSetSysML" metamodelNsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.ActorPartProperty" identifier="org.eclipse.papyrus.sysml.ActorPartProperty" name="SysML::ActorPartProperty" hint="SysML::ActorPartProperty">
+ <iconEntry xmi:id="_65ANwFYBEeS0WsAAtVmToA" iconPath="/icons/full/obj16/Property.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <editHelperAdviceConfiguration xsi:type="elementtypesconfigurations:EditHelperAdviceConfiguration" xmi:id="_65Bb4FYBEeS0WsAAtVmToA" editHelperAdviceClassName="org.eclipse.papyrus.sysml.service.types.helper.ActorPartPropertyEditHelperAdvice"/>
+ <matcherConfiguration xsi:type="elementtypesconfigurations:MatcherConfiguration" xmi:id="_65CC8FYBEeS0WsAAtVmToA" matcherClassName="org.eclipse.papyrus.sysml.service.types.matcher.ActorPartPropertyMatcher"/>
+ <specializedTypes xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Property"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.Allocate" identifier="org.eclipse.papyrus.sysml.Allocate" name="SysML::Allocate" hint="SysML::Allocate">
+ <editHelperAdviceConfiguration xsi:type="elementtypesconfigurations:EditHelperAdviceConfiguration" xmi:id="_65CC8lYBEeS0WsAAtVmToA" editHelperAdviceClassName="org.eclipse.papyrus.sysml.service.types.helper.AllocateEditHelperAdvice"/>
+ <matcherConfiguration xsi:type="elementtypesconfigurations:MatcherConfiguration" xmi:id="_65CC81YBEeS0WsAAtVmToA" matcherClassName="org.eclipse.papyrus.sysml.service.types.matcher.AllocateMatcher"/>
+ <specializedTypes xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Abstraction"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.Association" identifier="org.eclipse.papyrus.sysml.Association" name="SysML::Association" hint="SysML::Association">
+ <editHelperAdviceConfiguration xsi:type="elementtypesconfigurations:EditHelperAdviceConfiguration" xmi:id="_65CqAFYBEeS0WsAAtVmToA" editHelperAdviceClassName="org.eclipse.papyrus.sysml.service.types.helper.advice.AssociationEditHelperAdvice"/>
+ <matcherConfiguration xsi:type="elementtypesconfigurations:MatcherConfiguration" xmi:id="_65CqAVYBEeS0WsAAtVmToA" matcherClassName="org.eclipse.papyrus.sysml.service.types.matcher.AssociationMatcher"/>
+ <specializedTypes xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.AssociationBase"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.AssociationComposite" identifier="org.eclipse.papyrus.sysml.AssociationComposite" name="SysML::AssociationComposite" hint="SysML::AssociationComposite">
+ <editHelperAdviceConfiguration xsi:type="elementtypesconfigurations:EditHelperAdviceConfiguration" xmi:id="_65CqA1YBEeS0WsAAtVmToA" editHelperAdviceClassName="org.eclipse.papyrus.sysml.service.types.helper.advice.AssociationCompositeEditHelperAdvice"/>
+ <matcherConfiguration xsi:type="elementtypesconfigurations:MatcherConfiguration" xmi:id="_65CqBFYBEeS0WsAAtVmToA" matcherClassName="org.eclipse.papyrus.sysml.service.types.matcher.NoMatcher"/>
+ <specializedTypes xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.Association"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.AssociationCompositeDirected" identifier="org.eclipse.papyrus.sysml.AssociationCompositeDirected" name="SysML::AssociationCompositeDirected" hint="SysML::AssociationCompositeDirected">
+ <editHelperAdviceConfiguration xsi:type="elementtypesconfigurations:EditHelperAdviceConfiguration" xmi:id="_65CqBlYBEeS0WsAAtVmToA" editHelperAdviceClassName="org.eclipse.papyrus.sysml.service.types.helper.advice.AssociationCompositeDirectedEditHelperAdvice"/>
+ <matcherConfiguration xsi:type="elementtypesconfigurations:MatcherConfiguration" xmi:id="_65CqB1YBEeS0WsAAtVmToA" matcherClassName="org.eclipse.papyrus.sysml.service.types.matcher.NoMatcher"/>
+ <specializedTypes xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.Association"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.AssociationNone" identifier="org.eclipse.papyrus.sysml.AssociationNone" name="SysML::AssociationNone" hint="SysML::AssociationNone">
+ <editHelperAdviceConfiguration xsi:type="elementtypesconfigurations:EditHelperAdviceConfiguration" xmi:id="_65CqCVYBEeS0WsAAtVmToA" editHelperAdviceClassName="org.eclipse.papyrus.sysml.service.types.helper.advice.AssociationNoneEditHelperAdvice"/>
+ <matcherConfiguration xsi:type="elementtypesconfigurations:MatcherConfiguration" xmi:id="_65CqClYBEeS0WsAAtVmToA" matcherClassName="org.eclipse.papyrus.sysml.service.types.matcher.NoMatcher"/>
+ <specializedTypes xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.Association"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.AssociationNoneDirected" identifier="org.eclipse.papyrus.sysml.AssociationNoneDirected" name="SysML::AssociationNoneDirected" hint="SysML::AssociationNoneDirected">
+ <editHelperAdviceConfiguration xsi:type="elementtypesconfigurations:EditHelperAdviceConfiguration" xmi:id="_65CqDFYBEeS0WsAAtVmToA" editHelperAdviceClassName="org.eclipse.papyrus.sysml.service.types.helper.advice.AssociationNoneDirectedEditHelperAdvice"/>
+ <matcherConfiguration xsi:type="elementtypesconfigurations:MatcherConfiguration" xmi:id="_65CqDVYBEeS0WsAAtVmToA" matcherClassName="org.eclipse.papyrus.sysml.service.types.matcher.NoMatcher"/>
+ <specializedTypes xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.Association"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.AssociationShared" identifier="org.eclipse.papyrus.sysml.AssociationShared" name="SysML::AssociationShared" hint="SysML::AssociationShared">
+ <editHelperAdviceConfiguration xsi:type="elementtypesconfigurations:EditHelperAdviceConfiguration" xmi:id="_65CqD1YBEeS0WsAAtVmToA" editHelperAdviceClassName="org.eclipse.papyrus.sysml.service.types.helper.advice.AssociationSharedEditHelperAdvice"/>
+ <matcherConfiguration xsi:type="elementtypesconfigurations:MatcherConfiguration" xmi:id="_65CqEFYBEeS0WsAAtVmToA" matcherClassName="org.eclipse.papyrus.sysml.service.types.matcher.NoMatcher"/>
+ <specializedTypes xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.Association"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.AssociationSharedDirected" identifier="org.eclipse.papyrus.sysml.AssociationSharedDirected" name="SysML::AssociationSharedDirected" hint="SysML::AssociationSharedDirected">
+ <editHelperAdviceConfiguration xsi:type="elementtypesconfigurations:EditHelperAdviceConfiguration" xmi:id="_65DREFYBEeS0WsAAtVmToA" editHelperAdviceClassName="org.eclipse.papyrus.sysml.service.types.helper.advice.AssociationSharedDirectedEditHelperAdvice"/>
+ <matcherConfiguration xsi:type="elementtypesconfigurations:MatcherConfiguration" xmi:id="_65DREVYBEeS0WsAAtVmToA" matcherClassName="org.eclipse.papyrus.sysml.service.types.matcher.NoMatcher"/>
+ <specializedTypes xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.Association"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.Block" identifier="org.eclipse.papyrus.sysml.Block" name="SysML::Block" hint="SysML::Block">
+ <iconEntry xmi:id="_65DRE1YBEeS0WsAAtVmToA" iconPath="/icons/blocks/Block.gif" bundleId="org.eclipse.papyrus.sysml"/>
+ <editHelperAdviceConfiguration xsi:type="elementtypesconfigurations:EditHelperAdviceConfiguration" xmi:id="_65DRFFYBEeS0WsAAtVmToA" editHelperAdviceClassName="org.eclipse.papyrus.sysml.service.types.helper.BlockEditHelperAdvice"/>
+ <matcherConfiguration xsi:type="elementtypesconfigurations:MatcherConfiguration" xmi:id="_65DRFVYBEeS0WsAAtVmToA" matcherClassName="org.eclipse.papyrus.sysml.service.types.matcher.BlockMatcher"/>
+ <specializedTypes xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Class"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.Conform" identifier="org.eclipse.papyrus.sysml.Conform" name="SysML::Conform" hint="SysML::Conform">
+ <iconEntry xmi:id="_65DRF1YBEeS0WsAAtVmToA" iconPath="/icons/modelelements/Conform.gif" bundleId="org.eclipse.papyrus.sysml"/>
+ <editHelperAdviceConfiguration xsi:type="elementtypesconfigurations:EditHelperAdviceConfiguration" xmi:id="_65DRGFYBEeS0WsAAtVmToA" editHelperAdviceClassName="org.eclipse.papyrus.sysml.service.types.helper.ConformEditHelperAdvice"/>
+ <matcherConfiguration xsi:type="elementtypesconfigurations:MatcherConfiguration" xmi:id="_65DRGVYBEeS0WsAAtVmToA" matcherClassName="org.eclipse.papyrus.sysml.service.types.matcher.ConformMatcher"/>
+ <specializedTypes xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Dependency"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.ConstraintBlock" identifier="org.eclipse.papyrus.sysml.ConstraintBlock" name="SysML::ConstraintBlock" hint="SysML::ConstraintBlock">
+ <iconEntry xmi:id="_65DRG1YBEeS0WsAAtVmToA" iconPath="/icons/constraints/ConstraintBlock.gif" bundleId="org.eclipse.papyrus.sysml"/>
+ <editHelperAdviceConfiguration xsi:type="elementtypesconfigurations:EditHelperAdviceConfiguration" xmi:id="_65DRHFYBEeS0WsAAtVmToA" editHelperAdviceClassName="org.eclipse.papyrus.sysml.service.types.helper.ConstraintBlockEditHelperAdvice"/>
+ <matcherConfiguration xsi:type="elementtypesconfigurations:MatcherConfiguration" xmi:id="_65DRHVYBEeS0WsAAtVmToA" matcherClassName="org.eclipse.papyrus.sysml.service.types.matcher.ConstraintBlockMatcher"/>
+ <specializedTypes xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Class"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.ConstraintProperty" identifier="org.eclipse.papyrus.sysml.ConstraintProperty" name="SysML::ConstraintProperty" hint="SysML::ConstraintProperty">
+ <iconEntry xmi:id="_65DRH1YBEeS0WsAAtVmToA" iconPath="/icons/constraints/ConstraintProperty.gif" bundleId="org.eclipse.papyrus.sysml"/>
+ <editHelperAdviceConfiguration xsi:type="elementtypesconfigurations:EditHelperAdviceConfiguration" xmi:id="_65DRIFYBEeS0WsAAtVmToA" editHelperAdviceClassName="org.eclipse.papyrus.sysml.service.types.helper.ConstraintPropertyEditHelperAdvice"/>
+ <matcherConfiguration xsi:type="elementtypesconfigurations:MatcherConfiguration" xmi:id="_65DRIVYBEeS0WsAAtVmToA" matcherClassName="org.eclipse.papyrus.sysml.service.types.matcher.ConstraintPropertyMatcher"/>
+ <specializedTypes xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Property"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.Copy" identifier="org.eclipse.papyrus.sysml.Copy" name="SysML::Copy" hint="SysML::Copy">
+ <iconEntry xmi:id="_65DRI1YBEeS0WsAAtVmToA" iconPath="/icons/requirements/Copy.gif" bundleId="org.eclipse.papyrus.sysml"/>
+ <editHelperAdviceConfiguration xsi:type="elementtypesconfigurations:EditHelperAdviceConfiguration" xmi:id="_65DRJFYBEeS0WsAAtVmToA" editHelperAdviceClassName="org.eclipse.papyrus.sysml.service.types.helper.CopyEditHelperAdvice"/>
+ <matcherConfiguration xsi:type="elementtypesconfigurations:MatcherConfiguration" xmi:id="_65DRJVYBEeS0WsAAtVmToA" matcherClassName="org.eclipse.papyrus.sysml.service.types.matcher.CopyMatcher"/>
+ <specializedTypes xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Abstraction"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.DeriveReqt" identifier="org.eclipse.papyrus.sysml.DeriveReqt" name="SysML::DeriveReqt" hint="SysML::DeriveReqt">
+ <iconEntry xmi:id="_65D4IVYBEeS0WsAAtVmToA" iconPath="/icons/requirements/DeriveReqt.gif" bundleId="org.eclipse.papyrus.sysml"/>
+ <editHelperAdviceConfiguration xsi:type="elementtypesconfigurations:EditHelperAdviceConfiguration" xmi:id="_65D4IlYBEeS0WsAAtVmToA" editHelperAdviceClassName="org.eclipse.papyrus.sysml.service.types.helper.DeriveReqtEditHelperAdvice"/>
+ <matcherConfiguration xsi:type="elementtypesconfigurations:MatcherConfiguration" xmi:id="_65D4I1YBEeS0WsAAtVmToA" matcherClassName="org.eclipse.papyrus.sysml.service.types.matcher.DeriveReqtMatcher"/>
+ <specializedTypes xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Abstraction"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.Dimension" identifier="org.eclipse.papyrus.sysml.Dimension" name="SysML::Dimension" hint="SysML::Dimension">
+ <iconEntry xmi:id="_65D4JVYBEeS0WsAAtVmToA" iconPath="/icons/blocks/Dimension.gif" bundleId="org.eclipse.papyrus.sysml"/>
+ <editHelperAdviceConfiguration xsi:type="elementtypesconfigurations:EditHelperAdviceConfiguration" xmi:id="_65D4JlYBEeS0WsAAtVmToA" editHelperAdviceClassName="org.eclipse.papyrus.sysml.service.types.helper.DimensionEditHelperAdvice"/>
+ <matcherConfiguration xsi:type="elementtypesconfigurations:MatcherConfiguration" xmi:id="_65D4J1YBEeS0WsAAtVmToA" matcherClassName="org.eclipse.papyrus.sysml.service.types.matcher.DimensionMatcher"/>
+ <specializedTypes xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.InstanceSpecification"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.FlowPort" identifier="org.eclipse.papyrus.sysml.FlowPort" name="SysML::FlowPort" hint="SysML::FlowPort">
+ <iconEntry xmi:id="_65D4KVYBEeS0WsAAtVmToA" iconPath="/icons/portandflows/FlowPort.gif" bundleId="org.eclipse.papyrus.sysml"/>
+ <editHelperAdviceConfiguration xsi:type="elementtypesconfigurations:EditHelperAdviceConfiguration" xmi:id="_65D4KlYBEeS0WsAAtVmToA" editHelperAdviceClassName="org.eclipse.papyrus.sysml.service.types.helper.FlowPortEditHelperAdvice"/>
+ <matcherConfiguration xsi:type="elementtypesconfigurations:MatcherConfiguration" xmi:id="_65D4K1YBEeS0WsAAtVmToA" matcherClassName="org.eclipse.papyrus.sysml.service.types.matcher.FlowPortMatcher"/>
+ <specializedTypes xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Port"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.FlowPort_InOut" identifier="org.eclipse.papyrus.sysml.FlowPort_InOut" name="SysML::FlowPort_InOut" hint="SysML::FlowPort_InOut">
+ <iconEntry xmi:id="_65D4LVYBEeS0WsAAtVmToA" iconPath="/icons/portandflows/FlowPort.gif" bundleId="org.eclipse.papyrus.sysml"/>
+ <editHelperAdviceConfiguration xsi:type="elementtypesconfigurations:EditHelperAdviceConfiguration" xmi:id="_65D4LlYBEeS0WsAAtVmToA" editHelperAdviceClassName="org.eclipse.papyrus.sysml.service.types.helper.FlowPortInOutEditHelperAdvice"/>
+ <matcherConfiguration xsi:type="elementtypesconfigurations:MatcherConfiguration" xmi:id="_65D4L1YBEeS0WsAAtVmToA" matcherClassName="org.eclipse.papyrus.sysml.service.types.matcher.FlowPortInOutMatcher"/>
+ <specializedTypes xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.FlowPort"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.FlowPort_In" identifier="org.eclipse.papyrus.sysml.FlowPort_In" name="SysML::FlowPort_In" hint="SysML::FlowPort_In">
+ <iconEntry xmi:id="_65D4MVYBEeS0WsAAtVmToA" iconPath="/icons/portandflows/FlowPort.gif" bundleId="org.eclipse.papyrus.sysml"/>
+ <editHelperAdviceConfiguration xsi:type="elementtypesconfigurations:EditHelperAdviceConfiguration" xmi:id="_65D4MlYBEeS0WsAAtVmToA" editHelperAdviceClassName="org.eclipse.papyrus.sysml.service.types.helper.FlowPortInEditHelperAdvice"/>
+ <matcherConfiguration xsi:type="elementtypesconfigurations:MatcherConfiguration" xmi:id="_65D4M1YBEeS0WsAAtVmToA" matcherClassName="org.eclipse.papyrus.sysml.service.types.matcher.FlowPortInMatcher"/>
+ <specializedTypes xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.FlowPort"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.FlowPort_Out" identifier="org.eclipse.papyrus.sysml.FlowPort_Out" name="SysML::FlowPort_Out" hint="SysML::FlowPort_Out">
+ <iconEntry xmi:id="_65D4NVYBEeS0WsAAtVmToA" iconPath="/icons/portandflows/FlowPort.gif" bundleId="org.eclipse.papyrus.sysml"/>
+ <editHelperAdviceConfiguration xsi:type="elementtypesconfigurations:EditHelperAdviceConfiguration" xmi:id="_65D4NlYBEeS0WsAAtVmToA" editHelperAdviceClassName="org.eclipse.papyrus.sysml.service.types.helper.FlowPortOutEditHelperAdvice"/>
+ <matcherConfiguration xsi:type="elementtypesconfigurations:MatcherConfiguration" xmi:id="_65EfMFYBEeS0WsAAtVmToA" matcherClassName="org.eclipse.papyrus.sysml.service.types.matcher.FlowPortOutMatcher"/>
+ <specializedTypes xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.FlowPort"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.FlowPort_NA" identifier="org.eclipse.papyrus.sysml.FlowPort_NA" name="SysML::FlowPort_NA" hint="SysML::FlowPort_NA">
+ <iconEntry xmi:id="_65EfMlYBEeS0WsAAtVmToA" iconPath="/icons/portandflows/FlowPort_NA.gif" bundleId="org.eclipse.papyrus.sysml"/>
+ <editHelperAdviceConfiguration xsi:type="elementtypesconfigurations:EditHelperAdviceConfiguration" xmi:id="_65EfM1YBEeS0WsAAtVmToA" editHelperAdviceClassName="org.eclipse.papyrus.sysml.service.types.helper.FlowPortNAEditHelperAdvice"/>
+ <matcherConfiguration xsi:type="elementtypesconfigurations:MatcherConfiguration" xmi:id="_65EfNFYBEeS0WsAAtVmToA" matcherClassName="org.eclipse.papyrus.sysml.service.types.matcher.FlowPortNAMatcher"/>
+ <specializedTypes xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.service.types/model/sysml.elementtypesconfigurations#org.eclipse.papyrus.sysml.FlowPort"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.FlowProperty" identifier="org.eclipse.papyrus.sysml.FlowProperty" name="SysML::FlowProperty" hint="SysML::FlowProperty">
+ <iconEntry xmi:id="_65EfNlYBEeS0WsAAtVmToA" iconPath="/icons/portandflows/FlowProperty.gif" bundleId="org.eclipse.papyrus.sysml"/>
+ <editHelperAdviceConfiguration xsi:type="elementtypesconfigurations:EditHelperAdviceConfiguration" xmi:id="_65EfN1YBEeS0WsAAtVmToA" editHelperAdviceClassName="org.eclipse.papyrus.sysml.service.types.helper.FlowPropertyEditHelperAdvice"/>
+ <matcherConfiguration xsi:type="elementtypesconfigurations:MatcherConfiguration" xmi:id="_65EfOFYBEeS0WsAAtVmToA" matcherClassName="org.eclipse.papyrus.sysml.service.types.matcher.FlowPropertyMatcher"/>
+ <specializedTypes xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Property"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.FlowSpecification" identifier="org.eclipse.papyrus.sysml.FlowSpecification" name="SysML::FlowSpecification" hint="SysML::FlowSpecification">
+ <iconEntry xmi:id="_65EfOlYBEeS0WsAAtVmToA" iconPath="/icons/portandflows/FlowSpecification.gif" bundleId="org.eclipse.papyrus.sysml"/>
+ <editHelperAdviceConfiguration xsi:type="elementtypesconfigurations:EditHelperAdviceConfiguration" xmi:id="_65EfO1YBEeS0WsAAtVmToA" editHelperAdviceClassName="org.eclipse.papyrus.sysml.service.types.helper.FlowSpecificationEditHelperAdvice"/>
+ <matcherConfiguration xsi:type="elementtypesconfigurations:MatcherConfiguration" xmi:id="_65EfPFYBEeS0WsAAtVmToA" matcherClassName="org.eclipse.papyrus.sysml.service.types.matcher.FlowSpecificationMatcher"/>
+ <specializedTypes xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Interface"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.ItemFlow" identifier="org.eclipse.papyrus.sysml.ItemFlow" name="SysML::ItemFlow" hint="SysML::ItemFlow">
+ <iconEntry xmi:id="_65EfPlYBEeS0WsAAtVmToA" iconPath="/icons/portandflows/ItemFlow.gif" bundleId="org.eclipse.papyrus.sysml"/>
+ <editHelperAdviceConfiguration xsi:type="elementtypesconfigurations:EditHelperAdviceConfiguration" xmi:id="_65EfP1YBEeS0WsAAtVmToA" editHelperAdviceClassName="org.eclipse.papyrus.sysml.service.types.helper.ItemFlowEditHelperAdvice"/>
+ <matcherConfiguration xsi:type="elementtypesconfigurations:MatcherConfiguration" xmi:id="_65EfQFYBEeS0WsAAtVmToA" matcherClassName="org.eclipse.papyrus.sysml.service.types.matcher.ItemFlowMatcher"/>
+ <specializedTypes xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.InformationFlow"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.PartProperty" identifier="org.eclipse.papyrus.sysml.PartProperty" name="SysML::PartProperty" hint="SysML::PartProperty">
+ <iconEntry xmi:id="_65EfQlYBEeS0WsAAtVmToA" iconPath="/icons/full/obj16/Property.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <editHelperAdviceConfiguration xsi:type="elementtypesconfigurations:EditHelperAdviceConfiguration" xmi:id="_65EfQ1YBEeS0WsAAtVmToA" editHelperAdviceClassName="org.eclipse.papyrus.sysml.service.types.helper.PartPropertyEditHelperAdvice"/>
+ <matcherConfiguration xsi:type="elementtypesconfigurations:MatcherConfiguration" xmi:id="_65EfRFYBEeS0WsAAtVmToA" matcherClassName="org.eclipse.papyrus.sysml.service.types.matcher.PartPropertyMatcher"/>
+ <specializedTypes xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Property"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.Problem" identifier="org.eclipse.papyrus.sysml.Problem" name="SysML::Problem" hint="SysML::Problem">
+ <iconEntry xmi:id="_65EfRlYBEeS0WsAAtVmToA" iconPath="/icons/modelelements/Problem.gif" bundleId="org.eclipse.papyrus.sysml"/>
+ <editHelperAdviceConfiguration xsi:type="elementtypesconfigurations:EditHelperAdviceConfiguration" xmi:id="_65FGQFYBEeS0WsAAtVmToA" editHelperAdviceClassName="org.eclipse.papyrus.sysml.service.types.helper.ProblemEditHelperAdvice"/>
+ <matcherConfiguration xsi:type="elementtypesconfigurations:MatcherConfiguration" xmi:id="_65FGQVYBEeS0WsAAtVmToA" matcherClassName="org.eclipse.papyrus.sysml.service.types.matcher.ProblemMatcher"/>
+ <specializedTypes xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Comment"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.Rationale" identifier="org.eclipse.papyrus.sysml.Rationale" name="SysML::Rationale" hint="SysML::Rationale">
+ <iconEntry xmi:id="_65FGQ1YBEeS0WsAAtVmToA" iconPath="/icons/modelelements/Rationale.gif" bundleId="org.eclipse.papyrus.sysml"/>
+ <editHelperAdviceConfiguration xsi:type="elementtypesconfigurations:EditHelperAdviceConfiguration" xmi:id="_65FGRFYBEeS0WsAAtVmToA" editHelperAdviceClassName="org.eclipse.papyrus.sysml.service.types.helper.RationaleEditHelperAdvice"/>
+ <matcherConfiguration xsi:type="elementtypesconfigurations:MatcherConfiguration" xmi:id="_65FGRVYBEeS0WsAAtVmToA" matcherClassName="org.eclipse.papyrus.sysml.service.types.matcher.RationaleMatcher"/>
+ <specializedTypes xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Comment"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.ReferenceProperty" identifier="org.eclipse.papyrus.sysml.ReferenceProperty" name="SysML::ReferenceProperty" hint="SysML::ReferenceProperty">
+ <iconEntry xmi:id="_65FGR1YBEeS0WsAAtVmToA" iconPath="/icons/full/obj16/Property.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <editHelperAdviceConfiguration xsi:type="elementtypesconfigurations:EditHelperAdviceConfiguration" xmi:id="_65FGSFYBEeS0WsAAtVmToA" editHelperAdviceClassName="org.eclipse.papyrus.sysml.service.types.helper.ReferencePropertyEditHelperAdvice"/>
+ <matcherConfiguration xsi:type="elementtypesconfigurations:MatcherConfiguration" xmi:id="_65FGSVYBEeS0WsAAtVmToA" matcherClassName="org.eclipse.papyrus.sysml.service.types.matcher.ReferencePropertyMatcher"/>
+ <specializedTypes xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Property"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.Requirement" identifier="org.eclipse.papyrus.sysml.Requirement" name="SysML::Requirement" hint="SysML::Requirement">
+ <iconEntry xmi:id="_65FGS1YBEeS0WsAAtVmToA" iconPath="/icons/requirements/Requirement.gif" bundleId="org.eclipse.papyrus.sysml"/>
+ <editHelperAdviceConfiguration xsi:type="elementtypesconfigurations:EditHelperAdviceConfiguration" xmi:id="_65FGTFYBEeS0WsAAtVmToA" editHelperAdviceClassName="org.eclipse.papyrus.sysml.service.types.helper.RequirementEditHelperAdvice"/>
+ <matcherConfiguration xsi:type="elementtypesconfigurations:MatcherConfiguration" xmi:id="_65FGTVYBEeS0WsAAtVmToA" matcherClassName="org.eclipse.papyrus.sysml.service.types.matcher.RequirementMatcher"/>
+ <specializedTypes xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Class"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.Satisfy" identifier="org.eclipse.papyrus.sysml.Satisfy" name="SysML::Satisfy" hint="SysML::Satisfy">
+ <iconEntry xmi:id="_65FGT1YBEeS0WsAAtVmToA" iconPath="/icons/requirements/Satisfy.gif" bundleId="org.eclipse.papyrus.sysml"/>
+ <editHelperAdviceConfiguration xsi:type="elementtypesconfigurations:EditHelperAdviceConfiguration" xmi:id="_65FGUFYBEeS0WsAAtVmToA" editHelperAdviceClassName="org.eclipse.papyrus.sysml.service.types.helper.SatisfyEditHelperAdvice"/>
+ <matcherConfiguration xsi:type="elementtypesconfigurations:MatcherConfiguration" xmi:id="_65FGUVYBEeS0WsAAtVmToA" matcherClassName="org.eclipse.papyrus.sysml.service.types.matcher.SatisfyMatcher"/>
+ <specializedTypes xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Abstraction"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.Unit" identifier="org.eclipse.papyrus.sysml.Unit" name="SysML::Unit" hint="SysML::Unit">
+ <iconEntry xmi:id="_65FtUVYBEeS0WsAAtVmToA" iconPath="/icons/blocks/Unit.gif" bundleId="org.eclipse.papyrus.sysml"/>
+ <editHelperAdviceConfiguration xsi:type="elementtypesconfigurations:EditHelperAdviceConfiguration" xmi:id="_65FtUlYBEeS0WsAAtVmToA" editHelperAdviceClassName="org.eclipse.papyrus.sysml.service.types.helper.UnitEditHelperAdvice"/>
+ <matcherConfiguration xsi:type="elementtypesconfigurations:MatcherConfiguration" xmi:id="_65FtU1YBEeS0WsAAtVmToA" matcherClassName="org.eclipse.papyrus.sysml.service.types.matcher.UnitMatcher"/>
+ <specializedTypes xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.InstanceSpecification"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.ValueProperty" identifier="org.eclipse.papyrus.sysml.ValueProperty" name="SysML::ValueProperty" hint="SysML::ValueProperty">
+ <iconEntry xmi:id="_65FtVVYBEeS0WsAAtVmToA" iconPath="/icons/full/obj16/Property.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <editHelperAdviceConfiguration xsi:type="elementtypesconfigurations:EditHelperAdviceConfiguration" xmi:id="_65FtVlYBEeS0WsAAtVmToA" editHelperAdviceClassName="org.eclipse.papyrus.sysml.service.types.helper.ValuePropertyEditHelperAdvice"/>
+ <matcherConfiguration xsi:type="elementtypesconfigurations:MatcherConfiguration" xmi:id="_65FtV1YBEeS0WsAAtVmToA" matcherClassName="org.eclipse.papyrus.sysml.service.types.matcher.ValuePropertyMatcher"/>
+ <specializedTypes xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Property"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.ValueType" identifier="org.eclipse.papyrus.sysml.ValueType" name="SysML::ValueType" hint="SysML::ValueType">
+ <iconEntry xmi:id="_65FtWVYBEeS0WsAAtVmToA" iconPath="/icons/blocks/ValueType.gif" bundleId="org.eclipse.papyrus.sysml"/>
+ <editHelperAdviceConfiguration xsi:type="elementtypesconfigurations:EditHelperAdviceConfiguration" xmi:id="_65FtWlYBEeS0WsAAtVmToA" editHelperAdviceClassName="org.eclipse.papyrus.sysml.service.types.helper.ValueTypeEditHelperAdvice"/>
+ <matcherConfiguration xsi:type="elementtypesconfigurations:MatcherConfiguration" xmi:id="_65FtW1YBEeS0WsAAtVmToA" matcherClassName="org.eclipse.papyrus.sysml.service.types.matcher.ValueTypeMatcher"/>
+ <specializedTypes xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.DataType"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.ValueType_Enumeration" identifier="org.eclipse.papyrus.sysml.ValueType_Enumeration" name="SysML::ValueType_Enumeration" hint="SysML::ValueType_Enumeration">
+ <iconEntry xmi:id="_65FtXVYBEeS0WsAAtVmToA" iconPath="/icons/blocks/ValueType.gif" bundleId="org.eclipse.papyrus.sysml"/>
+ <editHelperAdviceConfiguration xsi:type="elementtypesconfigurations:EditHelperAdviceConfiguration" xmi:id="_65FtXlYBEeS0WsAAtVmToA" editHelperAdviceClassName="org.eclipse.papyrus.sysml.service.types.helper.ValueTypeEditHelperAdvice"/>
+ <matcherConfiguration xsi:type="elementtypesconfigurations:MatcherConfiguration" xmi:id="_65FtX1YBEeS0WsAAtVmToA" matcherClassName="org.eclipse.papyrus.sysml.service.types.matcher.ValueTypeEnumerationMatcher"/>
+ <specializedTypes xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Enumeration"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.ValueType_PrimitiveType" identifier="org.eclipse.papyrus.sysml.ValueType_PrimitiveType" name="SysML::ValueType_PrimitiveType" hint="SysML::ValueType_PrimitiveType">
+ <iconEntry xmi:id="_65FtYVYBEeS0WsAAtVmToA" iconPath="/icons/blocks/ValueType.gif" bundleId="org.eclipse.papyrus.sysml"/>
+ <editHelperAdviceConfiguration xsi:type="elementtypesconfigurations:EditHelperAdviceConfiguration" xmi:id="_65FtYlYBEeS0WsAAtVmToA" editHelperAdviceClassName="org.eclipse.papyrus.sysml.service.types.helper.ValueTypeEditHelperAdvice"/>
+ <matcherConfiguration xsi:type="elementtypesconfigurations:MatcherConfiguration" xmi:id="_65FtY1YBEeS0WsAAtVmToA" matcherClassName="org.eclipse.papyrus.sysml.service.types.matcher.ValueTypePrimitiveTypeMatcher"/>
+ <specializedTypes xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.PrimitiveType"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.Verify" identifier="org.eclipse.papyrus.sysml.Verify" name="SysML::Verify" hint="SysML::Verify">
+ <iconEntry xmi:id="_65GUYVYBEeS0WsAAtVmToA" iconPath="/icons/requirements/Verify.gif" bundleId="org.eclipse.papyrus.sysml"/>
+ <editHelperAdviceConfiguration xsi:type="elementtypesconfigurations:EditHelperAdviceConfiguration" xmi:id="_65GUYlYBEeS0WsAAtVmToA" editHelperAdviceClassName="org.eclipse.papyrus.sysml.service.types.helper.VerifyEditHelperAdvice"/>
+ <matcherConfiguration xsi:type="elementtypesconfigurations:MatcherConfiguration" xmi:id="_65GUY1YBEeS0WsAAtVmToA" matcherClassName="org.eclipse.papyrus.sysml.service.types.matcher.VerifyMatcher"/>
+ <specializedTypes xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Abstraction"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.View" identifier="org.eclipse.papyrus.sysml.View" name="SysML::View" hint="SysML::View">
+ <iconEntry xmi:id="_65GUZVYBEeS0WsAAtVmToA" iconPath="/icons/modelelements/View.gif" bundleId="org.eclipse.papyrus.sysml"/>
+ <editHelperAdviceConfiguration xsi:type="elementtypesconfigurations:EditHelperAdviceConfiguration" xmi:id="_65GUZlYBEeS0WsAAtVmToA" editHelperAdviceClassName="org.eclipse.papyrus.sysml.service.types.helper.ViewEditHelperAdvice"/>
+ <matcherConfiguration xsi:type="elementtypesconfigurations:MatcherConfiguration" xmi:id="_65GUZ1YBEeS0WsAAtVmToA" matcherClassName="org.eclipse.papyrus.sysml.service.types.matcher.ViewMatcher"/>
+ <specializedTypes xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Package"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.ViewPoint" identifier="org.eclipse.papyrus.sysml.ViewPoint" name="SysML::ViewPoint" hint="SysML::ViewPoint">
+ <iconEntry xmi:id="_65GUaVYBEeS0WsAAtVmToA" iconPath="/icons/modelelements/Viewpoint.gif" bundleId="org.eclipse.papyrus.sysml"/>
+ <editHelperAdviceConfiguration xsi:type="elementtypesconfigurations:EditHelperAdviceConfiguration" xmi:id="_65GUalYBEeS0WsAAtVmToA" editHelperAdviceClassName="org.eclipse.papyrus.sysml.service.types.helper.ViewPointEditHelperAdvice"/>
+ <matcherConfiguration xsi:type="elementtypesconfigurations:MatcherConfiguration" xmi:id="_65GUa1YBEeS0WsAAtVmToA" matcherClassName="org.eclipse.papyrus.sysml.service.types.matcher.ViewPointMatcher"/>
+ <specializedTypes xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Class"/>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="org.eclipse.papyrus.sysml.ConstraintBlockParameter" identifier="org.eclipse.papyrus.sysml.ConstraintBlockParameter" name="SysML::ConstraintBlockParameter" hint="SysML::ConstraintBlockParameter">
+ <iconEntry xmi:id="_2MWa8FYNEeSSidqjsigY_Q" iconPath="/icons/full/obj16/Property.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <editHelperAdviceConfiguration xsi:type="elementtypesconfigurations:EditHelperAdviceConfiguration" xmi:id="_pV9-YFYNEeSSidqjsigY_Q" editHelperAdviceClassName="org.eclipse.papyrus.sysml.service.types.helper.ConstraintParameterEditHelperAdvice"/>
+ <matcherConfiguration xsi:type="elementtypesconfigurations:MatcherConfiguration" xmi:id="_4QgrEFYNEeSSidqjsigY_Q" matcherClassName="org.eclipse.papyrus.sysml.service.types.matcher.NoMatcher"/>
+ <specializedTypes xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Property"/>
+ </elementTypeConfigurations>
+ <adviceBindingsConfigurations xsi:type="elementtypesconfigurations:AdviceBindingConfiguration" xmi:id="_65IJkFYBEeS0WsAAtVmToA" identifier="org.eclipse.papyrus.sysml.advice.ConstraintBlockPropertyHelperAdvice" inheritance="all" editHelperAdviceClassName="org.eclipse.papyrus.sysml.service.types.helper.ConstraintBlockPropertyEditHelperAdvice">
+ <target xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="../../../plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Property"/>
+ </adviceBindingsConfigurations>
+ <adviceBindingsConfigurations xsi:type="elementtypesconfigurations:AdviceBindingConfiguration" xmi:id="_Kse4IFYDEeS0WsAAtVmToA" identifier="org.eclipse.papyrus.sysml.advice.Classifier" inheritance="all" editHelperAdviceClassName="org.eclipse.papyrus.sysml.service.types.helper.advice.ClassifierEditHelperAdvice">
+ <target xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="../../../plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Classifier"/>
+ </adviceBindingsConfigurations>
+ <adviceBindingsConfigurations xsi:type="elementtypesconfigurations:AdviceBindingConfiguration" xmi:id="_XFKsEFYDEeS0WsAAtVmToA" identifier="org.eclipse.papyrus.sysml.advice.BlockConnector" target="org.eclipse.papyrus.sysml.Block" inheritance="all" editHelperAdviceClassName="org.eclipse.papyrus.sysml.service.types.helper.advice.BlockConnectorEditHelperAdvice"/>
+ <adviceBindingsConfigurations xsi:type="elementtypesconfigurations:AdviceBindingConfiguration" xmi:id="_iARuwFYDEeS0WsAAtVmToA" identifier="org.eclipse.papyrus.sysml.advice.Connector" inheritance="all" editHelperAdviceClassName="org.eclipse.papyrus.sysml.service.types.helper.advice.ConnectorEditHelperAdvice">
+ <target xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="../../../plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Connector"/>
+ </adviceBindingsConfigurations>
+ <adviceBindingsConfigurations xsi:type="elementtypesconfigurations:AdviceBindingConfiguration" xmi:id="_pCAFEFYDEeS0WsAAtVmToA" identifier="org.eclipse.papyrus.sysml.advice.Property" inheritance="all" editHelperAdviceClassName="org.eclipse.papyrus.sysml.service.types.helper.advice.PropertyEditHelperAdvice">
+ <target xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="../../../plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Property"/>
+ </adviceBindingsConfigurations>
+ <adviceBindingsConfigurations xsi:type="elementtypesconfigurations:AdviceBindingConfiguration" xmi:id="_vpsKwFYDEeS0WsAAtVmToA" identifier="org.eclipse.papyrus.sysml.advice.Package" inheritance="all" editHelperAdviceClassName="org.eclipse.papyrus.sysml.service.types.helper.advice.PackageEditHelperAdvice">
+ <target xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="../../../plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Package"/>
+ </adviceBindingsConfigurations>
+ <adviceBindingsConfigurations xsi:type="elementtypesconfigurations:AdviceBindingConfiguration" xmi:id="_2t_7AFYDEeS0WsAAtVmToA" identifier="org.eclipse.papyrus.sysml.advice.Actor" inheritance="all" editHelperAdviceClassName="org.eclipse.papyrus.sysml.service.types.helper.advice.ActorEditHelperAdvice">
+ <target xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="../../../plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Actor"/>
+ </adviceBindingsConfigurations>
+</elementtypesconfigurations:ElementTypeSetConfiguration>
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/plugin.properties b/plugins/org.eclipse.papyrus.sysml.service.types/plugin.properties
new file mode 100755
index 0000000..382f2f9
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/plugin.properties
@@ -0,0 +1,16 @@
+##########################################################################################
+# Copyright (c) 2010 CEA LIST.
+#
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+#
+########################################################################################
+pluginName= Papyrus SysML ElementType Service
+providerName=Eclipse Modeling Project
+
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/plugin.xml b/plugins/org.eclipse.papyrus.sysml.service.types/plugin.xml
new file mode 100755
index 0000000..6bc1259
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/plugin.xml
@@ -0,0 +1,372 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+
+
+<!-- SysML ElementType bindings to Papyrus shared IClientContext -->
+<extension point="org.eclipse.ui.commands">
+
+ <!-- Creation command for ActorPart -->
+ <command categoryId="org.eclipse.papyrus.sysml.service.types.sysmlElementCreationCommands" description="Create a new ActorPart" id="org.eclipse.papyrus.sysml.service.types.ActorPartCreateCommand" name="Create a new ActorPart">
+ </command>
+
+ <!-- Creation command for Allocate -->
+ <command categoryId="org.eclipse.papyrus.sysml.service.types.sysmlElementCreationCommands" description="Create a new Allocate" id="org.eclipse.papyrus.sysml.service.types.AllocateCreateCommand" name="Create a new Allocate">
+ </command>
+
+ <!-- Creation command for Association -->
+ <command categoryId="org.eclipse.papyrus.sysml.service.types.sysmlElementCreationCommands" description="Create a new Association" id="org.eclipse.papyrus.sysml.service.types.AssociationCreateCommand" name="Create a new Association">
+ </command>
+
+ <!-- Creation command for AssociationComposite -->
+ <command categoryId="org.eclipse.papyrus.sysml.service.types.sysmlElementCreationCommands" description="Create a new AssociationComposite" id="org.eclipse.papyrus.sysml.service.types.AssociationCompositeCreateCommand" name="Create a new AssociationComposite">
+ </command>
+
+ <!-- Creation command for AssociationCompositeDirected -->
+ <command categoryId="org.eclipse.papyrus.sysml.service.types.sysmlElementCreationCommands" description="Create a new AssociationCompositeDirected" id="org.eclipse.papyrus.sysml.service.types.AssociationCompositeDirectedCreateCommand" name="Create a new AssociationCompositeDirected">
+ </command>
+
+ <!-- Creation command for AssociationNone -->
+ <command categoryId="org.eclipse.papyrus.sysml.service.types.sysmlElementCreationCommands" description="Create a new AssociationNone" id="org.eclipse.papyrus.sysml.service.types.AssociationNoneCreateCommand" name="Create a new AssociationNone">
+ </command>
+
+ <!-- Creation command for AssociationNoneDirected -->
+ <command categoryId="org.eclipse.papyrus.sysml.service.types.sysmlElementCreationCommands" description="Create a new AssociationNoneDirected" id="org.eclipse.papyrus.sysml.service.types.AssociationNoneDirectedCreateCommand" name="Create a new AssociationNoneDirected">
+ </command>
+
+ <!-- Creation command for AssociationShared -->
+ <command categoryId="org.eclipse.papyrus.sysml.service.types.sysmlElementCreationCommands" description="Create a new AssociationShared" id="org.eclipse.papyrus.sysml.service.types.AssociationSharedCreateCommand" name="Create a new AssociationShared">
+ </command>
+
+ <!-- Creation command for AssociationSharedDirected -->
+ <command categoryId="org.eclipse.papyrus.sysml.service.types.sysmlElementCreationCommands" description="Create a new AssociationSharedDirected" id="org.eclipse.papyrus.sysml.service.types.AssociationSharedDirectedCreateCommand" name="Create a new AssociationSharedDirected">
+ </command>
+
+ <!-- Creation command for Block -->
+ <command categoryId="org.eclipse.papyrus.sysml.service.types.sysmlElementCreationCommands" description="Create a new Block" id="org.eclipse.papyrus.sysml.service.types.BlockCreateCommand" name="Create a new Block">
+ </command>
+
+ <!-- Creation command for Conform -->
+ <command categoryId="org.eclipse.papyrus.sysml.service.types.sysmlElementCreationCommands" description="Create a new Conform" id="org.eclipse.papyrus.sysml.service.types.ConformCreateCommand" name="Create a new Conform">
+ </command>
+
+ <!-- Creation command for ConstraintBlock -->
+ <command categoryId="org.eclipse.papyrus.sysml.service.types.sysmlElementCreationCommands" description="Create a new ConstraintBlock" id="org.eclipse.papyrus.sysml.service.types.ConstraintBlockCreateCommand" name="Create a new ConstraintBlock">
+ </command>
+
+ <!-- Creation command for ConstraintBlockParameter -->
+ <command categoryId="org.eclipse.papyrus.sysml.service.types.sysmlElementCreationCommands" description="Create a new Parameter" id="org.eclipse.papyrus.sysml.service.types.ConstraintBlockParameterCreateCommand" name="Create a new Parameter">
+ </command>
+
+ <!-- Creation command for ConstraintProperty -->
+ <command categoryId="org.eclipse.papyrus.sysml.service.types.sysmlElementCreationCommands" description="Create a new ConstraintProperty" id="org.eclipse.papyrus.sysml.service.types.ConstraintPropertyCreateCommand" name="Create a new ConstraintProperty">
+ </command>
+
+ <!-- Creation command for Copy -->
+ <command categoryId="org.eclipse.papyrus.sysml.service.types.sysmlElementCreationCommands" description="Create a new Copy" id="org.eclipse.papyrus.sysml.service.types.CopyCreateCommand" name="Create a new Copy">
+ </command>
+
+ <!-- Creation command for DeriveReqt -->
+ <command categoryId="org.eclipse.papyrus.sysml.service.types.sysmlElementCreationCommands" description="Create a new DeriveReqt" id="org.eclipse.papyrus.sysml.service.types.DeriveReqtCreateCommand" name="Create a new DeriveReqt">
+ </command>
+
+ <!-- Creation command for Dimension -->
+ <command categoryId="org.eclipse.papyrus.sysml.service.types.sysmlElementCreationCommands" description="Create a new Dimension" id="org.eclipse.papyrus.sysml.service.types.DimensionCreateCommand" name="Create a new Dimension">
+ </command>
+
+ <!-- Creation command for FlowPort -->
+ <command categoryId="org.eclipse.papyrus.sysml.service.types.sysmlElementCreationCommands" description="Create a new FlowPort" id="org.eclipse.papyrus.sysml.service.types.FlowPortCreateCommand" name="Create a new FlowPort">
+ </command>
+
+ <!-- Creation command for FlowPort_InOut -->
+ <command categoryId="org.eclipse.papyrus.sysml.service.types.sysmlElementCreationCommands" description="Create a new FlowPort_InOut" id="org.eclipse.papyrus.sysml.service.types.FlowPort_InOutCreateCommand" name="Create a new FlowPort_InOut">
+ </command>
+
+ <!-- Creation command for FlowPort_In -->
+ <command categoryId="org.eclipse.papyrus.sysml.service.types.sysmlElementCreationCommands" description="Create a new FlowPort_In" id="org.eclipse.papyrus.sysml.service.types.FlowPort_InCreateCommand" name="Create a new FlowPort_In">
+ </command>
+
+ <!-- Creation command for FlowPort_Out -->
+ <command categoryId="org.eclipse.papyrus.sysml.service.types.sysmlElementCreationCommands" description="Create a new FlowPort_Out" id="org.eclipse.papyrus.sysml.service.types.FlowPort_OutCreateCommand" name="Create a new FlowPort_Out">
+ </command>
+
+ <!-- Creation command for FlowPort_NA -->
+ <command categoryId="org.eclipse.papyrus.sysml.service.types.sysmlElementCreationCommands" description="Create a new FlowPort (non atomic)" id="org.eclipse.papyrus.sysml.service.types.FlowPort_NACreateCommand" name="Create a new FlowPort (non atomic)">
+ </command>
+
+ <!-- Creation command for FlowProperty -->
+ <command categoryId="org.eclipse.papyrus.sysml.service.types.sysmlElementCreationCommands" description="Create a new FlowProperty" id="org.eclipse.papyrus.sysml.service.types.FlowPropertyCreateCommand" name="Create a new FlowProperty">
+ </command>
+
+ <!-- Creation command for FlowSpecification -->
+ <command categoryId="org.eclipse.papyrus.sysml.service.types.sysmlElementCreationCommands" description="Create a new FlowSpecification" id="org.eclipse.papyrus.sysml.service.types.FlowSpecificationCreateCommand" name="Create a new FlowSpecification">
+ </command>
+
+ <!-- Creation command for ItemFlow -->
+ <command categoryId="org.eclipse.papyrus.sysml.service.types.sysmlElementCreationCommands" description="Create a new ItemFlow" id="org.eclipse.papyrus.sysml.service.types.ItemFlowCreateCommand" name="Create a new ItemFlow">
+ </command>
+
+ <!-- Creation command for PartProperty -->
+ <command categoryId="org.eclipse.papyrus.sysml.service.types.sysmlElementCreationCommands" description="Create a new PartProperty" id="org.eclipse.papyrus.sysml.service.types.PartPropertyCreateCommand" name="Create a new PartProperty">
+ </command>
+
+ <!-- Creation command for Problem -->
+ <command categoryId="org.eclipse.papyrus.sysml.service.types.sysmlElementCreationCommands" description="Create a new Problem" id="org.eclipse.papyrus.sysml.service.types.ProblemCreateCommand" name="Create a new Problem">
+ </command>
+
+ <!-- Creation command for Rationale -->
+ <command categoryId="org.eclipse.papyrus.sysml.service.types.sysmlElementCreationCommands" description="Create a new Rationale" id="org.eclipse.papyrus.sysml.service.types.RationaleCreateCommand" name="Create a new Rationale">
+ </command>
+
+ <!-- Creation command for ReferenceProperty -->
+ <command categoryId="org.eclipse.papyrus.sysml.service.types.sysmlElementCreationCommands" description="Create a new ReferenceProperty" id="org.eclipse.papyrus.sysml.service.types.ReferencePropertyCreateCommand" name="Create a new ReferenceProperty">
+ </command>
+
+ <!-- Creation command for Requirement -->
+ <command categoryId="org.eclipse.papyrus.sysml.service.types.sysmlElementCreationCommands" description="Create a new Requirement" id="org.eclipse.papyrus.sysml.service.types.RequirementCreateCommand" name="Create a new Requirement">
+ </command>
+
+ <!-- Creation command for Satisfy -->
+ <command categoryId="org.eclipse.papyrus.sysml.service.types.sysmlElementCreationCommands" description="Create a new Satisfy" id="org.eclipse.papyrus.sysml.service.types.SatisfyCreateCommand" name="Create a new Satisfy">
+ </command>
+
+ <!-- Creation command for Unit -->
+ <command categoryId="org.eclipse.papyrus.sysml.service.types.sysmlElementCreationCommands" description="Create a new Unit" id="org.eclipse.papyrus.sysml.service.types.UnitCreateCommand" name="Create a new Unit">
+ </command>
+
+ <!-- Creation command for ValueProperty -->
+ <command categoryId="org.eclipse.papyrus.sysml.service.types.sysmlElementCreationCommands" description="Create a new ValueProperty" id="org.eclipse.papyrus.sysml.service.types.ValuePropertyCreateCommand" name="Create a new ValueProperty">
+ </command>
+
+ <!-- Creation command for ValueType -->
+ <command categoryId="org.eclipse.papyrus.sysml.service.types.sysmlElementCreationCommands" description="Create a new ValueType" id="org.eclipse.papyrus.sysml.service.types.ValueTypeCreateCommand" name="Create a new ValueType">
+ </command>
+
+ <!-- Creation command for ValueType_Enumeration -->
+ <command categoryId="org.eclipse.papyrus.sysml.service.types.sysmlElementCreationCommands" description="Create a new ValueType_Enumeration" id="org.eclipse.papyrus.sysml.service.types.ValueType_EnumerationCreateCommand" name="Create a new ValueType_Enumeration">
+ </command>
+
+ <!-- Creation command for ValueType_PrimitiveType -->
+ <command categoryId="org.eclipse.papyrus.sysml.service.types.sysmlElementCreationCommands" description="Create a new ValueType_PrimitiveType" id="org.eclipse.papyrus.sysml.service.types.ValueType_PrimitiveTypeCreateCommand" name="Create a new ValueType_PrimitiveType">
+ </command>
+
+ <!-- Creation command for Verify -->
+ <command categoryId="org.eclipse.papyrus.sysml.service.types.sysmlElementCreationCommands" description="Create a new Verify" id="org.eclipse.papyrus.sysml.service.types.VerifyCreateCommand" name="Create a new Verify">
+ </command>
+
+ <!-- Creation command for View -->
+ <command categoryId="org.eclipse.papyrus.sysml.service.types.sysmlElementCreationCommands" description="Create a new View" id="org.eclipse.papyrus.sysml.service.types.ViewCreateCommand" name="Create a new View">
+ </command>
+
+ <!-- Creation command for ViewPoint -->
+ <command categoryId="org.eclipse.papyrus.sysml.service.types.sysmlElementCreationCommands" description="Create a new ViewPoint" id="org.eclipse.papyrus.sysml.service.types.ViewPointCreateCommand" name="Create a new ViewPoint">
+ </command>
+
+ <!-- Category for the creation of Sysml elements-->
+
+</extension>
+<extension
+ point="org.eclipse.ui.commands">
+ <category
+ id="org.eclipse.papyrus.sysml.service.types.sysmlElementCreationCommands"
+ name="Commands for the creation of Sysml elements">
+ </category>
+</extension>
+<extension
+ point="org.eclipse.ui.commandImages">
+
+ <image commandId="org.eclipse.papyrus.sysml.service.types.ActorPartCreateCommand" icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif">
+
+ </image>
+
+ <image commandId="org.eclipse.papyrus.sysml.service.types.AllocateCreateCommand" icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Abstraction.gif">
+
+ </image>
+
+
+ <image commandId="org.eclipse.papyrus.sysml.service.types.AssociationCreateCommand" icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif">
+
+ </image>
+
+
+ <image commandId="org.eclipse.papyrus.sysml.service.types.AssociationCompositeCreateCommand" icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif">
+
+ </image>
+
+
+ <image commandId="org.eclipse.papyrus.sysml.service.types.AssociationCompositeDirectedCreateCommand" icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif">
+
+ </image>
+
+
+ <image commandId="org.eclipse.papyrus.sysml.service.types.AssociationNoneCreateCommand" icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif">
+
+ </image>
+
+
+ <image commandId="org.eclipse.papyrus.sysml.service.types.AssociationNoneDirectedCreateCommand" icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif">
+
+ </image>
+
+
+ <image commandId="org.eclipse.papyrus.sysml.service.types.AssociationSharedCreateCommand" icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif">
+
+ </image>
+
+
+ <image commandId="org.eclipse.papyrus.sysml.service.types.AssociationSharedDirectedCreateCommand" icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif">
+
+ </image>
+
+
+ <image commandId="org.eclipse.papyrus.sysml.service.types.BlockCreateCommand" icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/blocks/Block.gif">
+
+ </image>
+
+
+ <image commandId="org.eclipse.papyrus.sysml.service.types.ConformCreateCommand" icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/modelelements/Conform.gif">
+
+ </image>
+
+
+ <image commandId="org.eclipse.papyrus.sysml.service.types.ConstraintBlockCreateCommand" icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/constraints/ConstraintBlock.gif">
+
+ </image>
+
+
+ <image commandId="org.eclipse.papyrus.sysml.service.types.ConstraintBlockParameterCreateCommand" icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif">
+
+ </image>
+
+
+ <image commandId="org.eclipse.papyrus.sysml.service.types.ConstraintPropertyCreateCommand" icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/constraints/ConstraintProperty.gif">
+
+ </image>
+
+
+ <image commandId="org.eclipse.papyrus.sysml.service.types.CopyCreateCommand" icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/requirements/Copy.gif">
+
+ </image>
+
+
+ <image commandId="org.eclipse.papyrus.sysml.service.types.DeriveReqtCreateCommand" icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/requirements/DeriveReqt.gif">
+
+ </image>
+
+
+ <image commandId="org.eclipse.papyrus.sysml.service.types.DimensionCreateCommand" icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/blocks/Dimension.gif">
+
+ </image>
+
+
+ <image commandId="org.eclipse.papyrus.sysml.service.types.FlowPortCreateCommand" icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/portandflows/FlowPort.gif">
+
+ </image>
+
+
+ <image commandId="org.eclipse.papyrus.sysml.service.types.FlowPort_InOutCreateCommand" icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/portandflows/FlowPort_INOUT.gif">
+
+ </image>
+
+
+ <image commandId="org.eclipse.papyrus.sysml.service.types.FlowPort_InCreateCommand" icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/portandflows/FlowPort_IN.gif">
+
+ </image>
+
+
+ <image commandId="org.eclipse.papyrus.sysml.service.types.FlowPort_OutCreateCommand" icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/portandflows/FlowPort_OUT.gif">
+
+ </image>
+
+
+ <image commandId="org.eclipse.papyrus.sysml.service.types.FlowPort_NACreateCommand" icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/portandflows/FlowPort_NA.gif">
+
+ </image>
+
+
+ <image commandId="org.eclipse.papyrus.sysml.service.types.FlowPropertyCreateCommand" icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/portandflows/FlowProperty.gif">
+
+ </image>
+
+
+ <image commandId="org.eclipse.papyrus.sysml.service.types.FlowSpecificationCreateCommand" icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/portandflows/FlowSpecification.gif">
+
+ </image>
+
+
+ <image commandId="org.eclipse.papyrus.sysml.service.types.ItemFlowCreateCommand" icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/portandflows/ItemFlow.gif">
+
+ </image>
+
+
+ <image commandId="org.eclipse.papyrus.sysml.service.types.PartPropertyCreateCommand" icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif">
+
+ </image>
+
+
+ <image commandId="org.eclipse.papyrus.sysml.service.types.ProblemCreateCommand" icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/modelelements/Problem.gif">
+
+ </image>
+
+
+ <image commandId="org.eclipse.papyrus.sysml.service.types.RationaleCreateCommand" icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/modelelements/Rationale.gif">
+
+ </image>
+
+
+ <image commandId="org.eclipse.papyrus.sysml.service.types.ReferencePropertyCreateCommand" icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif">
+
+ </image>
+
+
+ <image commandId="org.eclipse.papyrus.sysml.service.types.RequirementCreateCommand" icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/requirements/Requirement.gif">
+
+ </image>
+
+
+ <image commandId="org.eclipse.papyrus.sysml.service.types.SatisfyCreateCommand" icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/requirements/Satisfy.gif">
+
+ </image>
+
+
+ <image commandId="org.eclipse.papyrus.sysml.service.types.UnitCreateCommand" icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/blocks/Unit.gif">
+
+ </image>
+
+
+ <image commandId="org.eclipse.papyrus.sysml.service.types.ValuePropertyCreateCommand" icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif">
+
+ </image>
+
+
+ <image commandId="org.eclipse.papyrus.sysml.service.types.ValueTypeCreateCommand" icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/blocks/ValueType.gif">
+
+ </image>
+
+
+ <image commandId="org.eclipse.papyrus.sysml.service.types.ValueType_EnumerationCreateCommand" icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/blocks/ValueType.gif">
+
+ </image>
+
+
+ <image commandId="org.eclipse.papyrus.sysml.service.types.ValueType_PrimitiveTypeCreateCommand" icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/blocks/ValueType.gif">
+
+ </image>
+
+
+ <image commandId="org.eclipse.papyrus.sysml.service.types.VerifyCreateCommand" icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/requirements/Verify.gif">
+
+ </image>
+
+
+ <image commandId="org.eclipse.papyrus.sysml.service.types.ViewCreateCommand" icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/modelelements/View.gif">
+
+ </image>
+
+
+ <image commandId="org.eclipse.papyrus.sysml.service.types.ViewPointCreateCommand" icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/modelelements/Viewpoint.gif">
+
+ </image>
+</extension>
+</plugin>
+
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/pom.xml b/plugins/org.eclipse.papyrus.sysml.service.types/pom.xml
new file mode 100755
index 0000000..58478bb
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/pom.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>org.eclipse.papyrus.sysml</artifactId>
+ <groupId>org.eclipse.papyrus.sysml</groupId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.papyrus.sysml.service.types</artifactId>
+ <version>2.0.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project>
\ No newline at end of file
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src-gen/org/eclipse/papyrus/sysml/service/types/element/SysMLElementTypes.java b/plugins/org.eclipse.papyrus.sysml.service.types/src-gen/org/eclipse/papyrus/sysml/service/types/element/SysMLElementTypes.java
new file mode 100755
index 0000000..0ebf923
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src-gen/org/eclipse/papyrus/sysml/service/types/element/SysMLElementTypes.java
@@ -0,0 +1,137 @@
+/*****************************************************************************
+ * Copyright (c) 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:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.element;
+
+import org.eclipse.gmf.runtime.emf.type.core.AbstractElementTypeEnumerator;
+import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
+
+/** Convenient utility class listing IElementType declared in plugin.xml */
+public class SysMLElementTypes extends AbstractElementTypeEnumerator {
+
+ /** Constant for SysML nature */
+ public static final String SYSML_NATURE = "SysML_Nature";
+
+ /** IElementType for SysML ActorPartProperty */
+ public static final IHintedType ACTOR_PART_PROPERTY = (IHintedType) getElementType("org.eclipse.papyrus.sysml.ActorPartProperty"); //$NON-NLS-1$
+
+ /** IElementType for SysML Allocate */
+ public static final IHintedType ALLOCATE = (IHintedType) getElementType("org.eclipse.papyrus.sysml.Allocate"); //$NON-NLS-1$
+
+ /** IElementType for SysML Association (Association with SysML nature) */
+ public static final IHintedType ASSOCIATION = (IHintedType) getElementType("org.eclipse.papyrus.sysml.Association"); //$NON-NLS-1$
+
+ /** IElementType for SysML Association with "aggregation = composite" (for creation purpose only) */
+ public static final IHintedType ASSOCIATION_COMPOSITE = (IHintedType) getElementType("org.eclipse.papyrus.sysml.AssociationComposite"); //$NON-NLS-1$
+
+ /** IElementType for SysML Association with "aggregation = composite" and navigable in one-way (for creation purpose only) */
+ public static final IHintedType ASSOCIATION_COMPOSITE_DIRECTED = (IHintedType) getElementType("org.eclipse.papyrus.sysml.AssociationCompositeDirected"); //$NON-NLS-1$
+
+ /** IElementType for SysML Association with "aggregation = none" (for creation purpose only) */
+ public static final IHintedType ASSOCIATION_NONE = (IHintedType) getElementType("org.eclipse.papyrus.sysml.AssociationNone"); //$NON-NLS-1$
+
+ /** IElementType for SysML Association with "aggregation = none" and navigable in one-way (for creation purpose only) */
+ public static final IHintedType ASSOCIATION_NONE_DIRECTED = (IHintedType) getElementType("org.eclipse.papyrus.sysml.AssociationNoneDirected"); //$NON-NLS-1$
+
+ /** IElementType for SysML Association with "aggregation = shared" (for creation purpose only) */
+ public static final IHintedType ASSOCIATION_SHARED = (IHintedType) getElementType("org.eclipse.papyrus.sysml.AssociationShared"); //$NON-NLS-1$
+
+ /** IElementType for SysML Association with "aggregation = shared" and navigable in one-way (for creation purpose only) */
+ public static final IHintedType ASSOCIATION_SHARED_DIRECTED = (IHintedType) getElementType("org.eclipse.papyrus.sysml.AssociationSharedDirected"); //$NON-NLS-1$
+
+ /** IElementType for SysML Block */
+ public static final IHintedType BLOCK = (IHintedType) getElementType("org.eclipse.papyrus.sysml.Block"); //$NON-NLS-1$
+
+ /** IElementType for SysML Conform */
+ public static final IHintedType CONFORM = (IHintedType) getElementType("org.eclipse.papyrus.sysml.Conform"); //$NON-NLS-1$
+
+ /** IElementType for SysML ConstraintBlock */
+ public static final IHintedType CONSTRAINT_BLOCK = (IHintedType) getElementType("org.eclipse.papyrus.sysml.ConstraintBlock"); //$NON-NLS-1$
+
+ /** IElementType for SysML ConstraintProperty */
+ public static final IHintedType CONSTRAINT_PROPERTY = (IHintedType) getElementType("org.eclipse.papyrus.sysml.ConstraintProperty"); //$NON-NLS-1$
+
+ /** IElementType for SysML Copy */
+ public static final IHintedType COPY = (IHintedType) getElementType("org.eclipse.papyrus.sysml.Copy"); //$NON-NLS-1$
+
+ /** IElementType for SysML DeriveReqt */
+ public static final IHintedType DERIVE_REQT = (IHintedType) getElementType("org.eclipse.papyrus.sysml.DeriveReqt"); //$NON-NLS-1$
+
+ /** IElementType for SysML Dimension */
+ public static final IHintedType DIMENSION = (IHintedType) getElementType("org.eclipse.papyrus.sysml.Dimension"); //$NON-NLS-1$
+
+ /** IElementType for SysML FlowPort */
+ public static final IHintedType FLOW_PORT = (IHintedType) getElementType("org.eclipse.papyrus.sysml.FlowPort"); //$NON-NLS-1$
+
+ /** IElementType for SysML FlowPort_InOut */
+ public static final IHintedType FLOW_PORT_IN_OUT = (IHintedType) getElementType("org.eclipse.papyrus.sysml.FlowPort_InOut"); //$NON-NLS-1$
+
+ /** IElementType for SysML FlowPort_In */
+ public static final IHintedType FLOW_PORT_IN = (IHintedType) getElementType("org.eclipse.papyrus.sysml.FlowPort_In"); //$NON-NLS-1$
+
+ /** IElementType for SysML FlowPort_Out */
+ public static final IHintedType FLOW_PORT_OUT = (IHintedType) getElementType("org.eclipse.papyrus.sysml.FlowPort_Out"); //$NON-NLS-1$
+
+ /** IElementType for SysML FlowPort_NA */
+ public static final IHintedType FLOW_PORT_NA = (IHintedType) getElementType("org.eclipse.papyrus.sysml.FlowPort_NA"); //$NON-NLS-1$
+
+ /** IElementType for SysML FlowProperty */
+ public static final IHintedType FLOW_PROPERTY = (IHintedType) getElementType("org.eclipse.papyrus.sysml.FlowProperty"); //$NON-NLS-1$
+
+ /** IElementType for SysML FlowSpecification */
+ public static final IHintedType FLOW_SPECIFICATION = (IHintedType) getElementType("org.eclipse.papyrus.sysml.FlowSpecification"); //$NON-NLS-1$
+
+ /** IElementType for SysML ItemFlow */
+ public static final IHintedType ITEM_FLOW = (IHintedType) getElementType("org.eclipse.papyrus.sysml.ItemFlow"); //$NON-NLS-1$
+
+ /** IElementType for SysML Part (Property) */
+ public static final IHintedType PART_PROPERTY = (IHintedType) getElementType("org.eclipse.papyrus.sysml.PartProperty"); //$NON-NLS-1$
+
+ /** IElementType for SysML Problem */
+ public static final IHintedType PROBLEM = (IHintedType) getElementType("org.eclipse.papyrus.sysml.Problem"); //$NON-NLS-1$
+
+ /** IElementType for SysML Rationale */
+ public static final IHintedType RATIONALE = (IHintedType) getElementType("org.eclipse.papyrus.sysml.Rationale"); //$NON-NLS-1$
+
+ /** IElementType for SysML Reference (Property) */
+ public static final IHintedType REFERENCE_PROPERTY = (IHintedType) getElementType("org.eclipse.papyrus.sysml.ReferenceProperty"); //$NON-NLS-1$
+
+ /** IElementType for SysML Requirement */
+ public static final IHintedType REQUIREMENT = (IHintedType) getElementType("org.eclipse.papyrus.sysml.Requirement"); //$NON-NLS-1$
+
+ /** IElementType for SysML Satisfy */
+ public static final IHintedType SATISFY = (IHintedType) getElementType("org.eclipse.papyrus.sysml.Satisfy"); //$NON-NLS-1$
+
+ /** IElementType for SysML Unit */
+ public static final IHintedType UNIT = (IHintedType) getElementType("org.eclipse.papyrus.sysml.Unit"); //$NON-NLS-1$
+
+ /** IElementType for SysML Value (Property) */
+ public static final IHintedType VALUE_PROPERTY = (IHintedType) getElementType("org.eclipse.papyrus.sysml.ValueProperty"); //$NON-NLS-1$
+
+ /** IElementType for SysML ValueType */
+ public static final IHintedType VALUE_TYPE = (IHintedType) getElementType("org.eclipse.papyrus.sysml.ValueType"); //$NON-NLS-1$
+
+ /** IElementType for SysML ValueType_Enumeration */
+ public static final IHintedType VALUE_TYPE_ENUMERATION = (IHintedType) getElementType("org.eclipse.papyrus.sysml.ValueType_Enumeration"); //$NON-NLS-1$
+
+ /** IElementType for SysML ValueType_PrimitiveType */
+ public static final IHintedType VALUE_TYPE_PRIMITIVE_TYPE = (IHintedType) getElementType("org.eclipse.papyrus.sysml.ValueType_PrimitiveType"); //$NON-NLS-1$
+
+ /** IElementType for SysML Verify */
+ public static final IHintedType VERIFY = (IHintedType) getElementType("org.eclipse.papyrus.sysml.Verify"); //$NON-NLS-1$
+
+ /** IElementType for SysML View */
+ public static final IHintedType VIEW = (IHintedType) getElementType("org.eclipse.papyrus.sysml.View"); //$NON-NLS-1$
+
+ /** IElementType for SysML ViewPoint */
+ public static final IHintedType VIEW_POINT = (IHintedType) getElementType("org.eclipse.papyrus.sysml.ViewPoint"); //$NON-NLS-1$
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src-gen/org/eclipse/papyrus/sysml/service/types/filter/SysmlCommandFilter.java b/plugins/org.eclipse.papyrus.sysml.service.types/src-gen/org/eclipse/papyrus/sysml/service/types/filter/SysmlCommandFilter.java
new file mode 100755
index 0000000..7fcaa6e
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src-gen/org/eclipse/papyrus/sysml/service/types/filter/SysmlCommandFilter.java
@@ -0,0 +1,98 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.filter;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.filter.ICommandFilter;
+
+/**
+ * Filter for available Sysml commands. Moved from oep.sysml.modelexplorer
+ *
+ * @author JC236769
+ *
+ */
+public class SysmlCommandFilter implements ICommandFilter {
+
+ /**
+ * Singleton instance
+ */
+ public static final SysmlCommandFilter INSTANCE = new SysmlCommandFilter();
+
+ private SysmlCommandFilter() {
+ // to prevent instantiation
+ }
+
+ private List<IElementType> visibleCommands;
+
+ public List<IElementType> getVisibleCommands() {
+ if (visibleCommands == null) {
+ List<IElementType> localVisibleCommands = new ArrayList<IElementType>();
+
+ localVisibleCommands = new ArrayList<IElementType>();
+
+ localVisibleCommands.add(SysMLElementTypes.ACTOR_PART_PROPERTY);
+ // localVisibleCommands.add(SysMLElementTypes.ALLOCATE);
+ // localVisibleCommands.add(SysMLElementTypes.ASSOCIATION);
+ // localVisibleCommands.add(SysMLElementTypes.ASSOCIATION_COMPOSITE);
+ // localVisibleCommands.add(SysMLElementTypes.ASSOCIATION_COMPOSITE_DIRECTED);
+ // localVisibleCommands.add(SysMLElementTypes.ASSOCIATION_NONE);
+ // localVisibleCommands.add(SysMLElementTypes.ASSOCIATION_NONE_DIRECTED);
+ // localVisibleCommands.add(SysMLElementTypes.ASSOCIATION_SHARED);
+ // localVisibleCommands.add(SysMLElementTypes.ASSOCIATION_SHARED_DIRECTED);
+ localVisibleCommands.add(SysMLElementTypes.BLOCK);
+ // localVisibleCommands.add(SysMLElementTypes.CONFORM);
+ localVisibleCommands.add(SysMLElementTypes.CONSTRAINT_BLOCK);
+ localVisibleCommands.add(SysMLElementTypes.CONSTRAINT_PROPERTY);
+ // localVisibleCommands.add(SysMLElementTypes.COPY);
+ // localVisibleCommands.add(SysMLElementTypes.DERIVE_REQT);
+ localVisibleCommands.add(SysMLElementTypes.DIMENSION);
+ localVisibleCommands.add(SysMLElementTypes.FLOW_PORT);
+ localVisibleCommands.add(SysMLElementTypes.FLOW_PORT_IN_OUT);
+ localVisibleCommands.add(SysMLElementTypes.FLOW_PORT_IN);
+ localVisibleCommands.add(SysMLElementTypes.FLOW_PORT_OUT);
+ // localVisibleCommands.add(SysMLElementTypes.FLOW_PORT_NA);
+ localVisibleCommands.add(SysMLElementTypes.FLOW_PROPERTY);
+ localVisibleCommands.add(SysMLElementTypes.FLOW_SPECIFICATION);
+ // localVisibleCommands.add(SysMLElementTypes.ITEM_FLOW);
+ localVisibleCommands.add(SysMLElementTypes.PART_PROPERTY);
+ localVisibleCommands.add(SysMLElementTypes.PROBLEM);
+ localVisibleCommands.add(SysMLElementTypes.RATIONALE);
+ localVisibleCommands.add(SysMLElementTypes.REFERENCE_PROPERTY);
+ localVisibleCommands.add(SysMLElementTypes.REQUIREMENT);
+ // localVisibleCommands.add(SysMLElementTypes.SATISFY);
+ localVisibleCommands.add(SysMLElementTypes.UNIT);
+ localVisibleCommands.add(SysMLElementTypes.VALUE_PROPERTY);
+ localVisibleCommands.add(SysMLElementTypes.VALUE_TYPE);
+ // localVisibleCommands.add(SysMLElementTypes.VALUE_TYPE_ENUMERATION);
+ // localVisibleCommands.add(SysMLElementTypes.VALUE_TYPE_PRIMITIVE_TYPE);
+ // localVisibleCommands.add(SysMLElementTypes.VERIFY);
+ localVisibleCommands.add(SysMLElementTypes.VIEW);
+ localVisibleCommands.add(SysMLElementTypes.VIEW_POINT);
+
+ // UMLElementTypes.PROPERTY is required by ConstraintBlock Parameter
+ localVisibleCommands.add(UMLElementTypes.PROPERTY);
+
+ this.visibleCommands = Collections.unmodifiableList(localVisibleCommands);
+
+ }
+
+ return visibleCommands;
+ }
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/Activator.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/Activator.java
new file mode 100755
index 0000000..ed5cbbe
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/Activator.java
@@ -0,0 +1,71 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) Yann.Tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types;
+
+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.sysml.service.types"; //$NON-NLS-1$
+
+ /** The plug-in shared instance */
+ private static Activator plugin;
+
+ /** The log service */
+ public static LogHelper log;
+
+ /** Default constructor */
+ public Activator() {
+
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ log = new LogHelper(plugin);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/command/SetNestedPathCommand.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/command/SetNestedPathCommand.java
new file mode 100755
index 0000000..e5839c2
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/command/SetNestedPathCommand.java
@@ -0,0 +1,170 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.command;
+
+import java.util.List;
+
+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.ecore.util.EcoreUtil;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.papyrus.sysml.blocks.BlocksPackage;
+import org.eclipse.papyrus.sysml.blocks.NestedConnectorEnd;
+import org.eclipse.papyrus.sysml.service.types.utils.ConnectorUtils;
+import org.eclipse.uml2.uml.ConnectableElement;
+import org.eclipse.uml2.uml.Connector;
+import org.eclipse.uml2.uml.ConnectorEnd;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.util.UMLUtil;
+import org.eclipse.uml2.uml.util.UMLUtil.StereotypeApplicationHelper;
+
+/**
+ * <pre>
+ * Set SysML {@link NestedConnectorEnd} stereotype information for {@link ConnectorEnd}.
+ * </pre>
+ */
+public class SetNestedPathCommand extends EditElementCommand {
+
+ private ConnectorUtils utils = new ConnectorUtils();
+
+ /**
+ * The ordered list of {@link Property} to follow in order to reach the nested {@link ConnectableElement}.
+ */
+ private List<Property> nestedPath;
+
+ /**
+ * Indicates that the source of the {@link Connector} is nested.
+ */
+ public final static int NESTED_SOURCE = 1;
+
+ /**
+ * Indicates that the target of the {@link Connector} is nested.
+ */
+ public final static int NESTED_TARGET = 2;
+
+ /**
+ * Indicates whether or not the source of the target of the {@link Connector} is nested.
+ * One of {@link #NESTED_SOURCE} or {@link #NESTED_TARGET}.
+ */
+ private final int nestedEndDirection;
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param label
+ * the command label.
+ * @param elementToEdit
+ * the element to edit.
+ * @param request
+ * the request this command contribute to ({@link CreateRelationshipRequest} or {@link ReorientRelationshipRequest})
+ * @param nestedPath
+ * the property path to set (in {@link NestedConnectorEnd#getPropertyPath()} ).
+ * @param nestedEndDirection
+ * the direction ({@link #NESTED_SOURCE} or {@link #NESTED_TARGET}) of the {@link ConnectorEnd} to modify.
+ */
+ public SetNestedPathCommand(String label, EObject elementToEdit, IEditCommandRequest request, List<Property> nestedPath, int nestedEndDirection) {
+ super(label, elementToEdit, request);
+ this.nestedPath = nestedPath;
+ this.nestedEndDirection = nestedEndDirection;
+ }
+
+ /**
+ * Test whether the command can be executed or not.
+ */
+ @Override
+ public boolean canExecute() {
+
+ // Verify the kind of request
+ if (!(getRequest() instanceof CreateRelationshipRequest)
+ && !(getRequest() instanceof ReorientRelationshipRequest)) {
+
+ return false;
+ }
+
+ // Verify (basic) that the related Connector well-formed.
+ // In case of Connector creation, the connector is most probably not created yet
+ if ((getConnector() != null)
+ && (getConnector().getEnds().size() != 2)) {
+
+ return false; // binary connector expected.
+ }
+
+ return true;
+ }
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ if (!canExecute()) {
+ throw new ExecutionException("Unexecutable command."); //$NON-NLS-1$
+ }
+
+ ConnectorEnd modifiedEnd = getModifiedConnectorEnd();
+ NestedConnectorEnd nestedConnectorEnd = UMLUtil.getStereotypeApplication(modifiedEnd, NestedConnectorEnd.class);
+
+ if (nestedPath.isEmpty()) {
+ // Remove stereotype if applied
+ if (nestedConnectorEnd != null) {
+ EcoreUtil.delete(nestedConnectorEnd, true);
+ }
+
+ } else {
+ // Add stereotype if not applied and set new path if different from existing
+ if (nestedConnectorEnd == null) {
+ // apply stereotype
+ nestedConnectorEnd = (NestedConnectorEnd) StereotypeApplicationHelper.INSTANCE.applyStereotype(modifiedEnd, BlocksPackage.eINSTANCE.getNestedConnectorEnd());
+ }
+
+ // Set path
+ if (!nestedConnectorEnd.getPropertyPath().equals(nestedPath)) {
+ nestedConnectorEnd.getPropertyPath().clear();
+ nestedConnectorEnd.getPropertyPath().addAll(nestedPath);
+ }
+ }
+
+ return CommandResult.newOKCommandResult(getConnector());
+ }
+
+ /**
+ * Get the {@link ConnectorEnd} currently modified by the command.
+ *
+ * @return the modified {@link ConnectorEnd}.
+ */
+ private ConnectorEnd getModifiedConnectorEnd() {
+ return (nestedEndDirection == NESTED_SOURCE) ? utils.getSourceConnectorEnd(getConnector()) : utils.getTargetConnectorEnd(getConnector());
+ }
+
+ /**
+ * Get the {@link Connector} currently under creation or re-orient that hold {@link ConnectorEnd} to update.
+ *
+ * @return the related {@link Connector}.
+ */
+ private Connector getConnector() {
+ Connector connector = null;
+ if (getRequest() instanceof CreateRelationshipRequest) {
+ connector = (Connector) ((CreateRelationshipRequest) getRequest()).getNewElement();
+ }
+
+ if (getRequest() instanceof ReorientRelationshipRequest) {
+ connector = (Connector) ((ReorientRelationshipRequest) getRequest()).getRelationship();
+ }
+ return connector;
+ }
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/handlers/AbstractSysmlCreateCommandHandler.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/handlers/AbstractSysmlCreateCommandHandler.java
new file mode 100755
index 0000000..66e03c1
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/handlers/AbstractSysmlCreateCommandHandler.java
@@ -0,0 +1,35 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.handlers;
+
+import org.eclipse.papyrus.sysml.service.types.filter.SysmlCommandFilter;
+import org.eclipse.papyrus.uml.service.types.filter.ICommandFilter;
+import org.eclipse.papyrus.uml.service.types.ui.handlers.AbstractCreateCommandHandler;
+
+/**
+ *
+ * Abstract handler for every creation command for Sysml elements
+ * used in the ModelExplorer contextual ("Create new child") menu
+ *
+ * @Deprecated since Eclipse Mars Use AbstractSysmlCreateElementCommandHandler
+ */
+@Deprecated
+public abstract class AbstractSysmlCreateCommandHandler extends AbstractCreateCommandHandler {
+
+ private static final ICommandFilter filter = SysmlCommandFilter.INSTANCE;
+
+ @Override
+ public ICommandFilter getCommandFilter() {
+ return filter;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/handlers/AbstractSysmlCreateElementCommandHandler.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/handlers/AbstractSysmlCreateElementCommandHandler.java
new file mode 100755
index 0000000..dbe3a74
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/handlers/AbstractSysmlCreateElementCommandHandler.java
@@ -0,0 +1,36 @@
+/*****************************************************************************
+ * 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.sysml.service.types.handlers;
+
+import org.eclipse.papyrus.sysml.service.types.filter.SysmlCommandFilter;
+import org.eclipse.papyrus.uml.service.types.filter.ICommandFilter;
+import org.eclipse.papyrus.uml.service.types.ui.handlers.AbstractCreateElementCommandHandler;
+
+/**
+ *
+ * Abstract handler for every creation command for Sysml elements
+ * used in the ModelExplorer contextual ("Create new child") menu
+ *
+ */
+public abstract class AbstractSysmlCreateElementCommandHandler extends AbstractCreateElementCommandHandler {
+
+ private static final ICommandFilter filter = SysmlCommandFilter.INSTANCE;
+
+ @Override
+ public ICommandFilter getCommandFilter() {
+ return filter;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/AbstractPropertyEditHelperAdvice.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/AbstractPropertyEditHelperAdvice.java
new file mode 100755
index 0000000..cdde4a3
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/AbstractPropertyEditHelperAdvice.java
@@ -0,0 +1,205 @@
+/**
+ *
+ */
+package org.eclipse.papyrus.sysml.service.types.helper;
+
+import java.util.Collections;
+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.ecore.EObject;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
+import org.eclipse.emf.edit.domain.EditingDomain;
+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.commands.DuplicateEObjectsCommand;
+import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DuplicateElementsRequest;
+import org.eclipse.papyrus.sysml.service.types.Activator;
+import org.eclipse.papyrus.uml.service.types.utils.NamedElementHelper;
+import org.eclipse.uml2.uml.Association;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.Property;
+
+
+/**
+ * Abstract edit helper advice for SysML specific Properties: part and reference
+ */
+public abstract class AbstractPropertyEditHelperAdvice extends AbstractEditHelperAdvice {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected ICommand getBeforeDuplicateCommand(DuplicateElementsRequest request) {
+ Object targetContainer = request.getParameter("Target_Owner");
+ // additional element should be a set of elements that will be duplicated. If this is null, the request will be ignored.
+ if (!(targetContainer instanceof EObject)) {
+ return super.getBeforeDuplicateCommand(request);
+ }
+ Property propertyToBeDuplicated = getDuplicatedProperty(request);
+ if (propertyToBeDuplicated == null) {
+ return super.getBeforeDuplicateCommand(request);
+ }
+
+ Property newPart = (Property) request.getAllDuplicatedElementsMap().get(propertyToBeDuplicated);
+ if (newPart == null) {
+ Activator.log.debug("Trying to create a command for a new sysml property which has not been created yet");
+ return super.getBeforeDuplicateCommand(request);
+ }
+
+ // check association has not be duplicated yet
+ Association originalAssociation = propertyToBeDuplicated.getAssociation();
+ Association newAssociation = (Association) request.getAllDuplicatedElementsMap().get(originalAssociation);
+ if (newAssociation != null && newAssociation.equals(newPart.getAssociation())) {
+ return super.getBeforeDuplicateCommand(request);
+ }
+
+ TransactionalEditingDomain editingDomain = getEditingDomain(propertyToBeDuplicated);
+ if (editingDomain == null) {
+ return super.getBeforeDuplicateCommand(request);
+ }
+
+ Package targetPackage = getTargetContainer((EObject) targetContainer, propertyToBeDuplicated, newPart, request.getAllDuplicatedElementsMap());
+ return new DuplicatePapyrusAssociationCommand(editingDomain, "Duplicate Association", originalAssociation, request.getAllDuplicatedElementsMap(), targetPackage);
+ }
+
+ /**
+ * Returns the duplicate Part or Reference.
+ *
+ * @param request
+ * the duplicate request for which we try to find the property
+ * @return the found Property
+ */
+ protected abstract Property getDuplicatedProperty(DuplicateElementsRequest request);
+
+ /**
+ * Computes the target container for the new association
+ *
+ * @param targetContainer
+ * the target container of the association creation request
+ * @param partToBeDuplicated
+ * the part which was duplicated
+ * @param newPart
+ * the new part linked to the association
+ * @param allDuplicatedElementsMap
+ * the map of all duplicated elements
+ * @return the target {@link Package} for the new association or <code>null</code> if no package was found
+ */
+ protected Package getTargetContainer(EObject targetContainer, Property partToBeDuplicated, Property newPart, Map allDuplicatedElementsMap) {
+
+ // 1. look if the new part has a nearest package
+ // 2. look if the part to be duplicated has a package which has a copy
+ // 3. if target container == package => this can be the place where the association could be placed
+ // 4. look for the nearest package of the target container
+
+ Package result = newPart.getNearestPackage();
+ if (result != null) {
+ return result;
+ }
+
+ Package originalPackage = partToBeDuplicated.getNearestPackage();
+ // look for its equivalent in the list of duplicated objects
+ Object o = allDuplicatedElementsMap.get(originalPackage);
+ if (o instanceof Package) {
+ return (Package) o;
+ }
+
+ if (targetContainer instanceof Package) {
+ return ((Package) targetContainer);
+ }
+
+ if (targetContainer instanceof Element) {
+ return ((Element) targetContainer).getNearestPackage();
+ }
+
+ return null;
+ }
+
+ /**
+ * Get the editing domain from an {@link EObject}
+ *
+ * @param eObject
+ * @return
+ */
+ protected TransactionalEditingDomain getEditingDomain(EObject eObject) {
+ EditingDomain editingDomain = AdapterFactoryEditingDomain.getEditingDomainFor(eObject);
+ if (editingDomain instanceof TransactionalEditingDomain) {
+ return (TransactionalEditingDomain) editingDomain;
+ }
+ return null;
+ }
+
+ /**
+ * Command to duplicate an association and place it in a new container.
+ */
+ public class DuplicatePapyrusAssociationCommand extends DuplicateEObjectsCommand {
+
+ /** association to be duplicated */
+ private final Association associationToDuplicate;
+
+ /** target container */
+ private final Package targetContainer;
+
+
+ /**
+ * Constructs a new duplicate EObjects command with the specified label and
+ * list of EObjects. Also sets the list of affected files to be the files,
+ * where the targetContainer is stored. Target container specifies the
+ * eObject into which the duplicated eObjects will be added.
+ *
+ * @param editingDomain
+ * the editing domain through which model changes are made
+ * @param label
+ * The label for the new command.
+ * @param originalAssociation
+ * <code>Association</code> to be duplicated.
+ * @param allDuplicatedObjectsMap
+ * An empty map to be populated with the duplicated objects.
+ * @param targetContainer
+ * target package
+ */
+ public DuplicatePapyrusAssociationCommand(TransactionalEditingDomain editingDomain, String label, Association originalAssociation, Map allDuplicatedObjectsMap, Package targetContainer) {
+ super(editingDomain, label, Collections.singletonList(originalAssociation), allDuplicatedObjectsMap, targetContainer);
+ this.associationToDuplicate = originalAssociation;
+ this.targetContainer = targetContainer;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ // Remove elements whose container is getting copied.
+ // ClipboardSupportUtil.getCopyElements(getObjectsToBeDuplicated());
+
+ // Perform the copy and update the references.
+ EcoreUtil.Copier copier = new EcoreUtil.Copier();
+ copier.putAll(getAllDuplicatedObjectsMap());
+ copier.copy(associationToDuplicate);
+ copier.copyReferences();
+
+ Association newAssociation = (Association) copier.get(associationToDuplicate);
+ if (newAssociation == null) {
+ return CommandResult.newErrorCommandResult("Impossible to find the copied association");
+ }
+
+ // note: can be executed only if targetcontainer is instanceof package, this means that there is no need to tests for null targetContainer
+ newAssociation.setPackage(targetContainer);
+ String associationName = NamedElementHelper.getDefaultNameWithIncrementFromBase("Association", targetContainer.eContents()); //$NON-NLS-1$
+ newAssociation.setName(associationName);
+ return CommandResult.newOKCommandResult(getAllDuplicatedObjectsMap());
+ }
+
+ @Override
+ public boolean canExecute() {
+ // should add some tests here? no need to test containement feature like previous, Table has no owner...
+ return targetContainer instanceof Package;
+ }
+ }
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/ActorPartPropertyEditHelperAdvice.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/ActorPartPropertyEditHelperAdvice.java
new file mode 100755
index 0000000..9aa9604
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/ActorPartPropertyEditHelperAdvice.java
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.helper;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher;
+import org.eclipse.gmf.runtime.emf.type.core.commands.ConfigureElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.GetEditContextRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest;
+import org.eclipse.papyrus.sysml.blocks.Block;
+import org.eclipse.papyrus.sysml.service.types.matcher.BlockMatcher;
+import org.eclipse.papyrus.uml.service.types.utils.NamedElementHelper;
+import org.eclipse.uml2.uml.AggregationKind;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Property;
+
+/** SysML Property ActorPart edit helper advice */
+public class ActorPartPropertyEditHelperAdvice extends AbstractEditHelperAdvice {
+
+ /**
+ * Check if the creation context is a {@link Block}.
+ *
+ * @see org.eclipse.papyrus.sysml.service.types.helper.AbstractStereotypedElementEditHelperAdvice#approveRequest(org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest)
+ *
+ * @param request
+ * @return true if the request is approved
+ */
+ @Override
+ public boolean approveRequest(IEditCommandRequest request) {
+ boolean isApproved = super.approveRequest(request);
+
+ if ((request != null) && (request instanceof GetEditContextRequest)) {
+
+ // Retrieve the edit context from request
+ GetEditContextRequest editContextRequest = (GetEditContextRequest) request;
+
+ // Test if the edit context is a Block
+ if (editContextRequest.getEditContext() instanceof Element) {
+ Element contextElement = (Element) editContextRequest.getEditContext();
+
+ IElementMatcher matcher = new BlockMatcher();
+ if (!matcher.matches(contextElement)) {
+ isApproved = false;
+ }
+ }
+ }
+
+ return isApproved;
+ }
+
+ /** Complete creation process by setting name and default aggregation */
+ @Override
+ protected ICommand getBeforeConfigureCommand(final ConfigureRequest request) {
+
+ return new ConfigureElementCommand(request) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ Property element = (Property) request.getElementToConfigure();
+ if (element != null) {
+
+ // Set default name
+ String initializedName = NamedElementHelper.getDefaultNameWithIncrementFromBase("actorPart", element.eContainer().eContents()); //$NON-NLS-1$
+ element.setName(initializedName);
+ // Initialize the aggregation to composite.
+ element.setAggregation(AggregationKind.COMPOSITE_LITERAL);
+ }
+ return CommandResult.newOKCommandResult(element);
+ }
+ };
+ }
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/AllocateEditHelperAdvice.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/AllocateEditHelperAdvice.java
new file mode 100755
index 0000000..32da3bb
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/AllocateEditHelperAdvice.java
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.helper;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.commands.ConfigureElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.papyrus.sysml.allocations.Allocate;
+import org.eclipse.papyrus.sysml.allocations.AllocationsPackage;
+import org.eclipse.papyrus.uml.service.types.helper.advice.AbstractStereotypedElementEditHelperAdvice;
+import org.eclipse.papyrus.uml.service.types.utils.NamedElementHelper;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.util.UMLUtil.StereotypeApplicationHelper;
+
+/** SysML {@link Allocate} edit helper advice */
+public class AllocateEditHelperAdvice extends AbstractStereotypedElementEditHelperAdvice {
+
+ /** Default constructor */
+ public AllocateEditHelperAdvice() {
+ requiredProfiles.add(AllocationsPackage.eINSTANCE);
+ }
+
+ /** Complete creation process by applying the expected stereotype */
+ @Override
+ protected ICommand getBeforeConfigureCommand(final ConfigureRequest request) {
+
+ return new ConfigureElementCommand(request) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ NamedElement element = (NamedElement) request.getElementToConfigure();
+ if (element != null) {
+ StereotypeApplicationHelper.INSTANCE.applyStereotype(element, AllocationsPackage.eINSTANCE.getAllocate());
+
+ // Set default name
+ // Initialize the element name based on the created IElementType
+ String initializedName = NamedElementHelper.getDefaultNameWithIncrementFromBase(AllocationsPackage.eINSTANCE.getAllocate().getName(), element.eContainer().eContents());
+ element.setName(initializedName);
+ }
+ return CommandResult.newOKCommandResult(element);
+ }
+ };
+ }
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/BlockEditHelperAdvice.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/BlockEditHelperAdvice.java
new file mode 100755
index 0000000..a6008b5
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/BlockEditHelperAdvice.java
@@ -0,0 +1,147 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.helper;
+
+import java.util.Arrays;
+import java.util.List;
+
+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.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand;
+import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.commands.ConfigureElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.GetEditContextRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest;
+import org.eclipse.papyrus.sysml.blocks.BlocksPackage;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.sysml.service.types.matcher.FlowSpecificationMatcher;
+import org.eclipse.papyrus.sysml.service.types.matcher.RequirementMatcher;
+import org.eclipse.papyrus.uml.service.types.helper.advice.AbstractStereotypedElementEditHelperAdvice;
+import org.eclipse.papyrus.uml.service.types.utils.EMFUtil;
+import org.eclipse.papyrus.uml.service.types.utils.NamedElementHelper;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.util.UMLUtil.StereotypeApplicationHelper;
+
+/** SysML Block edit helper advice */
+public class BlockEditHelperAdvice extends AbstractStereotypedElementEditHelperAdvice {
+
+ /** Default constructor */
+ public BlockEditHelperAdvice() {
+ requiredProfiles.add(BlocksPackage.eINSTANCE);
+ }
+
+ /**
+ * Check if the creation context is allowed.
+ *
+ * @see org.eclipse.papyrus.sysml.service.types.helper.AbstractStereotypedElementEditHelperAdvice#approveRequest(org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest)
+ *
+ * @param request
+ * @return true if the request is approved
+ */
+ @Override
+ public boolean approveRequest(IEditCommandRequest request) {
+ boolean isApproved = super.approveRequest(request);
+
+ if ((request != null) && (request instanceof GetEditContextRequest)) {
+
+ // Retrieve the edit context from request
+ GetEditContextRequest editContextRequest = (GetEditContextRequest) request;
+
+ // Test context type
+ if (editContextRequest.getEditContext() instanceof Element) {
+ Element contextElement = (Element) editContextRequest.getEditContext();
+
+ IElementMatcher matcher;
+
+ // Cannot create a nested Block in FlowSpecification
+ matcher = new FlowSpecificationMatcher();
+ if (matcher.matches(contextElement)) {
+ isApproved = false;
+ }
+
+ // Cannot create a nested Block in Requirement
+ matcher = new RequirementMatcher();
+ if (matcher.matches(contextElement)) {
+ isApproved = false;
+ }
+ }
+ }
+
+ return isApproved;
+ }
+
+ /** Complete creation process by applying the expected stereotype */
+ @Override
+ protected ICommand getBeforeConfigureCommand(final ConfigureRequest request) {
+
+ return new ConfigureElementCommand(request) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ NamedElement element = (NamedElement) request.getElementToConfigure();
+ if (element != null) {
+ StereotypeApplicationHelper.INSTANCE.applyStereotype(element, BlocksPackage.eINSTANCE.getBlock());
+
+ // Set default name
+ // Initialize the element name based on the created IElementType
+ String initializedName = NamedElementHelper.getDefaultNameWithIncrementFromBase(BlocksPackage.eINSTANCE.getBlock().getName(), element.eContainer().eContents());
+ element.setName(initializedName);
+ }
+ return CommandResult.newOKCommandResult(element);
+ }
+ };
+ }
+
+ @Override
+ protected ICommand getBeforeCreateRelationshipCommand(CreateRelationshipRequest request) {
+ // test if the creation is for a SysML association
+
+ IElementType type = request.getElementType();
+ if (hasSuperType(type, SysMLElementTypes.ASSOCIATION)) {
+ // test source and target...
+ EObject source = request.getSource();
+ // The source of an association cannot be read-only.
+ if (EMFUtil.isReadOnly(source)) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ }
+
+ return super.getBeforeCreateRelationshipCommand(request);
+ }
+
+ protected boolean hasSuperType(IElementType elementType, IElementType typeToTest) {
+ if (elementType == null || typeToTest == null) {
+ return false;
+ }
+
+ if (elementType.equals(typeToTest)) {
+ return true;
+ }
+
+ List<IElementType> superTypes = Arrays.asList(elementType.getAllSuperTypes());
+ if (superTypes.contains(typeToTest)) {
+ return true;
+ }
+
+ return false;
+ }
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/ConformEditHelperAdvice.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/ConformEditHelperAdvice.java
new file mode 100755
index 0000000..40d5847
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/ConformEditHelperAdvice.java
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.helper;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.commands.ConfigureElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.papyrus.sysml.modelelements.Conform;
+import org.eclipse.papyrus.sysml.modelelements.ModelelementsPackage;
+import org.eclipse.papyrus.uml.service.types.helper.advice.AbstractStereotypedElementEditHelperAdvice;
+import org.eclipse.papyrus.uml.service.types.utils.NamedElementHelper;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.util.UMLUtil.StereotypeApplicationHelper;
+
+/** SysML {@link Conform} edit helper advice */
+public class ConformEditHelperAdvice extends AbstractStereotypedElementEditHelperAdvice {
+
+ /** Default constructor */
+ public ConformEditHelperAdvice() {
+ requiredProfiles.add(ModelelementsPackage.eINSTANCE);
+ }
+
+ /** Complete creation process by applying the expected stereotype */
+ @Override
+ protected ICommand getBeforeConfigureCommand(final ConfigureRequest request) {
+
+ return new ConfigureElementCommand(request) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ NamedElement element = (NamedElement) request.getElementToConfigure();
+ if (element != null) {
+ StereotypeApplicationHelper.INSTANCE.applyStereotype(element, ModelelementsPackage.eINSTANCE.getConform());
+
+ // Set default name
+ // Initialize the element name based on the created IElementType
+ String initializedName = NamedElementHelper.getDefaultNameWithIncrementFromBase(ModelelementsPackage.eINSTANCE.getConform().getName(), element.eContainer().eContents());
+ element.setName(initializedName);
+ }
+ return CommandResult.newOKCommandResult(element);
+ }
+ };
+ }
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/ConstraintBlockEditHelperAdvice.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/ConstraintBlockEditHelperAdvice.java
new file mode 100755
index 0000000..784ac34
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/ConstraintBlockEditHelperAdvice.java
@@ -0,0 +1,83 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.helper;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.commands.ConfigureElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.papyrus.sysml.constraints.ConstraintBlock;
+import org.eclipse.papyrus.sysml.constraints.ConstraintsPackage;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.helper.advice.AbstractStereotypedElementEditHelperAdvice;
+import org.eclipse.papyrus.uml.service.types.utils.NamedElementHelper;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.util.UMLUtil.StereotypeApplicationHelper;
+
+/** SysML {@link ConstraintBlock} edit helper advice */
+public class ConstraintBlockEditHelperAdvice extends AbstractStereotypedElementEditHelperAdvice {
+
+ /** Default constructor */
+ public ConstraintBlockEditHelperAdvice() {
+ requiredProfiles.add(ConstraintsPackage.eINSTANCE);
+ }
+
+ /**
+ * Restriction on ConstraintBlock owned Structural and Behavioral features.
+ *
+ * {@inheritDoc}
+ */
+ @Override
+ protected ICommand getBeforeCreateCommand(CreateElementRequest request) {
+
+ IElementType elementToCreate = request.getElementType();
+
+ if (UMLElementTypes.STRUCTURAL_FEATURE.getEClass().isSuperTypeOf(elementToCreate.getEClass())) {
+ if (elementToCreate != SysMLElementTypes.CONSTRAINT_PROPERTY && elementToCreate != UMLElementTypes.PROPERTY) {
+ return null;
+ }
+ }
+
+ return super.getBeforeCreateCommand(request);
+ }
+
+ /**
+ * Complete creation process by applying the expected stereotype
+ *
+ * {@inheritDoc}
+ */
+ @Override
+ protected ICommand getBeforeConfigureCommand(final ConfigureRequest request) {
+
+ return new ConfigureElementCommand(request) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ NamedElement element = (NamedElement) request.getElementToConfigure();
+ if (element != null) {
+ StereotypeApplicationHelper.INSTANCE.applyStereotype(element, ConstraintsPackage.eINSTANCE.getConstraintBlock());
+
+ // Set default name
+ // Initialize the element name based on the created IElementType
+ String initializedName = NamedElementHelper.getDefaultNameWithIncrementFromBase(ConstraintsPackage.eINSTANCE.getConstraintBlock().getName(), element.eContainer().eContents());
+ element.setName(initializedName);
+ }
+ return CommandResult.newOKCommandResult(element);
+ }
+ };
+ }
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/ConstraintBlockPropertyEditHelperAdvice.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/ConstraintBlockPropertyEditHelperAdvice.java
new file mode 100755
index 0000000..02ae207
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/ConstraintBlockPropertyEditHelperAdvice.java
@@ -0,0 +1,106 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.helper;
+
+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.ecore.EStructuralFeature;
+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.type.core.ISpecializationType;
+import org.eclipse.gmf.runtime.emf.type.core.commands.ConfigureElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.commands.SetValueCommand;
+import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
+import org.eclipse.papyrus.sysml.blocks.ValueType;
+import org.eclipse.papyrus.sysml.constraints.ConstraintBlock;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.uml2.uml.AggregationKind;
+import org.eclipse.uml2.uml.DataType;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Type;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+/** Specific advice for Property creation owned by a {@link ConstraintBlock} */
+public class ConstraintBlockPropertyEditHelperAdvice extends AbstractEditHelperAdvice {
+
+ /**
+ * Every {@link Property} created in the context of a {@link ConstraintBlock} is Composite.
+ *
+ * {@inheritDoc}
+ */
+ @Override
+ protected ICommand getBeforeConfigureCommand(final ConfigureRequest request) {
+
+ return new ConfigureElementCommand(request) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ Property element = (Property) request.getElementToConfigure();
+ if (element != null) {
+
+ Element owner = element.getOwner();
+ if (((ISpecializationType) SysMLElementTypes.CONSTRAINT_BLOCK).getMatcher().matches(owner)) {
+ element.setAggregation(AggregationKind.COMPOSITE_LITERAL);
+ }
+ }
+ return CommandResult.newOKCommandResult(element);
+ }
+ };
+ }
+
+
+ @Override
+ protected ICommand getBeforeSetCommand(SetRequest request) {
+ ICommand gmfCommand = super.getBeforeSetCommand(request);
+ EObject elementToEdit = request.getElementToEdit();
+ if (false == elementToEdit instanceof Property || request.getFeature() != UMLPackage.eINSTANCE.getTypedElement_Type()) {
+ return gmfCommand;
+ }
+ Property propertyToEdit = (Property) elementToEdit;
+ if (!isBlockOrValueTypeProperty(propertyToEdit)) {
+ return gmfCommand;
+ }
+ AggregationKind expectedAggregation = getExpectedAggregationKind(propertyToEdit.getType(), (Type) request.getValue(), propertyToEdit.getAggregation());
+ if (expectedAggregation == null) {
+ return gmfCommand;
+ }
+ EStructuralFeature feature = UMLPackage.eINSTANCE.getProperty_Aggregation();
+ SetRequest setRequest = new SetRequest(propertyToEdit, feature, expectedAggregation);
+ ICommand changeAggregationCommand = new SetValueCommand(setRequest);
+ return CompositeCommand.compose(gmfCommand, changeAggregationCommand);
+ }
+
+ private boolean isBlockOrValueTypeProperty(Property property) {
+ Element owner = property.getOwner();
+ return ((ISpecializationType) SysMLElementTypes.BLOCK).getMatcher().matches(owner) || ((ISpecializationType) SysMLElementTypes.VALUE_TYPE).getMatcher().matches(owner);
+ }
+
+ private boolean isValueType(Type value) {
+ return value instanceof DataType && UMLUtil.getStereotypeApplication(value, ValueType.class) != null;
+ }
+
+ private AggregationKind getExpectedAggregationKind(Type currentType, Type newType, AggregationKind currentAggregationKind) {
+ if (isValueType(currentType) && !isValueType(newType) && AggregationKind.COMPOSITE_LITERAL == currentAggregationKind) {
+ return AggregationKind.NONE_LITERAL;
+ }
+ if (!isValueType(currentType) && isValueType(newType)) {
+ return AggregationKind.COMPOSITE_LITERAL;
+ }
+ return null;
+ }
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/ConstraintParameterEditHelperAdvice.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/ConstraintParameterEditHelperAdvice.java
new file mode 100755
index 0000000..54fc3b1
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/ConstraintParameterEditHelperAdvice.java
@@ -0,0 +1,94 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.helper;
+
+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.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.commands.ConfigureElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest;
+import org.eclipse.papyrus.sysml.constraints.ConstraintBlock;
+import org.eclipse.papyrus.sysml.constraints.ConstraintProperty;
+import org.eclipse.papyrus.uml.service.types.utils.NamedElementHelper;
+import org.eclipse.uml2.uml.AggregationKind;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Type;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+/**
+ * Specific advice for Property creation owned by a {@link ConstraintBlock} ConstraintParameter are defined in ConstraintProperty but really owned by ConstraintBlock
+ */
+public class ConstraintParameterEditHelperAdvice extends AbstractEditHelperAdvice {
+
+ /** root name */
+ private static final String PARAMETER = "parameter";
+
+ @Override
+ public ICommand getBeforeEditCommand(IEditCommandRequest request) {
+ if (request instanceof ConfigureRequest) {
+ EObject elementToConfigure = ((ConfigureRequest) request).getElementToConfigure();
+ if (elementToConfigure != null && elementToConfigure instanceof Property) {
+ EObject container = elementToConfigure.eContainer();
+ if (container != null && container instanceof Property) {
+ Property constraintProperty = (Property) container;
+ if (UMLUtil.getStereotypeApplication(constraintProperty, ConstraintProperty.class) != null) {
+ Type type = constraintProperty.getType();
+ if (type != null && type instanceof Class && UMLUtil.getStereotypeApplication(type, ConstraintBlock.class) != null) {
+ ((Class) type).getOwnedAttributes().add((Property) elementToConfigure);
+ ((Property) elementToConfigure).setAggregation(AggregationKind.COMPOSITE_LITERAL);
+ }
+ }
+ }
+ }
+ }
+ return super.getBeforeEditCommand(request);
+ }
+
+ @Override
+ protected ICommand getBeforeConfigureCommand(final ConfigureRequest request) {
+ // check this advice has to propose something. If element is not a constraint parameter, do not change the name
+ EObject p = request.getElementToConfigure();
+ if (p instanceof Property) {
+ // check this is a constraint parameter, not another kind of property
+ EObject container = ((Property) p).eContainer();
+ if (container != null && container instanceof Property) {
+ Property constraintProperty = (Property) container;
+ if (UMLUtil.getStereotypeApplication(constraintProperty, ConstraintProperty.class) != null) {
+ Type type = constraintProperty.getType();
+ if (type != null && type instanceof Class && UMLUtil.getStereotypeApplication(type, ConstraintBlock.class) != null) {
+ return new ConfigureElementCommand(request) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ NamedElement element = (NamedElement) request.getElementToConfigure();
+ if (element != null) {
+ // Set default name
+ // Initialize the element name based on the created IElementType
+ String initializedName = NamedElementHelper.getDefaultNameWithIncrementFromBase(PARAMETER, element.eContainer().eContents());
+ element.setName(initializedName);
+ }
+ return CommandResult.newOKCommandResult(element);
+ }
+ };
+ }
+ }
+ }
+ }
+ return null;
+ }
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/ConstraintPropertyEditHelperAdvice.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/ConstraintPropertyEditHelperAdvice.java
new file mode 100755
index 0000000..2c58e04
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/ConstraintPropertyEditHelperAdvice.java
@@ -0,0 +1,153 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.helper;
+
+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.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand;
+import org.eclipse.gmf.runtime.emf.type.core.commands.ConfigureElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
+import org.eclipse.papyrus.sysml.constraints.ConstraintBlock;
+import org.eclipse.papyrus.sysml.constraints.ConstraintProperty;
+import org.eclipse.papyrus.sysml.constraints.ConstraintsPackage;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.helper.advice.AbstractStereotypedElementEditHelperAdvice;
+import org.eclipse.papyrus.uml.service.types.utils.ElementUtil;
+import org.eclipse.papyrus.uml.service.types.utils.NamedElementHelper;
+import org.eclipse.uml2.uml.AggregationKind;
+import org.eclipse.uml2.uml.Association;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Type;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.eclipse.uml2.uml.util.UMLUtil;
+import org.eclipse.uml2.uml.util.UMLUtil.StereotypeApplicationHelper;
+
+/** SysML {@link ConstraintProperty} edit helper advice */
+public class ConstraintPropertyEditHelperAdvice extends AbstractStereotypedElementEditHelperAdvice {
+
+ /** Default constructor */
+ public ConstraintPropertyEditHelperAdvice() {
+ requiredProfiles.add(ConstraintsPackage.eINSTANCE);
+ }
+
+ /** Complete creation process by applying the expected stereotype */
+ @Override
+ protected ICommand getBeforeConfigureCommand(final ConfigureRequest request) {
+
+ return new ConfigureElementCommand(request) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ NamedElement element = (NamedElement) request.getElementToConfigure();
+ if (element != null) {
+ StereotypeApplicationHelper.INSTANCE.applyStereotype(element, ConstraintsPackage.eINSTANCE.getConstraintProperty());
+
+ // Set default name
+ // Initialize the element name based on the created IElementType
+ String initializedName = NamedElementHelper.getDefaultNameWithIncrementFromBase(ConstraintsPackage.eINSTANCE.getConstraintProperty().getName().toLowerCase(), element.eContainer().eContents());
+ element.setName(initializedName);
+ // SysML constraint : self.ownedAttribute->forAll(p | p.type.oclIsKindOf(ConstraintBlock) implies p.aggregation = #composite)
+ if (element instanceof Property) {
+ ((Property) element).setAggregation(AggregationKind.COMPOSITE_LITERAL);
+ }
+ }
+ return CommandResult.newOKCommandResult(element);
+ }
+ };
+ }
+
+ /**
+ * Restrict allowed types to {@link ConstraintBlock}
+ */
+ @Override
+ protected ICommand getBeforeSetCommand(SetRequest request) {
+
+ // Only allow ConstraintBlock or null as new type
+ if (UMLPackage.eINSTANCE.getTypedElement_Type().equals(request.getFeature())) {
+ if (request.getValue() != null) {
+
+ if (!(request.getValue() instanceof Element)) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ ConstraintBlock constraint = UMLUtil.getStereotypeApplication((Element) request.getValue(), ConstraintBlock.class);
+ if (constraint == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * Complete creation process by adding the related association.
+ * This assumes the constraintProperty type has been set at this point.
+ */
+ @Override
+ protected ICommand getAfterConfigureCommand(final ConfigureRequest request) {
+
+ return new ConfigureElementCommand(request) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ Property sourcePart = (Property) request.getElementToConfigure();
+ if ((sourcePart != null) && (sourcePart.eContainer() != null)) {
+
+ sourcePart.setAggregation(AggregationKind.COMPOSITE_LITERAL);
+
+ // Create association between element owner and element type
+ Type sourceType = resolveTypeContainer(sourcePart);
+ Package associationContainer = sourceType.getNearestPackage();
+
+ // Create targetProperty
+ Property targetProperty = UMLFactory.eINSTANCE.createProperty();
+ targetProperty.setType(sourceType);
+ targetProperty.setName(sourceType.getName() != null ? sourceType.getName().toLowerCase() : "null");
+
+ Association association = UMLFactory.eINSTANCE.createAssociation();
+ association.getMemberEnds().add(sourcePart);
+ association.getOwnedEnds().add(targetProperty);
+ association.getMemberEnds().add(targetProperty);
+
+ String associationName = NamedElementHelper.getDefaultNameWithIncrementFromBase("Association", associationContainer.eContents()); //$NON-NLS-1$
+ association.setName(associationName);
+
+ // Add SysML Nature on the new Association
+ ElementUtil.addNature(association, SysMLElementTypes.SYSML_NATURE);
+
+ association.setPackage(associationContainer);
+ }
+ return CommandResult.newOKCommandResult(sourcePart);
+ }
+
+ private Type resolveTypeContainer(Property property) {
+ EObject eContainer = property.eContainer();
+ if (eContainer instanceof Property) {
+ eContainer = ((Property) eContainer).getType();
+ }
+ if (eContainer instanceof Type) {
+ return (Type) eContainer;
+ }
+ return null;
+ }
+ };
+ }
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/ConstraintPropertyEditHelperAdvice.java.rej b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/ConstraintPropertyEditHelperAdvice.java.rej
new file mode 100755
index 0000000..3a19c61
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/ConstraintPropertyEditHelperAdvice.java.rej
@@ -0,0 +1,9 @@
+@@ -116,7 +116,7 @@
+ // Create targetProperty
+ Property targetProperty = UMLFactory.eINSTANCE.createProperty();
+ targetProperty.setType(sourceType);
+- targetProperty.setName(sourceType.getName().toLowerCase()); // all elements in UML must have a qualified name
++ targetProperty.setName(sourceType.getName() != null ? sourceType.getName().toLowerCase() : "null");
+
+ Association association = UMLFactory.eINSTANCE.createAssociation();
+ association.getMemberEnds().add(sourcePart);
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/CopyEditHelperAdvice.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/CopyEditHelperAdvice.java
new file mode 100755
index 0000000..04c2631
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/CopyEditHelperAdvice.java
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.helper;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.commands.ConfigureElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.papyrus.sysml.requirements.Copy;
+import org.eclipse.papyrus.sysml.requirements.RequirementsPackage;
+import org.eclipse.papyrus.uml.service.types.helper.advice.AbstractStereotypedElementEditHelperAdvice;
+import org.eclipse.papyrus.uml.service.types.utils.NamedElementHelper;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.util.UMLUtil.StereotypeApplicationHelper;
+
+/** SysML {@link Copy} edit helper advice */
+public class CopyEditHelperAdvice extends AbstractStereotypedElementEditHelperAdvice {
+
+ /** Default constructor */
+ public CopyEditHelperAdvice() {
+ requiredProfiles.add(RequirementsPackage.eINSTANCE);
+ }
+
+ /** Complete creation process by applying the expected stereotype */
+ @Override
+ protected ICommand getBeforeConfigureCommand(final ConfigureRequest request) {
+
+ return new ConfigureElementCommand(request) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ NamedElement element = (NamedElement) request.getElementToConfigure();
+ if (element != null) {
+ StereotypeApplicationHelper.INSTANCE.applyStereotype(element, RequirementsPackage.eINSTANCE.getCopy());
+
+ // Set default name
+ // Initialize the element name based on the created IElementType
+ String initializedName = NamedElementHelper.getDefaultNameWithIncrementFromBase(RequirementsPackage.eINSTANCE.getCopy().getName(), element.eContainer().eContents());
+ element.setName(initializedName);
+ }
+ return CommandResult.newOKCommandResult(element);
+ }
+ };
+ }
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/DeriveReqtEditHelperAdvice.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/DeriveReqtEditHelperAdvice.java
new file mode 100755
index 0000000..7187415
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/DeriveReqtEditHelperAdvice.java
@@ -0,0 +1,58 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.helper;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.commands.ConfigureElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.papyrus.sysml.requirements.RequirementsPackage;
+import org.eclipse.papyrus.uml.service.types.helper.advice.AbstractStereotypedElementEditHelperAdvice;
+import org.eclipse.papyrus.uml.service.types.utils.NamedElementHelper;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.util.UMLUtil.StereotypeApplicationHelper;
+
+/** SysML DeriveReqt edit helper advice */
+public class DeriveReqtEditHelperAdvice extends AbstractStereotypedElementEditHelperAdvice {
+
+ /** Default constructor */
+ public DeriveReqtEditHelperAdvice() {
+ requiredProfiles.add(RequirementsPackage.eINSTANCE);
+ }
+
+ /** Complete creation process by applying the expected stereotype */
+ @Override
+ protected ICommand getBeforeConfigureCommand(final ConfigureRequest request) {
+
+ return new ConfigureElementCommand(request) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ NamedElement element = (NamedElement) request.getElementToConfigure();
+ if (element != null) {
+ StereotypeApplicationHelper.INSTANCE.applyStereotype(element, RequirementsPackage.eINSTANCE.getDeriveReqt());
+
+ // Set default name
+ // Initialize the element name based on the created IElementType
+ String initializedName = NamedElementHelper.getDefaultNameWithIncrementFromBase(RequirementsPackage.eINSTANCE.getDeriveReqt().getName(), element.eContainer().eContents());
+ element.setName(initializedName);
+ }
+ return CommandResult.newOKCommandResult(element);
+ }
+ };
+ }
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/DimensionEditHelperAdvice.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/DimensionEditHelperAdvice.java
new file mode 100755
index 0000000..45e730f
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/DimensionEditHelperAdvice.java
@@ -0,0 +1,57 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.helper;
+
+import java.awt.Dimension;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.commands.ConfigureElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.papyrus.sysml.blocks.BlocksPackage;
+import org.eclipse.papyrus.uml.service.types.helper.advice.AbstractStereotypedElementEditHelperAdvice;
+import org.eclipse.papyrus.uml.service.types.utils.NamedElementHelper;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.util.UMLUtil.StereotypeApplicationHelper;
+
+/** SysML {@link Dimension} edit helper advice */
+public class DimensionEditHelperAdvice extends AbstractStereotypedElementEditHelperAdvice {
+
+ /** Default constructor */
+ public DimensionEditHelperAdvice() {
+ requiredProfiles.add(BlocksPackage.eINSTANCE);
+ }
+
+ /** Complete creation process by applying the expected stereotype */
+ @Override
+ protected ICommand getBeforeConfigureCommand(final ConfigureRequest request) {
+
+ return new ConfigureElementCommand(request) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ NamedElement element = (NamedElement) request.getElementToConfigure();
+ if (element != null) {
+ StereotypeApplicationHelper.INSTANCE.applyStereotype(element, BlocksPackage.eINSTANCE.getDimension());
+
+ // Set default name
+ // Initialize the element name based on the created IElementType
+ String initializedName = NamedElementHelper.getDefaultNameWithIncrementFromBase(BlocksPackage.eINSTANCE.getDimension().getName(), element.eContainer().eContents());
+ element.setName(initializedName);
+ }
+ return CommandResult.newOKCommandResult(element);
+ }
+ };
+ }
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/FlowPortEditHelperAdvice.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/FlowPortEditHelperAdvice.java
new file mode 100755
index 0000000..8decfb9
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/FlowPortEditHelperAdvice.java
@@ -0,0 +1,141 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.helper;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand;
+import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher;
+import org.eclipse.gmf.runtime.emf.type.core.commands.ConfigureElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.GetEditContextRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
+import org.eclipse.papyrus.sysml.blocks.Block;
+import org.eclipse.papyrus.sysml.blocks.ValueType;
+import org.eclipse.papyrus.sysml.portandflows.FlowSpecification;
+import org.eclipse.papyrus.sysml.portandflows.PortandflowsPackage;
+import org.eclipse.papyrus.sysml.service.types.matcher.BlockMatcher;
+import org.eclipse.papyrus.uml.service.types.helper.advice.AbstractStereotypedElementEditHelperAdvice;
+import org.eclipse.papyrus.uml.service.types.utils.NamedElementHelper;
+import org.eclipse.uml2.uml.DataType;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Port;
+import org.eclipse.uml2.uml.Signal;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.eclipse.uml2.uml.util.UMLUtil;
+import org.eclipse.uml2.uml.util.UMLUtil.StereotypeApplicationHelper;
+
+/** SysML FlowPort#InOut edit helper advice */
+public class FlowPortEditHelperAdvice extends AbstractStereotypedElementEditHelperAdvice {
+
+ /** Default constructor */
+ public FlowPortEditHelperAdvice() {
+ requiredProfiles.add(PortandflowsPackage.eINSTANCE);
+ }
+
+ /**
+ * Check if the creation context is a Block.
+ *
+ * @see org.eclipse.papyrus.sysml.service.types.helper.AbstractStereotypedElementEditHelperAdvice#approveRequest(org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest)
+ *
+ * @param request
+ * @return true if the request is approved
+ */
+ @Override
+ public boolean approveRequest(IEditCommandRequest request) {
+ boolean isApproved = super.approveRequest(request);
+
+ if ((request != null) && (request instanceof GetEditContextRequest)) {
+
+ // Retrieve the edit context from request
+ GetEditContextRequest editContextRequest = (GetEditContextRequest) request;
+
+ // Test if the edit context is a Block
+ if (editContextRequest.getEditContext() instanceof Element) {
+ Element contextElement = (Element) editContextRequest.getEditContext();
+
+ IElementMatcher matcher = new BlockMatcher();
+ if (!matcher.matches(contextElement)) {
+ isApproved = false;
+ }
+ }
+ }
+
+ return isApproved;
+ }
+
+ /** Complete creation process by applying the expected stereotype */
+ @Override
+ protected ICommand getBeforeConfigureCommand(final ConfigureRequest request) {
+
+ return new ConfigureElementCommand(request) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+
+ Port port = (Port) request.getElementToConfigure();
+ if (port != null) {
+
+ // Apply FlowPort stereotype
+ StereotypeApplicationHelper.INSTANCE.applyStereotype(port, PortandflowsPackage.eINSTANCE.getFlowPort());
+
+ // Set default name
+ // Initialize the element name based on the created IElementType
+ String initializedName = NamedElementHelper.getDefaultNameWithIncrementFromBase(PortandflowsPackage.eINSTANCE.getFlowPort().getName().toLowerCase(), port.eContainer().eContents());
+ port.setName(initializedName);
+ }
+
+ return CommandResult.newOKCommandResult(port);
+ }
+ };
+ }
+
+ /**
+ * Restrict allowed types to {@link Block}, {@link Signal}, {@link DataType}, {@link ValueType}, {@link FlowSpecification}
+ */
+ @Override
+ protected ICommand getBeforeSetCommand(SetRequest request) {
+
+ // Only allow null, Block, Signal, DataType or ValueType as the new type
+ if (UMLPackage.eINSTANCE.getTypedElement_Type().equals(request.getFeature())) {
+ if (request.getValue() != null) {
+
+ if (!(request.getValue() instanceof Element)) {
+ return UnexecutableCommand.INSTANCE; // Should not happen
+ }
+
+ Element value = (Element) request.getValue();
+ if ((value instanceof DataType) || (value instanceof Signal)) {
+ return null; // accept these types
+ }
+
+ ValueType valueType = UMLUtil.getStereotypeApplication(value, ValueType.class);
+ Block block = UMLUtil.getStereotypeApplication(value, Block.class);
+ FlowSpecification flowspecification = UMLUtil.getStereotypeApplication(value, FlowSpecification.class);
+
+ if ((block != null) || (valueType != null) || (flowspecification != null)) {
+ return null; // accept these types
+ }
+
+ return UnexecutableCommand.INSTANCE; // forbid other types
+ }
+ }
+
+ return null;
+ }
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/FlowPortInEditHelperAdvice.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/FlowPortInEditHelperAdvice.java
new file mode 100755
index 0000000..6450c43
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/FlowPortInEditHelperAdvice.java
@@ -0,0 +1,58 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.helper;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.commands.ConfigureElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.papyrus.sysml.portandflows.FlowDirection;
+import org.eclipse.papyrus.sysml.portandflows.FlowPort;
+import org.eclipse.papyrus.sysml.portandflows.PortandflowsPackage;
+import org.eclipse.papyrus.uml.service.types.helper.advice.AbstractStereotypedElementEditHelperAdvice;
+import org.eclipse.uml2.uml.Port;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+/** SysML FlowPort#In edit helper advice */
+public class FlowPortInEditHelperAdvice extends AbstractStereotypedElementEditHelperAdvice {
+
+ /** Default constructor */
+ public FlowPortInEditHelperAdvice() {
+ requiredProfiles.add(PortandflowsPackage.eINSTANCE);
+ }
+
+ /** Complete creation process by applying the expected stereotype */
+ @Override
+ protected ICommand getBeforeConfigureCommand(final ConfigureRequest request) {
+
+ return new ConfigureElementCommand(request) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+
+ Port port = (Port) request.getElementToConfigure();
+ FlowPort flowPort = UMLUtil.getStereotypeApplication(port, FlowPort.class);
+ if (flowPort != null) {
+ flowPort.setDirection(FlowDirection.IN);
+ }
+
+ return CommandResult.newOKCommandResult(port);
+ }
+ };
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/FlowPortInOutEditHelperAdvice.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/FlowPortInOutEditHelperAdvice.java
new file mode 100755
index 0000000..78bc0dd
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/FlowPortInOutEditHelperAdvice.java
@@ -0,0 +1,57 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.helper;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.commands.ConfigureElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.papyrus.sysml.portandflows.FlowDirection;
+import org.eclipse.papyrus.sysml.portandflows.FlowPort;
+import org.eclipse.papyrus.sysml.portandflows.PortandflowsPackage;
+import org.eclipse.papyrus.uml.service.types.helper.advice.AbstractStereotypedElementEditHelperAdvice;
+import org.eclipse.uml2.uml.Port;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+/** SysML FlowPort#InOut edit helper advice */
+public class FlowPortInOutEditHelperAdvice extends AbstractStereotypedElementEditHelperAdvice {
+
+ /** Default constructor */
+ public FlowPortInOutEditHelperAdvice() {
+ requiredProfiles.add(PortandflowsPackage.eINSTANCE);
+ }
+
+ /** Complete creation process by applying the expected stereotype */
+ @Override
+ protected ICommand getBeforeConfigureCommand(final ConfigureRequest request) {
+
+ return new ConfigureElementCommand(request) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+
+ Port port = (Port) request.getElementToConfigure();
+ FlowPort flowPort = UMLUtil.getStereotypeApplication(port, FlowPort.class);
+ if (flowPort != null) {
+ flowPort.setDirection(FlowDirection.INOUT);
+ }
+
+ return CommandResult.newOKCommandResult(port);
+ }
+ };
+ }
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/FlowPortNAEditHelperAdvice.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/FlowPortNAEditHelperAdvice.java
new file mode 100755
index 0000000..72db9e0
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/FlowPortNAEditHelperAdvice.java
@@ -0,0 +1,60 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.helper;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.commands.ConfigureElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.papyrus.sysml.portandflows.FlowSpecification;
+import org.eclipse.papyrus.sysml.portandflows.PortandflowsPackage;
+import org.eclipse.papyrus.uml.service.types.helper.advice.AbstractStereotypedElementEditHelperAdvice;
+import org.eclipse.uml2.uml.Port;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+/** SysML FlowPort#In edit helper advice */
+public class FlowPortNAEditHelperAdvice extends AbstractStereotypedElementEditHelperAdvice {
+
+ /** Default constructor */
+ public FlowPortNAEditHelperAdvice() {
+ requiredProfiles.add(PortandflowsPackage.eINSTANCE);
+ }
+
+ /** Verify that the new FlowPort is typed by a FlowSpecification */
+ @Override
+ protected ICommand getAfterConfigureCommand(final ConfigureRequest request) {
+
+ return new ConfigureElementCommand(request) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+
+ Port port = (Port) request.getElementToConfigure();
+
+ // Ensure the type is a FlowSpecification
+ if ((port != null) && (port.getType() != null)) {
+ if (UMLUtil.getStereotypeApplication(port.getType(), FlowSpecification.class) != null) {
+ return CommandResult.newOKCommandResult(port);
+ }
+ }
+
+ return CommandResult.newCancelledCommandResult();
+ }
+ };
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/FlowPortOutEditHelperAdvice.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/FlowPortOutEditHelperAdvice.java
new file mode 100755
index 0000000..8efd45f
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/FlowPortOutEditHelperAdvice.java
@@ -0,0 +1,57 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.helper;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.commands.ConfigureElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.papyrus.sysml.portandflows.FlowDirection;
+import org.eclipse.papyrus.sysml.portandflows.FlowPort;
+import org.eclipse.papyrus.sysml.portandflows.PortandflowsPackage;
+import org.eclipse.papyrus.uml.service.types.helper.advice.AbstractStereotypedElementEditHelperAdvice;
+import org.eclipse.uml2.uml.Port;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+/** SysML FlowPort#Out edit helper advice */
+public class FlowPortOutEditHelperAdvice extends AbstractStereotypedElementEditHelperAdvice {
+
+ /** Default constructor */
+ public FlowPortOutEditHelperAdvice() {
+ requiredProfiles.add(PortandflowsPackage.eINSTANCE);
+ }
+
+ /** Complete creation process by applying the expected stereotype */
+ @Override
+ protected ICommand getBeforeConfigureCommand(final ConfigureRequest request) {
+
+ return new ConfigureElementCommand(request) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+
+ Port port = (Port) request.getElementToConfigure();
+ FlowPort flowPort = UMLUtil.getStereotypeApplication(port, FlowPort.class);
+ if (flowPort != null) {
+ flowPort.setDirection(FlowDirection.OUT);
+ }
+
+ return CommandResult.newOKCommandResult(port);
+ }
+ };
+ }
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/FlowPropertyEditHelperAdvice.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/FlowPropertyEditHelperAdvice.java
new file mode 100755
index 0000000..8b3b54f
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/FlowPropertyEditHelperAdvice.java
@@ -0,0 +1,137 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.helper;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand;
+import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher;
+import org.eclipse.gmf.runtime.emf.type.core.commands.ConfigureElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.GetEditContextRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
+import org.eclipse.papyrus.sysml.blocks.Block;
+import org.eclipse.papyrus.sysml.blocks.ValueType;
+import org.eclipse.papyrus.sysml.portandflows.PortandflowsPackage;
+import org.eclipse.papyrus.sysml.service.types.matcher.BlockMatcher;
+import org.eclipse.papyrus.sysml.service.types.matcher.FlowSpecificationMatcher;
+import org.eclipse.papyrus.uml.service.types.helper.advice.AbstractStereotypedElementEditHelperAdvice;
+import org.eclipse.papyrus.uml.service.types.utils.NamedElementHelper;
+import org.eclipse.uml2.uml.DataType;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.Signal;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.eclipse.uml2.uml.util.UMLUtil;
+import org.eclipse.uml2.uml.util.UMLUtil.StereotypeApplicationHelper;
+
+/** SysML FlowProperty edit helper advice */
+public class FlowPropertyEditHelperAdvice extends AbstractStereotypedElementEditHelperAdvice {
+
+ /** Default constructor */
+ public FlowPropertyEditHelperAdvice() {
+ requiredProfiles.add(PortandflowsPackage.eINSTANCE);
+ }
+
+ /**
+ * Check if the creation context is a FlowSpecification.
+ *
+ * @see org.eclipse.papyrus.sysml.service.types.helper.AbstractStereotypedElementEditHelperAdvice#approveRequest(org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest)
+ *
+ * @param request
+ * @return true if the request is approved
+ */
+ @Override
+ public boolean approveRequest(IEditCommandRequest request) {
+ boolean isApproved = super.approveRequest(request);
+
+ if ((request != null) && (request instanceof GetEditContextRequest)) {
+
+ // Retrieve the edit context from request
+ GetEditContextRequest editContextRequest = (GetEditContextRequest) request;
+
+ // Test if the edit context is a FlowSpecification
+ if (editContextRequest.getEditContext() instanceof Element) {
+ Element contextElement = (Element) editContextRequest.getEditContext();
+
+ IElementMatcher matcher = new FlowSpecificationMatcher();
+ IElementMatcher blockMatcher = new BlockMatcher();
+ if (!matcher.matches(contextElement) && !blockMatcher.matches(contextElement)) {
+ isApproved = false;
+ }
+ }
+ }
+
+ return isApproved;
+ }
+
+ /** Complete creation process by applying the expected stereotype */
+ @Override
+ protected ICommand getBeforeConfigureCommand(final ConfigureRequest request) {
+
+ return new ConfigureElementCommand(request) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ NamedElement element = (NamedElement) request.getElementToConfigure();
+ if (element != null) {
+ StereotypeApplicationHelper.INSTANCE.applyStereotype(element, PortandflowsPackage.eINSTANCE.getFlowProperty());
+
+ // Set default name
+ // Initialize the element name based on the created IElementType
+ String initializedName = NamedElementHelper.getDefaultNameWithIncrementFromBase(PortandflowsPackage.eINSTANCE.getFlowProperty().getName().toLowerCase(), element.eContainer().eContents());
+ element.setName(initializedName);
+ }
+ return CommandResult.newOKCommandResult(element);
+ }
+ };
+ }
+
+ /**
+ * Restrict allowed types to {@link Block}, {@link Signal}, {@link DataType}, {@link ValueType}
+ */
+ @Override
+ protected ICommand getBeforeSetCommand(SetRequest request) {
+
+ // Only allow null, FlowSpecification, Block, Signal, DataType or ValueType as new type.
+ if (UMLPackage.eINSTANCE.getTypedElement_Type().equals(request.getFeature())) {
+ if (request.getValue() != null) {
+
+ if (!(request.getValue() instanceof Element)) {
+ return UnexecutableCommand.INSTANCE; // Should not happen
+ }
+
+ Element value = (Element) request.getValue();
+ if ((value instanceof DataType) || (value instanceof Signal)) {
+ return null; // accept these types
+ }
+
+ ValueType valueType = UMLUtil.getStereotypeApplication(value, ValueType.class);
+ Block block = UMLUtil.getStereotypeApplication(value, Block.class);
+
+ if ((block != null) || (valueType != null)) {
+ return null; // accept these types
+ }
+
+ return UnexecutableCommand.INSTANCE; // forbid other types
+ }
+ }
+
+ return null;
+ }
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/FlowSpecificationEditHelperAdvice.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/FlowSpecificationEditHelperAdvice.java
new file mode 100755
index 0000000..155146b
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/FlowSpecificationEditHelperAdvice.java
@@ -0,0 +1,139 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.helper;
+
+import java.util.Arrays;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand;
+import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.commands.ConfigureElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.GetEditContextRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest;
+import org.eclipse.papyrus.sysml.portandflows.PortandflowsPackage;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.sysml.service.types.matcher.FlowSpecificationMatcher;
+import org.eclipse.papyrus.sysml.service.types.matcher.RequirementMatcher;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.helper.advice.AbstractStereotypedElementEditHelperAdvice;
+import org.eclipse.papyrus.uml.service.types.utils.NamedElementHelper;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.util.UMLUtil.StereotypeApplicationHelper;
+
+/** SysML FlowSpecification edit helper advice */
+public class FlowSpecificationEditHelperAdvice extends AbstractStereotypedElementEditHelperAdvice {
+
+ /** Default constructor */
+ public FlowSpecificationEditHelperAdvice() {
+ requiredProfiles.add(PortandflowsPackage.eINSTANCE);
+ }
+
+ /**
+ * FlowSpecification owned feature restrictions :
+ * [1] Flow specifications cannot own operations or receptions (they can only own FlowProperties).
+ * [2] Every “ownedAttribute” of a FlowSpecification must be a FlowProperty.
+ */
+ @Override
+ protected ICommand getBeforeCreateCommand(CreateElementRequest request) {
+
+ IElementType elementToCreate = request.getElementType();
+
+ // [1] Flow specifications cannot own operations or receptions (they can only own FlowProperties).
+ if (elementToCreate == UMLElementTypes.OPERATION) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ if (elementToCreate == UMLElementTypes.RECEPTION) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ // [2] Every “ownedAttribute” of a FlowSpecification must be a FlowProperty.
+ if (UMLElementTypes.PROPERTY.getEClass().isSuperTypeOf(elementToCreate.getEClass())) {
+ if ((elementToCreate != SysMLElementTypes.FLOW_PROPERTY) && !(Arrays.asList(elementToCreate.getAllSuperTypes()).contains(SysMLElementTypes.FLOW_PROPERTY))) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ }
+
+ return super.getBeforeCreateCommand(request);
+ }
+
+ /**
+ * Check if the creation context is allowed.
+ *
+ * @see org.eclipse.papyrus.sysml.service.types.helper.AbstractStereotypedElementEditHelperAdvice#approveRequest(org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest)
+ *
+ * @param request
+ * @return true if the request is approved
+ */
+ @Override
+ public boolean approveRequest(IEditCommandRequest request) {
+ boolean isApproved = super.approveRequest(request);
+
+ if ((request != null) && (request instanceof GetEditContextRequest)) {
+
+ // Retrieve the edit context from request
+ GetEditContextRequest editContextRequest = (GetEditContextRequest) request;
+
+ // Test context type
+ if (editContextRequest.getEditContext() instanceof Element) {
+ Element contextElement = (Element) editContextRequest.getEditContext();
+
+ IElementMatcher matcher;
+
+ // Cannot create a nested FlowSpecification in FlowSpecification
+ matcher = new FlowSpecificationMatcher();
+ if (matcher.matches(contextElement)) {
+ isApproved = false;
+ }
+
+ // Cannot create a nested FlowSpecification in Requirement
+ matcher = new RequirementMatcher();
+ if (matcher.matches(contextElement)) {
+ isApproved = false;
+ }
+ }
+ }
+
+ return isApproved;
+ }
+
+ /** Complete creation process by applying the expected stereotype */
+ @Override
+ protected ICommand getBeforeConfigureCommand(final ConfigureRequest request) {
+
+ return new ConfigureElementCommand(request) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ NamedElement element = (NamedElement) request.getElementToConfigure();
+ if (element != null) {
+ StereotypeApplicationHelper.INSTANCE.applyStereotype(element, PortandflowsPackage.eINSTANCE.getFlowSpecification());
+
+ // Set default name
+ // Initialize the element name based on the created IElementType
+ String initializedName = NamedElementHelper.getDefaultNameWithIncrementFromBase(PortandflowsPackage.eINSTANCE.getFlowSpecification().getName(), element.eContainer().eContents());
+ element.setName(initializedName);
+ }
+ return CommandResult.newOKCommandResult(element);
+ }
+ };
+ }
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/ItemFlowEditHelperAdvice.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/ItemFlowEditHelperAdvice.java
new file mode 100755
index 0000000..f4ebfdf
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/ItemFlowEditHelperAdvice.java
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.helper;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.commands.ConfigureElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.papyrus.sysml.portandflows.ItemFlow;
+import org.eclipse.papyrus.sysml.portandflows.PortandflowsPackage;
+import org.eclipse.papyrus.uml.service.types.helper.advice.AbstractStereotypedElementEditHelperAdvice;
+import org.eclipse.papyrus.uml.service.types.utils.NamedElementHelper;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.util.UMLUtil.StereotypeApplicationHelper;
+
+/** SysML {@link ItemFlow} edit helper advice */
+public class ItemFlowEditHelperAdvice extends AbstractStereotypedElementEditHelperAdvice {
+
+ /** Default constructor */
+ public ItemFlowEditHelperAdvice() {
+ requiredProfiles.add(PortandflowsPackage.eINSTANCE);
+ }
+
+ /** Complete creation process by applying the expected stereotype */
+ @Override
+ protected ICommand getBeforeConfigureCommand(final ConfigureRequest request) {
+
+ return new ConfigureElementCommand(request) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ NamedElement element = (NamedElement) request.getElementToConfigure();
+ if (element != null) {
+ StereotypeApplicationHelper.INSTANCE.applyStereotype(element, PortandflowsPackage.eINSTANCE.getItemFlow());
+
+ // Set default name
+ // Initialize the element name based on the created IElementType
+ String initializedName = NamedElementHelper.getDefaultNameWithIncrementFromBase(PortandflowsPackage.eINSTANCE.getItemFlow().getName(), element.eContainer().eContents());
+ element.setName(initializedName);
+ }
+ return CommandResult.newOKCommandResult(element);
+ }
+ };
+ }
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/PartPropertyEditHelperAdvice.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/PartPropertyEditHelperAdvice.java
new file mode 100755
index 0000000..eb1b474
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/PartPropertyEditHelperAdvice.java
@@ -0,0 +1,162 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.helper;
+
+import java.util.List;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher;
+import org.eclipse.gmf.runtime.emf.type.core.commands.ConfigureElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DuplicateElementsRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.GetEditContextRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest;
+import org.eclipse.papyrus.sysml.blocks.Block;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.sysml.service.types.matcher.BlockMatcher;
+import org.eclipse.papyrus.sysml.service.types.matcher.PartPropertyMatcher;
+import org.eclipse.papyrus.uml.service.types.utils.ElementUtil;
+import org.eclipse.papyrus.uml.service.types.utils.NamedElementHelper;
+import org.eclipse.uml2.uml.AggregationKind;
+import org.eclipse.uml2.uml.Association;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Type;
+import org.eclipse.uml2.uml.UMLFactory;
+
+/** SysML Property Part edit helper advice */
+public class PartPropertyEditHelperAdvice extends AbstractPropertyEditHelperAdvice {
+
+ /**
+ * Check if the creation context is a {@link Block}.
+ *
+ * @see org.eclipse.papyrus.sysml.service.types.helper.AbstractStereotypedElementEditHelperAdvice#approveRequest(org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest)
+ *
+ * @param request
+ * @return true if the request is approved
+ */
+ @Override
+ public boolean approveRequest(IEditCommandRequest request) {
+ boolean isApproved = super.approveRequest(request);
+
+ if ((request != null) && (request instanceof GetEditContextRequest)) {
+
+ // Retrieve the edit context from request
+ GetEditContextRequest editContextRequest = (GetEditContextRequest) request;
+
+ // Test if the edit context is a Block
+ if (editContextRequest.getEditContext() instanceof Element) {
+ Element contextElement = (Element) editContextRequest.getEditContext();
+
+ IElementMatcher matcher = new BlockMatcher();
+ if (!matcher.matches(contextElement)) {
+ isApproved = false;
+ }
+ }
+ }
+
+ return isApproved;
+ }
+
+ /** Complete creation process by setting name and default aggregation */
+ @Override
+ protected ICommand getBeforeConfigureCommand(final ConfigureRequest request) {
+
+ return new ConfigureElementCommand(request) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ Property element = (Property) request.getElementToConfigure();
+ if (element != null) {
+
+ // Set default name
+ String initializedName = NamedElementHelper.getDefaultNameWithIncrementFromBase("part", element.eContainer().eContents()); //$NON-NLS-1$
+ element.setName(initializedName);
+ // Initialize the aggregation to composite.
+ element.setAggregation(AggregationKind.COMPOSITE_LITERAL);
+ }
+ return CommandResult.newOKCommandResult(element);
+ }
+ };
+ }
+
+ /**
+ * Complete creation process by adding the related association.
+ * This assumes the part type has been set at this point.
+ */
+ @Override
+ protected ICommand getAfterConfigureCommand(final ConfigureRequest request) {
+
+ return new ConfigureElementCommand(request) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ Property sourcePart = (Property) request.getElementToConfigure();
+ if ((sourcePart != null) && (sourcePart.getType() != null)) {
+
+ // Create association between element owner and element type
+ Type sourceType = sourcePart.getClass_();
+ // Type targetType = sourcePart.getType();
+ Package associationContainer = sourceType.getNearestPackage();
+
+ // Create targetProperty
+ Property targetProperty = UMLFactory.eINSTANCE.createProperty();
+ targetProperty.setType(sourceType);
+ targetProperty.setName(sourceType.getName() != null ? sourceType.getName().toLowerCase() : "null");
+
+ Association association = UMLFactory.eINSTANCE.createAssociation();
+ association.getMemberEnds().add(sourcePart);
+ association.getOwnedEnds().add(targetProperty);
+ association.getMemberEnds().add(targetProperty);
+
+ String associationName = NamedElementHelper.getDefaultNameWithIncrementFromBase("Association", associationContainer.eContents()); //$NON-NLS-1$
+ association.setName(associationName);
+
+ // Add SysML Nature on the new Association
+ ElementUtil.addNature(association, SysMLElementTypes.SYSML_NATURE);
+
+ association.setPackage(associationContainer);
+ }
+ return CommandResult.newOKCommandResult(sourcePart);
+ }
+ };
+ }
+
+ /**
+ * Returns the Part to be duplicated
+ *
+ * @return the Part to be duplicated or <code>null</code> if this is not a part
+ */
+ @Override
+ protected Property getDuplicatedProperty(DuplicateElementsRequest request) {
+ List<Object> elementsToBeDuplicated = request.getElementsToBeDuplicated();
+ if (elementsToBeDuplicated == null || elementsToBeDuplicated.isEmpty()) {
+ return null;
+ }
+ Object firstElement = elementsToBeDuplicated.get(0); // there should be only one element here
+ if (!(firstElement instanceof Property)) {
+ return null;
+ }
+ PartPropertyMatcher matcher = new PartPropertyMatcher();
+ return matcher.matches((Property) firstElement) ? (Property) firstElement : null;
+ }
+
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/ProblemEditHelperAdvice.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/ProblemEditHelperAdvice.java
new file mode 100755
index 0000000..f926187
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/ProblemEditHelperAdvice.java
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.helper;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.commands.ConfigureElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.papyrus.sysml.modelelements.ModelelementsPackage;
+import org.eclipse.papyrus.sysml.modelelements.Problem;
+import org.eclipse.papyrus.uml.service.types.helper.advice.AbstractStereotypedElementEditHelperAdvice;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.util.UMLUtil.StereotypeApplicationHelper;
+
+/** SysML {@link Problem} edit helper advice */
+public class ProblemEditHelperAdvice extends AbstractStereotypedElementEditHelperAdvice {
+
+ /** Default constructor */
+ public ProblemEditHelperAdvice() {
+ requiredProfiles.add(ModelelementsPackage.eINSTANCE);
+ }
+
+ /** Complete creation process by applying the expected stereotype */
+ @Override
+ protected ICommand getBeforeConfigureCommand(final ConfigureRequest request) {
+
+ return new ConfigureElementCommand(request) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ Element element = (Element) request.getElementToConfigure();
+ if (element != null) {
+ StereotypeApplicationHelper.INSTANCE.applyStereotype(element, ModelelementsPackage.eINSTANCE.getProblem());
+ }
+ return CommandResult.newOKCommandResult(element);
+ }
+ };
+ }
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/RationaleEditHelperAdvice.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/RationaleEditHelperAdvice.java
new file mode 100755
index 0000000..b616439
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/RationaleEditHelperAdvice.java
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.helper;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.commands.ConfigureElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.papyrus.sysml.modelelements.ModelelementsPackage;
+import org.eclipse.papyrus.sysml.modelelements.Rationale;
+import org.eclipse.papyrus.uml.service.types.helper.advice.AbstractStereotypedElementEditHelperAdvice;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.util.UMLUtil.StereotypeApplicationHelper;
+
+/** SysML {@link Rationale} edit helper advice */
+public class RationaleEditHelperAdvice extends AbstractStereotypedElementEditHelperAdvice {
+
+ /** Default constructor */
+ public RationaleEditHelperAdvice() {
+ requiredProfiles.add(ModelelementsPackage.eINSTANCE);
+ }
+
+ /** Complete creation process by applying the expected stereotype */
+ @Override
+ protected ICommand getBeforeConfigureCommand(final ConfigureRequest request) {
+
+ return new ConfigureElementCommand(request) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ Element element = (Element) request.getElementToConfigure();
+ if (element != null) {
+ StereotypeApplicationHelper.INSTANCE.applyStereotype(element, ModelelementsPackage.eINSTANCE.getRationale());
+ }
+ return CommandResult.newOKCommandResult(element);
+ }
+ };
+ }
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/ReferencePropertyEditHelperAdvice.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/ReferencePropertyEditHelperAdvice.java
new file mode 100755
index 0000000..70bf740
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/ReferencePropertyEditHelperAdvice.java
@@ -0,0 +1,158 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.helper;
+
+import java.util.List;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher;
+import org.eclipse.gmf.runtime.emf.type.core.commands.ConfigureElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DuplicateElementsRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.GetEditContextRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest;
+import org.eclipse.papyrus.sysml.blocks.Block;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.sysml.service.types.matcher.BlockMatcher;
+import org.eclipse.papyrus.sysml.service.types.matcher.ReferencePropertyMatcher;
+import org.eclipse.papyrus.uml.service.types.utils.ElementUtil;
+import org.eclipse.papyrus.uml.service.types.utils.NamedElementHelper;
+import org.eclipse.uml2.uml.AggregationKind;
+import org.eclipse.uml2.uml.Association;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Type;
+import org.eclipse.uml2.uml.UMLFactory;
+
+/** SysML Property Reference edit helper advice */
+public class ReferencePropertyEditHelperAdvice extends AbstractPropertyEditHelperAdvice {
+
+ /**
+ * Check if the creation context is a {@link Block}.
+ *
+ * @see org.eclipse.papyrus.sysml.service.types.helper.AbstractStereotypedElementEditHelperAdvice#approveRequest(org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest)
+ *
+ * @param request
+ * @return true if the request is approved
+ */
+ @Override
+ public boolean approveRequest(IEditCommandRequest request) {
+ boolean isApproved = super.approveRequest(request);
+
+ if ((request != null) && (request instanceof GetEditContextRequest)) {
+
+ // Retrieve the edit context from request
+ GetEditContextRequest editContextRequest = (GetEditContextRequest) request;
+
+ // Test if the edit context is a Block
+ if (editContextRequest.getEditContext() instanceof Element) {
+ Element contextElement = (Element) editContextRequest.getEditContext();
+
+ IElementMatcher matcher = new BlockMatcher();
+ if (!matcher.matches(contextElement)) {
+ isApproved = false;
+ }
+ }
+ }
+
+ return isApproved;
+ }
+
+ /** Complete creation process by setting name and default aggregation */
+ @Override
+ protected ICommand getBeforeConfigureCommand(final ConfigureRequest request) {
+
+ return new ConfigureElementCommand(request) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ Property element = (Property) request.getElementToConfigure();
+ if (element != null) {
+
+ // Set default name
+ String initializedName = NamedElementHelper.getDefaultNameWithIncrementFromBase("reference", element.eContainer().eContents());
+ element.setName(initializedName);
+ // Force the aggregation to NONE.
+ element.setAggregation(AggregationKind.NONE_LITERAL);
+ }
+ return CommandResult.newOKCommandResult(element);
+ }
+ };
+ }
+
+ /**
+ * Complete creation process by adding the related association.
+ * This assumes the part type has been set at this point.
+ */
+ @Override
+ protected ICommand getAfterConfigureCommand(final ConfigureRequest request) {
+
+ return new ConfigureElementCommand(request) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ Property sourcePart = (Property) request.getElementToConfigure();
+ if ((sourcePart != null) && (sourcePart.getType() != null)) {
+
+ // Create association between element owner and element type
+ Type sourceType = sourcePart.getClass_();
+ // Type targetType = sourcePart.getType();
+ Package associationContainer = sourceType.getNearestPackage();
+
+ // Create targetProperty
+ Property targetProperty = UMLFactory.eINSTANCE.createProperty();
+ targetProperty.setType(sourceType);
+ targetProperty.setName(sourceType.getName() != null ? sourceType.getName().toLowerCase() : "null");
+
+ Association association = UMLFactory.eINSTANCE.createAssociation();
+ association.getMemberEnds().add(sourcePart);
+ association.getOwnedEnds().add(targetProperty);
+ association.getMemberEnds().add(targetProperty);
+
+ String associationName = NamedElementHelper.getDefaultNameWithIncrementFromBase("Association", associationContainer.eContents());
+ association.setName(associationName);
+
+ // Add SysML Nature on the new Association
+ ElementUtil.addNature(association, SysMLElementTypes.SYSML_NATURE);
+
+ association.setPackage(associationContainer);
+ }
+ return CommandResult.newOKCommandResult(sourcePart);
+ }
+ };
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Property getDuplicatedProperty(DuplicateElementsRequest request) {
+ List<Object> elementsToBeDuplicated = request.getElementsToBeDuplicated();
+ if (elementsToBeDuplicated == null || elementsToBeDuplicated.isEmpty()) {
+ return null;
+ }
+ Object firstElement = elementsToBeDuplicated.get(0); // there should be only one element here
+ if (!(firstElement instanceof Property)) {
+ return null;
+ }
+ ReferencePropertyMatcher matcher = new ReferencePropertyMatcher();
+ return matcher.matches((Property) firstElement) ? (Property) firstElement : null;
+ }
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/RequirementEditHelperAdvice.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/RequirementEditHelperAdvice.java
new file mode 100755
index 0000000..1310ee8
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/RequirementEditHelperAdvice.java
@@ -0,0 +1,97 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.helper;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher;
+import org.eclipse.gmf.runtime.emf.type.core.commands.ConfigureElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.GetEditContextRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest;
+import org.eclipse.papyrus.sysml.requirements.RequirementsPackage;
+import org.eclipse.papyrus.sysml.service.types.matcher.FlowSpecificationMatcher;
+import org.eclipse.papyrus.uml.service.types.helper.advice.AbstractStereotypedElementEditHelperAdvice;
+import org.eclipse.papyrus.uml.service.types.utils.NamedElementHelper;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.util.UMLUtil.StereotypeApplicationHelper;
+
+/** SysML Requirement edit helper advice */
+public class RequirementEditHelperAdvice extends AbstractStereotypedElementEditHelperAdvice {
+
+ /** Default constructor */
+ public RequirementEditHelperAdvice() {
+ requiredProfiles.add(RequirementsPackage.eINSTANCE);
+ }
+
+ /**
+ * Check if the creation context is allowed.
+ *
+ * @see org.eclipse.papyrus.sysml.service.types.helper.AbstractStereotypedElementEditHelperAdvice#approveRequest(org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest)
+ *
+ * @param request
+ * @return true if the request is approved
+ */
+ @Override
+ public boolean approveRequest(IEditCommandRequest request) {
+ boolean isApproved = super.approveRequest(request);
+
+ if ((request != null) && (request instanceof GetEditContextRequest)) {
+
+ // Retrieve the edit context from request
+ GetEditContextRequest editContextRequest = (GetEditContextRequest) request;
+
+ // Test context type
+ if (editContextRequest.getEditContext() instanceof Element) {
+ Element contextElement = (Element) editContextRequest.getEditContext();
+
+ IElementMatcher matcher;
+
+ // Cannot create a nested requirement in FlowSpecification
+ matcher = new FlowSpecificationMatcher();
+ if (matcher.matches(contextElement)) {
+ isApproved = false;
+ }
+ }
+ }
+
+ return isApproved;
+ }
+
+ /** Complete creation process by applying the expected stereotype */
+ @Override
+ protected ICommand getBeforeConfigureCommand(final ConfigureRequest request) {
+
+ return new ConfigureElementCommand(request) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ NamedElement element = (NamedElement) request.getElementToConfigure();
+ if (element != null) {
+ StereotypeApplicationHelper.INSTANCE.applyStereotype(element, RequirementsPackage.eINSTANCE.getRequirement());
+
+ // Set default name
+ // Initialize the element name based on the created IElementType
+ String initializedName = NamedElementHelper.getDefaultNameWithIncrementFromBase(RequirementsPackage.eINSTANCE.getRequirement().getName(), element.eContainer().eContents());
+ element.setName(initializedName);
+ }
+ return CommandResult.newOKCommandResult(element);
+ }
+ };
+ }
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/SatisfyEditHelperAdvice.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/SatisfyEditHelperAdvice.java
new file mode 100755
index 0000000..3dcf293
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/SatisfyEditHelperAdvice.java
@@ -0,0 +1,59 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.helper;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.commands.ConfigureElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.papyrus.sysml.requirements.RequirementsPackage;
+import org.eclipse.papyrus.sysml.requirements.Satisfy;
+import org.eclipse.papyrus.uml.service.types.helper.advice.AbstractStereotypedElementEditHelperAdvice;
+import org.eclipse.papyrus.uml.service.types.utils.NamedElementHelper;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.util.UMLUtil.StereotypeApplicationHelper;
+
+/** SysML {@link Satisfy} edit helper advice */
+public class SatisfyEditHelperAdvice extends AbstractStereotypedElementEditHelperAdvice {
+
+ /** Default constructor */
+ public SatisfyEditHelperAdvice() {
+ requiredProfiles.add(RequirementsPackage.eINSTANCE);
+ }
+
+ /** Complete creation process by applying the expected stereotype */
+ @Override
+ protected ICommand getBeforeConfigureCommand(final ConfigureRequest request) {
+
+ return new ConfigureElementCommand(request) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ NamedElement element = (NamedElement) request.getElementToConfigure();
+ if (element != null) {
+ StereotypeApplicationHelper.INSTANCE.applyStereotype(element, RequirementsPackage.eINSTANCE.getSatisfy());
+
+ // Set default name
+ // Initialize the element name based on the created IElementType
+ String initializedName = NamedElementHelper.getDefaultNameWithIncrementFromBase(RequirementsPackage.eINSTANCE.getSatisfy().getName(), element.eContainer().eContents());
+ element.setName(initializedName);
+ }
+ return CommandResult.newOKCommandResult(element);
+ }
+ };
+ }
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/UnitEditHelperAdvice.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/UnitEditHelperAdvice.java
new file mode 100755
index 0000000..059d175
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/UnitEditHelperAdvice.java
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.helper;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.commands.ConfigureElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.papyrus.sysml.blocks.BlocksPackage;
+import org.eclipse.papyrus.sysml.blocks.Unit;
+import org.eclipse.papyrus.uml.service.types.helper.advice.AbstractStereotypedElementEditHelperAdvice;
+import org.eclipse.papyrus.uml.service.types.utils.NamedElementHelper;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.util.UMLUtil.StereotypeApplicationHelper;
+
+/** SysML {@link Unit} edit helper advice */
+public class UnitEditHelperAdvice extends AbstractStereotypedElementEditHelperAdvice {
+
+ /** Default constructor */
+ public UnitEditHelperAdvice() {
+ requiredProfiles.add(BlocksPackage.eINSTANCE);
+ }
+
+ /** Complete creation process by applying the expected stereotype */
+ @Override
+ protected ICommand getBeforeConfigureCommand(final ConfigureRequest request) {
+
+ return new ConfigureElementCommand(request) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ NamedElement element = (NamedElement) request.getElementToConfigure();
+ if (element != null) {
+ StereotypeApplicationHelper.INSTANCE.applyStereotype(element, BlocksPackage.eINSTANCE.getUnit());
+
+ // Set default name
+ // Initialize the element name based on the created IElementType
+ String initializedName = NamedElementHelper.getDefaultNameWithIncrementFromBase(BlocksPackage.eINSTANCE.getUnit().getName(), element.eContainer().eContents());
+ element.setName(initializedName);
+ }
+ return CommandResult.newOKCommandResult(element);
+ }
+ };
+ }
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/ValuePropertyEditHelperAdvice.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/ValuePropertyEditHelperAdvice.java
new file mode 100755
index 0000000..3775732
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/ValuePropertyEditHelperAdvice.java
@@ -0,0 +1,90 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.helper;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher;
+import org.eclipse.gmf.runtime.emf.type.core.commands.ConfigureElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.GetEditContextRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest;
+import org.eclipse.papyrus.sysml.blocks.Block;
+import org.eclipse.papyrus.sysml.service.types.matcher.BlockMatcher;
+import org.eclipse.papyrus.uml.service.types.utils.NamedElementHelper;
+import org.eclipse.uml2.uml.AggregationKind;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Property;
+
+/** SysML Property Value edit helper advice */
+public class ValuePropertyEditHelperAdvice extends AbstractEditHelperAdvice {
+
+ /**
+ * Check if the creation context is a {@link Block}.
+ *
+ * @see org.eclipse.papyrus.sysml.service.types.helper.AbstractStereotypedElementEditHelperAdvice#approveRequest(org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest)
+ *
+ * @param request
+ * @return true if the request is approved
+ */
+ @Override
+ public boolean approveRequest(IEditCommandRequest request) {
+ boolean isApproved = super.approveRequest(request);
+
+ if ((request != null) && (request instanceof GetEditContextRequest)) {
+
+ // Retrieve the edit context from request
+ GetEditContextRequest editContextRequest = (GetEditContextRequest) request;
+
+ // Test if the edit context is a Block
+ if (editContextRequest.getEditContext() instanceof Element) {
+ Element contextElement = (Element) editContextRequest.getEditContext();
+
+ IElementMatcher matcher = new BlockMatcher();
+ if (!matcher.matches(contextElement)) {
+ isApproved = false;
+ }
+ }
+ }
+
+ return isApproved;
+ }
+
+ /** Complete creation process by setting name and default aggregation */
+ @Override
+ protected ICommand getBeforeConfigureCommand(final ConfigureRequest request) {
+
+ return new ConfigureElementCommand(request) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ Property element = (Property) request.getElementToConfigure();
+ if (element != null) {
+
+ // Set default name
+ String initializedName = NamedElementHelper.getDefaultNameWithIncrementFromBase("value", element.eContainer().eContents());
+ element.setName(initializedName);
+
+ // Initialize the aggregation to composite.
+ element.setAggregation(AggregationKind.COMPOSITE_LITERAL);
+ }
+ return CommandResult.newOKCommandResult(element);
+ }
+ };
+ }
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/ValueTypeEditHelperAdvice.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/ValueTypeEditHelperAdvice.java
new file mode 100755
index 0000000..6a1d356
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/ValueTypeEditHelperAdvice.java
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.helper;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.commands.ConfigureElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.papyrus.sysml.blocks.BlocksPackage;
+import org.eclipse.papyrus.sysml.blocks.ValueType;
+import org.eclipse.papyrus.uml.service.types.helper.advice.AbstractStereotypedElementEditHelperAdvice;
+import org.eclipse.papyrus.uml.service.types.utils.NamedElementHelper;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.util.UMLUtil.StereotypeApplicationHelper;
+
+/** SysML {@link ValueType} edit helper advice */
+public class ValueTypeEditHelperAdvice extends AbstractStereotypedElementEditHelperAdvice {
+
+ /** Default constructor */
+ public ValueTypeEditHelperAdvice() {
+ requiredProfiles.add(BlocksPackage.eINSTANCE);
+ }
+
+ /** Complete creation process by applying the expected stereotype */
+ @Override
+ protected ICommand getBeforeConfigureCommand(final ConfigureRequest request) {
+
+ return new ConfigureElementCommand(request) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ NamedElement element = (NamedElement) request.getElementToConfigure();
+ if (element != null) {
+ StereotypeApplicationHelper.INSTANCE.applyStereotype(element, BlocksPackage.eINSTANCE.getValueType());
+
+ // Set default name
+ // Initialize the element name based on the created IElementType
+ String initializedName = NamedElementHelper.getDefaultNameWithIncrementFromBase(BlocksPackage.eINSTANCE.getValueType().getName(), element.eContainer().eContents());
+ element.setName(initializedName);
+ }
+ return CommandResult.newOKCommandResult(element);
+ }
+ };
+ }
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/VerifyEditHelperAdvice.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/VerifyEditHelperAdvice.java
new file mode 100755
index 0000000..bda548d
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/VerifyEditHelperAdvice.java
@@ -0,0 +1,59 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.helper;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.commands.ConfigureElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.papyrus.sysml.requirements.RequirementsPackage;
+import org.eclipse.papyrus.sysml.requirements.Verify;
+import org.eclipse.papyrus.uml.service.types.helper.advice.AbstractStereotypedElementEditHelperAdvice;
+import org.eclipse.papyrus.uml.service.types.utils.NamedElementHelper;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.util.UMLUtil.StereotypeApplicationHelper;
+
+/** SysML {@link Verify} edit helper advice */
+public class VerifyEditHelperAdvice extends AbstractStereotypedElementEditHelperAdvice {
+
+ /** Default constructor */
+ public VerifyEditHelperAdvice() {
+ requiredProfiles.add(RequirementsPackage.eINSTANCE);
+ }
+
+ /** Complete creation process by applying the expected stereotype */
+ @Override
+ protected ICommand getBeforeConfigureCommand(final ConfigureRequest request) {
+
+ return new ConfigureElementCommand(request) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ NamedElement element = (NamedElement) request.getElementToConfigure();
+ if (element != null) {
+ StereotypeApplicationHelper.INSTANCE.applyStereotype(element, RequirementsPackage.eINSTANCE.getVerify());
+
+ // Set default name
+ // Initialize the element name based on the created IElementType
+ String initializedName = NamedElementHelper.getDefaultNameWithIncrementFromBase(RequirementsPackage.eINSTANCE.getVerify().getName(), element.eContainer().eContents());
+ element.setName(initializedName);
+ }
+ return CommandResult.newOKCommandResult(element);
+ }
+ };
+ }
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/ViewEditHelperAdvice.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/ViewEditHelperAdvice.java
new file mode 100755
index 0000000..4a64dad
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/ViewEditHelperAdvice.java
@@ -0,0 +1,57 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.helper;
+
+import javax.swing.text.View;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.commands.ConfigureElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.papyrus.sysml.modelelements.ModelelementsPackage;
+import org.eclipse.papyrus.uml.service.types.helper.advice.AbstractStereotypedElementEditHelperAdvice;
+import org.eclipse.papyrus.uml.service.types.utils.NamedElementHelper;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.util.UMLUtil.StereotypeApplicationHelper;
+
+/** SysML {@link View} edit helper advice */
+public class ViewEditHelperAdvice extends AbstractStereotypedElementEditHelperAdvice {
+
+ /** Default constructor */
+ public ViewEditHelperAdvice() {
+ requiredProfiles.add(ModelelementsPackage.eINSTANCE);
+ }
+
+ /** Complete creation process by applying the expected stereotype */
+ @Override
+ protected ICommand getBeforeConfigureCommand(final ConfigureRequest request) {
+
+ return new ConfigureElementCommand(request) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ NamedElement element = (NamedElement) request.getElementToConfigure();
+ if (element != null) {
+ StereotypeApplicationHelper.INSTANCE.applyStereotype(element, ModelelementsPackage.eINSTANCE.getView());
+
+ // Set default name
+ // Initialize the element name based on the created IElementType
+ String initializedName = NamedElementHelper.getDefaultNameWithIncrementFromBase(ModelelementsPackage.eINSTANCE.getView().getName(), element.eContainer().eContents());
+ element.setName(initializedName);
+ }
+ return CommandResult.newOKCommandResult(element);
+ }
+ };
+ }
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/ViewPointEditHelperAdvice.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/ViewPointEditHelperAdvice.java
new file mode 100755
index 0000000..7540689
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/ViewPointEditHelperAdvice.java
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.helper;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.commands.ConfigureElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.papyrus.sysml.modelelements.ModelelementsPackage;
+import org.eclipse.papyrus.sysml.modelelements.ViewPoint;
+import org.eclipse.papyrus.uml.service.types.helper.advice.AbstractStereotypedElementEditHelperAdvice;
+import org.eclipse.papyrus.uml.service.types.utils.NamedElementHelper;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.util.UMLUtil.StereotypeApplicationHelper;
+
+/** SysML {@link ViewPoint} edit helper advice */
+public class ViewPointEditHelperAdvice extends AbstractStereotypedElementEditHelperAdvice {
+
+ /** Default constructor */
+ public ViewPointEditHelperAdvice() {
+ requiredProfiles.add(ModelelementsPackage.eINSTANCE);
+ }
+
+ /** Complete creation process by applying the expected stereotype */
+ @Override
+ protected ICommand getBeforeConfigureCommand(final ConfigureRequest request) {
+
+ return new ConfigureElementCommand(request) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ NamedElement element = (NamedElement) request.getElementToConfigure();
+ if (element != null) {
+ StereotypeApplicationHelper.INSTANCE.applyStereotype(element, ModelelementsPackage.eINSTANCE.getViewPoint());
+
+ // Set default name
+ // Initialize the element name based on the created IElementType
+ String initializedName = NamedElementHelper.getDefaultNameWithIncrementFromBase(ModelelementsPackage.eINSTANCE.getViewPoint().getName(), element.eContainer().eContents());
+ element.setName(initializedName);
+ }
+ return CommandResult.newOKCommandResult(element);
+ }
+ };
+ }
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/advice/ActorEditHelperAdvice.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/advice/ActorEditHelperAdvice.java
new file mode 100755
index 0000000..80ae821
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/advice/ActorEditHelperAdvice.java
@@ -0,0 +1,70 @@
+/*****************************************************************************
+ * 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:
+ * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.helper.advice;
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.uml2.uml.Actor;
+import org.eclipse.uml2.uml.Association;
+
+
+/**
+ * Advice to restrict {@link Association} creation in SysML
+ */
+public class ActorEditHelperAdvice extends AbstractEditHelperAdvice {
+
+ /**
+ * {@inheritDoc}
+ *
+ * In case of {@link Association} creation, it should not be possible to have an {@link Actor} as source.
+ */
+ @Override
+ protected ICommand getBeforeCreateRelationshipCommand(CreateRelationshipRequest request) {
+ IElementType type = request.getElementType();
+ if (SysMLElementTypes.ASSOCIATION.equals(type)) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ if (type != null) {
+ List<IElementType> superTypes = Arrays.asList(type.getAllSuperTypes());
+ if (superTypes.contains(SysMLElementTypes.ASSOCIATION)) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ }
+ return super.getBeforeCreateRelationshipCommand(request);
+ }
+
+ protected boolean hasSuperType(IElementType elementType, IElementType typeToTest) {
+ if (elementType == null || typeToTest == null) {
+ return false;
+ }
+
+ if (elementType.equals(typeToTest)) {
+ return true;
+ }
+
+ List<IElementType> superTypes = Arrays.asList(elementType.getAllSuperTypes());
+ if (superTypes.contains(typeToTest)) {
+ return true;
+ }
+
+ return false;
+ }
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/advice/AssociationCompositeDirectedEditHelperAdvice.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/advice/AssociationCompositeDirectedEditHelperAdvice.java
new file mode 100755
index 0000000..f0d50dd
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/advice/AssociationCompositeDirectedEditHelperAdvice.java
@@ -0,0 +1,38 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.helper.advice;
+
+import org.eclipse.uml2.uml.Association;
+import org.eclipse.uml2.uml.Classifier;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Type;
+
+/**
+ * Edit helper advice for {@link Association} with "aggregation = composition" (used for creation purpose only).
+ */
+public class AssociationCompositeDirectedEditHelperAdvice extends AssociationCompositeEditHelperAdvice {
+
+ /**
+ * <pre>
+ * {@inheritDoc}
+ *
+ * The currently created {@link Association} is Composite (manage by super class), and directed
+ * (meaning navigable in one direction only) which in SysML means the target end is owned by the association itself.
+ *
+ * Moreover this end name should not be set in that case, this latter rule is not followed here for now.
+ *
+ * </pre>
+ */
+ @Override
+ protected void addTargetInModel(Property targetEnd, Classifier owner, Type sourceType, Association association) {
+ association.getOwnedEnds().add(targetEnd);
+ }
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/advice/AssociationCompositeEditHelperAdvice.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/advice/AssociationCompositeEditHelperAdvice.java
new file mode 100755
index 0000000..f077153
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/advice/AssociationCompositeEditHelperAdvice.java
@@ -0,0 +1,38 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.helper.advice;
+
+import org.eclipse.uml2.uml.Association;
+import org.eclipse.uml2.uml.Classifier;
+import org.eclipse.uml2.uml.Property;
+
+/**
+ * Edit helper advice for {@link Association} with "aggregation = composition" and navigable in one way (used for creation purpose only).
+ */
+public class AssociationCompositeEditHelperAdvice extends AssociationNoneEditHelperAdvice {
+
+ /**
+ * <pre>
+ * {@inheritDoc}
+ *
+ * The currently created {@link Association} is Composite (manage by super class):
+ * it source {@link Property} aggregation is set to Composite kind.
+ *
+ * The currently created {@link Association} is bidirectional (navigable in both directions):
+ * it source and target {@link Property} are owned by the {@link Classifier} (target and source end types),
+ * this is handled by the super class.
+ * </pre>
+ */
+ @Override
+ protected void configureSourceProperty(Property sourceProperty) {
+ sourceProperty.setIsComposite(true);
+ }
+}
\ No newline at end of file
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/advice/AssociationEditHelperAdvice.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/advice/AssociationEditHelperAdvice.java
new file mode 100755
index 0000000..2e1a6ca
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/advice/AssociationEditHelperAdvice.java
@@ -0,0 +1,324 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.helper.advice;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+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.common.core.command.UnexecutableCommand;
+import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.commands.ConfigureElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyDependentsRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.MoveRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.utils.ElementUtil;
+import org.eclipse.papyrus.uml.service.types.utils.RequestParameterUtils;
+import org.eclipse.papyrus.uml.tools.databinding.OwnedAttributeHelper;
+import org.eclipse.uml2.uml.Association;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/** Association edit helper advice */
+public class AssociationEditHelperAdvice extends AbstractEditHelperAdvice {
+
+ /**
+ * <pre>
+ * {@inheritDoc}
+ *
+ * avoid creation of association on another association
+ *
+ * </pre>
+ */
+ @Override
+ protected ICommand getBeforeCreateRelationshipCommand(CreateRelationshipRequest request) {
+ IElementType type = request.getElementType();
+ if (SysMLElementTypes.ASSOCIATION.equals(type)) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ if (type != null) {
+ List<IElementType> superTypes = Arrays.asList(type.getAllSuperTypes());
+ if (superTypes.contains(SysMLElementTypes.ASSOCIATION)) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ }
+
+ return super.getBeforeCreateRelationshipCommand(request);
+ }
+
+ /**
+ * <pre>
+ * {@inheritDoc}
+ *
+ * Add a command to destroy {@link Association} when only 1 end remains.
+ *
+ * </pre>
+ */
+ @Override
+ protected ICommand getBeforeDestroyReferenceCommand(DestroyReferenceRequest request) {
+ ICommand gmfCommand = super.getBeforeDestroyReferenceCommand(request);
+
+ Association association = (Association) request.getContainer();
+ if ((request.getContainingFeature() == UMLPackage.eINSTANCE.getAssociation_MemberEnd()) && (association.getMemberEnds().contains(request.getReferencedObject()))) {
+ Set<Property> ends = new HashSet<Property>();
+ ends.addAll(association.getMemberEnds());
+ ends.remove(request.getReferencedObject());
+
+ if (ends.size() <= 2) {
+
+ DestroyElementRequest destroyRequest = new DestroyElementRequest(association, false);
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(association);
+ if (provider != null) {
+ ICommand destroyCommand = provider.getEditCommand(destroyRequest);
+ gmfCommand = CompositeCommand.compose(gmfCommand, destroyCommand);
+ }
+
+ }
+ }
+
+ return gmfCommand;
+ }
+
+ /**
+ * <pre>
+ * {@inheritDoc}
+ *
+ * Add SysML Nature on the {@link Association}.
+ *
+ * </pre>
+ */
+ @Override
+ protected ICommand getBeforeConfigureCommand(ConfigureRequest request) {
+
+ final Association association = (Association) request.getElementToConfigure();
+
+ return new ConfigureElementCommand(request) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+
+ // Add SysML Nature on the new Association
+ ElementUtil.addNature(association, SysMLElementTypes.SYSML_NATURE);
+
+ return CommandResult.newOKCommandResult(association);
+ }
+ };
+ }
+
+ /**
+ * <pre>
+ * {@inheritDoc}
+ *
+ * Add a command to destroy {@link Association} ends referenced by the {@link Association}
+ * to delete.
+ *
+ * </pre>
+ */
+ @Override
+ protected ICommand getBeforeDestroyDependentsCommand(DestroyDependentsRequest req) {
+ List<EObject> dependentsToDestroy = new ArrayList<EObject>();
+
+ List<EObject> dependentsToKeep = (RequestParameterUtils.getDependentsToKeep(req) != null) ? RequestParameterUtils.getDependentsToKeep(req) : new ArrayList<EObject>();
+
+ Association association = (Association) req.getElementToDestroy();
+ for (Property end : association.getMemberEnds()) {
+ if (!dependentsToKeep.contains(end)) {
+ dependentsToDestroy.add(end);
+ }
+ }
+
+ // Return command to destroy dependents ends
+ if (!dependentsToDestroy.isEmpty()) {
+ return req.getDestroyDependentsCommand(dependentsToDestroy);
+ }
+
+ return super.getBeforeDestroyDependentsCommand(req);
+ }
+
+ /**
+ * <pre>
+ * {@inheritDoc}
+ *
+ * Add a command to related association end during re-orient.
+ *
+ * </pre>
+ */
+ @Override
+ protected ICommand getBeforeReorientRelationshipCommand(ReorientRelationshipRequest request) {
+
+ ICommand gmfCommand = super.getBeforeReorientRelationshipCommand(request);
+
+ MoveRequest moveRequest = null;
+ SetRequest setTypeRequest = null;
+
+ // Retrieve re-oriented association and add it to the list of re-factored elements
+ Association association = (Association) request.getRelationship();
+ List<EObject> currentlyRefactoredElements = (RequestParameterUtils.getAssociationRefactoredElements(request) != null) ? RequestParameterUtils.getAssociationRefactoredElements(request) : new ArrayList<EObject>();
+
+ if (currentlyRefactoredElements.contains(association)) {
+ // Abort - already treated
+ return null;
+
+ } else {
+ RequestParameterUtils.addAssociationRefactoredElement(request, association);
+ }
+
+ // not possible to have an association on another association, so reorient is forbidden here
+ if (request.getNewRelationshipEnd() instanceof Association) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ // Retrieve property ends of the Association (assumed to be binary)
+ Property semanticSource = association.getMemberEnds().get(0);
+ Property semanticTarget = association.getMemberEnds().get(1);
+
+ EObject modifiedPropertyType = null;
+
+
+ if (request.getDirection() == ReorientRequest.REORIENT_SOURCE) {
+ if (!association.getOwnedEnds().contains(semanticSource)) {
+ moveRequest = new MoveRequest(request.getNewRelationshipEnd(), semanticSource);
+ }
+
+ modifiedPropertyType = semanticTarget;
+ setTypeRequest = new SetRequest(modifiedPropertyType, UMLPackage.eINSTANCE.getTypedElement_Type(), request.getNewRelationshipEnd());
+ }
+
+ if (request.getDirection() == ReorientRequest.REORIENT_TARGET) {
+ if (!association.getOwnedEnds().contains(semanticTarget)) {
+ moveRequest = new MoveRequest(request.getNewRelationshipEnd(), semanticTarget);
+ }
+
+ modifiedPropertyType = semanticSource;
+ setTypeRequest = new SetRequest(modifiedPropertyType, UMLPackage.eINSTANCE.getTypedElement_Type(), request.getNewRelationshipEnd());
+ }
+
+ if (moveRequest != null) {
+ // Propagate parameters to the move request
+ moveRequest.addParameters(request.getParameters());
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(request.getNewRelationshipEnd());
+ if (provider != null) {
+ ICommand moveCommand = provider.getEditCommand(moveRequest);
+ gmfCommand = CompositeCommand.compose(gmfCommand, moveCommand);
+ }
+ }
+
+ if (setTypeRequest != null) {
+ // Propagate parameters to the set request
+ setTypeRequest.addParameters(request.getParameters());
+
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(modifiedPropertyType);
+ if (provider != null) {
+ ICommand setTypeCommand = provider.getEditCommand(setTypeRequest);
+ gmfCommand = CompositeCommand.compose(gmfCommand, setTypeCommand);
+ }
+ }
+
+ // Destroy inconsistent views of the association
+ Set<View> viewsToDestroy = new HashSet<View>();
+ viewsToDestroy.addAll(getViewsToDestroy(association, request));
+
+ // return the command to destroy all these views
+ if (!viewsToDestroy.isEmpty()) {
+ DestroyDependentsRequest ddr = new DestroyDependentsRequest(request.getEditingDomain(), request.getRelationship(), false);
+ ddr.setClientContext(request.getClientContext());
+ ddr.addParameters(request.getParameters());
+ ICommand destroyViewsCommand = ddr.getDestroyDependentsCommand(viewsToDestroy);
+ gmfCommand = CompositeCommand.compose(gmfCommand, destroyViewsCommand);
+ }
+
+ if (gmfCommand != null) {
+ gmfCommand.reduce();
+ }
+ return gmfCommand;
+ }
+
+ /**
+ * Returns all views referencing Association except the view currently re-oriented.
+ *
+ * @param association
+ * the association referenced by views
+ * @param request
+ * the re-orient relationship request
+ * @return the list of views to be destroy
+ */
+ private Set<View> getViewsToDestroy(Association association, ReorientRelationshipRequest request) {
+ Set<View> viewsToDestroy = new HashSet<View>();
+
+ // Find all views representing the Associations
+ EReference[] refs = new EReference[] { NotationPackage.eINSTANCE.getView_Element() };
+ @SuppressWarnings("unchecked")
+ Collection<View> associationViews = EMFCoreUtil.getReferencers(association, refs);
+
+ View currentlyReorientedView = RequestParameterUtils.getReconnectedEdge(request);
+ viewsToDestroy.addAll(associationViews);
+ viewsToDestroy.remove(currentlyReorientedView);
+
+ return viewsToDestroy;
+ }
+
+ /**
+ * Change owners for navigable OwnedEnd in association. For SysML diagrams only.
+ * Bug 364066
+ */
+ @Override
+ protected ICommand getAfterSetCommand(SetRequest request) {
+ if (request.getElementToEdit() instanceof Association) {
+ Association association = (Association) request.getElementToEdit();
+ if (request.getFeature() == UMLPackage.eINSTANCE.getAssociation_NavigableOwnedEnd()) {
+ return changeAllNavigableElementsOwners((List<?>) request.getValue(), association);
+ }
+ }
+ return super.getAfterSetCommand(request);
+ }
+
+ private ICommand changeAllNavigableElementsOwners(List<?> members, Association association) {
+ if (members.isEmpty()) {
+ return null;
+ }
+
+ CompositeCommand cc = new CompositeCommand("Change association's properties owners"); //$NON-NLS-1$
+ for (Object member : members) {
+ if (member instanceof Property) {
+ cc.add(OwnedAttributeHelper.getSetTypeOwnerForAssociationAttributeCommand(association, (Property)member));
+ }
+ }
+ return cc.isEmpty() ? null : cc.reduce();
+ }
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/advice/AssociationNoneDirectedEditHelperAdvice.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/advice/AssociationNoneDirectedEditHelperAdvice.java
new file mode 100755
index 0000000..6f5f788
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/advice/AssociationNoneDirectedEditHelperAdvice.java
@@ -0,0 +1,38 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.helper.advice;
+
+import org.eclipse.uml2.uml.Association;
+import org.eclipse.uml2.uml.Classifier;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Type;
+
+/**
+ * Edit helper advice for {@link Association} with "aggregation = none" and navigable in one way (used for creation purpose only).
+ */
+public class AssociationNoneDirectedEditHelperAdvice extends AssociationNoneEditHelperAdvice {
+
+ /**
+ * <pre>
+ * {@inheritDoc}
+ *
+ * The currently created {@link Association} in the default case (aggregation = none), and directed
+ * (meaning navigable in one direction only) which in SysML means the target end is owned by the association itself.
+ *
+ * Moreover this end name should not be set in that case, this latter rule is not followed here for now.
+ *
+ * </pre>
+ */
+ @Override
+ protected void addTargetInModel(Property targetEnd, Classifier owner, Type sourceType, Association association) {
+ association.getOwnedEnds().add(targetEnd);
+ }
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/advice/AssociationNoneEditHelperAdvice.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/advice/AssociationNoneEditHelperAdvice.java
new file mode 100755
index 0000000..7fa3568
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/advice/AssociationNoneEditHelperAdvice.java
@@ -0,0 +1,238 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.helper.advice;
+
+import java.util.List;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand;
+import org.eclipse.gmf.runtime.emf.type.core.commands.ConfigureElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.sysml.service.types.Activator;
+import org.eclipse.papyrus.uml.service.types.utils.ClassifierUtils;
+import org.eclipse.papyrus.uml.service.types.utils.NamedElementHelper;
+import org.eclipse.uml2.uml.Association;
+import org.eclipse.uml2.uml.Classifier;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Type;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * Edit helper advice for {@link Association} with "aggregation = none" (used for creation purpose only).
+ */
+public class AssociationNoneEditHelperAdvice extends AssociationEditHelperAdvice {
+
+ /**
+ * This method provides the source type provided as {@link ConfigureRequest} parameter.
+ *
+ * @return the target role
+ */
+ protected Classifier getSourceOwnerType(ConfigureRequest req) {
+ Classifier result = null;
+ Object paramObject = req.getParameter(CreateRelationshipRequest.SOURCE);
+ if (paramObject instanceof Classifier) {
+ result = (Classifier) paramObject;
+ }
+
+ return result;
+ }
+
+ /**
+ * This method provides the target type provided as {@link ConfigureRequest} parameter.
+ *
+ * @return the target role
+ */
+ protected Classifier getTargetOwnerType(ConfigureRequest req) {
+ Classifier result = null;
+ Object paramObject = req.getParameter(CreateRelationshipRequest.TARGET);
+ if (paramObject instanceof Classifier) {
+ result = (Classifier) paramObject;
+ }
+
+ return result;
+ }
+
+ /**
+ * Creates a new {@link Property} from the propertyType in the propertyContainer
+ *
+ * @param propertyContainer
+ * the container of the {@link Property}
+ * @param propertyType
+ * the type of the {@link Property}
+ * @return the new {@link Property}
+ * @throws ExecutionException
+ */
+ protected Property createTargetProperty(Property targetProperty, Classifier propertyContainer, Type propertyType, Association association, TransactionalEditingDomain editingDomain, IProgressMonitor progressMonitor, IAdaptable info)
+ throws ExecutionException {
+ setPropertyType(targetProperty, propertyType, editingDomain, progressMonitor, info);
+ setPropertyName(targetProperty);
+ return targetProperty;
+ }
+
+ protected Property createSourceProperty(Property sourceProperty, Classifier propertyContainer, Type propertyType, Association association, TransactionalEditingDomain editingDomain, IProgressMonitor progressMonitor, IAdaptable info)
+ throws ExecutionException {
+ setPropertyType(sourceProperty, propertyType, editingDomain, progressMonitor, info);
+ setPropertyName(sourceProperty);
+ return sourceProperty;
+ }
+
+ protected void setPropertyType(Property property, Type propertyType, TransactionalEditingDomain editingDomain, IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ // Set type using all AdviceHelper (use ServiceEdit instead of manually set)
+ SetRequest request = new SetRequest(property, UMLPackage.eINSTANCE.getTypedElement_Type(), propertyType);
+ request.setEditingDomain(editingDomain);
+ IElementEditService commandProvider = ElementEditServiceUtils.getCommandProvider(property);
+ ICommand editCommand = commandProvider.getEditCommand(request);
+ editCommand.execute(progressMonitor, info);
+ }
+
+ private void setPropertyName(Property property) {
+ String baseName = property.getType().getName().toLowerCase();
+ Element owner = property.getOwner();
+ if (owner instanceof Classifier) {
+ List<Property> ownedAttributes = ClassifierUtils.getOwnedAttributes((Classifier) owner);
+ String defaultNameWithIncrementFromBase = NamedElementHelper.getDefaultNameWithIncrementFromBase(
+ property.getType().getName().toLowerCase(), ownedAttributes, "_");
+ property.setName(defaultNameWithIncrementFromBase);
+ }
+ else {
+ // default
+ property.setName(baseName);
+ }
+ }
+
+ /**
+ * This method has to be specialized by subclasses (AggregationKind)
+ *
+ * @param sourceProperty
+ * The property to configure
+ */
+ protected void configureSourceProperty(Property sourceProperty) {
+ // do nothing
+ }
+
+ /**
+ * This method has to be specialized by subclasses (AggregationKind)
+ *
+ * @param sourceProperty
+ * The property to configure
+ */
+ protected void configureTargetProperty(Property targetProperty) {
+ // do nothing
+ }
+
+ /**
+ * This method has to be specialized by subclasses (owner)
+ *
+ * @param sourceEnd
+ * the semantic end
+ * @param owner
+ * the end container
+ * @param targetType
+ * the target type
+ * @param association
+ * the association
+ * @throws UnsupportedOperationException
+ */
+ protected void addSourceInModel(final Property sourceEnd, Classifier owner, Type targetType, Association association) throws UnsupportedOperationException {
+ // set the container in order to allow Stereotype appliance
+ boolean added = ClassifierUtils.addOwnedAttribute(owner, sourceEnd);
+ if (!added) {
+ throw new UnsupportedOperationException("Cannot add a Property on Classifier " + owner.getQualifiedName());
+ }
+ }
+
+ /**
+ * This method has to be specialized by subclasses (owner)
+ *
+ * @param targetEnd
+ * the semantic end
+ * @param owner
+ * the end container
+ * @param sourceType
+ * the source type
+ * @param association
+ * the association
+ * @throws UnsupportedOperationException
+ */
+ protected void addTargetInModel(Property targetEnd, Classifier owner, Type sourceType, Association association) {
+ // set the container in order to allow Stereotype appliance
+ boolean added = ClassifierUtils.addOwnedAttribute(owner, targetEnd);
+ if (!added) {
+ throw new UnsupportedOperationException("Cannot add a Property on Classifier " + owner.getQualifiedName());
+ }
+ }
+
+ /**
+ * <pre>
+ * {@inheritDoc}
+ *
+ * Complete the {@link Association} creation by setting its ends.
+ *
+ * </pre>
+ */
+ @Override
+ protected ICommand getBeforeConfigureCommand(final ConfigureRequest request) {
+
+ final Association association = (Association) request.getElementToConfigure();
+ final Classifier sourceType = getSourceOwnerType(request);
+ final Classifier targetType = getTargetOwnerType(request);
+
+ if ((sourceType == null) || (targetType == null)) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ return new ConfigureElementCommand(request) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+
+ try {
+ Property targetProperty = UMLFactory.eINSTANCE.createProperty();
+ Property sourceProperty = UMLFactory.eINSTANCE.createProperty();
+
+ // TODO: problem with SysML. Link are inversed. A -> B => memberEnd={a, b} instead of {b, a}.
+ // Problem seems to come from cached derivedFeature /endTypes
+ // So we force to set memberEnd in this order before doing anything with the created properties
+ association.getMemberEnds().add(targetProperty);
+ association.getMemberEnds().add(sourceProperty);
+
+ // Create source and target ends
+ addSourceInModel(targetProperty, sourceType, targetType, association);
+ addTargetInModel(sourceProperty, targetType, sourceType, association);
+ createTargetProperty(targetProperty, sourceType, targetType, association, request.getEditingDomain(), progressMonitor, info);
+ configureSourceProperty(targetProperty);
+ createSourceProperty(sourceProperty, targetType, sourceType, association, request.getEditingDomain(), progressMonitor, info);
+ configureTargetProperty(sourceProperty);
+
+ } catch (Exception e) {
+ Activator.log.error(e);
+ return CommandResult.newCancelledCommandResult();
+ }
+
+ return CommandResult.newOKCommandResult(association);
+ }
+ };
+ }
+}
\ No newline at end of file
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/advice/AssociationSharedDirectedEditHelperAdvice.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/advice/AssociationSharedDirectedEditHelperAdvice.java
new file mode 100755
index 0000000..5e52d04
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/advice/AssociationSharedDirectedEditHelperAdvice.java
@@ -0,0 +1,38 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.helper.advice;
+
+import org.eclipse.uml2.uml.Association;
+import org.eclipse.uml2.uml.Classifier;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Type;
+
+/**
+ * Edit helper advice for {@link Association} with "aggregation = shared" and navigable in one way (used for creation purpose only).
+ */
+public class AssociationSharedDirectedEditHelperAdvice extends AssociationSharedEditHelperAdvice {
+
+ /**
+ * <pre>
+ * {@inheritDoc}
+ *
+ * The currently created {@link Association} is Shared (manage by super class), and directed
+ * (meaning navigable in one direction only) which in SysML means the target end is owned by the association itself.
+ *
+ * Moreover this end name should not be set in that case, this latter rule is not followed here for now.
+ *
+ * </pre>
+ */
+ @Override
+ protected void addTargetInModel(Property targetEnd, Classifier owner, Type sourceType, Association association) {
+ association.getOwnedEnds().add(targetEnd);
+ }
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/advice/AssociationSharedEditHelperAdvice.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/advice/AssociationSharedEditHelperAdvice.java
new file mode 100755
index 0000000..74be656
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/advice/AssociationSharedEditHelperAdvice.java
@@ -0,0 +1,39 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.helper.advice;
+
+import org.eclipse.uml2.uml.AggregationKind;
+import org.eclipse.uml2.uml.Association;
+import org.eclipse.uml2.uml.Classifier;
+import org.eclipse.uml2.uml.Property;
+
+/**
+ * Edit helper advice for {@link Association} with "aggregation = shared" (used for creation purpose only).
+ */
+public class AssociationSharedEditHelperAdvice extends AssociationNoneEditHelperAdvice {
+
+ /**
+ * <pre>
+ * {@inheritDoc}
+ *
+ * The currently created {@link Association} is Shared (manage by super class):
+ * it source {@link Property} aggregation is set to Shared kind.
+ *
+ * The currently created {@link Association} is bidirectional (navigable in both directions):
+ * it source and target {@link Property} are owned by the {@link Classifier} (target and source end types),
+ * this is handled by the super class.
+ * </pre>
+ */
+ @Override
+ protected void configureSourceProperty(Property sourceProperty) {
+ sourceProperty.setAggregation(AggregationKind.SHARED_LITERAL);
+ }
+}
\ No newline at end of file
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/advice/BlockConnectorEditHelperAdvice.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/advice/BlockConnectorEditHelperAdvice.java
new file mode 100755
index 0000000..75017f0
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/advice/BlockConnectorEditHelperAdvice.java
@@ -0,0 +1,109 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.helper.advice;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand;
+import org.eclipse.gmf.runtime.emf.type.core.ISpecializationType;
+import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.blocks.Block;
+import org.eclipse.papyrus.sysml.service.types.command.SetNestedPathCommand;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.sysml.service.types.utils.ConnectorUtils;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.utils.RequestParameterUtils;
+import org.eclipse.uml2.uml.Connector;
+import org.eclipse.uml2.uml.Property;
+
+/**
+ * <pre>
+ * This HelperAdvice completes {@link Block} edit commands with SysML
+ * specific {@link Connector} related actions:
+ * - Block::isEncapsulated management
+ * - NestedPropertyEnd management
+ * </pre>
+ */
+public class BlockConnectorEditHelperAdvice extends AbstractEditHelperAdvice {
+
+ private ConnectorUtils utils = new ConnectorUtils();
+
+ @Override
+ protected ICommand getBeforeCreateRelationshipCommand(CreateRelationshipRequest request) {
+
+ EObject source = request.getSource();
+ EObject target = request.getTarget();
+ View sourceView = RequestParameterUtils.getSourceView(request);
+ View targetView = RequestParameterUtils.getTargetView(request);
+
+ // Restrict this advice action to the end of Connector creation gesture (before clicking on target)
+ // in order to add SysML specific constraint
+ if ((request.getElementType() == UMLElementTypes.CONNECTOR)
+ && (request.getSource() != null) && (request.getTarget() != null) && (request.getContainer() != null)) {
+
+ // Restrict action to SysML Connector (meaning owned by Block)
+ if (((ISpecializationType) SysMLElementTypes.BLOCK).getMatcher().matches(request.getContainer())) {
+
+ // If the source or target view is enclosed in a structure encapsulated view, forbid creation.
+ if (utils.isCrossingEncapsulation(sourceView, targetView)
+ || utils.isCrossingEncapsulation(targetView, sourceView)) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ if (ConnectorUtils.canCreate(source, target, sourceView, targetView)) {
+ request.setParameter(org.eclipse.papyrus.uml.service.types.utils.RequestParameterConstants.UML_STRICT, false);
+ }
+ }
+ }
+
+ return super.getBeforeCreateRelationshipCommand(request);
+ }
+
+ @Override
+ protected ICommand getAfterCreateRelationshipCommand(CreateRelationshipRequest request) {
+
+ ICommand defaultCommand = super.getAfterCreateRelationshipCommand(request);
+
+ View sourceView = RequestParameterUtils.getSourceView(request);
+ View targetView = RequestParameterUtils.getTargetView(request);
+
+ // Restrict this advice action to the end of Connector creation gesture (before clicking on target)
+ // in order to add SysML specific constraint
+ if ((request.getElementType() == UMLElementTypes.CONNECTOR)
+ && (request.getSource() != null) && (request.getTarget() != null) && (request.getContainer() != null)) {
+
+ // Restrict action to SysML Connector (meaning owned by Block)
+ if (((ISpecializationType) SysMLElementTypes.BLOCK).getMatcher().matches(request.getContainer())) {
+
+ // Check if source view is nested
+ if (utils.isNestedConnectableElement(sourceView, targetView)) {
+ List<Property> nestedPath = utils.getNestedPropertyPath(sourceView, targetView);
+ defaultCommand = CompositeCommand.compose(defaultCommand, new SetNestedPathCommand("Set connector nested source path", request.getNewElement(), request, nestedPath, SetNestedPathCommand.NESTED_SOURCE));
+ }
+
+ // Check if target view is nested
+ if (utils.isNestedConnectableElement(targetView, sourceView)) {
+ List<Property> nestedPath = utils.getNestedPropertyPath(targetView, sourceView);
+ defaultCommand = CompositeCommand.compose(defaultCommand, new SetNestedPathCommand("Set connector nested source path", request.getNewElement(), request, nestedPath, SetNestedPathCommand.NESTED_TARGET));
+ }
+ }
+ }
+
+ return defaultCommand;
+ }
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/advice/ClassifierEditHelperAdvice.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/advice/ClassifierEditHelperAdvice.java
new file mode 100755
index 0000000..cf3505a
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/advice/ClassifierEditHelperAdvice.java
@@ -0,0 +1,166 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.helper.advice;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice;
+import org.eclipse.gmf.runtime.emf.type.core.requests.MoveRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRequest;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.utils.ElementUtil;
+import org.eclipse.uml2.uml.Association;
+import org.eclipse.uml2.uml.Classifier;
+import org.eclipse.uml2.uml.Port;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * <pre>
+ * This HelperAdvice completes {@link Classifier} edit commands with :
+ * - possibly required (sysML) association re-factor command.
+ * </pre>
+ */
+public class ClassifierEditHelperAdvice extends AbstractEditHelperAdvice {
+
+ /**
+ * <pre>
+ * {@inheritDoc}
+ *
+ * While moving a {@link Property} to a Classifier:
+ * - add possibly required (sysML) association re-factor command when needed.
+ *
+ * </pre>
+ */
+ @Override
+ protected ICommand getBeforeMoveCommand(MoveRequest request) {
+
+ ICommand gmfCommand = super.getBeforeMoveCommand(request);
+
+ // Treat related associations that required a re-factor action
+ // Retrieve elements already under re-factor.
+ List<EObject> currentlyRefactoredElements = (request.getParameter(org.eclipse.papyrus.infra.services.edit.utils.RequestParameterConstants.ASSOCIATION_REFACTORED_ELEMENTS) != null) ? (List<EObject>) request
+ .getParameter(org.eclipse.papyrus.infra.services.edit.utils.RequestParameterConstants.ASSOCIATION_REFACTORED_ELEMENTS) : new ArrayList<EObject>();
+
+ // Find Associations related to any moved Property
+ for (Object movedObject : request.getElementsToMove().keySet()) {
+
+ // Select Property (excluding Port) in the list of moved elements
+ if (!(movedObject instanceof Property) || (movedObject instanceof Port)) {
+ continue;
+ }
+
+ Property movedProperty = (Property) movedObject;
+ Association relatedAssociation = movedProperty.getAssociation();
+
+ // The moved property has to be related to a SysML association
+ if ((relatedAssociation == null) || !(ElementUtil.hasNature(relatedAssociation, SysMLElementTypes.SYSML_NATURE))) {
+ continue;
+ }
+
+ // Make sure the target differs from current container
+ if ((movedProperty.eContainer() == request.getTargetContainer()) && (movedProperty.eContainingFeature() == request.getTargetFeature(movedProperty))) {
+ continue;
+ }
+
+ // Make sure the target differs from related association (this move does not imply a re-factor, but simply an ownership change of an association end)
+ if ((relatedAssociation == request.getTargetContainer()) && ((request.getTargetFeature(movedProperty) == null) || (UMLPackage.eINSTANCE.getAssociation_OwnedEnd() == request.getTargetFeature(movedProperty)))) {
+ continue; // This is a SysML Property#isNavigable update which does not require an Association refactoring action
+ }
+ if ((getOppositeAssociationEnd(movedProperty).getType() == request.getTargetContainer())) {
+ continue; // This is a SysML Property#isNavigable update which does not require an Association refactoring action
+ }
+
+ // Moved element already under re-factor ?
+ if (currentlyRefactoredElements.contains(movedObject) || currentlyRefactoredElements.contains(relatedAssociation)) {
+ continue;
+
+ } else {
+ currentlyRefactoredElements.add((EObject) movedObject);
+ request.getParameters().put(org.eclipse.papyrus.infra.services.edit.utils.RequestParameterConstants.ASSOCIATION_REFACTORED_ELEMENTS, currentlyRefactoredElements);
+ }
+
+ ICommand refactorCommand = getAssociationRefactoringCommand(movedProperty, relatedAssociation, request);
+ gmfCommand = CompositeCommand.compose(gmfCommand, refactorCommand);
+ }
+
+ if (gmfCommand != null) {
+ gmfCommand = gmfCommand.reduce();
+ }
+
+ return gmfCommand;
+ }
+
+ /**
+ * Create a re-factoring command related to a Property move.
+ *
+ * @param movedProperty
+ * the moved property
+ * @param associationToRefactor
+ * the association to re-factor (re-orient action)
+ * @param request
+ * the original move request
+ * @return the re-factoring command
+ */
+ private ICommand getAssociationRefactoringCommand(Property movedProperty, Association associationToRefactor, MoveRequest request) {
+
+ Association relatedAssociation = movedProperty.getAssociation(); // Should not be null, test before calling method.
+
+ // Re-orient the related association (do not use edit service to avoid infinite loop here)
+ int direction = ReorientRequest.REORIENT_TARGET;
+ if (movedProperty == associationToRefactor.getMemberEnds().get(0)) {
+ direction = ReorientRequest.REORIENT_SOURCE;
+ }
+
+ ReorientRelationshipRequest reorientRequest = new ReorientRelationshipRequest(relatedAssociation, request.getTargetContainer(), movedProperty.eContainer(), direction);
+ reorientRequest.addParameters(request.getParameters());
+
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(relatedAssociation);
+ if (provider != null) {
+ return provider.getEditCommand(reorientRequest);
+ }
+
+ return null;
+ }
+
+ /**
+ * Get the opposite end of an AssociationEnd (binary association assumed).
+ *
+ * @param associationEnd
+ * the association end
+ * @return the opposite association end or null
+ */
+ private Property getOppositeAssociationEnd(Property associationEnd) {
+ Property oppositeEnd = null;
+
+ if (associationEnd.getAssociation() != null) {
+ Association association = associationEnd.getAssociation();
+ Set<Property> ends = new HashSet<Property>();
+ ends.addAll(association.getMemberEnds());
+ ends.remove(associationEnd);
+
+ oppositeEnd = (ends.size() > 0) ? ends.iterator().next() : null;
+ }
+ return oppositeEnd;
+ }
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/advice/ConnectorEditHelperAdvice.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/advice/ConnectorEditHelperAdvice.java
new file mode 100755
index 0000000..4dd302e
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/advice/ConnectorEditHelperAdvice.java
@@ -0,0 +1,271 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.helper.advice;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand;
+import org.eclipse.gmf.runtime.emf.type.core.ISpecializationType;
+import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRequest;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.emf.gmf.command.EMFtoGMFCommandWrapper;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.sysml.blocks.NestedConnectorEnd;
+import org.eclipse.papyrus.sysml.service.types.command.SetNestedPathCommand;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.sysml.service.types.utils.ConnectorUtils;
+import org.eclipse.papyrus.uml.service.types.utils.RequestParameterUtils;
+import org.eclipse.papyrus.uml.tools.commands.UnapplyStereotypeCommand;
+import org.eclipse.uml2.uml.ConnectableElement;
+import org.eclipse.uml2.uml.Connector;
+import org.eclipse.uml2.uml.ConnectorEnd;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Stereotype;
+import org.eclipse.uml2.uml.StructuredClassifier;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+/**
+ * <pre>
+ * This HelperAdvice completes {@link Connector} edit commands with SysML specific actions:
+ * - Re-orient with structure encapsulation respect.
+ * </pre>
+ */
+public class ConnectorEditHelperAdvice extends AbstractEditHelperAdvice {
+
+ private ConnectorUtils utils = new ConnectorUtils();
+
+ /**
+ *
+ * @see org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice#getBeforeReorientRelationshipCommand(org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest)
+ *
+ * @param request
+ * @return
+ */
+ @Override
+ protected ICommand getBeforeReorientRelationshipCommand(final ReorientRelationshipRequest request) {
+ final CompositeCommand compositeCommand = new CompositeCommand("Destroy Connector View Command");
+
+ // the UML Connector Edit Helper Advice destroys connector views when roles changes
+ // Here, we destroys connectors views, when the path changes
+ final EObject editedElement = request.getRelationship();
+ if (editedElement instanceof Connector) {
+
+ if (applySysMLRules(((Connector) editedElement).getOwner())) {
+ final Connector connector = (Connector) editedElement;
+ // verify the path now
+ int reorientDirection = request.getDirection();
+ Edge reorientedEdgeView = RequestParameterUtils.getReconnectedEdge(request);
+ View newEndView = RequestParameterUtils.getReconnectedEndView(request);
+ View oppositeEndView = null;
+ if (reorientedEdgeView != null) {
+ oppositeEndView = (reorientDirection == ReorientRequest.REORIENT_SOURCE) ? reorientedEdgeView.getTarget() : reorientedEdgeView.getSource();
+ }
+ List<Property> newNestedPath = null;
+ if (reorientedEdgeView != null && newEndView != null) {
+ // we are working with a 'graphical' reconnect request
+ newNestedPath = utils.getNestedPropertyPath(newEndView, oppositeEndView);
+ } else {
+ newNestedPath = (List<Property>) request.getParameter(ConnectorUtils.NESTED_CONNECTOR_END_PATH);
+ }
+
+ final Set<View> viewsToDestroy = utils.getViewsRepresentingConnector(connector);
+ final Iterator<View> iter = viewsToDestroy.iterator();
+
+ while (iter.hasNext()) {
+ final Edge current = (Edge) iter.next();
+ if (current != reorientedEdgeView) {
+ View oldEndView = null;
+ if (reorientDirection == ReorientRequest.REORIENT_SOURCE) {
+ oldEndView = current.getSource();
+ } else if (reorientDirection == ReorientRequest.REORIENT_TARGET) {
+ oldEndView = current.getTarget();
+ }
+ if (oppositeEndView != null) {
+ final List<Property> oldNestedPath = utils.getNestedPropertyPath(oldEndView, oppositeEndView);
+ if (!newNestedPath.equals(oldNestedPath)) {
+ final DestroyElementRequest destroyRequest = new DestroyElementRequest(request.getEditingDomain(), current, false);
+ final IElementEditService commandProvider = ElementEditServiceUtils.getCommandProvider(current);
+ compositeCommand.add(commandProvider.getEditCommand(destroyRequest));
+ }
+ }
+ }
+ }
+ if (!compositeCommand.isEmpty()) {
+ return compositeCommand;
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ *
+ * @param connectorOwner
+ * the owner of the connector
+ * @return
+ */
+ protected boolean applySysMLRules(final Element connectorOwner) {
+ return connectorOwner.getApplicableStereotype("SysML::Blocks::Block") != null;
+ }
+
+ @Override
+ protected ICommand getAfterReorientRelationshipCommand(final ReorientRelationshipRequest request) {
+ // we set the new value for the nested path
+ ICommand defaultCommand = super.getAfterReorientRelationshipCommand(request);
+
+ int reorientDirection = request.getDirection();
+
+
+ // Restrict this advice action to the end of Connector creation gesture (before clicking on target)
+ // in order to add SysML specific constraint
+ Connector connector = (Connector) request.getRelationship();
+ // get the direction
+
+ // Restrict action to SysML Connector (meaning owned by Block)
+ if (((ISpecializationType) SysMLElementTypes.BLOCK).getMatcher().matches(connector.eContainer())) {
+ List<Property> tmpNestedPath = null;
+ Edge reorientedEdgeView = RequestParameterUtils.getReconnectedEdge(request);
+ View newEndView = RequestParameterUtils.getReconnectedEndView(request);
+ View oppositeEndView = null;
+
+ // graphical case : verify encapsulation and get the new path
+ if (reorientedEdgeView != null) {
+
+ oppositeEndView = (reorientDirection == ReorientRequest.REORIENT_SOURCE) ? reorientedEdgeView.getTarget() : reorientedEdgeView.getSource();
+ Assert.isNotNull(oppositeEndView);
+ Assert.isNotNull(newEndView);
+ if (newEndView != null && oppositeEndView != null) {
+ // If the source or target view is enclosed in a structure encapsulated view, forbid creation.
+ if (utils.isCrossingEncapsulation(newEndView, oppositeEndView) || utils.isCrossingEncapsulation(oppositeEndView, newEndView)) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ tmpNestedPath = utils.getNestedPropertyPath(newEndView, oppositeEndView);
+ }
+ } else {
+ // we are in the semantic case
+ tmpNestedPath = ((List<Property>) request.getParameter(ConnectorUtils.NESTED_CONNECTOR_END_PATH));
+
+ // we need to verify encapsulation
+ if (ConnectorUtils.isCrossingEncapuslation(tmpNestedPath)) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ }
+
+ final List<ConnectableElement> oppositeFullNestedPath = new ArrayList<ConnectableElement>();
+ final List<ConnectableElement> newFullNestedPath = new ArrayList<ConnectableElement>(tmpNestedPath);
+ ConnectableElement newRole = (Property) request.getNewRelationshipEnd();
+ final ConnectorEnd oppositeEnd;
+ if (reorientDirection == ReorientRequest.REORIENT_SOURCE) {
+ oppositeEnd = ((Connector) request.getRelationship()).getEnds().get(1);
+ } else {
+ oppositeEnd = ((Connector) request.getRelationship()).getEnds().get(0);
+ }
+ final NestedConnectorEnd nestedConnectorEnd = UMLUtil.getStereotypeApplication(oppositeEnd, NestedConnectorEnd.class);
+ if (nestedConnectorEnd != null) {
+ oppositeFullNestedPath.addAll(nestedConnectorEnd.getPropertyPath());
+ }
+ oppositeFullNestedPath.add(oppositeEnd.getRole());
+ newFullNestedPath.add(newRole);
+
+ int tmpNestedPathDirection = (reorientDirection == ReorientRequest.REORIENT_SOURCE) ? SetNestedPathCommand.NESTED_SOURCE : SetNestedPathCommand.NESTED_TARGET;
+ if (tmpNestedPath == null || tmpNestedPath.isEmpty()) { // in case of no NestedConnectorEnd property path remove existing NestedConnectorEnd
+ ConnectorEnd connectorEnd0 = ((Connector) request.getRelationship()).getEnds().get(0);
+ Stereotype stereotype0 = connectorEnd0.getAppliedStereotype("SysML::Blocks::NestedConnectorEnd");//$NON-NLS-1$
+ if (stereotype0 != null) {
+ UnapplyStereotypeCommand unapplyStereotypeCommand0 = new UnapplyStereotypeCommand(connectorEnd0, stereotype0, request.getEditingDomain());
+ defaultCommand = CompositeCommand.compose(defaultCommand, EMFtoGMFCommandWrapper.wrap(unapplyStereotypeCommand0));
+ }
+ ConnectorEnd connectorEnd1 = ((Connector) request.getRelationship()).getEnds().get(1);
+ Stereotype stereotype1 = connectorEnd1.getAppliedStereotype("SysML::Blocks::NestedConnectorEnd");//$NON-NLS-1$
+ if (stereotype1 != null) {
+ UnapplyStereotypeCommand unapplyStereotypeCommand1 = new UnapplyStereotypeCommand(connectorEnd1, stereotype1, request.getEditingDomain());
+ defaultCommand = CompositeCommand.compose(defaultCommand, EMFtoGMFCommandWrapper.wrap(unapplyStereotypeCommand1));
+ }
+
+ } else {
+ defaultCommand = CompositeCommand.compose(defaultCommand, new SetNestedPathCommand("Set connector nested source path", request.getRelationship(), request, tmpNestedPath, tmpNestedPathDirection));
+ }
+ }
+
+ return defaultCommand;
+ }
+
+
+ // TODO : we should recalculate a new owner according to the new nested path, then update these nested path according to the new owner
+ // we don't do it now, because we have some troubles with connector
+ // final EncapsulatedClassifier newOwner = deduceNewConnectorOwner(oppositeFullNestedPath, newFullNestedPath);
+ // /**
+ // * @param fullNestedPathWithrole1
+ // * @param fullNestedPathWithRole2
+ // * @return
+ // * the new owner for the connector
+ // */
+ // doesnt work currently
+ // public static final EncapsulatedClassifier deduceNewConnectorOwner(final List<ConnectableElement> fullNestedPathWithrole1, final List<ConnectableElement> fullNestedPathWithRole2) {
+ // final ConnectableElement firstElementPath = fullNestedPathWithrole1.get(0);
+ // //case of encapsulation of the part
+ // if(fullNestedPathWithRole2.get(0) == firstElementPath) {
+ // if(fullNestedPathWithRole2.size() > 1) {
+ // fullNestedPathWithrole1.remove(0);
+ // fullNestedPathWithRole2.remove(0);
+ // return deduceNewConnectorOwner(fullNestedPathWithrole1, fullNestedPathWithRole2);
+ // } else {
+ // return (EncapsulatedClassifier)firstElementPath.getOwner();
+ // }
+ // } else {
+ // final ConnectableElement firstElementPath2 = fullNestedPathWithRole2.get(0);
+ // if(firstElementPath.getOwner() == firstElementPath2.getOwner()) {
+ // return (EncapsulatedClassifier)firstElementPath.getOwner();
+ // } else {
+ // final List<ConnectableElement> biggestList;
+ // final List<ConnectableElement> smallestList;
+ // if(fullNestedPathWithrole1.size() > fullNestedPathWithRole2.size()) {
+ // biggestList = fullNestedPathWithrole1;
+ // smallestList = fullNestedPathWithRole2;
+ // } else {
+ // biggestList = fullNestedPathWithRole2;
+ // smallestList = fullNestedPathWithrole1;
+ // }
+ // for(int i = 0; i < biggestList.size(); i++) {
+ // final ConnectableElement current = biggestList.get(i);
+ // if(smallestList.contains(current) && i > 0) {
+ // return (EncapsulatedClassifier)biggestList.get(i - 1).getOwner();
+ // }
+ // }
+ // }
+ // }
+ // return null;
+ // // throw new RuntimeException("error");
+ //
+ //
+ //
+ //
+ //
+ // }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/advice/PackageEditHelperAdvice.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/advice/PackageEditHelperAdvice.java
new file mode 100755
index 0000000..4c5abb7
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/advice/PackageEditHelperAdvice.java
@@ -0,0 +1,85 @@
+/*****************************************************************************
+ * 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:
+ * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.helper.advice;
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.utils.EMFUtil;
+import org.eclipse.uml2.uml.Actor;
+import org.eclipse.uml2.uml.Association;
+
+/**
+ * Advice to restrict {@link Association} creation in SysML
+ */
+public class PackageEditHelperAdvice extends AbstractEditHelperAdvice {
+
+ /**
+ * {@inheritDoc}
+ *
+ * In case of {@link Association} creation, it should not be possible to target an association as target end.
+ */
+ @Override
+ protected ICommand getBeforeCreateRelationshipCommand(CreateRelationshipRequest request) {
+ // test if the creation is for a SysML association
+
+ IElementType type = request.getElementType();
+ if (hasSuperType(type, SysMLElementTypes.ASSOCIATION)) {
+ // test source and target...
+ EObject target = request.getTarget();
+ if (target instanceof Association || target == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ if (!(hasSuperType(type, SysMLElementTypes.ASSOCIATION_NONE_DIRECTED) || hasSuperType(type, SysMLElementTypes.ASSOCIATION_COMPOSITE_DIRECTED) || hasSuperType(type, SysMLElementTypes.ASSOCIATION_SHARED_DIRECTED))) {
+ // The association is bidirectional. Check if that is possible.
+
+ // The target can be read-only only if the association is directed.
+ if (EMFUtil.isReadOnly(target)) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ // association should be directed to the actor. In this case, the property is owned by the association, not by the actor
+ if (target instanceof Actor) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ }
+
+ }
+
+ return super.getBeforeCreateRelationshipCommand(request);
+ }
+
+ protected boolean hasSuperType(IElementType elementType, IElementType typeToTest) {
+ if (elementType == null || typeToTest == null) {
+ return false;
+ }
+
+ if (elementType.equals(typeToTest)) {
+ return true;
+ }
+
+ List<IElementType> superTypes = Arrays.asList(elementType.getAllSuperTypes());
+ if (superTypes.contains(typeToTest)) {
+ return true;
+ }
+
+ return false;
+ }
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/advice/PropertyEditHelperAdvice.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/advice/PropertyEditHelperAdvice.java
new file mode 100755
index 0000000..3e47d82
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/advice/PropertyEditHelperAdvice.java
@@ -0,0 +1,387 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 402525
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.helper.advice;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature.Setting;
+import org.eclipse.gmf.runtime.common.core.command.AbstractCommand;
+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.EMFCoreUtil;
+import org.eclipse.gmf.runtime.emf.type.core.ISpecializationType;
+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.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.MessageDialogWithToggle;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.infra.services.edit.utils.RequestParameterConstants;
+import org.eclipse.papyrus.sysml.constraints.ConstraintBlock;
+import org.eclipse.papyrus.sysml.constraints.ConstraintProperty;
+import org.eclipse.papyrus.sysml.constraints.ConstraintsPackage;
+import org.eclipse.papyrus.sysml.service.types.Activator;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.sysml.service.types.utils.ConnectorUtils;
+import org.eclipse.papyrus.uml.diagram.common.util.CrossReferencerUtil;
+import org.eclipse.papyrus.uml.service.types.utils.ElementUtil;
+import org.eclipse.papyrus.uml.service.types.utils.NamedElementHelper;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.uml2.common.util.CacheAdapter;
+import org.eclipse.uml2.uml.Association;
+import org.eclipse.uml2.uml.Connector;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Port;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Type;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.eclipse.uml2.uml.util.UMLUtil;
+import org.eclipse.uml2.uml.util.UMLUtil.StereotypeApplicationHelper;
+
+/**
+ * <pre>
+ * This HelperAdvice completes {@link Property} edit commands with:
+ * - possibly required (sysML) association re-factor command.
+ * </pre>
+ */
+public class PropertyEditHelperAdvice extends AbstractEditHelperAdvice {
+
+ /**
+ * <pre>
+ * {@inheritDoc}
+ *
+ * While setting {@link Property} (excluding {@link Port} and {@link ConstraintParameter} type:
+ * - add possibly required (sysML) association re-factor command when needed.
+ * - add/remove possibly required ConstraintProperty stereotype when needed.
+ * </pre>
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ protected ICommand getBeforeSetCommand(SetRequest request) {
+ ICommand gmfCommand = super.getBeforeSetCommand(request);
+
+ EObject elementToEdit = request.getElementToEdit();
+ if ((elementToEdit instanceof Property) && !(elementToEdit instanceof Port) && (request.getFeature() == UMLPackage.eINSTANCE.getTypedElement_Type()) && (request.getValue() instanceof Type)) {
+
+ Property propertyToEdit = (Property) elementToEdit;
+
+ // SysML specification : all property typed by a ConstraintBlock must have a ContraintProperty stereotype applied
+ if (request.getValue() instanceof org.eclipse.uml2.uml.Class) {
+ ICommand stereotypeApplicationCommand = getConstraintPropertyStereotypeApplicationCommand(propertyToEdit, (org.eclipse.uml2.uml.Class) request.getValue(), request);
+ gmfCommand = CompositeCommand.compose(gmfCommand, stereotypeApplicationCommand);
+ }
+
+ // Exclude ConstraintParameter (simple property without ConstraintProperty stereotype owned by a ConstraintBlock)
+ if (propertyToEdit.eContainer() instanceof org.eclipse.uml2.uml.Class && UMLUtil.getStereotypeApplication((Element) propertyToEdit.eContainer(), ConstraintBlock.class) != null) {
+ if (UMLUtil.getStereotypeApplication(propertyToEdit, ConstraintProperty.class) == null) {
+ return gmfCommand;
+ }
+ }
+
+ Association relatedAssociation = propertyToEdit.getAssociation();
+
+ // The edited property has to be related to a SysML association
+ if ((relatedAssociation == null) || !(ElementUtil.hasNature(relatedAssociation, SysMLElementTypes.SYSML_NATURE))) {
+
+ // If no association exist and the new type is a Block
+ // (not a ConstraintBlock => a property typed by a ConstraintBlock is a ConstraintProperty, not a Part neither a Reference),
+ // add the association
+ if ((relatedAssociation == null) && ((ISpecializationType) SysMLElementTypes.BLOCK).getMatcher().matches((Type) request.getValue()) && !((ISpecializationType) SysMLElementTypes.CONSTRAINT_BLOCK).getMatcher().matches((Type) request.getValue())
+ && ((ISpecializationType) SysMLElementTypes.BLOCK).getMatcher().matches(propertyToEdit.eContainer())) {
+
+ ICommand addAssociationCommand = getCreatePartAssociationCommand((org.eclipse.uml2.uml.Class) propertyToEdit.eContainer(), propertyToEdit, (org.eclipse.uml2.uml.Class) request.getValue());
+ gmfCommand = CompositeCommand.compose(gmfCommand, addAssociationCommand);
+ }
+
+ return gmfCommand;
+ }
+
+ // Setting new type can be related to an association re-orient (or trigger the association re-orient)
+ // Retrieve elements already under re-factor.
+ List<EObject> currentlyRefactoredElements = (request.getParameter(RequestParameterConstants.ASSOCIATION_REFACTORED_ELEMENTS) != null) ? (List<EObject>) request.getParameter(RequestParameterConstants.ASSOCIATION_REFACTORED_ELEMENTS)
+ : new ArrayList<EObject>();
+ if (!currentlyRefactoredElements.contains(propertyToEdit)) {
+ currentlyRefactoredElements.add(propertyToEdit);
+ request.getParameters().put(RequestParameterConstants.ASSOCIATION_REFACTORED_ELEMENTS, currentlyRefactoredElements);
+
+ // Current association already under re-factor ?
+ if (currentlyRefactoredElements.contains(relatedAssociation)) {
+ return gmfCommand;
+ }
+ }
+
+ // If the new type is not a block, destroy related association
+ // This must be done only if the setting of the property type is not part of an association re-orient (hence after the previous code-block),
+ // otherwise there is no legitimate reason to destroy the existing association while re-orienting it.
+ if (!((ISpecializationType) SysMLElementTypes.BLOCK).getMatcher().matches((Type) request.getValue()) && propertyToEdit.getType() != null) {
+ ICommand destroyCommand = getDestroyPartAssociationCommand(relatedAssociation, propertyToEdit);
+ gmfCommand = CompositeCommand.compose(gmfCommand, destroyCommand);
+
+ return gmfCommand;
+ }
+
+ ICommand refactorCommand = getAssociationRefactoringCommand(propertyToEdit, relatedAssociation, request);
+ gmfCommand = CompositeCommand.compose(gmfCommand, refactorCommand);
+ }
+
+ if (gmfCommand != null) {
+ gmfCommand = gmfCommand.reduce();
+ }
+
+ return gmfCommand;
+ }
+
+ /**
+ *
+ * @see org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice#getAfterSetCommand(org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest)
+ *
+ * @param setRequest
+ * @return
+ */
+ @Override
+ protected ICommand getAfterSetCommand(SetRequest setRequest) {
+ ICommand afterSetCommand = super.getAfterSetCommand(setRequest);
+ EObject elementToEdit = setRequest.getElementToEdit();
+ if ((elementToEdit instanceof Property) && !(elementToEdit instanceof Port) && (setRequest.getFeature() == UMLPackage.eINSTANCE.getTypedElement_Type()) && (setRequest.getValue() instanceof Type)) {
+ afterSetCommand = getDestroyAssociatedNestedConnectorCommand((Property) elementToEdit, afterSetCommand);
+ }
+ return afterSetCommand;
+ }
+
+ /**
+ *
+ * @see org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice#getAfterDestroyDependentsCommand(org.eclipse.gmf.runtime.emf.type.core.requests.DestroyDependentsRequest)
+ *
+ * @param destroyDependentsRequest
+ * @return
+ */
+ @Override
+ protected ICommand getAfterDestroyDependentsCommand(DestroyDependentsRequest destroyDependentsRequest) {
+ ICommand afterDestroyDependentsCommand = super.getAfterDestroyDependentsCommand(destroyDependentsRequest);
+ EObject elementToDestroy = destroyDependentsRequest.getElementToDestroy();
+ if (elementToDestroy instanceof Property) {
+ afterDestroyDependentsCommand = getDestroyAssociatedNestedConnectorCommand((Property) elementToDestroy, afterDestroyDependentsCommand);
+ }
+ return afterDestroyDependentsCommand;
+ }
+
+ /**
+ * Create a destroy command for all connectors that have this property in their <NestedConnectorEnd> property path.
+ *
+ * @param property
+ * the part to be destroyed
+ * @param command
+ * @return
+ */
+ private ICommand getDestroyAssociatedNestedConnectorCommand(Property property, ICommand command) {
+ // When creating a property in a new-element dialog, it is not attached to the model, yet. So, there will be no need to worry about connectors
+ Collection<Setting> allReferences = CacheAdapter.getCacheAdapter(property).getInverseReferences(property);
+ List<Connector> connectorsToDestroy = ConnectorUtils.filterConnectorByPropertyInNestedConnectorEnd(allReferences, property);
+ for (Connector connector : connectorsToDestroy) {
+ ICommand destroyConnectorCommand = getDestroyConnectorCommand(connector);
+ command = CompositeCommand.compose(command, destroyConnectorCommand);
+ }
+ return command;
+ }
+
+ /**
+ * Create a connector destroy command.
+ *
+ * @param connector
+ * @return the connector destroy command
+ */
+ private ICommand getDestroyConnectorCommand(Connector connector) {
+ DestroyElementRequest request = new DestroyElementRequest(connector, false);
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(connector.eContainer());
+ if (provider == null) {
+ return null;
+ }
+ return provider.getEditCommand(request);
+ }
+
+ /**
+ * Create a re-factoring command related to a Property move.
+ *
+ * @param setProperty
+ * the property which type is set
+ * @param associationToRefactor
+ * the association to re-factor (re-orient action)
+ * @param request
+ * the original set request
+ * @return the re-factoring command
+ */
+ private ICommand getAssociationRefactoringCommand(Property setProperty, Association associationToRefactor, SetRequest request) {
+
+ Association relatedAssociation = setProperty.getAssociation(); // Should not be null, test before calling method.
+
+ if (associationToRefactor.getMemberEnds().size() >= 2) {
+ // Re-orient the related association (do not use edit service to avoid infinite loop here)
+ int direction = ReorientRequest.REORIENT_TARGET;
+ if (setProperty == associationToRefactor.getMemberEnds().get(1)) {
+ direction = ReorientRequest.REORIENT_SOURCE;
+ }
+
+ ReorientRelationshipRequest reorientRequest = new ReorientRelationshipRequest(relatedAssociation, (Type) request.getValue(), setProperty.eContainer(), direction);
+ reorientRequest.addParameters(request.getParameters());
+
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(relatedAssociation);
+ if (provider != null) {
+ return provider.getEditCommand(reorientRequest);
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * Create a part association creation command.
+ *
+ * @return the part association creation command
+ */
+ private ICommand getCreatePartAssociationCommand(final org.eclipse.uml2.uml.Class sourceBlock, final Property sourceProperty, final org.eclipse.uml2.uml.Class targetBlock) {
+
+ return new AbstractCommand("Create part association") {
+
+ @Override
+ protected CommandResult doUndoWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ protected CommandResult doRedoWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ Association association = UMLFactory.eINSTANCE.createAssociation();
+
+ // Add the association in the model
+ org.eclipse.uml2.uml.Package container = (org.eclipse.uml2.uml.Package) EMFCoreUtil.getLeastCommonContainer(Arrays.asList(new EObject[] { sourceBlock, targetBlock }), UMLPackage.eINSTANCE.getPackage());
+ container.getPackagedElements().add(association);
+
+ // Use existing Property as source...
+ association.getMemberEnds().add(sourceProperty);
+ // ... and create the opposite (unnamed) Property
+ Property targetProperty = UMLFactory.eINSTANCE.createProperty();
+ association.getOwnedEnds().add(targetProperty);
+
+ // Set Association name
+ // Initialize the element name based on the created IElementType
+ String initializedName = NamedElementHelper.getDefaultNameWithIncrementFromBase(UMLPackage.eINSTANCE.getAssociation().getName(), association.eContainer().eContents());
+ association.setName(initializedName);
+
+ // Add SysML Nature on the new Association
+ ElementUtil.addNature(association, SysMLElementTypes.SYSML_NATURE);
+
+ return CommandResult.newOKCommandResult(association);
+ }
+ };
+
+ }
+
+ /**
+ * Apply/remove the ConstraintProperty stereotype application
+ *
+ * @return the ConstraintProperty stereotype application command
+ */
+ private ICommand getConstraintPropertyStereotypeApplicationCommand(final Property sourceProperty, final org.eclipse.uml2.uml.Class targetBlock, final SetRequest request) {
+
+ return new AbstractTransactionalCommand(request.getEditingDomain(), "Apply/Remove ConstraintProperty Stereotype", null) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ // SysML specification : all property typed by a ConstraintBlock must have a ContraintProperty stereotype applied
+ ConstraintProperty constraintPropertyApplication = UMLUtil.getStereotypeApplication(sourceProperty, ConstraintProperty.class);
+ if (UMLUtil.getStereotypeApplication(targetBlock, ConstraintBlock.class) != null) {
+ if (constraintPropertyApplication == null) {
+ StereotypeApplicationHelper.INSTANCE.applyStereotype(sourceProperty, ConstraintsPackage.eINSTANCE.getConstraintProperty());
+ // Remove representations
+ Set<View> memberViewsToDestroy = CrossReferencerUtil.getCrossReferencingViews(sourceProperty, null);
+ if (memberViewsToDestroy.size() != 0) {
+ final IPreferenceStore store = Activator.getDefault().getPreferenceStore();
+ final String DISPLAY_MESSAGE_FOR_TYPING_ACTION_PREFERENCE_KEY = "displayMessageForTypingActionPreferenceKey";
+ boolean contains = store.contains(DISPLAY_MESSAGE_FOR_TYPING_ACTION_PREFERENCE_KEY);
+ if (!contains) {
+ store.setValue(DISPLAY_MESSAGE_FOR_TYPING_ACTION_PREFERENCE_KEY, MessageDialogWithToggle.NEVER);
+ store.setDefault(DISPLAY_MESSAGE_FOR_TYPING_ACTION_PREFERENCE_KEY, MessageDialogWithToggle.NEVER);
+ }
+ final String hideValue = store.getString(DISPLAY_MESSAGE_FOR_TYPING_ACTION_PREFERENCE_KEY);
+ if (!hideValue.equals(MessageDialogWithToggle.ALWAYS)) {
+ int size = memberViewsToDestroy.size();
+ MessageDialogWithToggle.openInformation(Display.getDefault().getActiveShell(), "Change Type Action",
+ "WARNING! Typing a Property by a ConstraintBlock make this property become a ConstraintProperty. ConstraintProperty have a specific representation. "
+ + "\nSo all representations of this property will be removed from the model (" + size + " occurence" + ((size > 1) ? "s" : "") + ").",
+ "Don't show this dialog the next time", false, store,
+ DISPLAY_MESSAGE_FOR_TYPING_ACTION_PREFERENCE_KEY);
+ }
+
+ }
+ for (View view : memberViewsToDestroy) {
+ final DestroyElementRequest destroyRequest = new DestroyElementRequest(request.getEditingDomain(), view, false);
+ final IElementEditService commandProvider = ElementEditServiceUtils.getCommandProvider(view);
+ ICommand editCommand = commandProvider.getEditCommand(destroyRequest);
+ editCommand.execute(progressMonitor, info);
+ }
+ }
+ } else {
+ if (constraintPropertyApplication != null) {
+ StereotypeApplicationHelper.INSTANCE.removeFromContainmentList(sourceProperty, constraintPropertyApplication);
+ }
+ }
+ return CommandResult.newOKCommandResult(sourceProperty);
+ }
+ };
+ }
+
+ /**
+ * Create a part association destroy command.
+ *
+ * @return the part association destroy command
+ */
+ @SuppressWarnings("unchecked")
+ private ICommand getDestroyPartAssociationCommand(Association partAssociation, Property propertyToEdit) {
+
+ DestroyElementRequest request = new DestroyElementRequest(partAssociation, false);
+ List<EObject> dependentsToKeep = Arrays.asList(new EObject[] { propertyToEdit });
+ request.getParameters().put(RequestParameterConstants.DEPENDENTS_TO_KEEP, dependentsToKeep);
+
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(partAssociation.eContainer());
+ if (provider == null) {
+ return null;
+ }
+ ICommand destroyCommand = provider.getEditCommand(request);
+
+ return destroyCommand;
+ }
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/ActorPartPropertyMatcher.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/ActorPartPropertyMatcher.java
new file mode 100755
index 0000000..649d207
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/ActorPartPropertyMatcher.java
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.matcher;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher;
+import org.eclipse.uml2.uml.Actor;
+import org.eclipse.uml2.uml.AggregationKind;
+import org.eclipse.uml2.uml.Port;
+import org.eclipse.uml2.uml.Property;
+
+/**
+ * Test if current {@link Property} is a {@link Actor} Part
+ */
+public class ActorPartPropertyMatcher implements IElementMatcher {
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean matches(EObject eObject) {
+
+ boolean isMatch = false;
+ if ((eObject instanceof Property) && !(eObject instanceof Port)) {
+
+ Property element = (Property) eObject;
+
+ // The property is necessary a composition and has a type
+ if ((element.getType() != null) && (element.getAggregation() == AggregationKind.COMPOSITE_LITERAL)) {
+
+ // Moreover its type has to be a Actor
+ if (element.getType() instanceof Actor) {
+ isMatch = true;
+ }
+ }
+ }
+ return isMatch;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/AllocateMatcher.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/AllocateMatcher.java
new file mode 100755
index 0000000..4364361
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/AllocateMatcher.java
@@ -0,0 +1,36 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.matcher;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher;
+import org.eclipse.papyrus.sysml.allocations.Allocate;
+import org.eclipse.uml2.uml.Abstraction;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+/**
+ * Test if current {@link Abstraction} is a {@link Allocate}
+ */
+public class AllocateMatcher implements IElementMatcher {
+
+ public boolean matches(EObject eObject) {
+
+ boolean isMatch = false;
+ if (eObject instanceof Abstraction) {
+
+ Abstraction element = (Abstraction) eObject;
+ if (UMLUtil.getStereotypeApplication(element, Allocate.class) != null) {
+ isMatch = true;
+ }
+ }
+ return isMatch;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/AssociationMatcher.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/AssociationMatcher.java
new file mode 100755
index 0000000..de1d9d2
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/AssociationMatcher.java
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.matcher;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.utils.ElementUtil;
+import org.eclipse.uml2.uml.Association;
+import org.eclipse.uml2.uml.Element;
+
+/**
+ * <pre>
+ * Test if current {@link Association} has the UML nature.
+ * This nature is used to:
+ * - distinguish between UML and SysML expected behavior for {@link Association}
+ * - decide whether and {@link Association} can be dropped and used in a specific diagram
+ * - select the property view to use
+ * </pre>
+ */
+public class AssociationMatcher implements IElementMatcher {
+
+ /** Test is the eObject is a SysML Association */
+ public boolean matches(EObject eObject) {
+
+ boolean isMatch = false;
+
+ if (eObject instanceof Association) {
+
+ Association association = (Association) eObject;
+ if (hasValidNature(association)) {
+ isMatch = true;
+ }
+ }
+
+ return isMatch;
+ }
+
+ /** Valid nature is SysML Nature */
+ private boolean hasValidNature(Element element) {
+ return ElementUtil.hasNature(element, SysMLElementTypes.SYSML_NATURE);
+ }
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/BlockMatcher.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/BlockMatcher.java
new file mode 100755
index 0000000..c078b20
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/BlockMatcher.java
@@ -0,0 +1,36 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.matcher;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher;
+import org.eclipse.papyrus.sysml.blocks.Block;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+/**
+ * Test if current {@link Class} is a {@link Block}
+ */
+public class BlockMatcher implements IElementMatcher {
+
+ public boolean matches(EObject eObject) {
+
+ boolean isMatch = false;
+ if (eObject instanceof Class) {
+
+ Class element = (Class) eObject;
+ if (UMLUtil.getStereotypeApplication(element, Block.class) != null) {
+ isMatch = true;
+ }
+ }
+ return isMatch;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/ConformMatcher.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/ConformMatcher.java
new file mode 100755
index 0000000..2e7fe79
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/ConformMatcher.java
@@ -0,0 +1,36 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.matcher;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher;
+import org.eclipse.papyrus.sysml.modelelements.Conform;
+import org.eclipse.uml2.uml.Dependency;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+/**
+ * Test if current {@link Dependency} is a {@link Conform}
+ */
+public class ConformMatcher implements IElementMatcher {
+
+ public boolean matches(EObject eObject) {
+
+ boolean isMatch = false;
+ if (eObject instanceof Dependency) {
+
+ Dependency element = (Dependency) eObject;
+ if (UMLUtil.getStereotypeApplication(element, Conform.class) != null) {
+ isMatch = true;
+ }
+ }
+ return isMatch;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/ConstraintBlockMatcher.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/ConstraintBlockMatcher.java
new file mode 100755
index 0000000..6c30265
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/ConstraintBlockMatcher.java
@@ -0,0 +1,36 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.matcher;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher;
+import org.eclipse.papyrus.sysml.constraints.ConstraintBlock;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+/**
+ * Test if current {@link Class} is a {@link ConstraintBlock}
+ */
+public class ConstraintBlockMatcher implements IElementMatcher {
+
+ public boolean matches(EObject eObject) {
+
+ boolean isMatch = false;
+ if (eObject instanceof Class) {
+
+ Class element = (Class) eObject;
+ if (UMLUtil.getStereotypeApplication(element, ConstraintBlock.class) != null) {
+ isMatch = true;
+ }
+ }
+ return isMatch;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/ConstraintPropertyMatcher.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/ConstraintPropertyMatcher.java
new file mode 100755
index 0000000..cbfe397
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/ConstraintPropertyMatcher.java
@@ -0,0 +1,44 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 2016 CEA LIST, Esterel technologies SAS and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Alain Le Guennec (Esterel technologies SAS) - Bug 497455
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.matcher;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher;
+import org.eclipse.papyrus.sysml.constraints.ConstraintProperty;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Type;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+/**
+ * Test if current {@link Property} is a {@link ConstraintProperty}
+ */
+public class ConstraintPropertyMatcher implements IElementMatcher {
+
+ public boolean matches(EObject eObject) {
+
+ boolean isMatch = false;
+ if (eObject instanceof Property) {
+
+ Property element = (Property) eObject;
+ Type type = element.getType();
+ // A ConstraintProperty is necessarily typed by a ConstraintBlock which must be a Class.
+ if ((type==null || type instanceof Class) && UMLUtil.getStereotypeApplication(element, ConstraintProperty.class) != null) {
+ isMatch = true;
+ }
+ }
+ return isMatch;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/CopyMatcher.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/CopyMatcher.java
new file mode 100755
index 0000000..92da2c5
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/CopyMatcher.java
@@ -0,0 +1,36 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.matcher;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher;
+import org.eclipse.papyrus.sysml.requirements.Copy;
+import org.eclipse.uml2.uml.Abstraction;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+/**
+ * Test if current {@link Abstraction} is a {@link Copy}
+ */
+public class CopyMatcher implements IElementMatcher {
+
+ public boolean matches(EObject eObject) {
+
+ boolean isMatch = false;
+ if (eObject instanceof Abstraction) {
+
+ Abstraction element = (Abstraction) eObject;
+ if (UMLUtil.getStereotypeApplication(element, Copy.class) != null) {
+ isMatch = true;
+ }
+ }
+ return isMatch;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/DeriveReqtMatcher.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/DeriveReqtMatcher.java
new file mode 100755
index 0000000..d15ee46
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/DeriveReqtMatcher.java
@@ -0,0 +1,36 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.matcher;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher;
+import org.eclipse.papyrus.sysml.requirements.DeriveReqt;
+import org.eclipse.uml2.uml.Abstraction;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+/**
+ * Test if current {@link Abstraction} is a {@link DeriveReqt}
+ */
+public class DeriveReqtMatcher implements IElementMatcher {
+
+ public boolean matches(EObject eObject) {
+
+ boolean isMatch = false;
+ if (eObject instanceof Abstraction) {
+
+ Abstraction element = (Abstraction) eObject;
+ if (UMLUtil.getStereotypeApplication(element, DeriveReqt.class) != null) {
+ isMatch = true;
+ }
+ }
+ return isMatch;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/DimensionMatcher.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/DimensionMatcher.java
new file mode 100755
index 0000000..117034e
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/DimensionMatcher.java
@@ -0,0 +1,36 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.matcher;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher;
+import org.eclipse.papyrus.sysml.blocks.Dimension;
+import org.eclipse.uml2.uml.InstanceSpecification;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+/**
+ * Test if current {@link InstanceSpecification} is a {@link Dimension}
+ */
+public class DimensionMatcher implements IElementMatcher {
+
+ public boolean matches(EObject eObject) {
+
+ boolean isMatch = false;
+ if (eObject instanceof InstanceSpecification) {
+
+ InstanceSpecification element = (InstanceSpecification) eObject;
+ if (UMLUtil.getStereotypeApplication(element, Dimension.class) != null) {
+ isMatch = true;
+ }
+ }
+ return isMatch;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/FlowPortInMatcher.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/FlowPortInMatcher.java
new file mode 100755
index 0000000..dc1a4b2
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/FlowPortInMatcher.java
@@ -0,0 +1,40 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.matcher;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher;
+import org.eclipse.papyrus.sysml.portandflows.FlowDirection;
+import org.eclipse.papyrus.sysml.portandflows.FlowPort;
+import org.eclipse.uml2.uml.Port;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+/**
+ * Test if current {@link Port} is a {@link FlowPort} with IN direction
+ */
+public class FlowPortInMatcher implements IElementMatcher {
+
+ public boolean matches(EObject eObject) {
+
+ boolean isFlowPort_IN = false;
+
+ if (eObject instanceof Port) {
+
+ Port port = (Port) eObject;
+ FlowPort flowPort = UMLUtil.getStereotypeApplication(port, FlowPort.class);
+
+ if ((flowPort != null) && (flowPort.getDirection() == FlowDirection.IN)) {
+ isFlowPort_IN = true;
+ }
+ }
+
+ return isFlowPort_IN;
+ }
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/FlowPortInOutMatcher.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/FlowPortInOutMatcher.java
new file mode 100755
index 0000000..947d8ae
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/FlowPortInOutMatcher.java
@@ -0,0 +1,40 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.matcher;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher;
+import org.eclipse.papyrus.sysml.portandflows.FlowDirection;
+import org.eclipse.papyrus.sysml.portandflows.FlowPort;
+import org.eclipse.uml2.uml.Port;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+/**
+ * Test if current {@link Port} is a {@link FlowPort} with INOUT direction
+ */
+public class FlowPortInOutMatcher implements IElementMatcher {
+
+ public boolean matches(EObject eObject) {
+
+ boolean isFlowPort_INOUT = false;
+
+ if (eObject instanceof Port) {
+
+ Port port = (Port) eObject;
+ FlowPort flowPort = UMLUtil.getStereotypeApplication(port, FlowPort.class);
+
+ if ((flowPort != null) && (flowPort.getDirection() == FlowDirection.INOUT)) {
+ isFlowPort_INOUT = true;
+ }
+ }
+
+ return isFlowPort_INOUT;
+ }
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/FlowPortMatcher.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/FlowPortMatcher.java
new file mode 100755
index 0000000..da4decb
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/FlowPortMatcher.java
@@ -0,0 +1,36 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.matcher;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher;
+import org.eclipse.papyrus.sysml.portandflows.FlowPort;
+import org.eclipse.uml2.uml.Port;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+/**
+ * Test if current {@link Port} is a {@link FlowPort}
+ */
+public class FlowPortMatcher implements IElementMatcher {
+
+ public boolean matches(EObject eObject) {
+
+ boolean isFlowPort = false;
+ if (eObject instanceof Port) {
+
+ Port port = (Port) eObject;
+ if (UMLUtil.getStereotypeApplication(port, FlowPort.class) != null) {
+ isFlowPort = true;
+ }
+ }
+ return isFlowPort;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/FlowPortNAMatcher.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/FlowPortNAMatcher.java
new file mode 100755
index 0000000..4c1aa83
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/FlowPortNAMatcher.java
@@ -0,0 +1,39 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.matcher;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher;
+import org.eclipse.papyrus.sysml.portandflows.FlowPort;
+import org.eclipse.uml2.uml.Port;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+/**
+ * Test if current {@link Port} is a non atomic {@link FlowPort}.
+ */
+public class FlowPortNAMatcher implements IElementMatcher {
+
+ public boolean matches(EObject eObject) {
+
+ boolean isFlowPort_NA = false;
+
+ if (eObject instanceof Port) {
+
+ Port port = (Port) eObject;
+ FlowPort flowPort = UMLUtil.getStereotypeApplication(port, FlowPort.class);
+
+ if ((flowPort != null) && (!flowPort.isAtomic())) {
+ isFlowPort_NA = true;
+ }
+ }
+
+ return isFlowPort_NA;
+ }
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/FlowPortOutMatcher.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/FlowPortOutMatcher.java
new file mode 100755
index 0000000..6439f06
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/FlowPortOutMatcher.java
@@ -0,0 +1,40 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.matcher;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher;
+import org.eclipse.papyrus.sysml.portandflows.FlowDirection;
+import org.eclipse.papyrus.sysml.portandflows.FlowPort;
+import org.eclipse.uml2.uml.Port;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+/**
+ * Test if current {@link Port} is a {@link FlowPort} with OUT direction
+ */
+public class FlowPortOutMatcher implements IElementMatcher {
+
+ public boolean matches(EObject eObject) {
+
+ boolean isFlowPort_OUT = false;
+
+ if (eObject instanceof Port) {
+
+ Port port = (Port) eObject;
+ FlowPort flowPort = UMLUtil.getStereotypeApplication(port, FlowPort.class);
+
+ if ((flowPort != null) && (flowPort.getDirection() == FlowDirection.OUT)) {
+ isFlowPort_OUT = true;
+ }
+ }
+
+ return isFlowPort_OUT;
+ }
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/FlowPropertyMatcher.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/FlowPropertyMatcher.java
new file mode 100755
index 0000000..d275b76
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/FlowPropertyMatcher.java
@@ -0,0 +1,44 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 2016 CEA LIST, Esterel technologies SAS and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Alain Le Guennec (Esterel technologies SAS) - Bug 497455
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.matcher;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher;
+import org.eclipse.papyrus.sysml.portandflows.FlowProperty;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Interface;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+/**
+ * Test if current {@link Property} is a {@link FlowProperty}
+ */
+public class FlowPropertyMatcher implements IElementMatcher {
+
+ public boolean matches(EObject eObject) {
+
+ boolean isFlowProperty = false;
+ if (eObject instanceof Property) {
+
+ Property element = (Property) eObject;
+ Element owner = (Element) element.eContainer();
+ if ((owner == null || owner instanceof Interface || owner instanceof Class) && UMLUtil.getStereotypeApplication(element, FlowProperty.class) != null) {
+ isFlowProperty = true;
+ }
+ }
+ return isFlowProperty;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/FlowSpecificationMatcher.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/FlowSpecificationMatcher.java
new file mode 100755
index 0000000..179f151
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/FlowSpecificationMatcher.java
@@ -0,0 +1,36 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.matcher;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher;
+import org.eclipse.papyrus.sysml.portandflows.FlowSpecification;
+import org.eclipse.uml2.uml.Interface;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+/**
+ * Test if current {@link Interface} is a {@link FlowSpecification}
+ */
+public class FlowSpecificationMatcher implements IElementMatcher {
+
+ public boolean matches(EObject eObject) {
+
+ boolean isFlowSpec = false;
+ if (eObject instanceof Interface) {
+
+ Interface element = (Interface) eObject;
+ if (UMLUtil.getStereotypeApplication(element, FlowSpecification.class) != null) {
+ isFlowSpec = true;
+ }
+ }
+ return isFlowSpec;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/ItemFlowMatcher.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/ItemFlowMatcher.java
new file mode 100755
index 0000000..bf7b520
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/ItemFlowMatcher.java
@@ -0,0 +1,36 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.matcher;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher;
+import org.eclipse.papyrus.sysml.portandflows.ItemFlow;
+import org.eclipse.uml2.uml.InformationFlow;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+/**
+ * Test if current {@link InformationFlow} is a {@link ItemFlow}
+ */
+public class ItemFlowMatcher implements IElementMatcher {
+
+ public boolean matches(EObject eObject) {
+
+ boolean isMatch = false;
+ if (eObject instanceof InformationFlow) {
+
+ InformationFlow element = (InformationFlow) eObject;
+ if (UMLUtil.getStereotypeApplication(element, ItemFlow.class) != null) {
+ isMatch = true;
+ }
+ }
+ return isMatch;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/NoMatcher.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/NoMatcher.java
new file mode 100755
index 0000000..bba0c0c
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/NoMatcher.java
@@ -0,0 +1,25 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.matcher;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+
+/**
+ * This matcher can be used to avoid {@link IElementType} to interfere in commands.
+ */
+public class NoMatcher implements IElementMatcher {
+
+ public boolean matches(EObject eObject) {
+ return false;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/PartPropertyMatcher.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/PartPropertyMatcher.java
new file mode 100755
index 0000000..b5c8fcd
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/PartPropertyMatcher.java
@@ -0,0 +1,54 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 2016 CEA LIST, Esterel technologies SAS and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Alain Le Guennec (Esterel technologies SAS) - Bug 497455
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.matcher;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher;
+import org.eclipse.papyrus.sysml.blocks.Block;
+import org.eclipse.uml2.uml.AggregationKind;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.Port;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Type;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+/**
+ * Test if current {@link Property} is a {@link Block} Part
+ */
+public class PartPropertyMatcher implements IElementMatcher {
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean matches(EObject eObject) {
+
+ boolean isMatch = false;
+ if ((eObject instanceof Property) && !(eObject instanceof Port)) {
+
+ Property element = (Property) eObject;
+
+ // The property is necessary a composition and has a type
+ Type type = element.getType();
+ if ((type != null) && (element.getAggregation() == AggregationKind.COMPOSITE_LITERAL)) {
+
+ // Moreover its type has to be a Block
+ if (type instanceof Class && UMLUtil.getStereotypeApplication(type, Block.class) != null) {
+ isMatch = true;
+ }
+ }
+ }
+ return isMatch;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/ProblemMatcher.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/ProblemMatcher.java
new file mode 100755
index 0000000..2bd4ac5
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/ProblemMatcher.java
@@ -0,0 +1,36 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.matcher;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher;
+import org.eclipse.papyrus.sysml.modelelements.Problem;
+import org.eclipse.uml2.uml.Comment;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+/**
+ * Test if current {@link Comment} is a {@link Problem}
+ */
+public class ProblemMatcher implements IElementMatcher {
+
+ public boolean matches(EObject eObject) {
+
+ boolean isMatch = false;
+ if (eObject instanceof Comment) {
+
+ Comment element = (Comment) eObject;
+ if (UMLUtil.getStereotypeApplication(element, Problem.class) != null) {
+ isMatch = true;
+ }
+ }
+ return isMatch;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/RationaleMatcher.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/RationaleMatcher.java
new file mode 100755
index 0000000..a21b5a1
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/RationaleMatcher.java
@@ -0,0 +1,36 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.matcher;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher;
+import org.eclipse.papyrus.sysml.modelelements.Rationale;
+import org.eclipse.uml2.uml.Comment;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+/**
+ * Test if current {@link Comment} is a {@link Rationale}
+ */
+public class RationaleMatcher implements IElementMatcher {
+
+ public boolean matches(EObject eObject) {
+
+ boolean isMatch = false;
+ if (eObject instanceof Comment) {
+
+ Comment element = (Comment) eObject;
+ if (UMLUtil.getStereotypeApplication(element, Rationale.class) != null) {
+ isMatch = true;
+ }
+ }
+ return isMatch;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/ReferencePropertyMatcher.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/ReferencePropertyMatcher.java
new file mode 100755
index 0000000..bddd922
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/ReferencePropertyMatcher.java
@@ -0,0 +1,54 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 2016 CEA LIST, Esterel technologies SAS and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Alain Le Guennec (Esterel technologies SAS) - Bug 497455
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.matcher;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher;
+import org.eclipse.papyrus.sysml.blocks.Block;
+import org.eclipse.uml2.uml.AggregationKind;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.Port;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Type;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+/**
+ * Test if current {@link Property} is a {@link Block} Reference
+ */
+public class ReferencePropertyMatcher implements IElementMatcher {
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean matches(EObject eObject) {
+
+ boolean isMatch = false;
+ if ((eObject instanceof Property) && !(eObject instanceof Port)) {
+
+ Property element = (Property) eObject;
+
+ // The property is not a composition and has a type
+ Type type = element.getType();
+ if ((type != null) && (element.getAggregation() != AggregationKind.COMPOSITE_LITERAL)) {
+
+ // Moreover its type has to be a Block
+ if (type instanceof Class && UMLUtil.getStereotypeApplication(type, Block.class) != null) {
+ isMatch = true;
+ }
+ }
+ }
+ return isMatch;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/RequirementMatcher.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/RequirementMatcher.java
new file mode 100755
index 0000000..f0038ab
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/RequirementMatcher.java
@@ -0,0 +1,36 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.matcher;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher;
+import org.eclipse.papyrus.sysml.requirements.Requirement;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+/**
+ * Test if current {@link Class} is a {@link Requirement}
+ */
+public class RequirementMatcher implements IElementMatcher {
+
+ public boolean matches(EObject eObject) {
+
+ boolean isMatch = false;
+ if (eObject instanceof Class) {
+
+ Class element = (Class) eObject;
+ if (UMLUtil.getStereotypeApplication(element, Requirement.class) != null) {
+ isMatch = true;
+ }
+ }
+ return isMatch;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/SatisfyMatcher.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/SatisfyMatcher.java
new file mode 100755
index 0000000..8a868a8
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/SatisfyMatcher.java
@@ -0,0 +1,36 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.matcher;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher;
+import org.eclipse.papyrus.sysml.requirements.Satisfy;
+import org.eclipse.uml2.uml.Abstraction;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+/**
+ * Test if current {@link Abstraction} is a {@link Satisfy}
+ */
+public class SatisfyMatcher implements IElementMatcher {
+
+ public boolean matches(EObject eObject) {
+
+ boolean isMatch = false;
+ if (eObject instanceof Abstraction) {
+
+ Abstraction element = (Abstraction) eObject;
+ if (UMLUtil.getStereotypeApplication(element, Satisfy.class) != null) {
+ isMatch = true;
+ }
+ }
+ return isMatch;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/UnitMatcher.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/UnitMatcher.java
new file mode 100755
index 0000000..fedf590
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/UnitMatcher.java
@@ -0,0 +1,36 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.matcher;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher;
+import org.eclipse.papyrus.sysml.blocks.Unit;
+import org.eclipse.uml2.uml.InstanceSpecification;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+/**
+ * Test if current {@link InstanceSpecification} is a {@link Unit}
+ */
+public class UnitMatcher implements IElementMatcher {
+
+ public boolean matches(EObject eObject) {
+
+ boolean isMatch = false;
+ if (eObject instanceof InstanceSpecification) {
+
+ InstanceSpecification element = (InstanceSpecification) eObject;
+ if (UMLUtil.getStereotypeApplication(element, Unit.class) != null) {
+ isMatch = true;
+ }
+ }
+ return isMatch;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/ValuePropertyMatcher.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/ValuePropertyMatcher.java
new file mode 100755
index 0000000..73d4d9d
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/ValuePropertyMatcher.java
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.matcher;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher;
+import org.eclipse.papyrus.sysml.blocks.ValueType;
+import org.eclipse.uml2.uml.AggregationKind;
+import org.eclipse.uml2.uml.DataType;
+import org.eclipse.uml2.uml.Port;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+/**
+ * Test if current {@link Property} is a value.
+ */
+public class ValuePropertyMatcher implements IElementMatcher {
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean matches(EObject eObject) {
+
+ boolean isMatch = false;
+ if ((eObject instanceof Property) && !(eObject instanceof Port)) {
+
+ Property element = (Property) eObject;
+
+ // The property is necessary a composition and has a type
+ if ((element.getType() != null) && (element.getAggregation() == AggregationKind.COMPOSITE_LITERAL)) {
+
+ // Moreover its type has either to be a DataType or a ValueType
+ if (UMLUtil.getStereotypeApplication(element.getType(), ValueType.class) != null) {
+ isMatch = true;
+ }
+ if (element.getType() instanceof DataType) {
+ isMatch = true;
+ }
+ }
+ }
+ return isMatch;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/ValueTypeEnumerationMatcher.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/ValueTypeEnumerationMatcher.java
new file mode 100755
index 0000000..febdee4
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/ValueTypeEnumerationMatcher.java
@@ -0,0 +1,36 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.matcher;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher;
+import org.eclipse.papyrus.sysml.blocks.ValueType;
+import org.eclipse.uml2.uml.Enumeration;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+/**
+ * Test if current {@link Enumeration} is a {@link ValueType}
+ */
+public class ValueTypeEnumerationMatcher implements IElementMatcher {
+
+ public boolean matches(EObject eObject) {
+
+ boolean isMatch = false;
+ if (eObject instanceof Enumeration) {
+
+ Enumeration element = (Enumeration) eObject;
+ if (UMLUtil.getStereotypeApplication(element, ValueType.class) != null) {
+ isMatch = true;
+ }
+ }
+ return isMatch;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/ValueTypeMatcher.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/ValueTypeMatcher.java
new file mode 100755
index 0000000..9339bbc
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/ValueTypeMatcher.java
@@ -0,0 +1,36 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.matcher;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher;
+import org.eclipse.papyrus.sysml.blocks.ValueType;
+import org.eclipse.uml2.uml.DataType;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+/**
+ * Test if current {@link DataType} is a {@link ValueType}
+ */
+public class ValueTypeMatcher implements IElementMatcher {
+
+ public boolean matches(EObject eObject) {
+
+ boolean isMatch = false;
+ if (eObject instanceof DataType) {
+
+ DataType element = (DataType) eObject;
+ if (UMLUtil.getStereotypeApplication(element, ValueType.class) != null) {
+ isMatch = true;
+ }
+ }
+ return isMatch;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/ValueTypePrimitiveTypeMatcher.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/ValueTypePrimitiveTypeMatcher.java
new file mode 100755
index 0000000..6ee4e2d
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/ValueTypePrimitiveTypeMatcher.java
@@ -0,0 +1,36 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.matcher;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher;
+import org.eclipse.papyrus.sysml.blocks.ValueType;
+import org.eclipse.uml2.uml.PrimitiveType;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+/**
+ * Test if current {@link PrimitiveType} is a {@link ValueType}
+ */
+public class ValueTypePrimitiveTypeMatcher implements IElementMatcher {
+
+ public boolean matches(EObject eObject) {
+
+ boolean isMatch = false;
+ if (eObject instanceof PrimitiveType) {
+
+ PrimitiveType element = (PrimitiveType) eObject;
+ if (UMLUtil.getStereotypeApplication(element, ValueType.class) != null) {
+ isMatch = true;
+ }
+ }
+ return isMatch;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/VerifyMatcher.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/VerifyMatcher.java
new file mode 100755
index 0000000..bddfdbf
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/VerifyMatcher.java
@@ -0,0 +1,36 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.matcher;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher;
+import org.eclipse.papyrus.sysml.requirements.Verify;
+import org.eclipse.uml2.uml.Abstraction;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+/**
+ * Test if current {@link Abstraction} is a {@link Verify}
+ */
+public class VerifyMatcher implements IElementMatcher {
+
+ public boolean matches(EObject eObject) {
+
+ boolean isMatch = false;
+ if (eObject instanceof Abstraction) {
+
+ Abstraction element = (Abstraction) eObject;
+ if (UMLUtil.getStereotypeApplication(element, Verify.class) != null) {
+ isMatch = true;
+ }
+ }
+ return isMatch;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/ViewMatcher.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/ViewMatcher.java
new file mode 100755
index 0000000..4fe1ce0
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/ViewMatcher.java
@@ -0,0 +1,36 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.matcher;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher;
+import org.eclipse.papyrus.sysml.modelelements.View;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+/**
+ * Test if current {@link Package} is a {@link View}
+ */
+public class ViewMatcher implements IElementMatcher {
+
+ public boolean matches(EObject eObject) {
+
+ boolean isMatch = false;
+ if (eObject instanceof Package) {
+
+ Package element = (Package) eObject;
+ if (UMLUtil.getStereotypeApplication(element, View.class) != null) {
+ isMatch = true;
+ }
+ }
+ return isMatch;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/ViewPointMatcher.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/ViewPointMatcher.java
new file mode 100755
index 0000000..dcdb6f0
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/matcher/ViewPointMatcher.java
@@ -0,0 +1,36 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.matcher;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher;
+import org.eclipse.papyrus.sysml.modelelements.ViewPoint;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+/**
+ * Test if current {@link org.eclipse.uml2.uml.Class} is a {@link ViewPoint}
+ */
+public class ViewPointMatcher implements IElementMatcher {
+
+ public boolean matches(EObject eObject) {
+
+ boolean isMatch = false;
+ if (eObject instanceof Class) {
+
+ Class element = (Class) eObject;
+ if (UMLUtil.getStereotypeApplication(element, ViewPoint.class) != null) {
+ isMatch = true;
+ }
+ }
+ return isMatch;
+ }
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/menu/AbstractCreateSysmlChildMenu.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/menu/AbstractCreateSysmlChildMenu.java
new file mode 100755
index 0000000..ac1eed2
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/menu/AbstractCreateSysmlChildMenu.java
@@ -0,0 +1,32 @@
+/*****************************************************************************
+ * 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:
+ * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.menu;
+
+import org.eclipse.papyrus.infra.ui.util.AbstractCreateMenuFromCommandCategory;
+
+
+/**
+ * Abstract menu for the creation of Sysml elements
+ */
+public abstract class AbstractCreateSysmlChildMenu extends AbstractCreateMenuFromCommandCategory {
+
+ /** the cateogory of the command used to create SysML elements */
+ public static final String SYSML_CREATION_COMMAND_CATEGORY = "org.eclipse.papyrus.sysml.service.types.sysmlElementCreationCommands"; //$NON-NLS-1$
+
+ /**
+ * Constructor.
+ *
+ */
+ public AbstractCreateSysmlChildMenu() {
+ super(SYSML_CREATION_COMMAND_CATEGORY);
+ }
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/stereotype/helper/advice/BlockEditHelperAdvice.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/stereotype/helper/advice/BlockEditHelperAdvice.java
new file mode 100755
index 0000000..9839dc1
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/stereotype/helper/advice/BlockEditHelperAdvice.java
@@ -0,0 +1,134 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.stereotype.helper.advice;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
+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.SetRequest;
+import org.eclipse.papyrus.sysml.blocks.Block;
+import org.eclipse.papyrus.sysml.blocks.BlocksPackage;
+import org.eclipse.papyrus.sysml.blocks.NestedConnectorEnd;
+import org.eclipse.uml2.uml.Connector;
+import org.eclipse.uml2.uml.ConnectorEnd;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * <pre>
+ * This advice is used to remove inconsistent {@link Connector} when a related {@link Block}
+ * is set as encapsulated ({@link Block#isEncapsulated()} property).
+ * </pre>
+ */
+public class BlockEditHelperAdvice extends AbstractEditHelperAdvice {
+
+ /**
+ * <pre>
+ * {@inheritDoc}
+ *
+ * Returns the command to destroy any {@link Connector} breaking encapsulation rules.
+ * </pre>
+ *
+ * @param request
+ * the request to modify the model
+ * @return
+ * the command to destroy the views of the parts which are not owned by the new type
+ *
+ */
+ @Override
+ protected ICommand getBeforeSetCommand(SetRequest request) {
+ ICommand setCommand = super.getBeforeSetCommand(request);
+ Set<Connector> connectorToDelete = new HashSet<Connector>();
+
+ EObject elementToEdit = request.getElementToEdit();
+ if ((elementToEdit instanceof Block) && (request.getFeature() == BlocksPackage.eINSTANCE.getBlock_IsEncapsulated())) {
+
+ Block blockApp = (Block) elementToEdit;
+ Boolean setAsEncapsulated = (request.getValue() instanceof Boolean) ? (Boolean) request.getValue() : false;
+ if (!blockApp.isEncapsulated() && setAsEncapsulated) {
+
+ for (Property property : getPropertyTypedByBlock(blockApp)) {
+ for (NestedConnectorEnd nestedEnd : getRelatedNestedConnectorEnd(property)) {
+ ConnectorEnd end = nestedEnd.getBase_ConnectorEnd();
+ Connector connector = (end != null) ? (Connector) end.eContainer() : null;
+ if (connector != null) {
+ connectorToDelete.add(connector);
+ }
+ }
+ }
+ }
+ }
+
+ // Add connector destroy command if needed
+ if (!(connectorToDelete.isEmpty())) {
+ DestroyDependentsRequest req = new DestroyDependentsRequest(request.getEditingDomain(), elementToEdit, false);
+ req.setClientContext(request.getClientContext());
+ req.addParameters(request.getParameters());
+ ICommand connectorDestroyCommand = req.getDestroyDependentsCommand(connectorToDelete);
+ if (connectorDestroyCommand != null) {
+ setCommand = CompositeCommand.compose(connectorDestroyCommand, setCommand);
+ }
+ }
+
+ return setCommand;
+ }
+
+ /**
+ * Get any {@link Property} typed by the given {@link Block} (its base class).
+ *
+ * @param block
+ * the block.
+ * @return a collection of {@link Property}
+ */
+ private Collection<Property> getPropertyTypedByBlock(Block block) {
+ EReference[] eRefs = new EReference[] { UMLPackage.eINSTANCE.getTypedElement_Type() };
+
+ Collection<?> references = EMFCoreUtil.getReferencers(block.getBase_Class(), eRefs);
+ List<Property> propertyReferences = new LinkedList<Property>();
+ for (Object reference : references) {
+ if (reference instanceof Property) {
+ propertyReferences.add((Property) reference);
+ }
+ }
+
+ return propertyReferences;
+ }
+
+ /**
+ * Get any {@link NestedConnectorEnd} stereotype application that holds the property in its path.
+ *
+ * @param property
+ * the property that should be in the path.
+ * @return a collection of {@link NestedConnectorEnd}
+ */
+ @SuppressWarnings("unchecked")
+ private Collection<NestedConnectorEnd> getRelatedNestedConnectorEnd(Property property) {
+ EReference[] eRefs = new EReference[] { BlocksPackage.eINSTANCE.getNestedConnectorEnd_PropertyPath() };
+
+ Collection<NestedConnectorEnd> references = EMFCoreUtil.getReferencers(property, eRefs);
+ return (references != null) ? references : Collections.unmodifiableList(new ArrayList<NestedConnectorEnd>());
+ }
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/utils/ConnectorUtils.java b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/utils/ConnectorUtils.java
new file mode 100755
index 0000000..3d91efa
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/utils/ConnectorUtils.java
@@ -0,0 +1,505 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.utils;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature.Setting;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.blocks.Block;
+import org.eclipse.papyrus.sysml.blocks.NestedConnectorEnd;
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
+import org.eclipse.uml2.uml.ConnectableElement;
+import org.eclipse.uml2.uml.Connector;
+import org.eclipse.uml2.uml.ConnectorEnd;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.Port;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Stereotype;
+import org.eclipse.uml2.uml.StructuredClassifier;
+import org.eclipse.uml2.uml.Type;
+import org.eclipse.uml2.uml.TypedElement;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+/**
+ * Utility class for Connector edit helpers.
+ */
+public class ConnectorUtils extends org.eclipse.papyrus.uml.service.types.utils.ConnectorUtils {
+
+ /**
+ * the key used to store the nested path as parameter of the request. The value will be a List of {@link Property}
+ */
+ public static String NESTED_CONNECTOR_END_PATH = "connectorEndPath"; //$NON-NLS-1$
+
+ /** the separator used in the role path to distinguish the part. */
+ public static final String PART_SEPARATOR = "."; //$NON-NLS-1$
+
+ /** allow to know if a string contains others characters than a-z A-Z 0-9 and _. */
+ public static final String HAS_NO_WORD_CHAR_REGEX = "\\W+";
+
+ /** String used to delimit a name with contains special chars. */
+ public static final String STRING_DELIMITER = "\'";
+
+ /**
+ * Gets the encapsulated container.
+ *
+ * @param view
+ * the view
+ * @return the nearest encapsulated structure container or null
+ */
+ public View getEncapsulatedContainer(View view) {
+ View encapsulatedContainer = null;
+
+ for (View containerView : getStructureContainers(view)) {
+
+ if (view == containerView) {
+ continue;
+ }
+
+ if ((view.getElement() instanceof Port) && (containerView.getChildren().contains(view))) {
+ continue;
+ }
+
+ StructuredClassifier structuredClassifier = getStructuredClassifier(containerView);
+ Block block = UMLUtil.getStereotypeApplication(structuredClassifier, Block.class);
+ if (block.isEncapsulated()) {
+ encapsulatedContainer = containerView;
+ break;
+ }
+ }
+
+ return encapsulatedContainer;
+ }
+
+ /**
+ * Test if an encapsulation crossing is required to connect the checked end to the opposite end.
+ *
+ * @param checkedEnd
+ * the checked end view.
+ * @param oppositeEnd
+ * the opposite end view.
+ * @return true if the gesture break encapsulation rule.
+ */
+ public boolean isCrossingEncapsulation(View checkedEnd, View oppositeEnd) {
+ boolean isCrossingEncapsulation = false;
+
+ View encapsulatedContainer = new ConnectorUtils().getEncapsulatedContainer(checkedEnd);
+ if (encapsulatedContainer != null) {
+ View containerView = new ConnectorUtils().deduceViewContainer(checkedEnd, oppositeEnd);
+ List<View> containers = new ConnectorUtils().getStructureContainers(checkedEnd);
+
+ if (containers.indexOf(encapsulatedContainer) < containers.indexOf(containerView)) {
+ isCrossingEncapsulation = true;
+ }
+ }
+
+ return isCrossingEncapsulation;
+ }
+
+ /**
+ * Get the path of structure views crossed by the checked end.
+ *
+ * @param checkedEnd
+ * the checked end view.
+ * @param oppositeEnd
+ * the opposite end view.
+ * @return the list of crossed structure views.
+ */
+ public List<View> getNestedPath(View checkedEnd, View oppositeEnd) {
+ List<View> isNestedConnectableElement = new ArrayList<View>();
+
+ View nearestContainer = new ConnectorUtils().getNearestStructureContainer(checkedEnd);
+ if (nearestContainer != null) {
+ View containerView = new ConnectorUtils().deduceViewContainer(checkedEnd, oppositeEnd);
+ List<View> containers = new ConnectorUtils().getStructureContainers(checkedEnd);
+
+ if (containers.indexOf(nearestContainer) < containers.indexOf(containerView)) {
+ isNestedConnectableElement = containers.subList(containers.indexOf(nearestContainer), containers.indexOf(containerView));
+ }
+ }
+
+ // nested path is taken from the top block to the deepest property ==> collection must be reverted
+ Collections.reverse(isNestedConnectableElement);
+
+ return isNestedConnectableElement;
+ }
+
+ /**
+ * Get the path of structure views crossed by the checked end.
+ *
+ * @param checkedEnd
+ * the checked end view.
+ * @param oppositeEnd
+ * the opposite end view.
+ * @return the list of crossed structure views.
+ */
+ public List<Property> getNestedPropertyPath(View checkedEnd, View oppositeEnd) {
+ List<Property> nestedPropertyPath = new ArrayList<Property>();
+ List<View> nestedPath = getNestedPath(checkedEnd, oppositeEnd);
+
+ for (View view : nestedPath) {
+ if ((view.getElement() != null) && (view.getElement() instanceof Property)) {
+ nestedPropertyPath.add((Property) view.getElement());
+ }
+ }
+
+ // if end is a port, and the list is not empty, add the property from the check view in the list
+ if (!nestedPropertyPath.isEmpty() && checkedEnd.getElement() instanceof Port) {
+ Property partWithPort = getPartWithPort(checkedEnd, oppositeEnd);
+ if (partWithPort != null) {
+ nestedPropertyPath.add(partWithPort);
+ }
+ }
+
+ return nestedPropertyPath;
+ }
+
+ /**
+ * Test if the checked end is nested (means it cross StructuredClassifier borders).
+ *
+ * @param checkedEnd
+ * the checked end view.
+ * @param oppositeEnd
+ * the opposite end view.
+ * @return true if the checked end is nested.
+ */
+ public boolean isNestedConnectableElement(View checkedEnd, View oppositeEnd) {
+ return !(getNestedPath(checkedEnd, oppositeEnd).isEmpty());
+ }
+
+ /**
+ * Gets the nearest structure container.
+ *
+ * @param view
+ * the view
+ * @return the nearest structure container or null
+ */
+ public View getNearestStructureContainer(View view) {
+ View nearestStructureContainer = null;
+
+ for (View containerView : getStructureContainers(view)) {
+
+ if (view == containerView) {
+ continue;
+ }
+
+ if ((view.getElement() instanceof Port) && (containerView.getChildren().contains(view))) {
+ continue;
+ }
+
+ nearestStructureContainer = containerView;
+ break;
+ }
+
+ return nearestStructureContainer;
+ }
+
+
+
+ /**
+ * Gets the role path.
+ *
+ * @param end
+ * the connector end
+ * @return the role path
+ * the path for the role of the connector end (without using label provider)
+ */
+ public static final String getRolePath(final ConnectorEnd end) {
+ final NestedConnectorEnd nestedConnectorEnd = UMLUtil.getStereotypeApplication(end, NestedConnectorEnd.class);
+ final ConnectableElement role = end.getRole();
+ final StringBuilder rolePath = new StringBuilder();
+ if (role != null) {
+ if (nestedConnectorEnd != null) {
+ final List<Property> properties = nestedConnectorEnd.getPropertyPath();
+ for (final Property current : properties) {
+ rolePath.append(getNameWithQuotes(current));
+ rolePath.append(ConnectorUtils.PART_SEPARATOR);
+ }
+ } else {
+ // when the stereotype is applied, the Property for partWithPort is included in the stereotype#path
+ final Property partWithPort = end.getPartWithPort();
+ if (partWithPort != null) {
+ rolePath.append(getNameWithQuotes(partWithPort));
+ rolePath.append(ConnectorUtils.PART_SEPARATOR);
+ }
+ }
+ rolePath.append(getNameWithQuotes(role));
+ }
+
+ return rolePath.toString();
+ }
+
+ /**
+ * Gets the name with quotes.
+ *
+ * @param property
+ * a property
+ * @return the name with quotes
+ * the property name with name delimiter if it is required
+ */
+ public static final String getNameWithQuotes(final NamedElement property) {
+ final String partName = UMLLabelInternationalization.getInstance().getLabel(property);
+ final StringBuffer partNameBuffer = new StringBuffer();
+ final Pattern pattern = Pattern.compile(ConnectorUtils.HAS_NO_WORD_CHAR_REGEX);
+ final Matcher matcher = pattern.matcher(partName);
+ boolean mustHaveQuote = false;
+ while (matcher.find() && !mustHaveQuote) {
+ mustHaveQuote = true;
+ }
+ if (mustHaveQuote) {
+ partNameBuffer.append(ConnectorUtils.STRING_DELIMITER);
+ partNameBuffer.append(partName);
+ partNameBuffer.append(ConnectorUtils.STRING_DELIMITER);
+ } else {
+ partNameBuffer.append(partName);
+ }
+
+ return partNameBuffer.toString();
+ }
+
+ /**
+ * Checks if is crossing encapsulation.
+ *
+ * @param nestedPath
+ * the nested path
+ * @return true, if is crossing encapsulation <code>true</code> if we are breaking encapsulation (see SysML rules in SysML Standard 1.2, p.44):
+ * isEncapsulated: Boolean [0..1] If true, then the block is treated as a black box; a part typed by this black box can only be connected
+ * via its ports or directly to its outer boundary. If false, or if a value is not present, then connections can be established to
+ * elements of its internal structure via deep-nested connector ends.
+ */
+ public static final boolean isCrossingEncapuslation(final List<Property> nestedPath) {
+ for (final Property current : nestedPath) {
+ final Type type = current.getType();
+ if (type != null) {
+ final Block block = UMLUtil.getStereotypeApplication(type, Block.class);
+ if (block != null && block.isEncapsulated()) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Can display existing connector between views according to nested paths.
+ *
+ * @param connector
+ * a connector existing in the model
+ * @param sourceView
+ * a potential source for this connector
+ * @param targetView
+ * a potential target for this connector
+ * @return true, if successful <code>true</code> if displaying the existing connector between this source and this target view is correct
+ */
+ public static boolean canDisplayExistingConnectorBetweenViewsAccordingToNestedPaths(final Connector connector, final View sourceView, final View targetView) {
+ ConnectorUtils utils = new ConnectorUtils();
+ final List<Property> sourcePath = utils.getNestedPropertyPath(sourceView, targetView);
+ final List<Property> targetPath = utils.getNestedPropertyPath(targetView, sourceView);
+ boolean hasWantedPath = true;
+ for (final ConnectorEnd end : connector.getEnds()) {
+ if (sourceView != null && end.getRole() == sourceView.getElement()) {
+ hasWantedPath = hasWantedPath && haveSamePath(sourcePath, end);
+ } else if (targetView != null && end.getRole() == targetView.getElement()) {
+ hasWantedPath = hasWantedPath && haveSamePath(targetPath, end);
+ }
+ }
+ return hasWantedPath;
+ }
+
+
+
+ /**
+ * Have same path.
+ *
+ * @param wantedPath
+ * the wanted nested path for the end
+ * @param end
+ * an end
+ * @return true, if successful
+ * true if the end has as nested path THE wanted path
+ */
+ protected static boolean haveSamePath(final List<Property> wantedPath, final ConnectorEnd end) {
+ Stereotype ste = end.getAppliedStereotype("SysML::Blocks::NestedConnectorEnd");//$NON-NLS-1$
+ if (ste != null) {
+ final NestedConnectorEnd nestedConnectorEnd = (NestedConnectorEnd) end.getStereotypeApplication(ste);
+ return nestedConnectorEnd.getPropertyPath().equals(wantedPath);
+ } else {
+ return wantedPath.isEmpty();
+ }
+ }
+
+
+
+ /**
+ * Can display existing connector between views according to partWithPort.
+ *
+ * @param connector
+ * the connector
+ * @param sourceView
+ * the source view
+ * @param targetView
+ * the target view
+ * @return true, if successful
+ */
+ public boolean canDisplayExistingConnectorBetweenViewsAccordingToPartWithPort(final Connector connector, final View sourceView, final View targetView) {
+ Property partWithPort = getPartWithPortFromConnector(connector);
+ if (partWithPort != null) {
+ String partWithPortName = partWithPort.getName();
+ Type partWithPortType = partWithPort.getType();
+ EObject sourceContainer = ((View) sourceView.eContainer()).getElement();
+ EObject targetContainer = ((View) targetView.eContainer()).getElement();
+
+ boolean sameSourceType = false;
+ if (sourceContainer instanceof TypedElement) {
+ sameSourceType = partWithPortType.conformsTo(((TypedElement) sourceContainer).getType());
+ }
+ boolean sameSourceName = partWithPortName.equals(((NamedElement) sourceContainer).getName());
+
+ boolean sameTargetType = false;
+ if (targetContainer instanceof TypedElement) {
+ sameTargetType = partWithPortType.conformsTo(((TypedElement) targetContainer).getType());
+ }
+ boolean sametargetName = partWithPortName.equals(((NamedElement) targetContainer).getName());
+
+ return (sameSourceType && sameSourceName) || (sameTargetType && sametargetName);
+ }
+ return true;
+ }
+
+ /**
+ * Gets the partWithPort from the connector.
+ *
+ * @param connector
+ * the connector
+ * @return the part with port from connector
+ */
+ public Property getPartWithPortFromConnector(final Connector connector) {
+ if (connector != null && connector.getEnds() != null) {
+ for (final ConnectorEnd end : connector.getEnds()) {
+ Property partWithPort = end.getPartWithPort();
+ if (partWithPort != null) {
+ return partWithPort;
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Test if the relationship creation is allowed.
+ *
+ * @param source
+ * the relationship source can be null
+ * @param target
+ * the relationship target can be null
+ * @param sourceView
+ * the relationship graphical source can be null
+ * @param targetView
+ * the relationship graphical target can be null
+ * @return true if the creation is allowed
+ */
+ public static boolean canCreate(EObject source, EObject target, View sourceView, View targetView) {
+
+ if ((source != null) && !(source instanceof ConnectableElement)) {
+ return false;
+ }
+
+ if ((target != null) && !(target instanceof ConnectableElement)) {
+ return false;
+ }
+
+ if ((sourceView != null) && (targetView != null)) {
+ // Allow to create a self connector on a view
+ // if(sourceView == targetView) {
+ // return false;
+ // }
+
+ // Cannot create a connector from a view representing a Part to its own Port (or the opposite)
+ if ((sourceView.getChildren().contains(targetView)) || (targetView.getChildren().contains(sourceView))) {
+ return false;
+ }
+
+ // Cannot connect a Part to one of its (possibly indirect) containment, must connect to one of its Port.
+ if (new ConnectorUtils().getStructureContainers(sourceView).contains(targetView) || new ConnectorUtils().getStructureContainers(targetView).contains(sourceView)) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+
+
+ /**
+ * Filter connectors that have this property in their <NestedConnectorEnd> property path.
+ *
+ * @param connectors
+ * @param part
+ * @return connectors that have this property in their <NestedConnectorEnd> property path.
+ */
+ public static List<Connector> filterConnectorByPropertyInNestedConnectorEnd(List<Connector> connectors, Property part) {
+ List<Connector> res = new ArrayList<Connector>();
+ for (Connector connector : connectors) {
+ EList<ConnectorEnd> ends = connector.getEnds();
+ for (ConnectorEnd connectorEnd : ends) {
+ NestedConnectorEnd stereotypeApplication = UMLUtil.getStereotypeApplication(connectorEnd, NestedConnectorEnd.class);
+ if (stereotypeApplication != null) {
+ EList<Property> propertyPath = stereotypeApplication.getPropertyPath();
+ for (Property property : propertyPath) {
+ if (property.equals(part)) {
+ res.add(connector);
+ }
+ }
+ }
+ }
+ }
+ return res;
+ }
+
+ /**
+ * Filter connectors that have this property in their <NestedConnectorEnd> property path.
+ *
+ * @param inverseReferences
+ * All the references towards part
+ * @param part
+ *
+ * @return connectors that have this property in their <NestedConnectorEnd> property path.
+ */
+ public static List<Connector> filterConnectorByPropertyInNestedConnectorEnd(Collection<Setting> inverseReferences, Property part) {
+ Set<Connector> result = new HashSet<Connector>();
+ for (Setting setting : inverseReferences) {
+ EObject referent = setting.getEObject();
+ if (referent instanceof NestedConnectorEnd) {
+ NestedConnectorEnd stereotypeApplication = (NestedConnectorEnd) referent;
+ if (stereotypeApplication.getPropertyPath().contains(part)) {
+ ConnectorEnd end = stereotypeApplication.getBase_ConnectorEnd();
+ if (end != null && end.getOwner() instanceof Connector) {
+ result.add((Connector) end.getOwner());
+ }
+ }
+ }
+ }
+ return new ArrayList<Connector>(result);
+ }
+
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml.service.types/xmlElementTypes.xml b/plugins/org.eclipse.papyrus.sysml.service.types/xmlElementTypes.xml
new file mode 100755
index 0000000..3fadbeb
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml.service.types/xmlElementTypes.xml
@@ -0,0 +1,455 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+
+<!-- SysML ElementTypes declarations -->
+<extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypes">
+
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+
+ <!-- Declaration of IElementTypes -->
+
+ <!-- ISpecializationType Allocate of UML::Abstraction -->
+ <specializationType id="org.eclipse.papyrus.sysml.Allocate" name="SysML::Allocate"
+ edithelperadvice="org.eclipse.papyrus.sysml.service.types.helper.AllocateEditHelperAdvice"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >
+ <param name="semanticHint" value="SysML::Allocate"/>
+ <specializes id="org.eclipse.papyrus.uml.Abstraction" />
+ <matcher class ="org.eclipse.papyrus.sysml.service.types.matcher.AllocateMatcher" />
+ </specializationType>
+
+ <!-- ISpecializationType Association of UML::AssociationBase -->
+ <specializationType id="org.eclipse.papyrus.sysml.Association" name="SysML::Association"
+ edithelperadvice="org.eclipse.papyrus.sysml.service.types.helper.advice.AssociationEditHelperAdvice"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >
+ <param name="semanticHint" value="SysML::Association"/>
+ <specializes id="org.eclipse.papyrus.uml.AssociationBase" />
+ <matcher class ="org.eclipse.papyrus.sysml.service.types.matcher.AssociationMatcher" />
+ </specializationType>
+
+ <!-- ISpecializationType AssociationComposite of SysML::Association -->
+ <specializationType id="org.eclipse.papyrus.sysml.AssociationComposite" name="SysML::AssociationComposite"
+ edithelperadvice="org.eclipse.papyrus.sysml.service.types.helper.advice.AssociationCompositeEditHelperAdvice"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >
+ <param name="semanticHint" value="SysML::AssociationComposite"/>
+ <specializes id="org.eclipse.papyrus.sysml.Association" />
+ <matcher class ="org.eclipse.papyrus.sysml.service.types.matcher.NoMatcher" />
+ </specializationType>
+
+ <!-- ISpecializationType AssociationCompositeDirected of SysML::Association -->
+ <specializationType id="org.eclipse.papyrus.sysml.AssociationCompositeDirected" name="SysML::AssociationCompositeDirected"
+ edithelperadvice="org.eclipse.papyrus.sysml.service.types.helper.advice.AssociationCompositeDirectedEditHelperAdvice"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >
+ <param name="semanticHint" value="SysML::AssociationCompositeDirected"/>
+ <specializes id="org.eclipse.papyrus.sysml.Association" />
+ <matcher class ="org.eclipse.papyrus.sysml.service.types.matcher.NoMatcher" />
+ </specializationType>
+
+ <!-- ISpecializationType AssociationNone of SysML::Association -->
+ <specializationType id="org.eclipse.papyrus.sysml.AssociationNone" name="SysML::AssociationNone"
+ edithelperadvice="org.eclipse.papyrus.sysml.service.types.helper.advice.AssociationNoneEditHelperAdvice"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >
+ <param name="semanticHint" value="SysML::AssociationNone"/>
+ <specializes id="org.eclipse.papyrus.sysml.Association" />
+ <matcher class ="org.eclipse.papyrus.sysml.service.types.matcher.NoMatcher" />
+ </specializationType>
+
+ <!-- ISpecializationType AssociationNoneDirected of SysML::Association -->
+ <specializationType id="org.eclipse.papyrus.sysml.AssociationNoneDirected" name="SysML::AssociationNoneDirected"
+ edithelperadvice="org.eclipse.papyrus.sysml.service.types.helper.advice.AssociationNoneDirectedEditHelperAdvice"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >
+ <param name="semanticHint" value="SysML::AssociationNoneDirected"/>
+ <specializes id="org.eclipse.papyrus.sysml.Association" />
+ <matcher class ="org.eclipse.papyrus.sysml.service.types.matcher.NoMatcher" />
+ </specializationType>
+
+ <!-- ISpecializationType AssociationShared of SysML::Association -->
+ <specializationType id="org.eclipse.papyrus.sysml.AssociationShared" name="SysML::AssociationShared"
+ edithelperadvice="org.eclipse.papyrus.sysml.service.types.helper.advice.AssociationSharedEditHelperAdvice"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >
+ <param name="semanticHint" value="SysML::AssociationShared"/>
+ <specializes id="org.eclipse.papyrus.sysml.Association" />
+ <matcher class ="org.eclipse.papyrus.sysml.service.types.matcher.NoMatcher" />
+ </specializationType>
+
+ <!-- ISpecializationType AssociationSharedDirected of SysML::Association -->
+ <specializationType id="org.eclipse.papyrus.sysml.AssociationSharedDirected" name="SysML::AssociationSharedDirected"
+ edithelperadvice="org.eclipse.papyrus.sysml.service.types.helper.advice.AssociationSharedDirectedEditHelperAdvice"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >
+ <param name="semanticHint" value="SysML::AssociationSharedDirected"/>
+ <specializes id="org.eclipse.papyrus.sysml.Association" />
+ <matcher class ="org.eclipse.papyrus.sysml.service.types.matcher.NoMatcher" />
+ </specializationType>
+
+ <!-- ISpecializationType Block of UML::Class -->
+ <specializationType id="org.eclipse.papyrus.sysml.Block" name="SysML::Block"
+ edithelperadvice="org.eclipse.papyrus.sysml.service.types.helper.BlockEditHelperAdvice"
+ icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/blocks/Block.gif"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >
+ <param name="semanticHint" value="SysML::Block"/>
+ <specializes id="org.eclipse.papyrus.uml.Class" />
+ <matcher class ="org.eclipse.papyrus.sysml.service.types.matcher.BlockMatcher" />
+ </specializationType>
+
+ <!-- ISpecializationType Conform of UML::Dependency -->
+ <specializationType id="org.eclipse.papyrus.sysml.Conform" name="SysML::Conform"
+ edithelperadvice="org.eclipse.papyrus.sysml.service.types.helper.ConformEditHelperAdvice"
+ icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/modelelements/Conform.gif"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >
+ <param name="semanticHint" value="SysML::Conform"/>
+ <specializes id="org.eclipse.papyrus.uml.Dependency" />
+ <matcher class ="org.eclipse.papyrus.sysml.service.types.matcher.ConformMatcher" />
+ </specializationType>
+
+ <!-- ISpecializationType ConstraintBlock of UML::Class -->
+ <specializationType id="org.eclipse.papyrus.sysml.ConstraintBlock" name="SysML::ConstraintBlock"
+ edithelperadvice="org.eclipse.papyrus.sysml.service.types.helper.ConstraintBlockEditHelperAdvice"
+ icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/constraints/ConstraintBlock.gif"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >
+ <param name="semanticHint" value="SysML::ConstraintBlock"/>
+ <specializes id="org.eclipse.papyrus.uml.Class" />
+ <matcher class ="org.eclipse.papyrus.sysml.service.types.matcher.ConstraintBlockMatcher" />
+ </specializationType>
+
+ <!-- ISpecializationType ConstraintProperty of UML::Property -->
+ <specializationType id="org.eclipse.papyrus.sysml.ConstraintProperty" name="SysML::ConstraintProperty"
+ edithelperadvice="org.eclipse.papyrus.sysml.service.types.helper.ConstraintPropertyEditHelperAdvice"
+ icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/constraints/ConstraintProperty.gif"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >
+ <param name="semanticHint" value="SysML::ConstraintProperty"/>
+ <specializes id="org.eclipse.papyrus.uml.Property" />
+ <matcher class ="org.eclipse.papyrus.sysml.service.types.matcher.ConstraintPropertyMatcher" />
+ </specializationType>
+
+ <!-- ISpecializationType Copy of UML::Abstraction -->
+ <specializationType id="org.eclipse.papyrus.sysml.Copy" name="SysML::Copy"
+ edithelperadvice="org.eclipse.papyrus.sysml.service.types.helper.CopyEditHelperAdvice"
+ icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/requirements/Copy.gif"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >
+ <param name="semanticHint" value="SysML::Copy"/>
+ <specializes id="org.eclipse.papyrus.uml.Abstraction" />
+ <matcher class ="org.eclipse.papyrus.sysml.service.types.matcher.CopyMatcher" />
+ </specializationType>
+
+ <!-- ISpecializationType DeriveReqt of UML::Abstraction -->
+ <specializationType id="org.eclipse.papyrus.sysml.DeriveReqt" name="SysML::DeriveReqt"
+ edithelperadvice="org.eclipse.papyrus.sysml.service.types.helper.DeriveReqtEditHelperAdvice"
+ icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/requirements/DeriveReqt.gif"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >
+ <param name="semanticHint" value="SysML::DeriveReqt"/>
+ <specializes id="org.eclipse.papyrus.uml.Abstraction" />
+ <matcher class ="org.eclipse.papyrus.sysml.service.types.matcher.DeriveReqtMatcher" />
+ </specializationType>
+
+ <!-- ISpecializationType Dimension of UML::InstanceSpecification -->
+ <specializationType id="org.eclipse.papyrus.sysml.Dimension" name="SysML::Dimension"
+ edithelperadvice="org.eclipse.papyrus.sysml.service.types.helper.DimensionEditHelperAdvice"
+ icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/blocks/Dimension.gif"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >
+ <param name="semanticHint" value="SysML::Dimension"/>
+ <specializes id="org.eclipse.papyrus.uml.InstanceSpecification" />
+ <matcher class ="org.eclipse.papyrus.sysml.service.types.matcher.DimensionMatcher" />
+ </specializationType>
+
+ <!-- ISpecializationType FlowPort of UML::Port -->
+ <specializationType id="org.eclipse.papyrus.sysml.FlowPort" name="SysML::FlowPort"
+ edithelperadvice="org.eclipse.papyrus.sysml.service.types.helper.FlowPortEditHelperAdvice"
+ icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/portandflows/FlowPort.gif"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >
+ <param name="semanticHint" value="SysML::FlowPort"/>
+ <specializes id="org.eclipse.papyrus.uml.Port" />
+ <matcher class ="org.eclipse.papyrus.sysml.service.types.matcher.FlowPortMatcher" />
+ </specializationType>
+
+ <!-- ISpecializationType FlowPort_InOut of SysML::FlowPort -->
+ <specializationType id="org.eclipse.papyrus.sysml.FlowPort_InOut" name="SysML::FlowPort_InOut"
+ edithelperadvice="org.eclipse.papyrus.sysml.service.types.helper.FlowPortInOutEditHelperAdvice"
+ icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/portandflows/FlowPort_INOUT.gif"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >
+ <param name="semanticHint" value="SysML::FlowPort_InOut"/>
+ <specializes id="org.eclipse.papyrus.sysml.FlowPort" />
+ <matcher class ="org.eclipse.papyrus.sysml.service.types.matcher.FlowPortInOutMatcher" />
+ </specializationType>
+
+ <!-- ISpecializationType FlowPort_In of SysML::FlowPort -->
+ <specializationType id="org.eclipse.papyrus.sysml.FlowPort_In" name="SysML::FlowPort_In"
+ edithelperadvice="org.eclipse.papyrus.sysml.service.types.helper.FlowPortInEditHelperAdvice"
+ icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/portandflows/FlowPort_IN.gif"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >
+ <param name="semanticHint" value="SysML::FlowPort_In"/>
+ <specializes id="org.eclipse.papyrus.sysml.FlowPort" />
+ <matcher class ="org.eclipse.papyrus.sysml.service.types.matcher.FlowPortInMatcher" />
+ </specializationType>
+
+ <!-- ISpecializationType FlowPort_Out of SysML::FlowPort -->
+ <specializationType id="org.eclipse.papyrus.sysml.FlowPort_Out" name="SysML::FlowPort_Out"
+ edithelperadvice="org.eclipse.papyrus.sysml.service.types.helper.FlowPortOutEditHelperAdvice"
+ icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/portandflows/FlowPort_OUT.gif"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >
+ <param name="semanticHint" value="SysML::FlowPort_Out"/>
+ <specializes id="org.eclipse.papyrus.sysml.FlowPort" />
+ <matcher class ="org.eclipse.papyrus.sysml.service.types.matcher.FlowPortOutMatcher" />
+ </specializationType>
+
+ <!-- ISpecializationType FlowPort_NA of SysML::FlowPort -->
+ <specializationType id="org.eclipse.papyrus.sysml.FlowPort_NA" name="SysML::FlowPort_NA"
+ edithelperadvice="org.eclipse.papyrus.sysml.service.types.helper.FlowPortNAEditHelperAdvice"
+ icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/portandflows/FlowPort_NA.gif"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >
+ <param name="semanticHint" value="SysML::FlowPort_NA"/>
+ <specializes id="org.eclipse.papyrus.sysml.FlowPort" />
+ <matcher class ="org.eclipse.papyrus.sysml.service.types.matcher.FlowPortNAMatcher" />
+ </specializationType>
+
+ <!-- ISpecializationType FlowProperty of UML::Property -->
+ <specializationType id="org.eclipse.papyrus.sysml.FlowProperty" name="SysML::FlowProperty"
+ edithelperadvice="org.eclipse.papyrus.sysml.service.types.helper.FlowPropertyEditHelperAdvice"
+ icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/portandflows/FlowProperty.gif"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >
+ <param name="semanticHint" value="SysML::FlowProperty"/>
+ <specializes id="org.eclipse.papyrus.uml.Property" />
+ <matcher class ="org.eclipse.papyrus.sysml.service.types.matcher.FlowPropertyMatcher" />
+ </specializationType>
+
+ <!-- ISpecializationType FlowSpecification of UML::Interface -->
+ <specializationType id="org.eclipse.papyrus.sysml.FlowSpecification" name="SysML::FlowSpecification"
+ edithelperadvice="org.eclipse.papyrus.sysml.service.types.helper.FlowSpecificationEditHelperAdvice"
+ icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/portandflows/FlowSpecification.gif"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >
+ <param name="semanticHint" value="SysML::FlowSpecification"/>
+ <specializes id="org.eclipse.papyrus.uml.Interface" />
+ <matcher class ="org.eclipse.papyrus.sysml.service.types.matcher.FlowSpecificationMatcher" />
+ </specializationType>
+
+ <!-- ISpecializationType ItemFlow of UML::InformationFlow -->
+ <specializationType id="org.eclipse.papyrus.sysml.ItemFlow" name="SysML::ItemFlow"
+ edithelperadvice="org.eclipse.papyrus.sysml.service.types.helper.ItemFlowEditHelperAdvice"
+ icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/portandflows/ItemFlow.gif"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >
+ <param name="semanticHint" value="SysML::ItemFlow"/>
+ <specializes id="org.eclipse.papyrus.uml.InformationFlow" />
+ <matcher class ="org.eclipse.papyrus.sysml.service.types.matcher.ItemFlowMatcher" />
+ </specializationType>
+
+ <!-- ISpecializationType PartProperty of UML::Property -->
+ <specializationType id="org.eclipse.papyrus.sysml.PartProperty" name="SysML::PartProperty"
+ edithelperadvice="org.eclipse.papyrus.sysml.service.types.helper.PartPropertyEditHelperAdvice"
+ icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >
+ <param name="semanticHint" value="SysML::PartProperty"/>
+ <specializes id="org.eclipse.papyrus.uml.Property" />
+ <matcher class ="org.eclipse.papyrus.sysml.service.types.matcher.PartPropertyMatcher" />
+ </specializationType>
+
+ <!-- ISpecializationType Problem of UML::Comment -->
+ <specializationType id="org.eclipse.papyrus.sysml.Problem" name="SysML::Problem"
+ edithelperadvice="org.eclipse.papyrus.sysml.service.types.helper.ProblemEditHelperAdvice"
+ icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/modelelements/Problem.gif"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >
+ <param name="semanticHint" value="SysML::Problem"/>
+ <specializes id="org.eclipse.papyrus.uml.Comment" />
+ <matcher class ="org.eclipse.papyrus.sysml.service.types.matcher.ProblemMatcher" />
+ </specializationType>
+
+ <!-- ISpecializationType Rationale of UML::Comment -->
+ <specializationType id="org.eclipse.papyrus.sysml.Rationale" name="SysML::Rationale"
+ edithelperadvice="org.eclipse.papyrus.sysml.service.types.helper.RationaleEditHelperAdvice"
+ icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/modelelements/Rationale.gif"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >
+ <param name="semanticHint" value="SysML::Rationale"/>
+ <specializes id="org.eclipse.papyrus.uml.Comment" />
+ <matcher class ="org.eclipse.papyrus.sysml.service.types.matcher.RationaleMatcher" />
+ </specializationType>
+
+ <!-- ISpecializationType ReferenceProperty of UML::Property -->
+ <specializationType id="org.eclipse.papyrus.sysml.ReferenceProperty" name="SysML::ReferenceProperty"
+ edithelperadvice="org.eclipse.papyrus.sysml.service.types.helper.ReferencePropertyEditHelperAdvice"
+ icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >
+ <param name="semanticHint" value="SysML::ReferenceProperty"/>
+ <specializes id="org.eclipse.papyrus.uml.Property" />
+ <matcher class ="org.eclipse.papyrus.sysml.service.types.matcher.ReferencePropertyMatcher" />
+ </specializationType>
+
+ <!-- ISpecializationType Requirement of UML::Class -->
+ <specializationType id="org.eclipse.papyrus.sysml.Requirement" name="SysML::Requirement"
+ edithelperadvice="org.eclipse.papyrus.sysml.service.types.helper.RequirementEditHelperAdvice"
+ icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/requirements/Requirement.gif"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >
+ <param name="semanticHint" value="SysML::Requirement"/>
+ <specializes id="org.eclipse.papyrus.uml.Class" />
+ <matcher class ="org.eclipse.papyrus.sysml.service.types.matcher.RequirementMatcher" />
+ </specializationType>
+
+ <!-- ISpecializationType Satisfy of UML::Abstraction -->
+ <specializationType id="org.eclipse.papyrus.sysml.Satisfy" name="SysML::Satisfy"
+ edithelperadvice="org.eclipse.papyrus.sysml.service.types.helper.SatisfyEditHelperAdvice"
+ icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/requirements/Satisfy.gif"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >
+ <param name="semanticHint" value="SysML::Satisfy"/>
+ <specializes id="org.eclipse.papyrus.uml.Abstraction" />
+ <matcher class ="org.eclipse.papyrus.sysml.service.types.matcher.SatisfyMatcher" />
+ </specializationType>
+
+ <!-- ISpecializationType Unit of UML::InstanceSpecification -->
+ <specializationType id="org.eclipse.papyrus.sysml.Unit" name="SysML::Unit"
+ edithelperadvice="org.eclipse.papyrus.sysml.service.types.helper.UnitEditHelperAdvice"
+ icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/blocks/Unit.gif"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >
+ <param name="semanticHint" value="SysML::Unit"/>
+ <specializes id="org.eclipse.papyrus.uml.InstanceSpecification" />
+ <matcher class ="org.eclipse.papyrus.sysml.service.types.matcher.UnitMatcher" />
+ </specializationType>
+
+ <!-- ISpecializationType ValueProperty of UML::Property -->
+ <specializationType id="org.eclipse.papyrus.sysml.ValueProperty" name="SysML::ValueProperty"
+ edithelperadvice="org.eclipse.papyrus.sysml.service.types.helper.ValuePropertyEditHelperAdvice"
+ icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >
+ <param name="semanticHint" value="SysML::ValueProperty"/>
+ <specializes id="org.eclipse.papyrus.uml.Property" />
+ <matcher class ="org.eclipse.papyrus.sysml.service.types.matcher.ValuePropertyMatcher" />
+ </specializationType>
+
+ <!-- ISpecializationType ValueType of UML::DataType -->
+ <specializationType id="org.eclipse.papyrus.sysml.ValueType" name="SysML::ValueType"
+ edithelperadvice="org.eclipse.papyrus.sysml.service.types.helper.ValueTypeEditHelperAdvice"
+ icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/blocks/ValueType.gif"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >
+ <param name="semanticHint" value="SysML::ValueType"/>
+ <specializes id="org.eclipse.papyrus.uml.DataType" />
+ <matcher class ="org.eclipse.papyrus.sysml.service.types.matcher.ValueTypeMatcher" />
+ </specializationType>
+
+ <!-- ISpecializationType ValueType_Enumeration of UML::Enumeration -->
+ <specializationType id="org.eclipse.papyrus.sysml.ValueType_Enumeration" name="SysML::ValueType_Enumeration"
+ edithelperadvice="org.eclipse.papyrus.sysml.service.types.helper.ValueTypeEditHelperAdvice"
+ icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/blocks/ValueType.gif"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >
+ <param name="semanticHint" value="SysML::ValueType_Enumeration"/>
+ <specializes id="org.eclipse.papyrus.uml.Enumeration" />
+ <matcher class ="org.eclipse.papyrus.sysml.service.types.matcher.ValueTypeEnumerationMatcher" />
+ </specializationType>
+
+ <!-- ISpecializationType ValueType_PrimitiveType of UML::PrimitiveType -->
+ <specializationType id="org.eclipse.papyrus.sysml.ValueType_PrimitiveType" name="SysML::ValueType_PrimitiveType"
+ edithelperadvice="org.eclipse.papyrus.sysml.service.types.helper.ValueTypeEditHelperAdvice"
+ icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/blocks/ValueType.gif"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >
+ <param name="semanticHint" value="SysML::ValueType_PrimitiveType"/>
+ <specializes id="org.eclipse.papyrus.uml.PrimitiveType" />
+ <matcher class ="org.eclipse.papyrus.sysml.service.types.matcher.ValueTypePrimitiveTypeMatcher" />
+ </specializationType>
+
+ <!-- ISpecializationType Verify of UML::Abstraction -->
+ <specializationType id="org.eclipse.papyrus.sysml.Verify" name="SysML::Verify"
+ edithelperadvice="org.eclipse.papyrus.sysml.service.types.helper.VerifyEditHelperAdvice"
+ icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/requirements/Verify.gif"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >
+ <param name="semanticHint" value="SysML::Verify"/>
+ <specializes id="org.eclipse.papyrus.uml.Abstraction" />
+ <matcher class ="org.eclipse.papyrus.sysml.service.types.matcher.VerifyMatcher" />
+ </specializationType>
+
+ <!-- ISpecializationType View of UML::Package -->
+ <specializationType id="org.eclipse.papyrus.sysml.View" name="SysML::View"
+ edithelperadvice="org.eclipse.papyrus.sysml.service.types.helper.ViewEditHelperAdvice"
+ icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/modelelements/View.gif"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >
+ <param name="semanticHint" value="SysML::View"/>
+ <specializes id="org.eclipse.papyrus.uml.Package" />
+ <matcher class ="org.eclipse.papyrus.sysml.service.types.matcher.ViewMatcher" />
+ </specializationType>
+
+ <!-- ISpecializationType ViewPoint of UML::Class -->
+ <specializationType id="org.eclipse.papyrus.sysml.ViewPoint" name="SysML::ViewPoint"
+ edithelperadvice="org.eclipse.papyrus.sysml.service.types.helper.ViewPointEditHelperAdvice"
+ icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/modelelements/Viewpoint.gif"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >
+ <param name="semanticHint" value="SysML::ViewPoint"/>
+ <specializes id="org.eclipse.papyrus.uml.Class" />
+ <matcher class ="org.eclipse.papyrus.sysml.service.types.matcher.ViewPointMatcher" />
+ </specializationType>
+
+ </metamodel>
+</extension>
+
+<!-- Helper advice declarations -->
+<extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypes">
+
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+
+ <!-- Helper advice for Property -->
+ <adviceBinding id="org.eclipse.papyrus.sysml.advice.ConstraintBlockPropertyHelperAdvice"
+ class="org.eclipse.papyrus.sysml.service.types.helper.ConstraintBlockPropertyEditHelperAdvice"
+ inheritance="all" typeId="org.eclipse.papyrus.uml.Property">
+ </adviceBinding>
+
+ <!-- Helper advice for Classifier -->
+ <adviceBinding id="org.eclipse.papyrus.sysml.advice.Classifier"
+ class="org.eclipse.papyrus.sysml.service.types.helper.advice.ClassifierEditHelperAdvice"
+ inheritance="all" typeId="org.eclipse.papyrus.uml.Classifier">
+ </adviceBinding>
+
+ <!-- Helper advice for Property -->
+ <adviceBinding id="org.eclipse.papyrus.sysml.advice.Property"
+ class="org.eclipse.papyrus.sysml.service.types.helper.advice.PropertyEditHelperAdvice"
+ inheritance="all" typeId="org.eclipse.papyrus.uml.Property">
+ </adviceBinding>
+
+ </metamodel>
+</extension>
+
+<!-- SysML ElementType bindings to Papyrus shared IClientContext -->
+<extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypeBindings">
+
+ <!-- Bindings declaration -->
+ <binding context="org.eclipse.papyrus.infra.services.edit.TypeContext">
+
+ <elementType ref="org.eclipse.papyrus.sysml.Allocate" />
+ <elementType ref="org.eclipse.papyrus.sysml.Association" />
+ <elementType ref="org.eclipse.papyrus.sysml.AssociationComposite" />
+ <elementType ref="org.eclipse.papyrus.sysml.AssociationCompositeDirected" />
+ <elementType ref="org.eclipse.papyrus.sysml.AssociationNone" />
+ <elementType ref="org.eclipse.papyrus.sysml.AssociationNoneDirected" />
+ <elementType ref="org.eclipse.papyrus.sysml.AssociationShared" />
+ <elementType ref="org.eclipse.papyrus.sysml.AssociationSharedDirected" />
+ <elementType ref="org.eclipse.papyrus.sysml.Block" />
+ <elementType ref="org.eclipse.papyrus.sysml.Conform" />
+ <elementType ref="org.eclipse.papyrus.sysml.ConstraintBlock" />
+ <elementType ref="org.eclipse.papyrus.sysml.ConstraintProperty" />
+ <elementType ref="org.eclipse.papyrus.sysml.Copy" />
+ <elementType ref="org.eclipse.papyrus.sysml.DeriveReqt" />
+ <elementType ref="org.eclipse.papyrus.sysml.Dimension" />
+ <elementType ref="org.eclipse.papyrus.sysml.FlowPort" />
+ <elementType ref="org.eclipse.papyrus.sysml.FlowPort_InOut" />
+ <elementType ref="org.eclipse.papyrus.sysml.FlowPort_In" />
+ <elementType ref="org.eclipse.papyrus.sysml.FlowPort_Out" />
+ <elementType ref="org.eclipse.papyrus.sysml.FlowPort_NA" />
+ <elementType ref="org.eclipse.papyrus.sysml.FlowProperty" />
+ <elementType ref="org.eclipse.papyrus.sysml.FlowSpecification" />
+ <elementType ref="org.eclipse.papyrus.sysml.ItemFlow" />
+ <elementType ref="org.eclipse.papyrus.sysml.PartProperty" />
+ <elementType ref="org.eclipse.papyrus.sysml.Problem" />
+ <elementType ref="org.eclipse.papyrus.sysml.Rationale" />
+ <elementType ref="org.eclipse.papyrus.sysml.ReferenceProperty" />
+ <elementType ref="org.eclipse.papyrus.sysml.Requirement" />
+ <elementType ref="org.eclipse.papyrus.sysml.Satisfy" />
+ <elementType ref="org.eclipse.papyrus.sysml.Unit" />
+ <elementType ref="org.eclipse.papyrus.sysml.ValueProperty" />
+ <elementType ref="org.eclipse.papyrus.sysml.ValueType" />
+ <elementType ref="org.eclipse.papyrus.sysml.ValueType_Enumeration" />
+ <elementType ref="org.eclipse.papyrus.sysml.ValueType_PrimitiveType" />
+ <elementType ref="org.eclipse.papyrus.sysml.Verify" />
+ <elementType ref="org.eclipse.papyrus.sysml.View" />
+ <elementType ref="org.eclipse.papyrus.sysml.ViewPoint" />
+ <advice ref="org.eclipse.papyrus.sysml.advice.ConstraintBlockPropertyHelperAdvice" />
+ <advice ref="org.eclipse.papyrus.sysml.advice.Classifier" />
+ <advice ref="org.eclipse.papyrus.sysml.advice.Property" />
+
+ </binding>
+
+</extension>
+
+</plugin>
+
diff --git a/plugins/org.eclipse.papyrus.sysml/.classpath b/plugins/org.eclipse.papyrus.sysml/.classpath
new file mode 100755
index 0000000..304e861
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/org.eclipse.papyrus.sysml/.project b/plugins/org.eclipse.papyrus.sysml/.project
new file mode 100755
index 0000000..03fda28
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/.project
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.sysml</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>
+ <buildCommand>
+ <name>org.eclipse.oomph.version.VersionBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>check.maven.pom</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>ignore.lower.bound.dependency.ranges</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>release.path</key>
+ <value>/org.eclipse.papyrus.releng.main.release/release.xml</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.oomph.version.VersionNature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/org.eclipse.papyrus.sysml/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.papyrus.sysml/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 0000000..c585cc4
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,291 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/plugins/org.eclipse.papyrus.sysml/.settings/org.eclipse.jdt.ui.prefs b/plugins/org.eclipse.papyrus.sysml/.settings/org.eclipse.jdt.ui.prefs
new file mode 100755
index 0000000..954281d
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,68 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+formatter_profile=_Papyrus
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/plugins/org.eclipse.papyrus.sysml/.settings/org.eclipse.pde.api.tools.prefs b/plugins/org.eclipse.papyrus.sysml/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100755
index 0000000..23fb95e
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/.settings/org.eclipse.pde.api.tools.prefs
@@ -0,0 +1,98 @@
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+API_USE_SCAN_FIELD_SEVERITY=Error
+API_USE_SCAN_METHOD_SEVERITY=Error
+API_USE_SCAN_TYPE_SEVERITY=Error
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Ignore
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_ANNOTATION=Ignore
+INVALID_JAVADOC_TAG=Ignore
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Ignore
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+MISSING_EE_DESCRIPTIONS=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=Enabled
+eclipse.preferences.version=1
+incompatible_api_component_version=Error
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Warning
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
diff --git a/plugins/org.eclipse.papyrus.sysml/META-INF/MANIFEST.MF b/plugins/org.eclipse.papyrus.sysml/META-INF/MANIFEST.MF
new file mode 100755
index 0000000..bdab799
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/META-INF/MANIFEST.MF
@@ -0,0 +1,46 @@
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.papyrus.uml.extensionpoints;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.12.0,4.0.0)",
+ org.eclipse.uml2.uml.profile.standard;bundle-version="[1.0.0,2.0.0)";visibility:=reexport
+Export-Package: org.eclipse.papyrus.sysml,
+ org.eclipse.papyrus.sysml.activities,
+ org.eclipse.papyrus.sysml.activities.internal.impl,
+ org.eclipse.papyrus.sysml.activities.util,
+ org.eclipse.papyrus.sysml.allocations,
+ org.eclipse.papyrus.sysml.allocations.internal.impl,
+ org.eclipse.papyrus.sysml.allocations.util,
+ org.eclipse.papyrus.sysml.blocks,
+ org.eclipse.papyrus.sysml.blocks.internal.impl,
+ org.eclipse.papyrus.sysml.blocks.util,
+ org.eclipse.papyrus.sysml.constraints,
+ org.eclipse.papyrus.sysml.constraints.internal.impl,
+ org.eclipse.papyrus.sysml.constraints.util,
+ org.eclipse.papyrus.sysml.interactions,
+ org.eclipse.papyrus.sysml.interactions.internal.impl,
+ org.eclipse.papyrus.sysml.interactions.util,
+ org.eclipse.papyrus.sysml.internal.impl,
+ org.eclipse.papyrus.sysml.modelelements,
+ org.eclipse.papyrus.sysml.modelelements.internal.impl,
+ org.eclipse.papyrus.sysml.modelelements.util,
+ org.eclipse.papyrus.sysml.portandflows,
+ org.eclipse.papyrus.sysml.portandflows.internal.impl,
+ org.eclipse.papyrus.sysml.portandflows.util,
+ org.eclipse.papyrus.sysml.requirements,
+ org.eclipse.papyrus.sysml.requirements.internal.impl,
+ org.eclipse.papyrus.sysml.requirements.util,
+ org.eclipse.papyrus.sysml.statemachines,
+ org.eclipse.papyrus.sysml.statemachines.internal.impl,
+ org.eclipse.papyrus.sysml.statemachines.util,
+ org.eclipse.papyrus.sysml.usecases,
+ org.eclipse.papyrus.sysml.usecases.internal.impl,
+ org.eclipse.papyrus.sysml.usecases.util,
+ org.eclipse.papyrus.sysml.util
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-ClassPath: .
+Bundle-Version: 1.2.0.qualifier
+Bundle-Localization: plugin
+Bundle-Name: %pluginName
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.papyrus.sysml;singleton:=true
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/plugins/org.eclipse.papyrus.sysml/about.html b/plugins/org.eclipse.papyrus.sysml/about.html
new file mode 100755
index 0000000..d35d5ae
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/plugins/org.eclipse.papyrus.sysml/build.properties b/plugins/org.eclipse.papyrus.sysml/build.properties
new file mode 100755
index 0000000..9a64c6f
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/build.properties
@@ -0,0 +1,8 @@
+#
+#Mon Sep 12 09:30:13 CEST 2011
+output..=bin/
+bin.includes=.,model/,META-INF/,plugin.xml,plugin.properties,libraries/,icons/,about.html
+jars.compile.order=.
+src.includes = about.html
+source..=src/
+bin..=bin/
diff --git a/plugins/org.eclipse.papyrus.sysml/icons/SysMLLibrary.gif b/plugins/org.eclipse.papyrus.sysml/icons/SysMLLibrary.gif
new file mode 100755
index 0000000..bf8bdd5
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/icons/SysMLLibrary.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml/icons/SysMLModel.gif b/plugins/org.eclipse.papyrus.sysml/icons/SysMLModel.gif
new file mode 100755
index 0000000..35ee3e1
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/icons/SysMLModel.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml/icons/SysMLProfile.gif b/plugins/org.eclipse.papyrus.sysml/icons/SysMLProfile.gif
new file mode 100755
index 0000000..d8c3834
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/icons/SysMLProfile.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml/icons/blocks/Block.gif b/plugins/org.eclipse.papyrus.sysml/icons/blocks/Block.gif
new file mode 100755
index 0000000..bc5ab83
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/icons/blocks/Block.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml/icons/blocks/BlockProperty.gif b/plugins/org.eclipse.papyrus.sysml/icons/blocks/BlockProperty.gif
new file mode 100755
index 0000000..0e14c65
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/icons/blocks/BlockProperty.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml/icons/blocks/Dimension.gif b/plugins/org.eclipse.papyrus.sysml/icons/blocks/Dimension.gif
new file mode 100755
index 0000000..eb861a0
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/icons/blocks/Dimension.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml/icons/blocks/Unit.gif b/plugins/org.eclipse.papyrus.sysml/icons/blocks/Unit.gif
new file mode 100755
index 0000000..33bfb26
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/icons/blocks/Unit.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml/icons/blocks/ValueType.gif b/plugins/org.eclipse.papyrus.sysml/icons/blocks/ValueType.gif
new file mode 100755
index 0000000..eb54412
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/icons/blocks/ValueType.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml/icons/constraints/ConstraintBlock.gif b/plugins/org.eclipse.papyrus.sysml/icons/constraints/ConstraintBlock.gif
new file mode 100755
index 0000000..3e7750a
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/icons/constraints/ConstraintBlock.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml/icons/constraints/ConstraintProperty.gif b/plugins/org.eclipse.papyrus.sysml/icons/constraints/ConstraintProperty.gif
new file mode 100755
index 0000000..7c948e8
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/icons/constraints/ConstraintProperty.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml/icons/modelelements/Conform.gif b/plugins/org.eclipse.papyrus.sysml/icons/modelelements/Conform.gif
new file mode 100755
index 0000000..1c2c5c2
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/icons/modelelements/Conform.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml/icons/modelelements/Problem.gif b/plugins/org.eclipse.papyrus.sysml/icons/modelelements/Problem.gif
new file mode 100755
index 0000000..cd989e8
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/icons/modelelements/Problem.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml/icons/modelelements/Rationale.gif b/plugins/org.eclipse.papyrus.sysml/icons/modelelements/Rationale.gif
new file mode 100755
index 0000000..a82851f
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/icons/modelelements/Rationale.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml/icons/modelelements/View.gif b/plugins/org.eclipse.papyrus.sysml/icons/modelelements/View.gif
new file mode 100755
index 0000000..2d874ff
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/icons/modelelements/View.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml/icons/modelelements/Viewpoint.gif b/plugins/org.eclipse.papyrus.sysml/icons/modelelements/Viewpoint.gif
new file mode 100755
index 0000000..a1cd285
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/icons/modelelements/Viewpoint.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml/icons/portandflows/FlowPort.gif b/plugins/org.eclipse.papyrus.sysml/icons/portandflows/FlowPort.gif
new file mode 100755
index 0000000..78ed7ce
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/icons/portandflows/FlowPort.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml/icons/portandflows/FlowPort_IN.gif b/plugins/org.eclipse.papyrus.sysml/icons/portandflows/FlowPort_IN.gif
new file mode 100755
index 0000000..6e45798
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/icons/portandflows/FlowPort_IN.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml/icons/portandflows/FlowPort_INOUT.gif b/plugins/org.eclipse.papyrus.sysml/icons/portandflows/FlowPort_INOUT.gif
new file mode 100755
index 0000000..78ed7ce
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/icons/portandflows/FlowPort_INOUT.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml/icons/portandflows/FlowPort_NA.gif b/plugins/org.eclipse.papyrus.sysml/icons/portandflows/FlowPort_NA.gif
new file mode 100755
index 0000000..3fd4b05
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/icons/portandflows/FlowPort_NA.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml/icons/portandflows/FlowPort_OUT.gif b/plugins/org.eclipse.papyrus.sysml/icons/portandflows/FlowPort_OUT.gif
new file mode 100755
index 0000000..1b7c2cb
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/icons/portandflows/FlowPort_OUT.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml/icons/portandflows/FlowProperty.gif b/plugins/org.eclipse.papyrus.sysml/icons/portandflows/FlowProperty.gif
new file mode 100755
index 0000000..77c0e22
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/icons/portandflows/FlowProperty.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml/icons/portandflows/FlowProperty_IN.gif b/plugins/org.eclipse.papyrus.sysml/icons/portandflows/FlowProperty_IN.gif
new file mode 100755
index 0000000..dcf0b98
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/icons/portandflows/FlowProperty_IN.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml/icons/portandflows/FlowProperty_INOUT.gif b/plugins/org.eclipse.papyrus.sysml/icons/portandflows/FlowProperty_INOUT.gif
new file mode 100755
index 0000000..9b24cf5
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/icons/portandflows/FlowProperty_INOUT.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml/icons/portandflows/FlowProperty_OUT.gif b/plugins/org.eclipse.papyrus.sysml/icons/portandflows/FlowProperty_OUT.gif
new file mode 100755
index 0000000..1630535
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/icons/portandflows/FlowProperty_OUT.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml/icons/portandflows/FlowSpecification.gif b/plugins/org.eclipse.papyrus.sysml/icons/portandflows/FlowSpecification.gif
new file mode 100755
index 0000000..1df635f
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/icons/portandflows/FlowSpecification.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml/icons/portandflows/ItemFlow.gif b/plugins/org.eclipse.papyrus.sysml/icons/portandflows/ItemFlow.gif
new file mode 100755
index 0000000..31c9dc8
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/icons/portandflows/ItemFlow.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml/icons/requirements/Copy.gif b/plugins/org.eclipse.papyrus.sysml/icons/requirements/Copy.gif
new file mode 100755
index 0000000..47caa0b
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/icons/requirements/Copy.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml/icons/requirements/DeriveReqt.gif b/plugins/org.eclipse.papyrus.sysml/icons/requirements/DeriveReqt.gif
new file mode 100755
index 0000000..6217748
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/icons/requirements/DeriveReqt.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml/icons/requirements/Refine.gif b/plugins/org.eclipse.papyrus.sysml/icons/requirements/Refine.gif
new file mode 100755
index 0000000..c8d1d8c
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/icons/requirements/Refine.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml/icons/requirements/Requirement.gif b/plugins/org.eclipse.papyrus.sysml/icons/requirements/Requirement.gif
new file mode 100755
index 0000000..50618e0
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/icons/requirements/Requirement.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml/icons/requirements/Satisfy.gif b/plugins/org.eclipse.papyrus.sysml/icons/requirements/Satisfy.gif
new file mode 100755
index 0000000..00848d8
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/icons/requirements/Satisfy.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml/icons/requirements/TestCase.gif b/plugins/org.eclipse.papyrus.sysml/icons/requirements/TestCase.gif
new file mode 100755
index 0000000..ac29611
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/icons/requirements/TestCase.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml/icons/requirements/Trace.gif b/plugins/org.eclipse.papyrus.sysml/icons/requirements/Trace.gif
new file mode 100755
index 0000000..f4cb0d3
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/icons/requirements/Trace.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml/icons/requirements/Verify.gif b/plugins/org.eclipse.papyrus.sysml/icons/requirements/Verify.gif
new file mode 100755
index 0000000..2d54efc
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/icons/requirements/Verify.gif
Binary files differ
diff --git a/plugins/org.eclipse.papyrus.sysml/libraries/SysMLPrimitiveTypes.di2 b/plugins/org.eclipse.papyrus.sysml/libraries/SysMLPrimitiveTypes.di2
new file mode 100755
index 0000000..b585a93
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/libraries/SysMLPrimitiveTypes.di2
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<di2:Diagram xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di2="http://www.papyrusuml.org" xmlns:uml="http://www.eclipse.org/uml2/2.1.0/UML" xmi:id="_AmRhALXmEduHWpAaWjM62w" isVisible="true" fontFamily="Arial" lineStyle="solid" fontColor="255:255:255" foregroundColor="255:255:255" backgroundColor="255:255:255" borderColor="255:255:255" position="0:0" name="Activities">
+ <contained xsi:type="di2:GraphNode" xmi:id="_E76EgLXmEduHWpAaWjM62w" isVisible="true" fontFamily="Arial" lineStyle="solid" fontColor="0:0:0" foregroundColor="248:249:214" backgroundColor="248:249:214" borderColor="157:124:47" position="116:56" size="146:130">
+ <contained xsi:type="di2:GraphNode" xmi:id="_E8DOcLXmEduHWpAaWjM62w" isVisible="true" fontFamily="Arial" lineStyle="solid" fontColor="0:0:0" foregroundColor="248:249:214" backgroundColor="248:249:214" borderColor="157:124:47" position="20:20" size="100:100">
+ <contained xsi:type="di2:GraphNode" xmi:id="_HFqmULXmEduHWpAaWjM62w" isVisible="true" fontFamily="Arial" lineStyle="solid" fontColor="0:0:0" foregroundColor="248:249:214" backgroundColor="248:249:214" borderColor="157:124:47" position="20:20" size="100:100">
+ <semanticModel xsi:type="di2:Uml1SemanticModelBridge" xmi:id="_HFqmUbXmEduHWpAaWjM62w" presentation="TextStereotype">
+ <element xsi:type="uml:EnumerationLiteral" href="SysMLPrimitiveTypes.uml#_HFoKELXmEduHWpAaWjM62w"/>
+ </semanticModel>
+ </contained>
+ <contained xsi:type="di2:GraphNode" xmi:id="_HQ4-4LXmEduHWpAaWjM62w" isVisible="true" fontFamily="Arial" lineStyle="solid" fontColor="0:0:0" foregroundColor="248:249:214" backgroundColor="248:249:214" borderColor="157:124:47" position="20:20" size="100:100">
+ <semanticModel xsi:type="di2:Uml1SemanticModelBridge" xmi:id="_HQ4-4bXmEduHWpAaWjM62w" presentation="TextStereotype">
+ <element xsi:type="uml:EnumerationLiteral" href="SysMLPrimitiveTypes.uml#_HQ3wwLXmEduHWpAaWjM62w"/>
+ </semanticModel>
+ </contained>
+ </contained>
+ <semanticModel xsi:type="di2:Uml1SemanticModelBridge" xmi:id="_E76EgbXmEduHWpAaWjM62w" presentation="TextStereotype">
+ <element xsi:type="uml:Enumeration" href="SysMLPrimitiveTypes.uml#_E7rbALXmEduHWpAaWjM62w"/>
+ </semanticModel>
+ </contained>
+ <contained xsi:type="di2:GraphNode" xmi:id="_vlkQsLXzEdu94_NE0EO5_A" isVisible="true" fontFamily="Arial" lineStyle="solid" fontColor="0:0:0" foregroundColor="248:249:214" backgroundColor="248:249:214" borderColor="157:124:47" position="322:56" size="120:130">
+ <property key="PropStereoDisplay" value="SysML::Blocks::ValueType"/>
+ <contained xsi:type="di2:GraphNode" xmi:id="_vly6MLXzEdu94_NE0EO5_A" isVisible="true" fontFamily="Arial" lineStyle="solid" fontColor="0:0:0" foregroundColor="248:249:214" backgroundColor="248:249:214" borderColor="157:124:47" position="20:20" size="100:100"/>
+ <contained xsi:type="di2:GraphNode" xmi:id="_vlzhQLXzEdu94_NE0EO5_A" isVisible="true" fontFamily="Arial" lineStyle="solid" fontColor="0:0:0" foregroundColor="248:249:214" backgroundColor="248:249:214" borderColor="157:124:47" position="20:20" size="100:100"/>
+ <semanticModel xsi:type="di2:Uml1SemanticModelBridge" xmi:id="_vlkQsbXzEdu94_NE0EO5_A" presentation="TextStereotype">
+ <element xsi:type="uml:DataType" href="SysMLPrimitiveTypes.uml#_vjX4ULXzEdu94_NE0EO5_A"/>
+ </semanticModel>
+ </contained>
+ <contained xsi:type="di2:GraphNode" xmi:id="_xB658LXzEdu94_NE0EO5_A" isVisible="true" fontFamily="Arial" lineStyle="solid" fontColor="0:0:0" foregroundColor="248:249:214" backgroundColor="248:249:214" borderColor="157:124:47" position="482:56" size="212:130">
+ <property key="PropStereoDisplay" value="SysML::Blocks::ValueType"/>
+ <contained xsi:type="di2:GraphNode" xmi:id="_xB9WMLXzEdu94_NE0EO5_A" isVisible="true" fontFamily="Arial" lineStyle="solid" fontColor="0:0:0" foregroundColor="248:249:214" backgroundColor="248:249:214" borderColor="157:124:47" position="20:20" size="100:100">
+ <contained xsi:type="di2:GraphNode" xmi:id="_5plTULXzEdu94_NE0EO5_A" isVisible="true" fontFamily="Arial" lineStyle="solid" fontColor="0:0:0" foregroundColor="248:249:214" backgroundColor="248:249:214" borderColor="166:157:183" position="20:20" size="100:100">
+ <property xmi:id="_5plTUrXzEdu94_NE0EO5_A" key="custom_disp" value="254"/>
+ <semanticModel xsi:type="di2:Uml1SemanticModelBridge" xmi:id="_5plTUbXzEdu94_NE0EO5_A" presentation="TextStereotype">
+ <element xsi:type="uml:Property" href="SysMLPrimitiveTypes.uml#_5pho8LXzEdu94_NE0EO5_A"/>
+ </semanticModel>
+ </contained>
+ <contained xsi:type="di2:GraphNode" xmi:id="_5vd44LXzEdu94_NE0EO5_A" isVisible="true" fontFamily="Arial" lineStyle="solid" fontColor="0:0:0" foregroundColor="248:249:214" backgroundColor="248:249:214" borderColor="166:157:183" position="20:20" size="100:100">
+ <property xmi:id="_5vef8LXzEdu94_NE0EO5_A" key="custom_disp" value="254"/>
+ <semanticModel xsi:type="di2:Uml1SemanticModelBridge" xmi:id="_5vd44bXzEdu94_NE0EO5_A" presentation="TextStereotype">
+ <element xsi:type="uml:Property" href="SysMLPrimitiveTypes.uml#_5vcDsLXzEdu94_NE0EO5_A"/>
+ </semanticModel>
+ </contained>
+ </contained>
+ <contained xsi:type="di2:GraphNode" xmi:id="_xB99QLXzEdu94_NE0EO5_A" isVisible="true" fontFamily="Arial" lineStyle="solid" fontColor="0:0:0" foregroundColor="248:249:214" backgroundColor="248:249:214" borderColor="157:124:47" position="20:20" size="100:100"/>
+ <semanticModel xsi:type="di2:Uml1SemanticModelBridge" xmi:id="_xB658bXzEdu94_NE0EO5_A" presentation="TextStereotype">
+ <element xsi:type="uml:DataType" href="SysMLPrimitiveTypes.uml#_xB5r0LXzEdu94_NE0EO5_A"/>
+ </semanticModel>
+ </contained>
+ <contained xsi:type="di2:GraphNode" isVisible="true" fontFamily="Arial" lineStyle="solid" fontColor="0:0:0" foregroundColor="248:249:214" backgroundColor="248:249:214" borderColor="157:124:47" position="116:205" size="146:130">
+ <property key="STEREOTYPE_DISPLAY_LOCATION" value="Comment"/>
+ <property key="QUALIFIED_NAME_DEPTH" value="0"/>
+ <contained xsi:type="di2:GraphNode" isVisible="true" fontFamily="Arial" lineStyle="solid" fontColor="0:0:0" foregroundColor="248:249:214" backgroundColor="248:249:214" borderColor="157:124:47" position="20:20" size="100:100">
+ <property key="STEREOTYPE_DISPLAY_LOCATION" value="Comment"/>
+ <property key="QUALIFIED_NAME_DEPTH" value="0"/>
+ <contained xsi:type="di2:GraphNode" isVisible="true" fontFamily="Arial" lineStyle="solid" fontColor="0:0:0" foregroundColor="248:249:214" backgroundColor="248:249:214" borderColor="157:124:47" position="20:20" size="100:100">
+ <property key="STEREOTYPE_DISPLAY_LOCATION" value="Comment"/>
+ <property key="QUALIFIED_NAME_DEPTH" value="0"/>
+ <semanticModel xsi:type="di2:Uml1SemanticModelBridge" presentation="TextStereotype">
+ <element xsi:type="uml:EnumerationLiteral" href="SysMLPrimitiveTypes.uml#_ME10cHUNEd2wL8HwXmHsqA"/>
+ </semanticModel>
+ </contained>
+ <contained xsi:type="di2:GraphNode" isVisible="true" fontFamily="Arial" lineStyle="solid" fontColor="0:0:0" foregroundColor="248:249:214" backgroundColor="248:249:214" borderColor="157:124:47" position="20:20" size="100:100">
+ <property key="STEREOTYPE_DISPLAY_LOCATION" value="Comment"/>
+ <property key="QUALIFIED_NAME_DEPTH" value="0"/>
+ <semanticModel xsi:type="di2:Uml1SemanticModelBridge" presentation="TextStereotype">
+ <element xsi:type="uml:EnumerationLiteral" href="SysMLPrimitiveTypes.uml#_MOh78HUNEd2wL8HwXmHsqA"/>
+ </semanticModel>
+ </contained>
+ <contained xsi:type="di2:GraphNode" isVisible="true" fontFamily="Arial" lineStyle="solid" fontColor="0:0:0" foregroundColor="248:249:214" backgroundColor="248:249:214" borderColor="157:124:47" position="20:20" size="100:100">
+ <property key="STEREOTYPE_DISPLAY_LOCATION" value="Comment"/>
+ <property key="QUALIFIED_NAME_DEPTH" value="0"/>
+ <semanticModel xsi:type="di2:Uml1SemanticModelBridge" presentation="TextStereotype">
+ <element xsi:type="uml:EnumerationLiteral" href="SysMLPrimitiveTypes.uml#_MUVpAHUNEd2wL8HwXmHsqA"/>
+ </semanticModel>
+ </contained>
+ <contained xsi:type="di2:GraphNode" isVisible="true" fontFamily="Arial" lineStyle="solid" fontColor="0:0:0" foregroundColor="248:249:214" backgroundColor="248:249:214" borderColor="157:124:47" position="20:20" size="100:100">
+ <property key="STEREOTYPE_DISPLAY_LOCATION" value="Comment"/>
+ <property key="QUALIFIED_NAME_DEPTH" value="0"/>
+ <semanticModel xsi:type="di2:Uml1SemanticModelBridge" presentation="TextStereotype">
+ <element xsi:type="uml:EnumerationLiteral" href="SysMLPrimitiveTypes.uml#_MYg-YHUNEd2wL8HwXmHsqA"/>
+ </semanticModel>
+ </contained>
+ </contained>
+ <semanticModel xsi:type="di2:Uml1SemanticModelBridge" presentation="TextStereotype">
+ <element xsi:type="uml:Enumeration" href="SysMLPrimitiveTypes.uml#_JoVVwHUNEd2wL8HwXmHsqA"/>
+ </semanticModel>
+ </contained>
+ <owner xsi:type="di2:Uml1SemanticModelBridge" xmi:id="_AmRhAbXmEduHWpAaWjM62w">
+ <element xsi:type="uml:Model" href="SysMLPrimitiveTypes.uml#_AnZiYLXmEduHWpAaWjM62w"/>
+ </owner>
+</di2:Diagram>
diff --git a/plugins/org.eclipse.papyrus.sysml/libraries/SysMLPrimitiveTypes.uml b/plugins/org.eclipse.papyrus.sysml/libraries/SysMLPrimitiveTypes.uml
new file mode 100755
index 0000000..49f31ce
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/libraries/SysMLPrimitiveTypes.uml
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Blocks="http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks">
+ <uml:Model xmi:id="_AnZiYLXmEduHWpAaWjM62w" name="SysMLPrimitiveTypes">
+ <ownedComment xmi:id="_FucPQLt5EdueBMWQd1bClA">
+ <body>Copyright (c) 2007 CEA List.
+ 
+ All rights reserved. This
+ program and the accompanying materials
+ are made available under
+ the terms of the Eclipse Public License
+ v1.0
+ which accompanies
+ this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+ 
+ Contributors:
+ CEA List - initial API and implementation
+ </body>
+ </ownedComment>
+ <packageImport xmi:id="_AnZiYbXmEduHWpAaWjM62w">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Enumeration" xmi:id="_E7rbALXmEduHWpAaWjM62w" name="ControlValue">
+ <ownedLiteral xmi:id="_HFoKELXmEduHWpAaWjM62w" name="disable"/>
+ <ownedLiteral xmi:id="_HQ3wwLXmEduHWpAaWjM62w" name="enable"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:DataType" xmi:id="_vjX4ULXzEdu94_NE0EO5_A" name="Real"/>
+ <packagedElement xmi:type="uml:DataType" xmi:id="_xB5r0LXzEdu94_NE0EO5_A" name="Complex">
+ <ownedAttribute xmi:id="_5pho8LXzEdu94_NE0EO5_A" name="realPart" visibility="public" type="_vjX4ULXzEdu94_NE0EO5_A" isUnique="false">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_AgtjMLX0Edu94_NE0EO5_A"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_AgxNkLX0Edu94_NE0EO5_A" value="1"/>
+ <defaultValue xmi:type="uml:LiteralString" xmi:id="_76JAsLXzEdu94_NE0EO5_A">
+ <value xsi:nil="true"/>
+ </defaultValue>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_5vcDsLXzEdu94_NE0EO5_A" name="imaginaryPart" visibility="public" type="_vjX4ULXzEdu94_NE0EO5_A" isUnique="false">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_BCW3sLX0Edu94_NE0EO5_A"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_BCZ7ALX0Edu94_NE0EO5_A" value="1"/>
+ <defaultValue xmi:type="uml:LiteralString" xmi:id="_-Yc2MLXzEdu94_NE0EO5_A">
+ <value xsi:nil="true"/>
+ </defaultValue>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Enumeration" xmi:id="_JoVVwHUNEd2wL8HwXmHsqA" name="VerdictKind">
+ <ownedLiteral xmi:id="_ME10cHUNEd2wL8HwXmHsqA" name="pass"/>
+ <ownedLiteral xmi:id="_MOh78HUNEd2wL8HwXmHsqA" name="fail"/>
+ <ownedLiteral xmi:id="_MUVpAHUNEd2wL8HwXmHsqA" name="inconclusive"/>
+ <ownedLiteral xmi:id="_MYg-YHUNEd2wL8HwXmHsqA" name="error"/>
+ </packagedElement>
+ <profileApplication xmi:id="_AnZiYrXmEduHWpAaWjM62w">
+ <eAnnotations xmi:id="_AnZiY7XmEduHWpAaWjM62w" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/uml2/5.0.0/UML/Profile/Standard#/"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://UML_PROFILES/Standard.profile.uml#_0"/>
+ </profileApplication>
+ <profileApplication xmi:id="_EO0nsKqaEeOxYPLQQ5QgYg">
+ <eAnnotations xmi:id="_EO0nsaqaEeOxYPLQQ5QgYg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Blocks:ValueType xmi:id="_T_ymgLX-EduFmqQsrNB9lw" base_DataType="_vjX4ULXzEdu94_NE0EO5_A"/>
+ <Blocks:ValueType xmi:id="_UrgdALX-EduFmqQsrNB9lw" base_DataType="_xB5r0LXzEdu94_NE0EO5_A"/>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.papyrus.sysml/model/.gitignore b/plugins/org.eclipse.papyrus.sysml/model/.gitignore
new file mode 100755
index 0000000..5660c13
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/model/.gitignore
@@ -0,0 +1,3 @@
+/SysML.profile.di
+/SysML.profile.notation
+/SysML.profile.sash
diff --git a/plugins/org.eclipse.papyrus.sysml/model/SysML.profile.genmodel b/plugins/org.eclipse.papyrus.sysml/model/SysML.profile.genmodel
new file mode 100755
index 0000000..588d833
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/model/SysML.profile.genmodel
@@ -0,0 +1,293 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:genmodel="http://www.eclipse.org/uml2/2.2.0/GenModel"
+ modelDirectory="/org.eclipse.papyrus.sysml/src" modelPluginID="org.eclipse.papyrus.sysml"
+ modelName="SysML" editPluginClass="org.eclipse.papyrus.sysml.provider.SysmlEditPlugin"
+ rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container" importerID="org.eclipse.uml2.uml.ecore.importer"
+ complianceLevel="5.0" copyrightFields="false" usedGenPackages="../../org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore ../../org.eclipse.uml2.uml.profile.standard/model/Standard.genmodel#//standard ../../org.eclipse.uml2.types/model/Types.genmodel#//types ../../org.eclipse.uml2.uml/model/UML.genmodel#//uml"
+ operationReflection="true" importOrganizing="true">
+ <genAnnotations source="http://www.eclipse.org/emf/2002/GenModel/importer/org.eclipse.uml2.uml.ecore.importer">
+ <details key="ECORE_TAGGED_VALUES" value="PROCESS"/>
+ <details key="UNION_PROPERTIES" value="REPORT"/>
+ <details key="UNTYPED_PROPERTIES" value="REPORT"/>
+ <details key="DUPLICATE_FEATURES" value="DISCARD"/>
+ <details key="SUBSETTING_PROPERTIES" value="REPORT"/>
+ <details key="VALIDATION_DELEGATES" value="IGNORE"/>
+ <details key="OPPOSITE_ROLE_NAMES" value="IGNORE"/>
+ <details key="COMMENTS" value="PROCESS"/>
+ <details key="DUPLICATE_FEATURE_INHERITANCE" value="DISCARD"/>
+ <details key="DUPLICATE_OPERATIONS" value="DISCARD"/>
+ <details key="PROPERTY_DEFAULT_EXPRESSIONS" value="IGNORE"/>
+ <details key="INVARIANT_CONSTRAINTS" value="PROCESS"/>
+ <details key="REDEFINING_PROPERTIES" value="REPORT"/>
+ <details key="ANNOTATION_DETAILS" value="PROCESS"/>
+ <details key="NON_API_INVARIANTS" value="IGNORE"/>
+ <details key="DUPLICATE_OPERATION_INHERITANCE" value="DISCARD"/>
+ <details key="REDEFINING_OPERATIONS" value="REPORT"/>
+ <details key="INVOCATION_DELEGATES" value="IGNORE"/>
+ <details key="DERIVED_FEATURES" value="PROCESS"/>
+ <details key="OPERATION_BODIES" value="IGNORE"/>
+ <details key="CAMEL_CASE_NAMES" value="IGNORE"/>
+ <details key="SUPER_CLASS_ORDER" value="PROCESS"/>
+ </genAnnotations>
+ <foreignModel>SysML.profile.uml</foreignModel>
+ <genPackages xsi:type="genmodel:GenPackage" prefix="Sysml" basePackage="org.eclipse.papyrus"
+ disposableProviderFactory="true" classPackageSuffix="internal.impl" fileExtensions=""
+ ecorePackage="sysml.ecore#/">
+ <genDataTypes xsi:type="genmodel:GenDataType" ecoreDataType="sysml.ecore#//Dummy"/>
+ <nestedGenPackages xsi:type="genmodel:GenPackage" prefix="Modelelements" basePackage="org.eclipse.papyrus.sysml"
+ disposableProviderFactory="true" classPackageSuffix="internal.impl" fileExtensions=""
+ ecorePackage="sysml.ecore#//modelelements">
+ <genClasses xsi:type="genmodel:GenClass" ecoreClass="sysml.ecore#//modelelements/Conform">
+ <genFeatures xsi:type="genmodel:GenFeature" notify="false" createChild="false"
+ propertySortChoices="true" ecoreFeature="ecore:EReference sysml.ecore#//modelelements/Conform/base_Dependency"/>
+ </genClasses>
+ <genClasses xsi:type="genmodel:GenClass" ecoreClass="sysml.ecore#//modelelements/View">
+ <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" notify="false"
+ createChild="false" ecoreFeature="ecore:EReference sysml.ecore#//modelelements/View/viewPoint"/>
+ <genFeatures xsi:type="genmodel:GenFeature" notify="false" createChild="false"
+ propertySortChoices="true" ecoreFeature="ecore:EReference sysml.ecore#//modelelements/View/base_Package"/>
+ </genClasses>
+ <genClasses xsi:type="genmodel:GenClass" ecoreClass="sysml.ecore#//modelelements/ViewPoint">
+ <genFeatures xsi:type="genmodel:GenFeature" notify="false" createChild="false"
+ propertySortChoices="true" ecoreFeature="ecore:EReference sysml.ecore#//modelelements/ViewPoint/base_Class"/>
+ <genFeatures xsi:type="genmodel:GenFeature" createChild="false" ecoreFeature="ecore:EAttribute sysml.ecore#//modelelements/ViewPoint/stakeHolders"/>
+ <genFeatures xsi:type="genmodel:GenFeature" createChild="false" ecoreFeature="ecore:EAttribute sysml.ecore#//modelelements/ViewPoint/purpose"/>
+ <genFeatures xsi:type="genmodel:GenFeature" createChild="false" ecoreFeature="ecore:EAttribute sysml.ecore#//modelelements/ViewPoint/concerns"/>
+ <genFeatures xsi:type="genmodel:GenFeature" createChild="false" ecoreFeature="ecore:EAttribute sysml.ecore#//modelelements/ViewPoint/languages"/>
+ <genFeatures xsi:type="genmodel:GenFeature" createChild="false" ecoreFeature="ecore:EAttribute sysml.ecore#//modelelements/ViewPoint/methods"/>
+ </genClasses>
+ <genClasses xsi:type="genmodel:GenClass" ecoreClass="sysml.ecore#//modelelements/Rationale">
+ <genFeatures xsi:type="genmodel:GenFeature" notify="false" createChild="false"
+ propertySortChoices="true" ecoreFeature="ecore:EReference sysml.ecore#//modelelements/Rationale/base_Comment"/>
+ </genClasses>
+ <genClasses xsi:type="genmodel:GenClass" ecoreClass="sysml.ecore#//modelelements/Problem">
+ <genFeatures xsi:type="genmodel:GenFeature" notify="false" createChild="false"
+ propertySortChoices="true" ecoreFeature="ecore:EReference sysml.ecore#//modelelements/Problem/base_Comment"/>
+ </genClasses>
+ </nestedGenPackages>
+ <nestedGenPackages xsi:type="genmodel:GenPackage" prefix="Blocks" basePackage="org.eclipse.papyrus.sysml"
+ disposableProviderFactory="true" classPackageSuffix="internal.impl" fileExtensions=""
+ ecorePackage="sysml.ecore#//blocks">
+ <genClasses xsi:type="genmodel:GenClass" ecoreClass="sysml.ecore#//blocks/Block">
+ <genFeatures xsi:type="genmodel:GenFeature" createChild="false" ecoreFeature="ecore:EAttribute sysml.ecore#//blocks/Block/isEncapsulated"/>
+ <genFeatures xsi:type="genmodel:GenFeature" notify="false" createChild="false"
+ propertySortChoices="true" ecoreFeature="ecore:EReference sysml.ecore#//blocks/Block/base_Class"/>
+ </genClasses>
+ <genClasses xsi:type="genmodel:GenClass" ecoreClass="sysml.ecore#//blocks/DistributedProperty">
+ <genFeatures xsi:type="genmodel:GenFeature" notify="false" createChild="false"
+ propertySortChoices="true" ecoreFeature="ecore:EReference sysml.ecore#//blocks/DistributedProperty/base_Property"/>
+ </genClasses>
+ <genClasses xsi:type="genmodel:GenClass" ecoreClass="sysml.ecore#//blocks/Dimension">
+ <genFeatures xsi:type="genmodel:GenFeature" notify="false" createChild="false"
+ propertySortChoices="true" ecoreFeature="ecore:EReference sysml.ecore#//blocks/Dimension/base_InstanceSpecification"/>
+ </genClasses>
+ <genClasses xsi:type="genmodel:GenClass" ecoreClass="sysml.ecore#//blocks/Unit">
+ <genFeatures xsi:type="genmodel:GenFeature" notify="false" createChild="false"
+ propertySortChoices="true" ecoreFeature="ecore:EReference sysml.ecore#//blocks/Unit/base_InstanceSpecification"/>
+ <genFeatures xsi:type="genmodel:GenFeature" notify="false" createChild="false"
+ propertySortChoices="true" ecoreFeature="ecore:EReference sysml.ecore#//blocks/Unit/dimension"/>
+ </genClasses>
+ <genClasses xsi:type="genmodel:GenClass" ecoreClass="sysml.ecore#//blocks/ValueType">
+ <genFeatures xsi:type="genmodel:GenFeature" notify="false" createChild="false"
+ propertySortChoices="true" ecoreFeature="ecore:EReference sysml.ecore#//blocks/ValueType/base_DataType"/>
+ <genFeatures xsi:type="genmodel:GenFeature" notify="false" createChild="false"
+ propertySortChoices="true" ecoreFeature="ecore:EReference sysml.ecore#//blocks/ValueType/unit"/>
+ <genFeatures xsi:type="genmodel:GenFeature" notify="false" createChild="false"
+ propertySortChoices="true" ecoreFeature="ecore:EReference sysml.ecore#//blocks/ValueType/dimension"/>
+ </genClasses>
+ <genClasses xsi:type="genmodel:GenClass" ecoreClass="sysml.ecore#//blocks/NestedConnectorEnd">
+ <genFeatures xsi:type="genmodel:GenFeature" notify="false" createChild="false"
+ propertySortChoices="true" ecoreFeature="ecore:EReference sysml.ecore#//blocks/NestedConnectorEnd/propertyPath"/>
+ <genFeatures xsi:type="genmodel:GenFeature" notify="false" createChild="false"
+ propertySortChoices="true" ecoreFeature="ecore:EReference sysml.ecore#//blocks/NestedConnectorEnd/base_ConnectorEnd"/>
+ </genClasses>
+ <genClasses xsi:type="genmodel:GenClass" ecoreClass="sysml.ecore#//blocks/ParticipantProperty">
+ <genFeatures xsi:type="genmodel:GenFeature" notify="false" createChild="false"
+ propertySortChoices="true" ecoreFeature="ecore:EReference sysml.ecore#//blocks/ParticipantProperty/base_Property"/>
+ <genFeatures xsi:type="genmodel:GenFeature" notify="false" createChild="false"
+ propertySortChoices="true" ecoreFeature="ecore:EReference sysml.ecore#//blocks/ParticipantProperty/end"/>
+ </genClasses>
+ <genClasses xsi:type="genmodel:GenClass" ecoreClass="sysml.ecore#//blocks/ConnectorProperty">
+ <genFeatures xsi:type="genmodel:GenFeature" notify="false" createChild="false"
+ propertySortChoices="true" ecoreFeature="ecore:EReference sysml.ecore#//blocks/ConnectorProperty/base_Property"/>
+ <genFeatures xsi:type="genmodel:GenFeature" notify="false" createChild="false"
+ propertySortChoices="true" ecoreFeature="ecore:EReference sysml.ecore#//blocks/ConnectorProperty/connector"/>
+ </genClasses>
+ <genClasses xsi:type="genmodel:GenClass" ecoreClass="sysml.ecore#//blocks/BindingConnector">
+ <genFeatures xsi:type="genmodel:GenFeature" notify="false" createChild="false"
+ propertySortChoices="true" ecoreFeature="ecore:EReference sysml.ecore#//blocks/BindingConnector/base_Connector"/>
+ </genClasses>
+ <genClasses xsi:type="genmodel:GenClass" ecoreClass="sysml.ecore#//blocks/PropertySpecificType">
+ <genFeatures xsi:type="genmodel:GenFeature" notify="false" createChild="false"
+ propertySortChoices="true" ecoreFeature="ecore:EReference sysml.ecore#//blocks/PropertySpecificType/base_Classifier"/>
+ </genClasses>
+ </nestedGenPackages>
+ <nestedGenPackages xsi:type="genmodel:GenPackage" prefix="Portandflows" basePackage="org.eclipse.papyrus.sysml"
+ disposableProviderFactory="true" classPackageSuffix="internal.impl" fileExtensions=""
+ ecorePackage="sysml.ecore#//portandflows">
+ <genEnums xsi:type="genmodel:GenEnum" typeSafeEnumCompatible="false" ecoreEnum="sysml.ecore#//portandflows/FlowDirection">
+ <genEnumLiterals xsi:type="genmodel:GenEnumLiteral" ecoreEnumLiteral="sysml.ecore#//portandflows/FlowDirection/in"/>
+ <genEnumLiterals xsi:type="genmodel:GenEnumLiteral" ecoreEnumLiteral="sysml.ecore#//portandflows/FlowDirection/out"/>
+ <genEnumLiterals xsi:type="genmodel:GenEnumLiteral" ecoreEnumLiteral="sysml.ecore#//portandflows/FlowDirection/inout"/>
+ </genEnums>
+ <genClasses xsi:type="genmodel:GenClass" ecoreClass="sysml.ecore#//portandflows/FlowPort">
+ <genFeatures xsi:type="genmodel:GenFeature" notify="false" createChild="false"
+ propertySortChoices="true" ecoreFeature="ecore:EReference sysml.ecore#//portandflows/FlowPort/base_Port"/>
+ <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" createChild="false"
+ ecoreFeature="ecore:EAttribute sysml.ecore#//portandflows/FlowPort/isAtomic"/>
+ <genFeatures xsi:type="genmodel:GenFeature" createChild="false" ecoreFeature="ecore:EAttribute sysml.ecore#//portandflows/FlowPort/isConjugated"/>
+ <genFeatures xsi:type="genmodel:GenFeature" createChild="false" ecoreFeature="ecore:EAttribute sysml.ecore#//portandflows/FlowPort/direction"/>
+ <genOperations xsi:type="genmodel:GenOperation" ecoreOperation="sysml.ecore#//portandflows/FlowPort/getIcon"/>
+ </genClasses>
+ <genClasses xsi:type="genmodel:GenClass" ecoreClass="sysml.ecore#//portandflows/FlowProperty">
+ <genFeatures xsi:type="genmodel:GenFeature" notify="false" createChild="false"
+ propertySortChoices="true" ecoreFeature="ecore:EReference sysml.ecore#//portandflows/FlowProperty/base_Property"/>
+ <genFeatures xsi:type="genmodel:GenFeature" createChild="false" ecoreFeature="ecore:EAttribute sysml.ecore#//portandflows/FlowProperty/direction"/>
+ <genOperations xsi:type="genmodel:GenOperation" ecoreOperation="sysml.ecore#//portandflows/FlowProperty/getIcon"/>
+ </genClasses>
+ <genClasses xsi:type="genmodel:GenClass" ecoreClass="sysml.ecore#//portandflows/FlowSpecification">
+ <genFeatures xsi:type="genmodel:GenFeature" notify="false" createChild="false"
+ propertySortChoices="true" ecoreFeature="ecore:EReference sysml.ecore#//portandflows/FlowSpecification/base_Interface"/>
+ </genClasses>
+ <genClasses xsi:type="genmodel:GenClass" ecoreClass="sysml.ecore#//portandflows/ItemFlow">
+ <genFeatures xsi:type="genmodel:GenFeature" notify="false" createChild="false"
+ propertySortChoices="true" ecoreFeature="ecore:EReference sysml.ecore#//portandflows/ItemFlow/base_InformationFlow"/>
+ <genFeatures xsi:type="genmodel:GenFeature" notify="false" createChild="false"
+ propertySortChoices="true" ecoreFeature="ecore:EReference sysml.ecore#//portandflows/ItemFlow/itemProperty"/>
+ </genClasses>
+ </nestedGenPackages>
+ <nestedGenPackages xsi:type="genmodel:GenPackage" prefix="Constraints" basePackage="org.eclipse.papyrus.sysml"
+ disposableProviderFactory="true" classPackageSuffix="internal.impl" fileExtensions=""
+ ecorePackage="sysml.ecore#//constraints">
+ <genClasses xsi:type="genmodel:GenClass" ecoreClass="sysml.ecore#//constraints/ConstraintBlock"/>
+ <genClasses xsi:type="genmodel:GenClass" ecoreClass="sysml.ecore#//constraints/ConstraintProperty">
+ <genFeatures xsi:type="genmodel:GenFeature" notify="false" createChild="false"
+ propertySortChoices="true" ecoreFeature="ecore:EReference sysml.ecore#//constraints/ConstraintProperty/base_Property"/>
+ </genClasses>
+ </nestedGenPackages>
+ <nestedGenPackages xsi:type="genmodel:GenPackage" prefix="Activities" basePackage="org.eclipse.papyrus.sysml"
+ disposableProviderFactory="true" classPackageSuffix="internal.impl" fileExtensions=""
+ ecorePackage="sysml.ecore#//activities">
+ <genClasses xsi:type="genmodel:GenClass" ecoreClass="sysml.ecore#//activities/Optional">
+ <genFeatures xsi:type="genmodel:GenFeature" notify="false" createChild="false"
+ propertySortChoices="true" ecoreFeature="ecore:EReference sysml.ecore#//activities/Optional/base_Parameter"/>
+ </genClasses>
+ <genClasses xsi:type="genmodel:GenClass" ecoreClass="sysml.ecore#//activities/Rate">
+ <genFeatures xsi:type="genmodel:GenFeature" notify="false" createChild="false"
+ propertySortChoices="true" ecoreFeature="ecore:EReference sysml.ecore#//activities/Rate/base_Parameter"/>
+ <genFeatures xsi:type="genmodel:GenFeature" notify="false" createChild="false"
+ propertySortChoices="true" ecoreFeature="ecore:EReference sysml.ecore#//activities/Rate/base_ActivityEdge"/>
+ <genFeatures xsi:type="genmodel:GenFeature" notify="false" createChild="false"
+ propertySortChoices="true" ecoreFeature="ecore:EReference sysml.ecore#//activities/Rate/rate"/>
+ </genClasses>
+ <genClasses xsi:type="genmodel:GenClass" ecoreClass="sysml.ecore#//activities/Probability">
+ <genFeatures xsi:type="genmodel:GenFeature" notify="false" createChild="false"
+ propertySortChoices="true" ecoreFeature="ecore:EReference sysml.ecore#//activities/Probability/base_ActivityEdge"/>
+ <genFeatures xsi:type="genmodel:GenFeature" notify="false" createChild="false"
+ propertySortChoices="true" ecoreFeature="ecore:EReference sysml.ecore#//activities/Probability/base_ParameterSet"/>
+ <genFeatures xsi:type="genmodel:GenFeature" notify="false" createChild="false"
+ propertySortChoices="true" ecoreFeature="ecore:EReference sysml.ecore#//activities/Probability/probability"/>
+ </genClasses>
+ <genClasses xsi:type="genmodel:GenClass" ecoreClass="sysml.ecore#//activities/Continuous"/>
+ <genClasses xsi:type="genmodel:GenClass" ecoreClass="sysml.ecore#//activities/Discrete"/>
+ <genClasses xsi:type="genmodel:GenClass" ecoreClass="sysml.ecore#//activities/ControlOperator">
+ <genFeatures xsi:type="genmodel:GenFeature" notify="false" createChild="false"
+ propertySortChoices="true" ecoreFeature="ecore:EReference sysml.ecore#//activities/ControlOperator/base_Operation"/>
+ <genFeatures xsi:type="genmodel:GenFeature" notify="false" createChild="false"
+ propertySortChoices="true" ecoreFeature="ecore:EReference sysml.ecore#//activities/ControlOperator/base_Behavior"/>
+ </genClasses>
+ <genClasses xsi:type="genmodel:GenClass" ecoreClass="sysml.ecore#//activities/NoBuffer">
+ <genFeatures xsi:type="genmodel:GenFeature" notify="false" createChild="false"
+ propertySortChoices="true" ecoreFeature="ecore:EReference sysml.ecore#//activities/NoBuffer/base_ObjectNode"/>
+ </genClasses>
+ <genClasses xsi:type="genmodel:GenClass" ecoreClass="sysml.ecore#//activities/Overwrite">
+ <genFeatures xsi:type="genmodel:GenFeature" notify="false" createChild="false"
+ propertySortChoices="true" ecoreFeature="ecore:EReference sysml.ecore#//activities/Overwrite/base_ObjectNode"/>
+ </genClasses>
+ </nestedGenPackages>
+ <nestedGenPackages xsi:type="genmodel:GenPackage" prefix="Allocations" basePackage="org.eclipse.papyrus.sysml"
+ disposableProviderFactory="true" classPackageSuffix="internal.impl" fileExtensions=""
+ ecorePackage="sysml.ecore#//allocations">
+ <genClasses xsi:type="genmodel:GenClass" ecoreClass="sysml.ecore#//allocations/Allocate">
+ <genFeatures xsi:type="genmodel:GenFeature" notify="false" createChild="false"
+ propertySortChoices="true" ecoreFeature="ecore:EReference sysml.ecore#//allocations/Allocate/base_Abstraction"/>
+ </genClasses>
+ <genClasses xsi:type="genmodel:GenClass" ecoreClass="sysml.ecore#//allocations/Allocated">
+ <genFeatures xsi:type="genmodel:GenFeature" notify="false" createChild="false"
+ propertySortChoices="true" ecoreFeature="ecore:EReference sysml.ecore#//allocations/Allocated/base_NamedElement"/>
+ <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" notify="false"
+ createChild="false" ecoreFeature="ecore:EReference sysml.ecore#//allocations/Allocated/allocatedFrom"/>
+ <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" notify="false"
+ createChild="false" ecoreFeature="ecore:EReference sysml.ecore#//allocations/Allocated/allocatedTo"/>
+ </genClasses>
+ <genClasses xsi:type="genmodel:GenClass" ecoreClass="sysml.ecore#//allocations/AllocateActivityPartition">
+ <genFeatures xsi:type="genmodel:GenFeature" notify="false" createChild="false"
+ propertySortChoices="true" ecoreFeature="ecore:EReference sysml.ecore#//allocations/AllocateActivityPartition/base_ActivityPartition"/>
+ </genClasses>
+ </nestedGenPackages>
+ <nestedGenPackages xsi:type="genmodel:GenPackage" prefix="Requirements" basePackage="org.eclipse.papyrus.sysml"
+ disposableProviderFactory="true" classPackageSuffix="internal.impl" fileExtensions=""
+ ecorePackage="sysml.ecore#//requirements">
+ <genClasses xsi:type="genmodel:GenClass" ecoreClass="sysml.ecore#//requirements/DeriveReqt"/>
+ <genClasses xsi:type="genmodel:GenClass" ecoreClass="sysml.ecore#//requirements/Verify"/>
+ <genClasses xsi:type="genmodel:GenClass" ecoreClass="sysml.ecore#//requirements/Copy"/>
+ <genClasses xsi:type="genmodel:GenClass" ecoreClass="sysml.ecore#//requirements/Satisfy"/>
+ <genClasses xsi:type="genmodel:GenClass" ecoreClass="sysml.ecore#//requirements/TestCase">
+ <genFeatures xsi:type="genmodel:GenFeature" notify="false" createChild="false"
+ propertySortChoices="true" ecoreFeature="ecore:EReference sysml.ecore#//requirements/TestCase/base_Behavior"/>
+ <genFeatures xsi:type="genmodel:GenFeature" notify="false" createChild="false"
+ propertySortChoices="true" ecoreFeature="ecore:EReference sysml.ecore#//requirements/TestCase/base_Operation"/>
+ <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" notify="false"
+ createChild="false" ecoreFeature="ecore:EReference sysml.ecore#//requirements/TestCase/verifies"/>
+ </genClasses>
+ <genClasses xsi:type="genmodel:GenClass" ecoreClass="sysml.ecore#//requirements/Requirement">
+ <genFeatures xsi:type="genmodel:GenFeature" createChild="false" ecoreFeature="ecore:EAttribute sysml.ecore#//requirements/Requirement/text"/>
+ <genFeatures xsi:type="genmodel:GenFeature" createChild="false" ecoreFeature="ecore:EAttribute sysml.ecore#//requirements/Requirement/id"/>
+ <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" notify="false"
+ createChild="false" ecoreFeature="ecore:EReference sysml.ecore#//requirements/Requirement/derived"/>
+ <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" notify="false"
+ createChild="false" ecoreFeature="ecore:EReference sysml.ecore#//requirements/Requirement/derivedFrom"/>
+ <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" notify="false"
+ createChild="false" ecoreFeature="ecore:EReference sysml.ecore#//requirements/Requirement/satisfiedBy"/>
+ <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" notify="false"
+ createChild="false" ecoreFeature="ecore:EReference sysml.ecore#//requirements/Requirement/refinedBy"/>
+ <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" notify="false"
+ createChild="false" ecoreFeature="ecore:EReference sysml.ecore#//requirements/Requirement/tracedTo"/>
+ <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" notify="false"
+ createChild="false" ecoreFeature="ecore:EReference sysml.ecore#//requirements/Requirement/verifiedBy"/>
+ <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" notify="false"
+ createChild="false" ecoreFeature="ecore:EReference sysml.ecore#//requirements/Requirement/master"/>
+ <genFeatures xsi:type="genmodel:GenFeature" notify="false" createChild="false"
+ propertySortChoices="true" ecoreFeature="ecore:EReference sysml.ecore#//requirements/Requirement/base_Class"/>
+ </genClasses>
+ <genClasses xsi:type="genmodel:GenClass" ecoreClass="sysml.ecore#//requirements/RequirementRelated">
+ <genFeatures xsi:type="genmodel:GenFeature" notify="false" createChild="false"
+ propertySortChoices="true" ecoreFeature="ecore:EReference sysml.ecore#//requirements/RequirementRelated/base_NamedElement"/>
+ <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" notify="false"
+ createChild="false" ecoreFeature="ecore:EReference sysml.ecore#//requirements/RequirementRelated/tracedFrom"/>
+ <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" notify="false"
+ createChild="false" ecoreFeature="ecore:EReference sysml.ecore#//requirements/RequirementRelated/satisfies"/>
+ <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" notify="false"
+ createChild="false" ecoreFeature="ecore:EReference sysml.ecore#//requirements/RequirementRelated/refines"/>
+ <genFeatures xsi:type="genmodel:GenFeature" property="Readonly" notify="false"
+ createChild="false" ecoreFeature="ecore:EReference sysml.ecore#//requirements/RequirementRelated/verifies"/>
+ </genClasses>
+ </nestedGenPackages>
+ <nestedGenPackages xsi:type="genmodel:GenPackage" prefix="Interactions" basePackage="org.eclipse.papyrus.sysml"
+ disposableProviderFactory="true" classPackageSuffix="internal.impl" fileExtensions=""
+ ecorePackage="sysml.ecore#//interactions">
+ <genDataTypes xsi:type="genmodel:GenDataType" ecoreDataType="sysml.ecore#//interactions/Dummy"/>
+ </nestedGenPackages>
+ <nestedGenPackages xsi:type="genmodel:GenPackage" prefix="Statemachines" basePackage="org.eclipse.papyrus.sysml"
+ disposableProviderFactory="true" classPackageSuffix="internal.impl" fileExtensions=""
+ ecorePackage="sysml.ecore#//statemachines">
+ <genDataTypes xsi:type="genmodel:GenDataType" ecoreDataType="sysml.ecore#//statemachines/Dummy"/>
+ </nestedGenPackages>
+ <nestedGenPackages xsi:type="genmodel:GenPackage" prefix="Usecases" basePackage="org.eclipse.papyrus.sysml"
+ disposableProviderFactory="true" classPackageSuffix="internal.impl" fileExtensions=""
+ ecorePackage="sysml.ecore#//usecases">
+ <genDataTypes xsi:type="genmodel:GenDataType" ecoreDataType="sysml.ecore#//usecases/Dummy"/>
+ </nestedGenPackages>
+ </genPackages>
+</genmodel:GenModel>
diff --git a/plugins/org.eclipse.papyrus.sysml/model/SysML.profile.uml b/plugins/org.eclipse.papyrus.sysml/model/SysML.profile.uml
new file mode 100755
index 0000000..90b558b
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/model/SysML.profile.uml
@@ -0,0 +1,845 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Ecore="http://www.eclipse.org/uml2/schemas/Ecore/5" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/uml2/schemas/Ecore/5 pathmap://UML_PROFILES/Ecore.profile.uml#_z1OFcHjqEdy8S4Cr8Rc_NA">
+ <uml:Profile xmi:id="_TZ_nULU5EduiKqCzJMWbGw" name="SysML" URI="http://www.eclipse.org/papyrus/0.7.0/SysML">
+ <ownedComment xmi:id="_S2RekKGvEdyj2Ya50HPlXg" annotatedElement="_TZ_nULU5EduiKqCzJMWbGw">
+ <body>OMG SysML V1.1 formal/2008-11-02</body>
+ </ownedComment>
+ <packageImport xmi:id="_TZ_nUbU5EduiKqCzJMWbGw">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packageImport xmi:id="_BssfwKG1Edyj2Ya50HPlXg">
+ <importedPackage xmi:type="uml:Profile" href="pathmap://UML_PROFILES/Standard.profile.uml#_0"/>
+ </packageImport>
+ <packageImport xmi:id="_xyrS0EdKEeGJHdQius5NZA">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_METAMODELS/UML.metamodel.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Profile" xmi:id="_Gx8MgLX7EduFmqQsrNB9lw" name="ModelElements" URI="http://www.eclipse.org/papyrus/0.7.0/SysML/ModelElements">
+ <ownedRule xmi:id="_h4cJsLVAEdu2ieF4ON8UjA" name="Conform_1" constrainedElement="_lsgYkLU9Edu2ieF4ON8UjA">
+ <specification xmi:type="uml:LiteralString" xmi:id="_vgvLYLVAEdu2ieF4ON8UjA" name="constraintBody" value="The supplier/target must be an element stereotyped by <<ViewPoint>>"/>
+ </ownedRule>
+ <ownedRule xmi:id="_ise1wLVAEdu2ieF4ON8UjA" name="Conform_2" constrainedElement="_lsgYkLU9Edu2ieF4ON8UjA">
+ <specification xmi:type="uml:LiteralString" xmi:id="_5gpKELVAEdu2ieF4ON8UjA" name="constraintBody" value="The client/source must be an element stereotyped by <<View>>"/>
+ </ownedRule>
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_lsgYkLU9Edu2ieF4ON8UjA" name="Conform">
+ <ownedAttribute xmi:id="_9cxv0LU9Edu2ieF4ON8UjA" name="base_Dependency" isUnique="false" association="_9csQQLU9Edu2ieF4ON8UjA">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Dependency"/>
+ </ownedAttribute>
+ <icon xmi:id="_K8KhEIxREeCeve9iisDgtA" content="" format="" location="platform:/plugin/org.eclipse.papyrus.sysml/icons/modelelements/Conform.gif">
+ <eAnnotations xmi:id="_K8KhEYxREeCeve9iisDgtA" source="image_papyrus">
+ <details xmi:id="_K8KhEoxREeCeve9iisDgtA" key="image_kind_key" value="icon"/>
+ </eAnnotations>
+ </icon>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_mPGvULU9Edu2ieF4ON8UjA" name="View">
+ <ownedAttribute xmi:id="_3Qho8LU9Edu2ieF4ON8UjA" name="viewPoint" type="_mhSEcLU9Edu2ieF4ON8UjA" isUnique="false" isReadOnly="true" isDerived="true"/>
+ <ownedAttribute xmi:id="_9HrpkLU9Edu2ieF4ON8UjA" name="base_Package" isUnique="false" association="_9Hn_MLU9Edu2ieF4ON8UjA">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Package"/>
+ </ownedAttribute>
+ <icon xmi:id="_HbhE0IxREeCeve9iisDgtA" content="" format="" location="platform:/plugin/org.eclipse.papyrus.sysml/icons/modelelements/View.gif">
+ <eAnnotations xmi:id="_HbhE0YxREeCeve9iisDgtA" source="image_papyrus">
+ <details xmi:id="_HbhE0oxREeCeve9iisDgtA" key="image_kind_key" value="icon"/>
+ </eAnnotations>
+ </icon>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_mhSEcLU9Edu2ieF4ON8UjA" name="ViewPoint">
+ <ownedAttribute xmi:id="_89GKMLU9Edu2ieF4ON8UjA" name="base_Class" isUnique="false" association="_889AQLU9Edu2ieF4ON8UjA">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="__VwDoLU9Edu2ieF4ON8UjA" name="stakeHolders" isUnique="false">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_CoC60LU-Edu2ieF4ON8UjA"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_CoJBcLU-Edu2ieF4ON8UjA" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="__lB1wLU9Edu2ieF4ON8UjA" name="purpose" isUnique="false">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_CYtcELXzEdu94_NE0EO5_A"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_CYy7oLXzEdu94_NE0EO5_A" value="1"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="__s9pwLU9Edu2ieF4ON8UjA" name="concerns" isUnique="false">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_GLB5YLU-Edu2ieF4ON8UjA"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_GLE8sLU-Edu2ieF4ON8UjA" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="__48QQLU9Edu2ieF4ON8UjA" name="languages" isUnique="false">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_JsAs0LU-Edu2ieF4ON8UjA"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_JsEXMLU-Edu2ieF4ON8UjA" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_AEs0ULU-Edu2ieF4ON8UjA" name="methods" isUnique="false">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_NyO7ULU-Edu2ieF4ON8UjA"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_NyTz0LU-Edu2ieF4ON8UjA" value="*"/>
+ </ownedAttribute>
+ <icon xmi:id="__ZyqEIxQEeCeve9iisDgtA" content="" format="" location="platform:/plugin/org.eclipse.papyrus.sysml/icons/modelelements/Viewpoint.gif">
+ <eAnnotations xmi:id="__ZyqEYxQEeCeve9iisDgtA" source="image_papyrus">
+ <details xmi:id="__ZyqEoxQEeCeve9iisDgtA" key="image_kind_key" value="icon"/>
+ </eAnnotations>
+ </icon>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_mwAc8LU9Edu2ieF4ON8UjA" name="Rationale">
+ <ownedAttribute xmi:id="_8w124LU9Edu2ieF4ON8UjA" name="base_Comment" isUnique="false" association="_8wOy4LU9Edu2ieF4ON8UjA">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Comment"/>
+ </ownedAttribute>
+ <icon xmi:id="_he_gwJaqEd2oqf5htPjXnA" format="" location="platform:/plugin/org.eclipse.papyrus.sysml/icons/modelelements/Rationale.gif">
+ <eAnnotations xmi:id="_iLsOsJaqEd2oqf5htPjXnA" source="image_papyrus">
+ <details xmi:id="_iLsOsZaqEd2oqf5htPjXnA" key="image_kind_key" value="icon"/>
+ </eAnnotations>
+ </icon>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_nARGgLU9Edu2ieF4ON8UjA" name="Problem">
+ <ownedAttribute xmi:id="_8fBuILU9Edu2ieF4ON8UjA" name="base_Comment" isUnique="false" association="_8ezEoLU9Edu2ieF4ON8UjA">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Comment"/>
+ </ownedAttribute>
+ <icon xmi:id="_bMlHgJaqEd2oqf5htPjXnA" location="platform:/plugin/org.eclipse.papyrus.sysml/icons/modelelements/Problem.gif">
+ <eAnnotations xmi:id="_clOVcJaqEd2oqf5htPjXnA" source="image_papyrus">
+ <details xmi:id="_clOVcZaqEd2oqf5htPjXnA" key="image_kind_key" value="icon"/>
+ </eAnnotations>
+ </icon>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_8ezEoLU9Edu2ieF4ON8UjA" name="CommentProblem" memberEnd="_8e050LU9Edu2ieF4ON8UjA _8fBuILU9Edu2ieF4ON8UjA">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_8e050LU9Edu2ieF4ON8UjA" name="extension_Problem" type="_nARGgLU9Edu2ieF4ON8UjA" aggregation="composite" association="_8ezEoLU9Edu2ieF4ON8UjA"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_8wOy4LU9Edu2ieF4ON8UjA" name="CommentRationale" memberEnd="_8wQBALU9Edu2ieF4ON8UjA _8w124LU9Edu2ieF4ON8UjA">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_8wQBALU9Edu2ieF4ON8UjA" name="extension_Rationale" type="_mwAc8LU9Edu2ieF4ON8UjA" aggregation="composite" association="_8wOy4LU9Edu2ieF4ON8UjA"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_889AQLU9Edu2ieF4ON8UjA" name="ClassViewPoint" memberEnd="_88-OYLU9Edu2ieF4ON8UjA _89GKMLU9Edu2ieF4ON8UjA">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_88-OYLU9Edu2ieF4ON8UjA" name="extension_ViewPoint" type="_mhSEcLU9Edu2ieF4ON8UjA" aggregation="composite" association="_889AQLU9Edu2ieF4ON8UjA"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_9Hn_MLU9Edu2ieF4ON8UjA" name="PackageView" memberEnd="_9HpNULU9Edu2ieF4ON8UjA _9HrpkLU9Edu2ieF4ON8UjA">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_9HpNULU9Edu2ieF4ON8UjA" name="extension_View" type="_mPGvULU9Edu2ieF4ON8UjA" aggregation="composite" association="_9Hn_MLU9Edu2ieF4ON8UjA"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_9csQQLU9Edu2ieF4ON8UjA" name="DependencyConform" memberEnd="_9cuFcLU9Edu2ieF4ON8UjA _9cxv0LU9Edu2ieF4ON8UjA">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_9cuFcLU9Edu2ieF4ON8UjA" name="extension_Conform" type="_lsgYkLU9Edu2ieF4ON8UjA" aggregation="composite" association="_9csQQLU9Edu2ieF4ON8UjA"/>
+ </packagedElement>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Profile" xmi:id="_fSw28LX7EduFmqQsrNB9lw" name="Blocks" URI="http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks">
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_8J2A8LVAEdu2ieF4ON8UjA" name="Block">
+ <ownedAttribute xmi:id="__AIRkLVAEdu2ieF4ON8UjA" name="isEncapsulated" visibility="public" isUnique="false">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_YlBtQLXzEdu94_NE0EO5_A"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_YlJpELXzEdu94_NE0EO5_A" value="1"/>
+ <defaultValue xmi:type="uml:LiteralString" xmi:id="_CJ77ILVBEdu2ieF4ON8UjA">
+ <value xsi:nil="true"/>
+ </defaultValue>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_GdjFYLVBEdu2ieF4ON8UjA" name="base_Class" isUnique="false" association="_GdeM4LVBEdu2ieF4ON8UjA">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
+ </ownedAttribute>
+ <icon xmi:id="_YOLAMJarEd2oqf5htPjXnA" location="platform:/plugin/org.eclipse.papyrus.sysml/icons/blocks/Block.gif">
+ <eAnnotations xmi:id="_YvPs8JarEd2oqf5htPjXnA" source="image_papyrus">
+ <details xmi:id="_YvPs8ZarEd2oqf5htPjXnA" key="image_kind_key" value="icon"/>
+ </eAnnotations>
+ </icon>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_GdeM4LVBEdu2ieF4ON8UjA" name="ClassBlock" memberEnd="_GdgpILVBEdu2ieF4ON8UjA _GdjFYLVBEdu2ieF4ON8UjA">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_GdgpILVBEdu2ieF4ON8UjA" name="extension_Block" type="_8J2A8LVAEdu2ieF4ON8UjA" aggregation="composite" association="_GdeM4LVBEdu2ieF4ON8UjA"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_RbW2wLVBEdu2ieF4ON8UjA" name="DistributedProperty">
+ <ownedAttribute xmi:id="_S2fEgKGwEdyj2Ya50HPlXg" name="base_Property" isUnique="false" association="_S1PuYKGwEdyj2Ya50HPlXg">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Property"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_sLKhQLVBEdu2ieF4ON8UjA" name="Dimension">
+ <ownedAttribute xmi:id="_A8oRkKGxEdyj2Ya50HPlXg" name="base_InstanceSpecification" isUnique="false" association="_A73ckKGxEdyj2Ya50HPlXg">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#InstanceSpecification"/>
+ </ownedAttribute>
+ <icon xmi:id="_cmay0JarEd2oqf5htPjXnA" location="platform:/plugin/org.eclipse.papyrus.sysml/icons/blocks/Dimension.gif">
+ <eAnnotations xmi:id="_dWPtQJarEd2oqf5htPjXnA" source="image_papyrus">
+ <details xmi:id="_dWPtQZarEd2oqf5htPjXnA" key="image_kind_key" value="icon"/>
+ </eAnnotations>
+ </icon>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_t9k6ELVBEdu2ieF4ON8UjA" name="Unit">
+ <ownedAttribute xmi:id="_CWx7YKGxEdyj2Ya50HPlXg" name="base_InstanceSpecification" isUnique="false" association="_CVceoKGxEdyj2Ya50HPlXg">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#InstanceSpecification"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_U8AxIKGxEdyj2Ya50HPlXg" name="dimension" type="_sLKhQLVBEdu2ieF4ON8UjA" isUnique="false" association="_U6SS0KGxEdyj2Ya50HPlXg">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_U8ZLoKGxEdyj2Ya50HPlXg"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_U8fSQKGxEdyj2Ya50HPlXg" value="1"/>
+ </ownedAttribute>
+ <icon xmi:id="_fyOngJarEd2oqf5htPjXnA" location="platform:/plugin/org.eclipse.papyrus.sysml/icons/blocks/Unit.gif">
+ <eAnnotations xmi:id="_gUMsIJarEd2oqf5htPjXnA" source="image_papyrus">
+ <details xmi:id="_gUMsIZarEd2oqf5htPjXnA" key="image_kind_key" value="icon"/>
+ </eAnnotations>
+ </icon>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_yfp-ILVBEdu2ieF4ON8UjA" name="ValueType">
+ <ownedAttribute xmi:id="_1IPJ8LVBEdu2ieF4ON8UjA" name="base_DataType" isUnique="false" association="_1IK4gLVBEdu2ieF4ON8UjA">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#DataType"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_mfPXUKGxEdyj2Ya50HPlXg" name="unit" type="_t9k6ELVBEdu2ieF4ON8UjA" isUnique="false" association="_meABMKGxEdyj2Ya50HPlXg">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_mfhrMKGxEdyj2Ya50HPlXg"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_mfnx0KGxEdyj2Ya50HPlXg" value="1"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_pj40EKGxEdyj2Ya50HPlXg" name="dimension" type="_sLKhQLVBEdu2ieF4ON8UjA" isUnique="false" association="_pivkkKGxEdyj2Ya50HPlXg">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_pkLH8KGxEdyj2Ya50HPlXg"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_pkLH8aGxEdyj2Ya50HPlXg" value="1"/>
+ </ownedAttribute>
+ <icon xmi:id="_hqnFcJarEd2oqf5htPjXnA" location="platform:/plugin/org.eclipse.papyrus.sysml/icons/blocks/ValueType.gif">
+ <eAnnotations xmi:id="_iJTzoJarEd2oqf5htPjXnA" source="image_papyrus">
+ <details xmi:id="_iJTzoZarEd2oqf5htPjXnA" key="image_kind_key" value="icon"/>
+ </eAnnotations>
+ </icon>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_1IK4gLVBEdu2ieF4ON8UjA" name="DataTypeValueType" memberEnd="_1IMGoLVBEdu2ieF4ON8UjA _1IPJ8LVBEdu2ieF4ON8UjA">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_1IMGoLVBEdu2ieF4ON8UjA" name="extension_ValueType" type="_yfp-ILVBEdu2ieF4ON8UjA" aggregation="composite" association="_1IK4gLVBEdu2ieF4ON8UjA"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_moxaQLVCEdu2ieF4ON8UjA" name="NestedConnectorEnd">
+ <ownedAttribute xmi:id="_oH640LVCEdu2ieF4ON8UjA" name="propertyPath" visibility="public" isOrdered="true" isUnique="false">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Property"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_4ZtWsMq4Ed2earfX6q16xg" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_4Z1SgMq4Ed2earfX6q16xg" value="*"/>
+ <defaultValue xmi:type="uml:LiteralString" xmi:id="__DZ9ILVCEdu2ieF4ON8UjA">
+ <value xsi:nil="true"/>
+ </defaultValue>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_pbCGgLVCEdu2ieF4ON8UjA" name="base_ConnectorEnd" isUnique="false" association="_pa9OALVCEdu2ieF4ON8UjA">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#ConnectorEnd"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_pa9OALVCEdu2ieF4ON8UjA" name="ConnectorEndNestedConnectorEnd" memberEnd="_pa_qQLVCEdu2ieF4ON8UjA _pbCGgLVCEdu2ieF4ON8UjA">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_pa_qQLVCEdu2ieF4ON8UjA" name="extension_NestedConnectorEnd" type="_moxaQLVCEdu2ieF4ON8UjA" aggregation="composite" association="_pa9OALVCEdu2ieF4ON8UjA"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_AJuDYKGwEdyj2Ya50HPlXg" name="ParticipantProperty">
+ <ownedAttribute xmi:id="_VHXiAKGwEdyj2Ya50HPlXg" name="base_Property" isUnique="false" association="_VGOSgKGwEdyj2Ya50HPlXg">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Property"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_X_BroKGwEdyj2Ya50HPlXg" name="end" visibility="public" isUnique="false">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Property"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_aock8KGwEdyj2Ya50HPlXg" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_aock8aGwEdyj2Ya50HPlXg" value="1"/>
+ <defaultValue xmi:type="uml:LiteralString" xmi:id="_aoirkKGwEdyj2Ya50HPlXg">
+ <value xsi:nil="true"/>
+ </defaultValue>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_FC-RUKGwEdyj2Ya50HPlXg" name="ConnectorProperty">
+ <ownedAttribute xmi:id="_TsQO4KGwEdyj2Ya50HPlXg" name="base_Property" isUnique="false" association="_TrG_YKGwEdyj2Ya50HPlXg">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Property"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_bq6ukKGwEdyj2Ya50HPlXg" name="connector" visibility="public" isUnique="false">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Connector"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_pyY_kKGwEdyj2Ya50HPlXg" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_pyfGMKGwEdyj2Ya50HPlXg" value="1"/>
+ <defaultValue xmi:type="uml:LiteralString" xmi:id="_pyfGMaGwEdyj2Ya50HPlXg">
+ <value xsi:nil="true"/>
+ </defaultValue>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_S1PuYKGwEdyj2Ya50HPlXg" name="Extension_DistributedProperty" memberEnd="_S2S3QKGwEdyj2Ya50HPlXg _S2fEgKGwEdyj2Ya50HPlXg">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_S2S3QKGwEdyj2Ya50HPlXg" name="extension_DistributedProperty" type="_RbW2wLVBEdu2ieF4ON8UjA" aggregation="composite" association="_S1PuYKGwEdyj2Ya50HPlXg"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_TrG_YKGwEdyj2Ya50HPlXg" name="Extension_ConnectorProperty" memberEnd="_TsEBoKGwEdyj2Ya50HPlXg _TsQO4KGwEdyj2Ya50HPlXg">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_TsEBoKGwEdyj2Ya50HPlXg" name="extension_ConnectorProperty" type="_FC-RUKGwEdyj2Ya50HPlXg" aggregation="composite" association="_TrG_YKGwEdyj2Ya50HPlXg"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_VGOSgKGwEdyj2Ya50HPlXg" name="Extension_ParticipantProperty" memberEnd="_VHLUwKGwEdyj2Ya50HPlXg _VHXiAKGwEdyj2Ya50HPlXg">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_VHLUwKGwEdyj2Ya50HPlXg" name="extension_ParticipantProperty" type="_AJuDYKGwEdyj2Ya50HPlXg" aggregation="composite" association="_VGOSgKGwEdyj2Ya50HPlXg"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_A73ckKGxEdyj2Ya50HPlXg" name="Extension_Dimension" memberEnd="_A8iK8KGxEdyj2Ya50HPlXg _A8oRkKGxEdyj2Ya50HPlXg">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_A8iK8KGxEdyj2Ya50HPlXg" name="extension_Dimension" type="_sLKhQLVBEdu2ieF4ON8UjA" aggregation="composite" association="_A73ckKGxEdyj2Ya50HPlXg"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_CVceoKGxEdyj2Ya50HPlXg" name="Extension_Unit" memberEnd="_CWfngKGxEdyj2Ya50HPlXg _CWx7YKGxEdyj2Ya50HPlXg">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_CWfngKGxEdyj2Ya50HPlXg" name="extension_Unit" type="_t9k6ELVBEdu2ieF4ON8UjA" aggregation="composite" association="_CVceoKGxEdyj2Ya50HPlXg"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_2qgsEKGxEdyj2Ya50HPlXg" name="BindingConnector">
+ <ownedAttribute xmi:id="_7l3y0KGxEdyj2Ya50HPlXg" name="base_Connector" isUnique="false" association="_7k6wkKGxEdyj2Ya50HPlXg">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Connector"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_7k6wkKGxEdyj2Ya50HPlXg" name="Extension_BindingConnector" memberEnd="_7lrlkKGxEdyj2Ya50HPlXg _7l3y0KGxEdyj2Ya50HPlXg">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_7lrlkKGxEdyj2Ya50HPlXg" name="extension_BindingConnector" type="_2qgsEKGxEdyj2Ya50HPlXg" aggregation="composite" association="_7k6wkKGxEdyj2Ya50HPlXg"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_aD-7EKGyEdyj2Ya50HPlXg" name="PropertySpecificType">
+ <ownedAttribute xmi:id="_kwLYAKGyEdyj2Ya50HPlXg" name="base_Classifier" isUnique="false" association="_kuv0oKGyEdyj2Ya50HPlXg">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Classifier"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="_U6SS0KGxEdyj2Ya50HPlXg" name="Association_Unit_Dimension" memberEnd="_U8AxIKGxEdyj2Ya50HPlXg _U8lY4KGxEdyj2Ya50HPlXg">
+ <ownedEnd xmi:id="_U8lY4KGxEdyj2Ya50HPlXg" name="unit" type="_t9k6ELVBEdu2ieF4ON8UjA" isUnique="false" association="_U6SS0KGxEdyj2Ya50HPlXg">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_U9KAoaGxEdyj2Ya50HPlXg"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_U9KAoKGxEdyj2Ya50HPlXg" value="*"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="_meABMKGxEdyj2Ya50HPlXg" name="Association_ValueType_Unit" memberEnd="_mfPXUKGxEdyj2Ya50HPlXg _mfnx0aGxEdyj2Ya50HPlXg">
+ <ownedEnd xmi:id="_mfnx0aGxEdyj2Ya50HPlXg" name="valueType" type="_yfp-ILVBEdu2ieF4ON8UjA" isUnique="false" association="_meABMKGxEdyj2Ya50HPlXg">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_mgGS8aGxEdyj2Ya50HPlXg"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_mgGS8KGxEdyj2Ya50HPlXg" value="*"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="_pivkkKGxEdyj2Ya50HPlXg" name="Association_ValueType_Dimension" memberEnd="_pj40EKGxEdyj2Ya50HPlXg _pkROkKGxEdyj2Ya50HPlXg">
+ <ownedEnd xmi:id="_pkROkKGxEdyj2Ya50HPlXg" name="valueType" type="_yfp-ILVBEdu2ieF4ON8UjA" isUnique="false" association="_pivkkKGxEdyj2Ya50HPlXg">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_pkdb0aGxEdyj2Ya50HPlXg"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_pkdb0KGxEdyj2Ya50HPlXg" value="*"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_kuv0oKGyEdyj2Ya50HPlXg" name="Extension_PropertySpecificType" memberEnd="_kv_KwKGyEdyj2Ya50HPlXg _kwLYAKGyEdyj2Ya50HPlXg">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_kv_KwKGyEdyj2Ya50HPlXg" name="extension_PropertySpecificType" type="_aD-7EKGyEdyj2Ya50HPlXg" aggregation="composite" association="_kuv0oKGyEdyj2Ya50HPlXg"/>
+ </packagedElement>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Profile" xmi:id="_rpx28LX7EduFmqQsrNB9lw" name="PortAndFlows" URI="http://www.eclipse.org/papyrus/0.7.0/SysML/PortAndFlows">
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_lNvKMLVDEdu2ieF4ON8UjA" name="FlowPort">
+ <ownedAttribute xmi:id="_CFKogLVEEdu2ieF4ON8UjA" name="base_Port" isUnique="false" association="_CFFI8LVEEdu2ieF4ON8UjA">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Port"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_TrY4ULVEEdu2ieF4ON8UjA" name="isAtomic" visibility="public" isUnique="false" isReadOnly="true" isDerived="true">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_XOdWcLVEEdu2ieF4ON8UjA" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_XOnugLVEEdu2ieF4ON8UjA" value="1"/>
+ <defaultValue xmi:type="uml:LiteralBoolean" xmi:id="_YqxjcLVEEdu2ieF4ON8UjA"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_T-tc8LVEEdu2ieF4ON8UjA" name="isConjugated" isUnique="false">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_bKXLULVEEdu2ieF4ON8UjA"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_bKcD0LVEEdu2ieF4ON8UjA" value="1"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_ULDP0LVEEdu2ieF4ON8UjA" name="direction" visibility="public" type="_6uLz4LVDEdu2ieF4ON8UjA" isUnique="false">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_am2iIKGzEdyj2Ya50HPlXg" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_am8owKGzEdyj2Ya50HPlXg" value="1"/>
+ <defaultValue xmi:type="uml:LiteralString" xmi:id="_awls8KGzEdyj2Ya50HPlXg" value="inout"/>
+ </ownedAttribute>
+ <ownedOperation xmi:id="_hxx1MKaVEd2T5POpEd8M_A" name="getIcon">
+ <ownedParameter xmi:id="_j2I5oKaVEd2T5POpEd8M_A" name="img" direction="return">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Image"/>
+ </ownedParameter>
+ </ownedOperation>
+ <icon xmi:id="_Prrn8KaUEd2T5POpEd8M_A" format="" location="platform:/plugin/org.eclipse.papyrus.sysml/icons/portandflows/FlowPort.gif">
+ <eAnnotations xmi:id="_bgbBUKaUEd2T5POpEd8M_A" source="image_papyrus">
+ <details xmi:id="_bgbBUaaUEd2T5POpEd8M_A" key="image_kind_key" value="icon"/>
+ </eAnnotations>
+ </icon>
+ <icon xmi:id="_RCIdgKaUEd2T5POpEd8M_A" location="platform:/plugin/org.eclipse.papyrus.sysml/icons/portandflows/FlowPort_IN.gif">
+ <eAnnotations xmi:id="_c1rkEKaUEd2T5POpEd8M_A" source="image_papyrus">
+ <details xmi:id="_c1rkEaaUEd2T5POpEd8M_A" key="image_kind_key" value="icon"/>
+ </eAnnotations>
+ </icon>
+ <icon xmi:id="_UZgpAKaUEd2T5POpEd8M_A" location="platform:/plugin/org.eclipse.papyrus.sysml/icons/portandflows/FlowPort_OUT.gif">
+ <eAnnotations xmi:id="_eKCu8KaUEd2T5POpEd8M_A" source="image_papyrus">
+ <details xmi:id="_eKL44KaUEd2T5POpEd8M_A" key="image_kind_key" value="icon"/>
+ </eAnnotations>
+ </icon>
+ <icon xmi:id="_WNehAKaUEd2T5POpEd8M_A" location="platform:/plugin/org.eclipse.papyrus.sysml/icons/portandflows/FlowPort_INOUT.gif">
+ <eAnnotations xmi:id="_geMi4KaUEd2T5POpEd8M_A" source="image_papyrus">
+ <details xmi:id="_geMi4aaUEd2T5POpEd8M_A" key="image_kind_key" value="icon"/>
+ </eAnnotations>
+ </icon>
+ <icon xmi:id="_Wx_jUKaUEd2T5POpEd8M_A" location="platform:/plugin/org.eclipse.papyrus.sysml/icons/portandflows/FlowPort_NA.gif">
+ <eAnnotations xmi:id="_iKaNEKaUEd2T5POpEd8M_A" source="image_papyrus">
+ <details xmi:id="_iKaNEaaUEd2T5POpEd8M_A" key="image_kind_key" value="icon"/>
+ </eAnnotations>
+ </icon>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_mB-qkLVDEdu2ieF4ON8UjA" name="FlowProperty">
+ <ownedAttribute xmi:id="_CyXswLVEEdu2ieF4ON8UjA" name="base_Property" isUnique="false" association="_CyRmILVEEdu2ieF4ON8UjA">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Property"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_M9NJELVEEdu2ieF4ON8UjA" name="direction" visibility="public" type="_6uLz4LVDEdu2ieF4ON8UjA" isUnique="false">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_eNi_gLX0Edu94_NE0EO5_A" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_eNqUQLX0Edu94_NE0EO5_A" value="1"/>
+ <defaultValue xmi:type="uml:LiteralString" xmi:id="_PRpQ4LVEEdu2ieF4ON8UjA" value="inout"/>
+ </ownedAttribute>
+ <ownedOperation xmi:id="_sZT0kKaVEd2T5POpEd8M_A" name="getIcon">
+ <ownedParameter xmi:id="_sZT0kaaVEd2T5POpEd8M_A" name="img" direction="return">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Image"/>
+ </ownedParameter>
+ </ownedOperation>
+ <icon xmi:id="_3Fo88NOpEeCksKIBVNCBtw" location="platform:/plugin/org.eclipse.papyrus.sysml/icons/portandflows/FlowProperty.gif">
+ <eAnnotations xmi:id="_3Fo88dOpEeCksKIBVNCBtw" source="image_papyrus">
+ <details xmi:id="_3Fo88tOpEeCksKIBVNCBtw" key="image_kind_key" value="icon"/>
+ </eAnnotations>
+ </icon>
+ <icon xmi:id="_yZrmoJayEd2oqf5htPjXnA" location="platform:/plugin/org.eclipse.papyrus.sysml/icons/portandflows/FlowProperty_IN.gif">
+ <eAnnotations xmi:id="_010R4JayEd2oqf5htPjXnA" source="image_papyrus">
+ <details xmi:id="_01-C4JayEd2oqf5htPjXnA" key="image_kind_key" value="icon"/>
+ </eAnnotations>
+ </icon>
+ <icon xmi:id="_y_heoJayEd2oqf5htPjXnA" location="platform:/plugin/org.eclipse.papyrus.sysml/icons/portandflows/FlowProperty_OUT.gif">
+ <eAnnotations xmi:id="_2tBEEJayEd2oqf5htPjXnA" source="image_papyrus">
+ <details xmi:id="_2tBEEZayEd2oqf5htPjXnA" key="image_kind_key" value="icon"/>
+ </eAnnotations>
+ </icon>
+ <icon xmi:id="_z-GmwJayEd2oqf5htPjXnA" location="platform:/plugin/org.eclipse.papyrus.sysml/icons/portandflows/FlowProperty_INOUT.gif">
+ <eAnnotations xmi:id="_36CQ0JayEd2oqf5htPjXnA" source="image_papyrus">
+ <details xmi:id="_36CQ0ZayEd2oqf5htPjXnA" key="image_kind_key" value="icon"/>
+ </eAnnotations>
+ </icon>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_m9QnELVDEdu2ieF4ON8UjA" name="FlowSpecification">
+ <ownedAttribute xmi:id="_DD6vwLVEEdu2ieF4ON8UjA" name="base_Interface" isUnique="false" association="_DD0pILVEEdu2ieF4ON8UjA">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Interface"/>
+ </ownedAttribute>
+ <icon xmi:id="_viR7sJayEd2oqf5htPjXnA" location="platform:/plugin/org.eclipse.papyrus.sysml/icons/portandflows/FlowSpecification.gif">
+ <eAnnotations xmi:id="_wU7goJayEd2oqf5htPjXnA" source="image_papyrus">
+ <details xmi:id="_wU7goZayEd2oqf5htPjXnA" key="image_kind_key" value="icon"/>
+ </eAnnotations>
+ </icon>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Enumeration" xmi:id="_6uLz4LVDEdu2ieF4ON8UjA" name="FlowDirection">
+ <ownedLiteral xmi:id="_8A5Y8LVDEdu2ieF4ON8UjA" name="in"/>
+ <ownedLiteral xmi:id="_8ZVHELVDEdu2ieF4ON8UjA" name="out"/>
+ <ownedLiteral xmi:id="_8lvLYLVDEdu2ieF4ON8UjA" name="inout"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_CFFI8LVEEdu2ieF4ON8UjA" name="PortFlowPort" memberEnd="_CFG-ILVEEdu2ieF4ON8UjA _CFKogLVEEdu2ieF4ON8UjA">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_CFG-ILVEEdu2ieF4ON8UjA" name="extension_FlowPort" type="_lNvKMLVDEdu2ieF4ON8UjA" aggregation="composite" association="_CFFI8LVEEdu2ieF4ON8UjA"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_CyRmILVEEdu2ieF4ON8UjA" name="PropertyFlowProperty" memberEnd="_CyUCYLVEEdu2ieF4ON8UjA _CyXswLVEEdu2ieF4ON8UjA">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_CyUCYLVEEdu2ieF4ON8UjA" name="extension_FlowProperty" type="_mB-qkLVDEdu2ieF4ON8UjA" aggregation="composite" association="_CyRmILVEEdu2ieF4ON8UjA"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_DD0pILVEEdu2ieF4ON8UjA" name="InterfaceFlowSpecification" memberEnd="_DD2eULVEEdu2ieF4ON8UjA _DD6vwLVEEdu2ieF4ON8UjA">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_DD2eULVEEdu2ieF4ON8UjA" name="extension_FlowSpecification" type="_m9QnELVDEdu2ieF4ON8UjA" aggregation="composite" association="_DD0pILVEEdu2ieF4ON8UjA"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_9cdikLVEEdu2ieF4ON8UjA" name="ItemFlow">
+ <ownedAttribute xmi:id="_-8t0YLVEEdu2ieF4ON8UjA" name="base_InformationFlow" isUnique="false" association="_-8ntwLVEEdu2ieF4ON8UjA">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#InformationFlow"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="__ulWMLVEEdu2ieF4ON8UjA" name="itemProperty" visibility="public" isUnique="false">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Property"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_FduDQLVFEdu2ieF4ON8UjA"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_Fdy7wLVFEdu2ieF4ON8UjA" value="1"/>
+ <defaultValue xmi:type="uml:LiteralString" xmi:id="_D-wK4LVFEdu2ieF4ON8UjA">
+ <value xsi:nil="true"/>
+ </defaultValue>
+ </ownedAttribute>
+ <icon xmi:id="_iNY0AIQlEd-0wPxCyQxNhg" location="platform:/plugin/org.eclipse.papyrus.sysml/icons/portandflows/ItemFlow.gif">
+ <eAnnotations xmi:id="_mKHvUIQlEd-0wPxCyQxNhg" source="image_papyrus">
+ <details xmi:id="_mKHvUYQlEd-0wPxCyQxNhg" key="image_kind_key" value="icon"/>
+ </eAnnotations>
+ </icon>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_-8ntwLVEEdu2ieF4ON8UjA" name="InformationFlowItemFlow" memberEnd="_-8qKALVEEdu2ieF4ON8UjA _-8t0YLVEEdu2ieF4ON8UjA">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_-8qKALVEEdu2ieF4ON8UjA" name="extension_ItemFlow" type="_9cdikLVEEdu2ieF4ON8UjA" aggregation="composite" association="_-8ntwLVEEdu2ieF4ON8UjA"/>
+ </packagedElement>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Profile" xmi:id="_5WYJ0LX7EduFmqQsrNB9lw" name="Constraints" URI="http://www.eclipse.org/papyrus/0.7.0/SysML/Constraints">
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_YDK7cLVFEdu2ieF4ON8UjA" name="ConstraintBlock">
+ <generalization xmi:id="_dgUgoLVFEdu2ieF4ON8UjA" general="_8J2A8LVAEdu2ieF4ON8UjA"/>
+ <icon xmi:id="_Oy6msJarEd2oqf5htPjXnA" location="platform:/plugin/org.eclipse.papyrus.sysml/icons/constraints/ConstraintBlock.gif">
+ <eAnnotations xmi:id="_PcehEJarEd2oqf5htPjXnA" source="image_papyrus">
+ <details xmi:id="_PcehEZarEd2oqf5htPjXnA" key="image_kind_key" value="icon"/>
+ </eAnnotations>
+ </icon>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_Y9X54LVFEdu2ieF4ON8UjA" name="ConstraintProperty">
+ <ownedAttribute xmi:id="_F3b3UKG0Edyj2Ya50HPlXg" name="base_Property" isUnique="false" association="_F2AT8KG0Edyj2Ya50HPlXg">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Property"/>
+ </ownedAttribute>
+ <icon xmi:id="_TSAoMJarEd2oqf5htPjXnA" location="platform:/plugin/org.eclipse.papyrus.sysml/icons/constraints/ConstraintProperty.gif">
+ <eAnnotations xmi:id="_T2OIgJarEd2oqf5htPjXnA" source="image_papyrus">
+ <details xmi:id="_T2OIgZarEd2oqf5htPjXnA" key="image_kind_key" value="icon"/>
+ </eAnnotations>
+ </icon>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_F2AT8KG0Edyj2Ya50HPlXg" name="Extension_ConstraintProperty" memberEnd="_F3PqEKG0Edyj2Ya50HPlXg _F3b3UKG0Edyj2Ya50HPlXg">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_F3PqEKG0Edyj2Ya50HPlXg" name="extension_ConstraintProperty" type="_Y9X54LVFEdu2ieF4ON8UjA" aggregation="composite" association="_F2AT8KG0Edyj2Ya50HPlXg"/>
+ </packagedElement>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Profile" xmi:id="_C2zXMLX8EduFmqQsrNB9lw" name="Activities" URI="http://www.eclipse.org/papyrus/0.7.0/SysML/Activities">
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_1uhmQLXjEduHWpAaWjM62w" name="Optional">
+ <ownedAttribute xmi:id="_Cs5hMLXkEduHWpAaWjM62w" name="base_Parameter" isUnique="false" association="_CslYILXkEduHWpAaWjM62w">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Parameter"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_2a7ZQLXjEduHWpAaWjM62w" name="Rate">
+ <ownedAttribute xmi:id="_C-oKYLXkEduHWpAaWjM62w" name="base_Parameter" isUnique="false" association="_C-XrsLXkEduHWpAaWjM62w">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Parameter"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_DP0BALXkEduHWpAaWjM62w" name="base_ActivityEdge" isUnique="false" association="_DPssQLXkEduHWpAaWjM62w">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#ActivityEdge"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_YzasYLXkEduHWpAaWjM62w" name="rate" visibility="public" isUnique="false">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#InstanceSpecification"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_w53UsLX0Edu94_NE0EO5_A"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_w5_QgLX0Edu94_NE0EO5_A" value="1"/>
+ <defaultValue xmi:type="uml:LiteralString" xmi:id="_68ayALXkEduHWpAaWjM62w">
+ <value xsi:nil="true"/>
+ </defaultValue>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_3MEiULXjEduHWpAaWjM62w" name="Probability">
+ <ownedAttribute xmi:id="_Dlxp8LXkEduHWpAaWjM62w" name="base_ActivityEdge" isUnique="false" association="_DlqVMLXkEduHWpAaWjM62w">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#ActivityEdge"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_DzIJcLXkEduHWpAaWjM62w" name="base_ParameterSet" isUnique="false" association="_DyyyQLXkEduHWpAaWjM62w">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#ParameterSet"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_frTxQLXkEduHWpAaWjM62w" name="probability" visibility="public" isUnique="false">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#ValueSpecification"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_xbhQQLX0Edu94_NE0EO5_A"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_xbmIwLX0Edu94_NE0EO5_A" value="1"/>
+ <defaultValue xmi:type="uml:LiteralString" xmi:id="_9CuXMLXkEduHWpAaWjM62w">
+ <value xsi:nil="true"/>
+ </defaultValue>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_8X4f4LXjEduHWpAaWjM62w" name="Continuous">
+ <generalization xmi:id="_BsHZoLXkEduHWpAaWjM62w" general="_2a7ZQLXjEduHWpAaWjM62w"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_-N-e0LXjEduHWpAaWjM62w" name="Discrete">
+ <generalization xmi:id="_BcS08LXkEduHWpAaWjM62w" general="_2a7ZQLXjEduHWpAaWjM62w"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_CslYILXkEduHWpAaWjM62w" name="ParameterOptionnal" memberEnd="_CsppkLXkEduHWpAaWjM62w _Cs5hMLXkEduHWpAaWjM62w">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_CsppkLXkEduHWpAaWjM62w" name="extension_Optionnal" type="_1uhmQLXjEduHWpAaWjM62w" aggregation="composite" association="_CslYILXkEduHWpAaWjM62w"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_C-XrsLXkEduHWpAaWjM62w" name="ParameterRate" memberEnd="_C-b9ILXkEduHWpAaWjM62w _C-oKYLXkEduHWpAaWjM62w">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_C-b9ILXkEduHWpAaWjM62w" name="extension_Rate" type="_2a7ZQLXjEduHWpAaWjM62w" aggregation="composite" association="_C-XrsLXkEduHWpAaWjM62w"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_DPssQLXkEduHWpAaWjM62w" name="ActivityEdgeRate" memberEnd="_DPvIgLXkEduHWpAaWjM62w _DP0BALXkEduHWpAaWjM62w">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_DPvIgLXkEduHWpAaWjM62w" name="extension_Rate" type="_2a7ZQLXjEduHWpAaWjM62w" aggregation="composite" association="_DPssQLXkEduHWpAaWjM62w"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_DlqVMLXkEduHWpAaWjM62w" name="ActivityEdgeProbability" memberEnd="_DltYgLXkEduHWpAaWjM62w _Dlxp8LXkEduHWpAaWjM62w">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_DltYgLXkEduHWpAaWjM62w" name="extension_Probability" type="_3MEiULXjEduHWpAaWjM62w" aggregation="composite" association="_DlqVMLXkEduHWpAaWjM62w"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_DyyyQLXkEduHWpAaWjM62w" name="ParameterSetProbability" memberEnd="_Dy9KULXkEduHWpAaWjM62w _DzIJcLXkEduHWpAaWjM62w">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_Dy9KULXkEduHWpAaWjM62w" name="extension_Probability" type="_3MEiULXjEduHWpAaWjM62w" aggregation="composite" association="_DyyyQLXkEduHWpAaWjM62w"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_KngK0LXlEduHWpAaWjM62w" name="ControlOperator">
+ <ownedAttribute xmi:id="_b2g0gLXlEduHWpAaWjM62w" name="base_Operation" isUnique="false" association="_b2ZfwLXlEduHWpAaWjM62w">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Operation"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_cEMrMLXlEduHWpAaWjM62w" name="base_Behavior" isUnique="false" association="_cEEvYLXlEduHWpAaWjM62w">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Behavior"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_LClkULXlEduHWpAaWjM62w" name="NoBuffer">
+ <ownedAttribute xmi:id="_bbg6kLXlEduHWpAaWjM62w" name="base_ObjectNode" isUnique="false" association="_bbOmsLXlEduHWpAaWjM62w">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#ObjectNode"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_LZkg8LXlEduHWpAaWjM62w" name="Overwrite">
+ <ownedAttribute xmi:id="_a-uQ4LXlEduHWpAaWjM62w" name="base_ObjectNode" isUnique="false" association="_a-V2YLXlEduHWpAaWjM62w">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#ObjectNode"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_a-V2YLXlEduHWpAaWjM62w" name="ObjectNodeOverwrite" memberEnd="_a-Y5sLXlEduHWpAaWjM62w _a-uQ4LXlEduHWpAaWjM62w">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_a-Y5sLXlEduHWpAaWjM62w" name="extension_Overwrite" type="_LZkg8LXlEduHWpAaWjM62w" aggregation="composite" association="_a-V2YLXlEduHWpAaWjM62w"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_bbOmsLXlEduHWpAaWjM62w" name="ObjectNodeNoBuffer" memberEnd="_bbRqALXlEduHWpAaWjM62w _bbg6kLXlEduHWpAaWjM62w">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_bbRqALXlEduHWpAaWjM62w" name="extension_NoBuffer" type="_LClkULXlEduHWpAaWjM62w" aggregation="composite" association="_bbOmsLXlEduHWpAaWjM62w"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_b2ZfwLXlEduHWpAaWjM62w" name="OperationControlOperator" memberEnd="_b2cjELXlEduHWpAaWjM62w _b2g0gLXlEduHWpAaWjM62w">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_b2cjELXlEduHWpAaWjM62w" name="extension_ControlOperator" type="_KngK0LXlEduHWpAaWjM62w" aggregation="composite" association="_b2ZfwLXlEduHWpAaWjM62w"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_cEEvYLXlEduHWpAaWjM62w" name="BehaviorControlOperator" memberEnd="_cEHLoLXlEduHWpAaWjM62w _cEMrMLXlEduHWpAaWjM62w">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_cEHLoLXlEduHWpAaWjM62w" name="extension_ControlOperator" type="_KngK0LXlEduHWpAaWjM62w" aggregation="composite" association="_cEEvYLXlEduHWpAaWjM62w"/>
+ </packagedElement>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Profile" xmi:id="_NxdG4LX8EduFmqQsrNB9lw" name="Allocations" URI="http://www.eclipse.org/papyrus/0.7.0/SysML/Allocations">
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_HGNjcLXnEduHWpAaWjM62w" name="Allocate">
+ <ownedAttribute xmi:id="_xL5QILYFEdutJMhZXRvi7w" name="base_Abstraction" isUnique="false" association="_xLkgALYFEdutJMhZXRvi7w">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Abstraction"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_Hj0sgLXnEduHWpAaWjM62w" name="Allocated">
+ <ownedAttribute xmi:id="_NkvtILXnEduHWpAaWjM62w" name="base_NamedElement" isUnique="false" association="_NkSaILXnEduHWpAaWjM62w">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#NamedElement"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_Sj35kLXnEduHWpAaWjM62w" name="allocatedFrom" visibility="public" isUnique="false" isReadOnly="true" isDerived="true">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#NamedElement"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_ZwR14LXnEduHWpAaWjM62w"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_ZwZKoLXnEduHWpAaWjM62w" value="*"/>
+ <defaultValue xmi:type="uml:LiteralString" xmi:id="_VkmfoLXnEduHWpAaWjM62w">
+ <value xsi:nil="true"/>
+ </defaultValue>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_S07NULXnEduHWpAaWjM62w" name="allocatedTo" visibility="public" isUnique="false" isReadOnly="true" isDerived="true">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#NamedElement"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_ZGYkULXnEduHWpAaWjM62w"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_ZGdc0LXnEduHWpAaWjM62w" value="*"/>
+ <defaultValue xmi:type="uml:LiteralString" xmi:id="_XgyfgLXnEduHWpAaWjM62w">
+ <value xsi:nil="true"/>
+ </defaultValue>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_IMU28LXnEduHWpAaWjM62w" name="AllocateActivityPartition">
+ <ownedAttribute xmi:id="_NJulELXnEduHWpAaWjM62w" name="base_ActivityPartition" isUnique="false" association="_NJacALXnEduHWpAaWjM62w">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#ActivityPartition"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_NJacALXnEduHWpAaWjM62w" name="ActivityPartitionAllocateActivityPartition" memberEnd="_NJdfULXnEduHWpAaWjM62w _NJulELXnEduHWpAaWjM62w">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_NJdfULXnEduHWpAaWjM62w" name="extension_AllocateActivityPartition" type="_IMU28LXnEduHWpAaWjM62w" aggregation="composite" association="_NJacALXnEduHWpAaWjM62w"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_NkSaILXnEduHWpAaWjM62w" name="NamedElementAllocated" memberEnd="_NkVdcLXnEduHWpAaWjM62w _NkvtILXnEduHWpAaWjM62w">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_NkVdcLXnEduHWpAaWjM62w" name="extension_Allocated" type="_Hj0sgLXnEduHWpAaWjM62w" aggregation="composite" association="_NkSaILXnEduHWpAaWjM62w"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_xLkgALYFEdutJMhZXRvi7w" name="AbstractionAllocate" memberEnd="_xLyicLYFEdutJMhZXRvi7w _xL5QILYFEdutJMhZXRvi7w">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_xLyicLYFEdutJMhZXRvi7w" name="extension_Allocate" type="_HGNjcLXnEduHWpAaWjM62w" aggregation="composite" association="_xLkgALYFEdutJMhZXRvi7w"/>
+ </packagedElement>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Profile" xmi:id="_OOJC4LX8EduFmqQsrNB9lw" name="Requirements" URI="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements">
+ <ownedComment xmi:id="_BmpG8LXoEduHWpAaWjM62w" annotatedElement="_TZ_nULU5EduiKqCzJMWbGw">
+ <body>Trace instead of Abstraction in SysML specifications.</body>
+ </ownedComment>
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_LPnzYLXoEduHWpAaWjM62w" name="DeriveReqt">
+ <generalization xmi:id="_lr5SAKG1Edyj2Ya50HPlXg">
+ <general xmi:type="uml:Stereotype" href="pathmap://UML_PROFILES/Standard.profile.uml#Trace"/>
+ </generalization>
+ <icon xmi:id="__AeBoJaqEd2oqf5htPjXnA" location="platform:/plugin/org.eclipse.papyrus.sysml/icons/requirements/DeriveReqt.gif">
+ <eAnnotations xmi:id="__kO2AJaqEd2oqf5htPjXnA" source="image_papyrus">
+ <details xmi:id="__kO2AZaqEd2oqf5htPjXnA" key="image_kind_key" value="icon"/>
+ </eAnnotations>
+ </icon>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_Lop-cLXoEduHWpAaWjM62w" name="Verify">
+ <generalization xmi:id="_mRzbcKG1Edyj2Ya50HPlXg">
+ <general xmi:type="uml:Stereotype" href="pathmap://UML_PROFILES/Standard.profile.uml#Trace"/>
+ </generalization>
+ <icon xmi:id="_Kcv3sJarEd2oqf5htPjXnA" location="platform:/plugin/org.eclipse.papyrus.sysml/icons/requirements/Verify.gif">
+ <eAnnotations xmi:id="_LGnUEJarEd2oqf5htPjXnA" source="image_papyrus">
+ <details xmi:id="_LGxFEJarEd2oqf5htPjXnA" key="image_kind_key" value="icon"/>
+ </eAnnotations>
+ </icon>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_L8HF8LXoEduHWpAaWjM62w" name="Copy">
+ <generalization xmi:id="_m3h-sKG1Edyj2Ya50HPlXg">
+ <general xmi:type="uml:Stereotype" href="pathmap://UML_PROFILES/Standard.profile.uml#Trace"/>
+ </generalization>
+ <icon xmi:id="_6oq68JaqEd2oqf5htPjXnA" location="platform:/plugin/org.eclipse.papyrus.sysml/icons/requirements/Copy.gif">
+ <eAnnotations xmi:id="_7LYmcJaqEd2oqf5htPjXnA" source="image_papyrus">
+ <details xmi:id="_7LYmcZaqEd2oqf5htPjXnA" key="image_kind_key" value="icon"/>
+ </eAnnotations>
+ </icon>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_Mqyw4LXoEduHWpAaWjM62w" name="Satisfy">
+ <generalization xmi:id="_qvChAMq5Ed2earfX6q16xg">
+ <general xmi:type="uml:Stereotype" href="pathmap://UML_PROFILES/Standard.profile.uml#Trace"/>
+ </generalization>
+ <icon xmi:id="_Fsqz4JarEd2oqf5htPjXnA" location="platform:/plugin/org.eclipse.papyrus.sysml/icons/requirements/Satisfy.gif">
+ <eAnnotations xmi:id="_GTQSwJarEd2oqf5htPjXnA" source="image_papyrus">
+ <details xmi:id="_GTQSwZarEd2oqf5htPjXnA" key="image_kind_key" value="icon"/>
+ </eAnnotations>
+ </icon>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_Sb6wELXqEduHWpAaWjM62w" name="TestCase">
+ <ownedAttribute xmi:id="_WCq0ULXqEduHWpAaWjM62w" name="base_Behavior" isUnique="false" association="_WCfOILXqEduHWpAaWjM62w">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Behavior"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_WeiQ8LXqEduHWpAaWjM62w" name="base_Operation" isUnique="false" association="_WeNg0LXqEduHWpAaWjM62w">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Operation"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_zN7ToKG1Edyj2Ya50HPlXg" name="verifies" visibility="public" type="_xajygLXqEduHWpAaWjM62w" isUnique="false" isReadOnly="true" isDerived="true">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_38THQKG1Edyj2Ya50HPlXg"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_38ZN4KG1Edyj2Ya50HPlXg" value="*"/>
+ <defaultValue xmi:type="uml:LiteralString" xmi:id="_3MQxcKG1Edyj2Ya50HPlXg">
+ <value xsi:nil="true"/>
+ </defaultValue>
+ </ownedAttribute>
+ <icon xmi:id="_Hz8pcJarEd2oqf5htPjXnA" location="platform:/plugin/org.eclipse.papyrus.sysml/icons/requirements/TestCase.gif">
+ <eAnnotations xmi:id="_ITiIcJarEd2oqf5htPjXnA" source="image_papyrus">
+ <details xmi:id="_ITiIcZarEd2oqf5htPjXnA" key="image_kind_key" value="icon"/>
+ </eAnnotations>
+ </icon>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_WCfOILXqEduHWpAaWjM62w" name="BehaviorTestCase" memberEnd="_WCjfkLXqEduHWpAaWjM62w _WCq0ULXqEduHWpAaWjM62w">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_WCjfkLXqEduHWpAaWjM62w" name="extension_TestCase" type="_Sb6wELXqEduHWpAaWjM62w" aggregation="composite" association="_WCfOILXqEduHWpAaWjM62w"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_WeNg0LXqEduHWpAaWjM62w" name="OperationTestCase" memberEnd="_WeRLMLXqEduHWpAaWjM62w _WeiQ8LXqEduHWpAaWjM62w">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_WeRLMLXqEduHWpAaWjM62w" name="extension_TestCase" type="_Sb6wELXqEduHWpAaWjM62w" aggregation="composite" association="_WeNg0LXqEduHWpAaWjM62w"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_xajygLXqEduHWpAaWjM62w" name="Requirement">
+ <ownedAttribute xmi:id="_3DxdwLXqEduHWpAaWjM62w" name="text" visibility="public" isUnique="false">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_6I1KMLXqEduHWpAaWjM62w" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_6I6pwLXqEduHWpAaWjM62w" value="1"/>
+ <defaultValue xmi:type="uml:LiteralString" xmi:id="_6JDzsLXqEduHWpAaWjM62w">
+ <value xsi:nil="true"/>
+ </defaultValue>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_3YlQILXqEduHWpAaWjM62w" name="id" visibility="public" isUnique="false">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_82gRYLXqEduHWpAaWjM62w" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_82hfgLXqEduHWpAaWjM62w" value="1"/>
+ <defaultValue xmi:type="uml:LiteralString" xmi:id="_82itoLXqEduHWpAaWjM62w">
+ <value xsi:nil="true"/>
+ </defaultValue>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_3jp3sLXqEduHWpAaWjM62w" name="derived" visibility="public" type="_xajygLXqEduHWpAaWjM62w" isUnique="false" isReadOnly="true" isDerived="true">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_AyC54LXrEduHWpAaWjM62w"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_AyHyYLXrEduHWpAaWjM62w" value="*"/>
+ <defaultValue xmi:type="uml:LiteralString" xmi:id="_AC_bgLXrEduHWpAaWjM62w">
+ <value xsi:nil="true"/>
+ </defaultValue>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_3wFxMLXqEduHWpAaWjM62w" name="derivedFrom" visibility="public" type="_xajygLXqEduHWpAaWjM62w" isUnique="false" isReadOnly="true" isDerived="true">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_DjDB4LXrEduHWpAaWjM62w"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_DjJvkLXrEduHWpAaWjM62w" value="*"/>
+ <defaultValue xmi:type="uml:LiteralString" xmi:id="_DBZGULXrEduHWpAaWjM62w">
+ <value xsi:nil="true"/>
+ </defaultValue>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_FHcz4LXrEduHWpAaWjM62w" name="satisfiedBy" visibility="public" isUnique="false" isReadOnly="true" isDerived="true">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#NamedElement"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_MWueALXrEduHWpAaWjM62w"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_MW1ywLXrEduHWpAaWjM62w" value="*"/>
+ <defaultValue xmi:type="uml:LiteralString" xmi:id="_IKZAcLXrEduHWpAaWjM62w">
+ <value xsi:nil="true"/>
+ </defaultValue>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_F-KZcLXrEduHWpAaWjM62w" name="refinedBy" visibility="public" isUnique="false" isReadOnly="true" isDerived="true">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#NamedElement"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_M3wugLXrEduHWpAaWjM62w"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_M31nALXrEduHWpAaWjM62w" value="*"/>
+ <defaultValue xmi:type="uml:LiteralString" xmi:id="_KKjhYLXrEduHWpAaWjM62w">
+ <value xsi:nil="true"/>
+ </defaultValue>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_O6rBcLXrEduHWpAaWjM62w" name="tracedTo" visibility="public" isUnique="false" isReadOnly="true" isDerived="true">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#NamedElement"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_attxsLXrEduHWpAaWjM62w"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_at2UkLXrEduHWpAaWjM62w" value="*"/>
+ <defaultValue xmi:type="uml:LiteralString" xmi:id="_Qjs0wLXrEduHWpAaWjM62w">
+ <value xsi:nil="true"/>
+ </defaultValue>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_PHumALXrEduHWpAaWjM62w" name="verifiedBy" visibility="public" isUnique="false" isReadOnly="true" isDerived="true">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#NamedElement"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_aFCoILXrEduHWpAaWjM62w"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_aFIHsLXrEduHWpAaWjM62w" value="*"/>
+ <defaultValue xmi:type="uml:LiteralString" xmi:id="_R1wSgLXrEduHWpAaWjM62w">
+ <value xsi:nil="true"/>
+ </defaultValue>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_PStuALXrEduHWpAaWjM62w" name="master" visibility="public" type="_xajygLXqEduHWpAaWjM62w" isUnique="false" isReadOnly="true" isDerived="true">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_PxcPcA_rEd2d6-7wXQb4hQ"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_PxlZYA_rEd2d6-7wXQb4hQ" value="1"/>
+ <defaultValue xmi:type="uml:LiteralString" xmi:id="_Svy44LXrEduHWpAaWjM62w">
+ <value xsi:nil="true"/>
+ </defaultValue>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_tSTRwLXsEduHWpAaWjM62w" name="base_Class" isUnique="false" association="_tRNsoLXsEduHWpAaWjM62w">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
+ </ownedAttribute>
+ <icon xmi:id="_CEZFoJarEd2oqf5htPjXnA" location="platform:/plugin/org.eclipse.papyrus.sysml/icons/requirements/Requirement.gif">
+ <eAnnotations xmi:id="_CsUoUJarEd2oqf5htPjXnA" source="image_papyrus">
+ <details xmi:id="_CsUoUZarEd2oqf5htPjXnA" key="image_kind_key" value="icon"/>
+ </eAnnotations>
+ </icon>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_ypiHELXqEduHWpAaWjM62w" name="RequirementRelated">
+ <ownedAttribute xmi:id="_s4dOYLXsEduHWpAaWjM62w" name="base_NamedElement" isUnique="false" association="_s3V0ELXsEduHWpAaWjM62w">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#NamedElement"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_0nBtgLX1Edu94_NE0EO5_A" name="tracedFrom" visibility="public" type="_xajygLXqEduHWpAaWjM62w" isUnique="false" isReadOnly="true" isDerived="true">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_DO4HsLX2Edu94_NE0EO5_A"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_DO9nQLX2Edu94_NE0EO5_A" value="*"/>
+ <defaultValue xmi:type="uml:LiteralString" xmi:id="_3hjk8LX1Edu94_NE0EO5_A">
+ <value xsi:nil="true"/>
+ </defaultValue>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_0yJ_cLX1Edu94_NE0EO5_A" name="satisfies" visibility="public" type="_xajygLXqEduHWpAaWjM62w" isUnique="false" isReadOnly="true" isDerived="true">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_D2jywLX2Edu94_NE0EO5_A"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_D2pSULX2Edu94_NE0EO5_A" value="*"/>
+ <defaultValue xmi:type="uml:LiteralString" xmi:id="_6xIfULX1Edu94_NE0EO5_A">
+ <value xsi:nil="true"/>
+ </defaultValue>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_1AqVgLX1Edu94_NE0EO5_A" name="refines" visibility="public" type="_xajygLXqEduHWpAaWjM62w" isUnique="false" isReadOnly="true" isDerived="true">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_Epd2YLX2Edu94_NE0EO5_A"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_Epiu4LX2Edu94_NE0EO5_A" value="*"/>
+ <defaultValue xmi:type="uml:LiteralString" xmi:id="_4jXAMLX1Edu94_NE0EO5_A">
+ <value xsi:nil="true"/>
+ </defaultValue>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_56-VIMq4Ed2earfX6q16xg" name="verifies" visibility="public" type="_xajygLXqEduHWpAaWjM62w" isUnique="false" isReadOnly="true" isDerived="true">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_9PR-gMq4Ed2earfX6q16xg"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_9PbIcMq4Ed2earfX6q16xg" value="*"/>
+ <defaultValue xmi:type="uml:LiteralString" xmi:id="_Q73d4Mq5Ed2earfX6q16xg">
+ <value xsi:nil="true"/>
+ </defaultValue>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_s3V0ELXsEduHWpAaWjM62w" name="NamedElementRequirementRelated" memberEnd="_s32xcLXsEduHWpAaWjM62w _s4dOYLXsEduHWpAaWjM62w">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_s32xcLXsEduHWpAaWjM62w" name="extension_RequirementRelated" type="_ypiHELXqEduHWpAaWjM62w" aggregation="composite" association="_s3V0ELXsEduHWpAaWjM62w"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_tRNsoLXsEduHWpAaWjM62w" name="ClassRequirement" memberEnd="_tRfZcLXsEduHWpAaWjM62w _tSTRwLXsEduHWpAaWjM62w">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_tRfZcLXsEduHWpAaWjM62w" name="extension_Requirement" type="_xajygLXqEduHWpAaWjM62w" aggregation="composite" association="_tRNsoLXsEduHWpAaWjM62w"/>
+ </packagedElement>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Profile" xmi:id="_meOioLX8EduFmqQsrNB9lw" name="Interactions" URI="http://www.eclipse.org/papyrus/0.7.0/SysML/Interactions">
+ <ownedComment xmi:id="_YQ6KULXmEduHWpAaWjM62w">
+ <body>No stereotypes defined for interactions.</body>
+ </ownedComment>
+ <packagedElement xmi:type="uml:PrimitiveType" xmi:id="_MmIPsIY8Ed22f52x9jcYIQ" name="Dummy">
+ <ownedComment xmi:id="_MmIPsYY8Ed22f52x9jcYIQ">
+ <body>Dummy DataType, just added for code generation purpose.
+In other words, this data type for EMF generation of SysmlPackage and SysmlFactory
+java classes in the model code.
+
+Do not remove this !!!</body>
+ </ownedComment>
+ </packagedElement>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Profile" xmi:id="_nAF5kLX8EduFmqQsrNB9lw" name="StateMachines" URI="http://www.eclipse.org/papyrus/0.7.0/SysML/StateMachines">
+ <ownedComment xmi:id="_jYmQcLXmEduHWpAaWjM62w">
+ <body>No stereotypes defined for StateMachines.</body>
+ </ownedComment>
+ <packagedElement xmi:type="uml:PrimitiveType" xmi:id="_MbshUIY8Ed22f52x9jcYIQ" name="Dummy">
+ <ownedComment xmi:id="_MbshUYY8Ed22f52x9jcYIQ">
+ <body>Dummy DataType, just added for code generation purpose.
+In other words, this data type for EMF generation of SysmlPackage and SysmlFactory
+java classes in the model code.
+
+Do not remove this !!!</body>
+ </ownedComment>
+ </packagedElement>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Profile" xmi:id="_neZmMLX8EduFmqQsrNB9lw" name="UseCases" URI="http://www.eclipse.org/papyrus/0.7.0/SysML/UseCases">
+ <ownedComment xmi:id="_t3QAoLXmEduHWpAaWjM62w">
+ <body>No stereotypes defined for UseCases.</body>
+ </ownedComment>
+ <packagedElement xmi:type="uml:PrimitiveType" xmi:id="_MCXbUIY8Ed22f52x9jcYIQ" name="Dummy">
+ <ownedComment xmi:id="_MCXbUYY8Ed22f52x9jcYIQ">
+ <body>Dummy DataType, just added for code generation purpose.
+In other words, this data type for EMF generation of SysmlPackage and SysmlFactory
+java classes in the model code.
+
+Do not remove this !!!</body>
+ </ownedComment>
+ </packagedElement>
+ </packagedElement>
+ <packagedElement xmi:type="uml:PrimitiveType" xmi:id="_q7WXMIV3Ed2MZ72qAlfQ3A" name="Dummy">
+ <ownedComment xmi:id="_OQi_oIV3Ed2MZ72qAlfQ3A">
+ <body>Dummy DataType, just added for code generation purpose.
+In other words, this data type for EMF generation of SysmlPackage and SysmlFactory
+java classes in the model code.
+
+Do not remove this !!!</body>
+ </ownedComment>
+ </packagedElement>
+ <profileApplication xmi:id="_5GlvYAerEd22I9XGJS-A2Q">
+ <eAnnotations xmi:id="_6knzoAerEd22I9XGJS-A2Q" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="pathmap://UML_PROFILES/Ecore.profile.uml#_z1OFcHjqEdy8S4Cr8Rc_NA"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://UML_PROFILES/Ecore.profile.uml#_0"/>
+ </profileApplication>
+ </uml:Profile>
+ <Ecore:EPackage xmi:id="_B1O6gAesEd22I9XGJS-A2Q" base_Package="_TZ_nULU5EduiKqCzJMWbGw" packageName="sysml" nsPrefix="SysML" nsURI="http://www.eclipse.org/papyrus/0.7.0/SysML" basePackage="org.eclipse.papyrus" prefix="sysml"/>
+ <Ecore:EPackage xmi:id="_3pfbQAfXEd2QR6cYbtS0qQ" base_Package="_Gx8MgLX7EduFmqQsrNB9lw" packageName="modelelements" nsPrefix="ModelElements" nsURI="http://www.eclipse.org/papyrus/0.7.0/SysML/ModelElements" basePackage="org.eclipse.papyrus.sysml" prefix="modelelements"/>
+ <Ecore:EPackage xmi:id="_IwWr4AlUEd2igeYZcwolcw" base_Package="_fSw28LX7EduFmqQsrNB9lw" packageName="blocks" nsPrefix="Blocks" nsURI="http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks" basePackage="org.eclipse.papyrus.sysml" prefix="blocks"/>
+ <Ecore:EPackage xmi:id="_d1ggsAlUEd2igeYZcwolcw" base_Package="_rpx28LX7EduFmqQsrNB9lw" packageName="portandflows" nsPrefix="PortAndFlows" nsURI="http://www.eclipse.org/papyrus/0.7.0/SysML/PortAndFlows" basePackage="org.eclipse.papyrus.sysml" prefix="portandflows"/>
+ <Ecore:EPackage xmi:id="_rO6x0AlUEd2igeYZcwolcw" base_Package="_5WYJ0LX7EduFmqQsrNB9lw" packageName="constraints" nsPrefix="Constraints" nsURI="http://www.eclipse.org/papyrus/0.7.0/SysML/Constraints" basePackage="org.eclipse.papyrus.sysml" prefix="constraints"/>
+ <Ecore:EPackage xmi:id="_yQfXIAlUEd2igeYZcwolcw" base_Package="_C2zXMLX8EduFmqQsrNB9lw" packageName="activities" nsPrefix="Activities" nsURI="http://www.eclipse.org/papyrus/0.7.0/SysML/Activities" basePackage="org.eclipse.papyrus.sysml" prefix="activities"/>
+ <Ecore:EPackage xmi:id="_AMeJ0AlVEd2igeYZcwolcw" base_Package="_NxdG4LX8EduFmqQsrNB9lw" packageName="allocations" nsPrefix="Allocations" nsURI="http://www.eclipse.org/papyrus/0.7.0/SysML/Allocations" basePackage="org.eclipse.papyrus.sysml" prefix="allocations"/>
+ <Ecore:EPackage xmi:id="_F8-v4AlVEd2igeYZcwolcw" base_Package="_OOJC4LX8EduFmqQsrNB9lw" packageName="requirements" nsPrefix="Requirements" nsURI="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements" basePackage="org.eclipse.papyrus.sysml" prefix="requirements"/>
+ <Ecore:EPackage xmi:id="_OZvg0AlVEd2igeYZcwolcw" base_Package="_meOioLX8EduFmqQsrNB9lw" packageName="interactions" nsPrefix="Interactions" nsURI="http://www.eclipse.org/papyrus/0.7.0/SysML/Interactions" basePackage="org.eclipse.papyrus.sysml" prefix="interactions"/>
+ <Ecore:EPackage xmi:id="_UYsykAlVEd2igeYZcwolcw" base_Package="_nAF5kLX8EduFmqQsrNB9lw" packageName="statemachines" nsPrefix="StateMachines" nsURI="http://www.eclipse.org/papyrus/0.7.0/SysML/StateMachines" basePackage="org.eclipse.papyrus.sysml" prefix="statemachines"/>
+ <Ecore:EPackage xmi:id="_aw_xYAlVEd2igeYZcwolcw" base_Package="_neZmMLX8EduFmqQsrNB9lw" packageName="usecases" nsPrefix="UseCases" nsURI="http://www.eclipse.org/papyrus/0.7.0/SysML/UseCases" basePackage="org.eclipse.papyrus.sysml" prefix="usecases"/>
+ <Ecore:EReference xmi:id="_gYTVgBETEd2lltFUEAEueA" isTransient="true" isVolatile="true" base_Property="_3Qho8LU9Edu2ieF4ON8UjA"/>
+ <Ecore:EAttribute xmi:id="_nuL98BETEd2lltFUEAEueA" isTransient="true" isVolatile="true" base_Property="_TrY4ULVEEdu2ieF4ON8UjA"/>
+ <Ecore:EReference xmi:id="_vCiVUBETEd2lltFUEAEueA" isTransient="true" isVolatile="true" base_Property="_Sj35kLXnEduHWpAaWjM62w"/>
+ <Ecore:EReference xmi:id="_vsX8gBETEd2lltFUEAEueA" isTransient="true" isVolatile="true" base_Property="_S07NULXnEduHWpAaWjM62w"/>
+ <Ecore:EReference xmi:id="_2MezgBETEd2lltFUEAEueA" isTransient="true" isVolatile="true" base_Property="_zN7ToKG1Edyj2Ya50HPlXg"/>
+ <Ecore:EReference xmi:id="_6gNSgBETEd2lltFUEAEueA" isTransient="true" isVolatile="true" base_Property="_3jp3sLXqEduHWpAaWjM62w"/>
+ <Ecore:EReference xmi:id="_9TX9sBETEd2lltFUEAEueA" isTransient="true" isVolatile="true" base_Property="_3wFxMLXqEduHWpAaWjM62w"/>
+ <Ecore:EReference xmi:id="__o8G4BETEd2lltFUEAEueA" isTransient="true" isVolatile="true" base_Property="_FHcz4LXrEduHWpAaWjM62w"/>
+ <Ecore:EReference xmi:id="_CsuA8BEUEd2lltFUEAEueA" isTransient="true" isVolatile="true" base_Property="_F-KZcLXrEduHWpAaWjM62w"/>
+ <Ecore:EReference xmi:id="_F8uZIBEUEd2lltFUEAEueA" isTransient="true" isVolatile="true" base_Property="_O6rBcLXrEduHWpAaWjM62w"/>
+ <Ecore:EReference xmi:id="_JbEIQBEUEd2lltFUEAEueA" isTransient="true" isVolatile="true" base_Property="_PHumALXrEduHWpAaWjM62w"/>
+ <Ecore:EReference xmi:id="_MKgKABEUEd2lltFUEAEueA" isTransient="true" isVolatile="true" base_Property="_PStuALXrEduHWpAaWjM62w"/>
+ <Ecore:EReference xmi:id="_PQ9koBEUEd2lltFUEAEueA" isTransient="true" isVolatile="true" base_Property="_0nBtgLX1Edu94_NE0EO5_A"/>
+ <Ecore:EReference xmi:id="_SDRUMBEUEd2lltFUEAEueA" isTransient="true" isVolatile="true" base_Property="_0yJ_cLX1Edu94_NE0EO5_A"/>
+ <Ecore:EReference xmi:id="_U_zWwBEUEd2lltFUEAEueA" isTransient="true" isVolatile="true" base_Property="_1AqVgLX1Edu94_NE0EO5_A"/>
+ <Ecore:EDataType xmi:id="_uEM-gIV3Ed2MZ72qAlfQ3A" instanceClassName="java.lang.String" base_PrimitiveType="_q7WXMIV3Ed2MZ72qAlfQ3A" dataTypeName="Dummy"/>
+ <Ecore:EDataType xmi:id="_PODUMIY8Ed22f52x9jcYIQ" instanceClassName="java.lang.String" base_PrimitiveType="_MmIPsIY8Ed22f52x9jcYIQ" dataTypeName="Dummy"/>
+ <Ecore:EDataType xmi:id="_Q0twAIY8Ed22f52x9jcYIQ" instanceClassName="java.lang.String" base_PrimitiveType="_MbshUIY8Ed22f52x9jcYIQ" dataTypeName="Dummy"/>
+ <Ecore:EDataType xmi:id="_SRZJYIY8Ed22f52x9jcYIQ" instanceClassName="java.lang.String" base_PrimitiveType="_MCXbUIY8Ed22f52x9jcYIQ"/>
+ <Ecore:EReference xmi:id="_T8NCYMq5Ed2earfX6q16xg" isTransient="true" isVolatile="true" base_Property="_56-VIMq4Ed2earfX6q16xg"/>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.papyrus.sysml/model/sysml.ecore b/plugins/org.eclipse.papyrus.sysml/model/sysml.ecore
new file mode 100755
index 0000000..5854328
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/model/sysml.ecore
@@ -0,0 +1,283 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="sysml" nsURI="http://www.eclipse.org/papyrus/0.7.0/SysML" nsPrefix="SysML">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="OMG SysML V1.1 formal/2008-11-02
Trace instead of Abstraction in SysML specifications."/>
+ </eAnnotations>
+ <eClassifiers xsi:type="ecore:EDataType" name="Dummy" instanceClassName="java.lang.String"/>
+ <eSubpackages name="modelelements" nsURI="http://www.eclipse.org/papyrus/0.7.0/SysML/ModelElements"
+ nsPrefix="ModelElements">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="The supplier/target must be an element stereotyped by <<ViewPoint>>
The client/source must be an element stereotyped by <<View>>"/>
+ </eAnnotations>
+ <eClassifiers xsi:type="ecore:EClass" name="Conform">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="base_Dependency" ordered="false"
+ unique="false" lowerBound="1" eType="ecore:EClass platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Dependency"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="View">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="viewPoint" ordered="false"
+ unique="false" lowerBound="1" eType="#//modelelements/ViewPoint" changeable="false"
+ volatile="true" transient="true" derived="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="base_Package" ordered="false"
+ unique="false" lowerBound="1" eType="ecore:EClass platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Package"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="ViewPoint">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="base_Class" ordered="false"
+ unique="false" lowerBound="1" eType="ecore:EClass platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Class"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="stakeHolders" ordered="false"
+ unique="false" upperBound="-1" eType="ecore:EDataType platform:/plugin/org.eclipse.uml2.types/model/Types.ecore#//String"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="purpose" ordered="false"
+ unique="false" eType="ecore:EDataType platform:/plugin/org.eclipse.uml2.types/model/Types.ecore#//String"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="concerns" ordered="false"
+ unique="false" upperBound="-1" eType="ecore:EDataType platform:/plugin/org.eclipse.uml2.types/model/Types.ecore#//String"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="languages" ordered="false"
+ unique="false" upperBound="-1" eType="ecore:EDataType platform:/plugin/org.eclipse.uml2.types/model/Types.ecore#//String"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="methods" ordered="false"
+ unique="false" upperBound="-1" eType="ecore:EDataType platform:/plugin/org.eclipse.uml2.types/model/Types.ecore#//String"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Rationale">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="base_Comment" ordered="false"
+ unique="false" lowerBound="1" eType="ecore:EClass platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Comment"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Problem">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="base_Comment" ordered="false"
+ unique="false" lowerBound="1" eType="ecore:EClass platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Comment"/>
+ </eClassifiers>
+ </eSubpackages>
+ <eSubpackages name="blocks" nsURI="http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks"
+ nsPrefix="Blocks">
+ <eClassifiers xsi:type="ecore:EClass" name="Block">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="isEncapsulated" ordered="false"
+ unique="false" eType="ecore:EDataType platform:/plugin/org.eclipse.uml2.types/model/Types.ecore#//Boolean"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="base_Class" ordered="false"
+ unique="false" lowerBound="1" eType="ecore:EClass platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Class"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="DistributedProperty">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="base_Property" ordered="false"
+ unique="false" lowerBound="1" eType="ecore:EClass platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Property"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Dimension">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="base_InstanceSpecification"
+ ordered="false" unique="false" lowerBound="1" eType="ecore:EClass platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//InstanceSpecification"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Unit">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="base_InstanceSpecification"
+ ordered="false" unique="false" lowerBound="1" eType="ecore:EClass platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//InstanceSpecification"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="dimension" ordered="false"
+ unique="false" eType="#//blocks/Dimension"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="ValueType">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="base_DataType" ordered="false"
+ unique="false" lowerBound="1" eType="ecore:EClass platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//DataType"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="unit" ordered="false"
+ unique="false" eType="#//blocks/Unit"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="dimension" ordered="false"
+ unique="false" eType="#//blocks/Dimension"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="NestedConnectorEnd">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="propertyPath" unique="false"
+ lowerBound="1" upperBound="-1" eType="ecore:EClass platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Property"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="base_ConnectorEnd" ordered="false"
+ unique="false" lowerBound="1" eType="ecore:EClass platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//ConnectorEnd"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="ParticipantProperty">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="base_Property" ordered="false"
+ unique="false" lowerBound="1" eType="ecore:EClass platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Property"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="end" ordered="false"
+ unique="false" lowerBound="1" eType="ecore:EClass platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Property"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="ConnectorProperty">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="base_Property" ordered="false"
+ unique="false" lowerBound="1" eType="ecore:EClass platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Property"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="connector" ordered="false"
+ unique="false" lowerBound="1" eType="ecore:EClass platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Connector"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="BindingConnector">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="base_Connector" ordered="false"
+ unique="false" lowerBound="1" eType="ecore:EClass platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Connector"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="PropertySpecificType">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="base_Classifier" ordered="false"
+ unique="false" lowerBound="1" eType="ecore:EClass platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Classifier"/>
+ </eClassifiers>
+ </eSubpackages>
+ <eSubpackages name="portandflows" nsURI="http://www.eclipse.org/papyrus/0.7.0/SysML/PortAndFlows"
+ nsPrefix="PortAndFlows">
+ <eClassifiers xsi:type="ecore:EClass" name="FlowPort">
+ <eOperations name="getIcon" ordered="false" lowerBound="1" eType="ecore:EClass platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Image"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="base_Port" ordered="false"
+ unique="false" lowerBound="1" eType="ecore:EClass platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Port"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="isAtomic" ordered="false"
+ unique="false" lowerBound="1" eType="ecore:EDataType platform:/plugin/org.eclipse.uml2.types/model/Types.ecore#//Boolean"
+ changeable="false" volatile="true" transient="true" defaultValueLiteral="false"
+ derived="true"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="isConjugated" ordered="false"
+ unique="false" eType="ecore:EDataType platform:/plugin/org.eclipse.uml2.types/model/Types.ecore#//Boolean"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="direction" ordered="false"
+ unique="false" lowerBound="1" eType="#//portandflows/FlowDirection" defaultValueLiteral="inout"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EEnum" name="FlowDirection">
+ <eLiterals name="in"/>
+ <eLiterals name="out" value="1"/>
+ <eLiterals name="inout" value="2"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="FlowProperty">
+ <eOperations name="getIcon" ordered="false" lowerBound="1" eType="ecore:EClass platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Image"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="base_Property" ordered="false"
+ unique="false" lowerBound="1" eType="ecore:EClass platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Property"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="direction" ordered="false"
+ unique="false" lowerBound="1" eType="#//portandflows/FlowDirection" defaultValueLiteral="inout"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="FlowSpecification">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="base_Interface" ordered="false"
+ unique="false" lowerBound="1" eType="ecore:EClass platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Interface"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="ItemFlow">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="base_InformationFlow"
+ ordered="false" unique="false" lowerBound="1" eType="ecore:EClass platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//InformationFlow"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="itemProperty" ordered="false"
+ unique="false" eType="ecore:EClass platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Property"/>
+ </eClassifiers>
+ </eSubpackages>
+ <eSubpackages name="constraints" nsURI="http://www.eclipse.org/papyrus/0.7.0/SysML/Constraints"
+ nsPrefix="Constraints">
+ <eClassifiers xsi:type="ecore:EClass" name="ConstraintBlock" eSuperTypes="#//blocks/Block"/>
+ <eClassifiers xsi:type="ecore:EClass" name="ConstraintProperty">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="base_Property" ordered="false"
+ unique="false" lowerBound="1" eType="ecore:EClass platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Property"/>
+ </eClassifiers>
+ </eSubpackages>
+ <eSubpackages name="activities" nsURI="http://www.eclipse.org/papyrus/0.7.0/SysML/Activities"
+ nsPrefix="Activities">
+ <eClassifiers xsi:type="ecore:EClass" name="Optional">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="base_Parameter" ordered="false"
+ unique="false" lowerBound="1" eType="ecore:EClass platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Parameter"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Rate">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="base_Parameter" ordered="false"
+ unique="false" lowerBound="1" eType="ecore:EClass platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Parameter"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="base_ActivityEdge" ordered="false"
+ unique="false" lowerBound="1" eType="ecore:EClass platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//ActivityEdge"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="rate" ordered="false"
+ unique="false" eType="ecore:EClass platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//InstanceSpecification"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Probability">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="base_ActivityEdge" ordered="false"
+ unique="false" lowerBound="1" eType="ecore:EClass platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//ActivityEdge"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="base_ParameterSet" ordered="false"
+ unique="false" lowerBound="1" eType="ecore:EClass platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//ParameterSet"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="probability" ordered="false"
+ unique="false" eType="ecore:EClass platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//ValueSpecification"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Continuous" eSuperTypes="#//activities/Rate"/>
+ <eClassifiers xsi:type="ecore:EClass" name="Discrete" eSuperTypes="#//activities/Rate"/>
+ <eClassifiers xsi:type="ecore:EClass" name="ControlOperator">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="base_Operation" ordered="false"
+ unique="false" lowerBound="1" eType="ecore:EClass platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Operation"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="base_Behavior" ordered="false"
+ unique="false" lowerBound="1" eType="ecore:EClass platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Behavior"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="NoBuffer">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="base_ObjectNode" ordered="false"
+ unique="false" lowerBound="1" eType="ecore:EClass platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//ObjectNode"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Overwrite">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="base_ObjectNode" ordered="false"
+ unique="false" lowerBound="1" eType="ecore:EClass platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//ObjectNode"/>
+ </eClassifiers>
+ </eSubpackages>
+ <eSubpackages name="allocations" nsURI="http://www.eclipse.org/papyrus/0.7.0/SysML/Allocations"
+ nsPrefix="Allocations">
+ <eClassifiers xsi:type="ecore:EClass" name="Allocate">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="base_Abstraction" ordered="false"
+ unique="false" lowerBound="1" eType="ecore:EClass platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Abstraction"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Allocated">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="base_NamedElement" ordered="false"
+ unique="false" lowerBound="1" eType="ecore:EClass platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//NamedElement"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="allocatedFrom" ordered="false"
+ unique="false" upperBound="-1" eType="ecore:EClass platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//NamedElement"
+ changeable="false" volatile="true" transient="true" derived="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="allocatedTo" ordered="false"
+ unique="false" upperBound="-1" eType="ecore:EClass platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//NamedElement"
+ changeable="false" volatile="true" transient="true" derived="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="AllocateActivityPartition">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="base_ActivityPartition"
+ ordered="false" unique="false" lowerBound="1" eType="ecore:EClass platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//ActivityPartition"/>
+ </eClassifiers>
+ </eSubpackages>
+ <eSubpackages name="requirements" nsURI="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements"
+ nsPrefix="Requirements">
+ <eClassifiers xsi:type="ecore:EClass" name="DeriveReqt" eSuperTypes="platform:/plugin/org.eclipse.uml2.uml.profile.standard/model/Standard.ecore#//Trace"/>
+ <eClassifiers xsi:type="ecore:EClass" name="Verify" eSuperTypes="platform:/plugin/org.eclipse.uml2.uml.profile.standard/model/Standard.ecore#//Trace"/>
+ <eClassifiers xsi:type="ecore:EClass" name="Copy" eSuperTypes="platform:/plugin/org.eclipse.uml2.uml.profile.standard/model/Standard.ecore#//Trace"/>
+ <eClassifiers xsi:type="ecore:EClass" name="Satisfy" eSuperTypes="platform:/plugin/org.eclipse.uml2.uml.profile.standard/model/Standard.ecore#//Trace"/>
+ <eClassifiers xsi:type="ecore:EClass" name="TestCase">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="base_Behavior" ordered="false"
+ unique="false" lowerBound="1" eType="ecore:EClass platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Behavior"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="base_Operation" ordered="false"
+ unique="false" lowerBound="1" eType="ecore:EClass platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Operation"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="verifies" ordered="false"
+ unique="false" upperBound="-1" eType="#//requirements/Requirement" changeable="false"
+ volatile="true" transient="true" derived="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Requirement">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="text" ordered="false"
+ unique="false" lowerBound="1" eType="ecore:EDataType platform:/plugin/org.eclipse.uml2.types/model/Types.ecore#//String"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="id" ordered="false" unique="false"
+ lowerBound="1" eType="ecore:EDataType platform:/plugin/org.eclipse.uml2.types/model/Types.ecore#//String"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="derived" ordered="false"
+ unique="false" upperBound="-1" eType="#//requirements/Requirement" changeable="false"
+ volatile="true" transient="true" derived="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="derivedFrom" ordered="false"
+ unique="false" upperBound="-1" eType="#//requirements/Requirement" changeable="false"
+ volatile="true" transient="true" derived="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="satisfiedBy" ordered="false"
+ unique="false" upperBound="-1" eType="ecore:EClass platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//NamedElement"
+ changeable="false" volatile="true" transient="true" derived="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="refinedBy" ordered="false"
+ unique="false" upperBound="-1" eType="ecore:EClass platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//NamedElement"
+ changeable="false" volatile="true" transient="true" derived="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="tracedTo" ordered="false"
+ unique="false" upperBound="-1" eType="ecore:EClass platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//NamedElement"
+ changeable="false" volatile="true" transient="true" derived="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="verifiedBy" ordered="false"
+ unique="false" upperBound="-1" eType="ecore:EClass platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//NamedElement"
+ changeable="false" volatile="true" transient="true" derived="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="master" ordered="false"
+ unique="false" eType="#//requirements/Requirement" changeable="false" volatile="true"
+ transient="true" derived="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="base_Class" ordered="false"
+ unique="false" lowerBound="1" eType="ecore:EClass platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Class"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="RequirementRelated">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="base_NamedElement" ordered="false"
+ unique="false" lowerBound="1" eType="ecore:EClass platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//NamedElement"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="tracedFrom" ordered="false"
+ unique="false" upperBound="-1" eType="#//requirements/Requirement" changeable="false"
+ volatile="true" transient="true" derived="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="satisfies" ordered="false"
+ unique="false" upperBound="-1" eType="#//requirements/Requirement" changeable="false"
+ volatile="true" transient="true" derived="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="refines" ordered="false"
+ unique="false" upperBound="-1" eType="#//requirements/Requirement" changeable="false"
+ volatile="true" transient="true" derived="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="verifies" ordered="false"
+ unique="false" upperBound="-1" eType="#//requirements/Requirement" changeable="false"
+ volatile="true" transient="true" derived="true"/>
+ </eClassifiers>
+ </eSubpackages>
+ <eSubpackages name="interactions" nsURI="http://www.eclipse.org/papyrus/0.7.0/SysML/Interactions"
+ nsPrefix="Interactions">
+ <eClassifiers xsi:type="ecore:EDataType" name="Dummy" instanceClassName="java.lang.String"/>
+ </eSubpackages>
+ <eSubpackages name="statemachines" nsURI="http://www.eclipse.org/papyrus/0.7.0/SysML/StateMachines"
+ nsPrefix="StateMachines">
+ <eClassifiers xsi:type="ecore:EDataType" name="Dummy" instanceClassName="java.lang.String"/>
+ </eSubpackages>
+ <eSubpackages name="usecases" nsURI="http://www.eclipse.org/papyrus/0.7.0/SysML/UseCases"
+ nsPrefix="UseCases">
+ <eClassifiers xsi:type="ecore:EDataType" name="Dummy" instanceClassName="java.lang.String"/>
+ </eSubpackages>
+</ecore:EPackage>
diff --git a/plugins/org.eclipse.papyrus.sysml/org.eclipse.papyrus.sysml.iml b/plugins/org.eclipse.papyrus.sysml/org.eclipse.papyrus.sysml.iml
new file mode 100755
index 0000000..774509a
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/org.eclipse.papyrus.sysml.iml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+ <component name="NewModuleRootManager" inherit-compiler-output="false">
+ <output url="file://$MODULE_DIR$/bin" />
+ <exclude-output />
+ <content url="file://$MODULE_DIR$">
+ <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
+ </content>
+ <orderEntry type="sourceFolder" forTests="false" />
+ <orderEntry type="jdk" jdkName="J2SE-1.5" jdkType="JavaSDK" />
+ <orderEntry type="module" module-name="org.eclipse.papyrus.uml.extensionpoints" />
+ <orderEntry type="library" name="ECLIPSE" level="application" />
+ </component>
+</module>
\ No newline at end of file
diff --git a/plugins/org.eclipse.papyrus.sysml/plugin.properties b/plugins/org.eclipse.papyrus.sysml/plugin.properties
new file mode 100755
index 0000000..af26c35
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/plugin.properties
@@ -0,0 +1,12 @@
+#################################################################################
+# Copyright (c) 2010 CEA LIST.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - initial API and implementation
+##################################################################################
+pluginName=UML profile for SysML (from OMG SysML V1.1 formal/2008-11-02)
+providerName=Eclipse Modeling Project
diff --git a/plugins/org.eclipse.papyrus.sysml/plugin.xml b/plugins/org.eclipse.papyrus.sysml/plugin.xml
new file mode 100755
index 0000000..2bd09f8
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/plugin.xml
@@ -0,0 +1,206 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<!--
+ <copyright>
+ </copyright>
+
+ $Id$
+-->
+
+<plugin>
+
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <package
+ uri = "http://www.eclipse.org/papyrus/0.7.0/SysML"
+ class = "org.eclipse.papyrus.sysml.SysmlPackage"
+ genModel = "model/SysML.profile.genmodel" />
+ </extension>
+
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <!-- @generated SysML.profile -->
+ <package
+ uri="http://www.eclipse.org/papyrus/0.7.0/SysML/ModelElements"
+ class="org.eclipse.papyrus.sysml.modelelements.ModelelementsPackage"
+ genModel="model/SysML.profile.genmodel"/>
+ </extension>
+
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <!-- @generated SysML.profile -->
+ <package
+ uri="http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks"
+ class="org.eclipse.papyrus.sysml.blocks.BlocksPackage"
+ genModel="model/SysML.profile.genmodel"/>
+ </extension>
+
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <!-- @generated SysML.profile -->
+ <package
+ uri="http://www.eclipse.org/papyrus/0.7.0/SysML/PortAndFlows"
+ class="org.eclipse.papyrus.sysml.portandflows.PortandflowsPackage"
+ genModel="model/SysML.profile.genmodel"/>
+ </extension>
+
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <!-- @generated SysML.profile -->
+ <package
+ uri="http://www.eclipse.org/papyrus/0.7.0/SysML/Constraints"
+ class="org.eclipse.papyrus.sysml.constraints.ConstraintsPackage"
+ genModel="model/SysML.profile.genmodel"/>
+ </extension>
+
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <!-- @generated SysML.profile -->
+ <package
+ uri="http://www.eclipse.org/papyrus/0.7.0/SysML/Activities"
+ class="org.eclipse.papyrus.sysml.activities.ActivitiesPackage"
+ genModel="model/SysML.profile.genmodel"/>
+ </extension>
+
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <!-- @generated SysML.profile -->
+ <package
+ uri="http://www.eclipse.org/papyrus/0.7.0/SysML/Allocations"
+ class="org.eclipse.papyrus.sysml.allocations.AllocationsPackage"
+ genModel="model/SysML.profile.genmodel"/>
+ </extension>
+
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <!-- @generated SysML.profile -->
+ <package
+ uri="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements"
+ class="org.eclipse.papyrus.sysml.requirements.RequirementsPackage"
+ genModel="model/SysML.profile.genmodel"/>
+ </extension>
+
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <!-- @generated SysML.profile -->
+ <package
+ uri="http://www.eclipse.org/papyrus/0.7.0/SysML/Interactions"
+ class="org.eclipse.papyrus.sysml.interactions.InteractionsPackage"
+ genModel="model/SysML.profile.genmodel"/>
+ </extension>
+
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <!-- @generated SysML.profile -->
+ <package
+ uri="http://www.eclipse.org/papyrus/0.7.0/SysML/StateMachines"
+ class="org.eclipse.papyrus.sysml.statemachines.StatemachinesPackage"
+ genModel="model/SysML.profile.genmodel"/>
+ </extension>
+
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <!-- @generated SysML.profile -->
+ <package
+ uri="http://www.eclipse.org/papyrus/0.7.0/SysML/UseCases"
+ class="org.eclipse.papyrus.sysml.usecases.UsecasesPackage"
+ genModel="model/SysML.profile.genmodel"/>
+ </extension>
+
+
+ <extension
+ point="org.eclipse.uml2.uml.generated_package">
+ <profile
+ uri="http://www.eclipse.org/papyrus/0.7.0/SysML"
+ location="pathmap://SysML_PROFILES/SysML.profile.uml#_TZ_nULU5EduiKqCzJMWbGw"/>
+ </extension>
+
+
+ <extension
+ point="org.eclipse.uml2.uml.generated_package">
+ <profile
+ uri="http://www.eclipse.org/papyrus/0.7.0/SysML/ModelElements"
+ location="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </extension>
+
+ <extension
+ point="org.eclipse.uml2.uml.generated_package">
+ <profile
+ uri="http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks"
+ location="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </extension>
+
+ <extension
+ point="org.eclipse.uml2.uml.generated_package">
+ <profile
+ uri="http://www.eclipse.org/papyrus/0.7.0/SysML/PortAndFlows"
+ location="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/>
+ </extension>
+
+ <extension
+ point="org.eclipse.uml2.uml.generated_package">
+ <profile
+ uri="http://www.eclipse.org/papyrus/0.7.0/SysML/Constraints"
+ location="pathmap://SysML_PROFILES/SysML.profile.uml#_5WYJ0LX7EduFmqQsrNB9lw"/>
+ </extension>
+
+ <extension
+ point="org.eclipse.uml2.uml.generated_package">
+ <profile
+ uri="http://www.eclipse.org/papyrus/0.7.0/SysML/Activities"
+ location="pathmap://SysML_PROFILES/SysML.profile.uml#_C2zXMLX8EduFmqQsrNB9lw"/>
+ </extension>
+
+ <extension
+ point="org.eclipse.uml2.uml.generated_package">
+ <profile
+ uri="http://www.eclipse.org/papyrus/0.7.0/SysML/Allocations"
+ location="pathmap://SysML_PROFILES/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/>
+ </extension>
+
+ <extension
+ point="org.eclipse.uml2.uml.generated_package">
+ <profile
+ uri="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements"
+ location="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </extension>
+
+ <extension
+ point="org.eclipse.uml2.uml.generated_package">
+ <profile
+ uri="http://www.eclipse.org/papyrus/0.7.0/SysML/Interactions"
+ location="pathmap://SysML_PROFILES/SysML.profile.uml#_meOioLX8EduFmqQsrNB9lw"/>
+ </extension>
+
+ <extension
+ point="org.eclipse.uml2.uml.generated_package">
+ <profile
+ uri="http://www.eclipse.org/papyrus/0.7.0/SysML/StateMachines"
+ location="pathmap://SysML_PROFILES/SysML.profile.uml#_nAF5kLX8EduFmqQsrNB9lw"/>
+ </extension>
+ <extension
+ point="org.eclipse.uml2.uml.generated_package">
+ <profile
+ uri="http://www.eclipse.org/papyrus/0.7.0/SysML/UseCases"
+ location="pathmap://SysML_PROFILES/SysML.profile.uml#_neZmMLX8EduFmqQsrNB9lw"/>
+ </extension>
+ <extension
+ point="org.eclipse.emf.ecore.uri_mapping">
+ <mapping
+ source="pathmap://SysML_LIBRARIES/"
+ target="platform:/plugin/org.eclipse.papyrus.sysml/libraries/"/>
+ <mapping
+ source="pathmap://SysML_PROFILES/"
+ target="platform:/plugin/org.eclipse.papyrus.sysml/model/"/>
+ </extension>
+ <extension
+ point="org.eclipse.papyrus.uml.extensionpoints.UMLProfile">
+ <profile
+ description="UML profile for SysML (from OMG SysML V1.1 formal/2008-11-02)"
+ iconpath="icons/SysMLProfile.gif"
+ name="SysML"
+ path="pathmap://SysML_PROFILES/SysML.profile.uml"
+ provider="Eclipse Modeling Project">
+ </profile>
+ </extension>
+ <extension
+ point="org.eclipse.papyrus.uml.extensionpoints.UMLLibrary">
+ <library
+ description="UML profile for SysML (from OMG SysML V1.1 formal/2008-11-02)"
+ iconpath="icons/SysMLLibrary.gif"
+ name="SysMLPrimitiveTypes"
+ path="pathmap://SysML_LIBRARIES/SysMLPrimitiveTypes.uml"
+ provider="Eclipse Modeling Project">
+ </library>
+ </extension>
+</plugin>
diff --git a/plugins/org.eclipse.papyrus.sysml/pom.xml b/plugins/org.eclipse.papyrus.sysml/pom.xml
new file mode 100755
index 0000000..c0734de
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/pom.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>org.eclipse.papyrus.sysml</artifactId>
+ <groupId>org.eclipse.papyrus.sysml</groupId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.papyrus.sysml</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/SysmlFactory.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/SysmlFactory.java
new file mode 100755
index 0000000..700ffe2
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/SysmlFactory.java
@@ -0,0 +1,46 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml;
+
+import org.eclipse.emf.ecore.EFactory;
+
+/**
+ * <!-- begin-user-doc --> The <b>Factory</b> for the model. It provides a
+ * create method for each non-abstract class of the model. <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.SysmlPackage
+ * @generated
+ */
+public interface SysmlFactory extends EFactory {
+
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ SysmlFactory eINSTANCE = org.eclipse.papyrus.sysml.internal.impl.SysmlFactoryImpl.init();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the package supported by this factory.
+ * @generated
+ */
+ SysmlPackage getSysmlPackage();
+
+} // SysmlFactory
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/SysmlPackage.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/SysmlPackage.java
new file mode 100755
index 0000000..a8980ba
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/SysmlPackage.java
@@ -0,0 +1,128 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml;
+
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EPackage;
+
+/**
+ * <!-- begin-user-doc --> The <b>Package</b> for the model. It contains
+ * accessors for the meta objects to represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc --> <!-- begin-model-doc --> Version : 1.0 Based on OMG
+ * SysML Specification V1.0 (formal/2007-09-01) Trace instead of Abstraction in
+ * SysML specifications. <!-- end-model-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.SysmlFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface SysmlPackage extends EPackage {
+
+ /**
+ * <!-- begin-user-doc --> Defines literals for the meta objects that
+ * represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ interface Literals {
+
+ /**
+ * The meta object literal for the '<em>Dummy</em>' data type. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see java.lang.String
+ * @see org.eclipse.papyrus.sysml.internal.impl.SysmlPackageImpl#getDummy()
+ * @generated
+ */
+ EDataType DUMMY = eINSTANCE.getDummy();
+
+ }
+
+ /**
+ * The package name.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ String eNAME = "sysml";
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ String eNS_URI = "http://www.eclipse.org/papyrus/0.7.0/SysML";
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ String eNS_PREFIX = "SysML";
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ SysmlPackage eINSTANCE = org.eclipse.papyrus.sysml.internal.impl.SysmlPackageImpl.init();
+
+ /**
+ * The meta object id for the '<em>Dummy</em>' data type. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see java.lang.String
+ * @see org.eclipse.papyrus.sysml.internal.impl.SysmlPackageImpl#getDummy()
+ * @generated
+ */
+ int DUMMY = 0;
+
+ /**
+ * Returns the meta object for data type '{@link java.lang.String <em>Dummy</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for data type '<em>Dummy</em>'.
+ * @see java.lang.String
+ * @model instanceClass="java.lang.String"
+ * @generated
+ */
+ EDataType getDummy();
+
+ /**
+ * Returns the factory that creates the instances of the model. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the factory that creates the instances of the model.
+ * @generated
+ */
+ SysmlFactory getSysmlFactory();
+
+} // SysmlPackage
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/ActivitiesFactory.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/ActivitiesFactory.java
new file mode 100755
index 0000000..a7d3d71
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/ActivitiesFactory.java
@@ -0,0 +1,125 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.activities;
+
+import org.eclipse.emf.ecore.EFactory;
+
+/**
+ * <!-- begin-user-doc --> The <b>Factory</b> for the model. It provides a
+ * create method for each non-abstract class of the model. <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.activities.ActivitiesPackage
+ * @generated
+ */
+public interface ActivitiesFactory extends EFactory {
+
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ ActivitiesFactory eINSTANCE = org.eclipse.papyrus.sysml.activities.internal.impl.ActivitiesFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>Optional</em>'.
+ * <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Optional</em>'.
+ * @generated
+ */
+ Optional createOptional();
+
+ /**
+ * Returns a new object of class '<em>Continuous</em>'.
+ * <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Continuous</em>'.
+ * @generated
+ */
+ Continuous createContinuous();
+
+ /**
+ * Returns a new object of class '<em>Control Operator</em>'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Control Operator</em>'.
+ * @generated
+ */
+ ControlOperator createControlOperator();
+
+ /**
+ * Returns a new object of class '<em>Discrete</em>'.
+ * <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Discrete</em>'.
+ * @generated
+ */
+ Discrete createDiscrete();
+
+ /**
+ * Returns a new object of class '<em>No Buffer</em>'.
+ * <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>No Buffer</em>'.
+ * @generated
+ */
+ NoBuffer createNoBuffer();
+
+ /**
+ * Returns a new object of class '<em>Overwrite</em>'.
+ * <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Overwrite</em>'.
+ * @generated
+ */
+ Overwrite createOverwrite();
+
+ /**
+ * Returns a new object of class '<em>Probability</em>'.
+ * <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Probability</em>'.
+ * @generated
+ */
+ Probability createProbability();
+
+ /**
+ * Returns a new object of class '<em>Rate</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Rate</em>'.
+ * @generated
+ */
+ Rate createRate();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the package supported by this factory.
+ * @generated
+ */
+ ActivitiesPackage getActivitiesPackage();
+
+} // ActivitiesFactory
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/ActivitiesPackage.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/ActivitiesPackage.java
new file mode 100755
index 0000000..c9234e8
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/ActivitiesPackage.java
@@ -0,0 +1,870 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.activities;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+/**
+ * <!-- begin-user-doc --> The <b>Package</b> for the model. It contains
+ * accessors for the meta objects to represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.activities.ActivitiesFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface ActivitiesPackage extends EPackage {
+
+ /**
+ * <!-- begin-user-doc --> Defines literals for the meta objects that
+ * represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ interface Literals {
+
+ /**
+ * The meta object literal for the ' {@link org.eclipse.papyrus.sysml.activities.internal.impl.OptionalImpl
+ * <em>Optional</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @see org.eclipse.papyrus.sysml.activities.internal.impl.OptionalImpl
+ * @see org.eclipse.papyrus.sysml.activities.internal.impl.ActivitiesPackageImpl#getOptional()
+ * @generated
+ */
+ EClass OPTIONAL = eINSTANCE.getOptional();
+
+ /**
+ * The meta object literal for the '<em><b>Base Parameter</b></em>' reference feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference OPTIONAL__BASE_PARAMETER = eINSTANCE.getOptional_Base_Parameter();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.sysml.activities.internal.impl.RateImpl <em>Rate</em>}' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.activities.internal.impl.RateImpl
+ * @see org.eclipse.papyrus.sysml.activities.internal.impl.ActivitiesPackageImpl#getRate()
+ * @generated
+ */
+ EClass RATE = eINSTANCE.getRate();
+
+ /**
+ * The meta object literal for the '<em><b>Base Parameter</b></em>' reference feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference RATE__BASE_PARAMETER = eINSTANCE.getRate_Base_Parameter();
+
+ /**
+ * The meta object literal for the '<em><b>Base Activity Edge</b></em>' reference feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference RATE__BASE_ACTIVITY_EDGE = eINSTANCE.getRate_Base_ActivityEdge();
+
+ /**
+ * The meta object literal for the '<em><b>Rate</b></em>' reference feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference RATE__RATE = eINSTANCE.getRate_Rate();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.sysml.activities.internal.impl.ProbabilityImpl <em>Probability</em>}' class.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.activities.internal.impl.ProbabilityImpl
+ * @see org.eclipse.papyrus.sysml.activities.internal.impl.ActivitiesPackageImpl#getProbability()
+ * @generated
+ */
+ EClass PROBABILITY = eINSTANCE.getProbability();
+
+ /**
+ * The meta object literal for the '<em><b>Base Activity Edge</b></em>' reference feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference PROBABILITY__BASE_ACTIVITY_EDGE = eINSTANCE.getProbability_Base_ActivityEdge();
+
+ /**
+ * The meta object literal for the '<em><b>Base Parameter Set</b></em>' reference feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference PROBABILITY__BASE_PARAMETER_SET = eINSTANCE.getProbability_Base_ParameterSet();
+
+ /**
+ * The meta object literal for the '<em><b>Probability</b></em>' reference feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference PROBABILITY__PROBABILITY = eINSTANCE.getProbability_Probability();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.sysml.activities.internal.impl.ContinuousImpl <em>Continuous</em>}' class.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.activities.internal.impl.ContinuousImpl
+ * @see org.eclipse.papyrus.sysml.activities.internal.impl.ActivitiesPackageImpl#getContinuous()
+ * @generated
+ */
+ EClass CONTINUOUS = eINSTANCE.getContinuous();
+
+ /**
+ * The meta object literal for the ' {@link org.eclipse.papyrus.sysml.activities.internal.impl.DiscreteImpl
+ * <em>Discrete</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @see org.eclipse.papyrus.sysml.activities.internal.impl.DiscreteImpl
+ * @see org.eclipse.papyrus.sysml.activities.internal.impl.ActivitiesPackageImpl#getDiscrete()
+ * @generated
+ */
+ EClass DISCRETE = eINSTANCE.getDiscrete();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.sysml.activities.internal.impl.ControlOperatorImpl <em>Control Operator</em>}'
+ * class.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.activities.internal.impl.ControlOperatorImpl
+ * @see org.eclipse.papyrus.sysml.activities.internal.impl.ActivitiesPackageImpl#getControlOperator()
+ * @generated
+ */
+ EClass CONTROL_OPERATOR = eINSTANCE.getControlOperator();
+
+ /**
+ * The meta object literal for the '<em><b>Base Operation</b></em>' reference feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference CONTROL_OPERATOR__BASE_OPERATION = eINSTANCE.getControlOperator_Base_Operation();
+
+ /**
+ * The meta object literal for the '<em><b>Base Behavior</b></em>' reference feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference CONTROL_OPERATOR__BASE_BEHAVIOR = eINSTANCE.getControlOperator_Base_Behavior();
+
+ /**
+ * The meta object literal for the ' {@link org.eclipse.papyrus.sysml.activities.internal.impl.NoBufferImpl
+ * <em>No Buffer</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @see org.eclipse.papyrus.sysml.activities.internal.impl.NoBufferImpl
+ * @see org.eclipse.papyrus.sysml.activities.internal.impl.ActivitiesPackageImpl#getNoBuffer()
+ * @generated
+ */
+ EClass NO_BUFFER = eINSTANCE.getNoBuffer();
+
+ /**
+ * The meta object literal for the '<em><b>Base Object Node</b></em>' reference feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference NO_BUFFER__BASE_OBJECT_NODE = eINSTANCE.getNoBuffer_Base_ObjectNode();
+
+ /**
+ * The meta object literal for the ' {@link org.eclipse.papyrus.sysml.activities.internal.impl.OverwriteImpl
+ * <em>Overwrite</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @see org.eclipse.papyrus.sysml.activities.internal.impl.OverwriteImpl
+ * @see org.eclipse.papyrus.sysml.activities.internal.impl.ActivitiesPackageImpl#getOverwrite()
+ * @generated
+ */
+ EClass OVERWRITE = eINSTANCE.getOverwrite();
+
+ /**
+ * The meta object literal for the '<em><b>Base Object Node</b></em>' reference feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference OVERWRITE__BASE_OBJECT_NODE = eINSTANCE.getOverwrite_Base_ObjectNode();
+
+ }
+
+ /**
+ * The package name.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ String eNAME = "activities";
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ String eNS_URI = "http://www.eclipse.org/papyrus/0.7.0/SysML/Activities";
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ String eNS_PREFIX = "Activities";
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ ActivitiesPackage eINSTANCE = org.eclipse.papyrus.sysml.activities.internal.impl.ActivitiesPackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.sysml.activities.internal.impl.OptionalImpl <em>Optional</em>}' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.activities.internal.impl.OptionalImpl
+ * @see org.eclipse.papyrus.sysml.activities.internal.impl.ActivitiesPackageImpl#getOptional()
+ * @generated
+ */
+ int OPTIONAL = 0;
+
+ /**
+ * The feature id for the '<em><b>Base Parameter</b></em>' reference. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int OPTIONAL__BASE_PARAMETER = 0;
+
+ /**
+ * The number of structural features of the '<em>Optional</em>' class. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int OPTIONAL_FEATURE_COUNT = 1;
+
+ /**
+ * The number of operations of the '<em>Optional</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int OPTIONAL_OPERATION_COUNT = 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.sysml.activities.internal.impl.RateImpl <em>Rate</em>}' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.activities.internal.impl.RateImpl
+ * @see org.eclipse.papyrus.sysml.activities.internal.impl.ActivitiesPackageImpl#getRate()
+ * @generated
+ */
+ int RATE = 1;
+
+ /**
+ * The feature id for the '<em><b>Base Parameter</b></em>' reference. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int RATE__BASE_PARAMETER = 0;
+
+ /**
+ * The feature id for the '<em><b>Base Activity Edge</b></em>' reference.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int RATE__BASE_ACTIVITY_EDGE = 1;
+
+ /**
+ * The feature id for the '<em><b>Rate</b></em>' reference. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int RATE__RATE = 2;
+
+ /**
+ * The number of structural features of the '<em>Rate</em>' class. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int RATE_FEATURE_COUNT = 3;
+
+ /**
+ * The number of operations of the '<em>Rate</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int RATE_OPERATION_COUNT = 0;
+
+ /**
+ * The meta object id for the ' {@link org.eclipse.papyrus.sysml.activities.internal.impl.ProbabilityImpl
+ * <em>Probability</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @see org.eclipse.papyrus.sysml.activities.internal.impl.ProbabilityImpl
+ * @see org.eclipse.papyrus.sysml.activities.internal.impl.ActivitiesPackageImpl#getProbability()
+ * @generated
+ */
+ int PROBABILITY = 2;
+
+ /**
+ * The feature id for the '<em><b>Base Activity Edge</b></em>' reference.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int PROBABILITY__BASE_ACTIVITY_EDGE = 0;
+
+ /**
+ * The feature id for the '<em><b>Base Parameter Set</b></em>' reference.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int PROBABILITY__BASE_PARAMETER_SET = 1;
+
+ /**
+ * The feature id for the '<em><b>Probability</b></em>' reference. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int PROBABILITY__PROBABILITY = 2;
+
+ /**
+ * The number of structural features of the '<em>Probability</em>' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int PROBABILITY_FEATURE_COUNT = 3;
+
+ /**
+ * The number of operations of the '<em>Probability</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int PROBABILITY_OPERATION_COUNT = 0;
+
+ /**
+ * The meta object id for the ' {@link org.eclipse.papyrus.sysml.activities.internal.impl.ContinuousImpl
+ * <em>Continuous</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @see org.eclipse.papyrus.sysml.activities.internal.impl.ContinuousImpl
+ * @see org.eclipse.papyrus.sysml.activities.internal.impl.ActivitiesPackageImpl#getContinuous()
+ * @generated
+ */
+ int CONTINUOUS = 3;
+
+ /**
+ * The feature id for the '<em><b>Base Parameter</b></em>' reference. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int CONTINUOUS__BASE_PARAMETER = RATE__BASE_PARAMETER;
+
+ /**
+ * The feature id for the '<em><b>Base Activity Edge</b></em>' reference.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int CONTINUOUS__BASE_ACTIVITY_EDGE = RATE__BASE_ACTIVITY_EDGE;
+
+ /**
+ * The feature id for the '<em><b>Rate</b></em>' reference. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int CONTINUOUS__RATE = RATE__RATE;
+
+ /**
+ * The number of structural features of the '<em>Continuous</em>' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int CONTINUOUS_FEATURE_COUNT = RATE_FEATURE_COUNT + 0;
+
+ /**
+ * The number of operations of the '<em>Continuous</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int CONTINUOUS_OPERATION_COUNT = RATE_OPERATION_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.sysml.activities.internal.impl.DiscreteImpl <em>Discrete</em>}' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.activities.internal.impl.DiscreteImpl
+ * @see org.eclipse.papyrus.sysml.activities.internal.impl.ActivitiesPackageImpl#getDiscrete()
+ * @generated
+ */
+ int DISCRETE = 4;
+
+ /**
+ * The feature id for the '<em><b>Base Parameter</b></em>' reference. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int DISCRETE__BASE_PARAMETER = RATE__BASE_PARAMETER;
+
+ /**
+ * The feature id for the '<em><b>Base Activity Edge</b></em>' reference.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int DISCRETE__BASE_ACTIVITY_EDGE = RATE__BASE_ACTIVITY_EDGE;
+
+ /**
+ * The feature id for the '<em><b>Rate</b></em>' reference. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int DISCRETE__RATE = RATE__RATE;
+
+ /**
+ * The number of structural features of the '<em>Discrete</em>' class. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int DISCRETE_FEATURE_COUNT = RATE_FEATURE_COUNT + 0;
+
+ /**
+ * The number of operations of the '<em>Discrete</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int DISCRETE_OPERATION_COUNT = RATE_OPERATION_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.sysml.activities.internal.impl.ControlOperatorImpl <em>Control Operator</em>}' class.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.activities.internal.impl.ControlOperatorImpl
+ * @see org.eclipse.papyrus.sysml.activities.internal.impl.ActivitiesPackageImpl#getControlOperator()
+ * @generated
+ */
+ int CONTROL_OPERATOR = 5;
+
+ /**
+ * The feature id for the '<em><b>Base Operation</b></em>' reference. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int CONTROL_OPERATOR__BASE_OPERATION = 0;
+
+ /**
+ * The feature id for the '<em><b>Base Behavior</b></em>' reference. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int CONTROL_OPERATOR__BASE_BEHAVIOR = 1;
+
+ /**
+ * The number of structural features of the '<em>Control Operator</em>' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int CONTROL_OPERATOR_FEATURE_COUNT = 2;
+
+ /**
+ * The number of operations of the '<em>Control Operator</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int CONTROL_OPERATOR_OPERATION_COUNT = 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.sysml.activities.internal.impl.NoBufferImpl <em>No Buffer</em>}' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.activities.internal.impl.NoBufferImpl
+ * @see org.eclipse.papyrus.sysml.activities.internal.impl.ActivitiesPackageImpl#getNoBuffer()
+ * @generated
+ */
+ int NO_BUFFER = 6;
+
+ /**
+ * The feature id for the '<em><b>Base Object Node</b></em>' reference. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int NO_BUFFER__BASE_OBJECT_NODE = 0;
+
+ /**
+ * The number of structural features of the '<em>No Buffer</em>' class. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int NO_BUFFER_FEATURE_COUNT = 1;
+
+ /**
+ * The number of operations of the '<em>No Buffer</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int NO_BUFFER_OPERATION_COUNT = 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.sysml.activities.internal.impl.OverwriteImpl <em>Overwrite</em>}' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.activities.internal.impl.OverwriteImpl
+ * @see org.eclipse.papyrus.sysml.activities.internal.impl.ActivitiesPackageImpl#getOverwrite()
+ * @generated
+ */
+ int OVERWRITE = 7;
+
+ /**
+ * The feature id for the '<em><b>Base Object Node</b></em>' reference. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int OVERWRITE__BASE_OBJECT_NODE = 0;
+
+ /**
+ * The number of structural features of the '<em>Overwrite</em>' class. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int OVERWRITE_FEATURE_COUNT = 1;
+
+ /**
+ * The number of operations of the '<em>Overwrite</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int OVERWRITE_OPERATION_COUNT = 0;
+
+ /**
+ * Returns the factory that creates the instances of the model. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the factory that creates the instances of the model.
+ * @generated
+ */
+ ActivitiesFactory getActivitiesFactory();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.sysml.activities.Continuous <em>Continuous</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Continuous</em>'.
+ * @see org.eclipse.papyrus.sysml.activities.Continuous
+ * @generated
+ */
+ EClass getContinuous();
+
+ /**
+ * Returns the meta object for class ' {@link org.eclipse.papyrus.sysml.activities.ControlOperator
+ * <em>Control Operator</em>}'. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @return the meta object for class '<em>Control Operator</em>'.
+ * @see org.eclipse.papyrus.sysml.activities.ControlOperator
+ * @generated
+ */
+ EClass getControlOperator();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.sysml.activities.ControlOperator#getBase_Behavior <em>Base Behavior</em>} '.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference '<em>Base Behavior</em>'.
+ * @see org.eclipse.papyrus.sysml.activities.ControlOperator#getBase_Behavior()
+ * @see #getControlOperator()
+ * @generated
+ */
+ EReference getControlOperator_Base_Behavior();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.sysml.activities.ControlOperator#getBase_Operation
+ * <em>Base Operation</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference '<em>Base Operation</em>'.
+ * @see org.eclipse.papyrus.sysml.activities.ControlOperator#getBase_Operation()
+ * @see #getControlOperator()
+ * @generated
+ */
+ EReference getControlOperator_Base_Operation();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.sysml.activities.Discrete <em>Discrete</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Discrete</em>'.
+ * @see org.eclipse.papyrus.sysml.activities.Discrete
+ * @generated
+ */
+ EClass getDiscrete();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.sysml.activities.NoBuffer <em>No Buffer</em>}'.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @return the meta object for class '<em>No Buffer</em>'.
+ * @see org.eclipse.papyrus.sysml.activities.NoBuffer
+ * @generated
+ */
+ EClass getNoBuffer();
+
+ /**
+ * Returns the meta object for the reference ' {@link org.eclipse.papyrus.sysml.activities.NoBuffer#getBase_ObjectNode
+ * <em>Base Object Node</em>}'. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @return the meta object for the reference '<em>Base Object Node</em>'.
+ * @see org.eclipse.papyrus.sysml.activities.NoBuffer#getBase_ObjectNode()
+ * @see #getNoBuffer()
+ * @generated
+ */
+ EReference getNoBuffer_Base_ObjectNode();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.sysml.activities.Optional <em>Optional</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Optional</em>'.
+ * @see org.eclipse.papyrus.sysml.activities.Optional
+ * @generated
+ */
+ EClass getOptional();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.sysml.activities.Optional#getBase_Parameter <em>Base Parameter</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference '<em>Base Parameter</em>'.
+ * @see org.eclipse.papyrus.sysml.activities.Optional#getBase_Parameter()
+ * @see #getOptional()
+ * @generated
+ */
+ EReference getOptional_Base_Parameter();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.sysml.activities.Overwrite <em>Overwrite</em>}'.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @return the meta object for class '<em>Overwrite</em>'.
+ * @see org.eclipse.papyrus.sysml.activities.Overwrite
+ * @generated
+ */
+ EClass getOverwrite();
+
+ /**
+ * Returns the meta object for the reference ' {@link org.eclipse.papyrus.sysml.activities.Overwrite#getBase_ObjectNode
+ * <em>Base Object Node</em>}'. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @return the meta object for the reference '<em>Base Object Node</em>'.
+ * @see org.eclipse.papyrus.sysml.activities.Overwrite#getBase_ObjectNode()
+ * @see #getOverwrite()
+ * @generated
+ */
+ EReference getOverwrite_Base_ObjectNode();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.sysml.activities.Probability <em>Probability</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Probability</em>'.
+ * @see org.eclipse.papyrus.sysml.activities.Probability
+ * @generated
+ */
+ EClass getProbability();
+
+ /**
+ * Returns the meta object for the reference ' {@link org.eclipse.papyrus.sysml.activities.Probability#getBase_ActivityEdge
+ * <em>Base Activity Edge</em>}'. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @return the meta object for the reference '<em>Base Activity Edge</em>'.
+ * @see org.eclipse.papyrus.sysml.activities.Probability#getBase_ActivityEdge()
+ * @see #getProbability()
+ * @generated
+ */
+ EReference getProbability_Base_ActivityEdge();
+
+ /**
+ * Returns the meta object for the reference ' {@link org.eclipse.papyrus.sysml.activities.Probability#getBase_ParameterSet
+ * <em>Base Parameter Set</em>}'. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @return the meta object for the reference '<em>Base Parameter Set</em>'.
+ * @see org.eclipse.papyrus.sysml.activities.Probability#getBase_ParameterSet()
+ * @see #getProbability()
+ * @generated
+ */
+ EReference getProbability_Base_ParameterSet();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.sysml.activities.Probability#getProbability <em>Probability</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference '<em>Probability</em>'.
+ * @see org.eclipse.papyrus.sysml.activities.Probability#getProbability()
+ * @see #getProbability()
+ * @generated
+ */
+ EReference getProbability_Probability();
+
+ /**
+ * Returns the meta object for class ' {@link org.eclipse.papyrus.sysml.activities.Rate <em>Rate</em>}'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Rate</em>'.
+ * @see org.eclipse.papyrus.sysml.activities.Rate
+ * @generated
+ */
+ EClass getRate();
+
+ /**
+ * Returns the meta object for the reference ' {@link org.eclipse.papyrus.sysml.activities.Rate#getBase_ActivityEdge
+ * <em>Base Activity Edge</em>}'. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @return the meta object for the reference '<em>Base Activity Edge</em>'.
+ * @see org.eclipse.papyrus.sysml.activities.Rate#getBase_ActivityEdge()
+ * @see #getRate()
+ * @generated
+ */
+ EReference getRate_Base_ActivityEdge();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.sysml.activities.Rate#getBase_Parameter <em>Base Parameter</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference '<em>Base Parameter</em>'.
+ * @see org.eclipse.papyrus.sysml.activities.Rate#getBase_Parameter()
+ * @see #getRate()
+ * @generated
+ */
+ EReference getRate_Base_Parameter();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.sysml.activities.Rate#getRate <em>Rate</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference '<em>Rate</em>'.
+ * @see org.eclipse.papyrus.sysml.activities.Rate#getRate()
+ * @see #getRate()
+ * @generated
+ */
+ EReference getRate_Rate();
+
+} // ActivitiesPackage
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/Continuous.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/Continuous.java
new file mode 100755
index 0000000..146f079
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/Continuous.java
@@ -0,0 +1,25 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.activities;
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object ' <em><b>Continuous</b></em>'. <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.papyrus.sysml.activities.ActivitiesPackage#getContinuous()
+ * @model
+ * @generated
+ */
+public interface Continuous extends Rate {
+} // Continuous
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/ControlOperator.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/ControlOperator.java
new file mode 100755
index 0000000..b845a5c
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/ControlOperator.java
@@ -0,0 +1,93 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.activities;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.uml2.uml.Behavior;
+import org.eclipse.uml2.uml.Operation;
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object ' <em><b>Control Operator</b></em>'. <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.activities.ControlOperator#getBase_Operation <em>Base Operation</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.activities.ControlOperator#getBase_Behavior <em>Base Behavior</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.sysml.activities.ActivitiesPackage#getControlOperator()
+ * @model
+ * @generated
+ */
+public interface ControlOperator extends EObject {
+
+ /**
+ * Returns the value of the '<em><b>Base Behavior</b></em>' reference. <!--
+ * begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Base Behavior</em>' reference isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Base Behavior</em>' reference.
+ * @see #setBase_Behavior(Behavior)
+ * @see org.eclipse.papyrus.sysml.activities.ActivitiesPackage#getControlOperator_Base_Behavior()
+ * @model required="true" ordered="false"
+ * @generated
+ */
+ Behavior getBase_Behavior();
+
+ /**
+ * Returns the value of the '<em><b>Base Operation</b></em>' reference. <!--
+ * begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Base Operation</em>' reference isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Base Operation</em>' reference.
+ * @see #setBase_Operation(Operation)
+ * @see org.eclipse.papyrus.sysml.activities.ActivitiesPackage#getControlOperator_Base_Operation()
+ * @model required="true" ordered="false"
+ * @generated
+ */
+ Operation getBase_Operation();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.sysml.activities.ControlOperator#getBase_Behavior <em>Base Behavior</em>}' reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Base Behavior</em>' reference.
+ * @see #getBase_Behavior()
+ * @generated
+ */
+ void setBase_Behavior(Behavior value);
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.sysml.activities.ControlOperator#getBase_Operation <em>Base Operation</em>}' reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Base Operation</em>' reference.
+ * @see #getBase_Operation()
+ * @generated
+ */
+ void setBase_Operation(Operation value);
+
+} // ControlOperator
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/Discrete.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/Discrete.java
new file mode 100755
index 0000000..46831e2
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/Discrete.java
@@ -0,0 +1,25 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.activities;
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object ' <em><b>Discrete</b></em>'. <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.papyrus.sysml.activities.ActivitiesPackage#getDiscrete()
+ * @model
+ * @generated
+ */
+public interface Discrete extends Rate {
+} // Discrete
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/NoBuffer.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/NoBuffer.java
new file mode 100755
index 0000000..5f670d0
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/NoBuffer.java
@@ -0,0 +1,63 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.activities;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.uml2.uml.ObjectNode;
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object ' <em><b>No Buffer</b></em>'. <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.activities.NoBuffer#getBase_ObjectNode <em>Base Object Node</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.sysml.activities.ActivitiesPackage#getNoBuffer()
+ * @model
+ * @generated
+ */
+public interface NoBuffer extends EObject {
+
+ /**
+ * Returns the value of the '<em><b>Base Object Node</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Base Object Node</em>' reference isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Base Object Node</em>' reference.
+ * @see #setBase_ObjectNode(ObjectNode)
+ * @see org.eclipse.papyrus.sysml.activities.ActivitiesPackage#getNoBuffer_Base_ObjectNode()
+ * @model required="true" ordered="false"
+ * @generated
+ */
+ ObjectNode getBase_ObjectNode();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.sysml.activities.NoBuffer#getBase_ObjectNode <em>Base Object Node</em>}' reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Base Object Node</em>' reference.
+ * @see #getBase_ObjectNode()
+ * @generated
+ */
+ void setBase_ObjectNode(ObjectNode value);
+
+} // NoBuffer
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/Optional.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/Optional.java
new file mode 100755
index 0000000..bd215d4
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/Optional.java
@@ -0,0 +1,63 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.activities;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.uml2.uml.Parameter;
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object ' <em><b>Optional</b></em>'. <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.activities.Optional#getBase_Parameter <em>Base Parameter</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.sysml.activities.ActivitiesPackage#getOptional()
+ * @model
+ * @generated
+ */
+public interface Optional extends EObject {
+
+ /**
+ * Returns the value of the '<em><b>Base Parameter</b></em>' reference. <!--
+ * begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Base Parameter</em>' reference isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Base Parameter</em>' reference.
+ * @see #setBase_Parameter(Parameter)
+ * @see org.eclipse.papyrus.sysml.activities.ActivitiesPackage#getOptional_Base_Parameter()
+ * @model required="true" ordered="false"
+ * @generated
+ */
+ Parameter getBase_Parameter();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.sysml.activities.Optional#getBase_Parameter <em>Base Parameter</em>}' reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Base Parameter</em>' reference.
+ * @see #getBase_Parameter()
+ * @generated
+ */
+ void setBase_Parameter(Parameter value);
+
+} // Optional
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/Overwrite.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/Overwrite.java
new file mode 100755
index 0000000..7e722e0
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/Overwrite.java
@@ -0,0 +1,63 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.activities;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.uml2.uml.ObjectNode;
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object ' <em><b>Overwrite</b></em>'. <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.activities.Overwrite#getBase_ObjectNode <em>Base Object Node</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.sysml.activities.ActivitiesPackage#getOverwrite()
+ * @model
+ * @generated
+ */
+public interface Overwrite extends EObject {
+
+ /**
+ * Returns the value of the '<em><b>Base Object Node</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Base Object Node</em>' reference isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Base Object Node</em>' reference.
+ * @see #setBase_ObjectNode(ObjectNode)
+ * @see org.eclipse.papyrus.sysml.activities.ActivitiesPackage#getOverwrite_Base_ObjectNode()
+ * @model required="true" ordered="false"
+ * @generated
+ */
+ ObjectNode getBase_ObjectNode();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.sysml.activities.Overwrite#getBase_ObjectNode <em>Base Object Node</em>}' reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Base Object Node</em>' reference.
+ * @see #getBase_ObjectNode()
+ * @generated
+ */
+ void setBase_ObjectNode(ObjectNode value);
+
+} // Overwrite
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/Probability.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/Probability.java
new file mode 100755
index 0000000..9885867
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/Probability.java
@@ -0,0 +1,123 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.activities;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.uml2.uml.ActivityEdge;
+import org.eclipse.uml2.uml.ParameterSet;
+import org.eclipse.uml2.uml.ValueSpecification;
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object ' <em><b>Probability</b></em>'. <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.activities.Probability#getBase_ActivityEdge <em>Base Activity Edge</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.activities.Probability#getBase_ParameterSet <em>Base Parameter Set</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.activities.Probability#getProbability <em>Probability</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.sysml.activities.ActivitiesPackage#getProbability()
+ * @model
+ * @generated
+ */
+public interface Probability extends EObject {
+
+ /**
+ * Returns the value of the '<em><b>Base Activity Edge</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Base Activity Edge</em>' reference isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Base Activity Edge</em>' reference.
+ * @see #setBase_ActivityEdge(ActivityEdge)
+ * @see org.eclipse.papyrus.sysml.activities.ActivitiesPackage#getProbability_Base_ActivityEdge()
+ * @model required="true" ordered="false"
+ * @generated
+ */
+ ActivityEdge getBase_ActivityEdge();
+
+ /**
+ * Returns the value of the '<em><b>Base Parameter Set</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Base Parameter Set</em>' reference isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Base Parameter Set</em>' reference.
+ * @see #setBase_ParameterSet(ParameterSet)
+ * @see org.eclipse.papyrus.sysml.activities.ActivitiesPackage#getProbability_Base_ParameterSet()
+ * @model required="true" ordered="false"
+ * @generated
+ */
+ ParameterSet getBase_ParameterSet();
+
+ /**
+ * Returns the value of the '<em><b>Probability</b></em>' reference. <!--
+ * begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Probability</em>' reference isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Probability</em>' reference.
+ * @see #setProbability(ValueSpecification)
+ * @see org.eclipse.papyrus.sysml.activities.ActivitiesPackage#getProbability_Probability()
+ * @model ordered="false"
+ * @generated
+ */
+ ValueSpecification getProbability();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.sysml.activities.Probability#getBase_ActivityEdge <em>Base Activity Edge</em>}' reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Base Activity Edge</em>' reference.
+ * @see #getBase_ActivityEdge()
+ * @generated
+ */
+ void setBase_ActivityEdge(ActivityEdge value);
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.sysml.activities.Probability#getBase_ParameterSet <em>Base Parameter Set</em>}' reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Base Parameter Set</em>' reference.
+ * @see #getBase_ParameterSet()
+ * @generated
+ */
+ void setBase_ParameterSet(ParameterSet value);
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.sysml.activities.Probability#getProbability <em>Probability</em>}' reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Probability</em>' reference.
+ * @see #getProbability()
+ * @generated
+ */
+ void setProbability(ValueSpecification value);
+
+} // Probability
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/Rate.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/Rate.java
new file mode 100755
index 0000000..eb021c5
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/Rate.java
@@ -0,0 +1,122 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.activities;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.uml2.uml.ActivityEdge;
+import org.eclipse.uml2.uml.InstanceSpecification;
+import org.eclipse.uml2.uml.Parameter;
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object ' <em><b>Rate</b></em>'. <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.activities.Rate#getBase_Parameter <em>Base Parameter</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.activities.Rate#getBase_ActivityEdge <em>Base Activity Edge</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.activities.Rate#getRate <em>Rate</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.sysml.activities.ActivitiesPackage#getRate()
+ * @model
+ * @generated
+ */
+public interface Rate extends EObject {
+
+ /**
+ * Returns the value of the '<em><b>Base Activity Edge</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Base Activity Edge</em>' reference isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Base Activity Edge</em>' reference.
+ * @see #setBase_ActivityEdge(ActivityEdge)
+ * @see org.eclipse.papyrus.sysml.activities.ActivitiesPackage#getRate_Base_ActivityEdge()
+ * @model required="true" ordered="false"
+ * @generated
+ */
+ ActivityEdge getBase_ActivityEdge();
+
+ /**
+ * Returns the value of the '<em><b>Base Parameter</b></em>' reference. <!--
+ * begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Base Parameter</em>' reference isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Base Parameter</em>' reference.
+ * @see #setBase_Parameter(Parameter)
+ * @see org.eclipse.papyrus.sysml.activities.ActivitiesPackage#getRate_Base_Parameter()
+ * @model required="true" ordered="false"
+ * @generated
+ */
+ Parameter getBase_Parameter();
+
+ /**
+ * Returns the value of the '<em><b>Rate</b></em>' reference. <!--
+ * begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Rate</em>' reference isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Rate</em>' reference.
+ * @see #setRate(InstanceSpecification)
+ * @see org.eclipse.papyrus.sysml.activities.ActivitiesPackage#getRate_Rate()
+ * @model ordered="false"
+ * @generated
+ */
+ InstanceSpecification getRate();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.sysml.activities.Rate#getBase_ActivityEdge <em>Base Activity Edge</em>}' reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Base Activity Edge</em>' reference.
+ * @see #getBase_ActivityEdge()
+ * @generated
+ */
+ void setBase_ActivityEdge(ActivityEdge value);
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.sysml.activities.Rate#getBase_Parameter <em>Base Parameter</em>}' reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Base Parameter</em>' reference.
+ * @see #getBase_Parameter()
+ * @generated
+ */
+ void setBase_Parameter(Parameter value);
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.sysml.activities.Rate#getRate <em>Rate</em>}' reference.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Rate</em>' reference.
+ * @see #getRate()
+ * @generated
+ */
+ void setRate(InstanceSpecification value);
+
+} // Rate
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/internal/impl/ActivitiesFactoryImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/internal/impl/ActivitiesFactoryImpl.java
new file mode 100755
index 0000000..ffd85f5
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/internal/impl/ActivitiesFactoryImpl.java
@@ -0,0 +1,199 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.activities.internal.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+import org.eclipse.papyrus.sysml.activities.ActivitiesFactory;
+import org.eclipse.papyrus.sysml.activities.ActivitiesPackage;
+import org.eclipse.papyrus.sysml.activities.Continuous;
+import org.eclipse.papyrus.sysml.activities.ControlOperator;
+import org.eclipse.papyrus.sysml.activities.Discrete;
+import org.eclipse.papyrus.sysml.activities.NoBuffer;
+import org.eclipse.papyrus.sysml.activities.Optional;
+import org.eclipse.papyrus.sysml.activities.Overwrite;
+import org.eclipse.papyrus.sysml.activities.Probability;
+import org.eclipse.papyrus.sysml.activities.Rate;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model <b>Factory</b>. <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+public class ActivitiesFactoryImpl extends EFactoryImpl implements ActivitiesFactory {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static ActivitiesPackage getPackage() {
+ return ActivitiesPackage.eINSTANCE;
+ }
+
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public static ActivitiesFactory init() {
+ try {
+ ActivitiesFactory theActivitiesFactory = (ActivitiesFactory) EPackage.Registry.INSTANCE.getEFactory(ActivitiesPackage.eNS_URI);
+ if (theActivitiesFactory != null) {
+ return theActivitiesFactory;
+ }
+ } catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new ActivitiesFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public ActivitiesFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ case ActivitiesPackage.OPTIONAL:
+ return createOptional();
+ case ActivitiesPackage.RATE:
+ return createRate();
+ case ActivitiesPackage.PROBABILITY:
+ return createProbability();
+ case ActivitiesPackage.CONTINUOUS:
+ return createContinuous();
+ case ActivitiesPackage.DISCRETE:
+ return createDiscrete();
+ case ActivitiesPackage.CONTROL_OPERATOR:
+ return createControlOperator();
+ case ActivitiesPackage.NO_BUFFER:
+ return createNoBuffer();
+ case ActivitiesPackage.OVERWRITE:
+ return createOverwrite();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Optional createOptional() {
+ OptionalImpl optional = new OptionalImpl();
+ return optional;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Continuous createContinuous() {
+ ContinuousImpl continuous = new ContinuousImpl();
+ return continuous;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ControlOperator createControlOperator() {
+ ControlOperatorImpl controlOperator = new ControlOperatorImpl();
+ return controlOperator;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Discrete createDiscrete() {
+ DiscreteImpl discrete = new DiscreteImpl();
+ return discrete;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public NoBuffer createNoBuffer() {
+ NoBufferImpl noBuffer = new NoBufferImpl();
+ return noBuffer;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Overwrite createOverwrite() {
+ OverwriteImpl overwrite = new OverwriteImpl();
+ return overwrite;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Probability createProbability() {
+ ProbabilityImpl probability = new ProbabilityImpl();
+ return probability;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Rate createRate() {
+ RateImpl rate = new RateImpl();
+ return rate;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ActivitiesPackage getActivitiesPackage() {
+ return (ActivitiesPackage) getEPackage();
+ }
+
+} // ActivitiesFactoryImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/internal/impl/ActivitiesPackageImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/internal/impl/ActivitiesPackageImpl.java
new file mode 100755
index 0000000..4b4640e
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/internal/impl/ActivitiesPackageImpl.java
@@ -0,0 +1,523 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.activities.internal.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+import org.eclipse.papyrus.sysml.SysmlPackage;
+import org.eclipse.papyrus.sysml.activities.ActivitiesFactory;
+import org.eclipse.papyrus.sysml.activities.ActivitiesPackage;
+import org.eclipse.papyrus.sysml.activities.Continuous;
+import org.eclipse.papyrus.sysml.activities.ControlOperator;
+import org.eclipse.papyrus.sysml.activities.Discrete;
+import org.eclipse.papyrus.sysml.activities.NoBuffer;
+import org.eclipse.papyrus.sysml.activities.Optional;
+import org.eclipse.papyrus.sysml.activities.Overwrite;
+import org.eclipse.papyrus.sysml.activities.Probability;
+import org.eclipse.papyrus.sysml.activities.Rate;
+import org.eclipse.papyrus.sysml.allocations.AllocationsPackage;
+import org.eclipse.papyrus.sysml.allocations.internal.impl.AllocationsPackageImpl;
+import org.eclipse.papyrus.sysml.blocks.BlocksPackage;
+import org.eclipse.papyrus.sysml.blocks.internal.impl.BlocksPackageImpl;
+import org.eclipse.papyrus.sysml.constraints.ConstraintsPackage;
+import org.eclipse.papyrus.sysml.constraints.internal.impl.ConstraintsPackageImpl;
+import org.eclipse.papyrus.sysml.interactions.InteractionsPackage;
+import org.eclipse.papyrus.sysml.interactions.internal.impl.InteractionsPackageImpl;
+import org.eclipse.papyrus.sysml.internal.impl.SysmlPackageImpl;
+import org.eclipse.papyrus.sysml.modelelements.ModelelementsPackage;
+import org.eclipse.papyrus.sysml.modelelements.internal.impl.ModelelementsPackageImpl;
+import org.eclipse.papyrus.sysml.portandflows.PortandflowsPackage;
+import org.eclipse.papyrus.sysml.portandflows.internal.impl.PortandflowsPackageImpl;
+import org.eclipse.papyrus.sysml.requirements.RequirementsPackage;
+import org.eclipse.papyrus.sysml.requirements.internal.impl.RequirementsPackageImpl;
+import org.eclipse.papyrus.sysml.statemachines.StatemachinesPackage;
+import org.eclipse.papyrus.sysml.statemachines.internal.impl.StatemachinesPackageImpl;
+import org.eclipse.papyrus.sysml.usecases.UsecasesPackage;
+import org.eclipse.papyrus.sysml.usecases.internal.impl.UsecasesPackageImpl;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.eclipse.uml2.uml.profile.standard.StandardPackage;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model <b>Package</b>. <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+public class ActivitiesPackageImpl extends EPackageImpl implements ActivitiesPackage {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass optionalEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private static boolean isInited = false;
+
+ /**
+ * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+ *
+ * <p>
+ * This method is used to initialize {@link ActivitiesPackage#eINSTANCE} when that field is accessed. Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #eNS_URI
+ * @see #createPackageContents()
+ * @see #initializePackageContents()
+ * @generated
+ */
+ public static ActivitiesPackage init() {
+ if (isInited) {
+ return (ActivitiesPackage) EPackage.Registry.INSTANCE.getEPackage(ActivitiesPackage.eNS_URI);
+ }
+
+ // Obtain or create and register package
+ ActivitiesPackageImpl theActivitiesPackage = (ActivitiesPackageImpl) (EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ActivitiesPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ActivitiesPackageImpl());
+
+ isInited = true;
+
+ // Initialize simple dependencies
+ StandardPackage.eINSTANCE.eClass();
+
+ // Obtain or create and register interdependencies
+ SysmlPackageImpl theSysmlPackage = (SysmlPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(SysmlPackage.eNS_URI) instanceof SysmlPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(SysmlPackage.eNS_URI) : SysmlPackage.eINSTANCE);
+ ModelelementsPackageImpl theModelelementsPackage = (ModelelementsPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(ModelelementsPackage.eNS_URI) instanceof ModelelementsPackageImpl ? EPackage.Registry.INSTANCE
+ .getEPackage(ModelelementsPackage.eNS_URI) : ModelelementsPackage.eINSTANCE);
+ BlocksPackageImpl theBlocksPackage = (BlocksPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(BlocksPackage.eNS_URI) instanceof BlocksPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(BlocksPackage.eNS_URI) : BlocksPackage.eINSTANCE);
+ PortandflowsPackageImpl thePortandflowsPackage = (PortandflowsPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(PortandflowsPackage.eNS_URI) instanceof PortandflowsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(PortandflowsPackage.eNS_URI)
+ : PortandflowsPackage.eINSTANCE);
+ ConstraintsPackageImpl theConstraintsPackage = (ConstraintsPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(ConstraintsPackage.eNS_URI) instanceof ConstraintsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ConstraintsPackage.eNS_URI)
+ : ConstraintsPackage.eINSTANCE);
+ AllocationsPackageImpl theAllocationsPackage = (AllocationsPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(AllocationsPackage.eNS_URI) instanceof AllocationsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(AllocationsPackage.eNS_URI)
+ : AllocationsPackage.eINSTANCE);
+ RequirementsPackageImpl theRequirementsPackage = (RequirementsPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(RequirementsPackage.eNS_URI) instanceof RequirementsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(RequirementsPackage.eNS_URI)
+ : RequirementsPackage.eINSTANCE);
+ InteractionsPackageImpl theInteractionsPackage = (InteractionsPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(InteractionsPackage.eNS_URI) instanceof InteractionsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(InteractionsPackage.eNS_URI)
+ : InteractionsPackage.eINSTANCE);
+ StatemachinesPackageImpl theStatemachinesPackage = (StatemachinesPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(StatemachinesPackage.eNS_URI) instanceof StatemachinesPackageImpl ? EPackage.Registry.INSTANCE
+ .getEPackage(StatemachinesPackage.eNS_URI) : StatemachinesPackage.eINSTANCE);
+ UsecasesPackageImpl theUsecasesPackage = (UsecasesPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(UsecasesPackage.eNS_URI) instanceof UsecasesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(UsecasesPackage.eNS_URI)
+ : UsecasesPackage.eINSTANCE);
+
+ // Create package meta-data objects
+ theActivitiesPackage.createPackageContents();
+ theSysmlPackage.createPackageContents();
+ theModelelementsPackage.createPackageContents();
+ theBlocksPackage.createPackageContents();
+ thePortandflowsPackage.createPackageContents();
+ theConstraintsPackage.createPackageContents();
+ theAllocationsPackage.createPackageContents();
+ theRequirementsPackage.createPackageContents();
+ theInteractionsPackage.createPackageContents();
+ theStatemachinesPackage.createPackageContents();
+ theUsecasesPackage.createPackageContents();
+
+ // Initialize created meta-data
+ theActivitiesPackage.initializePackageContents();
+ theSysmlPackage.initializePackageContents();
+ theModelelementsPackage.initializePackageContents();
+ theBlocksPackage.initializePackageContents();
+ thePortandflowsPackage.initializePackageContents();
+ theConstraintsPackage.initializePackageContents();
+ theAllocationsPackage.initializePackageContents();
+ theRequirementsPackage.initializePackageContents();
+ theInteractionsPackage.initializePackageContents();
+ theStatemachinesPackage.initializePackageContents();
+ theUsecasesPackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theActivitiesPackage.freeze();
+
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(ActivitiesPackage.eNS_URI, theActivitiesPackage);
+ return theActivitiesPackage;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EClass getOptional() {
+ return optionalEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getOptional_Base_Parameter() {
+ return (EReference) optionalEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass rateEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass probabilityEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass continuousEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass discreteEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass controlOperatorEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass noBufferEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass overwriteEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private boolean isCreated = false;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Creates an instance of the model <b>Package</b>, registered with {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the
+ * package
+ * package URI value.
+ * <p>
+ * Note: the correct way to create the package is via the static factory method {@link #init init()}, which also performs initialization of the package, or returns the registered package, if one already exists. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.emf.ecore.EPackage.Registry
+ * @see org.eclipse.papyrus.sysml.activities.ActivitiesPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private ActivitiesPackageImpl() {
+ super(eNS_URI, ActivitiesFactory.eINSTANCE);
+ }
+
+ /**
+ * Creates the meta-model objects for the package. This method is
+ * guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void createPackageContents() {
+ if (isCreated) {
+ return;
+ }
+ isCreated = true;
+
+ // Create classes and their features
+ optionalEClass = createEClass(OPTIONAL);
+ createEReference(optionalEClass, OPTIONAL__BASE_PARAMETER);
+
+ rateEClass = createEClass(RATE);
+ createEReference(rateEClass, RATE__BASE_PARAMETER);
+ createEReference(rateEClass, RATE__BASE_ACTIVITY_EDGE);
+ createEReference(rateEClass, RATE__RATE);
+
+ probabilityEClass = createEClass(PROBABILITY);
+ createEReference(probabilityEClass, PROBABILITY__BASE_ACTIVITY_EDGE);
+ createEReference(probabilityEClass, PROBABILITY__BASE_PARAMETER_SET);
+ createEReference(probabilityEClass, PROBABILITY__PROBABILITY);
+
+ continuousEClass = createEClass(CONTINUOUS);
+
+ discreteEClass = createEClass(DISCRETE);
+
+ controlOperatorEClass = createEClass(CONTROL_OPERATOR);
+ createEReference(controlOperatorEClass, CONTROL_OPERATOR__BASE_OPERATION);
+ createEReference(controlOperatorEClass, CONTROL_OPERATOR__BASE_BEHAVIOR);
+
+ noBufferEClass = createEClass(NO_BUFFER);
+ createEReference(noBufferEClass, NO_BUFFER__BASE_OBJECT_NODE);
+
+ overwriteEClass = createEClass(OVERWRITE);
+ createEReference(overwriteEClass, OVERWRITE__BASE_OBJECT_NODE);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ActivitiesFactory getActivitiesFactory() {
+ return (ActivitiesFactory) getEFactoryInstance();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EClass getContinuous() {
+ return continuousEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EClass getControlOperator() {
+ return controlOperatorEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getControlOperator_Base_Behavior() {
+ return (EReference) controlOperatorEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getControlOperator_Base_Operation() {
+ return (EReference) controlOperatorEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EClass getDiscrete() {
+ return discreteEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EClass getNoBuffer() {
+ return noBufferEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getNoBuffer_Base_ObjectNode() {
+ return (EReference) noBufferEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EClass getOverwrite() {
+ return overwriteEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getOverwrite_Base_ObjectNode() {
+ return (EReference) overwriteEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EClass getProbability() {
+ return probabilityEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getProbability_Base_ActivityEdge() {
+ return (EReference) probabilityEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getProbability_Base_ParameterSet() {
+ return (EReference) probabilityEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getProbability_Probability() {
+ return (EReference) probabilityEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EClass getRate() {
+ return rateEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getRate_Base_ActivityEdge() {
+ return (EReference) rateEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getRate_Base_Parameter() {
+ return (EReference) rateEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getRate_Rate() {
+ return (EReference) rateEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void initializePackageContents() {
+ if (isInitialized) {
+ return;
+ }
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Obtain other dependent packages
+ UMLPackage theUMLPackage = (UMLPackage) EPackage.Registry.INSTANCE.getEPackage(UMLPackage.eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+ continuousEClass.getESuperTypes().add(this.getRate());
+ discreteEClass.getESuperTypes().add(this.getRate());
+
+ // Initialize classes, features, and operations; add parameters
+ initEClass(optionalEClass, Optional.class, "Optional", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getOptional_Base_Parameter(), theUMLPackage.getParameter(), null, "base_Parameter", null, 1, 1, Optional.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, !IS_DERIVED,
+ !IS_ORDERED);
+
+ initEClass(rateEClass, Rate.class, "Rate", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getRate_Base_Parameter(), theUMLPackage.getParameter(), null, "base_Parameter", null, 1, 1, Rate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+ initEReference(getRate_Base_ActivityEdge(), theUMLPackage.getActivityEdge(), null, "base_ActivityEdge", null, 1, 1, Rate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, !IS_DERIVED,
+ !IS_ORDERED);
+ initEReference(getRate_Rate(), theUMLPackage.getInstanceSpecification(), null, "rate", null, 0, 1, Rate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+
+ initEClass(probabilityEClass, Probability.class, "Probability", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getProbability_Base_ActivityEdge(), theUMLPackage.getActivityEdge(), null, "base_ActivityEdge", null, 1, 1, Probability.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE,
+ !IS_DERIVED, !IS_ORDERED);
+ initEReference(getProbability_Base_ParameterSet(), theUMLPackage.getParameterSet(), null, "base_ParameterSet", null, 1, 1, Probability.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE,
+ !IS_DERIVED, !IS_ORDERED);
+ initEReference(getProbability_Probability(), theUMLPackage.getValueSpecification(), null, "probability", null, 0, 1, Probability.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE,
+ !IS_DERIVED, !IS_ORDERED);
+
+ initEClass(continuousEClass, Continuous.class, "Continuous", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+ initEClass(discreteEClass, Discrete.class, "Discrete", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+ initEClass(controlOperatorEClass, ControlOperator.class, "ControlOperator", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getControlOperator_Base_Operation(), theUMLPackage.getOperation(), null, "base_Operation", null, 1, 1, ControlOperator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE,
+ !IS_DERIVED, !IS_ORDERED);
+ initEReference(getControlOperator_Base_Behavior(), theUMLPackage.getBehavior(), null, "base_Behavior", null, 1, 1, ControlOperator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE,
+ !IS_DERIVED, !IS_ORDERED);
+
+ initEClass(noBufferEClass, NoBuffer.class, "NoBuffer", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getNoBuffer_Base_ObjectNode(), theUMLPackage.getObjectNode(), null, "base_ObjectNode", null, 1, 1, NoBuffer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, !IS_DERIVED,
+ !IS_ORDERED);
+
+ initEClass(overwriteEClass, Overwrite.class, "Overwrite", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getOverwrite_Base_ObjectNode(), theUMLPackage.getObjectNode(), null, "base_ObjectNode", null, 1, 1, Overwrite.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, !IS_DERIVED,
+ !IS_ORDERED);
+ }
+
+} // ActivitiesPackageImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/internal/impl/ContinuousImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/internal/impl/ContinuousImpl.java
new file mode 100755
index 0000000..0471765
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/internal/impl/ContinuousImpl.java
@@ -0,0 +1,48 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.activities.internal.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.papyrus.sysml.activities.ActivitiesPackage;
+import org.eclipse.papyrus.sysml.activities.Continuous;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object ' <em><b>Continuous</b></em>'. <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class ContinuousImpl extends RateImpl implements Continuous {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ContinuousImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ActivitiesPackage.Literals.CONTINUOUS;
+ }
+
+} // ContinuousImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/internal/impl/ControlOperatorImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/internal/impl/ControlOperatorImpl.java
new file mode 100755
index 0000000..1a4011e
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/internal/impl/ControlOperatorImpl.java
@@ -0,0 +1,235 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.activities.internal.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+import org.eclipse.papyrus.sysml.activities.ActivitiesPackage;
+import org.eclipse.papyrus.sysml.activities.ControlOperator;
+import org.eclipse.uml2.uml.Behavior;
+import org.eclipse.uml2.uml.Operation;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object ' <em><b>Control Operator</b></em>'. <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.activities.internal.impl.ControlOperatorImpl#getBase_Operation <em>Base Operation</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.activities.internal.impl.ControlOperatorImpl#getBase_Behavior <em>Base Behavior</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ControlOperatorImpl extends MinimalEObjectImpl.Container implements ControlOperator {
+
+ /**
+ * The cached value of the '{@link #getBase_Operation() <em>Base Operation</em>}' reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see #getBase_Operation()
+ * @generated
+ * @ordered
+ */
+ protected Operation base_Operation;
+
+ /**
+ * The cached value of the '{@link #getBase_Behavior() <em>Base Behavior</em>}' reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see #getBase_Behavior()
+ * @generated
+ * @ordered
+ */
+ protected Behavior base_Behavior;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ControlOperatorImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Behavior basicGetBase_Behavior() {
+ return base_Behavior;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Operation basicGetBase_Operation() {
+ return base_Operation;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case ActivitiesPackage.CONTROL_OPERATOR__BASE_OPERATION:
+ if (resolve) {
+ return getBase_Operation();
+ }
+ return basicGetBase_Operation();
+ case ActivitiesPackage.CONTROL_OPERATOR__BASE_BEHAVIOR:
+ if (resolve) {
+ return getBase_Behavior();
+ }
+ return basicGetBase_Behavior();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ActivitiesPackage.CONTROL_OPERATOR__BASE_OPERATION:
+ return base_Operation != null;
+ case ActivitiesPackage.CONTROL_OPERATOR__BASE_BEHAVIOR:
+ return base_Behavior != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case ActivitiesPackage.CONTROL_OPERATOR__BASE_OPERATION:
+ setBase_Operation((Operation) newValue);
+ return;
+ case ActivitiesPackage.CONTROL_OPERATOR__BASE_BEHAVIOR:
+ setBase_Behavior((Behavior) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ActivitiesPackage.Literals.CONTROL_OPERATOR;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ActivitiesPackage.CONTROL_OPERATOR__BASE_OPERATION:
+ setBase_Operation((Operation) null);
+ return;
+ case ActivitiesPackage.CONTROL_OPERATOR__BASE_BEHAVIOR:
+ setBase_Behavior((Behavior) null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Behavior getBase_Behavior() {
+ if (base_Behavior != null && base_Behavior.eIsProxy()) {
+ InternalEObject oldBase_Behavior = (InternalEObject) base_Behavior;
+ base_Behavior = (Behavior) eResolveProxy(oldBase_Behavior);
+ if (base_Behavior != oldBase_Behavior) {
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ActivitiesPackage.CONTROL_OPERATOR__BASE_BEHAVIOR, oldBase_Behavior, base_Behavior));
+ }
+ }
+ }
+ return base_Behavior;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Operation getBase_Operation() {
+ if (base_Operation != null && base_Operation.eIsProxy()) {
+ InternalEObject oldBase_Operation = (InternalEObject) base_Operation;
+ base_Operation = (Operation) eResolveProxy(oldBase_Operation);
+ if (base_Operation != oldBase_Operation) {
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ActivitiesPackage.CONTROL_OPERATOR__BASE_OPERATION, oldBase_Operation, base_Operation));
+ }
+ }
+ }
+ return base_Operation;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setBase_Behavior(Behavior newBase_Behavior) {
+ Behavior oldBase_Behavior = base_Behavior;
+ base_Behavior = newBase_Behavior;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, ActivitiesPackage.CONTROL_OPERATOR__BASE_BEHAVIOR, oldBase_Behavior, base_Behavior));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setBase_Operation(Operation newBase_Operation) {
+ Operation oldBase_Operation = base_Operation;
+ base_Operation = newBase_Operation;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, ActivitiesPackage.CONTROL_OPERATOR__BASE_OPERATION, oldBase_Operation, base_Operation));
+ }
+ }
+
+} // ControlOperatorImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/internal/impl/DiscreteImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/internal/impl/DiscreteImpl.java
new file mode 100755
index 0000000..7294f9a
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/internal/impl/DiscreteImpl.java
@@ -0,0 +1,48 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.activities.internal.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.papyrus.sysml.activities.ActivitiesPackage;
+import org.eclipse.papyrus.sysml.activities.Discrete;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object ' <em><b>Discrete</b></em>'. <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class DiscreteImpl extends RateImpl implements Discrete {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected DiscreteImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ActivitiesPackage.Literals.DISCRETE;
+ }
+
+} // DiscreteImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/internal/impl/NoBufferImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/internal/impl/NoBufferImpl.java
new file mode 100755
index 0000000..ccdd589
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/internal/impl/NoBufferImpl.java
@@ -0,0 +1,169 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.activities.internal.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+import org.eclipse.papyrus.sysml.activities.ActivitiesPackage;
+import org.eclipse.papyrus.sysml.activities.NoBuffer;
+import org.eclipse.uml2.uml.ObjectNode;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object ' <em><b>No Buffer</b></em>'. <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.activities.internal.impl.NoBufferImpl#getBase_ObjectNode <em>Base Object Node</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class NoBufferImpl extends MinimalEObjectImpl.Container implements NoBuffer {
+
+ /**
+ * The cached value of the '{@link #getBase_ObjectNode() <em>Base Object Node</em>}' reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see #getBase_ObjectNode()
+ * @generated
+ * @ordered
+ */
+ protected ObjectNode base_ObjectNode;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected NoBufferImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ObjectNode basicGetBase_ObjectNode() {
+ return base_ObjectNode;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case ActivitiesPackage.NO_BUFFER__BASE_OBJECT_NODE:
+ if (resolve) {
+ return getBase_ObjectNode();
+ }
+ return basicGetBase_ObjectNode();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ActivitiesPackage.NO_BUFFER__BASE_OBJECT_NODE:
+ return base_ObjectNode != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case ActivitiesPackage.NO_BUFFER__BASE_OBJECT_NODE:
+ setBase_ObjectNode((ObjectNode) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ActivitiesPackage.Literals.NO_BUFFER;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ActivitiesPackage.NO_BUFFER__BASE_OBJECT_NODE:
+ setBase_ObjectNode((ObjectNode) null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ObjectNode getBase_ObjectNode() {
+ if (base_ObjectNode != null && base_ObjectNode.eIsProxy()) {
+ InternalEObject oldBase_ObjectNode = (InternalEObject) base_ObjectNode;
+ base_ObjectNode = (ObjectNode) eResolveProxy(oldBase_ObjectNode);
+ if (base_ObjectNode != oldBase_ObjectNode) {
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ActivitiesPackage.NO_BUFFER__BASE_OBJECT_NODE, oldBase_ObjectNode, base_ObjectNode));
+ }
+ }
+ }
+ return base_ObjectNode;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setBase_ObjectNode(ObjectNode newBase_ObjectNode) {
+ ObjectNode oldBase_ObjectNode = base_ObjectNode;
+ base_ObjectNode = newBase_ObjectNode;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, ActivitiesPackage.NO_BUFFER__BASE_OBJECT_NODE, oldBase_ObjectNode, base_ObjectNode));
+ }
+ }
+
+} // NoBufferImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/internal/impl/OptionalImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/internal/impl/OptionalImpl.java
new file mode 100755
index 0000000..f7205cd
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/internal/impl/OptionalImpl.java
@@ -0,0 +1,169 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.activities.internal.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+import org.eclipse.papyrus.sysml.activities.ActivitiesPackage;
+import org.eclipse.papyrus.sysml.activities.Optional;
+import org.eclipse.uml2.uml.Parameter;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object ' <em><b>Optional</b></em>'. <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.activities.internal.impl.OptionalImpl#getBase_Parameter <em>Base Parameter</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class OptionalImpl extends MinimalEObjectImpl.Container implements Optional {
+
+ /**
+ * The cached value of the '{@link #getBase_Parameter() <em>Base Parameter</em>}' reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see #getBase_Parameter()
+ * @generated
+ * @ordered
+ */
+ protected Parameter base_Parameter;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected OptionalImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ActivitiesPackage.Literals.OPTIONAL;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Parameter getBase_Parameter() {
+ if (base_Parameter != null && base_Parameter.eIsProxy()) {
+ InternalEObject oldBase_Parameter = (InternalEObject) base_Parameter;
+ base_Parameter = (Parameter) eResolveProxy(oldBase_Parameter);
+ if (base_Parameter != oldBase_Parameter) {
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ActivitiesPackage.OPTIONAL__BASE_PARAMETER, oldBase_Parameter, base_Parameter));
+ }
+ }
+ }
+ return base_Parameter;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Parameter basicGetBase_Parameter() {
+ return base_Parameter;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setBase_Parameter(Parameter newBase_Parameter) {
+ Parameter oldBase_Parameter = base_Parameter;
+ base_Parameter = newBase_Parameter;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, ActivitiesPackage.OPTIONAL__BASE_PARAMETER, oldBase_Parameter, base_Parameter));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case ActivitiesPackage.OPTIONAL__BASE_PARAMETER:
+ if (resolve) {
+ return getBase_Parameter();
+ }
+ return basicGetBase_Parameter();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case ActivitiesPackage.OPTIONAL__BASE_PARAMETER:
+ setBase_Parameter((Parameter) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ActivitiesPackage.OPTIONAL__BASE_PARAMETER:
+ setBase_Parameter((Parameter) null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ActivitiesPackage.OPTIONAL__BASE_PARAMETER:
+ return base_Parameter != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} // OptionalImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/internal/impl/OverwriteImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/internal/impl/OverwriteImpl.java
new file mode 100755
index 0000000..1715a6c
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/internal/impl/OverwriteImpl.java
@@ -0,0 +1,169 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.activities.internal.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+import org.eclipse.papyrus.sysml.activities.ActivitiesPackage;
+import org.eclipse.papyrus.sysml.activities.Overwrite;
+import org.eclipse.uml2.uml.ObjectNode;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object ' <em><b>Overwrite</b></em>'. <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.activities.internal.impl.OverwriteImpl#getBase_ObjectNode <em>Base Object Node</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class OverwriteImpl extends MinimalEObjectImpl.Container implements Overwrite {
+
+ /**
+ * The cached value of the '{@link #getBase_ObjectNode() <em>Base Object Node</em>}' reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see #getBase_ObjectNode()
+ * @generated
+ * @ordered
+ */
+ protected ObjectNode base_ObjectNode;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected OverwriteImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ObjectNode basicGetBase_ObjectNode() {
+ return base_ObjectNode;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case ActivitiesPackage.OVERWRITE__BASE_OBJECT_NODE:
+ if (resolve) {
+ return getBase_ObjectNode();
+ }
+ return basicGetBase_ObjectNode();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ActivitiesPackage.OVERWRITE__BASE_OBJECT_NODE:
+ return base_ObjectNode != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case ActivitiesPackage.OVERWRITE__BASE_OBJECT_NODE:
+ setBase_ObjectNode((ObjectNode) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ActivitiesPackage.Literals.OVERWRITE;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ActivitiesPackage.OVERWRITE__BASE_OBJECT_NODE:
+ setBase_ObjectNode((ObjectNode) null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ObjectNode getBase_ObjectNode() {
+ if (base_ObjectNode != null && base_ObjectNode.eIsProxy()) {
+ InternalEObject oldBase_ObjectNode = (InternalEObject) base_ObjectNode;
+ base_ObjectNode = (ObjectNode) eResolveProxy(oldBase_ObjectNode);
+ if (base_ObjectNode != oldBase_ObjectNode) {
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ActivitiesPackage.OVERWRITE__BASE_OBJECT_NODE, oldBase_ObjectNode, base_ObjectNode));
+ }
+ }
+ }
+ return base_ObjectNode;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setBase_ObjectNode(ObjectNode newBase_ObjectNode) {
+ ObjectNode oldBase_ObjectNode = base_ObjectNode;
+ base_ObjectNode = newBase_ObjectNode;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, ActivitiesPackage.OVERWRITE__BASE_OBJECT_NODE, oldBase_ObjectNode, base_ObjectNode));
+ }
+ }
+
+} // OverwriteImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/internal/impl/ProbabilityImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/internal/impl/ProbabilityImpl.java
new file mode 100755
index 0000000..b560b07
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/internal/impl/ProbabilityImpl.java
@@ -0,0 +1,300 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.activities.internal.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+import org.eclipse.papyrus.sysml.activities.ActivitiesPackage;
+import org.eclipse.papyrus.sysml.activities.Probability;
+import org.eclipse.uml2.uml.ActivityEdge;
+import org.eclipse.uml2.uml.ParameterSet;
+import org.eclipse.uml2.uml.ValueSpecification;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object ' <em><b>Probability</b></em>'. <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.activities.internal.impl.ProbabilityImpl#getBase_ActivityEdge <em>Base Activity Edge</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.activities.internal.impl.ProbabilityImpl#getBase_ParameterSet <em>Base Parameter Set</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.activities.internal.impl.ProbabilityImpl#getProbability <em>Probability</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ProbabilityImpl extends MinimalEObjectImpl.Container implements Probability {
+
+ /**
+ * The cached value of the '{@link #getBase_ActivityEdge() <em>Base Activity Edge</em>}' reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see #getBase_ActivityEdge()
+ * @generated
+ * @ordered
+ */
+ protected ActivityEdge base_ActivityEdge;
+
+ /**
+ * The cached value of the '{@link #getBase_ParameterSet() <em>Base Parameter Set</em>}' reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see #getBase_ParameterSet()
+ * @generated
+ * @ordered
+ */
+ protected ParameterSet base_ParameterSet;
+
+ /**
+ * The cached value of the '{@link #getProbability() <em>Probability</em>}' reference.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #getProbability()
+ * @generated
+ * @ordered
+ */
+ protected ValueSpecification probability;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ProbabilityImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ActivityEdge basicGetBase_ActivityEdge() {
+ return base_ActivityEdge;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ParameterSet basicGetBase_ParameterSet() {
+ return base_ParameterSet;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ValueSpecification basicGetProbability() {
+ return probability;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case ActivitiesPackage.PROBABILITY__BASE_ACTIVITY_EDGE:
+ if (resolve) {
+ return getBase_ActivityEdge();
+ }
+ return basicGetBase_ActivityEdge();
+ case ActivitiesPackage.PROBABILITY__BASE_PARAMETER_SET:
+ if (resolve) {
+ return getBase_ParameterSet();
+ }
+ return basicGetBase_ParameterSet();
+ case ActivitiesPackage.PROBABILITY__PROBABILITY:
+ if (resolve) {
+ return getProbability();
+ }
+ return basicGetProbability();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ActivitiesPackage.PROBABILITY__BASE_ACTIVITY_EDGE:
+ return base_ActivityEdge != null;
+ case ActivitiesPackage.PROBABILITY__BASE_PARAMETER_SET:
+ return base_ParameterSet != null;
+ case ActivitiesPackage.PROBABILITY__PROBABILITY:
+ return probability != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case ActivitiesPackage.PROBABILITY__BASE_ACTIVITY_EDGE:
+ setBase_ActivityEdge((ActivityEdge) newValue);
+ return;
+ case ActivitiesPackage.PROBABILITY__BASE_PARAMETER_SET:
+ setBase_ParameterSet((ParameterSet) newValue);
+ return;
+ case ActivitiesPackage.PROBABILITY__PROBABILITY:
+ setProbability((ValueSpecification) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ActivitiesPackage.Literals.PROBABILITY;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ActivitiesPackage.PROBABILITY__BASE_ACTIVITY_EDGE:
+ setBase_ActivityEdge((ActivityEdge) null);
+ return;
+ case ActivitiesPackage.PROBABILITY__BASE_PARAMETER_SET:
+ setBase_ParameterSet((ParameterSet) null);
+ return;
+ case ActivitiesPackage.PROBABILITY__PROBABILITY:
+ setProbability((ValueSpecification) null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ActivityEdge getBase_ActivityEdge() {
+ if (base_ActivityEdge != null && base_ActivityEdge.eIsProxy()) {
+ InternalEObject oldBase_ActivityEdge = (InternalEObject) base_ActivityEdge;
+ base_ActivityEdge = (ActivityEdge) eResolveProxy(oldBase_ActivityEdge);
+ if (base_ActivityEdge != oldBase_ActivityEdge) {
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ActivitiesPackage.PROBABILITY__BASE_ACTIVITY_EDGE, oldBase_ActivityEdge, base_ActivityEdge));
+ }
+ }
+ }
+ return base_ActivityEdge;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ParameterSet getBase_ParameterSet() {
+ if (base_ParameterSet != null && base_ParameterSet.eIsProxy()) {
+ InternalEObject oldBase_ParameterSet = (InternalEObject) base_ParameterSet;
+ base_ParameterSet = (ParameterSet) eResolveProxy(oldBase_ParameterSet);
+ if (base_ParameterSet != oldBase_ParameterSet) {
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ActivitiesPackage.PROBABILITY__BASE_PARAMETER_SET, oldBase_ParameterSet, base_ParameterSet));
+ }
+ }
+ }
+ return base_ParameterSet;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ValueSpecification getProbability() {
+ if (probability != null && probability.eIsProxy()) {
+ InternalEObject oldProbability = (InternalEObject) probability;
+ probability = (ValueSpecification) eResolveProxy(oldProbability);
+ if (probability != oldProbability) {
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ActivitiesPackage.PROBABILITY__PROBABILITY, oldProbability, probability));
+ }
+ }
+ }
+ return probability;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setBase_ActivityEdge(ActivityEdge newBase_ActivityEdge) {
+ ActivityEdge oldBase_ActivityEdge = base_ActivityEdge;
+ base_ActivityEdge = newBase_ActivityEdge;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, ActivitiesPackage.PROBABILITY__BASE_ACTIVITY_EDGE, oldBase_ActivityEdge, base_ActivityEdge));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setBase_ParameterSet(ParameterSet newBase_ParameterSet) {
+ ParameterSet oldBase_ParameterSet = base_ParameterSet;
+ base_ParameterSet = newBase_ParameterSet;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, ActivitiesPackage.PROBABILITY__BASE_PARAMETER_SET, oldBase_ParameterSet, base_ParameterSet));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setProbability(ValueSpecification newProbability) {
+ ValueSpecification oldProbability = probability;
+ probability = newProbability;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, ActivitiesPackage.PROBABILITY__PROBABILITY, oldProbability, probability));
+ }
+ }
+
+} // ProbabilityImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/internal/impl/RateImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/internal/impl/RateImpl.java
new file mode 100755
index 0000000..e50ad6e
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/internal/impl/RateImpl.java
@@ -0,0 +1,300 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.activities.internal.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+import org.eclipse.papyrus.sysml.activities.ActivitiesPackage;
+import org.eclipse.papyrus.sysml.activities.Rate;
+import org.eclipse.uml2.uml.ActivityEdge;
+import org.eclipse.uml2.uml.InstanceSpecification;
+import org.eclipse.uml2.uml.Parameter;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object ' <em><b>Rate</b></em>'. <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.activities.internal.impl.RateImpl#getBase_Parameter <em>Base Parameter</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.activities.internal.impl.RateImpl#getBase_ActivityEdge <em>Base Activity Edge</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.activities.internal.impl.RateImpl#getRate <em>Rate</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class RateImpl extends MinimalEObjectImpl.Container implements Rate {
+
+ /**
+ * The cached value of the '{@link #getBase_Parameter() <em>Base Parameter</em>}' reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see #getBase_Parameter()
+ * @generated
+ * @ordered
+ */
+ protected Parameter base_Parameter;
+
+ /**
+ * The cached value of the '{@link #getBase_ActivityEdge() <em>Base Activity Edge</em>}' reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see #getBase_ActivityEdge()
+ * @generated
+ * @ordered
+ */
+ protected ActivityEdge base_ActivityEdge;
+
+ /**
+ * The cached value of the '{@link #getRate() <em>Rate</em>}' reference.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #getRate()
+ * @generated
+ * @ordered
+ */
+ protected InstanceSpecification rate;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected RateImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ActivityEdge basicGetBase_ActivityEdge() {
+ return base_ActivityEdge;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Parameter basicGetBase_Parameter() {
+ return base_Parameter;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public InstanceSpecification basicGetRate() {
+ return rate;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case ActivitiesPackage.RATE__BASE_PARAMETER:
+ if (resolve) {
+ return getBase_Parameter();
+ }
+ return basicGetBase_Parameter();
+ case ActivitiesPackage.RATE__BASE_ACTIVITY_EDGE:
+ if (resolve) {
+ return getBase_ActivityEdge();
+ }
+ return basicGetBase_ActivityEdge();
+ case ActivitiesPackage.RATE__RATE:
+ if (resolve) {
+ return getRate();
+ }
+ return basicGetRate();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ActivitiesPackage.RATE__BASE_PARAMETER:
+ return base_Parameter != null;
+ case ActivitiesPackage.RATE__BASE_ACTIVITY_EDGE:
+ return base_ActivityEdge != null;
+ case ActivitiesPackage.RATE__RATE:
+ return rate != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case ActivitiesPackage.RATE__BASE_PARAMETER:
+ setBase_Parameter((Parameter) newValue);
+ return;
+ case ActivitiesPackage.RATE__BASE_ACTIVITY_EDGE:
+ setBase_ActivityEdge((ActivityEdge) newValue);
+ return;
+ case ActivitiesPackage.RATE__RATE:
+ setRate((InstanceSpecification) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ActivitiesPackage.Literals.RATE;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ActivitiesPackage.RATE__BASE_PARAMETER:
+ setBase_Parameter((Parameter) null);
+ return;
+ case ActivitiesPackage.RATE__BASE_ACTIVITY_EDGE:
+ setBase_ActivityEdge((ActivityEdge) null);
+ return;
+ case ActivitiesPackage.RATE__RATE:
+ setRate((InstanceSpecification) null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ActivityEdge getBase_ActivityEdge() {
+ if (base_ActivityEdge != null && base_ActivityEdge.eIsProxy()) {
+ InternalEObject oldBase_ActivityEdge = (InternalEObject) base_ActivityEdge;
+ base_ActivityEdge = (ActivityEdge) eResolveProxy(oldBase_ActivityEdge);
+ if (base_ActivityEdge != oldBase_ActivityEdge) {
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ActivitiesPackage.RATE__BASE_ACTIVITY_EDGE, oldBase_ActivityEdge, base_ActivityEdge));
+ }
+ }
+ }
+ return base_ActivityEdge;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Parameter getBase_Parameter() {
+ if (base_Parameter != null && base_Parameter.eIsProxy()) {
+ InternalEObject oldBase_Parameter = (InternalEObject) base_Parameter;
+ base_Parameter = (Parameter) eResolveProxy(oldBase_Parameter);
+ if (base_Parameter != oldBase_Parameter) {
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ActivitiesPackage.RATE__BASE_PARAMETER, oldBase_Parameter, base_Parameter));
+ }
+ }
+ }
+ return base_Parameter;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public InstanceSpecification getRate() {
+ if (rate != null && rate.eIsProxy()) {
+ InternalEObject oldRate = (InternalEObject) rate;
+ rate = (InstanceSpecification) eResolveProxy(oldRate);
+ if (rate != oldRate) {
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ActivitiesPackage.RATE__RATE, oldRate, rate));
+ }
+ }
+ }
+ return rate;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setBase_ActivityEdge(ActivityEdge newBase_ActivityEdge) {
+ ActivityEdge oldBase_ActivityEdge = base_ActivityEdge;
+ base_ActivityEdge = newBase_ActivityEdge;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, ActivitiesPackage.RATE__BASE_ACTIVITY_EDGE, oldBase_ActivityEdge, base_ActivityEdge));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setBase_Parameter(Parameter newBase_Parameter) {
+ Parameter oldBase_Parameter = base_Parameter;
+ base_Parameter = newBase_Parameter;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, ActivitiesPackage.RATE__BASE_PARAMETER, oldBase_Parameter, base_Parameter));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setRate(InstanceSpecification newRate) {
+ InstanceSpecification oldRate = rate;
+ rate = newRate;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, ActivitiesPackage.RATE__RATE, oldRate, rate));
+ }
+ }
+
+} // RateImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/util/ActivitiesAdapterFactory.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/util/ActivitiesAdapterFactory.java
new file mode 100755
index 0000000..ffbe991
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/util/ActivitiesAdapterFactory.java
@@ -0,0 +1,279 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.activities.util;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notifier;
+import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.sysml.activities.ActivitiesPackage;
+import org.eclipse.papyrus.sysml.activities.Continuous;
+import org.eclipse.papyrus.sysml.activities.ControlOperator;
+import org.eclipse.papyrus.sysml.activities.Discrete;
+import org.eclipse.papyrus.sysml.activities.NoBuffer;
+import org.eclipse.papyrus.sysml.activities.Optional;
+import org.eclipse.papyrus.sysml.activities.Overwrite;
+import org.eclipse.papyrus.sysml.activities.Probability;
+import org.eclipse.papyrus.sysml.activities.Rate;
+
+/**
+ * <!-- begin-user-doc --> The <b>Adapter Factory</b> for the model. It provides
+ * an adapter <code>createXXX</code> method for each class of the model. <!--
+ * end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.activities.ActivitiesPackage
+ * @generated
+ */
+public class ActivitiesAdapterFactory extends AdapterFactoryImpl {
+
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected static ActivitiesPackage modelPackage;
+
+ /**
+ * The switch that delegates to the <code>createXXX</code> methods. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ActivitiesSwitch<Adapter> modelSwitch = new ActivitiesSwitch<Adapter>() {
+
+ @Override
+ public Adapter caseOptional(Optional object) {
+ return createOptionalAdapter();
+ }
+
+ @Override
+ public Adapter caseRate(Rate object) {
+ return createRateAdapter();
+ }
+
+ @Override
+ public Adapter caseProbability(Probability object) {
+ return createProbabilityAdapter();
+ }
+
+ @Override
+ public Adapter caseContinuous(Continuous object) {
+ return createContinuousAdapter();
+ }
+
+ @Override
+ public Adapter caseDiscrete(Discrete object) {
+ return createDiscreteAdapter();
+ }
+
+ @Override
+ public Adapter caseControlOperator(ControlOperator object) {
+ return createControlOperatorAdapter();
+ }
+
+ @Override
+ public Adapter caseNoBuffer(NoBuffer object) {
+ return createNoBufferAdapter();
+ }
+
+ @Override
+ public Adapter caseOverwrite(Overwrite object) {
+ return createOverwriteAdapter();
+ }
+
+ @Override
+ public Adapter defaultCase(EObject object) {
+ return createEObjectAdapter();
+ }
+ };
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public ActivitiesAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = ActivitiesPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Creates an adapter for the <code>target</code>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @param target
+ * the object to adapt.
+ * @return the adapter for the <code>target</code>.
+ * @generated
+ */
+ @Override
+ public Adapter createAdapter(Notifier target) {
+ return modelSwitch.doSwitch((EObject) target);
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.sysml.activities.Optional <em>Optional</em>}'.
+ * <!-- begin-user-doc --> This default implementation returns null so that
+ * we can easily ignore cases; it's useful to ignore a case when inheritance
+ * will catch all the cases anyway. <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.sysml.activities.Optional
+ * @generated
+ */
+ public Adapter createOptionalAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.sysml.activities.Continuous <em>Continuous</em>}'.
+ * <!-- begin-user-doc --> This default
+ * implementation returns null so that we can easily ignore cases; it's
+ * useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.sysml.activities.Continuous
+ * @generated
+ */
+ public Adapter createContinuousAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.sysml.activities.ControlOperator <em>Control Operator</em>}'.
+ * <!-- begin-user-doc --> This default
+ * implementation returns null so that we can easily ignore cases; it's
+ * useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.sysml.activities.ControlOperator
+ * @generated
+ */
+ public Adapter createControlOperatorAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.sysml.activities.Discrete <em>Discrete</em>}'.
+ * <!-- begin-user-doc --> This default implementation returns null so that
+ * we can easily ignore cases; it's useful to ignore a case when inheritance
+ * will catch all the cases anyway. <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.sysml.activities.Discrete
+ * @generated
+ */
+ public Adapter createDiscreteAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for the default case.
+ * <!-- begin-user-doc --> This
+ * default implementation returns null. <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @generated
+ */
+ public Adapter createEObjectAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.sysml.activities.NoBuffer <em>No Buffer</em>}'.
+ * <!-- begin-user-doc
+ * --> This default implementation returns null so
+ * that we can easily ignore cases; it's useful to ignore a case when
+ * inheritance will catch all the cases anyway. <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.sysml.activities.NoBuffer
+ * @generated
+ */
+ public Adapter createNoBufferAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.sysml.activities.Overwrite <em>Overwrite</em>}'.
+ * <!-- begin-user-doc
+ * --> This default implementation returns null so
+ * that we can easily ignore cases; it's useful to ignore a case when
+ * inheritance will catch all the cases anyway. <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.sysml.activities.Overwrite
+ * @generated
+ */
+ public Adapter createOverwriteAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.sysml.activities.Probability <em>Probability</em>}'.
+ * <!-- begin-user-doc --> This default
+ * implementation returns null so that we can easily ignore cases; it's
+ * useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.sysml.activities.Probability
+ * @generated
+ */
+ public Adapter createProbabilityAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class ' {@link org.eclipse.papyrus.sysml.activities.Rate <em>Rate</em>}'. <!--
+ * begin-user-doc --> This default implementation returns null so that we
+ * can easily ignore cases; it's useful to ignore a case when inheritance
+ * will catch all the cases anyway. <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.sysml.activities.Rate
+ * @generated
+ */
+ public Adapter createRateAdapter() {
+ return null;
+ }
+
+ /**
+ * Returns whether this factory is applicable for the type of the object.
+ * <!-- begin-user-doc --> This implementation returns <code>true</code> if
+ * the object is either the model's package or is an instance object of the
+ * model. <!-- end-user-doc -->
+ *
+ * @return whether this factory is applicable for the type of the object.
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object object) {
+ if (object == modelPackage) {
+ return true;
+ }
+ if (object instanceof EObject) {
+ return ((EObject) object).eClass().getEPackage() == modelPackage;
+ }
+ return false;
+ }
+
+} // ActivitiesAdapterFactory
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/util/ActivitiesResourceFactoryImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/util/ActivitiesResourceFactoryImpl.java
new file mode 100755
index 0000000..d361c4e
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/util/ActivitiesResourceFactoryImpl.java
@@ -0,0 +1,63 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.activities.util;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl;
+import org.eclipse.emf.ecore.xmi.XMLResource;
+
+/**
+ * <!-- begin-user-doc --> The <b>Resource Factory</b> associated with the
+ * package. <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.activities.util.ActivitiesResourceImpl
+ * @generated
+ */
+public class ActivitiesResourceFactoryImpl extends ResourceFactoryImpl {
+
+ /**
+ * Creates an instance of the resource factory.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public ActivitiesResourceFactoryImpl() {
+ super();
+ }
+
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Resource createResource(URI uri) {
+ XMLResource result = new ActivitiesResourceImpl(uri);
+ result.getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
+ result.getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
+
+ result.getDefaultSaveOptions().put(XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE);
+
+ result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
+ result.getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
+
+ result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_LEXICAL_HANDLER, Boolean.TRUE);
+ return result;
+ }
+
+} // ActivitiesResourceFactoryImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/util/ActivitiesResourceImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/util/ActivitiesResourceImpl.java
new file mode 100755
index 0000000..1e98409
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/util/ActivitiesResourceImpl.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.activities.util;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl;
+
+/**
+ * <!-- begin-user-doc --> The <b>Resource </b> associated with the package.
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.activities.util.ActivitiesResourceFactoryImpl
+ * @generated
+ */
+public class ActivitiesResourceImpl extends XMLResourceImpl {
+
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @param uri
+ * the URI of the new resource.
+ * @generated
+ */
+ public ActivitiesResourceImpl(URI uri) {
+ super(uri);
+ }
+
+} // ActivitiesResourceImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/util/ActivitiesSwitch.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/util/ActivitiesSwitch.java
new file mode 100755
index 0000000..dc2e08a
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/util/ActivitiesSwitch.java
@@ -0,0 +1,305 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.activities.util;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.util.Switch;
+import org.eclipse.papyrus.sysml.activities.ActivitiesPackage;
+import org.eclipse.papyrus.sysml.activities.Continuous;
+import org.eclipse.papyrus.sysml.activities.ControlOperator;
+import org.eclipse.papyrus.sysml.activities.Discrete;
+import org.eclipse.papyrus.sysml.activities.NoBuffer;
+import org.eclipse.papyrus.sysml.activities.Optional;
+import org.eclipse.papyrus.sysml.activities.Overwrite;
+import org.eclipse.papyrus.sysml.activities.Probability;
+import org.eclipse.papyrus.sysml.activities.Rate;
+
+/**
+ * <!-- begin-user-doc --> The <b>Switch</b> for the model's inheritance
+ * hierarchy. It supports the call {@link #doSwitch(EObject) doSwitch(object)} to invoke the <code>caseXXX</code> method for each class of the model,
+ * starting with the actual class of the object and proceeding up the
+ * inheritance hierarchy until a non-null result is returned, which is the
+ * result of the switch. <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.activities.ActivitiesPackage
+ * @generated
+ */
+public class ActivitiesSwitch<T> extends Switch<T> {
+
+ /**
+ * The cached model package
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected static ActivitiesPackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public ActivitiesSwitch() {
+ if (modelPackage == null) {
+ modelPackage = ActivitiesPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Checks whether this is a switch for the given package. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @parameter ePackage the package in question.
+ * @return whether this is a switch for the given package.
+ * @generated
+ */
+ @Override
+ protected boolean isSwitchFor(EPackage ePackage) {
+ return ePackage == modelPackage;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Continuous</em>'.
+ * <!-- begin-user-doc --> This implementation returns
+ * null; returning a non-null result will terminate the switch. <!--
+ * end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Continuous</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseContinuous(Continuous object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Control Operator</em>'.
+ * <!-- begin-user-doc --> This implementation
+ * returns null; returning a non-null result will terminate the switch. <!--
+ * end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Control Operator</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseControlOperator(ControlOperator object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Discrete</em>'.
+ * <!-- begin-user-doc --> This implementation returns
+ * null; returning a non-null result will terminate the switch. <!--
+ * end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Discrete</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseDiscrete(Discrete object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>No Buffer</em>'.
+ * <!-- begin-user-doc --> This implementation returns
+ * null; returning a non-null result will terminate the switch. <!--
+ * end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>No Buffer</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseNoBuffer(NoBuffer object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Overwrite</em>'.
+ * <!-- begin-user-doc --> This implementation returns
+ * null; returning a non-null result will terminate the switch. <!--
+ * end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Overwrite</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseOverwrite(Overwrite object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Probability</em>'.
+ * <!-- begin-user-doc --> This implementation
+ * returns null; returning a non-null result will terminate the switch. <!--
+ * end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Probability</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseProbability(Probability object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of ' <em>Rate</em>'. <!-- begin-user-doc --> This implementation returns null;
+ * returning a non-null result will terminate the switch. <!-- end-user-doc
+ * -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of ' <em>Rate</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseRate(Rate object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * <!-- begin-user-doc --> This implementation returns
+ * null; returning a non-null result will terminate the switch, but this is
+ * the last case anyway. <!-- end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+ * @generated
+ */
+ @Override
+ public T defaultCase(EObject object) {
+ return null;
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ @Override
+ protected T doSwitch(int classifierID, EObject theEObject) {
+ switch (classifierID) {
+ case ActivitiesPackage.OPTIONAL: {
+ Optional optional = (Optional) theEObject;
+ T result = caseOptional(optional);
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case ActivitiesPackage.RATE: {
+ Rate rate = (Rate) theEObject;
+ T result = caseRate(rate);
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case ActivitiesPackage.PROBABILITY: {
+ Probability probability = (Probability) theEObject;
+ T result = caseProbability(probability);
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case ActivitiesPackage.CONTINUOUS: {
+ Continuous continuous = (Continuous) theEObject;
+ T result = caseContinuous(continuous);
+ if (result == null) {
+ result = caseRate(continuous);
+ }
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case ActivitiesPackage.DISCRETE: {
+ Discrete discrete = (Discrete) theEObject;
+ T result = caseDiscrete(discrete);
+ if (result == null) {
+ result = caseRate(discrete);
+ }
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case ActivitiesPackage.CONTROL_OPERATOR: {
+ ControlOperator controlOperator = (ControlOperator) theEObject;
+ T result = caseControlOperator(controlOperator);
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case ActivitiesPackage.NO_BUFFER: {
+ NoBuffer noBuffer = (NoBuffer) theEObject;
+ T result = caseNoBuffer(noBuffer);
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case ActivitiesPackage.OVERWRITE: {
+ Overwrite overwrite = (Overwrite) theEObject;
+ T result = caseOverwrite(overwrite);
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ default:
+ return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Optional</em>'.
+ * <!-- begin-user-doc --> This implementation returns
+ * null; returning a non-null result will terminate the switch. <!--
+ * end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Optional</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseOptional(Optional object) {
+ return null;
+ }
+
+} // ActivitiesSwitch
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/util/ActivitiesXMLProcessor.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/util/ActivitiesXMLProcessor.java
new file mode 100755
index 0000000..28f0bc8
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/activities/util/ActivitiesXMLProcessor.java
@@ -0,0 +1,60 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.activities.util;
+
+import java.util.Map;
+
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.xmi.util.XMLProcessor;
+import org.eclipse.papyrus.sysml.activities.ActivitiesPackage;
+
+/**
+ * This class contains helper methods to serialize and deserialize XML documents
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class ActivitiesXMLProcessor extends XMLProcessor {
+
+ /**
+ * Public constructor to instantiate the helper.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ActivitiesXMLProcessor() {
+ super((EPackage.Registry.INSTANCE));
+ ActivitiesPackage.eINSTANCE.eClass();
+ }
+
+ /**
+ * Register for "*" and "xml" file extensions the ActivitiesResourceFactoryImpl factory.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected Map<String, Resource.Factory> getRegistrations() {
+ if (registrations == null) {
+ super.getRegistrations();
+ registrations.put(XML_EXTENSION, new ActivitiesResourceFactoryImpl());
+ registrations.put(STAR_EXTENSION, new ActivitiesResourceFactoryImpl());
+ }
+ return registrations;
+ }
+
+} // ActivitiesXMLProcessor
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/allocations/Allocate.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/allocations/Allocate.java
new file mode 100755
index 0000000..1c33e9f
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/allocations/Allocate.java
@@ -0,0 +1,63 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.allocations;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.uml2.uml.Abstraction;
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object ' <em><b>Allocate</b></em>'. <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.allocations.Allocate#getBase_Abstraction <em>Base Abstraction</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.sysml.allocations.AllocationsPackage#getAllocate()
+ * @model
+ * @generated
+ */
+public interface Allocate extends EObject {
+
+ /**
+ * Returns the value of the '<em><b>Base Abstraction</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Base Abstraction</em>' reference isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Base Abstraction</em>' reference.
+ * @see #setBase_Abstraction(Abstraction)
+ * @see org.eclipse.papyrus.sysml.allocations.AllocationsPackage#getAllocate_Base_Abstraction()
+ * @model required="true" ordered="false"
+ * @generated
+ */
+ Abstraction getBase_Abstraction();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.sysml.allocations.Allocate#getBase_Abstraction <em>Base Abstraction</em>}' reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Base Abstraction</em>' reference.
+ * @see #getBase_Abstraction()
+ * @generated
+ */
+ void setBase_Abstraction(Abstraction value);
+
+} // Allocate
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/allocations/AllocateActivityPartition.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/allocations/AllocateActivityPartition.java
new file mode 100755
index 0000000..dde86b9
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/allocations/AllocateActivityPartition.java
@@ -0,0 +1,64 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.allocations;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.uml2.uml.ActivityPartition;
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object ' <em><b>Allocate Activity Partition</b></em>'. <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.allocations.AllocateActivityPartition#getBase_ActivityPartition <em>Base Activity Partition</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.sysml.allocations.AllocationsPackage#getAllocateActivityPartition()
+ * @model
+ * @generated
+ */
+public interface AllocateActivityPartition extends EObject {
+
+ /**
+ * Returns the value of the '<em><b>Base Activity Partition</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Base Activity Partition</em>' reference isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Base Activity Partition</em>' reference.
+ * @see #setBase_ActivityPartition(ActivityPartition)
+ * @see org.eclipse.papyrus.sysml.allocations.AllocationsPackage#getAllocateActivityPartition_Base_ActivityPartition()
+ * @model required="true" ordered="false"
+ * @generated
+ */
+ ActivityPartition getBase_ActivityPartition();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.sysml.allocations.AllocateActivityPartition#getBase_ActivityPartition
+ * <em>Base Activity Partition</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Base Activity Partition</em>' reference.
+ * @see #getBase_ActivityPartition()
+ * @generated
+ */
+ void setBase_ActivityPartition(ActivityPartition value);
+
+} // AllocateActivityPartition
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/allocations/Allocated.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/allocations/Allocated.java
new file mode 100755
index 0000000..50b6fa5
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/allocations/Allocated.java
@@ -0,0 +1,161 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.allocations;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.uml2.uml.NamedElement;
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object ' <em><b>Allocated</b></em>'. <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.allocations.Allocated#getBase_NamedElement <em>Base Named Element</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.allocations.Allocated#getAllocatedFrom <em>Allocated From</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.allocations.Allocated#getAllocatedTo <em>Allocated To</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.sysml.allocations.AllocationsPackage#getAllocated()
+ * @model
+ * @generated
+ */
+public interface Allocated extends EObject {
+
+ /**
+ * Returns the value of the '<em><b>Allocated From</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.uml2.uml.NamedElement}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Allocated From</em>' reference list isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Allocated From</em>' reference list.
+ * @see org.eclipse.papyrus.sysml.allocations.AllocationsPackage#getAllocated_AllocatedFrom()
+ * @model transient="true" changeable="false" volatile="true" derived="true" ordered="false"
+ * @generated
+ */
+ EList<NamedElement> getAllocatedFrom();
+
+ /**
+ * Retrieves the first {@link org.eclipse.uml2.uml.NamedElement} with the specified '<em><b>Name</b></em>' from the ' <em><b>Allocated From</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @param name
+ * The '<em><b>Name</b></em>' of the {@link org.eclipse.uml2.uml.NamedElement} to retrieve, or <code>null</code>.
+ * @return The first {@link org.eclipse.uml2.uml.NamedElement} with the specified '<em><b>Name</b></em>', or <code>null</code>.
+ * @see #getAllocatedFrom()
+ * @generated
+ */
+ NamedElement getAllocatedFrom(String name);
+
+ /**
+ * Retrieves the first {@link org.eclipse.uml2.uml.NamedElement} with the specified '<em><b>Name</b></em>' from the ' <em><b>Allocated From</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @param name
+ * The '<em><b>Name</b></em>' of the {@link org.eclipse.uml2.uml.NamedElement} to retrieve, or <code>null</code>.
+ * @param ignoreCase
+ * Whether to ignore case in {@link java.lang.String} comparisons.
+ * @param eClass
+ * The Ecore class of the {@link org.eclipse.uml2.uml.NamedElement} to retrieve, or <code>null</code>.
+ * @return The first {@link org.eclipse.uml2.uml.NamedElement} with the specified '<em><b>Name</b></em>', or <code>null</code>.
+ * @see #getAllocatedFrom()
+ * @generated
+ */
+ NamedElement getAllocatedFrom(String name, boolean ignoreCase, EClass eClass);
+
+ /**
+ * Returns the value of the '<em><b>Allocated To</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.uml2.uml.NamedElement}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Allocated To</em>' reference list isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Allocated To</em>' reference list.
+ * @see org.eclipse.papyrus.sysml.allocations.AllocationsPackage#getAllocated_AllocatedTo()
+ * @model transient="true" changeable="false" volatile="true" derived="true" ordered="false"
+ * @generated
+ */
+ EList<NamedElement> getAllocatedTo();
+
+ /**
+ * Retrieves the first {@link org.eclipse.uml2.uml.NamedElement} with the specified '<em><b>Name</b></em>' from the '<em><b>Allocated To</b></em>'
+ * reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @param name
+ * The '<em><b>Name</b></em>' of the {@link org.eclipse.uml2.uml.NamedElement} to retrieve, or <code>null</code>.
+ * @return The first {@link org.eclipse.uml2.uml.NamedElement} with the specified '<em><b>Name</b></em>', or <code>null</code>.
+ * @see #getAllocatedTo()
+ * @generated
+ */
+ NamedElement getAllocatedTo(String name);
+
+ /**
+ * Retrieves the first {@link org.eclipse.uml2.uml.NamedElement} with the specified '<em><b>Name</b></em>' from the '<em><b>Allocated To</b></em>'
+ * reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @param name
+ * The '<em><b>Name</b></em>' of the {@link org.eclipse.uml2.uml.NamedElement} to retrieve, or <code>null</code>.
+ * @param ignoreCase
+ * Whether to ignore case in {@link java.lang.String} comparisons.
+ * @param eClass
+ * The Ecore class of the {@link org.eclipse.uml2.uml.NamedElement} to retrieve, or <code>null</code>.
+ * @return The first {@link org.eclipse.uml2.uml.NamedElement} with the specified '<em><b>Name</b></em>', or <code>null</code>.
+ * @see #getAllocatedTo()
+ * @generated
+ */
+ NamedElement getAllocatedTo(String name, boolean ignoreCase, EClass eClass);
+
+ /**
+ * Returns the value of the '<em><b>Base Named Element</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Base Named Element</em>' reference isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Base Named Element</em>' reference.
+ * @see #setBase_NamedElement(NamedElement)
+ * @see org.eclipse.papyrus.sysml.allocations.AllocationsPackage#getAllocated_Base_NamedElement()
+ * @model required="true" ordered="false"
+ * @generated
+ */
+ NamedElement getBase_NamedElement();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.sysml.allocations.Allocated#getBase_NamedElement <em>Base Named Element</em>}' reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Base Named Element</em>' reference.
+ * @see #getBase_NamedElement()
+ * @generated
+ */
+ void setBase_NamedElement(NamedElement value);
+
+} // Allocated
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/allocations/AllocationsFactory.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/allocations/AllocationsFactory.java
new file mode 100755
index 0000000..dd00563
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/allocations/AllocationsFactory.java
@@ -0,0 +1,75 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.allocations;
+
+import org.eclipse.emf.ecore.EFactory;
+
+/**
+ * <!-- begin-user-doc --> The <b>Factory</b> for the model. It provides a
+ * create method for each non-abstract class of the model. <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.allocations.AllocationsPackage
+ * @generated
+ */
+public interface AllocationsFactory extends EFactory {
+
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ AllocationsFactory eINSTANCE = org.eclipse.papyrus.sysml.allocations.internal.impl.AllocationsFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>Allocate</em>'.
+ * <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Allocate</em>'.
+ * @generated
+ */
+ Allocate createAllocate();
+
+ /**
+ * Returns a new object of class '<em>Allocate Activity Partition</em>'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Allocate Activity Partition</em>'.
+ * @generated
+ */
+ AllocateActivityPartition createAllocateActivityPartition();
+
+ /**
+ * Returns a new object of class '<em>Allocated</em>'.
+ * <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Allocated</em>'.
+ * @generated
+ */
+ Allocated createAllocated();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the package supported by this factory.
+ * @generated
+ */
+ AllocationsPackage getAllocationsPackage();
+
+} // AllocationsFactory
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/allocations/AllocationsPackage.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/allocations/AllocationsPackage.java
new file mode 100755
index 0000000..076196b
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/allocations/AllocationsPackage.java
@@ -0,0 +1,397 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.allocations;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+/**
+ * <!-- begin-user-doc --> The <b>Package</b> for the model. It contains
+ * accessors for the meta objects to represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.allocations.AllocationsFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface AllocationsPackage extends EPackage {
+
+ /**
+ * <!-- begin-user-doc --> Defines literals for the meta objects that
+ * represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ interface Literals {
+
+ /**
+ * The meta object literal for the ' {@link org.eclipse.papyrus.sysml.allocations.internal.impl.AllocateImpl
+ * <em>Allocate</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @see org.eclipse.papyrus.sysml.allocations.internal.impl.AllocateImpl
+ * @see org.eclipse.papyrus.sysml.allocations.internal.impl.AllocationsPackageImpl#getAllocate()
+ * @generated
+ */
+ EClass ALLOCATE = eINSTANCE.getAllocate();
+
+ /**
+ * The meta object literal for the '<em><b>Base Abstraction</b></em>' reference feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference ALLOCATE__BASE_ABSTRACTION = eINSTANCE.getAllocate_Base_Abstraction();
+
+ /**
+ * The meta object literal for the ' {@link org.eclipse.papyrus.sysml.allocations.internal.impl.AllocatedImpl
+ * <em>Allocated</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @see org.eclipse.papyrus.sysml.allocations.internal.impl.AllocatedImpl
+ * @see org.eclipse.papyrus.sysml.allocations.internal.impl.AllocationsPackageImpl#getAllocated()
+ * @generated
+ */
+ EClass ALLOCATED = eINSTANCE.getAllocated();
+
+ /**
+ * The meta object literal for the '<em><b>Base Named Element</b></em>' reference feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference ALLOCATED__BASE_NAMED_ELEMENT = eINSTANCE.getAllocated_Base_NamedElement();
+
+ /**
+ * The meta object literal for the '<em><b>Allocated From</b></em>' reference list feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference ALLOCATED__ALLOCATED_FROM = eINSTANCE.getAllocated_AllocatedFrom();
+
+ /**
+ * The meta object literal for the '<em><b>Allocated To</b></em>' reference list feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference ALLOCATED__ALLOCATED_TO = eINSTANCE.getAllocated_AllocatedTo();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.sysml.allocations.internal.impl.AllocateActivityPartitionImpl
+ * <em>Allocate Activity Partition</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.allocations.internal.impl.AllocateActivityPartitionImpl
+ * @see org.eclipse.papyrus.sysml.allocations.internal.impl.AllocationsPackageImpl#getAllocateActivityPartition()
+ * @generated
+ */
+ EClass ALLOCATE_ACTIVITY_PARTITION = eINSTANCE.getAllocateActivityPartition();
+
+ /**
+ * The meta object literal for the ' <em><b>Base Activity Partition</b></em>' reference feature. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference ALLOCATE_ACTIVITY_PARTITION__BASE_ACTIVITY_PARTITION = eINSTANCE.getAllocateActivityPartition_Base_ActivityPartition();
+
+ }
+
+ /**
+ * The package name.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ String eNAME = "allocations";
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ String eNS_URI = "http://www.eclipse.org/papyrus/0.7.0/SysML/Allocations";
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ String eNS_PREFIX = "Allocations";
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ AllocationsPackage eINSTANCE = org.eclipse.papyrus.sysml.allocations.internal.impl.AllocationsPackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.sysml.allocations.internal.impl.AllocateImpl <em>Allocate</em>}' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.allocations.internal.impl.AllocateImpl
+ * @see org.eclipse.papyrus.sysml.allocations.internal.impl.AllocationsPackageImpl#getAllocate()
+ * @generated
+ */
+ int ALLOCATE = 0;
+
+ /**
+ * The feature id for the '<em><b>Base Abstraction</b></em>' reference. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int ALLOCATE__BASE_ABSTRACTION = 0;
+
+ /**
+ * The number of structural features of the '<em>Allocate</em>' class. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int ALLOCATE_FEATURE_COUNT = 1;
+
+ /**
+ * The number of operations of the '<em>Allocate</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int ALLOCATE_OPERATION_COUNT = 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.sysml.allocations.internal.impl.AllocatedImpl <em>Allocated</em>}' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.allocations.internal.impl.AllocatedImpl
+ * @see org.eclipse.papyrus.sysml.allocations.internal.impl.AllocationsPackageImpl#getAllocated()
+ * @generated
+ */
+ int ALLOCATED = 1;
+
+ /**
+ * The feature id for the '<em><b>Base Named Element</b></em>' reference.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int ALLOCATED__BASE_NAMED_ELEMENT = 0;
+
+ /**
+ * The feature id for the '<em><b>Allocated From</b></em>' reference list.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int ALLOCATED__ALLOCATED_FROM = 1;
+
+ /**
+ * The feature id for the '<em><b>Allocated To</b></em>' reference list.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int ALLOCATED__ALLOCATED_TO = 2;
+
+ /**
+ * The number of structural features of the '<em>Allocated</em>' class. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int ALLOCATED_FEATURE_COUNT = 3;
+
+ /**
+ * The number of operations of the '<em>Allocated</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int ALLOCATED_OPERATION_COUNT = 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.sysml.allocations.internal.impl.AllocateActivityPartitionImpl
+ * <em>Allocate Activity Partition</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.allocations.internal.impl.AllocateActivityPartitionImpl
+ * @see org.eclipse.papyrus.sysml.allocations.internal.impl.AllocationsPackageImpl#getAllocateActivityPartition()
+ * @generated
+ */
+ int ALLOCATE_ACTIVITY_PARTITION = 2;
+
+ /**
+ * The feature id for the '<em><b>Base Activity Partition</b></em>' reference.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int ALLOCATE_ACTIVITY_PARTITION__BASE_ACTIVITY_PARTITION = 0;
+
+ /**
+ * The number of structural features of the '<em>Allocate Activity Partition</em>' class.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int ALLOCATE_ACTIVITY_PARTITION_FEATURE_COUNT = 1;
+
+ /**
+ * The number of operations of the '<em>Allocate Activity Partition</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int ALLOCATE_ACTIVITY_PARTITION_OPERATION_COUNT = 0;
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.sysml.allocations.Allocate <em>Allocate</em>}'.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @return the meta object for class '<em>Allocate</em>'.
+ * @see org.eclipse.papyrus.sysml.allocations.Allocate
+ * @generated
+ */
+ EClass getAllocate();
+
+ /**
+ * Returns the meta object for the reference ' {@link org.eclipse.papyrus.sysml.allocations.Allocate#getBase_Abstraction
+ * <em>Base Abstraction</em>}'. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @return the meta object for the reference '<em>Base Abstraction</em>'.
+ * @see org.eclipse.papyrus.sysml.allocations.Allocate#getBase_Abstraction()
+ * @see #getAllocate()
+ * @generated
+ */
+ EReference getAllocate_Base_Abstraction();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.sysml.allocations.AllocateActivityPartition <em>Allocate Activity Partition</em>} '.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @return the meta object for class '<em>Allocate Activity Partition</em>'.
+ * @see org.eclipse.papyrus.sysml.allocations.AllocateActivityPartition
+ * @generated
+ */
+ EClass getAllocateActivityPartition();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.sysml.allocations.AllocateActivityPartition#getBase_ActivityPartition
+ * <em>Base Activity Partition</em>}'.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @return the meta object for the reference '<em>Base Activity Partition</em>'.
+ * @see org.eclipse.papyrus.sysml.allocations.AllocateActivityPartition#getBase_ActivityPartition()
+ * @see #getAllocateActivityPartition()
+ * @generated
+ */
+ EReference getAllocateActivityPartition_Base_ActivityPartition();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.sysml.allocations.Allocated <em>Allocated</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Allocated</em>'.
+ * @see org.eclipse.papyrus.sysml.allocations.Allocated
+ * @generated
+ */
+ EClass getAllocated();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.papyrus.sysml.allocations.Allocated#getAllocatedFrom
+ * <em>Allocated From</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference list '<em>Allocated From</em>'.
+ * @see org.eclipse.papyrus.sysml.allocations.Allocated#getAllocatedFrom()
+ * @see #getAllocated()
+ * @generated
+ */
+ EReference getAllocated_AllocatedFrom();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.papyrus.sysml.allocations.Allocated#getAllocatedTo <em>Allocated To</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference list '<em>Allocated To</em>'.
+ * @see org.eclipse.papyrus.sysml.allocations.Allocated#getAllocatedTo()
+ * @see #getAllocated()
+ * @generated
+ */
+ EReference getAllocated_AllocatedTo();
+
+ /**
+ * Returns the meta object for the reference ' {@link org.eclipse.papyrus.sysml.allocations.Allocated#getBase_NamedElement
+ * <em>Base Named Element</em>}'. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @return the meta object for the reference '<em>Base Named Element</em>'.
+ * @see org.eclipse.papyrus.sysml.allocations.Allocated#getBase_NamedElement()
+ * @see #getAllocated()
+ * @generated
+ */
+ EReference getAllocated_Base_NamedElement();
+
+ /**
+ * Returns the factory that creates the instances of the model. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the factory that creates the instances of the model.
+ * @generated
+ */
+ AllocationsFactory getAllocationsFactory();
+
+} // AllocationsPackage
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/allocations/internal/impl/AllocateActivityPartitionImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/allocations/internal/impl/AllocateActivityPartitionImpl.java
new file mode 100755
index 0000000..217e8ac
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/allocations/internal/impl/AllocateActivityPartitionImpl.java
@@ -0,0 +1,169 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.allocations.internal.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+import org.eclipse.papyrus.sysml.allocations.AllocateActivityPartition;
+import org.eclipse.papyrus.sysml.allocations.AllocationsPackage;
+import org.eclipse.uml2.uml.ActivityPartition;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object ' <em><b>Allocate Activity Partition</b></em>'. <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.allocations.internal.impl.AllocateActivityPartitionImpl#getBase_ActivityPartition <em>Base Activity Partition </em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class AllocateActivityPartitionImpl extends MinimalEObjectImpl.Container implements AllocateActivityPartition {
+
+ /**
+ * The cached value of the '{@link #getBase_ActivityPartition() <em>Base Activity Partition</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getBase_ActivityPartition()
+ * @generated
+ * @ordered
+ */
+ protected ActivityPartition base_ActivityPartition;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected AllocateActivityPartitionImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ActivityPartition basicGetBase_ActivityPartition() {
+ return base_ActivityPartition;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case AllocationsPackage.ALLOCATE_ACTIVITY_PARTITION__BASE_ACTIVITY_PARTITION:
+ if (resolve) {
+ return getBase_ActivityPartition();
+ }
+ return basicGetBase_ActivityPartition();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case AllocationsPackage.ALLOCATE_ACTIVITY_PARTITION__BASE_ACTIVITY_PARTITION:
+ return base_ActivityPartition != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case AllocationsPackage.ALLOCATE_ACTIVITY_PARTITION__BASE_ACTIVITY_PARTITION:
+ setBase_ActivityPartition((ActivityPartition) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return AllocationsPackage.Literals.ALLOCATE_ACTIVITY_PARTITION;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case AllocationsPackage.ALLOCATE_ACTIVITY_PARTITION__BASE_ACTIVITY_PARTITION:
+ setBase_ActivityPartition((ActivityPartition) null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ActivityPartition getBase_ActivityPartition() {
+ if (base_ActivityPartition != null && base_ActivityPartition.eIsProxy()) {
+ InternalEObject oldBase_ActivityPartition = (InternalEObject) base_ActivityPartition;
+ base_ActivityPartition = (ActivityPartition) eResolveProxy(oldBase_ActivityPartition);
+ if (base_ActivityPartition != oldBase_ActivityPartition) {
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, AllocationsPackage.ALLOCATE_ACTIVITY_PARTITION__BASE_ACTIVITY_PARTITION, oldBase_ActivityPartition, base_ActivityPartition));
+ }
+ }
+ }
+ return base_ActivityPartition;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setBase_ActivityPartition(ActivityPartition newBase_ActivityPartition) {
+ ActivityPartition oldBase_ActivityPartition = base_ActivityPartition;
+ base_ActivityPartition = newBase_ActivityPartition;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, AllocationsPackage.ALLOCATE_ACTIVITY_PARTITION__BASE_ACTIVITY_PARTITION, oldBase_ActivityPartition, base_ActivityPartition));
+ }
+ }
+
+} // AllocateActivityPartitionImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/allocations/internal/impl/AllocateImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/allocations/internal/impl/AllocateImpl.java
new file mode 100755
index 0000000..b4cd9fc
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/allocations/internal/impl/AllocateImpl.java
@@ -0,0 +1,169 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.allocations.internal.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+import org.eclipse.papyrus.sysml.allocations.Allocate;
+import org.eclipse.papyrus.sysml.allocations.AllocationsPackage;
+import org.eclipse.uml2.uml.Abstraction;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object ' <em><b>Allocate</b></em>'. <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.allocations.internal.impl.AllocateImpl#getBase_Abstraction <em>Base Abstraction</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class AllocateImpl extends MinimalEObjectImpl.Container implements Allocate {
+
+ /**
+ * The cached value of the '{@link #getBase_Abstraction() <em>Base Abstraction</em>}' reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see #getBase_Abstraction()
+ * @generated
+ * @ordered
+ */
+ protected Abstraction base_Abstraction;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected AllocateImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Abstraction basicGetBase_Abstraction() {
+ return base_Abstraction;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case AllocationsPackage.ALLOCATE__BASE_ABSTRACTION:
+ if (resolve) {
+ return getBase_Abstraction();
+ }
+ return basicGetBase_Abstraction();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case AllocationsPackage.ALLOCATE__BASE_ABSTRACTION:
+ return base_Abstraction != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case AllocationsPackage.ALLOCATE__BASE_ABSTRACTION:
+ setBase_Abstraction((Abstraction) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return AllocationsPackage.Literals.ALLOCATE;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case AllocationsPackage.ALLOCATE__BASE_ABSTRACTION:
+ setBase_Abstraction((Abstraction) null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Abstraction getBase_Abstraction() {
+ if (base_Abstraction != null && base_Abstraction.eIsProxy()) {
+ InternalEObject oldBase_Abstraction = (InternalEObject) base_Abstraction;
+ base_Abstraction = (Abstraction) eResolveProxy(oldBase_Abstraction);
+ if (base_Abstraction != oldBase_Abstraction) {
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, AllocationsPackage.ALLOCATE__BASE_ABSTRACTION, oldBase_Abstraction, base_Abstraction));
+ }
+ }
+ }
+ return base_Abstraction;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setBase_Abstraction(Abstraction newBase_Abstraction) {
+ Abstraction oldBase_Abstraction = base_Abstraction;
+ base_Abstraction = newBase_Abstraction;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, AllocationsPackage.ALLOCATE__BASE_ABSTRACTION, oldBase_Abstraction, base_Abstraction));
+ }
+ }
+
+} // AllocateImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/allocations/internal/impl/AllocatedImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/allocations/internal/impl/AllocatedImpl.java
new file mode 100755
index 0000000..343ee61
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/allocations/internal/impl/AllocatedImpl.java
@@ -0,0 +1,311 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.allocations.internal.impl;
+
+import java.util.Iterator;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.BasicEList;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+import org.eclipse.emf.ecore.util.EcoreEList.UnmodifiableEList;
+import org.eclipse.papyrus.sysml.allocations.Allocate;
+import org.eclipse.papyrus.sysml.allocations.Allocated;
+import org.eclipse.papyrus.sysml.allocations.AllocationsPackage;
+import org.eclipse.uml2.uml.Dependency;
+import org.eclipse.uml2.uml.DirectedRelationship;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object ' <em><b>Allocated</b></em>'. <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.allocations.internal.impl.AllocatedImpl#getBase_NamedElement <em>Base Named Element</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.allocations.internal.impl.AllocatedImpl#getAllocatedFrom <em>Allocated From</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.allocations.internal.impl.AllocatedImpl#getAllocatedTo <em>Allocated To</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class AllocatedImpl extends MinimalEObjectImpl.Container implements Allocated {
+
+ /**
+ * The cached value of the '{@link #getBase_NamedElement() <em>Base Named Element</em>}' reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see #getBase_NamedElement()
+ * @generated
+ * @ordered
+ */
+ protected NamedElement base_NamedElement;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected AllocatedImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public NamedElement basicGetBase_NamedElement() {
+ return base_NamedElement;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case AllocationsPackage.ALLOCATED__BASE_NAMED_ELEMENT:
+ if (resolve) {
+ return getBase_NamedElement();
+ }
+ return basicGetBase_NamedElement();
+ case AllocationsPackage.ALLOCATED__ALLOCATED_FROM:
+ return getAllocatedFrom();
+ case AllocationsPackage.ALLOCATED__ALLOCATED_TO:
+ return getAllocatedTo();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case AllocationsPackage.ALLOCATED__BASE_NAMED_ELEMENT:
+ return base_NamedElement != null;
+ case AllocationsPackage.ALLOCATED__ALLOCATED_FROM:
+ return !getAllocatedFrom().isEmpty();
+ case AllocationsPackage.ALLOCATED__ALLOCATED_TO:
+ return !getAllocatedTo().isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case AllocationsPackage.ALLOCATED__BASE_NAMED_ELEMENT:
+ setBase_NamedElement((NamedElement) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return AllocationsPackage.Literals.ALLOCATED;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case AllocationsPackage.ALLOCATED__BASE_NAMED_ELEMENT:
+ setBase_NamedElement((NamedElement) null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public EList<NamedElement> getAllocatedFrom() {
+ // AllocatedFrom property lists all the named elements linked to current
+ // by an Allocate link.
+ // Current element is the target of the Allocate link.
+ EList<NamedElement> allocatedFrom = new BasicEList<NamedElement>();
+ Allocate currentAllocate = null;
+
+ if (getBase_NamedElement() != null) {
+ // Find Allocate link
+ Iterator<DirectedRelationship> itDep = getBase_NamedElement().getTargetDirectedRelationships().iterator();
+ while (itDep.hasNext()) {
+ DirectedRelationship currentDRelationship = itDep.next();
+ currentAllocate = UMLUtil.getStereotypeApplication(currentDRelationship, Allocate.class);
+
+ if (currentAllocate != null) {
+ EList<Element> targets = currentAllocate.getBase_Abstraction().getSources();
+ Iterator<Element> it = targets.iterator();
+ while (it.hasNext()) {
+ Element currentElt = it.next();
+ if (currentElt instanceof NamedElement) {
+ allocatedFrom.add((NamedElement) currentElt);
+ }
+ }
+ }
+ }
+ }
+
+ UnmodifiableEList<NamedElement> resultList = new UnmodifiableEList<NamedElement>(this, AllocationsPackage.eINSTANCE.getAllocated_AllocatedFrom(), allocatedFrom.size(), allocatedFrom.toArray());
+ return resultList;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public NamedElement getAllocatedFrom(String name) {
+ return getAllocatedFrom(name, false, null);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public NamedElement getAllocatedFrom(String name, boolean ignoreCase, EClass eClass) {
+ allocatedFromLoop: for (NamedElement allocatedFrom : getAllocatedFrom()) {
+ if (eClass != null && !eClass.isInstance(allocatedFrom)) {
+ continue allocatedFromLoop;
+ }
+ if (name != null && !(ignoreCase ? name.equalsIgnoreCase(allocatedFrom.getName()) : name.equals(allocatedFrom.getName()))) {
+ continue allocatedFromLoop;
+ }
+ return allocatedFrom;
+ }
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public EList<NamedElement> getAllocatedTo() {
+ // AllocatedFrom property lists all the named elements linked to current
+ // by an Allocate link.
+ // Current element is the target of the Allocate link.
+ EList<NamedElement> allocatedTo = new BasicEList<NamedElement>();
+ Allocate currentAllocate = null;
+
+ if (getBase_NamedElement() != null) {
+ // Find Allocate link
+ Iterator<Dependency> itDep = getBase_NamedElement().getClientDependencies().iterator();
+ while (itDep.hasNext()) {
+ Dependency currentDependency = itDep.next();
+ currentAllocate = UMLUtil.getStereotypeApplication(currentDependency, Allocate.class);
+
+ if (currentAllocate != null) {
+ allocatedTo.addAll(currentAllocate.getBase_Abstraction().getSuppliers());
+ }
+ }
+ }
+ UnmodifiableEList<NamedElement> resultList = new UnmodifiableEList<NamedElement>(this, AllocationsPackage.eINSTANCE.getAllocated_AllocatedTo(), allocatedTo.size(), allocatedTo.toArray());
+ return resultList;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public NamedElement getAllocatedTo(String name) {
+ return getAllocatedTo(name, false, null);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public NamedElement getAllocatedTo(String name, boolean ignoreCase, EClass eClass) {
+ allocatedToLoop: for (NamedElement allocatedTo : getAllocatedTo()) {
+ if (eClass != null && !eClass.isInstance(allocatedTo)) {
+ continue allocatedToLoop;
+ }
+ if (name != null && !(ignoreCase ? name.equalsIgnoreCase(allocatedTo.getName()) : name.equals(allocatedTo.getName()))) {
+ continue allocatedToLoop;
+ }
+ return allocatedTo;
+ }
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public NamedElement getBase_NamedElement() {
+ if (base_NamedElement != null && base_NamedElement.eIsProxy()) {
+ InternalEObject oldBase_NamedElement = (InternalEObject) base_NamedElement;
+ base_NamedElement = (NamedElement) eResolveProxy(oldBase_NamedElement);
+ if (base_NamedElement != oldBase_NamedElement) {
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, AllocationsPackage.ALLOCATED__BASE_NAMED_ELEMENT, oldBase_NamedElement, base_NamedElement));
+ }
+ }
+ }
+ return base_NamedElement;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setBase_NamedElement(NamedElement newBase_NamedElement) {
+ NamedElement oldBase_NamedElement = base_NamedElement;
+ base_NamedElement = newBase_NamedElement;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, AllocationsPackage.ALLOCATED__BASE_NAMED_ELEMENT, oldBase_NamedElement, base_NamedElement));
+ }
+ }
+
+} // AllocatedImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/allocations/internal/impl/AllocationsFactoryImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/allocations/internal/impl/AllocationsFactoryImpl.java
new file mode 100755
index 0000000..eb8a8c9
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/allocations/internal/impl/AllocationsFactoryImpl.java
@@ -0,0 +1,134 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.allocations.internal.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+import org.eclipse.papyrus.sysml.allocations.Allocate;
+import org.eclipse.papyrus.sysml.allocations.AllocateActivityPartition;
+import org.eclipse.papyrus.sysml.allocations.Allocated;
+import org.eclipse.papyrus.sysml.allocations.AllocationsFactory;
+import org.eclipse.papyrus.sysml.allocations.AllocationsPackage;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model <b>Factory</b>. <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+public class AllocationsFactoryImpl extends EFactoryImpl implements AllocationsFactory {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static AllocationsPackage getPackage() {
+ return AllocationsPackage.eINSTANCE;
+ }
+
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public static AllocationsFactory init() {
+ try {
+ AllocationsFactory theAllocationsFactory = (AllocationsFactory) EPackage.Registry.INSTANCE.getEFactory(AllocationsPackage.eNS_URI);
+ if (theAllocationsFactory != null) {
+ return theAllocationsFactory;
+ }
+ } catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new AllocationsFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public AllocationsFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ case AllocationsPackage.ALLOCATE:
+ return createAllocate();
+ case AllocationsPackage.ALLOCATED:
+ return createAllocated();
+ case AllocationsPackage.ALLOCATE_ACTIVITY_PARTITION:
+ return createAllocateActivityPartition();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Allocate createAllocate() {
+ AllocateImpl allocate = new AllocateImpl();
+ return allocate;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public AllocateActivityPartition createAllocateActivityPartition() {
+ AllocateActivityPartitionImpl allocateActivityPartition = new AllocateActivityPartitionImpl();
+ return allocateActivityPartition;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Allocated createAllocated() {
+ AllocatedImpl allocated = new AllocatedImpl();
+ return allocated;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public AllocationsPackage getAllocationsPackage() {
+ return (AllocationsPackage) getEPackage();
+ }
+
+} // AllocationsFactoryImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/allocations/internal/impl/AllocationsPackageImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/allocations/internal/impl/AllocationsPackageImpl.java
new file mode 100755
index 0000000..452d2c7
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/allocations/internal/impl/AllocationsPackageImpl.java
@@ -0,0 +1,346 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.allocations.internal.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+import org.eclipse.papyrus.sysml.SysmlPackage;
+import org.eclipse.papyrus.sysml.activities.ActivitiesPackage;
+import org.eclipse.papyrus.sysml.activities.internal.impl.ActivitiesPackageImpl;
+import org.eclipse.papyrus.sysml.allocations.Allocate;
+import org.eclipse.papyrus.sysml.allocations.AllocateActivityPartition;
+import org.eclipse.papyrus.sysml.allocations.Allocated;
+import org.eclipse.papyrus.sysml.allocations.AllocationsFactory;
+import org.eclipse.papyrus.sysml.allocations.AllocationsPackage;
+import org.eclipse.papyrus.sysml.blocks.BlocksPackage;
+import org.eclipse.papyrus.sysml.blocks.internal.impl.BlocksPackageImpl;
+import org.eclipse.papyrus.sysml.constraints.ConstraintsPackage;
+import org.eclipse.papyrus.sysml.constraints.internal.impl.ConstraintsPackageImpl;
+import org.eclipse.papyrus.sysml.interactions.InteractionsPackage;
+import org.eclipse.papyrus.sysml.interactions.internal.impl.InteractionsPackageImpl;
+import org.eclipse.papyrus.sysml.internal.impl.SysmlPackageImpl;
+import org.eclipse.papyrus.sysml.modelelements.ModelelementsPackage;
+import org.eclipse.papyrus.sysml.modelelements.internal.impl.ModelelementsPackageImpl;
+import org.eclipse.papyrus.sysml.portandflows.PortandflowsPackage;
+import org.eclipse.papyrus.sysml.portandflows.internal.impl.PortandflowsPackageImpl;
+import org.eclipse.papyrus.sysml.requirements.RequirementsPackage;
+import org.eclipse.papyrus.sysml.requirements.internal.impl.RequirementsPackageImpl;
+import org.eclipse.papyrus.sysml.statemachines.StatemachinesPackage;
+import org.eclipse.papyrus.sysml.statemachines.internal.impl.StatemachinesPackageImpl;
+import org.eclipse.papyrus.sysml.usecases.UsecasesPackage;
+import org.eclipse.papyrus.sysml.usecases.internal.impl.UsecasesPackageImpl;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.eclipse.uml2.uml.profile.standard.StandardPackage;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model <b>Package</b>. <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+public class AllocationsPackageImpl extends EPackageImpl implements AllocationsPackage {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private static boolean isInited = false;
+
+ /**
+ * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+ *
+ * <p>
+ * This method is used to initialize {@link AllocationsPackage#eINSTANCE} when that field is accessed. Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #eNS_URI
+ * @see #createPackageContents()
+ * @see #initializePackageContents()
+ * @generated
+ */
+ public static AllocationsPackage init() {
+ if (isInited) {
+ return (AllocationsPackage) EPackage.Registry.INSTANCE.getEPackage(AllocationsPackage.eNS_URI);
+ }
+
+ // Obtain or create and register package
+ AllocationsPackageImpl theAllocationsPackage = (AllocationsPackageImpl) (EPackage.Registry.INSTANCE.get(eNS_URI) instanceof AllocationsPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new AllocationsPackageImpl());
+
+ isInited = true;
+
+ // Initialize simple dependencies
+ StandardPackage.eINSTANCE.eClass();
+
+ // Obtain or create and register interdependencies
+ SysmlPackageImpl theSysmlPackage = (SysmlPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(SysmlPackage.eNS_URI) instanceof SysmlPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(SysmlPackage.eNS_URI) : SysmlPackage.eINSTANCE);
+ ModelelementsPackageImpl theModelelementsPackage = (ModelelementsPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(ModelelementsPackage.eNS_URI) instanceof ModelelementsPackageImpl ? EPackage.Registry.INSTANCE
+ .getEPackage(ModelelementsPackage.eNS_URI) : ModelelementsPackage.eINSTANCE);
+ BlocksPackageImpl theBlocksPackage = (BlocksPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(BlocksPackage.eNS_URI) instanceof BlocksPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(BlocksPackage.eNS_URI) : BlocksPackage.eINSTANCE);
+ PortandflowsPackageImpl thePortandflowsPackage = (PortandflowsPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(PortandflowsPackage.eNS_URI) instanceof PortandflowsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(PortandflowsPackage.eNS_URI)
+ : PortandflowsPackage.eINSTANCE);
+ ConstraintsPackageImpl theConstraintsPackage = (ConstraintsPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(ConstraintsPackage.eNS_URI) instanceof ConstraintsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ConstraintsPackage.eNS_URI)
+ : ConstraintsPackage.eINSTANCE);
+ ActivitiesPackageImpl theActivitiesPackage = (ActivitiesPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(ActivitiesPackage.eNS_URI) instanceof ActivitiesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ActivitiesPackage.eNS_URI)
+ : ActivitiesPackage.eINSTANCE);
+ RequirementsPackageImpl theRequirementsPackage = (RequirementsPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(RequirementsPackage.eNS_URI) instanceof RequirementsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(RequirementsPackage.eNS_URI)
+ : RequirementsPackage.eINSTANCE);
+ InteractionsPackageImpl theInteractionsPackage = (InteractionsPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(InteractionsPackage.eNS_URI) instanceof InteractionsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(InteractionsPackage.eNS_URI)
+ : InteractionsPackage.eINSTANCE);
+ StatemachinesPackageImpl theStatemachinesPackage = (StatemachinesPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(StatemachinesPackage.eNS_URI) instanceof StatemachinesPackageImpl ? EPackage.Registry.INSTANCE
+ .getEPackage(StatemachinesPackage.eNS_URI) : StatemachinesPackage.eINSTANCE);
+ UsecasesPackageImpl theUsecasesPackage = (UsecasesPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(UsecasesPackage.eNS_URI) instanceof UsecasesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(UsecasesPackage.eNS_URI)
+ : UsecasesPackage.eINSTANCE);
+
+ // Create package meta-data objects
+ theAllocationsPackage.createPackageContents();
+ theSysmlPackage.createPackageContents();
+ theModelelementsPackage.createPackageContents();
+ theBlocksPackage.createPackageContents();
+ thePortandflowsPackage.createPackageContents();
+ theConstraintsPackage.createPackageContents();
+ theActivitiesPackage.createPackageContents();
+ theRequirementsPackage.createPackageContents();
+ theInteractionsPackage.createPackageContents();
+ theStatemachinesPackage.createPackageContents();
+ theUsecasesPackage.createPackageContents();
+
+ // Initialize created meta-data
+ theAllocationsPackage.initializePackageContents();
+ theSysmlPackage.initializePackageContents();
+ theModelelementsPackage.initializePackageContents();
+ theBlocksPackage.initializePackageContents();
+ thePortandflowsPackage.initializePackageContents();
+ theConstraintsPackage.initializePackageContents();
+ theActivitiesPackage.initializePackageContents();
+ theRequirementsPackage.initializePackageContents();
+ theInteractionsPackage.initializePackageContents();
+ theStatemachinesPackage.initializePackageContents();
+ theUsecasesPackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theAllocationsPackage.freeze();
+
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(AllocationsPackage.eNS_URI, theAllocationsPackage);
+ return theAllocationsPackage;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass allocateEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass allocatedEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass allocateActivityPartitionEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private boolean isCreated = false;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Creates an instance of the model <b>Package</b>, registered with {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the
+ * package
+ * package URI value.
+ * <p>
+ * Note: the correct way to create the package is via the static factory method {@link #init init()}, which also performs initialization of the package, or returns the registered package, if one already exists. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.emf.ecore.EPackage.Registry
+ * @see org.eclipse.papyrus.sysml.allocations.AllocationsPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private AllocationsPackageImpl() {
+ super(eNS_URI, AllocationsFactory.eINSTANCE);
+ }
+
+ /**
+ * Creates the meta-model objects for the package. This method is
+ * guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void createPackageContents() {
+ if (isCreated) {
+ return;
+ }
+ isCreated = true;
+
+ // Create classes and their features
+ allocateEClass = createEClass(ALLOCATE);
+ createEReference(allocateEClass, ALLOCATE__BASE_ABSTRACTION);
+
+ allocatedEClass = createEClass(ALLOCATED);
+ createEReference(allocatedEClass, ALLOCATED__BASE_NAMED_ELEMENT);
+ createEReference(allocatedEClass, ALLOCATED__ALLOCATED_FROM);
+ createEReference(allocatedEClass, ALLOCATED__ALLOCATED_TO);
+
+ allocateActivityPartitionEClass = createEClass(ALLOCATE_ACTIVITY_PARTITION);
+ createEReference(allocateActivityPartitionEClass, ALLOCATE_ACTIVITY_PARTITION__BASE_ACTIVITY_PARTITION);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EClass getAllocate() {
+ return allocateEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getAllocate_Base_Abstraction() {
+ return (EReference) allocateEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EClass getAllocateActivityPartition() {
+ return allocateActivityPartitionEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getAllocateActivityPartition_Base_ActivityPartition() {
+ return (EReference) allocateActivityPartitionEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EClass getAllocated() {
+ return allocatedEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getAllocated_AllocatedFrom() {
+ return (EReference) allocatedEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getAllocated_AllocatedTo() {
+ return (EReference) allocatedEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getAllocated_Base_NamedElement() {
+ return (EReference) allocatedEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public AllocationsFactory getAllocationsFactory() {
+ return (AllocationsFactory) getEFactoryInstance();
+ }
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void initializePackageContents() {
+ if (isInitialized) {
+ return;
+ }
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Obtain other dependent packages
+ UMLPackage theUMLPackage = (UMLPackage) EPackage.Registry.INSTANCE.getEPackage(UMLPackage.eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+
+ // Initialize classes, features, and operations; add parameters
+ initEClass(allocateEClass, Allocate.class, "Allocate", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getAllocate_Base_Abstraction(), theUMLPackage.getAbstraction(), null, "base_Abstraction", null, 1, 1, Allocate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE,
+ !IS_DERIVED, !IS_ORDERED);
+
+ initEClass(allocatedEClass, Allocated.class, "Allocated", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getAllocated_Base_NamedElement(), theUMLPackage.getNamedElement(), null, "base_NamedElement", null, 1, 1, Allocated.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE,
+ !IS_DERIVED, !IS_ORDERED);
+ initEReference(getAllocated_AllocatedFrom(), theUMLPackage.getNamedElement(), null, "allocatedFrom", null, 0, -1, Allocated.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, IS_DERIVED,
+ !IS_ORDERED);
+ initEReference(getAllocated_AllocatedTo(), theUMLPackage.getNamedElement(), null, "allocatedTo", null, 0, -1, Allocated.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, IS_DERIVED,
+ !IS_ORDERED);
+
+ initEClass(allocateActivityPartitionEClass, AllocateActivityPartition.class, "AllocateActivityPartition", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getAllocateActivityPartition_Base_ActivityPartition(), theUMLPackage.getActivityPartition(), null, "base_ActivityPartition", null, 1, 1, AllocateActivityPartition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE,
+ IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+ }
+
+} // AllocationsPackageImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/allocations/util/AllocationsAdapterFactory.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/allocations/util/AllocationsAdapterFactory.java
new file mode 100755
index 0000000..9d9c092
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/allocations/util/AllocationsAdapterFactory.java
@@ -0,0 +1,178 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.allocations.util;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notifier;
+import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.sysml.allocations.Allocate;
+import org.eclipse.papyrus.sysml.allocations.AllocateActivityPartition;
+import org.eclipse.papyrus.sysml.allocations.Allocated;
+import org.eclipse.papyrus.sysml.allocations.AllocationsPackage;
+
+/**
+ * <!-- begin-user-doc --> The <b>Adapter Factory</b> for the model. It provides
+ * an adapter <code>createXXX</code> method for each class of the model. <!--
+ * end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.allocations.AllocationsPackage
+ * @generated
+ */
+public class AllocationsAdapterFactory extends AdapterFactoryImpl {
+
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected static AllocationsPackage modelPackage;
+
+ /**
+ * The switch that delegates to the <code>createXXX</code> methods. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected AllocationsSwitch<Adapter> modelSwitch = new AllocationsSwitch<Adapter>() {
+
+ @Override
+ public Adapter caseAllocate(Allocate object) {
+ return createAllocateAdapter();
+ }
+
+ @Override
+ public Adapter caseAllocated(Allocated object) {
+ return createAllocatedAdapter();
+ }
+
+ @Override
+ public Adapter caseAllocateActivityPartition(AllocateActivityPartition object) {
+ return createAllocateActivityPartitionAdapter();
+ }
+
+ @Override
+ public Adapter defaultCase(EObject object) {
+ return createEObjectAdapter();
+ }
+ };
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public AllocationsAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = AllocationsPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Creates an adapter for the <code>target</code>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @param target
+ * the object to adapt.
+ * @return the adapter for the <code>target</code>.
+ * @generated
+ */
+ @Override
+ public Adapter createAdapter(Notifier target) {
+ return modelSwitch.doSwitch((EObject) target);
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.sysml.allocations.AllocateActivityPartition
+ * <em>Allocate Activity Partition</em>}'.
+ * <!-- begin-user-doc --> This
+ * default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases
+ * anyway. <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.sysml.allocations.AllocateActivityPartition
+ * @generated
+ */
+ public Adapter createAllocateActivityPartitionAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.sysml.allocations.Allocate <em>Allocate</em>}'.
+ * <!-- begin-user-doc
+ * --> This default implementation returns null so
+ * that we can easily ignore cases; it's useful to ignore a case when
+ * inheritance will catch all the cases anyway. <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.sysml.allocations.Allocate
+ * @generated
+ */
+ public Adapter createAllocateAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class ' {@link org.eclipse.papyrus.sysml.allocations.Allocated
+ * <em>Allocated</em>}'. <!-- begin-user-doc --> This default implementation
+ * returns null so that we can easily ignore cases; it's useful to ignore a
+ * case when inheritance will catch all the cases anyway. <!-- end-user-doc
+ * -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.sysml.allocations.Allocated
+ * @generated
+ */
+ public Adapter createAllocatedAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for the default case.
+ * <!-- begin-user-doc --> This
+ * default implementation returns null. <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @generated
+ */
+ public Adapter createEObjectAdapter() {
+ return null;
+ }
+
+ /**
+ * Returns whether this factory is applicable for the type of the object.
+ * <!-- begin-user-doc --> This implementation returns <code>true</code> if
+ * the object is either the model's package or is an instance object of the
+ * model. <!-- end-user-doc -->
+ *
+ * @return whether this factory is applicable for the type of the object.
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object object) {
+ if (object == modelPackage) {
+ return true;
+ }
+ if (object instanceof EObject) {
+ return ((EObject) object).eClass().getEPackage() == modelPackage;
+ }
+ return false;
+ }
+
+} // AllocationsAdapterFactory
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/allocations/util/AllocationsResourceFactoryImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/allocations/util/AllocationsResourceFactoryImpl.java
new file mode 100755
index 0000000..63ced65
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/allocations/util/AllocationsResourceFactoryImpl.java
@@ -0,0 +1,63 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.allocations.util;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl;
+import org.eclipse.emf.ecore.xmi.XMLResource;
+
+/**
+ * <!-- begin-user-doc --> The <b>Resource Factory</b> associated with the
+ * package. <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.allocations.util.AllocationsResourceImpl
+ * @generated
+ */
+public class AllocationsResourceFactoryImpl extends ResourceFactoryImpl {
+
+ /**
+ * Creates an instance of the resource factory.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public AllocationsResourceFactoryImpl() {
+ super();
+ }
+
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Resource createResource(URI uri) {
+ XMLResource result = new AllocationsResourceImpl(uri);
+ result.getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
+ result.getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
+
+ result.getDefaultSaveOptions().put(XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE);
+
+ result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
+ result.getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
+
+ result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_LEXICAL_HANDLER, Boolean.TRUE);
+ return result;
+ }
+
+} // AllocationsResourceFactoryImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/allocations/util/AllocationsResourceImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/allocations/util/AllocationsResourceImpl.java
new file mode 100755
index 0000000..1516d3b
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/allocations/util/AllocationsResourceImpl.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.allocations.util;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl;
+
+/**
+ * <!-- begin-user-doc --> The <b>Resource </b> associated with the package.
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.allocations.util.AllocationsResourceFactoryImpl
+ * @generated
+ */
+public class AllocationsResourceImpl extends XMLResourceImpl {
+
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @param uri
+ * the URI of the new resource.
+ * @generated
+ */
+ public AllocationsResourceImpl(URI uri) {
+ super(uri);
+ }
+
+} // AllocationsResourceImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/allocations/util/AllocationsSwitch.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/allocations/util/AllocationsSwitch.java
new file mode 100755
index 0000000..98bae27
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/allocations/util/AllocationsSwitch.java
@@ -0,0 +1,175 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.allocations.util;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.util.Switch;
+import org.eclipse.papyrus.sysml.allocations.Allocate;
+import org.eclipse.papyrus.sysml.allocations.AllocateActivityPartition;
+import org.eclipse.papyrus.sysml.allocations.Allocated;
+import org.eclipse.papyrus.sysml.allocations.AllocationsPackage;
+
+/**
+ * <!-- begin-user-doc --> The <b>Switch</b> for the model's inheritance
+ * hierarchy. It supports the call {@link #doSwitch(EObject) doSwitch(object)} to invoke the <code>caseXXX</code> method for each class of the model,
+ * starting with the actual class of the object and proceeding up the
+ * inheritance hierarchy until a non-null result is returned, which is the
+ * result of the switch. <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.allocations.AllocationsPackage
+ * @generated
+ */
+public class AllocationsSwitch<T> extends Switch<T> {
+
+ /**
+ * The cached model package
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected static AllocationsPackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public AllocationsSwitch() {
+ if (modelPackage == null) {
+ modelPackage = AllocationsPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Checks whether this is a switch for the given package. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @parameter ePackage the package in question.
+ * @return whether this is a switch for the given package.
+ * @generated
+ */
+ @Override
+ protected boolean isSwitchFor(EPackage ePackage) {
+ return ePackage == modelPackage;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Allocate</em>'.
+ * <!-- begin-user-doc --> This implementation returns
+ * null; returning a non-null result will terminate the switch. <!--
+ * end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Allocate</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseAllocate(Allocate object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Allocate Activity Partition</em>'.
+ * <!-- begin-user-doc --> This
+ * implementation returns null; returning a non-null result will terminate
+ * the switch. <!-- end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Allocate Activity Partition</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseAllocateActivityPartition(AllocateActivityPartition object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Allocated</em>'.
+ * <!-- begin-user-doc --> This implementation returns
+ * null; returning a non-null result will terminate the switch. <!--
+ * end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Allocated</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseAllocated(Allocated object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * <!-- begin-user-doc --> This implementation returns
+ * null; returning a non-null result will terminate the switch, but this is
+ * the last case anyway. <!-- end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+ * @generated
+ */
+ @Override
+ public T defaultCase(EObject object) {
+ return null;
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ @Override
+ protected T doSwitch(int classifierID, EObject theEObject) {
+ switch (classifierID) {
+ case AllocationsPackage.ALLOCATE: {
+ Allocate allocate = (Allocate) theEObject;
+ T result = caseAllocate(allocate);
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case AllocationsPackage.ALLOCATED: {
+ Allocated allocated = (Allocated) theEObject;
+ T result = caseAllocated(allocated);
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case AllocationsPackage.ALLOCATE_ACTIVITY_PARTITION: {
+ AllocateActivityPartition allocateActivityPartition = (AllocateActivityPartition) theEObject;
+ T result = caseAllocateActivityPartition(allocateActivityPartition);
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ default:
+ return defaultCase(theEObject);
+ }
+ }
+
+} // AllocationsSwitch
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/allocations/util/AllocationsXMLProcessor.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/allocations/util/AllocationsXMLProcessor.java
new file mode 100755
index 0000000..fbb1815
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/allocations/util/AllocationsXMLProcessor.java
@@ -0,0 +1,60 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.allocations.util;
+
+import java.util.Map;
+
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.xmi.util.XMLProcessor;
+import org.eclipse.papyrus.sysml.allocations.AllocationsPackage;
+
+/**
+ * This class contains helper methods to serialize and deserialize XML documents
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class AllocationsXMLProcessor extends XMLProcessor {
+
+ /**
+ * Public constructor to instantiate the helper.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public AllocationsXMLProcessor() {
+ super((EPackage.Registry.INSTANCE));
+ AllocationsPackage.eINSTANCE.eClass();
+ }
+
+ /**
+ * Register for "*" and "xml" file extensions the AllocationsResourceFactoryImpl factory.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected Map<String, Resource.Factory> getRegistrations() {
+ if (registrations == null) {
+ super.getRegistrations();
+ registrations.put(XML_EXTENSION, new AllocationsResourceFactoryImpl());
+ registrations.put(STAR_EXTENSION, new AllocationsResourceFactoryImpl());
+ }
+ return registrations;
+ }
+
+} // AllocationsXMLProcessor
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/BindingConnector.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/BindingConnector.java
new file mode 100755
index 0000000..3efcc04
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/BindingConnector.java
@@ -0,0 +1,63 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.blocks;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.uml2.uml.Connector;
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object ' <em><b>Binding Connector</b></em>'. <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.blocks.BindingConnector#getBase_Connector <em>Base Connector</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.sysml.blocks.BlocksPackage#getBindingConnector()
+ * @model
+ * @generated
+ */
+public interface BindingConnector extends EObject {
+
+ /**
+ * Returns the value of the '<em><b>Base Connector</b></em>' reference. <!--
+ * begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Base Connector</em>' reference isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Base Connector</em>' reference.
+ * @see #setBase_Connector(Connector)
+ * @see org.eclipse.papyrus.sysml.blocks.BlocksPackage#getBindingConnector_Base_Connector()
+ * @model required="true" ordered="false"
+ * @generated
+ */
+ Connector getBase_Connector();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.sysml.blocks.BindingConnector#getBase_Connector <em>Base Connector</em>}' reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Base Connector</em>' reference.
+ * @see #getBase_Connector()
+ * @generated
+ */
+ void setBase_Connector(Connector value);
+
+} // BindingConnector
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/Block.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/Block.java
new file mode 100755
index 0000000..579622e
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/Block.java
@@ -0,0 +1,91 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.blocks;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object ' <em><b>Block</b></em>'. <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.blocks.Block#isEncapsulated <em>Is Encapsulated</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.blocks.Block#getBase_Class <em>Base Class</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.sysml.blocks.BlocksPackage#getBlock()
+ * @model
+ * @generated
+ */
+public interface Block extends EObject {
+
+ /**
+ * Returns the value of the '<em><b>Is Encapsulated</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Is Encapsulated</em>' attribute isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Is Encapsulated</em>' attribute.
+ * @see #setIsEncapsulated(boolean)
+ * @see org.eclipse.papyrus.sysml.blocks.BlocksPackage#getBlock_IsEncapsulated()
+ * @model unique="false" dataType="org.eclipse.uml2.types.Boolean" ordered="false"
+ * @generated
+ */
+ boolean isEncapsulated();
+
+ /**
+ * Returns the value of the '<em><b>Base Class</b></em>' reference. <!--
+ * begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Base Class</em>' reference isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Base Class</em>' reference.
+ * @see #setBase_Class(org.eclipse.uml2.uml.Class)
+ * @see org.eclipse.papyrus.sysml.blocks.BlocksPackage#getBlock_Base_Class()
+ * @model required="true" ordered="false"
+ * @generated
+ */
+ org.eclipse.uml2.uml.Class getBase_Class();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.sysml.blocks.Block#getBase_Class <em>Base Class</em>}' reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Base Class</em>' reference.
+ * @see #getBase_Class()
+ * @generated
+ */
+ void setBase_Class(org.eclipse.uml2.uml.Class value);
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.sysml.blocks.Block#isEncapsulated <em>Is Encapsulated</em>}' attribute.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Is Encapsulated</em>' attribute.
+ * @see #isEncapsulated()
+ * @generated
+ */
+ void setIsEncapsulated(boolean value);
+
+} // Block
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/BlocksFactory.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/BlocksFactory.java
new file mode 100755
index 0000000..42cb9bc
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/BlocksFactory.java
@@ -0,0 +1,140 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.blocks;
+
+import org.eclipse.emf.ecore.EFactory;
+
+/**
+ * <!-- begin-user-doc --> The <b>Factory</b> for the model. It provides a
+ * create method for each non-abstract class of the model. <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.blocks.BlocksPackage
+ * @generated
+ */
+public interface BlocksFactory extends EFactory {
+
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ BlocksFactory eINSTANCE = org.eclipse.papyrus.sysml.blocks.internal.impl.BlocksFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>Binding Connector</em>'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Binding Connector</em>'.
+ * @generated
+ */
+ BindingConnector createBindingConnector();
+
+ /**
+ * Returns a new object of class '<em>Block</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Block</em>'.
+ * @generated
+ */
+ Block createBlock();
+
+ /**
+ * Returns a new object of class '<em>Connector Property</em>'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Connector Property</em>'.
+ * @generated
+ */
+ ConnectorProperty createConnectorProperty();
+
+ /**
+ * Returns a new object of class '<em>Dimension</em>'.
+ * <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Dimension</em>'.
+ * @generated
+ */
+ Dimension createDimension();
+
+ /**
+ * Returns a new object of class '<em>Distributed Property</em>'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Distributed Property</em>'.
+ * @generated
+ */
+ DistributedProperty createDistributedProperty();
+
+ /**
+ * Returns a new object of class '<em>Nested Connector End</em>'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Nested Connector End</em>'.
+ * @generated
+ */
+ NestedConnectorEnd createNestedConnectorEnd();
+
+ /**
+ * Returns a new object of class '<em>Participant Property</em>'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Participant Property</em>'.
+ * @generated
+ */
+ ParticipantProperty createParticipantProperty();
+
+ /**
+ * Returns a new object of class '<em>Property Specific Type</em>'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Property Specific Type</em>'.
+ * @generated
+ */
+ PropertySpecificType createPropertySpecificType();
+
+ /**
+ * Returns a new object of class '<em>Unit</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Unit</em>'.
+ * @generated
+ */
+ Unit createUnit();
+
+ /**
+ * Returns a new object of class '<em>Value Type</em>'.
+ * <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Value Type</em>'.
+ * @generated
+ */
+ ValueType createValueType();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the package supported by this factory.
+ * @generated
+ */
+ BlocksPackage getBlocksPackage();
+
+} // BlocksFactory
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/BlocksPackage.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/BlocksPackage.java
new file mode 100755
index 0000000..e44f440
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/BlocksPackage.java
@@ -0,0 +1,1101 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.blocks;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+/**
+ * <!-- begin-user-doc --> The <b>Package</b> for the model. It contains
+ * accessors for the meta objects to represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.blocks.BlocksFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface BlocksPackage extends EPackage {
+
+ /**
+ * <!-- begin-user-doc --> Defines literals for the meta objects that
+ * represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ interface Literals {
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.sysml.blocks.internal.impl.BlockImpl <em>Block</em>}' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.blocks.internal.impl.BlockImpl
+ * @see org.eclipse.papyrus.sysml.blocks.internal.impl.BlocksPackageImpl#getBlock()
+ * @generated
+ */
+ EClass BLOCK = eINSTANCE.getBlock();
+
+ /**
+ * The meta object literal for the '<em><b>Is Encapsulated</b></em>' attribute feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EAttribute BLOCK__IS_ENCAPSULATED = eINSTANCE.getBlock_IsEncapsulated();
+
+ /**
+ * The meta object literal for the '<em><b>Base Class</b></em>' reference feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference BLOCK__BASE_CLASS = eINSTANCE.getBlock_Base_Class();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.sysml.blocks.internal.impl.DistributedPropertyImpl
+ * <em>Distributed Property</em>}' class.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.blocks.internal.impl.DistributedPropertyImpl
+ * @see org.eclipse.papyrus.sysml.blocks.internal.impl.BlocksPackageImpl#getDistributedProperty()
+ * @generated
+ */
+ EClass DISTRIBUTED_PROPERTY = eINSTANCE.getDistributedProperty();
+
+ /**
+ * The meta object literal for the '<em><b>Base Property</b></em>' reference feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference DISTRIBUTED_PROPERTY__BASE_PROPERTY = eINSTANCE.getDistributedProperty_Base_Property();
+
+ /**
+ * The meta object literal for the ' {@link org.eclipse.papyrus.sysml.blocks.internal.impl.DimensionImpl
+ * <em>Dimension</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @see org.eclipse.papyrus.sysml.blocks.internal.impl.DimensionImpl
+ * @see org.eclipse.papyrus.sysml.blocks.internal.impl.BlocksPackageImpl#getDimension()
+ * @generated
+ */
+ EClass DIMENSION = eINSTANCE.getDimension();
+
+ /**
+ * The meta object literal for the ' <em><b>Base Instance Specification</b></em>' reference feature. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference DIMENSION__BASE_INSTANCE_SPECIFICATION = eINSTANCE.getDimension_Base_InstanceSpecification();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.sysml.blocks.internal.impl.UnitImpl <em>Unit</em>}' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.blocks.internal.impl.UnitImpl
+ * @see org.eclipse.papyrus.sysml.blocks.internal.impl.BlocksPackageImpl#getUnit()
+ * @generated
+ */
+ EClass UNIT = eINSTANCE.getUnit();
+
+ /**
+ * The meta object literal for the ' <em><b>Base Instance Specification</b></em>' reference feature. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference UNIT__BASE_INSTANCE_SPECIFICATION = eINSTANCE.getUnit_Base_InstanceSpecification();
+
+ /**
+ * The meta object literal for the '<em><b>Dimension</b></em>' reference feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference UNIT__DIMENSION = eINSTANCE.getUnit_Dimension();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.sysml.blocks.internal.impl.ValueTypeImpl <em>Value Type</em>}' class.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.blocks.internal.impl.ValueTypeImpl
+ * @see org.eclipse.papyrus.sysml.blocks.internal.impl.BlocksPackageImpl#getValueType()
+ * @generated
+ */
+ EClass VALUE_TYPE = eINSTANCE.getValueType();
+
+ /**
+ * The meta object literal for the '<em><b>Base Data Type</b></em>' reference feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference VALUE_TYPE__BASE_DATA_TYPE = eINSTANCE.getValueType_Base_DataType();
+
+ /**
+ * The meta object literal for the '<em><b>Unit</b></em>' reference feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference VALUE_TYPE__UNIT = eINSTANCE.getValueType_Unit();
+
+ /**
+ * The meta object literal for the '<em><b>Dimension</b></em>' reference feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference VALUE_TYPE__DIMENSION = eINSTANCE.getValueType_Dimension();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.sysml.blocks.internal.impl.NestedConnectorEndImpl
+ * <em>Nested Connector End</em>}' class.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.blocks.internal.impl.NestedConnectorEndImpl
+ * @see org.eclipse.papyrus.sysml.blocks.internal.impl.BlocksPackageImpl#getNestedConnectorEnd()
+ * @generated
+ */
+ EClass NESTED_CONNECTOR_END = eINSTANCE.getNestedConnectorEnd();
+
+ /**
+ * The meta object literal for the '<em><b>Property Path</b></em>' reference list feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference NESTED_CONNECTOR_END__PROPERTY_PATH = eINSTANCE.getNestedConnectorEnd_PropertyPath();
+
+ /**
+ * The meta object literal for the '<em><b>Base Connector End</b></em>' reference feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference NESTED_CONNECTOR_END__BASE_CONNECTOR_END = eINSTANCE.getNestedConnectorEnd_Base_ConnectorEnd();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.sysml.blocks.internal.impl.ParticipantPropertyImpl
+ * <em>Participant Property</em>}' class.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.blocks.internal.impl.ParticipantPropertyImpl
+ * @see org.eclipse.papyrus.sysml.blocks.internal.impl.BlocksPackageImpl#getParticipantProperty()
+ * @generated
+ */
+ EClass PARTICIPANT_PROPERTY = eINSTANCE.getParticipantProperty();
+
+ /**
+ * The meta object literal for the '<em><b>Base Property</b></em>' reference feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference PARTICIPANT_PROPERTY__BASE_PROPERTY = eINSTANCE.getParticipantProperty_Base_Property();
+
+ /**
+ * The meta object literal for the '<em><b>End</b></em>' reference feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference PARTICIPANT_PROPERTY__END = eINSTANCE.getParticipantProperty_End();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.sysml.blocks.internal.impl.ConnectorPropertyImpl <em>Connector Property</em>}'
+ * class.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.blocks.internal.impl.ConnectorPropertyImpl
+ * @see org.eclipse.papyrus.sysml.blocks.internal.impl.BlocksPackageImpl#getConnectorProperty()
+ * @generated
+ */
+ EClass CONNECTOR_PROPERTY = eINSTANCE.getConnectorProperty();
+
+ /**
+ * The meta object literal for the '<em><b>Base Property</b></em>' reference feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference CONNECTOR_PROPERTY__BASE_PROPERTY = eINSTANCE.getConnectorProperty_Base_Property();
+
+ /**
+ * The meta object literal for the '<em><b>Connector</b></em>' reference feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference CONNECTOR_PROPERTY__CONNECTOR = eINSTANCE.getConnectorProperty_Connector();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.sysml.blocks.internal.impl.BindingConnectorImpl <em>Binding Connector</em>}'
+ * class.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.blocks.internal.impl.BindingConnectorImpl
+ * @see org.eclipse.papyrus.sysml.blocks.internal.impl.BlocksPackageImpl#getBindingConnector()
+ * @generated
+ */
+ EClass BINDING_CONNECTOR = eINSTANCE.getBindingConnector();
+
+ /**
+ * The meta object literal for the '<em><b>Base Connector</b></em>' reference feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference BINDING_CONNECTOR__BASE_CONNECTOR = eINSTANCE.getBindingConnector_Base_Connector();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.sysml.blocks.internal.impl.PropertySpecificTypeImpl
+ * <em>Property Specific Type</em>}' class.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.blocks.internal.impl.PropertySpecificTypeImpl
+ * @see org.eclipse.papyrus.sysml.blocks.internal.impl.BlocksPackageImpl#getPropertySpecificType()
+ * @generated
+ */
+ EClass PROPERTY_SPECIFIC_TYPE = eINSTANCE.getPropertySpecificType();
+
+ /**
+ * The meta object literal for the '<em><b>Base Classifier</b></em>' reference feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference PROPERTY_SPECIFIC_TYPE__BASE_CLASSIFIER = eINSTANCE.getPropertySpecificType_Base_Classifier();
+
+ }
+
+ /**
+ * The package name.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ String eNAME = "blocks";
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ String eNS_URI = "http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks";
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ String eNS_PREFIX = "Blocks";
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ BlocksPackage eINSTANCE = org.eclipse.papyrus.sysml.blocks.internal.impl.BlocksPackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.sysml.blocks.internal.impl.BlockImpl <em>Block</em>}' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.blocks.internal.impl.BlockImpl
+ * @see org.eclipse.papyrus.sysml.blocks.internal.impl.BlocksPackageImpl#getBlock()
+ * @generated
+ */
+ int BLOCK = 0;
+
+ /**
+ * The feature id for the '<em><b>Is Encapsulated</b></em>' attribute. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int BLOCK__IS_ENCAPSULATED = 0;
+
+ /**
+ * The feature id for the '<em><b>Base Class</b></em>' reference. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int BLOCK__BASE_CLASS = 1;
+
+ /**
+ * The number of structural features of the '<em>Block</em>' class. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int BLOCK_FEATURE_COUNT = 2;
+
+ /**
+ * The number of operations of the '<em>Block</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int BLOCK_OPERATION_COUNT = 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.sysml.blocks.internal.impl.DistributedPropertyImpl <em>Distributed Property</em>}'
+ * class.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.blocks.internal.impl.DistributedPropertyImpl
+ * @see org.eclipse.papyrus.sysml.blocks.internal.impl.BlocksPackageImpl#getDistributedProperty()
+ * @generated
+ */
+ int DISTRIBUTED_PROPERTY = 1;
+
+ /**
+ * The feature id for the '<em><b>Base Property</b></em>' reference. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int DISTRIBUTED_PROPERTY__BASE_PROPERTY = 0;
+
+ /**
+ * The number of structural features of the '<em>Distributed Property</em>' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int DISTRIBUTED_PROPERTY_FEATURE_COUNT = 1;
+
+ /**
+ * The number of operations of the '<em>Distributed Property</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int DISTRIBUTED_PROPERTY_OPERATION_COUNT = 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.sysml.blocks.internal.impl.DimensionImpl <em>Dimension</em>}' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.blocks.internal.impl.DimensionImpl
+ * @see org.eclipse.papyrus.sysml.blocks.internal.impl.BlocksPackageImpl#getDimension()
+ * @generated
+ */
+ int DIMENSION = 2;
+
+ /**
+ * The feature id for the '<em><b>Base Instance Specification</b></em>' reference.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int DIMENSION__BASE_INSTANCE_SPECIFICATION = 0;
+
+ /**
+ * The number of structural features of the '<em>Dimension</em>' class. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int DIMENSION_FEATURE_COUNT = 1;
+
+ /**
+ * The number of operations of the '<em>Dimension</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int DIMENSION_OPERATION_COUNT = 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.sysml.blocks.internal.impl.UnitImpl <em>Unit</em>}' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.blocks.internal.impl.UnitImpl
+ * @see org.eclipse.papyrus.sysml.blocks.internal.impl.BlocksPackageImpl#getUnit()
+ * @generated
+ */
+ int UNIT = 3;
+
+ /**
+ * The feature id for the '<em><b>Base Instance Specification</b></em>' reference.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int UNIT__BASE_INSTANCE_SPECIFICATION = 0;
+
+ /**
+ * The feature id for the '<em><b>Dimension</b></em>' reference. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int UNIT__DIMENSION = 1;
+
+ /**
+ * The number of structural features of the '<em>Unit</em>' class. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int UNIT_FEATURE_COUNT = 2;
+
+ /**
+ * The number of operations of the '<em>Unit</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int UNIT_OPERATION_COUNT = 0;
+
+ /**
+ * The meta object id for the ' {@link org.eclipse.papyrus.sysml.blocks.internal.impl.ValueTypeImpl
+ * <em>Value Type</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @see org.eclipse.papyrus.sysml.blocks.internal.impl.ValueTypeImpl
+ * @see org.eclipse.papyrus.sysml.blocks.internal.impl.BlocksPackageImpl#getValueType()
+ * @generated
+ */
+ int VALUE_TYPE = 4;
+
+ /**
+ * The feature id for the '<em><b>Base Data Type</b></em>' reference. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int VALUE_TYPE__BASE_DATA_TYPE = 0;
+
+ /**
+ * The feature id for the '<em><b>Unit</b></em>' reference. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int VALUE_TYPE__UNIT = 1;
+
+ /**
+ * The feature id for the '<em><b>Dimension</b></em>' reference. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int VALUE_TYPE__DIMENSION = 2;
+
+ /**
+ * The number of structural features of the '<em>Value Type</em>' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int VALUE_TYPE_FEATURE_COUNT = 3;
+
+ /**
+ * The number of operations of the '<em>Value Type</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int VALUE_TYPE_OPERATION_COUNT = 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.sysml.blocks.internal.impl.NestedConnectorEndImpl <em>Nested Connector End</em>}' class.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.blocks.internal.impl.NestedConnectorEndImpl
+ * @see org.eclipse.papyrus.sysml.blocks.internal.impl.BlocksPackageImpl#getNestedConnectorEnd()
+ * @generated
+ */
+ int NESTED_CONNECTOR_END = 5;
+
+ /**
+ * The feature id for the '<em><b>Property Path</b></em>' reference list.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int NESTED_CONNECTOR_END__PROPERTY_PATH = 0;
+
+ /**
+ * The feature id for the '<em><b>Base Connector End</b></em>' reference.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int NESTED_CONNECTOR_END__BASE_CONNECTOR_END = 1;
+
+ /**
+ * The number of structural features of the '<em>Nested Connector End</em>' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int NESTED_CONNECTOR_END_FEATURE_COUNT = 2;
+
+ /**
+ * The number of operations of the '<em>Nested Connector End</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int NESTED_CONNECTOR_END_OPERATION_COUNT = 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.sysml.blocks.internal.impl.ParticipantPropertyImpl <em>Participant Property</em>}'
+ * class.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.blocks.internal.impl.ParticipantPropertyImpl
+ * @see org.eclipse.papyrus.sysml.blocks.internal.impl.BlocksPackageImpl#getParticipantProperty()
+ * @generated
+ */
+ int PARTICIPANT_PROPERTY = 6;
+
+ /**
+ * The feature id for the '<em><b>Base Property</b></em>' reference. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int PARTICIPANT_PROPERTY__BASE_PROPERTY = 0;
+
+ /**
+ * The feature id for the '<em><b>End</b></em>' reference. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int PARTICIPANT_PROPERTY__END = 1;
+
+ /**
+ * The number of structural features of the '<em>Participant Property</em>' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int PARTICIPANT_PROPERTY_FEATURE_COUNT = 2;
+
+ /**
+ * The number of operations of the '<em>Participant Property</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int PARTICIPANT_PROPERTY_OPERATION_COUNT = 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.sysml.blocks.internal.impl.ConnectorPropertyImpl <em>Connector Property</em>}' class.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.blocks.internal.impl.ConnectorPropertyImpl
+ * @see org.eclipse.papyrus.sysml.blocks.internal.impl.BlocksPackageImpl#getConnectorProperty()
+ * @generated
+ */
+ int CONNECTOR_PROPERTY = 7;
+
+ /**
+ * The feature id for the '<em><b>Base Property</b></em>' reference. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int CONNECTOR_PROPERTY__BASE_PROPERTY = 0;
+
+ /**
+ * The feature id for the '<em><b>Connector</b></em>' reference. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int CONNECTOR_PROPERTY__CONNECTOR = 1;
+
+ /**
+ * The number of structural features of the '<em>Connector Property</em>' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int CONNECTOR_PROPERTY_FEATURE_COUNT = 2;
+
+ /**
+ * The number of operations of the '<em>Connector Property</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int CONNECTOR_PROPERTY_OPERATION_COUNT = 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.sysml.blocks.internal.impl.BindingConnectorImpl <em>Binding Connector</em>}' class.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.blocks.internal.impl.BindingConnectorImpl
+ * @see org.eclipse.papyrus.sysml.blocks.internal.impl.BlocksPackageImpl#getBindingConnector()
+ * @generated
+ */
+ int BINDING_CONNECTOR = 8;
+
+ /**
+ * The feature id for the '<em><b>Base Connector</b></em>' reference. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int BINDING_CONNECTOR__BASE_CONNECTOR = 0;
+
+ /**
+ * The number of structural features of the '<em>Binding Connector</em>' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int BINDING_CONNECTOR_FEATURE_COUNT = 1;
+
+ /**
+ * The number of operations of the '<em>Binding Connector</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int BINDING_CONNECTOR_OPERATION_COUNT = 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.sysml.blocks.internal.impl.PropertySpecificTypeImpl <em>Property Specific Type</em>}'
+ * class.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.blocks.internal.impl.PropertySpecificTypeImpl
+ * @see org.eclipse.papyrus.sysml.blocks.internal.impl.BlocksPackageImpl#getPropertySpecificType()
+ * @generated
+ */
+ int PROPERTY_SPECIFIC_TYPE = 9;
+
+ /**
+ * The feature id for the '<em><b>Base Classifier</b></em>' reference. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int PROPERTY_SPECIFIC_TYPE__BASE_CLASSIFIER = 0;
+
+ /**
+ * The number of structural features of the '<em>Property Specific Type</em>' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int PROPERTY_SPECIFIC_TYPE_FEATURE_COUNT = 1;
+
+ /**
+ * The number of operations of the '<em>Property Specific Type</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int PROPERTY_SPECIFIC_TYPE_OPERATION_COUNT = 0;
+
+ /**
+ * Returns the meta object for class ' {@link org.eclipse.papyrus.sysml.blocks.BindingConnector
+ * <em>Binding Connector</em>}'. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @return the meta object for class '<em>Binding Connector</em>'.
+ * @see org.eclipse.papyrus.sysml.blocks.BindingConnector
+ * @generated
+ */
+ EClass getBindingConnector();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.sysml.blocks.BindingConnector#getBase_Connector <em>Base Connector</em>} '.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference '<em>Base Connector</em>'.
+ * @see org.eclipse.papyrus.sysml.blocks.BindingConnector#getBase_Connector()
+ * @see #getBindingConnector()
+ * @generated
+ */
+ EReference getBindingConnector_Base_Connector();
+
+ /**
+ * Returns the meta object for class ' {@link org.eclipse.papyrus.sysml.blocks.Block <em>Block</em>}'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Block</em>'.
+ * @see org.eclipse.papyrus.sysml.blocks.Block
+ * @generated
+ */
+ EClass getBlock();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.sysml.blocks.Block#getBase_Class <em>Base Class</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference '<em>Base Class</em>'.
+ * @see org.eclipse.papyrus.sysml.blocks.Block#getBase_Class()
+ * @see #getBlock()
+ * @generated
+ */
+ EReference getBlock_Base_Class();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.sysml.blocks.Block#isEncapsulated <em>Is Encapsulated</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the attribute '<em>Is Encapsulated</em>'.
+ * @see org.eclipse.papyrus.sysml.blocks.Block#isEncapsulated()
+ * @see #getBlock()
+ * @generated
+ */
+ EAttribute getBlock_IsEncapsulated();
+
+ /**
+ * Returns the factory that creates the instances of the model. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the factory that creates the instances of the model.
+ * @generated
+ */
+ BlocksFactory getBlocksFactory();
+
+ /**
+ * Returns the meta object for class ' {@link org.eclipse.papyrus.sysml.blocks.ConnectorProperty
+ * <em>Connector Property</em>}'. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @return the meta object for class '<em>Connector Property</em>'.
+ * @see org.eclipse.papyrus.sysml.blocks.ConnectorProperty
+ * @generated
+ */
+ EClass getConnectorProperty();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.sysml.blocks.ConnectorProperty#getBase_Property <em>Base Property</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference '<em>Base Property</em>'.
+ * @see org.eclipse.papyrus.sysml.blocks.ConnectorProperty#getBase_Property()
+ * @see #getConnectorProperty()
+ * @generated
+ */
+ EReference getConnectorProperty_Base_Property();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.sysml.blocks.ConnectorProperty#getConnector <em>Connector</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference '<em>Connector</em>'.
+ * @see org.eclipse.papyrus.sysml.blocks.ConnectorProperty#getConnector()
+ * @see #getConnectorProperty()
+ * @generated
+ */
+ EReference getConnectorProperty_Connector();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.sysml.blocks.Dimension <em>Dimension</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Dimension</em>'.
+ * @see org.eclipse.papyrus.sysml.blocks.Dimension
+ * @generated
+ */
+ EClass getDimension();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.sysml.blocks.Dimension#getBase_InstanceSpecification
+ * <em>Base Instance Specification</em>}'.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @return the meta object for the reference '<em>Base Instance Specification</em>'.
+ * @see org.eclipse.papyrus.sysml.blocks.Dimension#getBase_InstanceSpecification()
+ * @see #getDimension()
+ * @generated
+ */
+ EReference getDimension_Base_InstanceSpecification();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.sysml.blocks.DistributedProperty <em>Distributed Property</em>}'.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @return the meta object for class '<em>Distributed Property</em>'.
+ * @see org.eclipse.papyrus.sysml.blocks.DistributedProperty
+ * @generated
+ */
+ EClass getDistributedProperty();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.sysml.blocks.DistributedProperty#getBase_Property <em>Base Property</em>} '.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference '<em>Base Property</em>'.
+ * @see org.eclipse.papyrus.sysml.blocks.DistributedProperty#getBase_Property()
+ * @see #getDistributedProperty()
+ * @generated
+ */
+ EReference getDistributedProperty_Base_Property();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.sysml.blocks.NestedConnectorEnd <em>Nested Connector End</em>}'.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @return the meta object for class '<em>Nested Connector End</em>'.
+ * @see org.eclipse.papyrus.sysml.blocks.NestedConnectorEnd
+ * @generated
+ */
+ EClass getNestedConnectorEnd();
+
+ /**
+ * Returns the meta object for the reference ' {@link org.eclipse.papyrus.sysml.blocks.NestedConnectorEnd#getBase_ConnectorEnd
+ * <em>Base Connector End</em>}'. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @return the meta object for the reference '<em>Base Connector End</em>'.
+ * @see org.eclipse.papyrus.sysml.blocks.NestedConnectorEnd#getBase_ConnectorEnd()
+ * @see #getNestedConnectorEnd()
+ * @generated
+ */
+ EReference getNestedConnectorEnd_Base_ConnectorEnd();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.papyrus.sysml.blocks.NestedConnectorEnd#getPropertyPath
+ * <em>Property Path</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference list '<em>Property Path</em>'.
+ * @see org.eclipse.papyrus.sysml.blocks.NestedConnectorEnd#getPropertyPath()
+ * @see #getNestedConnectorEnd()
+ * @generated
+ */
+ EReference getNestedConnectorEnd_PropertyPath();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.sysml.blocks.ParticipantProperty <em>Participant Property</em>}'.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @return the meta object for class '<em>Participant Property</em>'.
+ * @see org.eclipse.papyrus.sysml.blocks.ParticipantProperty
+ * @generated
+ */
+ EClass getParticipantProperty();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.sysml.blocks.ParticipantProperty#getBase_Property <em>Base Property</em>} '.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference '<em>Base Property</em>'.
+ * @see org.eclipse.papyrus.sysml.blocks.ParticipantProperty#getBase_Property()
+ * @see #getParticipantProperty()
+ * @generated
+ */
+ EReference getParticipantProperty_Base_Property();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.sysml.blocks.ParticipantProperty#getEnd <em>End</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference '<em>End</em>'.
+ * @see org.eclipse.papyrus.sysml.blocks.ParticipantProperty#getEnd()
+ * @see #getParticipantProperty()
+ * @generated
+ */
+ EReference getParticipantProperty_End();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.sysml.blocks.PropertySpecificType <em>Property Specific Type</em>}'.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @return the meta object for class '<em>Property Specific Type</em>'.
+ * @see org.eclipse.papyrus.sysml.blocks.PropertySpecificType
+ * @generated
+ */
+ EClass getPropertySpecificType();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.sysml.blocks.PropertySpecificType#getBase_Classifier
+ * <em>Base Classifier</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference '<em>Base Classifier</em>'.
+ * @see org.eclipse.papyrus.sysml.blocks.PropertySpecificType#getBase_Classifier()
+ * @see #getPropertySpecificType()
+ * @generated
+ */
+ EReference getPropertySpecificType_Base_Classifier();
+
+ /**
+ * Returns the meta object for class ' {@link org.eclipse.papyrus.sysml.blocks.Unit <em>Unit</em>}'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Unit</em>'.
+ * @see org.eclipse.papyrus.sysml.blocks.Unit
+ * @generated
+ */
+ EClass getUnit();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.sysml.blocks.Unit#getBase_InstanceSpecification
+ * <em>Base Instance Specification</em>}'.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @return the meta object for the reference '<em>Base Instance Specification</em>'.
+ * @see org.eclipse.papyrus.sysml.blocks.Unit#getBase_InstanceSpecification()
+ * @see #getUnit()
+ * @generated
+ */
+ EReference getUnit_Base_InstanceSpecification();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.sysml.blocks.Unit#getDimension <em>Dimension</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference '<em>Dimension</em>'.
+ * @see org.eclipse.papyrus.sysml.blocks.Unit#getDimension()
+ * @see #getUnit()
+ * @generated
+ */
+ EReference getUnit_Dimension();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.sysml.blocks.ValueType <em>Value Type</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Value Type</em>'.
+ * @see org.eclipse.papyrus.sysml.blocks.ValueType
+ * @generated
+ */
+ EClass getValueType();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.sysml.blocks.ValueType#getBase_DataType <em>Base Data Type</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference '<em>Base Data Type</em>'.
+ * @see org.eclipse.papyrus.sysml.blocks.ValueType#getBase_DataType()
+ * @see #getValueType()
+ * @generated
+ */
+ EReference getValueType_Base_DataType();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.sysml.blocks.ValueType#getDimension <em>Dimension</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference '<em>Dimension</em>'.
+ * @see org.eclipse.papyrus.sysml.blocks.ValueType#getDimension()
+ * @see #getValueType()
+ * @generated
+ */
+ EReference getValueType_Dimension();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.sysml.blocks.ValueType#getUnit <em>Unit</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference '<em>Unit</em>'.
+ * @see org.eclipse.papyrus.sysml.blocks.ValueType#getUnit()
+ * @see #getValueType()
+ * @generated
+ */
+ EReference getValueType_Unit();
+
+} // BlocksPackage
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/ConnectorProperty.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/ConnectorProperty.java
new file mode 100755
index 0000000..a960ae6
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/ConnectorProperty.java
@@ -0,0 +1,93 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.blocks;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.uml2.uml.Connector;
+import org.eclipse.uml2.uml.Property;
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object ' <em><b>Connector Property</b></em> '. <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.blocks.ConnectorProperty#getBase_Property <em>Base Property</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.blocks.ConnectorProperty#getConnector <em>Connector</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.sysml.blocks.BlocksPackage#getConnectorProperty()
+ * @model
+ * @generated
+ */
+public interface ConnectorProperty extends EObject {
+
+ /**
+ * Returns the value of the '<em><b>Base Property</b></em>' reference. <!--
+ * begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Base Property</em>' reference isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Base Property</em>' reference.
+ * @see #setBase_Property(Property)
+ * @see org.eclipse.papyrus.sysml.blocks.BlocksPackage#getConnectorProperty_Base_Property()
+ * @model required="true" ordered="false"
+ * @generated
+ */
+ Property getBase_Property();
+
+ /**
+ * Returns the value of the '<em><b>Connector</b></em>' reference. <!--
+ * begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Connector</em>' reference isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Connector</em>' reference.
+ * @see #setConnector(Connector)
+ * @see org.eclipse.papyrus.sysml.blocks.BlocksPackage#getConnectorProperty_Connector()
+ * @model required="true" ordered="false"
+ * @generated
+ */
+ Connector getConnector();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.sysml.blocks.ConnectorProperty#getBase_Property <em>Base Property</em>}' reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Base Property</em>' reference.
+ * @see #getBase_Property()
+ * @generated
+ */
+ void setBase_Property(Property value);
+
+ /**
+ * Sets the value of the ' {@link org.eclipse.papyrus.sysml.blocks.ConnectorProperty#getConnector
+ * <em>Connector</em>}' reference. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @param value
+ * the new value of the '<em>Connector</em>' reference.
+ * @see #getConnector()
+ * @generated
+ */
+ void setConnector(Connector value);
+
+} // ConnectorProperty
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/Dimension.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/Dimension.java
new file mode 100755
index 0000000..6f95057
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/Dimension.java
@@ -0,0 +1,64 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.blocks;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.uml2.uml.InstanceSpecification;
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object ' <em><b>Dimension</b></em>'. <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.blocks.Dimension#getBase_InstanceSpecification <em>Base Instance Specification</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.sysml.blocks.BlocksPackage#getDimension()
+ * @model
+ * @generated
+ */
+public interface Dimension extends EObject {
+
+ /**
+ * Returns the value of the '<em><b>Base Instance Specification</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Base Instance Specification</em>' reference isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Base Instance Specification</em>' reference.
+ * @see #setBase_InstanceSpecification(InstanceSpecification)
+ * @see org.eclipse.papyrus.sysml.blocks.BlocksPackage#getDimension_Base_InstanceSpecification()
+ * @model required="true" ordered="false"
+ * @generated
+ */
+ InstanceSpecification getBase_InstanceSpecification();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.sysml.blocks.Dimension#getBase_InstanceSpecification <em>Base Instance Specification</em>}'
+ * reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Base Instance Specification</em>' reference.
+ * @see #getBase_InstanceSpecification()
+ * @generated
+ */
+ void setBase_InstanceSpecification(InstanceSpecification value);
+
+} // Dimension
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/DistributedProperty.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/DistributedProperty.java
new file mode 100755
index 0000000..a69b9ef
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/DistributedProperty.java
@@ -0,0 +1,63 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.blocks;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.uml2.uml.Property;
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object ' <em><b>Distributed Property</b></em>'. <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.blocks.DistributedProperty#getBase_Property <em>Base Property</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.sysml.blocks.BlocksPackage#getDistributedProperty()
+ * @model
+ * @generated
+ */
+public interface DistributedProperty extends EObject {
+
+ /**
+ * Returns the value of the '<em><b>Base Property</b></em>' reference. <!--
+ * begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Base Property</em>' reference isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Base Property</em>' reference.
+ * @see #setBase_Property(Property)
+ * @see org.eclipse.papyrus.sysml.blocks.BlocksPackage#getDistributedProperty_Base_Property()
+ * @model required="true" ordered="false"
+ * @generated
+ */
+ Property getBase_Property();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.sysml.blocks.DistributedProperty#getBase_Property <em>Base Property</em>}' reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Base Property</em>' reference.
+ * @see #getBase_Property()
+ * @generated
+ */
+ void setBase_Property(Property value);
+
+} // DistributedProperty
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/NestedConnectorEnd.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/NestedConnectorEnd.java
new file mode 100755
index 0000000..7d497cb
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/NestedConnectorEnd.java
@@ -0,0 +1,118 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.blocks;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.uml2.uml.ConnectorEnd;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Type;
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object ' <em><b>Nested Connector End</b></em>'. <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.blocks.NestedConnectorEnd#getPropertyPath <em>Property Path</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.blocks.NestedConnectorEnd#getBase_ConnectorEnd <em>Base Connector End</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.sysml.blocks.BlocksPackage#getNestedConnectorEnd()
+ * @model
+ * @generated
+ */
+public interface NestedConnectorEnd extends EObject {
+
+ /**
+ * Returns the value of the '<em><b>Base Connector End</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Base Connector End</em>' reference isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Base Connector End</em>' reference.
+ * @see #setBase_ConnectorEnd(ConnectorEnd)
+ * @see org.eclipse.papyrus.sysml.blocks.BlocksPackage#getNestedConnectorEnd_Base_ConnectorEnd()
+ * @model required="true" ordered="false"
+ * @generated
+ */
+ ConnectorEnd getBase_ConnectorEnd();
+
+ /**
+ * Returns the value of the '<em><b>Property Path</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.uml2.uml.Property}. <!--
+ * begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Property Path</em>' reference list isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Property Path</em>' reference list.
+ * @see org.eclipse.papyrus.sysml.blocks.BlocksPackage#getNestedConnectorEnd_PropertyPath()
+ * @model required="true"
+ * @generated
+ */
+ EList<Property> getPropertyPath();
+
+ /**
+ * Retrieves the first {@link org.eclipse.uml2.uml.Property} with the specified '<em><b>Name</b></em>', and '<em><b>Type</b></em>' from the ' <em><b>Property Path</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @param name
+ * The '<em><b>Name</b></em>' of the {@link org.eclipse.uml2.uml.Property} to retrieve, or <code>null</code>.
+ * @param type
+ * The '<em><b>Type</b></em>' of the {@link org.eclipse.uml2.uml.Property} to retrieve, or <code>null</code>.
+ * @return The first {@link org.eclipse.uml2.uml.Property} with the specified '<em><b>Name</b></em>', and '<em><b>Type</b></em>', or <code>null</code>.
+ * @see #getPropertyPath()
+ * @generated
+ */
+ Property getPropertyPath(String name, Type type);
+
+ /**
+ * Retrieves the first {@link org.eclipse.uml2.uml.Property} with the specified '<em><b>Name</b></em>', and '<em><b>Type</b></em>' from the ' <em><b>Property Path</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @param name
+ * The '<em><b>Name</b></em>' of the {@link org.eclipse.uml2.uml.Property} to retrieve, or <code>null</code>.
+ * @param type
+ * The '<em><b>Type</b></em>' of the {@link org.eclipse.uml2.uml.Property} to retrieve, or <code>null</code>.
+ * @param ignoreCase
+ * Whether to ignore case in {@link java.lang.String} comparisons.
+ * @param eClass
+ * The Ecore class of the {@link org.eclipse.uml2.uml.Property} to retrieve, or <code>null</code>.
+ * @return The first {@link org.eclipse.uml2.uml.Property} with the specified '<em><b>Name</b></em>', and '<em><b>Type</b></em>', or <code>null</code>.
+ * @see #getPropertyPath()
+ * @generated
+ */
+ Property getPropertyPath(String name, Type type, boolean ignoreCase, EClass eClass);
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.sysml.blocks.NestedConnectorEnd#getBase_ConnectorEnd <em>Base Connector End</em>}' reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Base Connector End</em>' reference.
+ * @see #getBase_ConnectorEnd()
+ * @generated
+ */
+ void setBase_ConnectorEnd(ConnectorEnd value);
+
+} // NestedConnectorEnd
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/ParticipantProperty.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/ParticipantProperty.java
new file mode 100755
index 0000000..4889985
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/ParticipantProperty.java
@@ -0,0 +1,91 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.blocks;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.uml2.uml.Property;
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object ' <em><b>Participant Property</b></em>'. <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.blocks.ParticipantProperty#getBase_Property <em>Base Property</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.blocks.ParticipantProperty#getEnd <em>End</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.sysml.blocks.BlocksPackage#getParticipantProperty()
+ * @model
+ * @generated
+ */
+public interface ParticipantProperty extends EObject {
+
+ /**
+ * Returns the value of the '<em><b>Base Property</b></em>' reference. <!--
+ * begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Base Property</em>' reference isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Base Property</em>' reference.
+ * @see #setBase_Property(Property)
+ * @see org.eclipse.papyrus.sysml.blocks.BlocksPackage#getParticipantProperty_Base_Property()
+ * @model required="true" ordered="false"
+ * @generated
+ */
+ Property getBase_Property();
+
+ /**
+ * Returns the value of the '<em><b>End</b></em>' reference. <!--
+ * begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>End</em>' reference isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>End</em>' reference.
+ * @see #setEnd(Property)
+ * @see org.eclipse.papyrus.sysml.blocks.BlocksPackage#getParticipantProperty_End()
+ * @model required="true" ordered="false"
+ * @generated
+ */
+ Property getEnd();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.sysml.blocks.ParticipantProperty#getBase_Property <em>Base Property</em>}' reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Base Property</em>' reference.
+ * @see #getBase_Property()
+ * @generated
+ */
+ void setBase_Property(Property value);
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.sysml.blocks.ParticipantProperty#getEnd <em>End</em>}' reference.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>End</em>' reference.
+ * @see #getEnd()
+ * @generated
+ */
+ void setEnd(Property value);
+
+} // ParticipantProperty
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/PropertySpecificType.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/PropertySpecificType.java
new file mode 100755
index 0000000..7f75ddb
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/PropertySpecificType.java
@@ -0,0 +1,63 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.blocks;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.uml2.uml.Classifier;
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object ' <em><b>Property Specific Type</b></em>'. <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.blocks.PropertySpecificType#getBase_Classifier <em>Base Classifier</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.sysml.blocks.BlocksPackage#getPropertySpecificType()
+ * @model
+ * @generated
+ */
+public interface PropertySpecificType extends EObject {
+
+ /**
+ * Returns the value of the '<em><b>Base Classifier</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Base Classifier</em>' reference isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Base Classifier</em>' reference.
+ * @see #setBase_Classifier(Classifier)
+ * @see org.eclipse.papyrus.sysml.blocks.BlocksPackage#getPropertySpecificType_Base_Classifier()
+ * @model required="true" ordered="false"
+ * @generated
+ */
+ Classifier getBase_Classifier();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.sysml.blocks.PropertySpecificType#getBase_Classifier <em>Base Classifier</em>}' reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Base Classifier</em>' reference.
+ * @see #getBase_Classifier()
+ * @generated
+ */
+ void setBase_Classifier(Classifier value);
+
+} // PropertySpecificType
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/Unit.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/Unit.java
new file mode 100755
index 0000000..6a74616
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/Unit.java
@@ -0,0 +1,93 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.blocks;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.uml2.uml.InstanceSpecification;
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object ' <em><b>Unit</b></em>'. <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.blocks.Unit#getBase_InstanceSpecification <em>Base Instance Specification</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.blocks.Unit#getDimension <em>Dimension</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.sysml.blocks.BlocksPackage#getUnit()
+ * @model
+ * @generated
+ */
+public interface Unit extends EObject {
+
+ /**
+ * Returns the value of the '<em><b>Base Instance Specification</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Base Instance Specification</em>' reference isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Base Instance Specification</em>' reference.
+ * @see #setBase_InstanceSpecification(InstanceSpecification)
+ * @see org.eclipse.papyrus.sysml.blocks.BlocksPackage#getUnit_Base_InstanceSpecification()
+ * @model required="true" ordered="false"
+ * @generated
+ */
+ InstanceSpecification getBase_InstanceSpecification();
+
+ /**
+ * Returns the value of the '<em><b>Dimension</b></em>' reference. <!--
+ * begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Dimension</em>' reference isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Dimension</em>' reference.
+ * @see #setDimension(Dimension)
+ * @see org.eclipse.papyrus.sysml.blocks.BlocksPackage#getUnit_Dimension()
+ * @model ordered="false"
+ * @generated
+ */
+ Dimension getDimension();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.sysml.blocks.Unit#getBase_InstanceSpecification <em>Base Instance Specification</em>}'
+ * reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Base Instance Specification</em>' reference.
+ * @see #getBase_InstanceSpecification()
+ * @generated
+ */
+ void setBase_InstanceSpecification(InstanceSpecification value);
+
+ /**
+ * Sets the value of the ' {@link org.eclipse.papyrus.sysml.blocks.Unit#getDimension
+ * <em>Dimension</em>}' reference. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @param value
+ * the new value of the '<em>Dimension</em>' reference.
+ * @see #getDimension()
+ * @generated
+ */
+ void setDimension(Dimension value);
+
+} // Unit
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/ValueType.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/ValueType.java
new file mode 100755
index 0000000..8f40697
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/ValueType.java
@@ -0,0 +1,120 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.blocks;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.uml2.uml.DataType;
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object ' <em><b>Value Type</b></em>'. <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.blocks.ValueType#getBase_DataType <em>Base Data Type</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.blocks.ValueType#getUnit <em>Unit</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.blocks.ValueType#getDimension <em>Dimension</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.sysml.blocks.BlocksPackage#getValueType()
+ * @model
+ * @generated
+ */
+public interface ValueType extends EObject {
+
+ /**
+ * Returns the value of the '<em><b>Base Data Type</b></em>' reference. <!--
+ * begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Base Data Type</em>' reference isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Base Data Type</em>' reference.
+ * @see #setBase_DataType(DataType)
+ * @see org.eclipse.papyrus.sysml.blocks.BlocksPackage#getValueType_Base_DataType()
+ * @model required="true" ordered="false"
+ * @generated
+ */
+ DataType getBase_DataType();
+
+ /**
+ * Returns the value of the '<em><b>Dimension</b></em>' reference. <!--
+ * begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Dimension</em>' reference isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Dimension</em>' reference.
+ * @see #setDimension(Dimension)
+ * @see org.eclipse.papyrus.sysml.blocks.BlocksPackage#getValueType_Dimension()
+ * @model ordered="false"
+ * @generated
+ */
+ Dimension getDimension();
+
+ /**
+ * Returns the value of the '<em><b>Unit</b></em>' reference. <!--
+ * begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Unit</em>' reference isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Unit</em>' reference.
+ * @see #setUnit(Unit)
+ * @see org.eclipse.papyrus.sysml.blocks.BlocksPackage#getValueType_Unit()
+ * @model ordered="false"
+ * @generated
+ */
+ Unit getUnit();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.sysml.blocks.ValueType#getBase_DataType <em>Base Data Type</em>}' reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Base Data Type</em>' reference.
+ * @see #getBase_DataType()
+ * @generated
+ */
+ void setBase_DataType(DataType value);
+
+ /**
+ * Sets the value of the ' {@link org.eclipse.papyrus.sysml.blocks.ValueType#getDimension
+ * <em>Dimension</em>}' reference. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @param value
+ * the new value of the '<em>Dimension</em>' reference.
+ * @see #getDimension()
+ * @generated
+ */
+ void setDimension(Dimension value);
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.sysml.blocks.ValueType#getUnit <em>Unit</em>}' reference.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Unit</em>' reference.
+ * @see #getUnit()
+ * @generated
+ */
+ void setUnit(Unit value);
+
+} // ValueType
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/internal/impl/BindingConnectorImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/internal/impl/BindingConnectorImpl.java
new file mode 100755
index 0000000..e4f7283
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/internal/impl/BindingConnectorImpl.java
@@ -0,0 +1,169 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.blocks.internal.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+import org.eclipse.papyrus.sysml.blocks.BindingConnector;
+import org.eclipse.papyrus.sysml.blocks.BlocksPackage;
+import org.eclipse.uml2.uml.Connector;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object ' <em><b>Binding Connector</b></em> '. <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.blocks.internal.impl.BindingConnectorImpl#getBase_Connector <em>Base Connector</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class BindingConnectorImpl extends MinimalEObjectImpl.Container implements BindingConnector {
+
+ /**
+ * The cached value of the '{@link #getBase_Connector() <em>Base Connector</em>}' reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see #getBase_Connector()
+ * @generated
+ * @ordered
+ */
+ protected Connector base_Connector;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected BindingConnectorImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Connector basicGetBase_Connector() {
+ return base_Connector;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case BlocksPackage.BINDING_CONNECTOR__BASE_CONNECTOR:
+ if (resolve) {
+ return getBase_Connector();
+ }
+ return basicGetBase_Connector();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case BlocksPackage.BINDING_CONNECTOR__BASE_CONNECTOR:
+ return base_Connector != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case BlocksPackage.BINDING_CONNECTOR__BASE_CONNECTOR:
+ setBase_Connector((Connector) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return BlocksPackage.Literals.BINDING_CONNECTOR;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case BlocksPackage.BINDING_CONNECTOR__BASE_CONNECTOR:
+ setBase_Connector((Connector) null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Connector getBase_Connector() {
+ if (base_Connector != null && base_Connector.eIsProxy()) {
+ InternalEObject oldBase_Connector = (InternalEObject) base_Connector;
+ base_Connector = (Connector) eResolveProxy(oldBase_Connector);
+ if (base_Connector != oldBase_Connector) {
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, BlocksPackage.BINDING_CONNECTOR__BASE_CONNECTOR, oldBase_Connector, base_Connector));
+ }
+ }
+ }
+ return base_Connector;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setBase_Connector(Connector newBase_Connector) {
+ Connector oldBase_Connector = base_Connector;
+ base_Connector = newBase_Connector;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, BlocksPackage.BINDING_CONNECTOR__BASE_CONNECTOR, oldBase_Connector, base_Connector));
+ }
+ }
+
+} // BindingConnectorImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/internal/impl/BlockImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/internal/impl/BlockImpl.java
new file mode 100755
index 0000000..5114e3e
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/internal/impl/BlockImpl.java
@@ -0,0 +1,241 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.blocks.internal.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+import org.eclipse.papyrus.sysml.blocks.Block;
+import org.eclipse.papyrus.sysml.blocks.BlocksPackage;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object ' <em><b>Block</b></em>'. <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.blocks.internal.impl.BlockImpl#isEncapsulated <em>Is Encapsulated</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.blocks.internal.impl.BlockImpl#getBase_Class <em>Base Class</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class BlockImpl extends MinimalEObjectImpl.Container implements Block {
+
+ /**
+ * The default value of the '{@link #isEncapsulated() <em>Is Encapsulated</em>}' attribute.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see #isEncapsulated()
+ * @generated
+ * @ordered
+ */
+ protected static final boolean IS_ENCAPSULATED_EDEFAULT = false;
+
+ /**
+ * The cached value of the '{@link #isEncapsulated() <em>Is Encapsulated</em>}' attribute.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see #isEncapsulated()
+ * @generated
+ * @ordered
+ */
+ protected boolean isEncapsulated = IS_ENCAPSULATED_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getBase_Class() <em>Base Class</em>}' reference.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #getBase_Class()
+ * @generated
+ * @ordered
+ */
+ protected org.eclipse.uml2.uml.Class base_Class;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected BlockImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public org.eclipse.uml2.uml.Class basicGetBase_Class() {
+ return base_Class;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case BlocksPackage.BLOCK__IS_ENCAPSULATED:
+ return isEncapsulated();
+ case BlocksPackage.BLOCK__BASE_CLASS:
+ if (resolve) {
+ return getBase_Class();
+ }
+ return basicGetBase_Class();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case BlocksPackage.BLOCK__IS_ENCAPSULATED:
+ return isEncapsulated != IS_ENCAPSULATED_EDEFAULT;
+ case BlocksPackage.BLOCK__BASE_CLASS:
+ return base_Class != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case BlocksPackage.BLOCK__IS_ENCAPSULATED:
+ setIsEncapsulated((Boolean) newValue);
+ return;
+ case BlocksPackage.BLOCK__BASE_CLASS:
+ setBase_Class((org.eclipse.uml2.uml.Class) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return BlocksPackage.Literals.BLOCK;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean isEncapsulated() {
+ return isEncapsulated;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case BlocksPackage.BLOCK__IS_ENCAPSULATED:
+ setIsEncapsulated(IS_ENCAPSULATED_EDEFAULT);
+ return;
+ case BlocksPackage.BLOCK__BASE_CLASS:
+ setBase_Class((org.eclipse.uml2.uml.Class) null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public org.eclipse.uml2.uml.Class getBase_Class() {
+ if (base_Class != null && base_Class.eIsProxy()) {
+ InternalEObject oldBase_Class = (InternalEObject) base_Class;
+ base_Class = (org.eclipse.uml2.uml.Class) eResolveProxy(oldBase_Class);
+ if (base_Class != oldBase_Class) {
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, BlocksPackage.BLOCK__BASE_CLASS, oldBase_Class, base_Class));
+ }
+ }
+ }
+ return base_Class;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setBase_Class(org.eclipse.uml2.uml.Class newBase_Class) {
+ org.eclipse.uml2.uml.Class oldBase_Class = base_Class;
+ base_Class = newBase_Class;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, BlocksPackage.BLOCK__BASE_CLASS, oldBase_Class, base_Class));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setIsEncapsulated(boolean newIsEncapsulated) {
+ boolean oldIsEncapsulated = isEncapsulated;
+ isEncapsulated = newIsEncapsulated;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, BlocksPackage.BLOCK__IS_ENCAPSULATED, oldIsEncapsulated, isEncapsulated));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) {
+ return super.toString();
+ }
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (isEncapsulated: ");
+ result.append(isEncapsulated);
+ result.append(')');
+ return result.toString();
+ }
+
+} // BlockImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/internal/impl/BlocksFactoryImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/internal/impl/BlocksFactoryImpl.java
new file mode 100755
index 0000000..afcdc7d
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/internal/impl/BlocksFactoryImpl.java
@@ -0,0 +1,225 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.blocks.internal.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+import org.eclipse.papyrus.sysml.blocks.BindingConnector;
+import org.eclipse.papyrus.sysml.blocks.Block;
+import org.eclipse.papyrus.sysml.blocks.BlocksFactory;
+import org.eclipse.papyrus.sysml.blocks.BlocksPackage;
+import org.eclipse.papyrus.sysml.blocks.ConnectorProperty;
+import org.eclipse.papyrus.sysml.blocks.Dimension;
+import org.eclipse.papyrus.sysml.blocks.DistributedProperty;
+import org.eclipse.papyrus.sysml.blocks.NestedConnectorEnd;
+import org.eclipse.papyrus.sysml.blocks.ParticipantProperty;
+import org.eclipse.papyrus.sysml.blocks.PropertySpecificType;
+import org.eclipse.papyrus.sysml.blocks.Unit;
+import org.eclipse.papyrus.sysml.blocks.ValueType;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model <b>Factory</b>. <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+public class BlocksFactoryImpl extends EFactoryImpl implements BlocksFactory {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static BlocksPackage getPackage() {
+ return BlocksPackage.eINSTANCE;
+ }
+
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public static BlocksFactory init() {
+ try {
+ BlocksFactory theBlocksFactory = (BlocksFactory) EPackage.Registry.INSTANCE.getEFactory(BlocksPackage.eNS_URI);
+ if (theBlocksFactory != null) {
+ return theBlocksFactory;
+ }
+ } catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new BlocksFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public BlocksFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ case BlocksPackage.BLOCK:
+ return createBlock();
+ case BlocksPackage.DISTRIBUTED_PROPERTY:
+ return createDistributedProperty();
+ case BlocksPackage.DIMENSION:
+ return createDimension();
+ case BlocksPackage.UNIT:
+ return createUnit();
+ case BlocksPackage.VALUE_TYPE:
+ return createValueType();
+ case BlocksPackage.NESTED_CONNECTOR_END:
+ return createNestedConnectorEnd();
+ case BlocksPackage.PARTICIPANT_PROPERTY:
+ return createParticipantProperty();
+ case BlocksPackage.CONNECTOR_PROPERTY:
+ return createConnectorProperty();
+ case BlocksPackage.BINDING_CONNECTOR:
+ return createBindingConnector();
+ case BlocksPackage.PROPERTY_SPECIFIC_TYPE:
+ return createPropertySpecificType();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public BindingConnector createBindingConnector() {
+ BindingConnectorImpl bindingConnector = new BindingConnectorImpl();
+ return bindingConnector;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Block createBlock() {
+ BlockImpl block = new BlockImpl();
+ return block;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ConnectorProperty createConnectorProperty() {
+ ConnectorPropertyImpl connectorProperty = new ConnectorPropertyImpl();
+ return connectorProperty;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Dimension createDimension() {
+ DimensionImpl dimension = new DimensionImpl();
+ return dimension;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public DistributedProperty createDistributedProperty() {
+ DistributedPropertyImpl distributedProperty = new DistributedPropertyImpl();
+ return distributedProperty;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public NestedConnectorEnd createNestedConnectorEnd() {
+ NestedConnectorEndImpl nestedConnectorEnd = new NestedConnectorEndImpl();
+ return nestedConnectorEnd;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ParticipantProperty createParticipantProperty() {
+ ParticipantPropertyImpl participantProperty = new ParticipantPropertyImpl();
+ return participantProperty;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public PropertySpecificType createPropertySpecificType() {
+ PropertySpecificTypeImpl propertySpecificType = new PropertySpecificTypeImpl();
+ return propertySpecificType;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Unit createUnit() {
+ UnitImpl unit = new UnitImpl();
+ return unit;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ValueType createValueType() {
+ ValueTypeImpl valueType = new ValueTypeImpl();
+ return valueType;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public BlocksPackage getBlocksPackage() {
+ return (BlocksPackage) getEPackage();
+ }
+
+} // BlocksFactoryImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/internal/impl/BlocksPackageImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/internal/impl/BlocksPackageImpl.java
new file mode 100755
index 0000000..64439fc
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/internal/impl/BlocksPackageImpl.java
@@ -0,0 +1,636 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.blocks.internal.impl;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+import org.eclipse.papyrus.sysml.SysmlPackage;
+import org.eclipse.papyrus.sysml.activities.ActivitiesPackage;
+import org.eclipse.papyrus.sysml.activities.internal.impl.ActivitiesPackageImpl;
+import org.eclipse.papyrus.sysml.allocations.AllocationsPackage;
+import org.eclipse.papyrus.sysml.allocations.internal.impl.AllocationsPackageImpl;
+import org.eclipse.papyrus.sysml.blocks.BindingConnector;
+import org.eclipse.papyrus.sysml.blocks.Block;
+import org.eclipse.papyrus.sysml.blocks.BlocksFactory;
+import org.eclipse.papyrus.sysml.blocks.BlocksPackage;
+import org.eclipse.papyrus.sysml.blocks.ConnectorProperty;
+import org.eclipse.papyrus.sysml.blocks.Dimension;
+import org.eclipse.papyrus.sysml.blocks.DistributedProperty;
+import org.eclipse.papyrus.sysml.blocks.NestedConnectorEnd;
+import org.eclipse.papyrus.sysml.blocks.ParticipantProperty;
+import org.eclipse.papyrus.sysml.blocks.PropertySpecificType;
+import org.eclipse.papyrus.sysml.blocks.Unit;
+import org.eclipse.papyrus.sysml.blocks.ValueType;
+import org.eclipse.papyrus.sysml.constraints.ConstraintsPackage;
+import org.eclipse.papyrus.sysml.constraints.internal.impl.ConstraintsPackageImpl;
+import org.eclipse.papyrus.sysml.interactions.InteractionsPackage;
+import org.eclipse.papyrus.sysml.interactions.internal.impl.InteractionsPackageImpl;
+import org.eclipse.papyrus.sysml.internal.impl.SysmlPackageImpl;
+import org.eclipse.papyrus.sysml.modelelements.ModelelementsPackage;
+import org.eclipse.papyrus.sysml.modelelements.internal.impl.ModelelementsPackageImpl;
+import org.eclipse.papyrus.sysml.portandflows.PortandflowsPackage;
+import org.eclipse.papyrus.sysml.portandflows.internal.impl.PortandflowsPackageImpl;
+import org.eclipse.papyrus.sysml.requirements.RequirementsPackage;
+import org.eclipse.papyrus.sysml.requirements.internal.impl.RequirementsPackageImpl;
+import org.eclipse.papyrus.sysml.statemachines.StatemachinesPackage;
+import org.eclipse.papyrus.sysml.statemachines.internal.impl.StatemachinesPackageImpl;
+import org.eclipse.papyrus.sysml.usecases.UsecasesPackage;
+import org.eclipse.papyrus.sysml.usecases.internal.impl.UsecasesPackageImpl;
+import org.eclipse.uml2.types.TypesPackage;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.eclipse.uml2.uml.profile.standard.StandardPackage;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model <b>Package</b>. <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+public class BlocksPackageImpl extends EPackageImpl implements BlocksPackage {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private static boolean isInited = false;
+
+ /**
+ * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+ *
+ * <p>
+ * This method is used to initialize {@link BlocksPackage#eINSTANCE} when that field is accessed. Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #eNS_URI
+ * @see #createPackageContents()
+ * @see #initializePackageContents()
+ * @generated
+ */
+ public static BlocksPackage init() {
+ if (isInited) {
+ return (BlocksPackage) EPackage.Registry.INSTANCE.getEPackage(BlocksPackage.eNS_URI);
+ }
+
+ // Obtain or create and register package
+ BlocksPackageImpl theBlocksPackage = (BlocksPackageImpl) (EPackage.Registry.INSTANCE.get(eNS_URI) instanceof BlocksPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new BlocksPackageImpl());
+
+ isInited = true;
+
+ // Initialize simple dependencies
+ StandardPackage.eINSTANCE.eClass();
+
+ // Obtain or create and register interdependencies
+ SysmlPackageImpl theSysmlPackage = (SysmlPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(SysmlPackage.eNS_URI) instanceof SysmlPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(SysmlPackage.eNS_URI) : SysmlPackage.eINSTANCE);
+ ModelelementsPackageImpl theModelelementsPackage = (ModelelementsPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(ModelelementsPackage.eNS_URI) instanceof ModelelementsPackageImpl ? EPackage.Registry.INSTANCE
+ .getEPackage(ModelelementsPackage.eNS_URI) : ModelelementsPackage.eINSTANCE);
+ PortandflowsPackageImpl thePortandflowsPackage = (PortandflowsPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(PortandflowsPackage.eNS_URI) instanceof PortandflowsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(PortandflowsPackage.eNS_URI)
+ : PortandflowsPackage.eINSTANCE);
+ ConstraintsPackageImpl theConstraintsPackage = (ConstraintsPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(ConstraintsPackage.eNS_URI) instanceof ConstraintsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ConstraintsPackage.eNS_URI)
+ : ConstraintsPackage.eINSTANCE);
+ ActivitiesPackageImpl theActivitiesPackage = (ActivitiesPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(ActivitiesPackage.eNS_URI) instanceof ActivitiesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ActivitiesPackage.eNS_URI)
+ : ActivitiesPackage.eINSTANCE);
+ AllocationsPackageImpl theAllocationsPackage = (AllocationsPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(AllocationsPackage.eNS_URI) instanceof AllocationsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(AllocationsPackage.eNS_URI)
+ : AllocationsPackage.eINSTANCE);
+ RequirementsPackageImpl theRequirementsPackage = (RequirementsPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(RequirementsPackage.eNS_URI) instanceof RequirementsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(RequirementsPackage.eNS_URI)
+ : RequirementsPackage.eINSTANCE);
+ InteractionsPackageImpl theInteractionsPackage = (InteractionsPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(InteractionsPackage.eNS_URI) instanceof InteractionsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(InteractionsPackage.eNS_URI)
+ : InteractionsPackage.eINSTANCE);
+ StatemachinesPackageImpl theStatemachinesPackage = (StatemachinesPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(StatemachinesPackage.eNS_URI) instanceof StatemachinesPackageImpl ? EPackage.Registry.INSTANCE
+ .getEPackage(StatemachinesPackage.eNS_URI) : StatemachinesPackage.eINSTANCE);
+ UsecasesPackageImpl theUsecasesPackage = (UsecasesPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(UsecasesPackage.eNS_URI) instanceof UsecasesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(UsecasesPackage.eNS_URI)
+ : UsecasesPackage.eINSTANCE);
+
+ // Create package meta-data objects
+ theBlocksPackage.createPackageContents();
+ theSysmlPackage.createPackageContents();
+ theModelelementsPackage.createPackageContents();
+ thePortandflowsPackage.createPackageContents();
+ theConstraintsPackage.createPackageContents();
+ theActivitiesPackage.createPackageContents();
+ theAllocationsPackage.createPackageContents();
+ theRequirementsPackage.createPackageContents();
+ theInteractionsPackage.createPackageContents();
+ theStatemachinesPackage.createPackageContents();
+ theUsecasesPackage.createPackageContents();
+
+ // Initialize created meta-data
+ theBlocksPackage.initializePackageContents();
+ theSysmlPackage.initializePackageContents();
+ theModelelementsPackage.initializePackageContents();
+ thePortandflowsPackage.initializePackageContents();
+ theConstraintsPackage.initializePackageContents();
+ theActivitiesPackage.initializePackageContents();
+ theAllocationsPackage.initializePackageContents();
+ theRequirementsPackage.initializePackageContents();
+ theInteractionsPackage.initializePackageContents();
+ theStatemachinesPackage.initializePackageContents();
+ theUsecasesPackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theBlocksPackage.freeze();
+
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(BlocksPackage.eNS_URI, theBlocksPackage);
+ return theBlocksPackage;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass blockEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass distributedPropertyEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass dimensionEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass unitEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass valueTypeEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass nestedConnectorEndEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass participantPropertyEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass connectorPropertyEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass bindingConnectorEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass propertySpecificTypeEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private boolean isCreated = false;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Creates an instance of the model <b>Package</b>, registered with {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the
+ * package
+ * package URI value.
+ * <p>
+ * Note: the correct way to create the package is via the static factory method {@link #init init()}, which also performs initialization of the package, or returns the registered package, if one already exists. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.emf.ecore.EPackage.Registry
+ * @see org.eclipse.papyrus.sysml.blocks.BlocksPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private BlocksPackageImpl() {
+ super(eNS_URI, BlocksFactory.eINSTANCE);
+ }
+
+ /**
+ * Creates the meta-model objects for the package. This method is
+ * guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void createPackageContents() {
+ if (isCreated) {
+ return;
+ }
+ isCreated = true;
+
+ // Create classes and their features
+ blockEClass = createEClass(BLOCK);
+ createEAttribute(blockEClass, BLOCK__IS_ENCAPSULATED);
+ createEReference(blockEClass, BLOCK__BASE_CLASS);
+
+ distributedPropertyEClass = createEClass(DISTRIBUTED_PROPERTY);
+ createEReference(distributedPropertyEClass, DISTRIBUTED_PROPERTY__BASE_PROPERTY);
+
+ dimensionEClass = createEClass(DIMENSION);
+ createEReference(dimensionEClass, DIMENSION__BASE_INSTANCE_SPECIFICATION);
+
+ unitEClass = createEClass(UNIT);
+ createEReference(unitEClass, UNIT__BASE_INSTANCE_SPECIFICATION);
+ createEReference(unitEClass, UNIT__DIMENSION);
+
+ valueTypeEClass = createEClass(VALUE_TYPE);
+ createEReference(valueTypeEClass, VALUE_TYPE__BASE_DATA_TYPE);
+ createEReference(valueTypeEClass, VALUE_TYPE__UNIT);
+ createEReference(valueTypeEClass, VALUE_TYPE__DIMENSION);
+
+ nestedConnectorEndEClass = createEClass(NESTED_CONNECTOR_END);
+ createEReference(nestedConnectorEndEClass, NESTED_CONNECTOR_END__PROPERTY_PATH);
+ createEReference(nestedConnectorEndEClass, NESTED_CONNECTOR_END__BASE_CONNECTOR_END);
+
+ participantPropertyEClass = createEClass(PARTICIPANT_PROPERTY);
+ createEReference(participantPropertyEClass, PARTICIPANT_PROPERTY__BASE_PROPERTY);
+ createEReference(participantPropertyEClass, PARTICIPANT_PROPERTY__END);
+
+ connectorPropertyEClass = createEClass(CONNECTOR_PROPERTY);
+ createEReference(connectorPropertyEClass, CONNECTOR_PROPERTY__BASE_PROPERTY);
+ createEReference(connectorPropertyEClass, CONNECTOR_PROPERTY__CONNECTOR);
+
+ bindingConnectorEClass = createEClass(BINDING_CONNECTOR);
+ createEReference(bindingConnectorEClass, BINDING_CONNECTOR__BASE_CONNECTOR);
+
+ propertySpecificTypeEClass = createEClass(PROPERTY_SPECIFIC_TYPE);
+ createEReference(propertySpecificTypeEClass, PROPERTY_SPECIFIC_TYPE__BASE_CLASSIFIER);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EClass getBindingConnector() {
+ return bindingConnectorEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getBindingConnector_Base_Connector() {
+ return (EReference) bindingConnectorEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EClass getBlock() {
+ return blockEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getBlock_Base_Class() {
+ return (EReference) blockEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EAttribute getBlock_IsEncapsulated() {
+ return (EAttribute) blockEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public BlocksFactory getBlocksFactory() {
+ return (BlocksFactory) getEFactoryInstance();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EClass getConnectorProperty() {
+ return connectorPropertyEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getConnectorProperty_Base_Property() {
+ return (EReference) connectorPropertyEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getConnectorProperty_Connector() {
+ return (EReference) connectorPropertyEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EClass getDimension() {
+ return dimensionEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getDimension_Base_InstanceSpecification() {
+ return (EReference) dimensionEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EClass getDistributedProperty() {
+ return distributedPropertyEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getDistributedProperty_Base_Property() {
+ return (EReference) distributedPropertyEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EClass getNestedConnectorEnd() {
+ return nestedConnectorEndEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getNestedConnectorEnd_Base_ConnectorEnd() {
+ return (EReference) nestedConnectorEndEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getNestedConnectorEnd_PropertyPath() {
+ return (EReference) nestedConnectorEndEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EClass getParticipantProperty() {
+ return participantPropertyEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getParticipantProperty_Base_Property() {
+ return (EReference) participantPropertyEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getParticipantProperty_End() {
+ return (EReference) participantPropertyEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EClass getPropertySpecificType() {
+ return propertySpecificTypeEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getPropertySpecificType_Base_Classifier() {
+ return (EReference) propertySpecificTypeEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EClass getUnit() {
+ return unitEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getUnit_Base_InstanceSpecification() {
+ return (EReference) unitEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getUnit_Dimension() {
+ return (EReference) unitEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EClass getValueType() {
+ return valueTypeEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getValueType_Base_DataType() {
+ return (EReference) valueTypeEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getValueType_Dimension() {
+ return (EReference) valueTypeEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getValueType_Unit() {
+ return (EReference) valueTypeEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void initializePackageContents() {
+ if (isInitialized) {
+ return;
+ }
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Obtain other dependent packages
+ TypesPackage theTypesPackage = (TypesPackage) EPackage.Registry.INSTANCE.getEPackage(TypesPackage.eNS_URI);
+ UMLPackage theUMLPackage = (UMLPackage) EPackage.Registry.INSTANCE.getEPackage(UMLPackage.eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+
+ // Initialize classes, features, and operations; add parameters
+ initEClass(blockEClass, Block.class, "Block", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getBlock_IsEncapsulated(), theTypesPackage.getBoolean(), "isEncapsulated", null, 0, 1, Block.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+ initEReference(getBlock_Base_Class(), theUMLPackage.getClass_(), null, "base_Class", null, 1, 1, Block.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+
+ initEClass(distributedPropertyEClass, DistributedProperty.class, "DistributedProperty", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getDistributedProperty_Base_Property(), theUMLPackage.getProperty(), null, "base_Property", null, 1, 1, DistributedProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE,
+ !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+
+ initEClass(dimensionEClass, Dimension.class, "Dimension", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getDimension_Base_InstanceSpecification(), theUMLPackage.getInstanceSpecification(), null, "base_InstanceSpecification", null, 1, 1, Dimension.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES,
+ !IS_UNSETTABLE, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+
+ initEClass(unitEClass, Unit.class, "Unit", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getUnit_Base_InstanceSpecification(), theUMLPackage.getInstanceSpecification(), null, "base_InstanceSpecification", null, 1, 1, Unit.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE,
+ !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+ initEReference(getUnit_Dimension(), this.getDimension(), null, "dimension", null, 0, 1, Unit.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+
+ initEClass(valueTypeEClass, ValueType.class, "ValueType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getValueType_Base_DataType(), theUMLPackage.getDataType(), null, "base_DataType", null, 1, 1, ValueType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, !IS_DERIVED,
+ !IS_ORDERED);
+ initEReference(getValueType_Unit(), this.getUnit(), null, "unit", null, 0, 1, ValueType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+ initEReference(getValueType_Dimension(), this.getDimension(), null, "dimension", null, 0, 1, ValueType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+
+ initEClass(nestedConnectorEndEClass, NestedConnectorEnd.class, "NestedConnectorEnd", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getNestedConnectorEnd_PropertyPath(), theUMLPackage.getProperty(), null, "propertyPath", null, 1, -1, NestedConnectorEnd.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE,
+ !IS_DERIVED, IS_ORDERED);
+ initEReference(getNestedConnectorEnd_Base_ConnectorEnd(), theUMLPackage.getConnectorEnd(), null, "base_ConnectorEnd", null, 1, 1, NestedConnectorEnd.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE,
+ !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+
+ initEClass(participantPropertyEClass, ParticipantProperty.class, "ParticipantProperty", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getParticipantProperty_Base_Property(), theUMLPackage.getProperty(), null, "base_Property", null, 1, 1, ParticipantProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE,
+ !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+ initEReference(getParticipantProperty_End(), theUMLPackage.getProperty(), null, "end", null, 1, 1, ParticipantProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, !IS_DERIVED,
+ !IS_ORDERED);
+
+ initEClass(connectorPropertyEClass, ConnectorProperty.class, "ConnectorProperty", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getConnectorProperty_Base_Property(), theUMLPackage.getProperty(), null, "base_Property", null, 1, 1, ConnectorProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE,
+ !IS_DERIVED, !IS_ORDERED);
+ initEReference(getConnectorProperty_Connector(), theUMLPackage.getConnector(), null, "connector", null, 1, 1, ConnectorProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE,
+ !IS_DERIVED, !IS_ORDERED);
+
+ initEClass(bindingConnectorEClass, BindingConnector.class, "BindingConnector", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getBindingConnector_Base_Connector(), theUMLPackage.getConnector(), null, "base_Connector", null, 1, 1, BindingConnector.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE,
+ !IS_DERIVED, !IS_ORDERED);
+
+ initEClass(propertySpecificTypeEClass, PropertySpecificType.class, "PropertySpecificType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getPropertySpecificType_Base_Classifier(), theUMLPackage.getClassifier(), null, "base_Classifier", null, 1, 1, PropertySpecificType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE,
+ !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+ }
+
+} // BlocksPackageImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/internal/impl/ConnectorPropertyImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/internal/impl/ConnectorPropertyImpl.java
new file mode 100755
index 0000000..434fb51
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/internal/impl/ConnectorPropertyImpl.java
@@ -0,0 +1,234 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.blocks.internal.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+import org.eclipse.papyrus.sysml.blocks.BlocksPackage;
+import org.eclipse.papyrus.sysml.blocks.ConnectorProperty;
+import org.eclipse.uml2.uml.Connector;
+import org.eclipse.uml2.uml.Property;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object ' <em><b>Connector Property</b></em> '. <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.blocks.internal.impl.ConnectorPropertyImpl#getBase_Property <em>Base Property</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.blocks.internal.impl.ConnectorPropertyImpl#getConnector <em>Connector</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ConnectorPropertyImpl extends MinimalEObjectImpl.Container implements ConnectorProperty {
+
+ /**
+ * The cached value of the '{@link #getBase_Property() <em>Base Property</em>}' reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see #getBase_Property()
+ * @generated
+ * @ordered
+ */
+ protected Property base_Property;
+
+ /**
+ * The cached value of the '{@link #getConnector() <em>Connector</em>}' reference.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #getConnector()
+ * @generated
+ * @ordered
+ */
+ protected Connector connector;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ConnectorPropertyImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Property basicGetBase_Property() {
+ return base_Property;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Connector basicGetConnector() {
+ return connector;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case BlocksPackage.CONNECTOR_PROPERTY__BASE_PROPERTY:
+ if (resolve) {
+ return getBase_Property();
+ }
+ return basicGetBase_Property();
+ case BlocksPackage.CONNECTOR_PROPERTY__CONNECTOR:
+ if (resolve) {
+ return getConnector();
+ }
+ return basicGetConnector();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case BlocksPackage.CONNECTOR_PROPERTY__BASE_PROPERTY:
+ return base_Property != null;
+ case BlocksPackage.CONNECTOR_PROPERTY__CONNECTOR:
+ return connector != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case BlocksPackage.CONNECTOR_PROPERTY__BASE_PROPERTY:
+ setBase_Property((Property) newValue);
+ return;
+ case BlocksPackage.CONNECTOR_PROPERTY__CONNECTOR:
+ setConnector((Connector) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return BlocksPackage.Literals.CONNECTOR_PROPERTY;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case BlocksPackage.CONNECTOR_PROPERTY__BASE_PROPERTY:
+ setBase_Property((Property) null);
+ return;
+ case BlocksPackage.CONNECTOR_PROPERTY__CONNECTOR:
+ setConnector((Connector) null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Property getBase_Property() {
+ if (base_Property != null && base_Property.eIsProxy()) {
+ InternalEObject oldBase_Property = (InternalEObject) base_Property;
+ base_Property = (Property) eResolveProxy(oldBase_Property);
+ if (base_Property != oldBase_Property) {
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, BlocksPackage.CONNECTOR_PROPERTY__BASE_PROPERTY, oldBase_Property, base_Property));
+ }
+ }
+ }
+ return base_Property;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Connector getConnector() {
+ if (connector != null && connector.eIsProxy()) {
+ InternalEObject oldConnector = (InternalEObject) connector;
+ connector = (Connector) eResolveProxy(oldConnector);
+ if (connector != oldConnector) {
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, BlocksPackage.CONNECTOR_PROPERTY__CONNECTOR, oldConnector, connector));
+ }
+ }
+ }
+ return connector;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setBase_Property(Property newBase_Property) {
+ Property oldBase_Property = base_Property;
+ base_Property = newBase_Property;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, BlocksPackage.CONNECTOR_PROPERTY__BASE_PROPERTY, oldBase_Property, base_Property));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setConnector(Connector newConnector) {
+ Connector oldConnector = connector;
+ connector = newConnector;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, BlocksPackage.CONNECTOR_PROPERTY__CONNECTOR, oldConnector, connector));
+ }
+ }
+
+} // ConnectorPropertyImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/internal/impl/DimensionImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/internal/impl/DimensionImpl.java
new file mode 100755
index 0000000..b03c765
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/internal/impl/DimensionImpl.java
@@ -0,0 +1,169 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.blocks.internal.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+import org.eclipse.papyrus.sysml.blocks.BlocksPackage;
+import org.eclipse.papyrus.sysml.blocks.Dimension;
+import org.eclipse.uml2.uml.InstanceSpecification;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object ' <em><b>Dimension</b></em>'. <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.blocks.internal.impl.DimensionImpl#getBase_InstanceSpecification <em>Base Instance Specification</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class DimensionImpl extends MinimalEObjectImpl.Container implements Dimension {
+
+ /**
+ * The cached value of the '{@link #getBase_InstanceSpecification() <em>Base Instance Specification</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getBase_InstanceSpecification()
+ * @generated
+ * @ordered
+ */
+ protected InstanceSpecification base_InstanceSpecification;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected DimensionImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public InstanceSpecification basicGetBase_InstanceSpecification() {
+ return base_InstanceSpecification;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case BlocksPackage.DIMENSION__BASE_INSTANCE_SPECIFICATION:
+ if (resolve) {
+ return getBase_InstanceSpecification();
+ }
+ return basicGetBase_InstanceSpecification();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case BlocksPackage.DIMENSION__BASE_INSTANCE_SPECIFICATION:
+ return base_InstanceSpecification != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case BlocksPackage.DIMENSION__BASE_INSTANCE_SPECIFICATION:
+ setBase_InstanceSpecification((InstanceSpecification) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return BlocksPackage.Literals.DIMENSION;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case BlocksPackage.DIMENSION__BASE_INSTANCE_SPECIFICATION:
+ setBase_InstanceSpecification((InstanceSpecification) null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public InstanceSpecification getBase_InstanceSpecification() {
+ if (base_InstanceSpecification != null && base_InstanceSpecification.eIsProxy()) {
+ InternalEObject oldBase_InstanceSpecification = (InternalEObject) base_InstanceSpecification;
+ base_InstanceSpecification = (InstanceSpecification) eResolveProxy(oldBase_InstanceSpecification);
+ if (base_InstanceSpecification != oldBase_InstanceSpecification) {
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, BlocksPackage.DIMENSION__BASE_INSTANCE_SPECIFICATION, oldBase_InstanceSpecification, base_InstanceSpecification));
+ }
+ }
+ }
+ return base_InstanceSpecification;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setBase_InstanceSpecification(InstanceSpecification newBase_InstanceSpecification) {
+ InstanceSpecification oldBase_InstanceSpecification = base_InstanceSpecification;
+ base_InstanceSpecification = newBase_InstanceSpecification;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, BlocksPackage.DIMENSION__BASE_INSTANCE_SPECIFICATION, oldBase_InstanceSpecification, base_InstanceSpecification));
+ }
+ }
+
+} // DimensionImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/internal/impl/DistributedPropertyImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/internal/impl/DistributedPropertyImpl.java
new file mode 100755
index 0000000..e77e12b
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/internal/impl/DistributedPropertyImpl.java
@@ -0,0 +1,169 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.blocks.internal.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+import org.eclipse.papyrus.sysml.blocks.BlocksPackage;
+import org.eclipse.papyrus.sysml.blocks.DistributedProperty;
+import org.eclipse.uml2.uml.Property;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object ' <em><b>Distributed Property</b></em>'. <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.blocks.internal.impl.DistributedPropertyImpl#getBase_Property <em>Base Property</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class DistributedPropertyImpl extends MinimalEObjectImpl.Container implements DistributedProperty {
+
+ /**
+ * The cached value of the '{@link #getBase_Property() <em>Base Property</em>}' reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see #getBase_Property()
+ * @generated
+ * @ordered
+ */
+ protected Property base_Property;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected DistributedPropertyImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Property basicGetBase_Property() {
+ return base_Property;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case BlocksPackage.DISTRIBUTED_PROPERTY__BASE_PROPERTY:
+ if (resolve) {
+ return getBase_Property();
+ }
+ return basicGetBase_Property();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case BlocksPackage.DISTRIBUTED_PROPERTY__BASE_PROPERTY:
+ return base_Property != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case BlocksPackage.DISTRIBUTED_PROPERTY__BASE_PROPERTY:
+ setBase_Property((Property) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return BlocksPackage.Literals.DISTRIBUTED_PROPERTY;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case BlocksPackage.DISTRIBUTED_PROPERTY__BASE_PROPERTY:
+ setBase_Property((Property) null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Property getBase_Property() {
+ if (base_Property != null && base_Property.eIsProxy()) {
+ InternalEObject oldBase_Property = (InternalEObject) base_Property;
+ base_Property = (Property) eResolveProxy(oldBase_Property);
+ if (base_Property != oldBase_Property) {
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, BlocksPackage.DISTRIBUTED_PROPERTY__BASE_PROPERTY, oldBase_Property, base_Property));
+ }
+ }
+ }
+ return base_Property;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setBase_Property(Property newBase_Property) {
+ Property oldBase_Property = base_Property;
+ base_Property = newBase_Property;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, BlocksPackage.DISTRIBUTED_PROPERTY__BASE_PROPERTY, oldBase_Property, base_Property));
+ }
+ }
+
+} // DistributedPropertyImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/internal/impl/NestedConnectorEndImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/internal/impl/NestedConnectorEndImpl.java
new file mode 100755
index 0000000..cd26e23
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/internal/impl/NestedConnectorEndImpl.java
@@ -0,0 +1,243 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.blocks.internal.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+import org.eclipse.emf.ecore.util.EObjectResolvingEList;
+import org.eclipse.papyrus.sysml.blocks.BlocksPackage;
+import org.eclipse.papyrus.sysml.blocks.NestedConnectorEnd;
+import org.eclipse.uml2.uml.ConnectorEnd;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Type;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object ' <em><b>Nested Connector End</b></em>'. <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.blocks.internal.impl.NestedConnectorEndImpl#getPropertyPath <em>Property Path</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.blocks.internal.impl.NestedConnectorEndImpl#getBase_ConnectorEnd <em>Base Connector End</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class NestedConnectorEndImpl extends MinimalEObjectImpl.Container implements NestedConnectorEnd {
+
+ /**
+ * The cached value of the '{@link #getPropertyPath() <em>Property Path</em>}' reference list.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see #getPropertyPath()
+ * @generated
+ * @ordered
+ */
+ protected EList<Property> propertyPath;
+
+ /**
+ * The cached value of the '{@link #getBase_ConnectorEnd() <em>Base Connector End</em>}' reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see #getBase_ConnectorEnd()
+ * @generated
+ * @ordered
+ */
+ protected ConnectorEnd base_ConnectorEnd;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected NestedConnectorEndImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ConnectorEnd basicGetBase_ConnectorEnd() {
+ return base_ConnectorEnd;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case BlocksPackage.NESTED_CONNECTOR_END__PROPERTY_PATH:
+ return getPropertyPath();
+ case BlocksPackage.NESTED_CONNECTOR_END__BASE_CONNECTOR_END:
+ if (resolve) {
+ return getBase_ConnectorEnd();
+ }
+ return basicGetBase_ConnectorEnd();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case BlocksPackage.NESTED_CONNECTOR_END__PROPERTY_PATH:
+ return propertyPath != null && !propertyPath.isEmpty();
+ case BlocksPackage.NESTED_CONNECTOR_END__BASE_CONNECTOR_END:
+ return base_ConnectorEnd != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case BlocksPackage.NESTED_CONNECTOR_END__PROPERTY_PATH:
+ getPropertyPath().clear();
+ getPropertyPath().addAll((Collection<? extends Property>) newValue);
+ return;
+ case BlocksPackage.NESTED_CONNECTOR_END__BASE_CONNECTOR_END:
+ setBase_ConnectorEnd((ConnectorEnd) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return BlocksPackage.Literals.NESTED_CONNECTOR_END;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case BlocksPackage.NESTED_CONNECTOR_END__PROPERTY_PATH:
+ getPropertyPath().clear();
+ return;
+ case BlocksPackage.NESTED_CONNECTOR_END__BASE_CONNECTOR_END:
+ setBase_ConnectorEnd((ConnectorEnd) null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ConnectorEnd getBase_ConnectorEnd() {
+ if (base_ConnectorEnd != null && base_ConnectorEnd.eIsProxy()) {
+ InternalEObject oldBase_ConnectorEnd = (InternalEObject) base_ConnectorEnd;
+ base_ConnectorEnd = (ConnectorEnd) eResolveProxy(oldBase_ConnectorEnd);
+ if (base_ConnectorEnd != oldBase_ConnectorEnd) {
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, BlocksPackage.NESTED_CONNECTOR_END__BASE_CONNECTOR_END, oldBase_ConnectorEnd, base_ConnectorEnd));
+ }
+ }
+ }
+ return base_ConnectorEnd;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EList<Property> getPropertyPath() {
+ if (propertyPath == null) {
+ propertyPath = new EObjectResolvingEList<Property>(Property.class, this, BlocksPackage.NESTED_CONNECTOR_END__PROPERTY_PATH);
+ }
+ return propertyPath;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Property getPropertyPath(String name, Type type) {
+ return getPropertyPath(name, type, false, null);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Property getPropertyPath(String name, Type type, boolean ignoreCase, EClass eClass) {
+ propertyPathLoop: for (Property propertyPath : getPropertyPath()) {
+ if (eClass != null && !eClass.isInstance(propertyPath)) {
+ continue propertyPathLoop;
+ }
+ if (name != null && !(ignoreCase ? name.equalsIgnoreCase(propertyPath.getName()) : name.equals(propertyPath.getName()))) {
+ continue propertyPathLoop;
+ }
+ if (type != null && !type.equals(propertyPath.getType())) {
+ continue propertyPathLoop;
+ }
+ return propertyPath;
+ }
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setBase_ConnectorEnd(ConnectorEnd newBase_ConnectorEnd) {
+ ConnectorEnd oldBase_ConnectorEnd = base_ConnectorEnd;
+ base_ConnectorEnd = newBase_ConnectorEnd;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, BlocksPackage.NESTED_CONNECTOR_END__BASE_CONNECTOR_END, oldBase_ConnectorEnd, base_ConnectorEnd));
+ }
+ }
+
+} // NestedConnectorEndImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/internal/impl/ParticipantPropertyImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/internal/impl/ParticipantPropertyImpl.java
new file mode 100755
index 0000000..656eb54
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/internal/impl/ParticipantPropertyImpl.java
@@ -0,0 +1,233 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.blocks.internal.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+import org.eclipse.papyrus.sysml.blocks.BlocksPackage;
+import org.eclipse.papyrus.sysml.blocks.ParticipantProperty;
+import org.eclipse.uml2.uml.Property;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object ' <em><b>Participant Property</b></em>'. <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.blocks.internal.impl.ParticipantPropertyImpl#getBase_Property <em>Base Property</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.blocks.internal.impl.ParticipantPropertyImpl#getEnd <em>End</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ParticipantPropertyImpl extends MinimalEObjectImpl.Container implements ParticipantProperty {
+
+ /**
+ * The cached value of the '{@link #getBase_Property() <em>Base Property</em>}' reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see #getBase_Property()
+ * @generated
+ * @ordered
+ */
+ protected Property base_Property;
+
+ /**
+ * The cached value of the '{@link #getEnd() <em>End</em>}' reference. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #getEnd()
+ * @generated
+ * @ordered
+ */
+ protected Property end;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ParticipantPropertyImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Property basicGetBase_Property() {
+ return base_Property;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Property basicGetEnd() {
+ return end;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case BlocksPackage.PARTICIPANT_PROPERTY__BASE_PROPERTY:
+ if (resolve) {
+ return getBase_Property();
+ }
+ return basicGetBase_Property();
+ case BlocksPackage.PARTICIPANT_PROPERTY__END:
+ if (resolve) {
+ return getEnd();
+ }
+ return basicGetEnd();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case BlocksPackage.PARTICIPANT_PROPERTY__BASE_PROPERTY:
+ return base_Property != null;
+ case BlocksPackage.PARTICIPANT_PROPERTY__END:
+ return end != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case BlocksPackage.PARTICIPANT_PROPERTY__BASE_PROPERTY:
+ setBase_Property((Property) newValue);
+ return;
+ case BlocksPackage.PARTICIPANT_PROPERTY__END:
+ setEnd((Property) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return BlocksPackage.Literals.PARTICIPANT_PROPERTY;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case BlocksPackage.PARTICIPANT_PROPERTY__BASE_PROPERTY:
+ setBase_Property((Property) null);
+ return;
+ case BlocksPackage.PARTICIPANT_PROPERTY__END:
+ setEnd((Property) null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Property getBase_Property() {
+ if (base_Property != null && base_Property.eIsProxy()) {
+ InternalEObject oldBase_Property = (InternalEObject) base_Property;
+ base_Property = (Property) eResolveProxy(oldBase_Property);
+ if (base_Property != oldBase_Property) {
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, BlocksPackage.PARTICIPANT_PROPERTY__BASE_PROPERTY, oldBase_Property, base_Property));
+ }
+ }
+ }
+ return base_Property;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Property getEnd() {
+ if (end != null && end.eIsProxy()) {
+ InternalEObject oldEnd = (InternalEObject) end;
+ end = (Property) eResolveProxy(oldEnd);
+ if (end != oldEnd) {
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, BlocksPackage.PARTICIPANT_PROPERTY__END, oldEnd, end));
+ }
+ }
+ }
+ return end;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setBase_Property(Property newBase_Property) {
+ Property oldBase_Property = base_Property;
+ base_Property = newBase_Property;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, BlocksPackage.PARTICIPANT_PROPERTY__BASE_PROPERTY, oldBase_Property, base_Property));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setEnd(Property newEnd) {
+ Property oldEnd = end;
+ end = newEnd;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, BlocksPackage.PARTICIPANT_PROPERTY__END, oldEnd, end));
+ }
+ }
+
+} // ParticipantPropertyImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/internal/impl/PropertySpecificTypeImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/internal/impl/PropertySpecificTypeImpl.java
new file mode 100755
index 0000000..63e6bd2
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/internal/impl/PropertySpecificTypeImpl.java
@@ -0,0 +1,169 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.blocks.internal.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+import org.eclipse.papyrus.sysml.blocks.BlocksPackage;
+import org.eclipse.papyrus.sysml.blocks.PropertySpecificType;
+import org.eclipse.uml2.uml.Classifier;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object ' <em><b>Property Specific Type</b></em>'. <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.blocks.internal.impl.PropertySpecificTypeImpl#getBase_Classifier <em>Base Classifier</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class PropertySpecificTypeImpl extends MinimalEObjectImpl.Container implements PropertySpecificType {
+
+ /**
+ * The cached value of the '{@link #getBase_Classifier() <em>Base Classifier</em>}' reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see #getBase_Classifier()
+ * @generated
+ * @ordered
+ */
+ protected Classifier base_Classifier;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected PropertySpecificTypeImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Classifier basicGetBase_Classifier() {
+ return base_Classifier;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case BlocksPackage.PROPERTY_SPECIFIC_TYPE__BASE_CLASSIFIER:
+ if (resolve) {
+ return getBase_Classifier();
+ }
+ return basicGetBase_Classifier();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case BlocksPackage.PROPERTY_SPECIFIC_TYPE__BASE_CLASSIFIER:
+ return base_Classifier != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case BlocksPackage.PROPERTY_SPECIFIC_TYPE__BASE_CLASSIFIER:
+ setBase_Classifier((Classifier) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return BlocksPackage.Literals.PROPERTY_SPECIFIC_TYPE;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case BlocksPackage.PROPERTY_SPECIFIC_TYPE__BASE_CLASSIFIER:
+ setBase_Classifier((Classifier) null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Classifier getBase_Classifier() {
+ if (base_Classifier != null && base_Classifier.eIsProxy()) {
+ InternalEObject oldBase_Classifier = (InternalEObject) base_Classifier;
+ base_Classifier = (Classifier) eResolveProxy(oldBase_Classifier);
+ if (base_Classifier != oldBase_Classifier) {
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, BlocksPackage.PROPERTY_SPECIFIC_TYPE__BASE_CLASSIFIER, oldBase_Classifier, base_Classifier));
+ }
+ }
+ }
+ return base_Classifier;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setBase_Classifier(Classifier newBase_Classifier) {
+ Classifier oldBase_Classifier = base_Classifier;
+ base_Classifier = newBase_Classifier;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, BlocksPackage.PROPERTY_SPECIFIC_TYPE__BASE_CLASSIFIER, oldBase_Classifier, base_Classifier));
+ }
+ }
+
+} // PropertySpecificTypeImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/internal/impl/UnitImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/internal/impl/UnitImpl.java
new file mode 100755
index 0000000..45e5c1a
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/internal/impl/UnitImpl.java
@@ -0,0 +1,234 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.blocks.internal.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+import org.eclipse.papyrus.sysml.blocks.BlocksPackage;
+import org.eclipse.papyrus.sysml.blocks.Dimension;
+import org.eclipse.papyrus.sysml.blocks.Unit;
+import org.eclipse.uml2.uml.InstanceSpecification;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object ' <em><b>Unit</b></em>'. <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.blocks.internal.impl.UnitImpl#getBase_InstanceSpecification <em>Base Instance Specification</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.blocks.internal.impl.UnitImpl#getDimension <em>Dimension</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class UnitImpl extends MinimalEObjectImpl.Container implements Unit {
+
+ /**
+ * The cached value of the '{@link #getBase_InstanceSpecification() <em>Base Instance Specification</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getBase_InstanceSpecification()
+ * @generated
+ * @ordered
+ */
+ protected InstanceSpecification base_InstanceSpecification;
+
+ /**
+ * The cached value of the '{@link #getDimension() <em>Dimension</em>}' reference.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #getDimension()
+ * @generated
+ * @ordered
+ */
+ protected Dimension dimension;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected UnitImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public InstanceSpecification basicGetBase_InstanceSpecification() {
+ return base_InstanceSpecification;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Dimension basicGetDimension() {
+ return dimension;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case BlocksPackage.UNIT__BASE_INSTANCE_SPECIFICATION:
+ if (resolve) {
+ return getBase_InstanceSpecification();
+ }
+ return basicGetBase_InstanceSpecification();
+ case BlocksPackage.UNIT__DIMENSION:
+ if (resolve) {
+ return getDimension();
+ }
+ return basicGetDimension();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case BlocksPackage.UNIT__BASE_INSTANCE_SPECIFICATION:
+ return base_InstanceSpecification != null;
+ case BlocksPackage.UNIT__DIMENSION:
+ return dimension != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case BlocksPackage.UNIT__BASE_INSTANCE_SPECIFICATION:
+ setBase_InstanceSpecification((InstanceSpecification) newValue);
+ return;
+ case BlocksPackage.UNIT__DIMENSION:
+ setDimension((Dimension) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return BlocksPackage.Literals.UNIT;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case BlocksPackage.UNIT__BASE_INSTANCE_SPECIFICATION:
+ setBase_InstanceSpecification((InstanceSpecification) null);
+ return;
+ case BlocksPackage.UNIT__DIMENSION:
+ setDimension((Dimension) null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public InstanceSpecification getBase_InstanceSpecification() {
+ if (base_InstanceSpecification != null && base_InstanceSpecification.eIsProxy()) {
+ InternalEObject oldBase_InstanceSpecification = (InternalEObject) base_InstanceSpecification;
+ base_InstanceSpecification = (InstanceSpecification) eResolveProxy(oldBase_InstanceSpecification);
+ if (base_InstanceSpecification != oldBase_InstanceSpecification) {
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, BlocksPackage.UNIT__BASE_INSTANCE_SPECIFICATION, oldBase_InstanceSpecification, base_InstanceSpecification));
+ }
+ }
+ }
+ return base_InstanceSpecification;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Dimension getDimension() {
+ if (dimension != null && dimension.eIsProxy()) {
+ InternalEObject oldDimension = (InternalEObject) dimension;
+ dimension = (Dimension) eResolveProxy(oldDimension);
+ if (dimension != oldDimension) {
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, BlocksPackage.UNIT__DIMENSION, oldDimension, dimension));
+ }
+ }
+ }
+ return dimension;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setBase_InstanceSpecification(InstanceSpecification newBase_InstanceSpecification) {
+ InstanceSpecification oldBase_InstanceSpecification = base_InstanceSpecification;
+ base_InstanceSpecification = newBase_InstanceSpecification;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, BlocksPackage.UNIT__BASE_INSTANCE_SPECIFICATION, oldBase_InstanceSpecification, base_InstanceSpecification));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setDimension(Dimension newDimension) {
+ Dimension oldDimension = dimension;
+ dimension = newDimension;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, BlocksPackage.UNIT__DIMENSION, oldDimension, dimension));
+ }
+ }
+
+} // UnitImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/internal/impl/ValueTypeImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/internal/impl/ValueTypeImpl.java
new file mode 100755
index 0000000..bb4dd11
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/internal/impl/ValueTypeImpl.java
@@ -0,0 +1,299 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.blocks.internal.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+import org.eclipse.papyrus.sysml.blocks.BlocksPackage;
+import org.eclipse.papyrus.sysml.blocks.Dimension;
+import org.eclipse.papyrus.sysml.blocks.Unit;
+import org.eclipse.papyrus.sysml.blocks.ValueType;
+import org.eclipse.uml2.uml.DataType;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object ' <em><b>Value Type</b></em>'. <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.blocks.internal.impl.ValueTypeImpl#getBase_DataType <em>Base Data Type</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.blocks.internal.impl.ValueTypeImpl#getUnit <em>Unit</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.blocks.internal.impl.ValueTypeImpl#getDimension <em>Dimension</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ValueTypeImpl extends MinimalEObjectImpl.Container implements ValueType {
+
+ /**
+ * The cached value of the '{@link #getBase_DataType() <em>Base Data Type</em>}' reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see #getBase_DataType()
+ * @generated
+ * @ordered
+ */
+ protected DataType base_DataType;
+
+ /**
+ * The cached value of the '{@link #getUnit() <em>Unit</em>}' reference.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #getUnit()
+ * @generated
+ * @ordered
+ */
+ protected Unit unit;
+
+ /**
+ * The cached value of the '{@link #getDimension() <em>Dimension</em>}' reference.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #getDimension()
+ * @generated
+ * @ordered
+ */
+ protected Dimension dimension;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ValueTypeImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public DataType basicGetBase_DataType() {
+ return base_DataType;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Dimension basicGetDimension() {
+ return dimension;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Unit basicGetUnit() {
+ return unit;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case BlocksPackage.VALUE_TYPE__BASE_DATA_TYPE:
+ if (resolve) {
+ return getBase_DataType();
+ }
+ return basicGetBase_DataType();
+ case BlocksPackage.VALUE_TYPE__UNIT:
+ if (resolve) {
+ return getUnit();
+ }
+ return basicGetUnit();
+ case BlocksPackage.VALUE_TYPE__DIMENSION:
+ if (resolve) {
+ return getDimension();
+ }
+ return basicGetDimension();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case BlocksPackage.VALUE_TYPE__BASE_DATA_TYPE:
+ return base_DataType != null;
+ case BlocksPackage.VALUE_TYPE__UNIT:
+ return unit != null;
+ case BlocksPackage.VALUE_TYPE__DIMENSION:
+ return dimension != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case BlocksPackage.VALUE_TYPE__BASE_DATA_TYPE:
+ setBase_DataType((DataType) newValue);
+ return;
+ case BlocksPackage.VALUE_TYPE__UNIT:
+ setUnit((Unit) newValue);
+ return;
+ case BlocksPackage.VALUE_TYPE__DIMENSION:
+ setDimension((Dimension) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return BlocksPackage.Literals.VALUE_TYPE;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case BlocksPackage.VALUE_TYPE__BASE_DATA_TYPE:
+ setBase_DataType((DataType) null);
+ return;
+ case BlocksPackage.VALUE_TYPE__UNIT:
+ setUnit((Unit) null);
+ return;
+ case BlocksPackage.VALUE_TYPE__DIMENSION:
+ setDimension((Dimension) null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public DataType getBase_DataType() {
+ if (base_DataType != null && base_DataType.eIsProxy()) {
+ InternalEObject oldBase_DataType = (InternalEObject) base_DataType;
+ base_DataType = (DataType) eResolveProxy(oldBase_DataType);
+ if (base_DataType != oldBase_DataType) {
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, BlocksPackage.VALUE_TYPE__BASE_DATA_TYPE, oldBase_DataType, base_DataType));
+ }
+ }
+ }
+ return base_DataType;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Dimension getDimension() {
+ if (dimension != null && dimension.eIsProxy()) {
+ InternalEObject oldDimension = (InternalEObject) dimension;
+ dimension = (Dimension) eResolveProxy(oldDimension);
+ if (dimension != oldDimension) {
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, BlocksPackage.VALUE_TYPE__DIMENSION, oldDimension, dimension));
+ }
+ }
+ }
+ return dimension;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Unit getUnit() {
+ if (unit != null && unit.eIsProxy()) {
+ InternalEObject oldUnit = (InternalEObject) unit;
+ unit = (Unit) eResolveProxy(oldUnit);
+ if (unit != oldUnit) {
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, BlocksPackage.VALUE_TYPE__UNIT, oldUnit, unit));
+ }
+ }
+ }
+ return unit;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setBase_DataType(DataType newBase_DataType) {
+ DataType oldBase_DataType = base_DataType;
+ base_DataType = newBase_DataType;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, BlocksPackage.VALUE_TYPE__BASE_DATA_TYPE, oldBase_DataType, base_DataType));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setDimension(Dimension newDimension) {
+ Dimension oldDimension = dimension;
+ dimension = newDimension;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, BlocksPackage.VALUE_TYPE__DIMENSION, oldDimension, dimension));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setUnit(Unit newUnit) {
+ Unit oldUnit = unit;
+ unit = newUnit;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, BlocksPackage.VALUE_TYPE__UNIT, oldUnit, unit));
+ }
+ }
+
+} // ValueTypeImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/util/BlocksAdapterFactory.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/util/BlocksAdapterFactory.java
new file mode 100755
index 0000000..6cd3b28
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/util/BlocksAdapterFactory.java
@@ -0,0 +1,320 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.blocks.util;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notifier;
+import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.sysml.blocks.BindingConnector;
+import org.eclipse.papyrus.sysml.blocks.Block;
+import org.eclipse.papyrus.sysml.blocks.BlocksPackage;
+import org.eclipse.papyrus.sysml.blocks.ConnectorProperty;
+import org.eclipse.papyrus.sysml.blocks.Dimension;
+import org.eclipse.papyrus.sysml.blocks.DistributedProperty;
+import org.eclipse.papyrus.sysml.blocks.NestedConnectorEnd;
+import org.eclipse.papyrus.sysml.blocks.ParticipantProperty;
+import org.eclipse.papyrus.sysml.blocks.PropertySpecificType;
+import org.eclipse.papyrus.sysml.blocks.Unit;
+import org.eclipse.papyrus.sysml.blocks.ValueType;
+
+/**
+ * <!-- begin-user-doc --> The <b>Adapter Factory</b> for the model. It provides
+ * an adapter <code>createXXX</code> method for each class of the model. <!--
+ * end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.blocks.BlocksPackage
+ * @generated
+ */
+public class BlocksAdapterFactory extends AdapterFactoryImpl {
+
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected static BlocksPackage modelPackage;
+
+ /**
+ * The switch that delegates to the <code>createXXX</code> methods. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected BlocksSwitch<Adapter> modelSwitch = new BlocksSwitch<Adapter>() {
+
+ @Override
+ public Adapter caseBlock(Block object) {
+ return createBlockAdapter();
+ }
+
+ @Override
+ public Adapter caseDistributedProperty(DistributedProperty object) {
+ return createDistributedPropertyAdapter();
+ }
+
+ @Override
+ public Adapter caseDimension(Dimension object) {
+ return createDimensionAdapter();
+ }
+
+ @Override
+ public Adapter caseUnit(Unit object) {
+ return createUnitAdapter();
+ }
+
+ @Override
+ public Adapter caseValueType(ValueType object) {
+ return createValueTypeAdapter();
+ }
+
+ @Override
+ public Adapter caseNestedConnectorEnd(NestedConnectorEnd object) {
+ return createNestedConnectorEndAdapter();
+ }
+
+ @Override
+ public Adapter caseParticipantProperty(ParticipantProperty object) {
+ return createParticipantPropertyAdapter();
+ }
+
+ @Override
+ public Adapter caseConnectorProperty(ConnectorProperty object) {
+ return createConnectorPropertyAdapter();
+ }
+
+ @Override
+ public Adapter caseBindingConnector(BindingConnector object) {
+ return createBindingConnectorAdapter();
+ }
+
+ @Override
+ public Adapter casePropertySpecificType(PropertySpecificType object) {
+ return createPropertySpecificTypeAdapter();
+ }
+
+ @Override
+ public Adapter defaultCase(EObject object) {
+ return createEObjectAdapter();
+ }
+ };
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public BlocksAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = BlocksPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Creates an adapter for the <code>target</code>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @param target
+ * the object to adapt.
+ * @return the adapter for the <code>target</code>.
+ * @generated
+ */
+ @Override
+ public Adapter createAdapter(Notifier target) {
+ return modelSwitch.doSwitch((EObject) target);
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.sysml.blocks.BindingConnector <em>Binding Connector</em>}'.
+ * <!-- begin-user-doc --> This default
+ * implementation returns null so that we can easily ignore cases; it's
+ * useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.sysml.blocks.BindingConnector
+ * @generated
+ */
+ public Adapter createBindingConnectorAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class ' {@link org.eclipse.papyrus.sysml.blocks.Block <em>Block</em>}'. <!--
+ * begin-user-doc --> This default implementation returns null so that we
+ * can easily ignore cases; it's useful to ignore a case when inheritance
+ * will catch all the cases anyway. <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.sysml.blocks.Block
+ * @generated
+ */
+ public Adapter createBlockAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.sysml.blocks.ConnectorProperty <em>Connector Property</em>}'.
+ * <!-- begin-user-doc --> This default
+ * implementation returns null so that we can easily ignore cases; it's
+ * useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.sysml.blocks.ConnectorProperty
+ * @generated
+ */
+ public Adapter createConnectorPropertyAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.sysml.blocks.Dimension <em>Dimension</em>}'.
+ * <!-- begin-user-doc --> This default implementation returns null so that
+ * we can easily ignore cases; it's useful to ignore a case when inheritance
+ * will catch all the cases anyway. <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.sysml.blocks.Dimension
+ * @generated
+ */
+ public Adapter createDimensionAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.sysml.blocks.DistributedProperty <em>Distributed Property</em>}'.
+ * <!-- begin-user-doc --> This default
+ * implementation returns null so that we can easily ignore cases; it's
+ * useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.sysml.blocks.DistributedProperty
+ * @generated
+ */
+ public Adapter createDistributedPropertyAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for the default case.
+ * <!-- begin-user-doc --> This
+ * default implementation returns null. <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @generated
+ */
+ public Adapter createEObjectAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.sysml.blocks.NestedConnectorEnd <em>Nested Connector End</em>}'.
+ * <!-- begin-user-doc --> This default
+ * implementation returns null so that we can easily ignore cases; it's
+ * useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.sysml.blocks.NestedConnectorEnd
+ * @generated
+ */
+ public Adapter createNestedConnectorEndAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.sysml.blocks.ParticipantProperty <em>Participant Property</em>}'.
+ * <!-- begin-user-doc --> This default
+ * implementation returns null so that we can easily ignore cases; it's
+ * useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.sysml.blocks.ParticipantProperty
+ * @generated
+ */
+ public Adapter createParticipantPropertyAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.sysml.blocks.PropertySpecificType <em>Property Specific Type</em>}'.
+ * <!-- begin-user-doc --> This default
+ * implementation returns null so that we can easily ignore cases; it's
+ * useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.sysml.blocks.PropertySpecificType
+ * @generated
+ */
+ public Adapter createPropertySpecificTypeAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class ' {@link org.eclipse.papyrus.sysml.blocks.Unit <em>Unit</em>}'. <!--
+ * begin-user-doc --> This default implementation returns null so that we
+ * can easily ignore cases; it's useful to ignore a case when inheritance
+ * will catch all the cases anyway. <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.sysml.blocks.Unit
+ * @generated
+ */
+ public Adapter createUnitAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.sysml.blocks.ValueType <em>Value Type</em>}'.
+ * <!-- begin-user-doc --> This default implementation returns null so that
+ * we can easily ignore cases; it's useful to ignore a case when inheritance
+ * will catch all the cases anyway. <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.sysml.blocks.ValueType
+ * @generated
+ */
+ public Adapter createValueTypeAdapter() {
+ return null;
+ }
+
+ /**
+ * Returns whether this factory is applicable for the type of the object.
+ * <!-- begin-user-doc --> This implementation returns <code>true</code> if
+ * the object is either the model's package or is an instance object of the
+ * model. <!-- end-user-doc -->
+ *
+ * @return whether this factory is applicable for the type of the object.
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object object) {
+ if (object == modelPackage) {
+ return true;
+ }
+ if (object instanceof EObject) {
+ return ((EObject) object).eClass().getEPackage() == modelPackage;
+ }
+ return false;
+ }
+
+} // BlocksAdapterFactory
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/util/BlocksResourceFactoryImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/util/BlocksResourceFactoryImpl.java
new file mode 100755
index 0000000..02c908d
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/util/BlocksResourceFactoryImpl.java
@@ -0,0 +1,63 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.blocks.util;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl;
+import org.eclipse.emf.ecore.xmi.XMLResource;
+
+/**
+ * <!-- begin-user-doc --> The <b>Resource Factory</b> associated with the
+ * package. <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.blocks.util.BlocksResourceImpl
+ * @generated
+ */
+public class BlocksResourceFactoryImpl extends ResourceFactoryImpl {
+
+ /**
+ * Creates an instance of the resource factory.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public BlocksResourceFactoryImpl() {
+ super();
+ }
+
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Resource createResource(URI uri) {
+ XMLResource result = new BlocksResourceImpl(uri);
+ result.getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
+ result.getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
+
+ result.getDefaultSaveOptions().put(XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE);
+
+ result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
+ result.getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
+
+ result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_LEXICAL_HANDLER, Boolean.TRUE);
+ return result;
+ }
+
+} // BlocksResourceFactoryImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/util/BlocksResourceImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/util/BlocksResourceImpl.java
new file mode 100755
index 0000000..eac79ee
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/util/BlocksResourceImpl.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.blocks.util;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl;
+
+/**
+ * <!-- begin-user-doc --> The <b>Resource </b> associated with the package.
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.blocks.util.BlocksResourceFactoryImpl
+ * @generated
+ */
+public class BlocksResourceImpl extends XMLResourceImpl {
+
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @param uri
+ * the URI of the new resource.
+ * @generated
+ */
+ public BlocksResourceImpl(URI uri) {
+ super(uri);
+ }
+
+} // BlocksResourceImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/util/BlocksSwitch.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/util/BlocksSwitch.java
new file mode 100755
index 0000000..f6cca8c
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/util/BlocksSwitch.java
@@ -0,0 +1,349 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.blocks.util;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.util.Switch;
+import org.eclipse.papyrus.sysml.blocks.BindingConnector;
+import org.eclipse.papyrus.sysml.blocks.Block;
+import org.eclipse.papyrus.sysml.blocks.BlocksPackage;
+import org.eclipse.papyrus.sysml.blocks.ConnectorProperty;
+import org.eclipse.papyrus.sysml.blocks.Dimension;
+import org.eclipse.papyrus.sysml.blocks.DistributedProperty;
+import org.eclipse.papyrus.sysml.blocks.NestedConnectorEnd;
+import org.eclipse.papyrus.sysml.blocks.ParticipantProperty;
+import org.eclipse.papyrus.sysml.blocks.PropertySpecificType;
+import org.eclipse.papyrus.sysml.blocks.Unit;
+import org.eclipse.papyrus.sysml.blocks.ValueType;
+
+/**
+ * <!-- begin-user-doc --> The <b>Switch</b> for the model's inheritance
+ * hierarchy. It supports the call {@link #doSwitch(EObject) doSwitch(object)} to invoke the <code>caseXXX</code> method for each class of the model,
+ * starting with the actual class of the object and proceeding up the
+ * inheritance hierarchy until a non-null result is returned, which is the
+ * result of the switch. <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.blocks.BlocksPackage
+ * @generated
+ */
+public class BlocksSwitch<T> extends Switch<T> {
+
+ /**
+ * The cached model package
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected static BlocksPackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public BlocksSwitch() {
+ if (modelPackage == null) {
+ modelPackage = BlocksPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Checks whether this is a switch for the given package. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @parameter ePackage the package in question.
+ * @return whether this is a switch for the given package.
+ * @generated
+ */
+ @Override
+ protected boolean isSwitchFor(EPackage ePackage) {
+ return ePackage == modelPackage;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Binding Connector</em>'.
+ * <!-- begin-user-doc --> This implementation
+ * returns null; returning a non-null result will terminate the switch. <!--
+ * end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Binding Connector</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseBindingConnector(BindingConnector object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Block</em>'.
+ * <!-- begin-user-doc --> This implementation returns
+ * null; returning a non-null result will terminate the switch. <!--
+ * end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Block</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseBlock(Block object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Connector Property</em>'.
+ * <!-- begin-user-doc --> This implementation
+ * returns null; returning a non-null result will terminate the switch. <!--
+ * end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Connector Property</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseConnectorProperty(ConnectorProperty object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Dimension</em>'.
+ * <!-- begin-user-doc --> This implementation returns
+ * null; returning a non-null result will terminate the switch. <!--
+ * end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Dimension</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseDimension(Dimension object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Distributed Property</em>'.
+ * <!-- begin-user-doc --> This
+ * implementation returns null; returning a non-null result will terminate
+ * the switch. <!-- end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Distributed Property</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseDistributedProperty(DistributedProperty object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Nested Connector End</em>'.
+ * <!-- begin-user-doc --> This
+ * implementation returns null; returning a non-null result will terminate
+ * the switch. <!-- end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Nested Connector End</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseNestedConnectorEnd(NestedConnectorEnd object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Participant Property</em>'.
+ * <!-- begin-user-doc --> This
+ * implementation returns null; returning a non-null result will terminate
+ * the switch. <!-- end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Participant Property</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseParticipantProperty(ParticipantProperty object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Property Specific Type</em>'.
+ * <!-- begin-user-doc --> This
+ * implementation returns null; returning a non-null result will terminate
+ * the switch. <!-- end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Property Specific Type</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T casePropertySpecificType(PropertySpecificType object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of ' <em>Unit</em>'. <!-- begin-user-doc --> This implementation returns null;
+ * returning a non-null result will terminate the switch. <!-- end-user-doc
+ * -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of ' <em>Unit</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseUnit(Unit object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Value Type</em>'.
+ * <!-- begin-user-doc --> This implementation returns
+ * null; returning a non-null result will terminate the switch. <!--
+ * end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Value Type</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseValueType(ValueType object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * <!-- begin-user-doc --> This implementation returns
+ * null; returning a non-null result will terminate the switch, but this is
+ * the last case anyway. <!-- end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+ * @generated
+ */
+ @Override
+ public T defaultCase(EObject object) {
+ return null;
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ @Override
+ protected T doSwitch(int classifierID, EObject theEObject) {
+ switch (classifierID) {
+ case BlocksPackage.BLOCK: {
+ Block block = (Block) theEObject;
+ T result = caseBlock(block);
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case BlocksPackage.DISTRIBUTED_PROPERTY: {
+ DistributedProperty distributedProperty = (DistributedProperty) theEObject;
+ T result = caseDistributedProperty(distributedProperty);
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case BlocksPackage.DIMENSION: {
+ Dimension dimension = (Dimension) theEObject;
+ T result = caseDimension(dimension);
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case BlocksPackage.UNIT: {
+ Unit unit = (Unit) theEObject;
+ T result = caseUnit(unit);
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case BlocksPackage.VALUE_TYPE: {
+ ValueType valueType = (ValueType) theEObject;
+ T result = caseValueType(valueType);
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case BlocksPackage.NESTED_CONNECTOR_END: {
+ NestedConnectorEnd nestedConnectorEnd = (NestedConnectorEnd) theEObject;
+ T result = caseNestedConnectorEnd(nestedConnectorEnd);
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case BlocksPackage.PARTICIPANT_PROPERTY: {
+ ParticipantProperty participantProperty = (ParticipantProperty) theEObject;
+ T result = caseParticipantProperty(participantProperty);
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case BlocksPackage.CONNECTOR_PROPERTY: {
+ ConnectorProperty connectorProperty = (ConnectorProperty) theEObject;
+ T result = caseConnectorProperty(connectorProperty);
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case BlocksPackage.BINDING_CONNECTOR: {
+ BindingConnector bindingConnector = (BindingConnector) theEObject;
+ T result = caseBindingConnector(bindingConnector);
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case BlocksPackage.PROPERTY_SPECIFIC_TYPE: {
+ PropertySpecificType propertySpecificType = (PropertySpecificType) theEObject;
+ T result = casePropertySpecificType(propertySpecificType);
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ default:
+ return defaultCase(theEObject);
+ }
+ }
+
+} // BlocksSwitch
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/util/BlocksXMLProcessor.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/util/BlocksXMLProcessor.java
new file mode 100755
index 0000000..b961101
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/util/BlocksXMLProcessor.java
@@ -0,0 +1,59 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.blocks.util;
+
+import java.util.Map;
+
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.xmi.util.XMLProcessor;
+import org.eclipse.papyrus.sysml.blocks.BlocksPackage;
+
+/**
+ * This class contains helper methods to serialize and deserialize XML documents
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class BlocksXMLProcessor extends XMLProcessor {
+
+ /**
+ * Public constructor to instantiate the helper.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public BlocksXMLProcessor() {
+ super((EPackage.Registry.INSTANCE));
+ BlocksPackage.eINSTANCE.eClass();
+ }
+
+ /**
+ * Register for "*" and "xml" file extensions the BlocksResourceFactoryImpl factory.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected Map<String, Resource.Factory> getRegistrations() {
+ if (registrations == null) {
+ super.getRegistrations();
+ registrations.put(XML_EXTENSION, new BlocksResourceFactoryImpl());
+ registrations.put(STAR_EXTENSION, new BlocksResourceFactoryImpl());
+ }
+ return registrations;
+ }
+
+} // BlocksXMLProcessor
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/constraints/ConstraintBlock.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/constraints/ConstraintBlock.java
new file mode 100755
index 0000000..de75dea
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/constraints/ConstraintBlock.java
@@ -0,0 +1,27 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.constraints;
+
+import org.eclipse.papyrus.sysml.blocks.Block;
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object ' <em><b>Constraint Block</b></em>'. <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.papyrus.sysml.constraints.ConstraintsPackage#getConstraintBlock()
+ * @model
+ * @generated
+ */
+public interface ConstraintBlock extends Block {
+} // ConstraintBlock
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/constraints/ConstraintProperty.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/constraints/ConstraintProperty.java
new file mode 100755
index 0000000..c61e9a5
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/constraints/ConstraintProperty.java
@@ -0,0 +1,63 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.constraints;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.uml2.uml.Property;
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object ' <em><b>Constraint Property</b></em> '. <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.constraints.ConstraintProperty#getBase_Property <em>Base Property</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.sysml.constraints.ConstraintsPackage#getConstraintProperty()
+ * @model
+ * @generated
+ */
+public interface ConstraintProperty extends EObject {
+
+ /**
+ * Returns the value of the '<em><b>Base Property</b></em>' reference. <!--
+ * begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Base Property</em>' reference isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Base Property</em>' reference.
+ * @see #setBase_Property(Property)
+ * @see org.eclipse.papyrus.sysml.constraints.ConstraintsPackage#getConstraintProperty_Base_Property()
+ * @model required="true" ordered="false"
+ * @generated
+ */
+ Property getBase_Property();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.sysml.constraints.ConstraintProperty#getBase_Property <em>Base Property</em>}' reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Base Property</em>' reference.
+ * @see #getBase_Property()
+ * @generated
+ */
+ void setBase_Property(Property value);
+
+} // ConstraintProperty
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/constraints/ConstraintsFactory.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/constraints/ConstraintsFactory.java
new file mode 100755
index 0000000..eb29bac
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/constraints/ConstraintsFactory.java
@@ -0,0 +1,64 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.constraints;
+
+import org.eclipse.emf.ecore.EFactory;
+
+/**
+ * <!-- begin-user-doc --> The <b>Factory</b> for the model. It provides a
+ * create method for each non-abstract class of the model. <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.constraints.ConstraintsPackage
+ * @generated
+ */
+public interface ConstraintsFactory extends EFactory {
+
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ ConstraintsFactory eINSTANCE = org.eclipse.papyrus.sysml.constraints.internal.impl.ConstraintsFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>Constraint Block</em>'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Constraint Block</em>'.
+ * @generated
+ */
+ ConstraintBlock createConstraintBlock();
+
+ /**
+ * Returns a new object of class '<em>Constraint Property</em>'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Constraint Property</em>'.
+ * @generated
+ */
+ ConstraintProperty createConstraintProperty();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the package supported by this factory.
+ * @generated
+ */
+ ConstraintsPackage getConstraintsPackage();
+
+} // ConstraintsFactory
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/constraints/ConstraintsPackage.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/constraints/ConstraintsPackage.java
new file mode 100755
index 0000000..804685b
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/constraints/ConstraintsPackage.java
@@ -0,0 +1,251 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.constraints;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.papyrus.sysml.blocks.BlocksPackage;
+
+/**
+ * <!-- begin-user-doc --> The <b>Package</b> for the model. It contains
+ * accessors for the meta objects to represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.constraints.ConstraintsFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface ConstraintsPackage extends EPackage {
+
+ /**
+ * <!-- begin-user-doc --> Defines literals for the meta objects that
+ * represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ interface Literals {
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.sysml.constraints.internal.impl.ConstraintBlockImpl <em>Constraint Block</em>}'
+ * class.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.constraints.internal.impl.ConstraintBlockImpl
+ * @see org.eclipse.papyrus.sysml.constraints.internal.impl.ConstraintsPackageImpl#getConstraintBlock()
+ * @generated
+ */
+ EClass CONSTRAINT_BLOCK = eINSTANCE.getConstraintBlock();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.sysml.constraints.internal.impl.ConstraintPropertyImpl
+ * <em>Constraint Property</em>}' class.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.constraints.internal.impl.ConstraintPropertyImpl
+ * @see org.eclipse.papyrus.sysml.constraints.internal.impl.ConstraintsPackageImpl#getConstraintProperty()
+ * @generated
+ */
+ EClass CONSTRAINT_PROPERTY = eINSTANCE.getConstraintProperty();
+
+ /**
+ * The meta object literal for the '<em><b>Base Property</b></em>' reference feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference CONSTRAINT_PROPERTY__BASE_PROPERTY = eINSTANCE.getConstraintProperty_Base_Property();
+
+ }
+
+ /**
+ * The package name.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ String eNAME = "constraints";
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ String eNS_URI = "http://www.eclipse.org/papyrus/0.7.0/SysML/Constraints";
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ String eNS_PREFIX = "Constraints";
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ ConstraintsPackage eINSTANCE = org.eclipse.papyrus.sysml.constraints.internal.impl.ConstraintsPackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.sysml.constraints.internal.impl.ConstraintBlockImpl <em>Constraint Block</em>}' class.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.constraints.internal.impl.ConstraintBlockImpl
+ * @see org.eclipse.papyrus.sysml.constraints.internal.impl.ConstraintsPackageImpl#getConstraintBlock()
+ * @generated
+ */
+ int CONSTRAINT_BLOCK = 0;
+
+ /**
+ * The feature id for the '<em><b>Is Encapsulated</b></em>' attribute. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int CONSTRAINT_BLOCK__IS_ENCAPSULATED = BlocksPackage.BLOCK__IS_ENCAPSULATED;
+
+ /**
+ * The feature id for the '<em><b>Base Class</b></em>' reference. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int CONSTRAINT_BLOCK__BASE_CLASS = BlocksPackage.BLOCK__BASE_CLASS;
+
+ /**
+ * The number of structural features of the '<em>Constraint Block</em>' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int CONSTRAINT_BLOCK_FEATURE_COUNT = BlocksPackage.BLOCK_FEATURE_COUNT + 0;
+
+ /**
+ * The number of operations of the '<em>Constraint Block</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int CONSTRAINT_BLOCK_OPERATION_COUNT = BlocksPackage.BLOCK_OPERATION_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.sysml.constraints.internal.impl.ConstraintPropertyImpl <em>Constraint Property</em>}'
+ * class.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.constraints.internal.impl.ConstraintPropertyImpl
+ * @see org.eclipse.papyrus.sysml.constraints.internal.impl.ConstraintsPackageImpl#getConstraintProperty()
+ * @generated
+ */
+ int CONSTRAINT_PROPERTY = 1;
+
+ /**
+ * The feature id for the '<em><b>Base Property</b></em>' reference. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int CONSTRAINT_PROPERTY__BASE_PROPERTY = 0;
+
+ /**
+ * The number of structural features of the '<em>Constraint Property</em>' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int CONSTRAINT_PROPERTY_FEATURE_COUNT = 1;
+
+ /**
+ * The number of operations of the '<em>Constraint Property</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int CONSTRAINT_PROPERTY_OPERATION_COUNT = 0;
+
+ /**
+ * Returns the meta object for class ' {@link org.eclipse.papyrus.sysml.constraints.ConstraintBlock
+ * <em>Constraint Block</em>}'. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @return the meta object for class '<em>Constraint Block</em>'.
+ * @see org.eclipse.papyrus.sysml.constraints.ConstraintBlock
+ * @generated
+ */
+ EClass getConstraintBlock();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.sysml.constraints.ConstraintProperty <em>Constraint Property</em>}'.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @return the meta object for class '<em>Constraint Property</em>'.
+ * @see org.eclipse.papyrus.sysml.constraints.ConstraintProperty
+ * @generated
+ */
+ EClass getConstraintProperty();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.sysml.constraints.ConstraintProperty#getBase_Property
+ * <em>Base Property</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference '<em>Base Property</em>'.
+ * @see org.eclipse.papyrus.sysml.constraints.ConstraintProperty#getBase_Property()
+ * @see #getConstraintProperty()
+ * @generated
+ */
+ EReference getConstraintProperty_Base_Property();
+
+ /**
+ * Returns the factory that creates the instances of the model. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the factory that creates the instances of the model.
+ * @generated
+ */
+ ConstraintsFactory getConstraintsFactory();
+
+} // ConstraintsPackage
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/constraints/internal/impl/ConstraintBlockImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/constraints/internal/impl/ConstraintBlockImpl.java
new file mode 100755
index 0000000..4b2251b
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/constraints/internal/impl/ConstraintBlockImpl.java
@@ -0,0 +1,49 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.constraints.internal.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.papyrus.sysml.blocks.internal.impl.BlockImpl;
+import org.eclipse.papyrus.sysml.constraints.ConstraintBlock;
+import org.eclipse.papyrus.sysml.constraints.ConstraintsPackage;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object ' <em><b>Constraint Block</b></em>'. <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class ConstraintBlockImpl extends BlockImpl implements ConstraintBlock {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ConstraintBlockImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ConstraintsPackage.Literals.CONSTRAINT_BLOCK;
+ }
+
+} // ConstraintBlockImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/constraints/internal/impl/ConstraintPropertyImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/constraints/internal/impl/ConstraintPropertyImpl.java
new file mode 100755
index 0000000..6cc11d1
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/constraints/internal/impl/ConstraintPropertyImpl.java
@@ -0,0 +1,169 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.constraints.internal.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+import org.eclipse.papyrus.sysml.constraints.ConstraintProperty;
+import org.eclipse.papyrus.sysml.constraints.ConstraintsPackage;
+import org.eclipse.uml2.uml.Property;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object ' <em><b>Constraint Property</b></em>'. <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.constraints.internal.impl.ConstraintPropertyImpl#getBase_Property <em>Base Property</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ConstraintPropertyImpl extends MinimalEObjectImpl.Container implements ConstraintProperty {
+
+ /**
+ * The cached value of the '{@link #getBase_Property() <em>Base Property</em>}' reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see #getBase_Property()
+ * @generated
+ * @ordered
+ */
+ protected Property base_Property;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ConstraintPropertyImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Property basicGetBase_Property() {
+ return base_Property;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case ConstraintsPackage.CONSTRAINT_PROPERTY__BASE_PROPERTY:
+ if (resolve) {
+ return getBase_Property();
+ }
+ return basicGetBase_Property();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ConstraintsPackage.CONSTRAINT_PROPERTY__BASE_PROPERTY:
+ return base_Property != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case ConstraintsPackage.CONSTRAINT_PROPERTY__BASE_PROPERTY:
+ setBase_Property((Property) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ConstraintsPackage.Literals.CONSTRAINT_PROPERTY;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ConstraintsPackage.CONSTRAINT_PROPERTY__BASE_PROPERTY:
+ setBase_Property((Property) null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Property getBase_Property() {
+ if (base_Property != null && base_Property.eIsProxy()) {
+ InternalEObject oldBase_Property = (InternalEObject) base_Property;
+ base_Property = (Property) eResolveProxy(oldBase_Property);
+ if (base_Property != oldBase_Property) {
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ConstraintsPackage.CONSTRAINT_PROPERTY__BASE_PROPERTY, oldBase_Property, base_Property));
+ }
+ }
+ }
+ return base_Property;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setBase_Property(Property newBase_Property) {
+ Property oldBase_Property = base_Property;
+ base_Property = newBase_Property;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, ConstraintsPackage.CONSTRAINT_PROPERTY__BASE_PROPERTY, oldBase_Property, base_Property));
+ }
+ }
+
+} // ConstraintPropertyImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/constraints/internal/impl/ConstraintsFactoryImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/constraints/internal/impl/ConstraintsFactoryImpl.java
new file mode 100755
index 0000000..59f8c99
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/constraints/internal/impl/ConstraintsFactoryImpl.java
@@ -0,0 +1,121 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.constraints.internal.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+import org.eclipse.papyrus.sysml.constraints.ConstraintBlock;
+import org.eclipse.papyrus.sysml.constraints.ConstraintProperty;
+import org.eclipse.papyrus.sysml.constraints.ConstraintsFactory;
+import org.eclipse.papyrus.sysml.constraints.ConstraintsPackage;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model <b>Factory</b>. <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+public class ConstraintsFactoryImpl extends EFactoryImpl implements ConstraintsFactory {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static ConstraintsPackage getPackage() {
+ return ConstraintsPackage.eINSTANCE;
+ }
+
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public static ConstraintsFactory init() {
+ try {
+ ConstraintsFactory theConstraintsFactory = (ConstraintsFactory) EPackage.Registry.INSTANCE.getEFactory(ConstraintsPackage.eNS_URI);
+ if (theConstraintsFactory != null) {
+ return theConstraintsFactory;
+ }
+ } catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new ConstraintsFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public ConstraintsFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ case ConstraintsPackage.CONSTRAINT_BLOCK:
+ return createConstraintBlock();
+ case ConstraintsPackage.CONSTRAINT_PROPERTY:
+ return createConstraintProperty();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ConstraintBlock createConstraintBlock() {
+ ConstraintBlockImpl constraintBlock = new ConstraintBlockImpl();
+ return constraintBlock;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ConstraintProperty createConstraintProperty() {
+ ConstraintPropertyImpl constraintProperty = new ConstraintPropertyImpl();
+ return constraintProperty;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ConstraintsPackage getConstraintsPackage() {
+ return (ConstraintsPackage) getEPackage();
+ }
+
+} // ConstraintsFactoryImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/constraints/internal/impl/ConstraintsPackageImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/constraints/internal/impl/ConstraintsPackageImpl.java
new file mode 100755
index 0000000..9d6f6d5
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/constraints/internal/impl/ConstraintsPackageImpl.java
@@ -0,0 +1,279 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.constraints.internal.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+import org.eclipse.papyrus.sysml.SysmlPackage;
+import org.eclipse.papyrus.sysml.activities.ActivitiesPackage;
+import org.eclipse.papyrus.sysml.activities.internal.impl.ActivitiesPackageImpl;
+import org.eclipse.papyrus.sysml.allocations.AllocationsPackage;
+import org.eclipse.papyrus.sysml.allocations.internal.impl.AllocationsPackageImpl;
+import org.eclipse.papyrus.sysml.blocks.BlocksPackage;
+import org.eclipse.papyrus.sysml.blocks.internal.impl.BlocksPackageImpl;
+import org.eclipse.papyrus.sysml.constraints.ConstraintBlock;
+import org.eclipse.papyrus.sysml.constraints.ConstraintProperty;
+import org.eclipse.papyrus.sysml.constraints.ConstraintsFactory;
+import org.eclipse.papyrus.sysml.constraints.ConstraintsPackage;
+import org.eclipse.papyrus.sysml.interactions.InteractionsPackage;
+import org.eclipse.papyrus.sysml.interactions.internal.impl.InteractionsPackageImpl;
+import org.eclipse.papyrus.sysml.internal.impl.SysmlPackageImpl;
+import org.eclipse.papyrus.sysml.modelelements.ModelelementsPackage;
+import org.eclipse.papyrus.sysml.modelelements.internal.impl.ModelelementsPackageImpl;
+import org.eclipse.papyrus.sysml.portandflows.PortandflowsPackage;
+import org.eclipse.papyrus.sysml.portandflows.internal.impl.PortandflowsPackageImpl;
+import org.eclipse.papyrus.sysml.requirements.RequirementsPackage;
+import org.eclipse.papyrus.sysml.requirements.internal.impl.RequirementsPackageImpl;
+import org.eclipse.papyrus.sysml.statemachines.StatemachinesPackage;
+import org.eclipse.papyrus.sysml.statemachines.internal.impl.StatemachinesPackageImpl;
+import org.eclipse.papyrus.sysml.usecases.UsecasesPackage;
+import org.eclipse.papyrus.sysml.usecases.internal.impl.UsecasesPackageImpl;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.eclipse.uml2.uml.profile.standard.StandardPackage;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model <b>Package</b>. <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+public class ConstraintsPackageImpl extends EPackageImpl implements ConstraintsPackage {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private static boolean isInited = false;
+
+ /**
+ * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+ *
+ * <p>
+ * This method is used to initialize {@link ConstraintsPackage#eINSTANCE} when that field is accessed. Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #eNS_URI
+ * @see #createPackageContents()
+ * @see #initializePackageContents()
+ * @generated
+ */
+ public static ConstraintsPackage init() {
+ if (isInited) {
+ return (ConstraintsPackage) EPackage.Registry.INSTANCE.getEPackage(ConstraintsPackage.eNS_URI);
+ }
+
+ // Obtain or create and register package
+ ConstraintsPackageImpl theConstraintsPackage = (ConstraintsPackageImpl) (EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ConstraintsPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ConstraintsPackageImpl());
+
+ isInited = true;
+
+ // Initialize simple dependencies
+ StandardPackage.eINSTANCE.eClass();
+
+ // Obtain or create and register interdependencies
+ SysmlPackageImpl theSysmlPackage = (SysmlPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(SysmlPackage.eNS_URI) instanceof SysmlPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(SysmlPackage.eNS_URI) : SysmlPackage.eINSTANCE);
+ ModelelementsPackageImpl theModelelementsPackage = (ModelelementsPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(ModelelementsPackage.eNS_URI) instanceof ModelelementsPackageImpl ? EPackage.Registry.INSTANCE
+ .getEPackage(ModelelementsPackage.eNS_URI) : ModelelementsPackage.eINSTANCE);
+ BlocksPackageImpl theBlocksPackage = (BlocksPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(BlocksPackage.eNS_URI) instanceof BlocksPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(BlocksPackage.eNS_URI) : BlocksPackage.eINSTANCE);
+ PortandflowsPackageImpl thePortandflowsPackage = (PortandflowsPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(PortandflowsPackage.eNS_URI) instanceof PortandflowsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(PortandflowsPackage.eNS_URI)
+ : PortandflowsPackage.eINSTANCE);
+ ActivitiesPackageImpl theActivitiesPackage = (ActivitiesPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(ActivitiesPackage.eNS_URI) instanceof ActivitiesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ActivitiesPackage.eNS_URI)
+ : ActivitiesPackage.eINSTANCE);
+ AllocationsPackageImpl theAllocationsPackage = (AllocationsPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(AllocationsPackage.eNS_URI) instanceof AllocationsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(AllocationsPackage.eNS_URI)
+ : AllocationsPackage.eINSTANCE);
+ RequirementsPackageImpl theRequirementsPackage = (RequirementsPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(RequirementsPackage.eNS_URI) instanceof RequirementsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(RequirementsPackage.eNS_URI)
+ : RequirementsPackage.eINSTANCE);
+ InteractionsPackageImpl theInteractionsPackage = (InteractionsPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(InteractionsPackage.eNS_URI) instanceof InteractionsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(InteractionsPackage.eNS_URI)
+ : InteractionsPackage.eINSTANCE);
+ StatemachinesPackageImpl theStatemachinesPackage = (StatemachinesPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(StatemachinesPackage.eNS_URI) instanceof StatemachinesPackageImpl ? EPackage.Registry.INSTANCE
+ .getEPackage(StatemachinesPackage.eNS_URI) : StatemachinesPackage.eINSTANCE);
+ UsecasesPackageImpl theUsecasesPackage = (UsecasesPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(UsecasesPackage.eNS_URI) instanceof UsecasesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(UsecasesPackage.eNS_URI)
+ : UsecasesPackage.eINSTANCE);
+
+ // Create package meta-data objects
+ theConstraintsPackage.createPackageContents();
+ theSysmlPackage.createPackageContents();
+ theModelelementsPackage.createPackageContents();
+ theBlocksPackage.createPackageContents();
+ thePortandflowsPackage.createPackageContents();
+ theActivitiesPackage.createPackageContents();
+ theAllocationsPackage.createPackageContents();
+ theRequirementsPackage.createPackageContents();
+ theInteractionsPackage.createPackageContents();
+ theStatemachinesPackage.createPackageContents();
+ theUsecasesPackage.createPackageContents();
+
+ // Initialize created meta-data
+ theConstraintsPackage.initializePackageContents();
+ theSysmlPackage.initializePackageContents();
+ theModelelementsPackage.initializePackageContents();
+ theBlocksPackage.initializePackageContents();
+ thePortandflowsPackage.initializePackageContents();
+ theActivitiesPackage.initializePackageContents();
+ theAllocationsPackage.initializePackageContents();
+ theRequirementsPackage.initializePackageContents();
+ theInteractionsPackage.initializePackageContents();
+ theStatemachinesPackage.initializePackageContents();
+ theUsecasesPackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theConstraintsPackage.freeze();
+
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(ConstraintsPackage.eNS_URI, theConstraintsPackage);
+ return theConstraintsPackage;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass constraintBlockEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass constraintPropertyEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private boolean isCreated = false;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Creates an instance of the model <b>Package</b>, registered with {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the
+ * package
+ * package URI value.
+ * <p>
+ * Note: the correct way to create the package is via the static factory method {@link #init init()}, which also performs initialization of the package, or returns the registered package, if one already exists. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.emf.ecore.EPackage.Registry
+ * @see org.eclipse.papyrus.sysml.constraints.ConstraintsPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private ConstraintsPackageImpl() {
+ super(eNS_URI, ConstraintsFactory.eINSTANCE);
+ }
+
+ /**
+ * Creates the meta-model objects for the package. This method is
+ * guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void createPackageContents() {
+ if (isCreated) {
+ return;
+ }
+ isCreated = true;
+
+ // Create classes and their features
+ constraintBlockEClass = createEClass(CONSTRAINT_BLOCK);
+
+ constraintPropertyEClass = createEClass(CONSTRAINT_PROPERTY);
+ createEReference(constraintPropertyEClass, CONSTRAINT_PROPERTY__BASE_PROPERTY);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EClass getConstraintBlock() {
+ return constraintBlockEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EClass getConstraintProperty() {
+ return constraintPropertyEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getConstraintProperty_Base_Property() {
+ return (EReference) constraintPropertyEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ConstraintsFactory getConstraintsFactory() {
+ return (ConstraintsFactory) getEFactoryInstance();
+ }
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void initializePackageContents() {
+ if (isInitialized) {
+ return;
+ }
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Obtain other dependent packages
+ BlocksPackage theBlocksPackage = (BlocksPackage) EPackage.Registry.INSTANCE.getEPackage(BlocksPackage.eNS_URI);
+ UMLPackage theUMLPackage = (UMLPackage) EPackage.Registry.INSTANCE.getEPackage(UMLPackage.eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+ constraintBlockEClass.getESuperTypes().add(theBlocksPackage.getBlock());
+
+ // Initialize classes, features, and operations; add parameters
+ initEClass(constraintBlockEClass, ConstraintBlock.class, "ConstraintBlock", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+ initEClass(constraintPropertyEClass, ConstraintProperty.class, "ConstraintProperty", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getConstraintProperty_Base_Property(), theUMLPackage.getProperty(), null, "base_Property", null, 1, 1, ConstraintProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE,
+ !IS_DERIVED, !IS_ORDERED);
+ }
+
+} // ConstraintsPackageImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/constraints/util/ConstraintsAdapterFactory.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/constraints/util/ConstraintsAdapterFactory.java
new file mode 100755
index 0000000..864c802
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/constraints/util/ConstraintsAdapterFactory.java
@@ -0,0 +1,176 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.constraints.util;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notifier;
+import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.sysml.blocks.Block;
+import org.eclipse.papyrus.sysml.constraints.ConstraintBlock;
+import org.eclipse.papyrus.sysml.constraints.ConstraintProperty;
+import org.eclipse.papyrus.sysml.constraints.ConstraintsPackage;
+
+/**
+ * <!-- begin-user-doc --> The <b>Adapter Factory</b> for the model. It provides
+ * an adapter <code>createXXX</code> method for each class of the model. <!--
+ * end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.constraints.ConstraintsPackage
+ * @generated
+ */
+public class ConstraintsAdapterFactory extends AdapterFactoryImpl {
+
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected static ConstraintsPackage modelPackage;
+
+ /**
+ * The switch that delegates to the <code>createXXX</code> methods. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ConstraintsSwitch<Adapter> modelSwitch = new ConstraintsSwitch<Adapter>() {
+
+ @Override
+ public Adapter caseConstraintBlock(ConstraintBlock object) {
+ return createConstraintBlockAdapter();
+ }
+
+ @Override
+ public Adapter caseConstraintProperty(ConstraintProperty object) {
+ return createConstraintPropertyAdapter();
+ }
+
+ @Override
+ public Adapter caseBlock(Block object) {
+ return createBlockAdapter();
+ }
+
+ @Override
+ public Adapter defaultCase(EObject object) {
+ return createEObjectAdapter();
+ }
+ };
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public ConstraintsAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = ConstraintsPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Creates an adapter for the <code>target</code>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @param target
+ * the object to adapt.
+ * @return the adapter for the <code>target</code>.
+ * @generated
+ */
+ @Override
+ public Adapter createAdapter(Notifier target) {
+ return modelSwitch.doSwitch((EObject) target);
+ }
+
+ /**
+ * Creates a new adapter for an object of class ' {@link org.eclipse.papyrus.sysml.blocks.Block <em>Block</em>}'. <!--
+ * begin-user-doc --> This default implementation returns null so that we
+ * can easily ignore cases; it's useful to ignore a case when inheritance
+ * will catch all the cases anyway. <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.sysml.blocks.Block
+ * @generated
+ */
+ public Adapter createBlockAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.sysml.constraints.ConstraintBlock <em>Constraint Block</em>}'.
+ * <!-- begin-user-doc --> This default
+ * implementation returns null so that we can easily ignore cases; it's
+ * useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.sysml.constraints.ConstraintBlock
+ * @generated
+ */
+ public Adapter createConstraintBlockAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.sysml.constraints.ConstraintProperty <em>Constraint Property</em>}'.
+ * <!-- begin-user-doc --> This default
+ * implementation returns null so that we can easily ignore cases; it's
+ * useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.sysml.constraints.ConstraintProperty
+ * @generated
+ */
+ public Adapter createConstraintPropertyAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for the default case.
+ * <!-- begin-user-doc --> This
+ * default implementation returns null. <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @generated
+ */
+ public Adapter createEObjectAdapter() {
+ return null;
+ }
+
+ /**
+ * Returns whether this factory is applicable for the type of the object.
+ * <!-- begin-user-doc --> This implementation returns <code>true</code> if
+ * the object is either the model's package or is an instance object of the
+ * model. <!-- end-user-doc -->
+ *
+ * @return whether this factory is applicable for the type of the object.
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object object) {
+ if (object == modelPackage) {
+ return true;
+ }
+ if (object instanceof EObject) {
+ return ((EObject) object).eClass().getEPackage() == modelPackage;
+ }
+ return false;
+ }
+
+} // ConstraintsAdapterFactory
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/constraints/util/ConstraintsResourceFactoryImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/constraints/util/ConstraintsResourceFactoryImpl.java
new file mode 100755
index 0000000..89fd8be
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/constraints/util/ConstraintsResourceFactoryImpl.java
@@ -0,0 +1,63 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.constraints.util;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl;
+import org.eclipse.emf.ecore.xmi.XMLResource;
+
+/**
+ * <!-- begin-user-doc --> The <b>Resource Factory</b> associated with the
+ * package. <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.constraints.util.ConstraintsResourceImpl
+ * @generated
+ */
+public class ConstraintsResourceFactoryImpl extends ResourceFactoryImpl {
+
+ /**
+ * Creates an instance of the resource factory.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public ConstraintsResourceFactoryImpl() {
+ super();
+ }
+
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Resource createResource(URI uri) {
+ XMLResource result = new ConstraintsResourceImpl(uri);
+ result.getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
+ result.getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
+
+ result.getDefaultSaveOptions().put(XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE);
+
+ result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
+ result.getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
+
+ result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_LEXICAL_HANDLER, Boolean.TRUE);
+ return result;
+ }
+
+} // ConstraintsResourceFactoryImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/constraints/util/ConstraintsResourceImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/constraints/util/ConstraintsResourceImpl.java
new file mode 100755
index 0000000..deaeea3
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/constraints/util/ConstraintsResourceImpl.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.constraints.util;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl;
+
+/**
+ * <!-- begin-user-doc --> The <b>Resource </b> associated with the package.
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.constraints.util.ConstraintsResourceFactoryImpl
+ * @generated
+ */
+public class ConstraintsResourceImpl extends XMLResourceImpl {
+
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @param uri
+ * the URI of the new resource.
+ * @generated
+ */
+ public ConstraintsResourceImpl(URI uri) {
+ super(uri);
+ }
+
+} // ConstraintsResourceImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/constraints/util/ConstraintsSwitch.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/constraints/util/ConstraintsSwitch.java
new file mode 100755
index 0000000..50ae3c1
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/constraints/util/ConstraintsSwitch.java
@@ -0,0 +1,170 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.constraints.util;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.util.Switch;
+import org.eclipse.papyrus.sysml.blocks.Block;
+import org.eclipse.papyrus.sysml.constraints.ConstraintBlock;
+import org.eclipse.papyrus.sysml.constraints.ConstraintProperty;
+import org.eclipse.papyrus.sysml.constraints.ConstraintsPackage;
+
+/**
+ * <!-- begin-user-doc --> The <b>Switch</b> for the model's inheritance
+ * hierarchy. It supports the call {@link #doSwitch(EObject) doSwitch(object)} to invoke the <code>caseXXX</code> method for each class of the model,
+ * starting with the actual class of the object and proceeding up the
+ * inheritance hierarchy until a non-null result is returned, which is the
+ * result of the switch. <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.constraints.ConstraintsPackage
+ * @generated
+ */
+public class ConstraintsSwitch<T> extends Switch<T> {
+
+ /**
+ * The cached model package
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected static ConstraintsPackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public ConstraintsSwitch() {
+ if (modelPackage == null) {
+ modelPackage = ConstraintsPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Checks whether this is a switch for the given package. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @parameter ePackage the package in question.
+ * @return whether this is a switch for the given package.
+ * @generated
+ */
+ @Override
+ protected boolean isSwitchFor(EPackage ePackage) {
+ return ePackage == modelPackage;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Block</em>'.
+ * <!-- begin-user-doc --> This implementation returns
+ * null; returning a non-null result will terminate the switch. <!--
+ * end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Block</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseBlock(Block object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Constraint Block</em>'.
+ * <!-- begin-user-doc --> This implementation
+ * returns null; returning a non-null result will terminate the switch. <!--
+ * end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Constraint Block</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseConstraintBlock(ConstraintBlock object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Constraint Property</em>'.
+ * <!-- begin-user-doc --> This
+ * implementation returns null; returning a non-null result will terminate
+ * the switch. <!-- end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Constraint Property</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseConstraintProperty(ConstraintProperty object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * <!-- begin-user-doc --> This implementation returns
+ * null; returning a non-null result will terminate the switch, but this is
+ * the last case anyway. <!-- end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+ * @generated
+ */
+ @Override
+ public T defaultCase(EObject object) {
+ return null;
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ @Override
+ protected T doSwitch(int classifierID, EObject theEObject) {
+ switch (classifierID) {
+ case ConstraintsPackage.CONSTRAINT_BLOCK: {
+ ConstraintBlock constraintBlock = (ConstraintBlock) theEObject;
+ T result = caseConstraintBlock(constraintBlock);
+ if (result == null) {
+ result = caseBlock(constraintBlock);
+ }
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case ConstraintsPackage.CONSTRAINT_PROPERTY: {
+ ConstraintProperty constraintProperty = (ConstraintProperty) theEObject;
+ T result = caseConstraintProperty(constraintProperty);
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ default:
+ return defaultCase(theEObject);
+ }
+ }
+
+} // ConstraintsSwitch
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/constraints/util/ConstraintsXMLProcessor.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/constraints/util/ConstraintsXMLProcessor.java
new file mode 100755
index 0000000..b265558
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/constraints/util/ConstraintsXMLProcessor.java
@@ -0,0 +1,60 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.constraints.util;
+
+import java.util.Map;
+
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.xmi.util.XMLProcessor;
+import org.eclipse.papyrus.sysml.constraints.ConstraintsPackage;
+
+/**
+ * This class contains helper methods to serialize and deserialize XML documents
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class ConstraintsXMLProcessor extends XMLProcessor {
+
+ /**
+ * Public constructor to instantiate the helper.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ConstraintsXMLProcessor() {
+ super((EPackage.Registry.INSTANCE));
+ ConstraintsPackage.eINSTANCE.eClass();
+ }
+
+ /**
+ * Register for "*" and "xml" file extensions the ConstraintsResourceFactoryImpl factory.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected Map<String, Resource.Factory> getRegistrations() {
+ if (registrations == null) {
+ super.getRegistrations();
+ registrations.put(XML_EXTENSION, new ConstraintsResourceFactoryImpl());
+ registrations.put(STAR_EXTENSION, new ConstraintsResourceFactoryImpl());
+ }
+ return registrations;
+ }
+
+} // ConstraintsXMLProcessor
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/interactions/InteractionsFactory.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/interactions/InteractionsFactory.java
new file mode 100755
index 0000000..72bce8c
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/interactions/InteractionsFactory.java
@@ -0,0 +1,46 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.interactions;
+
+import org.eclipse.emf.ecore.EFactory;
+
+/**
+ * <!-- begin-user-doc --> The <b>Factory</b> for the model. It provides a
+ * create method for each non-abstract class of the model. <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.interactions.InteractionsPackage
+ * @generated
+ */
+public interface InteractionsFactory extends EFactory {
+
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ InteractionsFactory eINSTANCE = org.eclipse.papyrus.sysml.interactions.internal.impl.InteractionsFactoryImpl.init();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the package supported by this factory.
+ * @generated
+ */
+ InteractionsPackage getInteractionsPackage();
+
+} // InteractionsFactory
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/interactions/InteractionsPackage.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/interactions/InteractionsPackage.java
new file mode 100755
index 0000000..d96e6ef
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/interactions/InteractionsPackage.java
@@ -0,0 +1,126 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.interactions;
+
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EPackage;
+
+/**
+ * <!-- begin-user-doc --> The <b>Package</b> for the model. It contains
+ * accessors for the meta objects to represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.interactions.InteractionsFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface InteractionsPackage extends EPackage {
+
+ /**
+ * <!-- begin-user-doc --> Defines literals for the meta objects that
+ * represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ interface Literals {
+
+ /**
+ * The meta object literal for the '<em>Dummy</em>' data type. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see java.lang.String
+ * @see org.eclipse.papyrus.sysml.interactions.internal.impl.InteractionsPackageImpl#getDummy()
+ * @generated
+ */
+ EDataType DUMMY = eINSTANCE.getDummy();
+
+ }
+
+ /**
+ * The package name.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ String eNAME = "interactions";
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ String eNS_URI = "http://www.eclipse.org/papyrus/0.7.0/SysML/Interactions";
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ String eNS_PREFIX = "Interactions";
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ InteractionsPackage eINSTANCE = org.eclipse.papyrus.sysml.interactions.internal.impl.InteractionsPackageImpl.init();
+
+ /**
+ * The meta object id for the '<em>Dummy</em>' data type. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see java.lang.String
+ * @see org.eclipse.papyrus.sysml.interactions.internal.impl.InteractionsPackageImpl#getDummy()
+ * @generated
+ */
+ int DUMMY = 0;
+
+ /**
+ * Returns the meta object for data type '{@link java.lang.String <em>Dummy</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for data type '<em>Dummy</em>'.
+ * @see java.lang.String
+ * @model instanceClass="java.lang.String"
+ * @generated
+ */
+ EDataType getDummy();
+
+ /**
+ * Returns the factory that creates the instances of the model. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the factory that creates the instances of the model.
+ * @generated
+ */
+ InteractionsFactory getInteractionsFactory();
+
+} // InteractionsPackage
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/interactions/internal/impl/InteractionsFactoryImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/interactions/internal/impl/InteractionsFactoryImpl.java
new file mode 100755
index 0000000..eab3174
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/interactions/internal/impl/InteractionsFactoryImpl.java
@@ -0,0 +1,144 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.interactions.internal.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+import org.eclipse.papyrus.sysml.interactions.InteractionsFactory;
+import org.eclipse.papyrus.sysml.interactions.InteractionsPackage;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model <b>Factory</b>. <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+public class InteractionsFactoryImpl extends EFactoryImpl implements InteractionsFactory {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static InteractionsPackage getPackage() {
+ return InteractionsPackage.eINSTANCE;
+ }
+
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public static InteractionsFactory init() {
+ try {
+ InteractionsFactory theInteractionsFactory = (InteractionsFactory) EPackage.Registry.INSTANCE.getEFactory(InteractionsPackage.eNS_URI);
+ if (theInteractionsFactory != null) {
+ return theInteractionsFactory;
+ }
+ } catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new InteractionsFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public InteractionsFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public String convertDummyToString(EDataType eDataType, Object instanceValue) {
+ return super.convertToString(eDataType, instanceValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String convertToString(EDataType eDataType, Object instanceValue) {
+ switch (eDataType.getClassifierID()) {
+ case InteractionsPackage.DUMMY:
+ return convertDummyToString(eDataType, instanceValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public String createDummyFromString(EDataType eDataType, String initialValue) {
+ return (String) super.createFromString(eDataType, initialValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object createFromString(EDataType eDataType, String initialValue) {
+ switch (eDataType.getClassifierID()) {
+ case InteractionsPackage.DUMMY:
+ return createDummyFromString(eDataType, initialValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public InteractionsPackage getInteractionsPackage() {
+ return (InteractionsPackage) getEPackage();
+ }
+
+} // InteractionsFactoryImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/interactions/internal/impl/InteractionsPackageImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/interactions/internal/impl/InteractionsPackageImpl.java
new file mode 100755
index 0000000..dc2e8ab
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/interactions/internal/impl/InteractionsPackageImpl.java
@@ -0,0 +1,233 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.interactions.internal.impl;
+
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+import org.eclipse.papyrus.sysml.SysmlPackage;
+import org.eclipse.papyrus.sysml.activities.ActivitiesPackage;
+import org.eclipse.papyrus.sysml.activities.internal.impl.ActivitiesPackageImpl;
+import org.eclipse.papyrus.sysml.allocations.AllocationsPackage;
+import org.eclipse.papyrus.sysml.allocations.internal.impl.AllocationsPackageImpl;
+import org.eclipse.papyrus.sysml.blocks.BlocksPackage;
+import org.eclipse.papyrus.sysml.blocks.internal.impl.BlocksPackageImpl;
+import org.eclipse.papyrus.sysml.constraints.ConstraintsPackage;
+import org.eclipse.papyrus.sysml.constraints.internal.impl.ConstraintsPackageImpl;
+import org.eclipse.papyrus.sysml.interactions.InteractionsFactory;
+import org.eclipse.papyrus.sysml.interactions.InteractionsPackage;
+import org.eclipse.papyrus.sysml.internal.impl.SysmlPackageImpl;
+import org.eclipse.papyrus.sysml.modelelements.ModelelementsPackage;
+import org.eclipse.papyrus.sysml.modelelements.internal.impl.ModelelementsPackageImpl;
+import org.eclipse.papyrus.sysml.portandflows.PortandflowsPackage;
+import org.eclipse.papyrus.sysml.portandflows.internal.impl.PortandflowsPackageImpl;
+import org.eclipse.papyrus.sysml.requirements.RequirementsPackage;
+import org.eclipse.papyrus.sysml.requirements.internal.impl.RequirementsPackageImpl;
+import org.eclipse.papyrus.sysml.statemachines.StatemachinesPackage;
+import org.eclipse.papyrus.sysml.statemachines.internal.impl.StatemachinesPackageImpl;
+import org.eclipse.papyrus.sysml.usecases.UsecasesPackage;
+import org.eclipse.papyrus.sysml.usecases.internal.impl.UsecasesPackageImpl;
+import org.eclipse.uml2.uml.profile.standard.StandardPackage;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model <b>Package</b>. <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+public class InteractionsPackageImpl extends EPackageImpl implements InteractionsPackage {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private static boolean isInited = false;
+
+ /**
+ * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+ *
+ * <p>
+ * This method is used to initialize {@link InteractionsPackage#eINSTANCE} when that field is accessed. Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @see #eNS_URI
+ * @see #createPackageContents()
+ * @see #initializePackageContents()
+ * @generated
+ */
+ public static InteractionsPackage init() {
+ if (isInited) {
+ return (InteractionsPackage) EPackage.Registry.INSTANCE.getEPackage(InteractionsPackage.eNS_URI);
+ }
+
+ // Obtain or create and register package
+ InteractionsPackageImpl theInteractionsPackage = (InteractionsPackageImpl) (EPackage.Registry.INSTANCE.get(eNS_URI) instanceof InteractionsPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new InteractionsPackageImpl());
+
+ isInited = true;
+
+ // Initialize simple dependencies
+ StandardPackage.eINSTANCE.eClass();
+
+ // Obtain or create and register interdependencies
+ SysmlPackageImpl theSysmlPackage = (SysmlPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(SysmlPackage.eNS_URI) instanceof SysmlPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(SysmlPackage.eNS_URI) : SysmlPackage.eINSTANCE);
+ ModelelementsPackageImpl theModelelementsPackage = (ModelelementsPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(ModelelementsPackage.eNS_URI) instanceof ModelelementsPackageImpl ? EPackage.Registry.INSTANCE
+ .getEPackage(ModelelementsPackage.eNS_URI) : ModelelementsPackage.eINSTANCE);
+ BlocksPackageImpl theBlocksPackage = (BlocksPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(BlocksPackage.eNS_URI) instanceof BlocksPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(BlocksPackage.eNS_URI) : BlocksPackage.eINSTANCE);
+ PortandflowsPackageImpl thePortandflowsPackage = (PortandflowsPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(PortandflowsPackage.eNS_URI) instanceof PortandflowsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(PortandflowsPackage.eNS_URI)
+ : PortandflowsPackage.eINSTANCE);
+ ConstraintsPackageImpl theConstraintsPackage = (ConstraintsPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(ConstraintsPackage.eNS_URI) instanceof ConstraintsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ConstraintsPackage.eNS_URI)
+ : ConstraintsPackage.eINSTANCE);
+ ActivitiesPackageImpl theActivitiesPackage = (ActivitiesPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(ActivitiesPackage.eNS_URI) instanceof ActivitiesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ActivitiesPackage.eNS_URI)
+ : ActivitiesPackage.eINSTANCE);
+ AllocationsPackageImpl theAllocationsPackage = (AllocationsPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(AllocationsPackage.eNS_URI) instanceof AllocationsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(AllocationsPackage.eNS_URI)
+ : AllocationsPackage.eINSTANCE);
+ RequirementsPackageImpl theRequirementsPackage = (RequirementsPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(RequirementsPackage.eNS_URI) instanceof RequirementsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(RequirementsPackage.eNS_URI)
+ : RequirementsPackage.eINSTANCE);
+ StatemachinesPackageImpl theStatemachinesPackage = (StatemachinesPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(StatemachinesPackage.eNS_URI) instanceof StatemachinesPackageImpl ? EPackage.Registry.INSTANCE
+ .getEPackage(StatemachinesPackage.eNS_URI) : StatemachinesPackage.eINSTANCE);
+ UsecasesPackageImpl theUsecasesPackage = (UsecasesPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(UsecasesPackage.eNS_URI) instanceof UsecasesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(UsecasesPackage.eNS_URI)
+ : UsecasesPackage.eINSTANCE);
+
+ // Create package meta-data objects
+ theInteractionsPackage.createPackageContents();
+ theSysmlPackage.createPackageContents();
+ theModelelementsPackage.createPackageContents();
+ theBlocksPackage.createPackageContents();
+ thePortandflowsPackage.createPackageContents();
+ theConstraintsPackage.createPackageContents();
+ theActivitiesPackage.createPackageContents();
+ theAllocationsPackage.createPackageContents();
+ theRequirementsPackage.createPackageContents();
+ theStatemachinesPackage.createPackageContents();
+ theUsecasesPackage.createPackageContents();
+
+ // Initialize created meta-data
+ theInteractionsPackage.initializePackageContents();
+ theSysmlPackage.initializePackageContents();
+ theModelelementsPackage.initializePackageContents();
+ theBlocksPackage.initializePackageContents();
+ thePortandflowsPackage.initializePackageContents();
+ theConstraintsPackage.initializePackageContents();
+ theActivitiesPackage.initializePackageContents();
+ theAllocationsPackage.initializePackageContents();
+ theRequirementsPackage.initializePackageContents();
+ theStatemachinesPackage.initializePackageContents();
+ theUsecasesPackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theInteractionsPackage.freeze();
+
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(InteractionsPackage.eNS_URI, theInteractionsPackage);
+ return theInteractionsPackage;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EDataType dummyEDataType = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private boolean isCreated = false;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Creates an instance of the model <b>Package</b>, registered with {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the
+ * package
+ * package URI value.
+ * <p>
+ * Note: the correct way to create the package is via the static factory method {@link #init init()}, which also performs initialization of the package, or returns the registered package, if one already exists. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.emf.ecore.EPackage.Registry
+ * @see org.eclipse.papyrus.sysml.interactions.InteractionsPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private InteractionsPackageImpl() {
+ super(eNS_URI, InteractionsFactory.eINSTANCE);
+ }
+
+ /**
+ * Creates the meta-model objects for the package. This method is
+ * guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void createPackageContents() {
+ if (isCreated) {
+ return;
+ }
+ isCreated = true;
+
+ // Create data types
+ dummyEDataType = createEDataType(DUMMY);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EDataType getDummy() {
+ return dummyEDataType;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public InteractionsFactory getInteractionsFactory() {
+ return (InteractionsFactory) getEFactoryInstance();
+ }
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void initializePackageContents() {
+ if (isInitialized) {
+ return;
+ }
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Initialize data types
+ initEDataType(dummyEDataType, String.class, "Dummy", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS);
+ }
+
+} // InteractionsPackageImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/interactions/util/InteractionsResourceFactoryImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/interactions/util/InteractionsResourceFactoryImpl.java
new file mode 100755
index 0000000..a21051c
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/interactions/util/InteractionsResourceFactoryImpl.java
@@ -0,0 +1,53 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.interactions.util;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl;
+
+/**
+ * <!-- begin-user-doc --> The <b>Resource Factory</b> associated with the
+ * package. <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.interactions.util.InteractionsResourceImpl
+ * @generated
+ */
+public class InteractionsResourceFactoryImpl extends ResourceFactoryImpl {
+
+ /**
+ * Creates an instance of the resource factory.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public InteractionsResourceFactoryImpl() {
+ super();
+ }
+
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Resource createResource(URI uri) {
+ Resource result = new InteractionsResourceImpl(uri);
+ return result;
+ }
+
+} // InteractionsResourceFactoryImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/interactions/util/InteractionsResourceImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/interactions/util/InteractionsResourceImpl.java
new file mode 100755
index 0000000..8f285e5
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/interactions/util/InteractionsResourceImpl.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.interactions.util;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl;
+
+/**
+ * <!-- begin-user-doc --> The <b>Resource </b> associated with the package.
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.interactions.util.InteractionsResourceFactoryImpl
+ * @generated
+ */
+public class InteractionsResourceImpl extends XMLResourceImpl {
+
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @param uri
+ * the URI of the new resource.
+ * @generated
+ */
+ public InteractionsResourceImpl(URI uri) {
+ super(uri);
+ }
+
+} // InteractionsResourceImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/interactions/util/InteractionsXMLProcessor.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/interactions/util/InteractionsXMLProcessor.java
new file mode 100755
index 0000000..05e64f2
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/interactions/util/InteractionsXMLProcessor.java
@@ -0,0 +1,60 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.interactions.util;
+
+import java.util.Map;
+
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.xmi.util.XMLProcessor;
+import org.eclipse.papyrus.sysml.interactions.InteractionsPackage;
+
+/**
+ * This class contains helper methods to serialize and deserialize XML documents
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class InteractionsXMLProcessor extends XMLProcessor {
+
+ /**
+ * Public constructor to instantiate the helper.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public InteractionsXMLProcessor() {
+ super((EPackage.Registry.INSTANCE));
+ InteractionsPackage.eINSTANCE.eClass();
+ }
+
+ /**
+ * Register for "*" and "xml" file extensions the InteractionsResourceFactoryImpl factory.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected Map<String, Resource.Factory> getRegistrations() {
+ if (registrations == null) {
+ super.getRegistrations();
+ registrations.put(XML_EXTENSION, new InteractionsResourceFactoryImpl());
+ registrations.put(STAR_EXTENSION, new InteractionsResourceFactoryImpl());
+ }
+ return registrations;
+ }
+
+} // InteractionsXMLProcessor
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/internal/impl/SysmlFactoryImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/internal/impl/SysmlFactoryImpl.java
new file mode 100755
index 0000000..fdf74db
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/internal/impl/SysmlFactoryImpl.java
@@ -0,0 +1,144 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.internal.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+import org.eclipse.papyrus.sysml.SysmlFactory;
+import org.eclipse.papyrus.sysml.SysmlPackage;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model <b>Factory</b>. <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+public class SysmlFactoryImpl extends EFactoryImpl implements SysmlFactory {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static SysmlPackage getPackage() {
+ return SysmlPackage.eINSTANCE;
+ }
+
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public static SysmlFactory init() {
+ try {
+ SysmlFactory theSysmlFactory = (SysmlFactory) EPackage.Registry.INSTANCE.getEFactory(SysmlPackage.eNS_URI);
+ if (theSysmlFactory != null) {
+ return theSysmlFactory;
+ }
+ } catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new SysmlFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public SysmlFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public String convertDummyToString(EDataType eDataType, Object instanceValue) {
+ return super.convertToString(eDataType, instanceValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String convertToString(EDataType eDataType, Object instanceValue) {
+ switch (eDataType.getClassifierID()) {
+ case SysmlPackage.DUMMY:
+ return convertDummyToString(eDataType, instanceValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public String createDummyFromString(EDataType eDataType, String initialValue) {
+ return (String) super.createFromString(eDataType, initialValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object createFromString(EDataType eDataType, String initialValue) {
+ switch (eDataType.getClassifierID()) {
+ case SysmlPackage.DUMMY:
+ return createDummyFromString(eDataType, initialValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public SysmlPackage getSysmlPackage() {
+ return (SysmlPackage) getEPackage();
+ }
+
+} // SysmlFactoryImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/internal/impl/SysmlPackageImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/internal/impl/SysmlPackageImpl.java
new file mode 100755
index 0000000..8eec2b0
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/internal/impl/SysmlPackageImpl.java
@@ -0,0 +1,260 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.internal.impl;
+
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+import org.eclipse.papyrus.sysml.SysmlFactory;
+import org.eclipse.papyrus.sysml.SysmlPackage;
+import org.eclipse.papyrus.sysml.activities.ActivitiesPackage;
+import org.eclipse.papyrus.sysml.activities.internal.impl.ActivitiesPackageImpl;
+import org.eclipse.papyrus.sysml.allocations.AllocationsPackage;
+import org.eclipse.papyrus.sysml.allocations.internal.impl.AllocationsPackageImpl;
+import org.eclipse.papyrus.sysml.blocks.BlocksPackage;
+import org.eclipse.papyrus.sysml.blocks.internal.impl.BlocksPackageImpl;
+import org.eclipse.papyrus.sysml.constraints.ConstraintsPackage;
+import org.eclipse.papyrus.sysml.constraints.internal.impl.ConstraintsPackageImpl;
+import org.eclipse.papyrus.sysml.interactions.InteractionsPackage;
+import org.eclipse.papyrus.sysml.interactions.internal.impl.InteractionsPackageImpl;
+import org.eclipse.papyrus.sysml.modelelements.ModelelementsPackage;
+import org.eclipse.papyrus.sysml.modelelements.internal.impl.ModelelementsPackageImpl;
+import org.eclipse.papyrus.sysml.portandflows.PortandflowsPackage;
+import org.eclipse.papyrus.sysml.portandflows.internal.impl.PortandflowsPackageImpl;
+import org.eclipse.papyrus.sysml.requirements.RequirementsPackage;
+import org.eclipse.papyrus.sysml.requirements.internal.impl.RequirementsPackageImpl;
+import org.eclipse.papyrus.sysml.statemachines.StatemachinesPackage;
+import org.eclipse.papyrus.sysml.statemachines.internal.impl.StatemachinesPackageImpl;
+import org.eclipse.papyrus.sysml.usecases.UsecasesPackage;
+import org.eclipse.papyrus.sysml.usecases.internal.impl.UsecasesPackageImpl;
+import org.eclipse.uml2.uml.profile.standard.StandardPackage;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model <b>Package</b>. <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+public class SysmlPackageImpl extends EPackageImpl implements SysmlPackage {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private static boolean isInited = false;
+
+ /**
+ * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+ *
+ * <p>
+ * This method is used to initialize {@link SysmlPackage#eINSTANCE} when that field is accessed. Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #eNS_URI
+ * @see #createPackageContents()
+ * @see #initializePackageContents()
+ * @generated
+ */
+ public static SysmlPackage init() {
+ if (isInited) {
+ return (SysmlPackage) EPackage.Registry.INSTANCE.getEPackage(SysmlPackage.eNS_URI);
+ }
+
+ // Obtain or create and register package
+ SysmlPackageImpl theSysmlPackage = (SysmlPackageImpl) (EPackage.Registry.INSTANCE.get(eNS_URI) instanceof SysmlPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new SysmlPackageImpl());
+
+ isInited = true;
+
+ // Initialize simple dependencies
+ StandardPackage.eINSTANCE.eClass();
+
+ // Obtain or create and register interdependencies
+ ModelelementsPackageImpl theModelelementsPackage = (ModelelementsPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(ModelelementsPackage.eNS_URI) instanceof ModelelementsPackageImpl ? EPackage.Registry.INSTANCE
+ .getEPackage(ModelelementsPackage.eNS_URI) : ModelelementsPackage.eINSTANCE);
+ BlocksPackageImpl theBlocksPackage = (BlocksPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(BlocksPackage.eNS_URI) instanceof BlocksPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(BlocksPackage.eNS_URI) : BlocksPackage.eINSTANCE);
+ PortandflowsPackageImpl thePortandflowsPackage = (PortandflowsPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(PortandflowsPackage.eNS_URI) instanceof PortandflowsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(PortandflowsPackage.eNS_URI)
+ : PortandflowsPackage.eINSTANCE);
+ ConstraintsPackageImpl theConstraintsPackage = (ConstraintsPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(ConstraintsPackage.eNS_URI) instanceof ConstraintsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ConstraintsPackage.eNS_URI)
+ : ConstraintsPackage.eINSTANCE);
+ ActivitiesPackageImpl theActivitiesPackage = (ActivitiesPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(ActivitiesPackage.eNS_URI) instanceof ActivitiesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ActivitiesPackage.eNS_URI)
+ : ActivitiesPackage.eINSTANCE);
+ AllocationsPackageImpl theAllocationsPackage = (AllocationsPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(AllocationsPackage.eNS_URI) instanceof AllocationsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(AllocationsPackage.eNS_URI)
+ : AllocationsPackage.eINSTANCE);
+ RequirementsPackageImpl theRequirementsPackage = (RequirementsPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(RequirementsPackage.eNS_URI) instanceof RequirementsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(RequirementsPackage.eNS_URI)
+ : RequirementsPackage.eINSTANCE);
+ InteractionsPackageImpl theInteractionsPackage = (InteractionsPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(InteractionsPackage.eNS_URI) instanceof InteractionsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(InteractionsPackage.eNS_URI)
+ : InteractionsPackage.eINSTANCE);
+ StatemachinesPackageImpl theStatemachinesPackage = (StatemachinesPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(StatemachinesPackage.eNS_URI) instanceof StatemachinesPackageImpl ? EPackage.Registry.INSTANCE
+ .getEPackage(StatemachinesPackage.eNS_URI) : StatemachinesPackage.eINSTANCE);
+ UsecasesPackageImpl theUsecasesPackage = (UsecasesPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(UsecasesPackage.eNS_URI) instanceof UsecasesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(UsecasesPackage.eNS_URI)
+ : UsecasesPackage.eINSTANCE);
+
+ // Create package meta-data objects
+ theSysmlPackage.createPackageContents();
+ theModelelementsPackage.createPackageContents();
+ theBlocksPackage.createPackageContents();
+ thePortandflowsPackage.createPackageContents();
+ theConstraintsPackage.createPackageContents();
+ theActivitiesPackage.createPackageContents();
+ theAllocationsPackage.createPackageContents();
+ theRequirementsPackage.createPackageContents();
+ theInteractionsPackage.createPackageContents();
+ theStatemachinesPackage.createPackageContents();
+ theUsecasesPackage.createPackageContents();
+
+ // Initialize created meta-data
+ theSysmlPackage.initializePackageContents();
+ theModelelementsPackage.initializePackageContents();
+ theBlocksPackage.initializePackageContents();
+ thePortandflowsPackage.initializePackageContents();
+ theConstraintsPackage.initializePackageContents();
+ theActivitiesPackage.initializePackageContents();
+ theAllocationsPackage.initializePackageContents();
+ theRequirementsPackage.initializePackageContents();
+ theInteractionsPackage.initializePackageContents();
+ theStatemachinesPackage.initializePackageContents();
+ theUsecasesPackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theSysmlPackage.freeze();
+
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(SysmlPackage.eNS_URI, theSysmlPackage);
+ return theSysmlPackage;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EDataType dummyEDataType = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private boolean isCreated = false;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Creates an instance of the model <b>Package</b>, registered with {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the
+ * package
+ * package URI value.
+ * <p>
+ * Note: the correct way to create the package is via the static factory method {@link #init init()}, which also performs initialization of the package, or returns the registered package, if one already exists. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.emf.ecore.EPackage.Registry
+ * @see org.eclipse.papyrus.sysml.SysmlPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private SysmlPackageImpl() {
+ super(eNS_URI, SysmlFactory.eINSTANCE);
+ }
+
+ /**
+ * Creates the meta-model objects for the package. This method is
+ * guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void createPackageContents() {
+ if (isCreated) {
+ return;
+ }
+ isCreated = true;
+
+ // Create data types
+ dummyEDataType = createEDataType(DUMMY);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EDataType getDummy() {
+ return dummyEDataType;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public SysmlFactory getSysmlFactory() {
+ return (SysmlFactory) getEFactoryInstance();
+ }
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void initializePackageContents() {
+ if (isInitialized) {
+ return;
+ }
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Obtain other dependent packages
+ ModelelementsPackage theModelelementsPackage = (ModelelementsPackage) EPackage.Registry.INSTANCE.getEPackage(ModelelementsPackage.eNS_URI);
+ BlocksPackage theBlocksPackage = (BlocksPackage) EPackage.Registry.INSTANCE.getEPackage(BlocksPackage.eNS_URI);
+ PortandflowsPackage thePortandflowsPackage = (PortandflowsPackage) EPackage.Registry.INSTANCE.getEPackage(PortandflowsPackage.eNS_URI);
+ ConstraintsPackage theConstraintsPackage = (ConstraintsPackage) EPackage.Registry.INSTANCE.getEPackage(ConstraintsPackage.eNS_URI);
+ ActivitiesPackage theActivitiesPackage = (ActivitiesPackage) EPackage.Registry.INSTANCE.getEPackage(ActivitiesPackage.eNS_URI);
+ AllocationsPackage theAllocationsPackage = (AllocationsPackage) EPackage.Registry.INSTANCE.getEPackage(AllocationsPackage.eNS_URI);
+ RequirementsPackage theRequirementsPackage = (RequirementsPackage) EPackage.Registry.INSTANCE.getEPackage(RequirementsPackage.eNS_URI);
+ InteractionsPackage theInteractionsPackage = (InteractionsPackage) EPackage.Registry.INSTANCE.getEPackage(InteractionsPackage.eNS_URI);
+ StatemachinesPackage theStatemachinesPackage = (StatemachinesPackage) EPackage.Registry.INSTANCE.getEPackage(StatemachinesPackage.eNS_URI);
+ UsecasesPackage theUsecasesPackage = (UsecasesPackage) EPackage.Registry.INSTANCE.getEPackage(UsecasesPackage.eNS_URI);
+
+ // Add subpackages
+ getESubpackages().add(theModelelementsPackage);
+ getESubpackages().add(theBlocksPackage);
+ getESubpackages().add(thePortandflowsPackage);
+ getESubpackages().add(theConstraintsPackage);
+ getESubpackages().add(theActivitiesPackage);
+ getESubpackages().add(theAllocationsPackage);
+ getESubpackages().add(theRequirementsPackage);
+ getESubpackages().add(theInteractionsPackage);
+ getESubpackages().add(theStatemachinesPackage);
+ getESubpackages().add(theUsecasesPackage);
+
+ // Initialize data types
+ initEDataType(dummyEDataType, String.class, "Dummy", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS);
+
+ // Create resource
+ createResource(eNS_URI);
+ }
+
+} // SysmlPackageImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/modelelements/Conform.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/modelelements/Conform.java
new file mode 100755
index 0000000..17c08ca
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/modelelements/Conform.java
@@ -0,0 +1,63 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelelements;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.uml2.uml.Dependency;
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object ' <em><b>Conform</b></em>'. <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.modelelements.Conform#getBase_Dependency <em>Base Dependency</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.sysml.modelelements.ModelelementsPackage#getConform()
+ * @model
+ * @generated
+ */
+public interface Conform extends EObject {
+
+ /**
+ * Returns the value of the '<em><b>Base Dependency</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Base Dependency</em>' reference isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Base Dependency</em>' reference.
+ * @see #setBase_Dependency(Dependency)
+ * @see org.eclipse.papyrus.sysml.modelelements.ModelelementsPackage#getConform_Base_Dependency()
+ * @model required="true" ordered="false"
+ * @generated
+ */
+ Dependency getBase_Dependency();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.sysml.modelelements.Conform#getBase_Dependency <em>Base Dependency</em>}' reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Base Dependency</em>' reference.
+ * @see #getBase_Dependency()
+ * @generated
+ */
+ void setBase_Dependency(Dependency value);
+
+} // Conform
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/modelelements/ModelelementsFactory.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/modelelements/ModelelementsFactory.java
new file mode 100755
index 0000000..b12f8a3
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/modelelements/ModelelementsFactory.java
@@ -0,0 +1,96 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelelements;
+
+import org.eclipse.emf.ecore.EFactory;
+
+/**
+ * <!-- begin-user-doc --> The <b>Factory</b> for the model. It provides a
+ * create method for each non-abstract class of the model. <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.modelelements.ModelelementsPackage
+ * @generated
+ */
+public interface ModelelementsFactory extends EFactory {
+
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ ModelelementsFactory eINSTANCE = org.eclipse.papyrus.sysml.modelelements.internal.impl.ModelelementsFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>Conform</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Conform</em>'.
+ * @generated
+ */
+ Conform createConform();
+
+ /**
+ * Returns a new object of class '<em>Problem</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Problem</em>'.
+ * @generated
+ */
+ Problem createProblem();
+
+ /**
+ * Returns a new object of class '<em>Rationale</em>'.
+ * <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Rationale</em>'.
+ * @generated
+ */
+ Rationale createRationale();
+
+ /**
+ * Returns a new object of class '<em>View</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>View</em>'.
+ * @generated
+ */
+ View createView();
+
+ /**
+ * Returns a new object of class '<em>View Point</em>'.
+ * <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>View Point</em>'.
+ * @generated
+ */
+ ViewPoint createViewPoint();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the package supported by this factory.
+ * @generated
+ */
+ ModelelementsPackage getModelelementsPackage();
+
+} // ModelelementsFactory
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/modelelements/ModelelementsPackage.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/modelelements/ModelelementsPackage.java
new file mode 100755
index 0000000..aaf303f
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/modelelements/ModelelementsPackage.java
@@ -0,0 +1,660 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelelements;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+/**
+ * <!-- begin-user-doc --> The <b>Package</b> for the model. It contains
+ * accessors for the meta objects to represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc --> <!-- begin-model-doc --> The supplier/target must be an
+ * element stereotyped by <<ViewPoint>> The client/source must be an element
+ * stereotyped by <<View>> <!-- end-model-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.modelelements.ModelelementsFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface ModelelementsPackage extends EPackage {
+
+ /**
+ * <!-- begin-user-doc --> Defines literals for the meta objects that
+ * represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ interface Literals {
+
+ /**
+ * The meta object literal for the ' {@link org.eclipse.papyrus.sysml.modelelements.internal.impl.ConformImpl
+ * <em>Conform</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @see org.eclipse.papyrus.sysml.modelelements.internal.impl.ConformImpl
+ * @see org.eclipse.papyrus.sysml.modelelements.internal.impl.ModelelementsPackageImpl#getConform()
+ * @generated
+ */
+ EClass CONFORM = eINSTANCE.getConform();
+
+ /**
+ * The meta object literal for the '<em><b>Base Dependency</b></em>' reference feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference CONFORM__BASE_DEPENDENCY = eINSTANCE.getConform_Base_Dependency();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.sysml.modelelements.internal.impl.ViewImpl <em>View</em>}' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.modelelements.internal.impl.ViewImpl
+ * @see org.eclipse.papyrus.sysml.modelelements.internal.impl.ModelelementsPackageImpl#getView()
+ * @generated
+ */
+ EClass VIEW = eINSTANCE.getView();
+
+ /**
+ * The meta object literal for the '<em><b>View Point</b></em>' reference feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference VIEW__VIEW_POINT = eINSTANCE.getView_ViewPoint();
+
+ /**
+ * The meta object literal for the '<em><b>Base Package</b></em>' reference feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference VIEW__BASE_PACKAGE = eINSTANCE.getView_Base_Package();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.sysml.modelelements.internal.impl.ViewPointImpl <em>View Point</em>}' class.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.modelelements.internal.impl.ViewPointImpl
+ * @see org.eclipse.papyrus.sysml.modelelements.internal.impl.ModelelementsPackageImpl#getViewPoint()
+ * @generated
+ */
+ EClass VIEW_POINT = eINSTANCE.getViewPoint();
+
+ /**
+ * The meta object literal for the '<em><b>Base Class</b></em>' reference feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference VIEW_POINT__BASE_CLASS = eINSTANCE.getViewPoint_Base_Class();
+
+ /**
+ * The meta object literal for the '<em><b>Stake Holders</b></em>' attribute list feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EAttribute VIEW_POINT__STAKE_HOLDERS = eINSTANCE.getViewPoint_StakeHolders();
+
+ /**
+ * The meta object literal for the '<em><b>Purpose</b></em>' attribute feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EAttribute VIEW_POINT__PURPOSE = eINSTANCE.getViewPoint_Purpose();
+
+ /**
+ * The meta object literal for the '<em><b>Concerns</b></em>' attribute list feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EAttribute VIEW_POINT__CONCERNS = eINSTANCE.getViewPoint_Concerns();
+
+ /**
+ * The meta object literal for the '<em><b>Languages</b></em>' attribute list feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EAttribute VIEW_POINT__LANGUAGES = eINSTANCE.getViewPoint_Languages();
+
+ /**
+ * The meta object literal for the '<em><b>Methods</b></em>' attribute list feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EAttribute VIEW_POINT__METHODS = eINSTANCE.getViewPoint_Methods();
+
+ /**
+ * The meta object literal for the ' {@link org.eclipse.papyrus.sysml.modelelements.internal.impl.RationaleImpl
+ * <em>Rationale</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @see org.eclipse.papyrus.sysml.modelelements.internal.impl.RationaleImpl
+ * @see org.eclipse.papyrus.sysml.modelelements.internal.impl.ModelelementsPackageImpl#getRationale()
+ * @generated
+ */
+ EClass RATIONALE = eINSTANCE.getRationale();
+
+ /**
+ * The meta object literal for the '<em><b>Base Comment</b></em>' reference feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference RATIONALE__BASE_COMMENT = eINSTANCE.getRationale_Base_Comment();
+
+ /**
+ * The meta object literal for the ' {@link org.eclipse.papyrus.sysml.modelelements.internal.impl.ProblemImpl
+ * <em>Problem</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @see org.eclipse.papyrus.sysml.modelelements.internal.impl.ProblemImpl
+ * @see org.eclipse.papyrus.sysml.modelelements.internal.impl.ModelelementsPackageImpl#getProblem()
+ * @generated
+ */
+ EClass PROBLEM = eINSTANCE.getProblem();
+
+ /**
+ * The meta object literal for the '<em><b>Base Comment</b></em>' reference feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference PROBLEM__BASE_COMMENT = eINSTANCE.getProblem_Base_Comment();
+
+ }
+
+ /**
+ * The package name.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ String eNAME = "modelelements";
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ String eNS_URI = "http://www.eclipse.org/papyrus/0.7.0/SysML/ModelElements";
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ String eNS_PREFIX = "ModelElements";
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ ModelelementsPackage eINSTANCE = org.eclipse.papyrus.sysml.modelelements.internal.impl.ModelelementsPackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.sysml.modelelements.internal.impl.ConformImpl <em>Conform</em>}' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.modelelements.internal.impl.ConformImpl
+ * @see org.eclipse.papyrus.sysml.modelelements.internal.impl.ModelelementsPackageImpl#getConform()
+ * @generated
+ */
+ int CONFORM = 0;
+
+ /**
+ * The feature id for the '<em><b>Base Dependency</b></em>' reference. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int CONFORM__BASE_DEPENDENCY = 0;
+
+ /**
+ * The number of structural features of the '<em>Conform</em>' class. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int CONFORM_FEATURE_COUNT = 1;
+
+ /**
+ * The number of operations of the '<em>Conform</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int CONFORM_OPERATION_COUNT = 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.sysml.modelelements.internal.impl.ViewImpl <em>View</em>}' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.modelelements.internal.impl.ViewImpl
+ * @see org.eclipse.papyrus.sysml.modelelements.internal.impl.ModelelementsPackageImpl#getView()
+ * @generated
+ */
+ int VIEW = 1;
+
+ /**
+ * The feature id for the '<em><b>View Point</b></em>' reference. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int VIEW__VIEW_POINT = 0;
+
+ /**
+ * The feature id for the '<em><b>Base Package</b></em>' reference. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int VIEW__BASE_PACKAGE = 1;
+
+ /**
+ * The number of structural features of the '<em>View</em>' class. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int VIEW_FEATURE_COUNT = 2;
+
+ /**
+ * The number of operations of the '<em>View</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int VIEW_OPERATION_COUNT = 0;
+
+ /**
+ * The meta object id for the ' {@link org.eclipse.papyrus.sysml.modelelements.internal.impl.ViewPointImpl
+ * <em>View Point</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @see org.eclipse.papyrus.sysml.modelelements.internal.impl.ViewPointImpl
+ * @see org.eclipse.papyrus.sysml.modelelements.internal.impl.ModelelementsPackageImpl#getViewPoint()
+ * @generated
+ */
+ int VIEW_POINT = 2;
+
+ /**
+ * The feature id for the '<em><b>Base Class</b></em>' reference. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int VIEW_POINT__BASE_CLASS = 0;
+
+ /**
+ * The feature id for the '<em><b>Stake Holders</b></em>' attribute list.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int VIEW_POINT__STAKE_HOLDERS = 1;
+
+ /**
+ * The feature id for the '<em><b>Purpose</b></em>' attribute. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int VIEW_POINT__PURPOSE = 2;
+
+ /**
+ * The feature id for the '<em><b>Concerns</b></em>' attribute list. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int VIEW_POINT__CONCERNS = 3;
+
+ /**
+ * The feature id for the '<em><b>Languages</b></em>' attribute list. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int VIEW_POINT__LANGUAGES = 4;
+
+ /**
+ * The feature id for the '<em><b>Methods</b></em>' attribute list. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int VIEW_POINT__METHODS = 5;
+
+ /**
+ * The number of structural features of the '<em>View Point</em>' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int VIEW_POINT_FEATURE_COUNT = 6;
+
+ /**
+ * The number of operations of the '<em>View Point</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int VIEW_POINT_OPERATION_COUNT = 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.sysml.modelelements.internal.impl.RationaleImpl <em>Rationale</em>}' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.modelelements.internal.impl.RationaleImpl
+ * @see org.eclipse.papyrus.sysml.modelelements.internal.impl.ModelelementsPackageImpl#getRationale()
+ * @generated
+ */
+ int RATIONALE = 3;
+
+ /**
+ * The feature id for the '<em><b>Base Comment</b></em>' reference. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int RATIONALE__BASE_COMMENT = 0;
+
+ /**
+ * The number of structural features of the '<em>Rationale</em>' class. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int RATIONALE_FEATURE_COUNT = 1;
+
+ /**
+ * The number of operations of the '<em>Rationale</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int RATIONALE_OPERATION_COUNT = 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.sysml.modelelements.internal.impl.ProblemImpl <em>Problem</em>}' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.modelelements.internal.impl.ProblemImpl
+ * @see org.eclipse.papyrus.sysml.modelelements.internal.impl.ModelelementsPackageImpl#getProblem()
+ * @generated
+ */
+ int PROBLEM = 4;
+
+ /**
+ * The feature id for the '<em><b>Base Comment</b></em>' reference. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int PROBLEM__BASE_COMMENT = 0;
+
+ /**
+ * The number of structural features of the '<em>Problem</em>' class. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int PROBLEM_FEATURE_COUNT = 1;
+
+ /**
+ * The number of operations of the '<em>Problem</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int PROBLEM_OPERATION_COUNT = 0;
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.sysml.modelelements.Conform <em>Conform</em>}'.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @return the meta object for class '<em>Conform</em>'.
+ * @see org.eclipse.papyrus.sysml.modelelements.Conform
+ * @generated
+ */
+ EClass getConform();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.sysml.modelelements.Conform#getBase_Dependency <em>Base Dependency</em>} '.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference '<em>Base Dependency</em>'.
+ * @see org.eclipse.papyrus.sysml.modelelements.Conform#getBase_Dependency()
+ * @see #getConform()
+ * @generated
+ */
+ EReference getConform_Base_Dependency();
+
+ /**
+ * Returns the factory that creates the instances of the model. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the factory that creates the instances of the model.
+ * @generated
+ */
+ ModelelementsFactory getModelelementsFactory();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.sysml.modelelements.Problem <em>Problem</em>}'.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @return the meta object for class '<em>Problem</em>'.
+ * @see org.eclipse.papyrus.sysml.modelelements.Problem
+ * @generated
+ */
+ EClass getProblem();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.sysml.modelelements.Problem#getBase_Comment <em>Base Comment</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference '<em>Base Comment</em>'.
+ * @see org.eclipse.papyrus.sysml.modelelements.Problem#getBase_Comment()
+ * @see #getProblem()
+ * @generated
+ */
+ EReference getProblem_Base_Comment();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.sysml.modelelements.Rationale <em>Rationale</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Rationale</em>'.
+ * @see org.eclipse.papyrus.sysml.modelelements.Rationale
+ * @generated
+ */
+ EClass getRationale();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.sysml.modelelements.Rationale#getBase_Comment <em>Base Comment</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference '<em>Base Comment</em>'.
+ * @see org.eclipse.papyrus.sysml.modelelements.Rationale#getBase_Comment()
+ * @see #getRationale()
+ * @generated
+ */
+ EReference getRationale_Base_Comment();
+
+ /**
+ * Returns the meta object for class ' {@link org.eclipse.papyrus.sysml.modelelements.View <em>View</em>}'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>View</em>'.
+ * @see org.eclipse.papyrus.sysml.modelelements.View
+ * @generated
+ */
+ EClass getView();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.sysml.modelelements.View#getBase_Package <em>Base Package</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference '<em>Base Package</em>'.
+ * @see org.eclipse.papyrus.sysml.modelelements.View#getBase_Package()
+ * @see #getView()
+ * @generated
+ */
+ EReference getView_Base_Package();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.sysml.modelelements.View#getViewPoint <em>View Point</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference '<em>View Point</em>'.
+ * @see org.eclipse.papyrus.sysml.modelelements.View#getViewPoint()
+ * @see #getView()
+ * @generated
+ */
+ EReference getView_ViewPoint();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.sysml.modelelements.ViewPoint <em>View Point</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>View Point</em>'.
+ * @see org.eclipse.papyrus.sysml.modelelements.ViewPoint
+ * @generated
+ */
+ EClass getViewPoint();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.sysml.modelelements.ViewPoint#getBase_Class <em>Base Class</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference '<em>Base Class</em>'.
+ * @see org.eclipse.papyrus.sysml.modelelements.ViewPoint#getBase_Class()
+ * @see #getViewPoint()
+ * @generated
+ */
+ EReference getViewPoint_Base_Class();
+
+ /**
+ * Returns the meta object for the attribute list '{@link org.eclipse.papyrus.sysml.modelelements.ViewPoint#getConcerns <em>Concerns</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the attribute list '<em>Concerns</em>'.
+ * @see org.eclipse.papyrus.sysml.modelelements.ViewPoint#getConcerns()
+ * @see #getViewPoint()
+ * @generated
+ */
+ EAttribute getViewPoint_Concerns();
+
+ /**
+ * Returns the meta object for the attribute list '{@link org.eclipse.papyrus.sysml.modelelements.ViewPoint#getLanguages <em>Languages</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the attribute list '<em>Languages</em>'.
+ * @see org.eclipse.papyrus.sysml.modelelements.ViewPoint#getLanguages()
+ * @see #getViewPoint()
+ * @generated
+ */
+ EAttribute getViewPoint_Languages();
+
+ /**
+ * Returns the meta object for the attribute list '{@link org.eclipse.papyrus.sysml.modelelements.ViewPoint#getMethods <em>Methods</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the attribute list '<em>Methods</em>'.
+ * @see org.eclipse.papyrus.sysml.modelelements.ViewPoint#getMethods()
+ * @see #getViewPoint()
+ * @generated
+ */
+ EAttribute getViewPoint_Methods();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.sysml.modelelements.ViewPoint#getPurpose <em>Purpose</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the attribute '<em>Purpose</em>'.
+ * @see org.eclipse.papyrus.sysml.modelelements.ViewPoint#getPurpose()
+ * @see #getViewPoint()
+ * @generated
+ */
+ EAttribute getViewPoint_Purpose();
+
+ /**
+ * Returns the meta object for the attribute list '{@link org.eclipse.papyrus.sysml.modelelements.ViewPoint#getStakeHolders
+ * <em>Stake Holders</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the attribute list '<em>Stake Holders</em>'.
+ * @see org.eclipse.papyrus.sysml.modelelements.ViewPoint#getStakeHolders()
+ * @see #getViewPoint()
+ * @generated
+ */
+ EAttribute getViewPoint_StakeHolders();
+
+} // ModelelementsPackage
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/modelelements/Problem.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/modelelements/Problem.java
new file mode 100755
index 0000000..1301b5d
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/modelelements/Problem.java
@@ -0,0 +1,63 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelelements;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.uml2.uml.Comment;
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object ' <em><b>Problem</b></em>'. <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.modelelements.Problem#getBase_Comment <em>Base Comment</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.sysml.modelelements.ModelelementsPackage#getProblem()
+ * @model
+ * @generated
+ */
+public interface Problem extends EObject {
+
+ /**
+ * Returns the value of the '<em><b>Base Comment</b></em>' reference. <!--
+ * begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Base Comment</em>' reference isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Base Comment</em>' reference.
+ * @see #setBase_Comment(Comment)
+ * @see org.eclipse.papyrus.sysml.modelelements.ModelelementsPackage#getProblem_Base_Comment()
+ * @model required="true" ordered="false"
+ * @generated
+ */
+ Comment getBase_Comment();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.sysml.modelelements.Problem#getBase_Comment <em>Base Comment</em>}' reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Base Comment</em>' reference.
+ * @see #getBase_Comment()
+ * @generated
+ */
+ void setBase_Comment(Comment value);
+
+} // Problem
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/modelelements/Rationale.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/modelelements/Rationale.java
new file mode 100755
index 0000000..fc3ae8f
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/modelelements/Rationale.java
@@ -0,0 +1,63 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelelements;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.uml2.uml.Comment;
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object ' <em><b>Rationale</b></em>'. <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.modelelements.Rationale#getBase_Comment <em>Base Comment</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.sysml.modelelements.ModelelementsPackage#getRationale()
+ * @model
+ * @generated
+ */
+public interface Rationale extends EObject {
+
+ /**
+ * Returns the value of the '<em><b>Base Comment</b></em>' reference. <!--
+ * begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Base Comment</em>' reference isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Base Comment</em>' reference.
+ * @see #setBase_Comment(Comment)
+ * @see org.eclipse.papyrus.sysml.modelelements.ModelelementsPackage#getRationale_Base_Comment()
+ * @model required="true" ordered="false"
+ * @generated
+ */
+ Comment getBase_Comment();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.sysml.modelelements.Rationale#getBase_Comment <em>Base Comment</em>}' reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Base Comment</em>' reference.
+ * @see #getBase_Comment()
+ * @generated
+ */
+ void setBase_Comment(Comment value);
+
+} // Rationale
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/modelelements/View.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/modelelements/View.java
new file mode 100755
index 0000000..cab1332
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/modelelements/View.java
@@ -0,0 +1,79 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelelements;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object ' <em><b>View</b></em>'. <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.modelelements.View#getViewPoint <em>View Point</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.modelelements.View#getBase_Package <em>Base Package</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.sysml.modelelements.ModelelementsPackage#getView()
+ * @model
+ * @generated
+ */
+public interface View extends EObject {
+
+ /**
+ * Returns the value of the '<em><b>Base Package</b></em>' reference. <!--
+ * begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Base Package</em>' reference isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Base Package</em>' reference.
+ * @see #setBase_Package(org.eclipse.uml2.uml.Package)
+ * @see org.eclipse.papyrus.sysml.modelelements.ModelelementsPackage#getView_Base_Package()
+ * @model required="true" ordered="false"
+ * @generated
+ */
+ org.eclipse.uml2.uml.Package getBase_Package();
+
+ /**
+ * Returns the value of the '<em><b>View Point</b></em>' reference. <!--
+ * begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>View Point</em>' reference isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>View Point</em>' reference.
+ * @see org.eclipse.papyrus.sysml.modelelements.ModelelementsPackage#getView_ViewPoint()
+ * @model required="true" transient="true" changeable="false"
+ * volatile="true" derived="true" ordered="false"
+ * @generated
+ */
+ ViewPoint getViewPoint();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.sysml.modelelements.View#getBase_Package <em>Base Package</em>}' reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Base Package</em>' reference.
+ * @see #getBase_Package()
+ * @generated
+ */
+ void setBase_Package(org.eclipse.uml2.uml.Package value);
+
+} // View
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/modelelements/ViewPoint.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/modelelements/ViewPoint.java
new file mode 100755
index 0000000..aabf292
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/modelelements/ViewPoint.java
@@ -0,0 +1,163 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelelements;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object ' <em><b>View Point</b></em>'. <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.modelelements.ViewPoint#getBase_Class <em>Base Class</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.modelelements.ViewPoint#getStakeHolders <em>Stake Holders</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.modelelements.ViewPoint#getPurpose <em>Purpose</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.modelelements.ViewPoint#getConcerns <em>Concerns</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.modelelements.ViewPoint#getLanguages <em>Languages</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.modelelements.ViewPoint#getMethods <em>Methods</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.sysml.modelelements.ModelelementsPackage#getViewPoint()
+ * @model
+ * @generated
+ */
+public interface ViewPoint extends EObject {
+
+ /**
+ * Returns the value of the '<em><b>Base Class</b></em>' reference. <!--
+ * begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Base Class</em>' reference isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Base Class</em>' reference.
+ * @see #setBase_Class(org.eclipse.uml2.uml.Class)
+ * @see org.eclipse.papyrus.sysml.modelelements.ModelelementsPackage#getViewPoint_Base_Class()
+ * @model required="true" ordered="false"
+ * @generated
+ */
+ org.eclipse.uml2.uml.Class getBase_Class();
+
+ /**
+ * Returns the value of the '<em><b>Concerns</b></em>' attribute list.
+ * The list contents are of type {@link java.lang.String}.
+ * <!-- begin-user-doc
+ * -->
+ * <p>
+ * If the meaning of the '<em>Concerns</em>' attribute list isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Concerns</em>' attribute list.
+ * @see org.eclipse.papyrus.sysml.modelelements.ModelelementsPackage#getViewPoint_Concerns()
+ * @model unique="false" dataType="org.eclipse.uml2.types.String" ordered="false"
+ * @generated
+ */
+ EList<String> getConcerns();
+
+ /**
+ * Returns the value of the '<em><b>Languages</b></em>' attribute list.
+ * The list contents are of type {@link java.lang.String}.
+ * <!-- begin-user-doc
+ * -->
+ * <p>
+ * If the meaning of the '<em>Languages</em>' attribute list isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Languages</em>' attribute list.
+ * @see org.eclipse.papyrus.sysml.modelelements.ModelelementsPackage#getViewPoint_Languages()
+ * @model unique="false" dataType="org.eclipse.uml2.types.String" ordered="false"
+ * @generated
+ */
+ EList<String> getLanguages();
+
+ /**
+ * Returns the value of the '<em><b>Methods</b></em>' attribute list.
+ * The list contents are of type {@link java.lang.String}.
+ * <!-- begin-user-doc
+ * -->
+ * <p>
+ * If the meaning of the '<em>Methods</em>' attribute list isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Methods</em>' attribute list.
+ * @see org.eclipse.papyrus.sysml.modelelements.ModelelementsPackage#getViewPoint_Methods()
+ * @model unique="false" dataType="org.eclipse.uml2.types.String" ordered="false"
+ * @generated
+ */
+ EList<String> getMethods();
+
+ /**
+ * Returns the value of the '<em><b>Purpose</b></em>' attribute. <!--
+ * begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Purpose</em>' attribute isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Purpose</em>' attribute.
+ * @see #setPurpose(String)
+ * @see org.eclipse.papyrus.sysml.modelelements.ModelelementsPackage#getViewPoint_Purpose()
+ * @model unique="false" ordered="false"
+ * @generated
+ */
+ String getPurpose();
+
+ /**
+ * Returns the value of the '<em><b>Stake Holders</b></em>' attribute list.
+ * The list contents are of type {@link java.lang.String}. <!--
+ * begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Stake Holders</em>' attribute list isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Stake Holders</em>' attribute list.
+ * @see org.eclipse.papyrus.sysml.modelelements.ModelelementsPackage#getViewPoint_StakeHolders()
+ * @model unique="false" ordered="false"
+ * @generated
+ */
+ EList<String> getStakeHolders();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.sysml.modelelements.ViewPoint#getBase_Class <em>Base Class</em>}' reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Base Class</em>' reference.
+ * @see #getBase_Class()
+ * @generated
+ */
+ void setBase_Class(org.eclipse.uml2.uml.Class value);
+
+ /**
+ * Sets the value of the ' {@link org.eclipse.papyrus.sysml.modelelements.ViewPoint#getPurpose
+ * <em>Purpose</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @param value
+ * the new value of the '<em>Purpose</em>' attribute.
+ * @see #getPurpose()
+ * @generated
+ */
+ void setPurpose(String value);
+
+} // ViewPoint
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/modelelements/internal/impl/ConformImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/modelelements/internal/impl/ConformImpl.java
new file mode 100755
index 0000000..6ae98a7
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/modelelements/internal/impl/ConformImpl.java
@@ -0,0 +1,169 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelelements.internal.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+import org.eclipse.papyrus.sysml.modelelements.Conform;
+import org.eclipse.papyrus.sysml.modelelements.ModelelementsPackage;
+import org.eclipse.uml2.uml.Dependency;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object ' <em><b>Conform</b></em>'. <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.modelelements.internal.impl.ConformImpl#getBase_Dependency <em>Base Dependency</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ConformImpl extends MinimalEObjectImpl.Container implements Conform {
+
+ /**
+ * The cached value of the '{@link #getBase_Dependency() <em>Base Dependency</em>}' reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see #getBase_Dependency()
+ * @generated
+ * @ordered
+ */
+ protected Dependency base_Dependency;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ConformImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Dependency basicGetBase_Dependency() {
+ return base_Dependency;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case ModelelementsPackage.CONFORM__BASE_DEPENDENCY:
+ if (resolve) {
+ return getBase_Dependency();
+ }
+ return basicGetBase_Dependency();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ModelelementsPackage.CONFORM__BASE_DEPENDENCY:
+ return base_Dependency != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case ModelelementsPackage.CONFORM__BASE_DEPENDENCY:
+ setBase_Dependency((Dependency) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ModelelementsPackage.Literals.CONFORM;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ModelelementsPackage.CONFORM__BASE_DEPENDENCY:
+ setBase_Dependency((Dependency) null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Dependency getBase_Dependency() {
+ if (base_Dependency != null && base_Dependency.eIsProxy()) {
+ InternalEObject oldBase_Dependency = (InternalEObject) base_Dependency;
+ base_Dependency = (Dependency) eResolveProxy(oldBase_Dependency);
+ if (base_Dependency != oldBase_Dependency) {
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ModelelementsPackage.CONFORM__BASE_DEPENDENCY, oldBase_Dependency, base_Dependency));
+ }
+ }
+ }
+ return base_Dependency;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setBase_Dependency(Dependency newBase_Dependency) {
+ Dependency oldBase_Dependency = base_Dependency;
+ base_Dependency = newBase_Dependency;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, ModelelementsPackage.CONFORM__BASE_DEPENDENCY, oldBase_Dependency, base_Dependency));
+ }
+ }
+
+} // ConformImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/modelelements/internal/impl/ModelelementsFactoryImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/modelelements/internal/impl/ModelelementsFactoryImpl.java
new file mode 100755
index 0000000..1bbfd9b
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/modelelements/internal/impl/ModelelementsFactoryImpl.java
@@ -0,0 +1,160 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelelements.internal.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+import org.eclipse.papyrus.sysml.modelelements.Conform;
+import org.eclipse.papyrus.sysml.modelelements.ModelelementsFactory;
+import org.eclipse.papyrus.sysml.modelelements.ModelelementsPackage;
+import org.eclipse.papyrus.sysml.modelelements.Problem;
+import org.eclipse.papyrus.sysml.modelelements.Rationale;
+import org.eclipse.papyrus.sysml.modelelements.View;
+import org.eclipse.papyrus.sysml.modelelements.ViewPoint;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model <b>Factory</b>. <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+public class ModelelementsFactoryImpl extends EFactoryImpl implements ModelelementsFactory {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static ModelelementsPackage getPackage() {
+ return ModelelementsPackage.eINSTANCE;
+ }
+
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public static ModelelementsFactory init() {
+ try {
+ ModelelementsFactory theModelelementsFactory = (ModelelementsFactory) EPackage.Registry.INSTANCE.getEFactory(ModelelementsPackage.eNS_URI);
+ if (theModelelementsFactory != null) {
+ return theModelelementsFactory;
+ }
+ } catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new ModelelementsFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public ModelelementsFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ case ModelelementsPackage.CONFORM:
+ return createConform();
+ case ModelelementsPackage.VIEW:
+ return createView();
+ case ModelelementsPackage.VIEW_POINT:
+ return createViewPoint();
+ case ModelelementsPackage.RATIONALE:
+ return createRationale();
+ case ModelelementsPackage.PROBLEM:
+ return createProblem();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Conform createConform() {
+ ConformImpl conform = new ConformImpl();
+ return conform;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Problem createProblem() {
+ ProblemImpl problem = new ProblemImpl();
+ return problem;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Rationale createRationale() {
+ RationaleImpl rationale = new RationaleImpl();
+ return rationale;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public View createView() {
+ ViewImpl view = new ViewImpl();
+ return view;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ViewPoint createViewPoint() {
+ ViewPointImpl viewPoint = new ViewPointImpl();
+ return viewPoint;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ModelelementsPackage getModelelementsPackage() {
+ return (ModelelementsPackage) getEPackage();
+ }
+
+} // ModelelementsFactoryImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/modelelements/internal/impl/ModelelementsPackageImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/modelelements/internal/impl/ModelelementsPackageImpl.java
new file mode 100755
index 0000000..bed031d
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/modelelements/internal/impl/ModelelementsPackageImpl.java
@@ -0,0 +1,455 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelelements.internal.impl;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+import org.eclipse.papyrus.sysml.SysmlPackage;
+import org.eclipse.papyrus.sysml.activities.ActivitiesPackage;
+import org.eclipse.papyrus.sysml.activities.internal.impl.ActivitiesPackageImpl;
+import org.eclipse.papyrus.sysml.allocations.AllocationsPackage;
+import org.eclipse.papyrus.sysml.allocations.internal.impl.AllocationsPackageImpl;
+import org.eclipse.papyrus.sysml.blocks.BlocksPackage;
+import org.eclipse.papyrus.sysml.blocks.internal.impl.BlocksPackageImpl;
+import org.eclipse.papyrus.sysml.constraints.ConstraintsPackage;
+import org.eclipse.papyrus.sysml.constraints.internal.impl.ConstraintsPackageImpl;
+import org.eclipse.papyrus.sysml.interactions.InteractionsPackage;
+import org.eclipse.papyrus.sysml.interactions.internal.impl.InteractionsPackageImpl;
+import org.eclipse.papyrus.sysml.internal.impl.SysmlPackageImpl;
+import org.eclipse.papyrus.sysml.modelelements.Conform;
+import org.eclipse.papyrus.sysml.modelelements.ModelelementsFactory;
+import org.eclipse.papyrus.sysml.modelelements.ModelelementsPackage;
+import org.eclipse.papyrus.sysml.modelelements.Problem;
+import org.eclipse.papyrus.sysml.modelelements.Rationale;
+import org.eclipse.papyrus.sysml.modelelements.View;
+import org.eclipse.papyrus.sysml.modelelements.ViewPoint;
+import org.eclipse.papyrus.sysml.portandflows.PortandflowsPackage;
+import org.eclipse.papyrus.sysml.portandflows.internal.impl.PortandflowsPackageImpl;
+import org.eclipse.papyrus.sysml.requirements.RequirementsPackage;
+import org.eclipse.papyrus.sysml.requirements.internal.impl.RequirementsPackageImpl;
+import org.eclipse.papyrus.sysml.statemachines.StatemachinesPackage;
+import org.eclipse.papyrus.sysml.statemachines.internal.impl.StatemachinesPackageImpl;
+import org.eclipse.papyrus.sysml.usecases.UsecasesPackage;
+import org.eclipse.papyrus.sysml.usecases.internal.impl.UsecasesPackageImpl;
+import org.eclipse.uml2.types.TypesPackage;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.eclipse.uml2.uml.profile.standard.StandardPackage;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model <b>Package</b>. <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+public class ModelelementsPackageImpl extends EPackageImpl implements ModelelementsPackage {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private static boolean isInited = false;
+
+ /**
+ * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+ *
+ * <p>
+ * This method is used to initialize {@link ModelelementsPackage#eINSTANCE} when that field is accessed. Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @see #eNS_URI
+ * @see #createPackageContents()
+ * @see #initializePackageContents()
+ * @generated
+ */
+ public static ModelelementsPackage init() {
+ if (isInited) {
+ return (ModelelementsPackage) EPackage.Registry.INSTANCE.getEPackage(ModelelementsPackage.eNS_URI);
+ }
+
+ // Obtain or create and register package
+ ModelelementsPackageImpl theModelelementsPackage = (ModelelementsPackageImpl) (EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ModelelementsPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ModelelementsPackageImpl());
+
+ isInited = true;
+
+ // Initialize simple dependencies
+ StandardPackage.eINSTANCE.eClass();
+
+ // Obtain or create and register interdependencies
+ SysmlPackageImpl theSysmlPackage = (SysmlPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(SysmlPackage.eNS_URI) instanceof SysmlPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(SysmlPackage.eNS_URI) : SysmlPackage.eINSTANCE);
+ BlocksPackageImpl theBlocksPackage = (BlocksPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(BlocksPackage.eNS_URI) instanceof BlocksPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(BlocksPackage.eNS_URI) : BlocksPackage.eINSTANCE);
+ PortandflowsPackageImpl thePortandflowsPackage = (PortandflowsPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(PortandflowsPackage.eNS_URI) instanceof PortandflowsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(PortandflowsPackage.eNS_URI)
+ : PortandflowsPackage.eINSTANCE);
+ ConstraintsPackageImpl theConstraintsPackage = (ConstraintsPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(ConstraintsPackage.eNS_URI) instanceof ConstraintsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ConstraintsPackage.eNS_URI)
+ : ConstraintsPackage.eINSTANCE);
+ ActivitiesPackageImpl theActivitiesPackage = (ActivitiesPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(ActivitiesPackage.eNS_URI) instanceof ActivitiesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ActivitiesPackage.eNS_URI)
+ : ActivitiesPackage.eINSTANCE);
+ AllocationsPackageImpl theAllocationsPackage = (AllocationsPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(AllocationsPackage.eNS_URI) instanceof AllocationsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(AllocationsPackage.eNS_URI)
+ : AllocationsPackage.eINSTANCE);
+ RequirementsPackageImpl theRequirementsPackage = (RequirementsPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(RequirementsPackage.eNS_URI) instanceof RequirementsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(RequirementsPackage.eNS_URI)
+ : RequirementsPackage.eINSTANCE);
+ InteractionsPackageImpl theInteractionsPackage = (InteractionsPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(InteractionsPackage.eNS_URI) instanceof InteractionsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(InteractionsPackage.eNS_URI)
+ : InteractionsPackage.eINSTANCE);
+ StatemachinesPackageImpl theStatemachinesPackage = (StatemachinesPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(StatemachinesPackage.eNS_URI) instanceof StatemachinesPackageImpl ? EPackage.Registry.INSTANCE
+ .getEPackage(StatemachinesPackage.eNS_URI) : StatemachinesPackage.eINSTANCE);
+ UsecasesPackageImpl theUsecasesPackage = (UsecasesPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(UsecasesPackage.eNS_URI) instanceof UsecasesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(UsecasesPackage.eNS_URI)
+ : UsecasesPackage.eINSTANCE);
+
+ // Create package meta-data objects
+ theModelelementsPackage.createPackageContents();
+ theSysmlPackage.createPackageContents();
+ theBlocksPackage.createPackageContents();
+ thePortandflowsPackage.createPackageContents();
+ theConstraintsPackage.createPackageContents();
+ theActivitiesPackage.createPackageContents();
+ theAllocationsPackage.createPackageContents();
+ theRequirementsPackage.createPackageContents();
+ theInteractionsPackage.createPackageContents();
+ theStatemachinesPackage.createPackageContents();
+ theUsecasesPackage.createPackageContents();
+
+ // Initialize created meta-data
+ theModelelementsPackage.initializePackageContents();
+ theSysmlPackage.initializePackageContents();
+ theBlocksPackage.initializePackageContents();
+ thePortandflowsPackage.initializePackageContents();
+ theConstraintsPackage.initializePackageContents();
+ theActivitiesPackage.initializePackageContents();
+ theAllocationsPackage.initializePackageContents();
+ theRequirementsPackage.initializePackageContents();
+ theInteractionsPackage.initializePackageContents();
+ theStatemachinesPackage.initializePackageContents();
+ theUsecasesPackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theModelelementsPackage.freeze();
+
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(ModelelementsPackage.eNS_URI, theModelelementsPackage);
+ return theModelelementsPackage;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass conformEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass viewEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass viewPointEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass rationaleEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass problemEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private boolean isCreated = false;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Creates an instance of the model <b>Package</b>, registered with {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the
+ * package
+ * package URI value.
+ * <p>
+ * Note: the correct way to create the package is via the static factory method {@link #init init()}, which also performs initialization of the package, or returns the registered package, if one already exists. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.emf.ecore.EPackage.Registry
+ * @see org.eclipse.papyrus.sysml.modelelements.ModelelementsPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private ModelelementsPackageImpl() {
+ super(eNS_URI, ModelelementsFactory.eINSTANCE);
+ }
+
+ /**
+ * Creates the meta-model objects for the package. This method is
+ * guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void createPackageContents() {
+ if (isCreated) {
+ return;
+ }
+ isCreated = true;
+
+ // Create classes and their features
+ conformEClass = createEClass(CONFORM);
+ createEReference(conformEClass, CONFORM__BASE_DEPENDENCY);
+
+ viewEClass = createEClass(VIEW);
+ createEReference(viewEClass, VIEW__VIEW_POINT);
+ createEReference(viewEClass, VIEW__BASE_PACKAGE);
+
+ viewPointEClass = createEClass(VIEW_POINT);
+ createEReference(viewPointEClass, VIEW_POINT__BASE_CLASS);
+ createEAttribute(viewPointEClass, VIEW_POINT__STAKE_HOLDERS);
+ createEAttribute(viewPointEClass, VIEW_POINT__PURPOSE);
+ createEAttribute(viewPointEClass, VIEW_POINT__CONCERNS);
+ createEAttribute(viewPointEClass, VIEW_POINT__LANGUAGES);
+ createEAttribute(viewPointEClass, VIEW_POINT__METHODS);
+
+ rationaleEClass = createEClass(RATIONALE);
+ createEReference(rationaleEClass, RATIONALE__BASE_COMMENT);
+
+ problemEClass = createEClass(PROBLEM);
+ createEReference(problemEClass, PROBLEM__BASE_COMMENT);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EClass getConform() {
+ return conformEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getConform_Base_Dependency() {
+ return (EReference) conformEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ModelelementsFactory getModelelementsFactory() {
+ return (ModelelementsFactory) getEFactoryInstance();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EClass getProblem() {
+ return problemEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getProblem_Base_Comment() {
+ return (EReference) problemEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EClass getRationale() {
+ return rationaleEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getRationale_Base_Comment() {
+ return (EReference) rationaleEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EClass getView() {
+ return viewEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getView_Base_Package() {
+ return (EReference) viewEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getView_ViewPoint() {
+ return (EReference) viewEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EClass getViewPoint() {
+ return viewPointEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getViewPoint_Base_Class() {
+ return (EReference) viewPointEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EAttribute getViewPoint_Concerns() {
+ return (EAttribute) viewPointEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EAttribute getViewPoint_Languages() {
+ return (EAttribute) viewPointEClass.getEStructuralFeatures().get(4);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EAttribute getViewPoint_Methods() {
+ return (EAttribute) viewPointEClass.getEStructuralFeatures().get(5);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EAttribute getViewPoint_Purpose() {
+ return (EAttribute) viewPointEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EAttribute getViewPoint_StakeHolders() {
+ return (EAttribute) viewPointEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void initializePackageContents() {
+ if (isInitialized) {
+ return;
+ }
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Obtain other dependent packages
+ UMLPackage theUMLPackage = (UMLPackage) EPackage.Registry.INSTANCE.getEPackage(UMLPackage.eNS_URI);
+ TypesPackage theTypesPackage = (TypesPackage) EPackage.Registry.INSTANCE.getEPackage(TypesPackage.eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+
+ // Initialize classes, features, and operations; add parameters
+ initEClass(conformEClass, Conform.class, "Conform", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getConform_Base_Dependency(), theUMLPackage.getDependency(), null, "base_Dependency", null, 1, 1, Conform.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, !IS_DERIVED,
+ !IS_ORDERED);
+
+ initEClass(viewEClass, View.class, "View", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getView_ViewPoint(), this.getViewPoint(), null, "viewPoint", null, 1, 1, View.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, IS_DERIVED, !IS_ORDERED);
+ initEReference(getView_Base_Package(), theUMLPackage.getPackage(), null, "base_Package", null, 1, 1, View.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+
+ initEClass(viewPointEClass, ViewPoint.class, "ViewPoint", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getViewPoint_Base_Class(), theUMLPackage.getClass_(), null, "base_Class", null, 1, 1, ViewPoint.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+ initEAttribute(getViewPoint_StakeHolders(), theTypesPackage.getString(), "stakeHolders", null, 0, -1, ViewPoint.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+ initEAttribute(getViewPoint_Purpose(), theTypesPackage.getString(), "purpose", null, 0, 1, ViewPoint.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+ initEAttribute(getViewPoint_Concerns(), theTypesPackage.getString(), "concerns", null, 0, -1, ViewPoint.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+ initEAttribute(getViewPoint_Languages(), theTypesPackage.getString(), "languages", null, 0, -1, ViewPoint.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+ initEAttribute(getViewPoint_Methods(), theTypesPackage.getString(), "methods", null, 0, -1, ViewPoint.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+
+ initEClass(rationaleEClass, Rationale.class, "Rationale", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getRationale_Base_Comment(), theUMLPackage.getComment(), null, "base_Comment", null, 1, 1, Rationale.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, !IS_DERIVED,
+ !IS_ORDERED);
+
+ initEClass(problemEClass, Problem.class, "Problem", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getProblem_Base_Comment(), theUMLPackage.getComment(), null, "base_Comment", null, 1, 1, Problem.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+ }
+
+} // ModelelementsPackageImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/modelelements/internal/impl/ProblemImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/modelelements/internal/impl/ProblemImpl.java
new file mode 100755
index 0000000..b7ff42c
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/modelelements/internal/impl/ProblemImpl.java
@@ -0,0 +1,168 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelelements.internal.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+import org.eclipse.papyrus.sysml.modelelements.ModelelementsPackage;
+import org.eclipse.papyrus.sysml.modelelements.Problem;
+import org.eclipse.uml2.uml.Comment;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object ' <em><b>Problem</b></em>'. <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.modelelements.internal.impl.ProblemImpl#getBase_Comment <em>Base Comment</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ProblemImpl extends MinimalEObjectImpl.Container implements Problem {
+
+ /**
+ * The cached value of the '{@link #getBase_Comment() <em>Base Comment</em>}' reference.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #getBase_Comment()
+ * @generated
+ * @ordered
+ */
+ protected Comment base_Comment;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ProblemImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Comment basicGetBase_Comment() {
+ return base_Comment;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case ModelelementsPackage.PROBLEM__BASE_COMMENT:
+ if (resolve) {
+ return getBase_Comment();
+ }
+ return basicGetBase_Comment();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ModelelementsPackage.PROBLEM__BASE_COMMENT:
+ return base_Comment != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case ModelelementsPackage.PROBLEM__BASE_COMMENT:
+ setBase_Comment((Comment) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ModelelementsPackage.Literals.PROBLEM;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ModelelementsPackage.PROBLEM__BASE_COMMENT:
+ setBase_Comment((Comment) null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Comment getBase_Comment() {
+ if (base_Comment != null && base_Comment.eIsProxy()) {
+ InternalEObject oldBase_Comment = (InternalEObject) base_Comment;
+ base_Comment = (Comment) eResolveProxy(oldBase_Comment);
+ if (base_Comment != oldBase_Comment) {
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ModelelementsPackage.PROBLEM__BASE_COMMENT, oldBase_Comment, base_Comment));
+ }
+ }
+ }
+ return base_Comment;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setBase_Comment(Comment newBase_Comment) {
+ Comment oldBase_Comment = base_Comment;
+ base_Comment = newBase_Comment;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, ModelelementsPackage.PROBLEM__BASE_COMMENT, oldBase_Comment, base_Comment));
+ }
+ }
+
+} // ProblemImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/modelelements/internal/impl/RationaleImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/modelelements/internal/impl/RationaleImpl.java
new file mode 100755
index 0000000..e99f62c
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/modelelements/internal/impl/RationaleImpl.java
@@ -0,0 +1,168 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelelements.internal.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+import org.eclipse.papyrus.sysml.modelelements.ModelelementsPackage;
+import org.eclipse.papyrus.sysml.modelelements.Rationale;
+import org.eclipse.uml2.uml.Comment;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object ' <em><b>Rationale</b></em>'. <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.modelelements.internal.impl.RationaleImpl#getBase_Comment <em>Base Comment</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class RationaleImpl extends MinimalEObjectImpl.Container implements Rationale {
+
+ /**
+ * The cached value of the '{@link #getBase_Comment() <em>Base Comment</em>}' reference.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #getBase_Comment()
+ * @generated
+ * @ordered
+ */
+ protected Comment base_Comment;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected RationaleImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Comment basicGetBase_Comment() {
+ return base_Comment;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case ModelelementsPackage.RATIONALE__BASE_COMMENT:
+ if (resolve) {
+ return getBase_Comment();
+ }
+ return basicGetBase_Comment();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ModelelementsPackage.RATIONALE__BASE_COMMENT:
+ return base_Comment != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case ModelelementsPackage.RATIONALE__BASE_COMMENT:
+ setBase_Comment((Comment) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ModelelementsPackage.Literals.RATIONALE;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ModelelementsPackage.RATIONALE__BASE_COMMENT:
+ setBase_Comment((Comment) null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Comment getBase_Comment() {
+ if (base_Comment != null && base_Comment.eIsProxy()) {
+ InternalEObject oldBase_Comment = (InternalEObject) base_Comment;
+ base_Comment = (Comment) eResolveProxy(oldBase_Comment);
+ if (base_Comment != oldBase_Comment) {
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ModelelementsPackage.RATIONALE__BASE_COMMENT, oldBase_Comment, base_Comment));
+ }
+ }
+ }
+ return base_Comment;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setBase_Comment(Comment newBase_Comment) {
+ Comment oldBase_Comment = base_Comment;
+ base_Comment = newBase_Comment;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, ModelelementsPackage.RATIONALE__BASE_COMMENT, oldBase_Comment, base_Comment));
+ }
+ }
+
+} // RationaleImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/modelelements/internal/impl/ViewImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/modelelements/internal/impl/ViewImpl.java
new file mode 100755
index 0000000..595b4ba
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/modelelements/internal/impl/ViewImpl.java
@@ -0,0 +1,235 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelelements.internal.impl;
+
+import java.util.Iterator;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+import org.eclipse.papyrus.sysml.modelelements.Conform;
+import org.eclipse.papyrus.sysml.modelelements.ModelelementsPackage;
+import org.eclipse.papyrus.sysml.modelelements.View;
+import org.eclipse.papyrus.sysml.modelelements.ViewPoint;
+import org.eclipse.uml2.uml.Dependency;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object ' <em><b>View</b></em>'. <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.modelelements.internal.impl.ViewImpl#getViewPoint <em>View Point</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.modelelements.internal.impl.ViewImpl#getBase_Package <em>Base Package</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ViewImpl extends MinimalEObjectImpl.Container implements View {
+
+ /**
+ * The cached value of the '{@link #getBase_Package() <em>Base Package</em>}' reference.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #getBase_Package()
+ * @generated
+ * @ordered
+ */
+ protected org.eclipse.uml2.uml.Package base_Package;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ViewImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public org.eclipse.uml2.uml.Package basicGetBase_Package() {
+ return base_Package;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public ViewPoint basicGetViewPoint() {
+ // ViewPoint is related to View via a Conform dependency
+ ViewPoint viewPoint = null;
+ Conform conform = null;
+
+ if (getBase_Package() != null) {
+ // Find Conform link
+ Iterator<Dependency> itDep = getBase_Package().getClientDependencies().iterator();
+ while (itDep.hasNext() && (conform == null)) {
+ Dependency currentDependency = itDep.next();
+ conform = UMLUtil.getStereotypeApplication(currentDependency, Conform.class);
+ }
+
+ // Find ViewPoint
+ if (conform != null) {
+ Iterator<Element> itElt = conform.getBase_Dependency().getTargets().iterator();
+ while (itElt.hasNext()) {
+ Element currentElt = itElt.next();
+ viewPoint = UMLUtil.getStereotypeApplication(currentElt, ViewPoint.class);
+ }
+ }
+ }
+ return viewPoint;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case ModelelementsPackage.VIEW__VIEW_POINT:
+ if (resolve) {
+ return getViewPoint();
+ }
+ return basicGetViewPoint();
+ case ModelelementsPackage.VIEW__BASE_PACKAGE:
+ if (resolve) {
+ return getBase_Package();
+ }
+ return basicGetBase_Package();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ModelelementsPackage.VIEW__VIEW_POINT:
+ return basicGetViewPoint() != null;
+ case ModelelementsPackage.VIEW__BASE_PACKAGE:
+ return base_Package != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case ModelelementsPackage.VIEW__BASE_PACKAGE:
+ setBase_Package((org.eclipse.uml2.uml.Package) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ModelelementsPackage.Literals.VIEW;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ModelelementsPackage.VIEW__BASE_PACKAGE:
+ setBase_Package((org.eclipse.uml2.uml.Package) null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public org.eclipse.uml2.uml.Package getBase_Package() {
+ if (base_Package != null && base_Package.eIsProxy()) {
+ InternalEObject oldBase_Package = (InternalEObject) base_Package;
+ base_Package = (org.eclipse.uml2.uml.Package) eResolveProxy(oldBase_Package);
+ if (base_Package != oldBase_Package) {
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ModelelementsPackage.VIEW__BASE_PACKAGE, oldBase_Package, base_Package));
+ }
+ }
+ }
+ return base_Package;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ViewPoint getViewPoint() {
+ ViewPoint viewPoint = basicGetViewPoint();
+ return viewPoint != null && viewPoint.eIsProxy() ? (ViewPoint) eResolveProxy((InternalEObject) viewPoint) : viewPoint;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setBase_Package(org.eclipse.uml2.uml.Package newBase_Package) {
+ org.eclipse.uml2.uml.Package oldBase_Package = base_Package;
+ base_Package = newBase_Package;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, ModelelementsPackage.VIEW__BASE_PACKAGE, oldBase_Package, base_Package));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public void setViewPoint(ViewPoint newViewPoint) {
+ // TODO: implement this method to set the 'View Point' reference
+ // Ensure that you remove @generated or mark it @generated NOT
+
+ // The exception makes the model opening to fail...
+ // throw new UnsupportedOperationException();
+ }
+
+} // ViewImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/modelelements/internal/impl/ViewPointImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/modelelements/internal/impl/ViewPointImpl.java
new file mode 100755
index 0000000..491dc4c
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/modelelements/internal/impl/ViewPointImpl.java
@@ -0,0 +1,388 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelelements.internal.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+import org.eclipse.emf.ecore.util.EDataTypeEList;
+import org.eclipse.papyrus.sysml.modelelements.ModelelementsPackage;
+import org.eclipse.papyrus.sysml.modelelements.ViewPoint;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object ' <em><b>View Point</b></em>'. <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.modelelements.internal.impl.ViewPointImpl#getBase_Class <em>Base Class</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.modelelements.internal.impl.ViewPointImpl#getStakeHolders <em>Stake Holders</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.modelelements.internal.impl.ViewPointImpl#getPurpose <em>Purpose</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.modelelements.internal.impl.ViewPointImpl#getConcerns <em>Concerns</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.modelelements.internal.impl.ViewPointImpl#getLanguages <em>Languages</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.modelelements.internal.impl.ViewPointImpl#getMethods <em>Methods</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ViewPointImpl extends MinimalEObjectImpl.Container implements ViewPoint {
+
+ /**
+ * The cached value of the '{@link #getBase_Class() <em>Base Class</em>}' reference.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #getBase_Class()
+ * @generated
+ * @ordered
+ */
+ protected org.eclipse.uml2.uml.Class base_Class;
+
+ /**
+ * The cached value of the '{@link #getStakeHolders() <em>Stake Holders</em>}' attribute list.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see #getStakeHolders()
+ * @generated
+ * @ordered
+ */
+ protected EList<String> stakeHolders;
+
+ /**
+ * The default value of the '{@link #getPurpose() <em>Purpose</em>}' attribute.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #getPurpose()
+ * @generated
+ * @ordered
+ */
+ protected static final String PURPOSE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getPurpose() <em>Purpose</em>}' attribute.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #getPurpose()
+ * @generated
+ * @ordered
+ */
+ protected String purpose = PURPOSE_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getConcerns() <em>Concerns</em>}' attribute list.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #getConcerns()
+ * @generated
+ * @ordered
+ */
+ protected EList<String> concerns;
+
+ /**
+ * The cached value of the '{@link #getLanguages() <em>Languages</em>}' attribute list.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #getLanguages()
+ * @generated
+ * @ordered
+ */
+ protected EList<String> languages;
+
+ /**
+ * The cached value of the '{@link #getMethods() <em>Methods</em>}' attribute list.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #getMethods()
+ * @generated
+ * @ordered
+ */
+ protected EList<String> methods;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ViewPointImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public org.eclipse.uml2.uml.Class basicGetBase_Class() {
+ return base_Class;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case ModelelementsPackage.VIEW_POINT__BASE_CLASS:
+ if (resolve) {
+ return getBase_Class();
+ }
+ return basicGetBase_Class();
+ case ModelelementsPackage.VIEW_POINT__STAKE_HOLDERS:
+ return getStakeHolders();
+ case ModelelementsPackage.VIEW_POINT__PURPOSE:
+ return getPurpose();
+ case ModelelementsPackage.VIEW_POINT__CONCERNS:
+ return getConcerns();
+ case ModelelementsPackage.VIEW_POINT__LANGUAGES:
+ return getLanguages();
+ case ModelelementsPackage.VIEW_POINT__METHODS:
+ return getMethods();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ModelelementsPackage.VIEW_POINT__BASE_CLASS:
+ return base_Class != null;
+ case ModelelementsPackage.VIEW_POINT__STAKE_HOLDERS:
+ return stakeHolders != null && !stakeHolders.isEmpty();
+ case ModelelementsPackage.VIEW_POINT__PURPOSE:
+ return PURPOSE_EDEFAULT == null ? purpose != null : !PURPOSE_EDEFAULT.equals(purpose);
+ case ModelelementsPackage.VIEW_POINT__CONCERNS:
+ return concerns != null && !concerns.isEmpty();
+ case ModelelementsPackage.VIEW_POINT__LANGUAGES:
+ return languages != null && !languages.isEmpty();
+ case ModelelementsPackage.VIEW_POINT__METHODS:
+ return methods != null && !methods.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case ModelelementsPackage.VIEW_POINT__BASE_CLASS:
+ setBase_Class((org.eclipse.uml2.uml.Class) newValue);
+ return;
+ case ModelelementsPackage.VIEW_POINT__STAKE_HOLDERS:
+ getStakeHolders().clear();
+ getStakeHolders().addAll((Collection<? extends String>) newValue);
+ return;
+ case ModelelementsPackage.VIEW_POINT__PURPOSE:
+ setPurpose((String) newValue);
+ return;
+ case ModelelementsPackage.VIEW_POINT__CONCERNS:
+ getConcerns().clear();
+ getConcerns().addAll((Collection<? extends String>) newValue);
+ return;
+ case ModelelementsPackage.VIEW_POINT__LANGUAGES:
+ getLanguages().clear();
+ getLanguages().addAll((Collection<? extends String>) newValue);
+ return;
+ case ModelelementsPackage.VIEW_POINT__METHODS:
+ getMethods().clear();
+ getMethods().addAll((Collection<? extends String>) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ModelelementsPackage.Literals.VIEW_POINT;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ModelelementsPackage.VIEW_POINT__BASE_CLASS:
+ setBase_Class((org.eclipse.uml2.uml.Class) null);
+ return;
+ case ModelelementsPackage.VIEW_POINT__STAKE_HOLDERS:
+ getStakeHolders().clear();
+ return;
+ case ModelelementsPackage.VIEW_POINT__PURPOSE:
+ setPurpose(PURPOSE_EDEFAULT);
+ return;
+ case ModelelementsPackage.VIEW_POINT__CONCERNS:
+ getConcerns().clear();
+ return;
+ case ModelelementsPackage.VIEW_POINT__LANGUAGES:
+ getLanguages().clear();
+ return;
+ case ModelelementsPackage.VIEW_POINT__METHODS:
+ getMethods().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public org.eclipse.uml2.uml.Class getBase_Class() {
+ if (base_Class != null && base_Class.eIsProxy()) {
+ InternalEObject oldBase_Class = (InternalEObject) base_Class;
+ base_Class = (org.eclipse.uml2.uml.Class) eResolveProxy(oldBase_Class);
+ if (base_Class != oldBase_Class) {
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ModelelementsPackage.VIEW_POINT__BASE_CLASS, oldBase_Class, base_Class));
+ }
+ }
+ }
+ return base_Class;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EList<String> getConcerns() {
+ if (concerns == null) {
+ concerns = new EDataTypeEList<String>(String.class, this, ModelelementsPackage.VIEW_POINT__CONCERNS);
+ }
+ return concerns;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EList<String> getLanguages() {
+ if (languages == null) {
+ languages = new EDataTypeEList<String>(String.class, this, ModelelementsPackage.VIEW_POINT__LANGUAGES);
+ }
+ return languages;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EList<String> getMethods() {
+ if (methods == null) {
+ methods = new EDataTypeEList<String>(String.class, this, ModelelementsPackage.VIEW_POINT__METHODS);
+ }
+ return methods;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public String getPurpose() {
+ return purpose;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EList<String> getStakeHolders() {
+ if (stakeHolders == null) {
+ stakeHolders = new EDataTypeEList<String>(String.class, this, ModelelementsPackage.VIEW_POINT__STAKE_HOLDERS);
+ }
+ return stakeHolders;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setBase_Class(org.eclipse.uml2.uml.Class newBase_Class) {
+ org.eclipse.uml2.uml.Class oldBase_Class = base_Class;
+ base_Class = newBase_Class;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, ModelelementsPackage.VIEW_POINT__BASE_CLASS, oldBase_Class, base_Class));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setPurpose(String newPurpose) {
+ String oldPurpose = purpose;
+ purpose = newPurpose;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, ModelelementsPackage.VIEW_POINT__PURPOSE, oldPurpose, purpose));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) {
+ return super.toString();
+ }
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (stakeHolders: ");
+ result.append(stakeHolders);
+ result.append(", purpose: ");
+ result.append(purpose);
+ result.append(", concerns: ");
+ result.append(concerns);
+ result.append(", languages: ");
+ result.append(languages);
+ result.append(", methods: ");
+ result.append(methods);
+ result.append(')');
+ return result.toString();
+ }
+
+} // ViewPointImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/modelelements/util/ModelelementsAdapterFactory.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/modelelements/util/ModelelementsAdapterFactory.java
new file mode 100755
index 0000000..77e6eff
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/modelelements/util/ModelelementsAdapterFactory.java
@@ -0,0 +1,218 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelelements.util;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notifier;
+import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.sysml.modelelements.Conform;
+import org.eclipse.papyrus.sysml.modelelements.ModelelementsPackage;
+import org.eclipse.papyrus.sysml.modelelements.Problem;
+import org.eclipse.papyrus.sysml.modelelements.Rationale;
+import org.eclipse.papyrus.sysml.modelelements.View;
+import org.eclipse.papyrus.sysml.modelelements.ViewPoint;
+
+/**
+ * <!-- begin-user-doc --> The <b>Adapter Factory</b> for the model. It provides
+ * an adapter <code>createXXX</code> method for each class of the model. <!--
+ * end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.modelelements.ModelelementsPackage
+ * @generated
+ */
+public class ModelelementsAdapterFactory extends AdapterFactoryImpl {
+
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected static ModelelementsPackage modelPackage;
+
+ /**
+ * The switch that delegates to the <code>createXXX</code> methods. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ModelelementsSwitch<Adapter> modelSwitch = new ModelelementsSwitch<Adapter>() {
+
+ @Override
+ public Adapter caseConform(Conform object) {
+ return createConformAdapter();
+ }
+
+ @Override
+ public Adapter caseView(View object) {
+ return createViewAdapter();
+ }
+
+ @Override
+ public Adapter caseViewPoint(ViewPoint object) {
+ return createViewPointAdapter();
+ }
+
+ @Override
+ public Adapter caseRationale(Rationale object) {
+ return createRationaleAdapter();
+ }
+
+ @Override
+ public Adapter caseProblem(Problem object) {
+ return createProblemAdapter();
+ }
+
+ @Override
+ public Adapter defaultCase(EObject object) {
+ return createEObjectAdapter();
+ }
+ };
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public ModelelementsAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = ModelelementsPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Creates an adapter for the <code>target</code>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @param target
+ * the object to adapt.
+ * @return the adapter for the <code>target</code>.
+ * @generated
+ */
+ @Override
+ public Adapter createAdapter(Notifier target) {
+ return modelSwitch.doSwitch((EObject) target);
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.sysml.modelelements.Conform <em>Conform</em>}'.
+ * <!-- begin-user-doc
+ * --> This default implementation returns null so
+ * that we can easily ignore cases; it's useful to ignore a case when
+ * inheritance will catch all the cases anyway. <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.sysml.modelelements.Conform
+ * @generated
+ */
+ public Adapter createConformAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for the default case.
+ * <!-- begin-user-doc --> This
+ * default implementation returns null. <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @generated
+ */
+ public Adapter createEObjectAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.sysml.modelelements.Problem <em>Problem</em>}'.
+ * <!-- begin-user-doc
+ * --> This default implementation returns null so
+ * that we can easily ignore cases; it's useful to ignore a case when
+ * inheritance will catch all the cases anyway. <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.sysml.modelelements.Problem
+ * @generated
+ */
+ public Adapter createProblemAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class ' {@link org.eclipse.papyrus.sysml.modelelements.Rationale
+ * <em>Rationale</em>}'. <!-- begin-user-doc --> This default implementation
+ * returns null so that we can easily ignore cases; it's useful to ignore a
+ * case when inheritance will catch all the cases anyway. <!-- end-user-doc
+ * -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.sysml.modelelements.Rationale
+ * @generated
+ */
+ public Adapter createRationaleAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class ' {@link org.eclipse.papyrus.sysml.modelelements.View <em>View</em>}'. <!--
+ * begin-user-doc --> This default implementation returns null so that we
+ * can easily ignore cases; it's useful to ignore a case when inheritance
+ * will catch all the cases anyway. <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.sysml.modelelements.View
+ * @generated
+ */
+ public Adapter createViewAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.sysml.modelelements.ViewPoint <em>View Point</em>}'.
+ * <!-- begin-user-doc --> This default
+ * implementation returns null so that we can easily ignore cases; it's
+ * useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.sysml.modelelements.ViewPoint
+ * @generated
+ */
+ public Adapter createViewPointAdapter() {
+ return null;
+ }
+
+ /**
+ * Returns whether this factory is applicable for the type of the object.
+ * <!-- begin-user-doc --> This implementation returns <code>true</code> if
+ * the object is either the model's package or is an instance object of the
+ * model. <!-- end-user-doc -->
+ *
+ * @return whether this factory is applicable for the type of the object.
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object object) {
+ if (object == modelPackage) {
+ return true;
+ }
+ if (object instanceof EObject) {
+ return ((EObject) object).eClass().getEPackage() == modelPackage;
+ }
+ return false;
+ }
+
+} // ModelelementsAdapterFactory
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/modelelements/util/ModelelementsResourceFactoryImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/modelelements/util/ModelelementsResourceFactoryImpl.java
new file mode 100755
index 0000000..1fa9ecb
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/modelelements/util/ModelelementsResourceFactoryImpl.java
@@ -0,0 +1,63 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelelements.util;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl;
+import org.eclipse.emf.ecore.xmi.XMLResource;
+
+/**
+ * <!-- begin-user-doc --> The <b>Resource Factory</b> associated with the
+ * package. <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.modelelements.util.ModelelementsResourceImpl
+ * @generated
+ */
+public class ModelelementsResourceFactoryImpl extends ResourceFactoryImpl {
+
+ /**
+ * Creates an instance of the resource factory.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public ModelelementsResourceFactoryImpl() {
+ super();
+ }
+
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Resource createResource(URI uri) {
+ XMLResource result = new ModelelementsResourceImpl(uri);
+ result.getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
+ result.getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
+
+ result.getDefaultSaveOptions().put(XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE);
+
+ result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
+ result.getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
+
+ result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_LEXICAL_HANDLER, Boolean.TRUE);
+ return result;
+ }
+
+} // ModelelementsResourceFactoryImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/modelelements/util/ModelelementsResourceImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/modelelements/util/ModelelementsResourceImpl.java
new file mode 100755
index 0000000..b8ff036
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/modelelements/util/ModelelementsResourceImpl.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelelements.util;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl;
+
+/**
+ * <!-- begin-user-doc --> The <b>Resource </b> associated with the package.
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.modelelements.util.ModelelementsResourceFactoryImpl
+ * @generated
+ */
+public class ModelelementsResourceImpl extends XMLResourceImpl {
+
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @param uri
+ * the URI of the new resource.
+ * @generated
+ */
+ public ModelelementsResourceImpl(URI uri) {
+ super(uri);
+ }
+
+} // ModelelementsResourceImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/modelelements/util/ModelelementsSwitch.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/modelelements/util/ModelelementsSwitch.java
new file mode 100755
index 0000000..29f0379
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/modelelements/util/ModelelementsSwitch.java
@@ -0,0 +1,224 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelelements.util;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.util.Switch;
+import org.eclipse.papyrus.sysml.modelelements.Conform;
+import org.eclipse.papyrus.sysml.modelelements.ModelelementsPackage;
+import org.eclipse.papyrus.sysml.modelelements.Problem;
+import org.eclipse.papyrus.sysml.modelelements.Rationale;
+import org.eclipse.papyrus.sysml.modelelements.View;
+import org.eclipse.papyrus.sysml.modelelements.ViewPoint;
+
+/**
+ * <!-- begin-user-doc --> The <b>Switch</b> for the model's inheritance
+ * hierarchy. It supports the call {@link #doSwitch(EObject) doSwitch(object)} to invoke the <code>caseXXX</code> method for each class of the model,
+ * starting with the actual class of the object and proceeding up the
+ * inheritance hierarchy until a non-null result is returned, which is the
+ * result of the switch. <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.modelelements.ModelelementsPackage
+ * @generated
+ */
+public class ModelelementsSwitch<T> extends Switch<T> {
+
+ /**
+ * The cached model package
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected static ModelelementsPackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public ModelelementsSwitch() {
+ if (modelPackage == null) {
+ modelPackage = ModelelementsPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Checks whether this is a switch for the given package. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @parameter ePackage the package in question.
+ * @return whether this is a switch for the given package.
+ * @generated
+ */
+ @Override
+ protected boolean isSwitchFor(EPackage ePackage) {
+ return ePackage == modelPackage;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Conform</em>'.
+ * <!-- begin-user-doc --> This implementation returns
+ * null; returning a non-null result will terminate the switch. <!--
+ * end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Conform</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseConform(Conform object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Problem</em>'.
+ * <!-- begin-user-doc --> This implementation returns
+ * null; returning a non-null result will terminate the switch. <!--
+ * end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Problem</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseProblem(Problem object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Rationale</em>'.
+ * <!-- begin-user-doc --> This implementation returns
+ * null; returning a non-null result will terminate the switch. <!--
+ * end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Rationale</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseRationale(Rationale object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of ' <em>View</em>'. <!-- begin-user-doc --> This implementation returns null;
+ * returning a non-null result will terminate the switch. <!-- end-user-doc
+ * -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of ' <em>View</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseView(View object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>View Point</em>'.
+ * <!-- begin-user-doc --> This implementation returns
+ * null; returning a non-null result will terminate the switch. <!--
+ * end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>View Point</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseViewPoint(ViewPoint object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * <!-- begin-user-doc --> This implementation returns
+ * null; returning a non-null result will terminate the switch, but this is
+ * the last case anyway. <!-- end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+ * @generated
+ */
+ @Override
+ public T defaultCase(EObject object) {
+ return null;
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ @Override
+ protected T doSwitch(int classifierID, EObject theEObject) {
+ switch (classifierID) {
+ case ModelelementsPackage.CONFORM: {
+ Conform conform = (Conform) theEObject;
+ T result = caseConform(conform);
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case ModelelementsPackage.VIEW: {
+ View view = (View) theEObject;
+ T result = caseView(view);
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case ModelelementsPackage.VIEW_POINT: {
+ ViewPoint viewPoint = (ViewPoint) theEObject;
+ T result = caseViewPoint(viewPoint);
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case ModelelementsPackage.RATIONALE: {
+ Rationale rationale = (Rationale) theEObject;
+ T result = caseRationale(rationale);
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case ModelelementsPackage.PROBLEM: {
+ Problem problem = (Problem) theEObject;
+ T result = caseProblem(problem);
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ default:
+ return defaultCase(theEObject);
+ }
+ }
+
+} // ModelelementsSwitch
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/modelelements/util/ModelelementsXMLProcessor.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/modelelements/util/ModelelementsXMLProcessor.java
new file mode 100755
index 0000000..5bbbfe2
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/modelelements/util/ModelelementsXMLProcessor.java
@@ -0,0 +1,60 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelelements.util;
+
+import java.util.Map;
+
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.xmi.util.XMLProcessor;
+import org.eclipse.papyrus.sysml.modelelements.ModelelementsPackage;
+
+/**
+ * This class contains helper methods to serialize and deserialize XML documents
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class ModelelementsXMLProcessor extends XMLProcessor {
+
+ /**
+ * Public constructor to instantiate the helper.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ModelelementsXMLProcessor() {
+ super((EPackage.Registry.INSTANCE));
+ ModelelementsPackage.eINSTANCE.eClass();
+ }
+
+ /**
+ * Register for "*" and "xml" file extensions the ModelelementsResourceFactoryImpl factory.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected Map<String, Resource.Factory> getRegistrations() {
+ if (registrations == null) {
+ super.getRegistrations();
+ registrations.put(XML_EXTENSION, new ModelelementsResourceFactoryImpl());
+ registrations.put(STAR_EXTENSION, new ModelelementsResourceFactoryImpl());
+ }
+ return registrations;
+ }
+
+} // ModelelementsXMLProcessor
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/portandflows/FlowDirection.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/portandflows/FlowDirection.java
new file mode 100755
index 0000000..8a6c4a6
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/portandflows/FlowDirection.java
@@ -0,0 +1,248 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.portandflows;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.emf.common.util.Enumerator;
+
+/**
+ * <!-- begin-user-doc --> A representation of the literals of the enumeration ' <em><b>Flow Direction</b></em>', and utility methods for working with
+ * them.
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.portandflows.PortandflowsPackage#getFlowDirection()
+ * @model
+ * @generated
+ */
+public enum FlowDirection implements Enumerator {
+ /**
+ * The '<em><b>In</b></em>' literal object.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see #IN_VALUE
+ * @generated
+ * @ordered
+ */
+ IN(0, "in", "in"),
+
+ /**
+ * The '<em><b>Out</b></em>' literal object.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see #OUT_VALUE
+ * @generated
+ * @ordered
+ */
+ OUT(1, "out", "out"),
+
+ /**
+ * The '<em><b>Inout</b></em>' literal object.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see #INOUT_VALUE
+ * @generated
+ * @ordered
+ */
+ INOUT(2, "inout", "inout");
+
+ /**
+ * The '<em><b>In</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>In</b></em>' literal object isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @see #IN
+ * @model name="in"
+ * @generated
+ * @ordered
+ */
+ public static final int IN_VALUE = 0;
+
+ /**
+ * The '<em><b>Out</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>Out</b></em>' literal object isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @see #OUT
+ * @model name="out"
+ * @generated
+ * @ordered
+ */
+ public static final int OUT_VALUE = 1;
+
+ /**
+ * The '<em><b>Inout</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>Inout</b></em>' literal object isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @see #INOUT
+ * @model name="inout"
+ * @generated
+ * @ordered
+ */
+ public static final int INOUT_VALUE = 2;
+
+ /**
+ * An array of all the '<em><b>Flow Direction</b></em>' enumerators. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private static final FlowDirection[] VALUES_ARRAY = new FlowDirection[] { IN, OUT, INOUT, };
+
+ /**
+ * A public read-only list of all the '<em><b>Flow Direction</b></em>' enumerators.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static final List<FlowDirection> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
+
+ /**
+ * Returns the '<em><b>Flow Direction</b></em>' literal with the specified integer value.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static FlowDirection get(int value) {
+ switch (value) {
+ case IN_VALUE:
+ return IN;
+ case OUT_VALUE:
+ return OUT;
+ case INOUT_VALUE:
+ return INOUT;
+ }
+ return null;
+ }
+
+ /**
+ * Returns the '<em><b>Flow Direction</b></em>' literal with the specified literal value.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static FlowDirection get(String literal) {
+ for (int i = 0; i < VALUES_ARRAY.length; ++i) {
+ FlowDirection result = VALUES_ARRAY[i];
+ if (result.toString().equals(literal)) {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the '<em><b>Flow Direction</b></em>' literal with the specified name.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static FlowDirection getByName(String name) {
+ for (int i = 0; i < VALUES_ARRAY.length; ++i) {
+ FlowDirection result = VALUES_ARRAY[i];
+ if (result.getName().equals(name)) {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private final int value;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private final String name;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private final String literal;
+
+ /**
+ * Only this class can construct instances.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ private FlowDirection(int value, String name, String literal) {
+ this.value = value;
+ this.name = name;
+ this.literal = literal;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public String getLiteral() {
+ return literal;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public int getValue() {
+ return value;
+ }
+
+ /**
+ * Returns the literal value of the enumerator, which is its string representation.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String toString() {
+ return literal;
+ }
+
+} // FlowDirection
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/portandflows/FlowPort.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/portandflows/FlowPort.java
new file mode 100755
index 0000000..6327dd2
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/portandflows/FlowPort.java
@@ -0,0 +1,152 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.portandflows;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.uml2.uml.Image;
+import org.eclipse.uml2.uml.Port;
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object ' <em><b>Flow Port</b></em>'. <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.portandflows.FlowPort#getBase_Port <em>Base Port</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.portandflows.FlowPort#isAtomic <em>Is Atomic</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.portandflows.FlowPort#isConjugated <em>Is Conjugated</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.portandflows.FlowPort#getDirection <em>Direction</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.sysml.portandflows.PortandflowsPackage#getFlowPort()
+ * @model
+ * @generated
+ */
+public interface FlowPort extends EObject {
+
+ /**
+ * Returns the value of the '<em><b>Base Port</b></em>' reference. <!--
+ * begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Base Port</em>' reference isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Base Port</em>' reference.
+ * @see #setBase_Port(Port)
+ * @see org.eclipse.papyrus.sysml.portandflows.PortandflowsPackage#getFlowPort_Base_Port()
+ * @model required="true" ordered="false"
+ * @generated
+ */
+ Port getBase_Port();
+
+ /**
+ * Returns the value of the '<em><b>Direction</b></em>' attribute.
+ * The default value is <code>"inout"</code>.
+ * The literals are from the enumeration {@link org.eclipse.papyrus.sysml.portandflows.FlowDirection}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Direction</em>' attribute isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Direction</em>' attribute.
+ * @see org.eclipse.papyrus.sysml.portandflows.FlowDirection
+ * @see #setDirection(FlowDirection)
+ * @see org.eclipse.papyrus.sysml.portandflows.PortandflowsPackage#getFlowPort_Direction()
+ * @model default="inout" unique="false" required="true" ordered="false"
+ * @generated
+ */
+ FlowDirection getDirection();
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @model kind="operation" required="true" ordered="false"
+ * @generated
+ */
+ Image getIcon();
+
+ /**
+ * Sets the value of the ' {@link org.eclipse.papyrus.sysml.portandflows.FlowPort#getBase_Port
+ * <em>Base Port</em>}' reference. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @param value
+ * the new value of the '<em>Base Port</em>' reference.
+ * @see #getBase_Port()
+ * @generated
+ */
+ void setBase_Port(Port value);
+
+ /**
+ * Returns the value of the '<em><b>Is Atomic</b></em>' attribute.
+ * The default value is <code>"false"</code>.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Is Atomic</em>' attribute isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Is Atomic</em>' attribute.
+ * @see org.eclipse.papyrus.sysml.portandflows.PortandflowsPackage#getFlowPort_IsAtomic()
+ * @model default="false" unique="false" dataType="org.eclipse.uml2.types.Boolean" required="true" transient="true" changeable="false"
+ * volatile="true" derived="true" ordered="false"
+ * @generated
+ */
+ boolean isAtomic();
+
+ /**
+ * Returns the value of the '<em><b>Is Conjugated</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Is Conjugated</em>' attribute isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Is Conjugated</em>' attribute.
+ * @see #setIsConjugated(boolean)
+ * @see org.eclipse.papyrus.sysml.portandflows.PortandflowsPackage#getFlowPort_IsConjugated()
+ * @model unique="false" dataType="org.eclipse.uml2.types.Boolean" ordered="false"
+ * @generated
+ */
+ boolean isConjugated();
+
+ /**
+ * Sets the value of the ' {@link org.eclipse.papyrus.sysml.portandflows.FlowPort#getDirection
+ * <em>Direction</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @param value
+ * the new value of the '<em>Direction</em>' attribute.
+ * @see org.eclipse.papyrus.sysml.portandflows.FlowDirection
+ * @see #getDirection()
+ * @generated
+ */
+ void setDirection(FlowDirection value);
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.sysml.portandflows.FlowPort#isConjugated <em>Is Conjugated</em>}' attribute.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Is Conjugated</em>' attribute.
+ * @see #isConjugated()
+ * @generated
+ */
+ void setIsConjugated(boolean value);
+
+} // FlowPort
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/portandflows/FlowProperty.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/portandflows/FlowProperty.java
new file mode 100755
index 0000000..8b1d614
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/portandflows/FlowProperty.java
@@ -0,0 +1,105 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.portandflows;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.uml2.uml.Image;
+import org.eclipse.uml2.uml.Property;
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object ' <em><b>Flow Property</b></em>'. <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.portandflows.FlowProperty#getBase_Property <em>Base Property</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.portandflows.FlowProperty#getDirection <em>Direction</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.sysml.portandflows.PortandflowsPackage#getFlowProperty()
+ * @model
+ * @generated
+ */
+public interface FlowProperty extends EObject {
+
+ /**
+ * Returns the value of the '<em><b>Base Property</b></em>' reference. <!--
+ * begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Base Property</em>' reference isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Base Property</em>' reference.
+ * @see #setBase_Property(Property)
+ * @see org.eclipse.papyrus.sysml.portandflows.PortandflowsPackage#getFlowProperty_Base_Property()
+ * @model required="true" ordered="false"
+ * @generated
+ */
+ Property getBase_Property();
+
+ /**
+ * Returns the value of the '<em><b>Direction</b></em>' attribute.
+ * The default value is <code>"inout"</code>.
+ * The literals are from the enumeration {@link org.eclipse.papyrus.sysml.portandflows.FlowDirection}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Direction</em>' attribute isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Direction</em>' attribute.
+ * @see org.eclipse.papyrus.sysml.portandflows.FlowDirection
+ * @see #setDirection(FlowDirection)
+ * @see org.eclipse.papyrus.sysml.portandflows.PortandflowsPackage#getFlowProperty_Direction()
+ * @model default="inout" unique="false" required="true" ordered="false"
+ * @generated
+ */
+ FlowDirection getDirection();
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @model kind="operation" required="true" ordered="false"
+ * @generated
+ */
+ Image getIcon();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.sysml.portandflows.FlowProperty#getBase_Property <em>Base Property</em>}' reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Base Property</em>' reference.
+ * @see #getBase_Property()
+ * @generated
+ */
+ void setBase_Property(Property value);
+
+ /**
+ * Sets the value of the ' {@link org.eclipse.papyrus.sysml.portandflows.FlowProperty#getDirection
+ * <em>Direction</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @param value
+ * the new value of the '<em>Direction</em>' attribute.
+ * @see org.eclipse.papyrus.sysml.portandflows.FlowDirection
+ * @see #getDirection()
+ * @generated
+ */
+ void setDirection(FlowDirection value);
+
+} // FlowProperty
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/portandflows/FlowSpecification.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/portandflows/FlowSpecification.java
new file mode 100755
index 0000000..1955181
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/portandflows/FlowSpecification.java
@@ -0,0 +1,63 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.portandflows;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.uml2.uml.Interface;
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object ' <em><b>Flow Specification</b></em> '. <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.portandflows.FlowSpecification#getBase_Interface <em>Base Interface</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.sysml.portandflows.PortandflowsPackage#getFlowSpecification()
+ * @model
+ * @generated
+ */
+public interface FlowSpecification extends EObject {
+
+ /**
+ * Returns the value of the '<em><b>Base Interface</b></em>' reference. <!--
+ * begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Base Interface</em>' reference isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Base Interface</em>' reference.
+ * @see #setBase_Interface(Interface)
+ * @see org.eclipse.papyrus.sysml.portandflows.PortandflowsPackage#getFlowSpecification_Base_Interface()
+ * @model required="true" ordered="false"
+ * @generated
+ */
+ Interface getBase_Interface();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.sysml.portandflows.FlowSpecification#getBase_Interface <em>Base Interface</em>}' reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Base Interface</em>' reference.
+ * @see #getBase_Interface()
+ * @generated
+ */
+ void setBase_Interface(Interface value);
+
+} // FlowSpecification
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/portandflows/ItemFlow.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/portandflows/ItemFlow.java
new file mode 100755
index 0000000..d4b02f8
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/portandflows/ItemFlow.java
@@ -0,0 +1,94 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.portandflows;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.uml2.uml.InformationFlow;
+import org.eclipse.uml2.uml.Property;
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object ' <em><b>Item Flow</b></em>'. <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.portandflows.ItemFlow#getBase_InformationFlow <em>Base Information Flow</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.portandflows.ItemFlow#getItemProperty <em>Item Property</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.sysml.portandflows.PortandflowsPackage#getItemFlow()
+ * @model
+ * @generated
+ */
+public interface ItemFlow extends EObject {
+
+ /**
+ * Returns the value of the '<em><b>Base Information Flow</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Base Information Flow</em>' reference isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Base Information Flow</em>' reference.
+ * @see #setBase_InformationFlow(InformationFlow)
+ * @see org.eclipse.papyrus.sysml.portandflows.PortandflowsPackage#getItemFlow_Base_InformationFlow()
+ * @model required="true" ordered="false"
+ * @generated
+ */
+ InformationFlow getBase_InformationFlow();
+
+ /**
+ * Returns the value of the '<em><b>Item Property</b></em>' reference. <!--
+ * begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Item Property</em>' reference isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Item Property</em>' reference.
+ * @see #setItemProperty(Property)
+ * @see org.eclipse.papyrus.sysml.portandflows.PortandflowsPackage#getItemFlow_ItemProperty()
+ * @model ordered="false"
+ * @generated
+ */
+ Property getItemProperty();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.sysml.portandflows.ItemFlow#getBase_InformationFlow <em>Base Information Flow</em>}'
+ * reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Base Information Flow</em>' reference.
+ * @see #getBase_InformationFlow()
+ * @generated
+ */
+ void setBase_InformationFlow(InformationFlow value);
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.sysml.portandflows.ItemFlow#getItemProperty <em>Item Property</em>}' reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Item Property</em>' reference.
+ * @see #getItemProperty()
+ * @generated
+ */
+ void setItemProperty(Property value);
+
+} // ItemFlow
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/portandflows/PortandflowsFactory.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/portandflows/PortandflowsFactory.java
new file mode 100755
index 0000000..dfb6d9a
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/portandflows/PortandflowsFactory.java
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.portandflows;
+
+import org.eclipse.emf.ecore.EFactory;
+
+/**
+ * <!-- begin-user-doc --> The <b>Factory</b> for the model. It provides a
+ * create method for each non-abstract class of the model. <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.portandflows.PortandflowsPackage
+ * @generated
+ */
+public interface PortandflowsFactory extends EFactory {
+
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ PortandflowsFactory eINSTANCE = org.eclipse.papyrus.sysml.portandflows.internal.impl.PortandflowsFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>Flow Port</em>'.
+ * <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Flow Port</em>'.
+ * @generated
+ */
+ FlowPort createFlowPort();
+
+ /**
+ * Returns a new object of class '<em>Flow Property</em>'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Flow Property</em>'.
+ * @generated
+ */
+ FlowProperty createFlowProperty();
+
+ /**
+ * Returns a new object of class '<em>Flow Specification</em>'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Flow Specification</em>'.
+ * @generated
+ */
+ FlowSpecification createFlowSpecification();
+
+ /**
+ * Returns a new object of class '<em>Item Flow</em>'.
+ * <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Item Flow</em>'.
+ * @generated
+ */
+ ItemFlow createItemFlow();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the package supported by this factory.
+ * @generated
+ */
+ PortandflowsPackage getPortandflowsPackage();
+
+} // PortandflowsFactory
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/portandflows/PortandflowsPackage.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/portandflows/PortandflowsPackage.java
new file mode 100755
index 0000000..e48b8ad
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/portandflows/PortandflowsPackage.java
@@ -0,0 +1,652 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.portandflows;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EEnum;
+import org.eclipse.emf.ecore.EOperation;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+/**
+ * <!-- begin-user-doc --> The <b>Package</b> for the model. It contains
+ * accessors for the meta objects to represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.portandflows.PortandflowsFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface PortandflowsPackage extends EPackage {
+
+ /**
+ * <!-- begin-user-doc --> Defines literals for the meta objects that
+ * represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ interface Literals {
+
+ /**
+ * The meta object literal for the ' {@link org.eclipse.papyrus.sysml.portandflows.internal.impl.FlowPortImpl
+ * <em>Flow Port</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @see org.eclipse.papyrus.sysml.portandflows.internal.impl.FlowPortImpl
+ * @see org.eclipse.papyrus.sysml.portandflows.internal.impl.PortandflowsPackageImpl#getFlowPort()
+ * @generated
+ */
+ EClass FLOW_PORT = eINSTANCE.getFlowPort();
+
+ /**
+ * The meta object literal for the '<em><b>Base Port</b></em>' reference feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference FLOW_PORT__BASE_PORT = eINSTANCE.getFlowPort_Base_Port();
+
+ /**
+ * The meta object literal for the '<em><b>Is Atomic</b></em>' attribute feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EAttribute FLOW_PORT__IS_ATOMIC = eINSTANCE.getFlowPort_IsAtomic();
+
+ /**
+ * The meta object literal for the '<em><b>Is Conjugated</b></em>' attribute feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EAttribute FLOW_PORT__IS_CONJUGATED = eINSTANCE.getFlowPort_IsConjugated();
+
+ /**
+ * The meta object literal for the '<em><b>Direction</b></em>' attribute feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EAttribute FLOW_PORT__DIRECTION = eINSTANCE.getFlowPort_Direction();
+
+ /**
+ * The meta object literal for the '<em><b>Get Icon</b></em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EOperation FLOW_PORT___GET_ICON = eINSTANCE.getFlowPort__GetIcon();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.sysml.portandflows.internal.impl.FlowPropertyImpl <em>Flow Property</em>}'
+ * class.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.portandflows.internal.impl.FlowPropertyImpl
+ * @see org.eclipse.papyrus.sysml.portandflows.internal.impl.PortandflowsPackageImpl#getFlowProperty()
+ * @generated
+ */
+ EClass FLOW_PROPERTY = eINSTANCE.getFlowProperty();
+
+ /**
+ * The meta object literal for the '<em><b>Base Property</b></em>' reference feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference FLOW_PROPERTY__BASE_PROPERTY = eINSTANCE.getFlowProperty_Base_Property();
+
+ /**
+ * The meta object literal for the '<em><b>Direction</b></em>' attribute feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EAttribute FLOW_PROPERTY__DIRECTION = eINSTANCE.getFlowProperty_Direction();
+
+ /**
+ * The meta object literal for the '<em><b>Get Icon</b></em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EOperation FLOW_PROPERTY___GET_ICON = eINSTANCE.getFlowProperty__GetIcon();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.sysml.portandflows.internal.impl.FlowSpecificationImpl
+ * <em>Flow Specification</em>}' class.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.portandflows.internal.impl.FlowSpecificationImpl
+ * @see org.eclipse.papyrus.sysml.portandflows.internal.impl.PortandflowsPackageImpl#getFlowSpecification()
+ * @generated
+ */
+ EClass FLOW_SPECIFICATION = eINSTANCE.getFlowSpecification();
+
+ /**
+ * The meta object literal for the '<em><b>Base Interface</b></em>' reference feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference FLOW_SPECIFICATION__BASE_INTERFACE = eINSTANCE.getFlowSpecification_Base_Interface();
+
+ /**
+ * The meta object literal for the ' {@link org.eclipse.papyrus.sysml.portandflows.internal.impl.ItemFlowImpl
+ * <em>Item Flow</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @see org.eclipse.papyrus.sysml.portandflows.internal.impl.ItemFlowImpl
+ * @see org.eclipse.papyrus.sysml.portandflows.internal.impl.PortandflowsPackageImpl#getItemFlow()
+ * @generated
+ */
+ EClass ITEM_FLOW = eINSTANCE.getItemFlow();
+
+ /**
+ * The meta object literal for the ' <em><b>Base Information Flow</b></em>' reference feature. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference ITEM_FLOW__BASE_INFORMATION_FLOW = eINSTANCE.getItemFlow_Base_InformationFlow();
+
+ /**
+ * The meta object literal for the '<em><b>Item Property</b></em>' reference feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference ITEM_FLOW__ITEM_PROPERTY = eINSTANCE.getItemFlow_ItemProperty();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.sysml.portandflows.FlowDirection <em>Flow Direction</em>}' enum.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.portandflows.FlowDirection
+ * @see org.eclipse.papyrus.sysml.portandflows.internal.impl.PortandflowsPackageImpl#getFlowDirection()
+ * @generated
+ */
+ EEnum FLOW_DIRECTION = eINSTANCE.getFlowDirection();
+
+ }
+
+ /**
+ * The package name.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ String eNAME = "portandflows";
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ String eNS_URI = "http://www.eclipse.org/papyrus/0.7.0/SysML/PortAndFlows";
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ String eNS_PREFIX = "PortAndFlows";
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ PortandflowsPackage eINSTANCE = org.eclipse.papyrus.sysml.portandflows.internal.impl.PortandflowsPackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.sysml.portandflows.internal.impl.FlowPortImpl <em>Flow Port</em>}' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.portandflows.internal.impl.FlowPortImpl
+ * @see org.eclipse.papyrus.sysml.portandflows.internal.impl.PortandflowsPackageImpl#getFlowPort()
+ * @generated
+ */
+ int FLOW_PORT = 0;
+
+ /**
+ * The feature id for the '<em><b>Base Port</b></em>' reference. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int FLOW_PORT__BASE_PORT = 0;
+
+ /**
+ * The feature id for the '<em><b>Is Atomic</b></em>' attribute. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int FLOW_PORT__IS_ATOMIC = 1;
+
+ /**
+ * The feature id for the '<em><b>Is Conjugated</b></em>' attribute. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int FLOW_PORT__IS_CONJUGATED = 2;
+
+ /**
+ * The feature id for the '<em><b>Direction</b></em>' attribute. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int FLOW_PORT__DIRECTION = 3;
+
+ /**
+ * The number of structural features of the '<em>Flow Port</em>' class. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int FLOW_PORT_FEATURE_COUNT = 4;
+
+ /**
+ * The operation id for the '<em>Get Icon</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int FLOW_PORT___GET_ICON = 0;
+
+ /**
+ * The number of operations of the '<em>Flow Port</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int FLOW_PORT_OPERATION_COUNT = 1;
+
+ /**
+ * The meta object id for the ' {@link org.eclipse.papyrus.sysml.portandflows.internal.impl.FlowPropertyImpl
+ * <em>Flow Property</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @see org.eclipse.papyrus.sysml.portandflows.internal.impl.FlowPropertyImpl
+ * @see org.eclipse.papyrus.sysml.portandflows.internal.impl.PortandflowsPackageImpl#getFlowProperty()
+ * @generated
+ */
+ int FLOW_PROPERTY = 1;
+
+ /**
+ * The feature id for the '<em><b>Base Property</b></em>' reference. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int FLOW_PROPERTY__BASE_PROPERTY = 0;
+
+ /**
+ * The feature id for the '<em><b>Direction</b></em>' attribute. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int FLOW_PROPERTY__DIRECTION = 1;
+
+ /**
+ * The number of structural features of the '<em>Flow Property</em>' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int FLOW_PROPERTY_FEATURE_COUNT = 2;
+
+ /**
+ * The operation id for the '<em>Get Icon</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int FLOW_PROPERTY___GET_ICON = 0;
+
+ /**
+ * The number of operations of the '<em>Flow Property</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int FLOW_PROPERTY_OPERATION_COUNT = 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.sysml.portandflows.internal.impl.FlowSpecificationImpl <em>Flow Specification</em>}'
+ * class.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.portandflows.internal.impl.FlowSpecificationImpl
+ * @see org.eclipse.papyrus.sysml.portandflows.internal.impl.PortandflowsPackageImpl#getFlowSpecification()
+ * @generated
+ */
+ int FLOW_SPECIFICATION = 2;
+
+ /**
+ * The feature id for the '<em><b>Base Interface</b></em>' reference. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int FLOW_SPECIFICATION__BASE_INTERFACE = 0;
+
+ /**
+ * The number of structural features of the '<em>Flow Specification</em>' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int FLOW_SPECIFICATION_FEATURE_COUNT = 1;
+
+ /**
+ * The number of operations of the '<em>Flow Specification</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int FLOW_SPECIFICATION_OPERATION_COUNT = 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.sysml.portandflows.internal.impl.ItemFlowImpl <em>Item Flow</em>}' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.portandflows.internal.impl.ItemFlowImpl
+ * @see org.eclipse.papyrus.sysml.portandflows.internal.impl.PortandflowsPackageImpl#getItemFlow()
+ * @generated
+ */
+ int ITEM_FLOW = 3;
+
+ /**
+ * The feature id for the '<em><b>Base Information Flow</b></em>' reference.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int ITEM_FLOW__BASE_INFORMATION_FLOW = 0;
+
+ /**
+ * The feature id for the '<em><b>Item Property</b></em>' reference. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int ITEM_FLOW__ITEM_PROPERTY = 1;
+
+ /**
+ * The number of structural features of the '<em>Item Flow</em>' class. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int ITEM_FLOW_FEATURE_COUNT = 2;
+
+ /**
+ * The number of operations of the '<em>Item Flow</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int ITEM_FLOW_OPERATION_COUNT = 0;
+
+ /**
+ * The meta object id for the ' {@link org.eclipse.papyrus.sysml.portandflows.FlowDirection
+ * <em>Flow Direction</em>}' enum. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @see org.eclipse.papyrus.sysml.portandflows.FlowDirection
+ * @see org.eclipse.papyrus.sysml.portandflows.internal.impl.PortandflowsPackageImpl#getFlowDirection()
+ * @generated
+ */
+ int FLOW_DIRECTION = 4;
+
+ /**
+ * Returns the meta object for enum '{@link org.eclipse.papyrus.sysml.portandflows.FlowDirection <em>Flow Direction</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for enum '<em>Flow Direction</em>'.
+ * @see org.eclipse.papyrus.sysml.portandflows.FlowDirection
+ * @generated
+ */
+ EEnum getFlowDirection();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.sysml.portandflows.FlowPort <em>Flow Port</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Flow Port</em>'.
+ * @see org.eclipse.papyrus.sysml.portandflows.FlowPort
+ * @generated
+ */
+ EClass getFlowPort();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.sysml.portandflows.FlowPort#getBase_Port <em>Base Port</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference '<em>Base Port</em>'.
+ * @see org.eclipse.papyrus.sysml.portandflows.FlowPort#getBase_Port()
+ * @see #getFlowPort()
+ * @generated
+ */
+ EReference getFlowPort_Base_Port();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.sysml.portandflows.FlowPort#getDirection <em>Direction</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the attribute '<em>Direction</em>'.
+ * @see org.eclipse.papyrus.sysml.portandflows.FlowPort#getDirection()
+ * @see #getFlowPort()
+ * @generated
+ */
+ EAttribute getFlowPort_Direction();
+
+ /**
+ * Returns the meta object for the '{@link org.eclipse.papyrus.sysml.portandflows.FlowPort#getIcon() <em>Get Icon</em>}' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the meta object for the '<em>Get Icon</em>' operation.
+ * @see org.eclipse.papyrus.sysml.portandflows.FlowPort#getIcon()
+ * @generated
+ */
+ EOperation getFlowPort__GetIcon();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.sysml.portandflows.FlowPort#isAtomic <em>Is Atomic</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the attribute '<em>Is Atomic</em>'.
+ * @see org.eclipse.papyrus.sysml.portandflows.FlowPort#isAtomic()
+ * @see #getFlowPort()
+ * @generated
+ */
+ EAttribute getFlowPort_IsAtomic();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.sysml.portandflows.FlowPort#isConjugated <em>Is Conjugated</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the attribute '<em>Is Conjugated</em>'.
+ * @see org.eclipse.papyrus.sysml.portandflows.FlowPort#isConjugated()
+ * @see #getFlowPort()
+ * @generated
+ */
+ EAttribute getFlowPort_IsConjugated();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.sysml.portandflows.FlowProperty <em>Flow Property</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Flow Property</em>'.
+ * @see org.eclipse.papyrus.sysml.portandflows.FlowProperty
+ * @generated
+ */
+ EClass getFlowProperty();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.sysml.portandflows.FlowProperty#getBase_Property <em>Base Property</em>} '.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference '<em>Base Property</em>'.
+ * @see org.eclipse.papyrus.sysml.portandflows.FlowProperty#getBase_Property()
+ * @see #getFlowProperty()
+ * @generated
+ */
+ EReference getFlowProperty_Base_Property();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.sysml.portandflows.FlowProperty#getDirection <em>Direction</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the attribute '<em>Direction</em>'.
+ * @see org.eclipse.papyrus.sysml.portandflows.FlowProperty#getDirection()
+ * @see #getFlowProperty()
+ * @generated
+ */
+ EAttribute getFlowProperty_Direction();
+
+ /**
+ * Returns the meta object for the '{@link org.eclipse.papyrus.sysml.portandflows.FlowProperty#getIcon() <em>Get Icon</em>}' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the meta object for the '<em>Get Icon</em>' operation.
+ * @see org.eclipse.papyrus.sysml.portandflows.FlowProperty#getIcon()
+ * @generated
+ */
+ EOperation getFlowProperty__GetIcon();
+
+ /**
+ * Returns the meta object for class ' {@link org.eclipse.papyrus.sysml.portandflows.FlowSpecification
+ * <em>Flow Specification</em>} '. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @return the meta object for class '<em>Flow Specification</em>'.
+ * @see org.eclipse.papyrus.sysml.portandflows.FlowSpecification
+ * @generated
+ */
+ EClass getFlowSpecification();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.sysml.portandflows.FlowSpecification#getBase_Interface
+ * <em>Base Interface</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference '<em>Base Interface</em>'.
+ * @see org.eclipse.papyrus.sysml.portandflows.FlowSpecification#getBase_Interface()
+ * @see #getFlowSpecification()
+ * @generated
+ */
+ EReference getFlowSpecification_Base_Interface();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.sysml.portandflows.ItemFlow <em>Item Flow</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Item Flow</em>'.
+ * @see org.eclipse.papyrus.sysml.portandflows.ItemFlow
+ * @generated
+ */
+ EClass getItemFlow();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.sysml.portandflows.ItemFlow#getBase_InformationFlow
+ * <em>Base Information Flow</em>}'.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @return the meta object for the reference '<em>Base Information Flow</em>'.
+ * @see org.eclipse.papyrus.sysml.portandflows.ItemFlow#getBase_InformationFlow()
+ * @see #getItemFlow()
+ * @generated
+ */
+ EReference getItemFlow_Base_InformationFlow();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.sysml.portandflows.ItemFlow#getItemProperty <em>Item Property</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference '<em>Item Property</em>'.
+ * @see org.eclipse.papyrus.sysml.portandflows.ItemFlow#getItemProperty()
+ * @see #getItemFlow()
+ * @generated
+ */
+ EReference getItemFlow_ItemProperty();
+
+ /**
+ * Returns the factory that creates the instances of the model. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the factory that creates the instances of the model.
+ * @generated
+ */
+ PortandflowsFactory getPortandflowsFactory();
+
+} // PortandflowsPackage
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/portandflows/internal/impl/FlowPortImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/portandflows/internal/impl/FlowPortImpl.java
new file mode 100755
index 0000000..976c13c
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/portandflows/internal/impl/FlowPortImpl.java
@@ -0,0 +1,409 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.portandflows.internal.impl;
+
+import java.lang.reflect.InvocationTargetException;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+import org.eclipse.papyrus.sysml.portandflows.FlowDirection;
+import org.eclipse.papyrus.sysml.portandflows.FlowPort;
+import org.eclipse.papyrus.sysml.portandflows.FlowSpecification;
+import org.eclipse.papyrus.sysml.portandflows.PortandflowsPackage;
+import org.eclipse.uml2.uml.Image;
+import org.eclipse.uml2.uml.Interface;
+import org.eclipse.uml2.uml.Port;
+import org.eclipse.uml2.uml.Stereotype;
+import org.eclipse.uml2.uml.Type;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object ' <em><b>Flow Port</b></em>'. <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.portandflows.internal.impl.FlowPortImpl#getBase_Port <em>Base Port</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.portandflows.internal.impl.FlowPortImpl#isAtomic <em>Is Atomic</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.portandflows.internal.impl.FlowPortImpl#isConjugated <em>Is Conjugated</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.portandflows.internal.impl.FlowPortImpl#getDirection <em>Direction</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class FlowPortImpl extends MinimalEObjectImpl.Container implements FlowPort {
+
+ /**
+ * The cached value of the '{@link #getBase_Port() <em>Base Port</em>}' reference.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #getBase_Port()
+ * @generated
+ * @ordered
+ */
+ protected Port base_Port;
+
+ /**
+ * The default value of the '{@link #isAtomic() <em>Is Atomic</em>}' attribute.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #isAtomic()
+ * @generated
+ * @ordered
+ */
+ protected static final boolean IS_ATOMIC_EDEFAULT = false;
+
+ /**
+ * The default value of the '{@link #isConjugated() <em>Is Conjugated</em>}' attribute.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see #isConjugated()
+ * @generated
+ * @ordered
+ */
+ protected static final boolean IS_CONJUGATED_EDEFAULT = false;
+
+ /**
+ * The cached value of the '{@link #isConjugated() <em>Is Conjugated</em>}' attribute.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #isConjugated()
+ * @generated
+ * @ordered
+ */
+ protected boolean isConjugated = IS_CONJUGATED_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getDirection() <em>Direction</em>}' attribute.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #getDirection()
+ * @generated
+ * @ordered
+ */
+ protected static final FlowDirection DIRECTION_EDEFAULT = FlowDirection.INOUT;
+
+ /**
+ * The cached value of the '{@link #getDirection() <em>Direction</em>}' attribute.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #getDirection()
+ * @generated
+ * @ordered
+ */
+ protected FlowDirection direction = DIRECTION_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected FlowPortImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Port basicGetBase_Port() {
+ return base_Port;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case PortandflowsPackage.FLOW_PORT__BASE_PORT:
+ if (resolve) {
+ return getBase_Port();
+ }
+ return basicGetBase_Port();
+ case PortandflowsPackage.FLOW_PORT__IS_ATOMIC:
+ return isAtomic();
+ case PortandflowsPackage.FLOW_PORT__IS_CONJUGATED:
+ return isConjugated();
+ case PortandflowsPackage.FLOW_PORT__DIRECTION:
+ return getDirection();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case PortandflowsPackage.FLOW_PORT__BASE_PORT:
+ return base_Port != null;
+ case PortandflowsPackage.FLOW_PORT__IS_ATOMIC:
+ return isAtomic() != IS_ATOMIC_EDEFAULT;
+ case PortandflowsPackage.FLOW_PORT__IS_CONJUGATED:
+ return isConjugated != IS_CONJUGATED_EDEFAULT;
+ case PortandflowsPackage.FLOW_PORT__DIRECTION:
+ return direction != DIRECTION_EDEFAULT;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException {
+ switch (operationID) {
+ case PortandflowsPackage.FLOW_PORT___GET_ICON:
+ return getIcon();
+ }
+ return super.eInvoke(operationID, arguments);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case PortandflowsPackage.FLOW_PORT__BASE_PORT:
+ setBase_Port((Port) newValue);
+ return;
+ case PortandflowsPackage.FLOW_PORT__IS_CONJUGATED:
+ setIsConjugated((Boolean) newValue);
+ return;
+ case PortandflowsPackage.FLOW_PORT__DIRECTION:
+ setDirection((FlowDirection) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return PortandflowsPackage.Literals.FLOW_PORT;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case PortandflowsPackage.FLOW_PORT__BASE_PORT:
+ setBase_Port((Port) null);
+ return;
+ case PortandflowsPackage.FLOW_PORT__IS_CONJUGATED:
+ setIsConjugated(IS_CONJUGATED_EDEFAULT);
+ return;
+ case PortandflowsPackage.FLOW_PORT__DIRECTION:
+ setDirection(DIRECTION_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Port getBase_Port() {
+ if (base_Port != null && base_Port.eIsProxy()) {
+ InternalEObject oldBase_Port = (InternalEObject) base_Port;
+ base_Port = (Port) eResolveProxy(oldBase_Port);
+ if (base_Port != oldBase_Port) {
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, PortandflowsPackage.FLOW_PORT__BASE_PORT, oldBase_Port, base_Port));
+ }
+ }
+ }
+ return base_Port;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public FlowDirection getDirection() {
+ return direction;
+ }
+
+ /**
+ * <!-- begin-user-doc --> Images registered in Profile are : 0 - FlowPort
+ * (default, similar to INOUT) 1 - FlowPort IN 2 - FlowPort OUT 3 - FlowPort
+ * INOUT 4 - FlowPort NA (Non Atomic) <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public Image getIcon() {
+
+ Image ImageNotFound = null;
+
+ if (getBase_Port() != null) {
+
+ Stereotype st = UMLUtil.getStereotype(this);
+
+ Image image = st.getIcons().get(0);
+
+ if (isAtomic()) {
+ if (getDirection() == FlowDirection.IN) {
+ image = st.getIcons().get(1);
+ } else if (getDirection() == FlowDirection.OUT) {
+ image = st.getIcons().get(2);
+ } else if (getDirection() == FlowDirection.INOUT) {
+ image = st.getIcons().get(3);
+ }
+
+ } else {
+ image = st.getIcons().get(4);
+ }
+
+ return image;
+
+ } else {
+ return ImageNotFound;
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setBase_Port(Port newBase_Port) {
+ Port oldBase_Port = base_Port;
+ base_Port = newBase_Port;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, PortandflowsPackage.FLOW_PORT__BASE_PORT, oldBase_Port, base_Port));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public boolean isAtomic() {
+ // The FlowPort is Atomic if it is not typed by a FlowSpecification
+ Boolean isAtomic = true;
+ FlowSpecification flowSpec = null;
+
+ if (getBase_Port() != null) {
+ // Find FlowPort type
+ Type type = getBase_Port().getType();
+ if ((type != null) && (type instanceof Interface)) {
+ flowSpec = UMLUtil.getStereotypeApplication(type, FlowSpecification.class);
+ }
+
+ if (flowSpec != null) {
+ isAtomic = false;
+ }
+ }
+ return isAtomic;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean isConjugated() {
+ return isConjugated;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setDirection(FlowDirection newDirection) {
+ FlowDirection oldDirection = direction;
+ direction = newDirection == null ? DIRECTION_EDEFAULT : newDirection;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, PortandflowsPackage.FLOW_PORT__DIRECTION, oldDirection, direction));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public void setIsAtomic(boolean newIsAtomic) {
+ // TODO: implement this method to set the 'Is Atomic' attribute
+ // Ensure that you remove @generated or mark it @generated NOT
+ // throw new UnsupportedOperationException();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setIsConjugated(boolean newIsConjugated) {
+ boolean oldIsConjugated = isConjugated;
+ isConjugated = newIsConjugated;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, PortandflowsPackage.FLOW_PORT__IS_CONJUGATED, oldIsConjugated, isConjugated));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) {
+ return super.toString();
+ }
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (isConjugated: ");
+ result.append(isConjugated);
+ result.append(", direction: ");
+ result.append(direction);
+ result.append(')');
+ return result.toString();
+ }
+
+} // FlowPortImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/portandflows/internal/impl/FlowPropertyImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/portandflows/internal/impl/FlowPropertyImpl.java
new file mode 100755
index 0000000..07966b4
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/portandflows/internal/impl/FlowPropertyImpl.java
@@ -0,0 +1,293 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.portandflows.internal.impl;
+
+import java.lang.reflect.InvocationTargetException;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+import org.eclipse.papyrus.sysml.portandflows.FlowDirection;
+import org.eclipse.papyrus.sysml.portandflows.FlowProperty;
+import org.eclipse.papyrus.sysml.portandflows.PortandflowsPackage;
+import org.eclipse.uml2.uml.Image;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Stereotype;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object ' <em><b>Flow Property</b></em>'. <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.portandflows.internal.impl.FlowPropertyImpl#getBase_Property <em>Base Property</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.portandflows.internal.impl.FlowPropertyImpl#getDirection <em>Direction</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class FlowPropertyImpl extends MinimalEObjectImpl.Container implements FlowProperty {
+
+ /**
+ * The cached value of the '{@link #getBase_Property() <em>Base Property</em>}' reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see #getBase_Property()
+ * @generated
+ * @ordered
+ */
+ protected Property base_Property;
+
+ /**
+ * The default value of the '{@link #getDirection() <em>Direction</em>}' attribute.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #getDirection()
+ * @generated
+ * @ordered
+ */
+ protected static final FlowDirection DIRECTION_EDEFAULT = FlowDirection.INOUT;
+
+ /**
+ * The cached value of the '{@link #getDirection() <em>Direction</em>}' attribute.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #getDirection()
+ * @generated
+ * @ordered
+ */
+ protected FlowDirection direction = DIRECTION_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected FlowPropertyImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Property basicGetBase_Property() {
+ return base_Property;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case PortandflowsPackage.FLOW_PROPERTY__BASE_PROPERTY:
+ if (resolve) {
+ return getBase_Property();
+ }
+ return basicGetBase_Property();
+ case PortandflowsPackage.FLOW_PROPERTY__DIRECTION:
+ return getDirection();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case PortandflowsPackage.FLOW_PROPERTY__BASE_PROPERTY:
+ return base_Property != null;
+ case PortandflowsPackage.FLOW_PROPERTY__DIRECTION:
+ return direction != DIRECTION_EDEFAULT;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException {
+ switch (operationID) {
+ case PortandflowsPackage.FLOW_PROPERTY___GET_ICON:
+ return getIcon();
+ }
+ return super.eInvoke(operationID, arguments);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case PortandflowsPackage.FLOW_PROPERTY__BASE_PROPERTY:
+ setBase_Property((Property) newValue);
+ return;
+ case PortandflowsPackage.FLOW_PROPERTY__DIRECTION:
+ setDirection((FlowDirection) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return PortandflowsPackage.Literals.FLOW_PROPERTY;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case PortandflowsPackage.FLOW_PROPERTY__BASE_PROPERTY:
+ setBase_Property((Property) null);
+ return;
+ case PortandflowsPackage.FLOW_PROPERTY__DIRECTION:
+ setDirection(DIRECTION_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Property getBase_Property() {
+ if (base_Property != null && base_Property.eIsProxy()) {
+ InternalEObject oldBase_Property = (InternalEObject) base_Property;
+ base_Property = (Property) eResolveProxy(oldBase_Property);
+ if (base_Property != oldBase_Property) {
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, PortandflowsPackage.FLOW_PROPERTY__BASE_PROPERTY, oldBase_Property, base_Property));
+ }
+ }
+ }
+ return base_Property;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public FlowDirection getDirection() {
+ return direction;
+ }
+
+ /**
+ * <!-- begin-user-doc --> Images registered in Profile are : 0 - FlowPort
+ * (default, similar to INOUT) 1 - FlowPort IN 2 - FlowPort OUT 3 - FlowPort
+ * INOUT <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public Image getIcon() {
+
+ Image ImageNotFound = null;
+
+ if (getBase_Property() != null) {
+ Stereotype st = UMLUtil.getStereotype(this);
+
+ Image image = st.getIcons().get(0);
+
+ if (getDirection() == FlowDirection.IN) {
+ image = st.getIcons().get(1);
+ } else if (getDirection() == FlowDirection.OUT) {
+ image = st.getIcons().get(2);
+ } else if (getDirection() == FlowDirection.INOUT) {
+ image = st.getIcons().get(3);
+ }
+
+ return image;
+
+ } else {
+ return ImageNotFound;
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setBase_Property(Property newBase_Property) {
+ Property oldBase_Property = base_Property;
+ base_Property = newBase_Property;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, PortandflowsPackage.FLOW_PROPERTY__BASE_PROPERTY, oldBase_Property, base_Property));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setDirection(FlowDirection newDirection) {
+ FlowDirection oldDirection = direction;
+ direction = newDirection == null ? DIRECTION_EDEFAULT : newDirection;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, PortandflowsPackage.FLOW_PROPERTY__DIRECTION, oldDirection, direction));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) {
+ return super.toString();
+ }
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (direction: ");
+ result.append(direction);
+ result.append(')');
+ return result.toString();
+ }
+
+} // FlowPropertyImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/portandflows/internal/impl/FlowSpecificationImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/portandflows/internal/impl/FlowSpecificationImpl.java
new file mode 100755
index 0000000..f5972e4
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/portandflows/internal/impl/FlowSpecificationImpl.java
@@ -0,0 +1,169 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.portandflows.internal.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+import org.eclipse.papyrus.sysml.portandflows.FlowSpecification;
+import org.eclipse.papyrus.sysml.portandflows.PortandflowsPackage;
+import org.eclipse.uml2.uml.Interface;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object ' <em><b>Flow Specification</b></em> '. <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.portandflows.internal.impl.FlowSpecificationImpl#getBase_Interface <em>Base Interface</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class FlowSpecificationImpl extends MinimalEObjectImpl.Container implements FlowSpecification {
+
+ /**
+ * The cached value of the '{@link #getBase_Interface() <em>Base Interface</em>}' reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see #getBase_Interface()
+ * @generated
+ * @ordered
+ */
+ protected Interface base_Interface;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected FlowSpecificationImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Interface basicGetBase_Interface() {
+ return base_Interface;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case PortandflowsPackage.FLOW_SPECIFICATION__BASE_INTERFACE:
+ if (resolve) {
+ return getBase_Interface();
+ }
+ return basicGetBase_Interface();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case PortandflowsPackage.FLOW_SPECIFICATION__BASE_INTERFACE:
+ return base_Interface != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case PortandflowsPackage.FLOW_SPECIFICATION__BASE_INTERFACE:
+ setBase_Interface((Interface) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return PortandflowsPackage.Literals.FLOW_SPECIFICATION;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case PortandflowsPackage.FLOW_SPECIFICATION__BASE_INTERFACE:
+ setBase_Interface((Interface) null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Interface getBase_Interface() {
+ if (base_Interface != null && base_Interface.eIsProxy()) {
+ InternalEObject oldBase_Interface = (InternalEObject) base_Interface;
+ base_Interface = (Interface) eResolveProxy(oldBase_Interface);
+ if (base_Interface != oldBase_Interface) {
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, PortandflowsPackage.FLOW_SPECIFICATION__BASE_INTERFACE, oldBase_Interface, base_Interface));
+ }
+ }
+ }
+ return base_Interface;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setBase_Interface(Interface newBase_Interface) {
+ Interface oldBase_Interface = base_Interface;
+ base_Interface = newBase_Interface;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, PortandflowsPackage.FLOW_SPECIFICATION__BASE_INTERFACE, oldBase_Interface, base_Interface));
+ }
+ }
+
+} // FlowSpecificationImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/portandflows/internal/impl/ItemFlowImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/portandflows/internal/impl/ItemFlowImpl.java
new file mode 100755
index 0000000..0226413
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/portandflows/internal/impl/ItemFlowImpl.java
@@ -0,0 +1,235 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.portandflows.internal.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+import org.eclipse.papyrus.sysml.portandflows.ItemFlow;
+import org.eclipse.papyrus.sysml.portandflows.PortandflowsPackage;
+import org.eclipse.uml2.uml.InformationFlow;
+import org.eclipse.uml2.uml.Property;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object ' <em><b>Item Flow</b></em>'. <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.portandflows.internal.impl.ItemFlowImpl#getBase_InformationFlow <em>Base Information Flow</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.portandflows.internal.impl.ItemFlowImpl#getItemProperty <em>Item Property</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ItemFlowImpl extends MinimalEObjectImpl.Container implements ItemFlow {
+
+ /**
+ * The cached value of the '{@link #getBase_InformationFlow() <em>Base Information Flow</em>}' reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see #getBase_InformationFlow()
+ * @generated
+ * @ordered
+ */
+ protected InformationFlow base_InformationFlow;
+
+ /**
+ * The cached value of the '{@link #getItemProperty() <em>Item Property</em>}' reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see #getItemProperty()
+ * @generated
+ * @ordered
+ */
+ protected Property itemProperty;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ItemFlowImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public InformationFlow basicGetBase_InformationFlow() {
+ return base_InformationFlow;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Property basicGetItemProperty() {
+ return itemProperty;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case PortandflowsPackage.ITEM_FLOW__BASE_INFORMATION_FLOW:
+ if (resolve) {
+ return getBase_InformationFlow();
+ }
+ return basicGetBase_InformationFlow();
+ case PortandflowsPackage.ITEM_FLOW__ITEM_PROPERTY:
+ if (resolve) {
+ return getItemProperty();
+ }
+ return basicGetItemProperty();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case PortandflowsPackage.ITEM_FLOW__BASE_INFORMATION_FLOW:
+ return base_InformationFlow != null;
+ case PortandflowsPackage.ITEM_FLOW__ITEM_PROPERTY:
+ return itemProperty != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case PortandflowsPackage.ITEM_FLOW__BASE_INFORMATION_FLOW:
+ setBase_InformationFlow((InformationFlow) newValue);
+ return;
+ case PortandflowsPackage.ITEM_FLOW__ITEM_PROPERTY:
+ setItemProperty((Property) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return PortandflowsPackage.Literals.ITEM_FLOW;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case PortandflowsPackage.ITEM_FLOW__BASE_INFORMATION_FLOW:
+ setBase_InformationFlow((InformationFlow) null);
+ return;
+ case PortandflowsPackage.ITEM_FLOW__ITEM_PROPERTY:
+ setItemProperty((Property) null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public InformationFlow getBase_InformationFlow() {
+ if (base_InformationFlow != null && base_InformationFlow.eIsProxy()) {
+ InternalEObject oldBase_InformationFlow = (InternalEObject) base_InformationFlow;
+ base_InformationFlow = (InformationFlow) eResolveProxy(oldBase_InformationFlow);
+ if (base_InformationFlow != oldBase_InformationFlow) {
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, PortandflowsPackage.ITEM_FLOW__BASE_INFORMATION_FLOW, oldBase_InformationFlow, base_InformationFlow));
+ }
+ }
+ }
+ return base_InformationFlow;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Property getItemProperty() {
+ if (itemProperty != null && itemProperty.eIsProxy()) {
+ InternalEObject oldItemProperty = (InternalEObject) itemProperty;
+ itemProperty = (Property) eResolveProxy(oldItemProperty);
+ if (itemProperty != oldItemProperty) {
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, PortandflowsPackage.ITEM_FLOW__ITEM_PROPERTY, oldItemProperty, itemProperty));
+ }
+ }
+ }
+ return itemProperty;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setBase_InformationFlow(InformationFlow newBase_InformationFlow) {
+ InformationFlow oldBase_InformationFlow = base_InformationFlow;
+ base_InformationFlow = newBase_InformationFlow;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, PortandflowsPackage.ITEM_FLOW__BASE_INFORMATION_FLOW, oldBase_InformationFlow, base_InformationFlow));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setItemProperty(Property newItemProperty) {
+ Property oldItemProperty = itemProperty;
+ itemProperty = newItemProperty;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, PortandflowsPackage.ITEM_FLOW__ITEM_PROPERTY, oldItemProperty, itemProperty));
+ }
+ }
+
+} // ItemFlowImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/portandflows/internal/impl/PortandflowsFactoryImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/portandflows/internal/impl/PortandflowsFactoryImpl.java
new file mode 100755
index 0000000..31eeae4
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/portandflows/internal/impl/PortandflowsFactoryImpl.java
@@ -0,0 +1,201 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.portandflows.internal.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+import org.eclipse.papyrus.sysml.portandflows.FlowDirection;
+import org.eclipse.papyrus.sysml.portandflows.FlowPort;
+import org.eclipse.papyrus.sysml.portandflows.FlowProperty;
+import org.eclipse.papyrus.sysml.portandflows.FlowSpecification;
+import org.eclipse.papyrus.sysml.portandflows.ItemFlow;
+import org.eclipse.papyrus.sysml.portandflows.PortandflowsFactory;
+import org.eclipse.papyrus.sysml.portandflows.PortandflowsPackage;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model <b>Factory</b>. <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+public class PortandflowsFactoryImpl extends EFactoryImpl implements PortandflowsFactory {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static PortandflowsPackage getPackage() {
+ return PortandflowsPackage.eINSTANCE;
+ }
+
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public static PortandflowsFactory init() {
+ try {
+ PortandflowsFactory thePortandflowsFactory = (PortandflowsFactory) EPackage.Registry.INSTANCE.getEFactory(PortandflowsPackage.eNS_URI);
+ if (thePortandflowsFactory != null) {
+ return thePortandflowsFactory;
+ }
+ } catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new PortandflowsFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public PortandflowsFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public String convertFlowDirectionToString(EDataType eDataType, Object instanceValue) {
+ return instanceValue == null ? null : instanceValue.toString();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String convertToString(EDataType eDataType, Object instanceValue) {
+ switch (eDataType.getClassifierID()) {
+ case PortandflowsPackage.FLOW_DIRECTION:
+ return convertFlowDirectionToString(eDataType, instanceValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ case PortandflowsPackage.FLOW_PORT:
+ return createFlowPort();
+ case PortandflowsPackage.FLOW_PROPERTY:
+ return createFlowProperty();
+ case PortandflowsPackage.FLOW_SPECIFICATION:
+ return createFlowSpecification();
+ case PortandflowsPackage.ITEM_FLOW:
+ return createItemFlow();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public FlowDirection createFlowDirectionFromString(EDataType eDataType, String initialValue) {
+ FlowDirection result = FlowDirection.get(initialValue);
+ if (result == null) {
+ throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
+ }
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public FlowPort createFlowPort() {
+ FlowPortImpl flowPort = new FlowPortImpl();
+ return flowPort;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public FlowProperty createFlowProperty() {
+ FlowPropertyImpl flowProperty = new FlowPropertyImpl();
+ return flowProperty;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public FlowSpecification createFlowSpecification() {
+ FlowSpecificationImpl flowSpecification = new FlowSpecificationImpl();
+ return flowSpecification;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object createFromString(EDataType eDataType, String initialValue) {
+ switch (eDataType.getClassifierID()) {
+ case PortandflowsPackage.FLOW_DIRECTION:
+ return createFlowDirectionFromString(eDataType, initialValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ItemFlow createItemFlow() {
+ ItemFlowImpl itemFlow = new ItemFlowImpl();
+ return itemFlow;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public PortandflowsPackage getPortandflowsPackage() {
+ return (PortandflowsPackage) getEPackage();
+ }
+
+} // PortandflowsFactoryImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/portandflows/internal/impl/PortandflowsPackageImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/portandflows/internal/impl/PortandflowsPackageImpl.java
new file mode 100755
index 0000000..eec0216
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/portandflows/internal/impl/PortandflowsPackageImpl.java
@@ -0,0 +1,468 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.portandflows.internal.impl;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EEnum;
+import org.eclipse.emf.ecore.EOperation;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+import org.eclipse.papyrus.sysml.SysmlPackage;
+import org.eclipse.papyrus.sysml.activities.ActivitiesPackage;
+import org.eclipse.papyrus.sysml.activities.internal.impl.ActivitiesPackageImpl;
+import org.eclipse.papyrus.sysml.allocations.AllocationsPackage;
+import org.eclipse.papyrus.sysml.allocations.internal.impl.AllocationsPackageImpl;
+import org.eclipse.papyrus.sysml.blocks.BlocksPackage;
+import org.eclipse.papyrus.sysml.blocks.internal.impl.BlocksPackageImpl;
+import org.eclipse.papyrus.sysml.constraints.ConstraintsPackage;
+import org.eclipse.papyrus.sysml.constraints.internal.impl.ConstraintsPackageImpl;
+import org.eclipse.papyrus.sysml.interactions.InteractionsPackage;
+import org.eclipse.papyrus.sysml.interactions.internal.impl.InteractionsPackageImpl;
+import org.eclipse.papyrus.sysml.internal.impl.SysmlPackageImpl;
+import org.eclipse.papyrus.sysml.modelelements.ModelelementsPackage;
+import org.eclipse.papyrus.sysml.modelelements.internal.impl.ModelelementsPackageImpl;
+import org.eclipse.papyrus.sysml.portandflows.FlowDirection;
+import org.eclipse.papyrus.sysml.portandflows.FlowPort;
+import org.eclipse.papyrus.sysml.portandflows.FlowProperty;
+import org.eclipse.papyrus.sysml.portandflows.FlowSpecification;
+import org.eclipse.papyrus.sysml.portandflows.ItemFlow;
+import org.eclipse.papyrus.sysml.portandflows.PortandflowsFactory;
+import org.eclipse.papyrus.sysml.portandflows.PortandflowsPackage;
+import org.eclipse.papyrus.sysml.requirements.RequirementsPackage;
+import org.eclipse.papyrus.sysml.requirements.internal.impl.RequirementsPackageImpl;
+import org.eclipse.papyrus.sysml.statemachines.StatemachinesPackage;
+import org.eclipse.papyrus.sysml.statemachines.internal.impl.StatemachinesPackageImpl;
+import org.eclipse.papyrus.sysml.usecases.UsecasesPackage;
+import org.eclipse.papyrus.sysml.usecases.internal.impl.UsecasesPackageImpl;
+import org.eclipse.uml2.types.TypesPackage;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.eclipse.uml2.uml.profile.standard.StandardPackage;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model <b>Package</b>. <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+public class PortandflowsPackageImpl extends EPackageImpl implements PortandflowsPackage {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private static boolean isInited = false;
+
+ /**
+ * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+ *
+ * <p>
+ * This method is used to initialize {@link PortandflowsPackage#eINSTANCE} when that field is accessed. Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @see #eNS_URI
+ * @see #createPackageContents()
+ * @see #initializePackageContents()
+ * @generated
+ */
+ public static PortandflowsPackage init() {
+ if (isInited) {
+ return (PortandflowsPackage) EPackage.Registry.INSTANCE.getEPackage(PortandflowsPackage.eNS_URI);
+ }
+
+ // Obtain or create and register package
+ PortandflowsPackageImpl thePortandflowsPackage = (PortandflowsPackageImpl) (EPackage.Registry.INSTANCE.get(eNS_URI) instanceof PortandflowsPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new PortandflowsPackageImpl());
+
+ isInited = true;
+
+ // Initialize simple dependencies
+ StandardPackage.eINSTANCE.eClass();
+
+ // Obtain or create and register interdependencies
+ SysmlPackageImpl theSysmlPackage = (SysmlPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(SysmlPackage.eNS_URI) instanceof SysmlPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(SysmlPackage.eNS_URI) : SysmlPackage.eINSTANCE);
+ ModelelementsPackageImpl theModelelementsPackage = (ModelelementsPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(ModelelementsPackage.eNS_URI) instanceof ModelelementsPackageImpl ? EPackage.Registry.INSTANCE
+ .getEPackage(ModelelementsPackage.eNS_URI) : ModelelementsPackage.eINSTANCE);
+ BlocksPackageImpl theBlocksPackage = (BlocksPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(BlocksPackage.eNS_URI) instanceof BlocksPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(BlocksPackage.eNS_URI) : BlocksPackage.eINSTANCE);
+ ConstraintsPackageImpl theConstraintsPackage = (ConstraintsPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(ConstraintsPackage.eNS_URI) instanceof ConstraintsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ConstraintsPackage.eNS_URI)
+ : ConstraintsPackage.eINSTANCE);
+ ActivitiesPackageImpl theActivitiesPackage = (ActivitiesPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(ActivitiesPackage.eNS_URI) instanceof ActivitiesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ActivitiesPackage.eNS_URI)
+ : ActivitiesPackage.eINSTANCE);
+ AllocationsPackageImpl theAllocationsPackage = (AllocationsPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(AllocationsPackage.eNS_URI) instanceof AllocationsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(AllocationsPackage.eNS_URI)
+ : AllocationsPackage.eINSTANCE);
+ RequirementsPackageImpl theRequirementsPackage = (RequirementsPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(RequirementsPackage.eNS_URI) instanceof RequirementsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(RequirementsPackage.eNS_URI)
+ : RequirementsPackage.eINSTANCE);
+ InteractionsPackageImpl theInteractionsPackage = (InteractionsPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(InteractionsPackage.eNS_URI) instanceof InteractionsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(InteractionsPackage.eNS_URI)
+ : InteractionsPackage.eINSTANCE);
+ StatemachinesPackageImpl theStatemachinesPackage = (StatemachinesPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(StatemachinesPackage.eNS_URI) instanceof StatemachinesPackageImpl ? EPackage.Registry.INSTANCE
+ .getEPackage(StatemachinesPackage.eNS_URI) : StatemachinesPackage.eINSTANCE);
+ UsecasesPackageImpl theUsecasesPackage = (UsecasesPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(UsecasesPackage.eNS_URI) instanceof UsecasesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(UsecasesPackage.eNS_URI)
+ : UsecasesPackage.eINSTANCE);
+
+ // Create package meta-data objects
+ thePortandflowsPackage.createPackageContents();
+ theSysmlPackage.createPackageContents();
+ theModelelementsPackage.createPackageContents();
+ theBlocksPackage.createPackageContents();
+ theConstraintsPackage.createPackageContents();
+ theActivitiesPackage.createPackageContents();
+ theAllocationsPackage.createPackageContents();
+ theRequirementsPackage.createPackageContents();
+ theInteractionsPackage.createPackageContents();
+ theStatemachinesPackage.createPackageContents();
+ theUsecasesPackage.createPackageContents();
+
+ // Initialize created meta-data
+ thePortandflowsPackage.initializePackageContents();
+ theSysmlPackage.initializePackageContents();
+ theModelelementsPackage.initializePackageContents();
+ theBlocksPackage.initializePackageContents();
+ theConstraintsPackage.initializePackageContents();
+ theActivitiesPackage.initializePackageContents();
+ theAllocationsPackage.initializePackageContents();
+ theRequirementsPackage.initializePackageContents();
+ theInteractionsPackage.initializePackageContents();
+ theStatemachinesPackage.initializePackageContents();
+ theUsecasesPackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ thePortandflowsPackage.freeze();
+
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(PortandflowsPackage.eNS_URI, thePortandflowsPackage);
+ return thePortandflowsPackage;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass flowPortEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass flowPropertyEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass flowSpecificationEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass itemFlowEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EEnum flowDirectionEEnum = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private boolean isCreated = false;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Creates an instance of the model <b>Package</b>, registered with {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the
+ * package
+ * package URI value.
+ * <p>
+ * Note: the correct way to create the package is via the static factory method {@link #init init()}, which also performs initialization of the package, or returns the registered package, if one already exists. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.emf.ecore.EPackage.Registry
+ * @see org.eclipse.papyrus.sysml.portandflows.PortandflowsPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private PortandflowsPackageImpl() {
+ super(eNS_URI, PortandflowsFactory.eINSTANCE);
+ }
+
+ /**
+ * Creates the meta-model objects for the package. This method is
+ * guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void createPackageContents() {
+ if (isCreated) {
+ return;
+ }
+ isCreated = true;
+
+ // Create classes and their features
+ flowPortEClass = createEClass(FLOW_PORT);
+ createEReference(flowPortEClass, FLOW_PORT__BASE_PORT);
+ createEAttribute(flowPortEClass, FLOW_PORT__IS_ATOMIC);
+ createEAttribute(flowPortEClass, FLOW_PORT__IS_CONJUGATED);
+ createEAttribute(flowPortEClass, FLOW_PORT__DIRECTION);
+ createEOperation(flowPortEClass, FLOW_PORT___GET_ICON);
+
+ flowPropertyEClass = createEClass(FLOW_PROPERTY);
+ createEReference(flowPropertyEClass, FLOW_PROPERTY__BASE_PROPERTY);
+ createEAttribute(flowPropertyEClass, FLOW_PROPERTY__DIRECTION);
+ createEOperation(flowPropertyEClass, FLOW_PROPERTY___GET_ICON);
+
+ flowSpecificationEClass = createEClass(FLOW_SPECIFICATION);
+ createEReference(flowSpecificationEClass, FLOW_SPECIFICATION__BASE_INTERFACE);
+
+ itemFlowEClass = createEClass(ITEM_FLOW);
+ createEReference(itemFlowEClass, ITEM_FLOW__BASE_INFORMATION_FLOW);
+ createEReference(itemFlowEClass, ITEM_FLOW__ITEM_PROPERTY);
+
+ // Create enums
+ flowDirectionEEnum = createEEnum(FLOW_DIRECTION);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EEnum getFlowDirection() {
+ return flowDirectionEEnum;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EClass getFlowPort() {
+ return flowPortEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getFlowPort_Base_Port() {
+ return (EReference) flowPortEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EAttribute getFlowPort_Direction() {
+ return (EAttribute) flowPortEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EOperation getFlowPort__GetIcon() {
+ return flowPortEClass.getEOperations().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EAttribute getFlowPort_IsAtomic() {
+ return (EAttribute) flowPortEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EAttribute getFlowPort_IsConjugated() {
+ return (EAttribute) flowPortEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EClass getFlowProperty() {
+ return flowPropertyEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getFlowProperty_Base_Property() {
+ return (EReference) flowPropertyEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EAttribute getFlowProperty_Direction() {
+ return (EAttribute) flowPropertyEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EOperation getFlowProperty__GetIcon() {
+ return flowPropertyEClass.getEOperations().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EClass getFlowSpecification() {
+ return flowSpecificationEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getFlowSpecification_Base_Interface() {
+ return (EReference) flowSpecificationEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EClass getItemFlow() {
+ return itemFlowEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getItemFlow_Base_InformationFlow() {
+ return (EReference) itemFlowEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getItemFlow_ItemProperty() {
+ return (EReference) itemFlowEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public PortandflowsFactory getPortandflowsFactory() {
+ return (PortandflowsFactory) getEFactoryInstance();
+ }
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void initializePackageContents() {
+ if (isInitialized) {
+ return;
+ }
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Obtain other dependent packages
+ UMLPackage theUMLPackage = (UMLPackage) EPackage.Registry.INSTANCE.getEPackage(UMLPackage.eNS_URI);
+ TypesPackage theTypesPackage = (TypesPackage) EPackage.Registry.INSTANCE.getEPackage(TypesPackage.eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+
+ // Initialize classes, features, and operations; add parameters
+ initEClass(flowPortEClass, FlowPort.class, "FlowPort", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getFlowPort_Base_Port(), theUMLPackage.getPort(), null, "base_Port", null, 1, 1, FlowPort.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+ initEAttribute(getFlowPort_IsAtomic(), theTypesPackage.getBoolean(), "isAtomic", "false", 1, 1, FlowPort.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, IS_DERIVED, !IS_ORDERED);
+ initEAttribute(getFlowPort_IsConjugated(), theTypesPackage.getBoolean(), "isConjugated", null, 0, 1, FlowPort.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+ initEAttribute(getFlowPort_Direction(), this.getFlowDirection(), "direction", "inout", 1, 1, FlowPort.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+
+ initEOperation(getFlowPort__GetIcon(), theUMLPackage.getImage(), "getIcon", 1, 1, IS_UNIQUE, !IS_ORDERED);
+
+ initEClass(flowPropertyEClass, FlowProperty.class, "FlowProperty", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getFlowProperty_Base_Property(), theUMLPackage.getProperty(), null, "base_Property", null, 1, 1, FlowProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, !IS_DERIVED,
+ !IS_ORDERED);
+ initEAttribute(getFlowProperty_Direction(), this.getFlowDirection(), "direction", "inout", 1, 1, FlowProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+
+ initEOperation(getFlowProperty__GetIcon(), theUMLPackage.getImage(), "getIcon", 1, 1, IS_UNIQUE, !IS_ORDERED);
+
+ initEClass(flowSpecificationEClass, FlowSpecification.class, "FlowSpecification", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getFlowSpecification_Base_Interface(), theUMLPackage.getInterface(), null, "base_Interface", null, 1, 1, FlowSpecification.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE,
+ !IS_DERIVED, !IS_ORDERED);
+
+ initEClass(itemFlowEClass, ItemFlow.class, "ItemFlow", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getItemFlow_Base_InformationFlow(), theUMLPackage.getInformationFlow(), null, "base_InformationFlow", null, 1, 1, ItemFlow.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE,
+ !IS_DERIVED, !IS_ORDERED);
+ initEReference(getItemFlow_ItemProperty(), theUMLPackage.getProperty(), null, "itemProperty", null, 0, 1, ItemFlow.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, !IS_DERIVED,
+ !IS_ORDERED);
+
+ // Initialize enums and add enum literals
+ initEEnum(flowDirectionEEnum, FlowDirection.class, "FlowDirection");
+ addEEnumLiteral(flowDirectionEEnum, FlowDirection.IN);
+ addEEnumLiteral(flowDirectionEEnum, FlowDirection.OUT);
+ addEEnumLiteral(flowDirectionEEnum, FlowDirection.INOUT);
+ }
+
+} // PortandflowsPackageImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/portandflows/util/PortandflowsAdapterFactory.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/portandflows/util/PortandflowsAdapterFactory.java
new file mode 100755
index 0000000..0602be1
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/portandflows/util/PortandflowsAdapterFactory.java
@@ -0,0 +1,198 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.portandflows.util;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notifier;
+import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.sysml.portandflows.FlowPort;
+import org.eclipse.papyrus.sysml.portandflows.FlowProperty;
+import org.eclipse.papyrus.sysml.portandflows.FlowSpecification;
+import org.eclipse.papyrus.sysml.portandflows.ItemFlow;
+import org.eclipse.papyrus.sysml.portandflows.PortandflowsPackage;
+
+/**
+ * <!-- begin-user-doc --> The <b>Adapter Factory</b> for the model. It provides
+ * an adapter <code>createXXX</code> method for each class of the model. <!--
+ * end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.portandflows.PortandflowsPackage
+ * @generated
+ */
+public class PortandflowsAdapterFactory extends AdapterFactoryImpl {
+
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected static PortandflowsPackage modelPackage;
+
+ /**
+ * The switch that delegates to the <code>createXXX</code> methods. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected PortandflowsSwitch<Adapter> modelSwitch = new PortandflowsSwitch<Adapter>() {
+
+ @Override
+ public Adapter caseFlowPort(FlowPort object) {
+ return createFlowPortAdapter();
+ }
+
+ @Override
+ public Adapter caseFlowProperty(FlowProperty object) {
+ return createFlowPropertyAdapter();
+ }
+
+ @Override
+ public Adapter caseFlowSpecification(FlowSpecification object) {
+ return createFlowSpecificationAdapter();
+ }
+
+ @Override
+ public Adapter caseItemFlow(ItemFlow object) {
+ return createItemFlowAdapter();
+ }
+
+ @Override
+ public Adapter defaultCase(EObject object) {
+ return createEObjectAdapter();
+ }
+ };
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public PortandflowsAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = PortandflowsPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Creates an adapter for the <code>target</code>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @param target
+ * the object to adapt.
+ * @return the adapter for the <code>target</code>.
+ * @generated
+ */
+ @Override
+ public Adapter createAdapter(Notifier target) {
+ return modelSwitch.doSwitch((EObject) target);
+ }
+
+ /**
+ * Creates a new adapter for the default case.
+ * <!-- begin-user-doc --> This
+ * default implementation returns null. <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @generated
+ */
+ public Adapter createEObjectAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class ' {@link org.eclipse.papyrus.sysml.portandflows.FlowPort
+ * <em>Flow Port</em>}'. <!-- begin-user-doc --> This default implementation
+ * returns null so that we can easily ignore cases; it's useful to ignore a
+ * case when inheritance will catch all the cases anyway. <!-- end-user-doc
+ * -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.sysml.portandflows.FlowPort
+ * @generated
+ */
+ public Adapter createFlowPortAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.sysml.portandflows.FlowProperty <em>Flow Property</em>}'.
+ * <!-- begin-user-doc --> This default
+ * implementation returns null so that we can easily ignore cases; it's
+ * useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.sysml.portandflows.FlowProperty
+ * @generated
+ */
+ public Adapter createFlowPropertyAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.sysml.portandflows.FlowSpecification <em>Flow Specification</em>}'.
+ * <!-- begin-user-doc --> This default
+ * implementation returns null so that we can easily ignore cases; it's
+ * useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.sysml.portandflows.FlowSpecification
+ * @generated
+ */
+ public Adapter createFlowSpecificationAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class ' {@link org.eclipse.papyrus.sysml.portandflows.ItemFlow
+ * <em>Item Flow</em>}'. <!-- begin-user-doc --> This default implementation
+ * returns null so that we can easily ignore cases; it's useful to ignore a
+ * case when inheritance will catch all the cases anyway. <!-- end-user-doc
+ * -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.sysml.portandflows.ItemFlow
+ * @generated
+ */
+ public Adapter createItemFlowAdapter() {
+ return null;
+ }
+
+ /**
+ * Returns whether this factory is applicable for the type of the object.
+ * <!-- begin-user-doc --> This implementation returns <code>true</code> if
+ * the object is either the model's package or is an instance object of the
+ * model. <!-- end-user-doc -->
+ *
+ * @return whether this factory is applicable for the type of the object.
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object object) {
+ if (object == modelPackage) {
+ return true;
+ }
+ if (object instanceof EObject) {
+ return ((EObject) object).eClass().getEPackage() == modelPackage;
+ }
+ return false;
+ }
+
+} // PortandflowsAdapterFactory
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/portandflows/util/PortandflowsResourceFactoryImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/portandflows/util/PortandflowsResourceFactoryImpl.java
new file mode 100755
index 0000000..d45550c
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/portandflows/util/PortandflowsResourceFactoryImpl.java
@@ -0,0 +1,63 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.portandflows.util;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl;
+import org.eclipse.emf.ecore.xmi.XMLResource;
+
+/**
+ * <!-- begin-user-doc --> The <b>Resource Factory</b> associated with the
+ * package. <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.portandflows.util.PortandflowsResourceImpl
+ * @generated
+ */
+public class PortandflowsResourceFactoryImpl extends ResourceFactoryImpl {
+
+ /**
+ * Creates an instance of the resource factory.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public PortandflowsResourceFactoryImpl() {
+ super();
+ }
+
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Resource createResource(URI uri) {
+ XMLResource result = new PortandflowsResourceImpl(uri);
+ result.getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
+ result.getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
+
+ result.getDefaultSaveOptions().put(XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE);
+
+ result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
+ result.getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
+
+ result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_LEXICAL_HANDLER, Boolean.TRUE);
+ return result;
+ }
+
+} // PortandflowsResourceFactoryImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/portandflows/util/PortandflowsResourceImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/portandflows/util/PortandflowsResourceImpl.java
new file mode 100755
index 0000000..f60d591
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/portandflows/util/PortandflowsResourceImpl.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.portandflows.util;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl;
+
+/**
+ * <!-- begin-user-doc --> The <b>Resource </b> associated with the package.
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.portandflows.util.PortandflowsResourceFactoryImpl
+ * @generated
+ */
+public class PortandflowsResourceImpl extends XMLResourceImpl {
+
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @param uri
+ * the URI of the new resource.
+ * @generated
+ */
+ public PortandflowsResourceImpl(URI uri) {
+ super(uri);
+ }
+
+} // PortandflowsResourceImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/portandflows/util/PortandflowsSwitch.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/portandflows/util/PortandflowsSwitch.java
new file mode 100755
index 0000000..7720f93
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/portandflows/util/PortandflowsSwitch.java
@@ -0,0 +1,200 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.portandflows.util;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.util.Switch;
+import org.eclipse.papyrus.sysml.portandflows.FlowPort;
+import org.eclipse.papyrus.sysml.portandflows.FlowProperty;
+import org.eclipse.papyrus.sysml.portandflows.FlowSpecification;
+import org.eclipse.papyrus.sysml.portandflows.ItemFlow;
+import org.eclipse.papyrus.sysml.portandflows.PortandflowsPackage;
+
+/**
+ * <!-- begin-user-doc --> The <b>Switch</b> for the model's inheritance
+ * hierarchy. It supports the call {@link #doSwitch(EObject) doSwitch(object)} to invoke the <code>caseXXX</code> method for each class of the model,
+ * starting with the actual class of the object and proceeding up the
+ * inheritance hierarchy until a non-null result is returned, which is the
+ * result of the switch. <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.portandflows.PortandflowsPackage
+ * @generated
+ */
+public class PortandflowsSwitch<T> extends Switch<T> {
+
+ /**
+ * The cached model package
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected static PortandflowsPackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public PortandflowsSwitch() {
+ if (modelPackage == null) {
+ modelPackage = PortandflowsPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Checks whether this is a switch for the given package. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @parameter ePackage the package in question.
+ * @return whether this is a switch for the given package.
+ * @generated
+ */
+ @Override
+ protected boolean isSwitchFor(EPackage ePackage) {
+ return ePackage == modelPackage;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Flow Port</em>'.
+ * <!-- begin-user-doc --> This implementation returns
+ * null; returning a non-null result will terminate the switch. <!--
+ * end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Flow Port</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseFlowPort(FlowPort object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Flow Property</em>'.
+ * <!-- begin-user-doc --> This implementation
+ * returns null; returning a non-null result will terminate the switch. <!--
+ * end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Flow Property</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseFlowProperty(FlowProperty object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Flow Specification</em>'.
+ * <!-- begin-user-doc --> This implementation
+ * returns null; returning a non-null result will terminate the switch. <!--
+ * end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Flow Specification</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseFlowSpecification(FlowSpecification object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Item Flow</em>'.
+ * <!-- begin-user-doc --> This implementation returns
+ * null; returning a non-null result will terminate the switch. <!--
+ * end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Item Flow</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseItemFlow(ItemFlow object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * <!-- begin-user-doc --> This implementation returns
+ * null; returning a non-null result will terminate the switch, but this is
+ * the last case anyway. <!-- end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+ * @generated
+ */
+ @Override
+ public T defaultCase(EObject object) {
+ return null;
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ @Override
+ protected T doSwitch(int classifierID, EObject theEObject) {
+ switch (classifierID) {
+ case PortandflowsPackage.FLOW_PORT: {
+ FlowPort flowPort = (FlowPort) theEObject;
+ T result = caseFlowPort(flowPort);
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case PortandflowsPackage.FLOW_PROPERTY: {
+ FlowProperty flowProperty = (FlowProperty) theEObject;
+ T result = caseFlowProperty(flowProperty);
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case PortandflowsPackage.FLOW_SPECIFICATION: {
+ FlowSpecification flowSpecification = (FlowSpecification) theEObject;
+ T result = caseFlowSpecification(flowSpecification);
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case PortandflowsPackage.ITEM_FLOW: {
+ ItemFlow itemFlow = (ItemFlow) theEObject;
+ T result = caseItemFlow(itemFlow);
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ default:
+ return defaultCase(theEObject);
+ }
+ }
+
+} // PortandflowsSwitch
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/portandflows/util/PortandflowsXMLProcessor.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/portandflows/util/PortandflowsXMLProcessor.java
new file mode 100755
index 0000000..6141f1f
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/portandflows/util/PortandflowsXMLProcessor.java
@@ -0,0 +1,60 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.portandflows.util;
+
+import java.util.Map;
+
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.xmi.util.XMLProcessor;
+import org.eclipse.papyrus.sysml.portandflows.PortandflowsPackage;
+
+/**
+ * This class contains helper methods to serialize and deserialize XML documents
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class PortandflowsXMLProcessor extends XMLProcessor {
+
+ /**
+ * Public constructor to instantiate the helper.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public PortandflowsXMLProcessor() {
+ super((EPackage.Registry.INSTANCE));
+ PortandflowsPackage.eINSTANCE.eClass();
+ }
+
+ /**
+ * Register for "*" and "xml" file extensions the PortandflowsResourceFactoryImpl factory.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected Map<String, Resource.Factory> getRegistrations() {
+ if (registrations == null) {
+ super.getRegistrations();
+ registrations.put(XML_EXTENSION, new PortandflowsResourceFactoryImpl());
+ registrations.put(STAR_EXTENSION, new PortandflowsResourceFactoryImpl());
+ }
+ return registrations;
+ }
+
+} // PortandflowsXMLProcessor
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/Copy.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/Copy.java
new file mode 100755
index 0000000..67b3da7
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/Copy.java
@@ -0,0 +1,26 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.requirements;
+
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object ' <em><b>Copy</b></em>'. <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.papyrus.sysml.requirements.RequirementsPackage#getCopy()
+ * @model
+ * @generated
+ */
+public interface Copy extends org.eclipse.uml2.uml.profile.standard.Trace {
+} // Copy
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/DeriveReqt.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/DeriveReqt.java
new file mode 100755
index 0000000..b8fb791
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/DeriveReqt.java
@@ -0,0 +1,26 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.requirements;
+
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object ' <em><b>Derive Reqt</b></em>'. <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.papyrus.sysml.requirements.RequirementsPackage#getDeriveReqt()
+ * @model
+ * @generated
+ */
+public interface DeriveReqt extends org.eclipse.uml2.uml.profile.standard.Trace {
+} // DeriveReqt
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/Requirement.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/Requirement.java
new file mode 100755
index 0000000..4827ec3
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/Requirement.java
@@ -0,0 +1,372 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.requirements;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.uml2.uml.NamedElement;
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object ' <em><b>Requirement</b></em>'. <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.requirements.Requirement#getText <em>Text</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.requirements.Requirement#getId <em>Id</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.requirements.Requirement#getDerived <em>Derived</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.requirements.Requirement#getDerivedFrom <em>Derived From</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.requirements.Requirement#getSatisfiedBy <em>Satisfied By</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.requirements.Requirement#getRefinedBy <em>Refined By</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.requirements.Requirement#getTracedTo <em>Traced To</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.requirements.Requirement#getVerifiedBy <em>Verified By</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.requirements.Requirement#getMaster <em>Master</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.requirements.Requirement#getBase_Class <em>Base Class</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.sysml.requirements.RequirementsPackage#getRequirement()
+ * @model
+ * @generated
+ */
+public interface Requirement extends EObject {
+
+ /**
+ * Returns the value of the '<em><b>Base Class</b></em>' reference. <!--
+ * begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Base Class</em>' reference isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Base Class</em>' reference.
+ * @see #setBase_Class(org.eclipse.uml2.uml.Class)
+ * @see org.eclipse.papyrus.sysml.requirements.RequirementsPackage#getRequirement_Base_Class()
+ * @model required="true" ordered="false"
+ * @generated
+ */
+ org.eclipse.uml2.uml.Class getBase_Class();
+
+ /**
+ * Returns the value of the '<em><b>Derived</b></em>' reference list. The
+ * list contents are of type {@link org.eclipse.papyrus.sysml.requirements.Requirement}. <!--
+ * begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Derived</em>' reference list isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Derived</em>' reference list.
+ * @see org.eclipse.papyrus.sysml.requirements.RequirementsPackage#getRequirement_Derived()
+ * @model transient="true" changeable="false" volatile="true" derived="true"
+ * ordered="false"
+ * @generated
+ */
+ EList<Requirement> getDerived();
+
+ /**
+ * Returns the value of the '<em><b>Derived From</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.sysml.requirements.Requirement}. <!--
+ * begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Derived From</em>' reference list isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Derived From</em>' reference list.
+ * @see org.eclipse.papyrus.sysml.requirements.RequirementsPackage#getRequirement_DerivedFrom()
+ * @model transient="true" changeable="false" volatile="true" derived="true"
+ * ordered="false"
+ * @generated
+ */
+ EList<Requirement> getDerivedFrom();
+
+ /**
+ * Returns the value of the '<em><b>Id</b></em>' attribute. <!--
+ * begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Id</em>' attribute isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Id</em>' attribute.
+ * @see #setId(String)
+ * @see org.eclipse.papyrus.sysml.requirements.RequirementsPackage#getRequirement_Id()
+ * @model unique="false" required="true" ordered="false"
+ * @generated
+ */
+ String getId();
+
+ /**
+ * Returns the value of the '<em><b>Master</b></em>' reference. <!--
+ * begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Master</em>' reference isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Master</em>' reference.
+ * @see org.eclipse.papyrus.sysml.requirements.RequirementsPackage#getRequirement_Master()
+ * @model transient="true" changeable="false" volatile="true" derived="true"
+ * ordered="false"
+ * @generated
+ */
+ Requirement getMaster();
+
+ /**
+ * Returns the value of the '<em><b>Refined By</b></em>' reference list. The
+ * list contents are of type {@link org.eclipse.uml2.uml.NamedElement}. <!--
+ * begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Refined By</em>' reference list isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Refined By</em>' reference list.
+ * @see org.eclipse.papyrus.sysml.requirements.RequirementsPackage#getRequirement_RefinedBy()
+ * @model transient="true" changeable="false" volatile="true" derived="true"
+ * ordered="false"
+ * @generated
+ */
+ EList<NamedElement> getRefinedBy();
+
+ /**
+ * Retrieves the first {@link org.eclipse.uml2.uml.NamedElement} with the specified '<em><b>Name</b></em>' from the '<em><b>Refined By</b></em>'
+ * reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @param name
+ * The '<em><b>Name</b></em>' of the {@link org.eclipse.uml2.uml.NamedElement} to retrieve, or <code>null</code>.
+ * @return The first {@link org.eclipse.uml2.uml.NamedElement} with the specified '<em><b>Name</b></em>', or <code>null</code>.
+ * @see #getRefinedBy()
+ * @generated
+ */
+ NamedElement getRefinedBy(String name);
+
+ /**
+ * Retrieves the first {@link org.eclipse.uml2.uml.NamedElement} with the specified '<em><b>Name</b></em>' from the '<em><b>Refined By</b></em>'
+ * reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @param name
+ * The '<em><b>Name</b></em>' of the {@link org.eclipse.uml2.uml.NamedElement} to retrieve, or <code>null</code>.
+ * @param ignoreCase
+ * Whether to ignore case in {@link java.lang.String} comparisons.
+ * @param eClass
+ * The Ecore class of the {@link org.eclipse.uml2.uml.NamedElement} to retrieve, or <code>null</code>.
+ * @return The first {@link org.eclipse.uml2.uml.NamedElement} with the specified '<em><b>Name</b></em>', or <code>null</code>.
+ * @see #getRefinedBy()
+ * @generated
+ */
+ NamedElement getRefinedBy(String name, boolean ignoreCase, EClass eClass);
+
+ /**
+ * Returns the value of the '<em><b>Satisfied By</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.uml2.uml.NamedElement}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Satisfied By</em>' reference list isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Satisfied By</em>' reference list.
+ * @see org.eclipse.papyrus.sysml.requirements.RequirementsPackage#getRequirement_SatisfiedBy()
+ * @model transient="true" changeable="false" volatile="true" derived="true" ordered="false"
+ * @generated
+ */
+ EList<NamedElement> getSatisfiedBy();
+
+ /**
+ * Retrieves the first {@link org.eclipse.uml2.uml.NamedElement} with the specified '<em><b>Name</b></em>' from the '<em><b>Satisfied By</b></em>'
+ * reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @param name
+ * The '<em><b>Name</b></em>' of the {@link org.eclipse.uml2.uml.NamedElement} to retrieve, or <code>null</code>.
+ * @return The first {@link org.eclipse.uml2.uml.NamedElement} with the specified '<em><b>Name</b></em>', or <code>null</code>.
+ * @see #getSatisfiedBy()
+ * @generated
+ */
+ NamedElement getSatisfiedBy(String name);
+
+ /**
+ * Retrieves the first {@link org.eclipse.uml2.uml.NamedElement} with the specified '<em><b>Name</b></em>' from the '<em><b>Satisfied By</b></em>'
+ * reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @param name
+ * The '<em><b>Name</b></em>' of the {@link org.eclipse.uml2.uml.NamedElement} to retrieve, or <code>null</code>.
+ * @param ignoreCase
+ * Whether to ignore case in {@link java.lang.String} comparisons.
+ * @param eClass
+ * The Ecore class of the {@link org.eclipse.uml2.uml.NamedElement} to retrieve, or <code>null</code>.
+ * @return The first {@link org.eclipse.uml2.uml.NamedElement} with the specified '<em><b>Name</b></em>', or <code>null</code>.
+ * @see #getSatisfiedBy()
+ * @generated
+ */
+ NamedElement getSatisfiedBy(String name, boolean ignoreCase, EClass eClass);
+
+ /**
+ * Returns the value of the '<em><b>Text</b></em>' attribute. <!--
+ * begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Text</em>' attribute isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Text</em>' attribute.
+ * @see #setText(String)
+ * @see org.eclipse.papyrus.sysml.requirements.RequirementsPackage#getRequirement_Text()
+ * @model unique="false" required="true" ordered="false"
+ * @generated
+ */
+ String getText();
+
+ /**
+ * Returns the value of the '<em><b>Traced To</b></em>' reference list. The
+ * list contents are of type {@link org.eclipse.uml2.uml.NamedElement}. <!--
+ * begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Traced To</em>' reference list isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Traced To</em>' reference list.
+ * @see org.eclipse.papyrus.sysml.requirements.RequirementsPackage#getRequirement_TracedTo()
+ * @model transient="true" changeable="false" volatile="true" derived="true"
+ * ordered="false"
+ * @generated
+ */
+ EList<NamedElement> getTracedTo();
+
+ /**
+ * Retrieves the first {@link org.eclipse.uml2.uml.NamedElement} with the specified '<em><b>Name</b></em>' from the '<em><b>Traced To</b></em>'
+ * reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @param name
+ * The '<em><b>Name</b></em>' of the {@link org.eclipse.uml2.uml.NamedElement} to retrieve, or <code>null</code>.
+ * @return The first {@link org.eclipse.uml2.uml.NamedElement} with the specified '<em><b>Name</b></em>', or <code>null</code>.
+ * @see #getTracedTo()
+ * @generated
+ */
+ NamedElement getTracedTo(String name);
+
+ /**
+ * Retrieves the first {@link org.eclipse.uml2.uml.NamedElement} with the specified '<em><b>Name</b></em>' from the '<em><b>Traced To</b></em>'
+ * reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @param name
+ * The '<em><b>Name</b></em>' of the {@link org.eclipse.uml2.uml.NamedElement} to retrieve, or <code>null</code>.
+ * @param ignoreCase
+ * Whether to ignore case in {@link java.lang.String} comparisons.
+ * @param eClass
+ * The Ecore class of the {@link org.eclipse.uml2.uml.NamedElement} to retrieve, or <code>null</code>.
+ * @return The first {@link org.eclipse.uml2.uml.NamedElement} with the specified '<em><b>Name</b></em>', or <code>null</code>.
+ * @see #getTracedTo()
+ * @generated
+ */
+ NamedElement getTracedTo(String name, boolean ignoreCase, EClass eClass);
+
+ /**
+ * Returns the value of the '<em><b>Verified By</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.uml2.uml.NamedElement}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Verified By</em>' reference list isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Verified By</em>' reference list.
+ * @see org.eclipse.papyrus.sysml.requirements.RequirementsPackage#getRequirement_VerifiedBy()
+ * @model transient="true" changeable="false" volatile="true" derived="true" ordered="false"
+ * @generated
+ */
+ EList<NamedElement> getVerifiedBy();
+
+ /**
+ * Retrieves the first {@link org.eclipse.uml2.uml.NamedElement} with the specified '<em><b>Name</b></em>' from the '<em><b>Verified By</b></em>'
+ * reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @param name
+ * The '<em><b>Name</b></em>' of the {@link org.eclipse.uml2.uml.NamedElement} to retrieve, or <code>null</code>.
+ * @return The first {@link org.eclipse.uml2.uml.NamedElement} with the specified '<em><b>Name</b></em>', or <code>null</code>.
+ * @see #getVerifiedBy()
+ * @generated
+ */
+ NamedElement getVerifiedBy(String name);
+
+ /**
+ * Retrieves the first {@link org.eclipse.uml2.uml.NamedElement} with the specified '<em><b>Name</b></em>' from the '<em><b>Verified By</b></em>'
+ * reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @param name
+ * The '<em><b>Name</b></em>' of the {@link org.eclipse.uml2.uml.NamedElement} to retrieve, or <code>null</code>.
+ * @param ignoreCase
+ * Whether to ignore case in {@link java.lang.String} comparisons.
+ * @param eClass
+ * The Ecore class of the {@link org.eclipse.uml2.uml.NamedElement} to retrieve, or <code>null</code>.
+ * @return The first {@link org.eclipse.uml2.uml.NamedElement} with the specified '<em><b>Name</b></em>', or <code>null</code>.
+ * @see #getVerifiedBy()
+ * @generated
+ */
+ NamedElement getVerifiedBy(String name, boolean ignoreCase, EClass eClass);
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.sysml.requirements.Requirement#getBase_Class <em>Base Class</em>}' reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Base Class</em>' reference.
+ * @see #getBase_Class()
+ * @generated
+ */
+ void setBase_Class(org.eclipse.uml2.uml.Class value);
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.sysml.requirements.Requirement#getId <em>Id</em>}' attribute.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Id</em>' attribute.
+ * @see #getId()
+ * @generated
+ */
+ void setId(String value);
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.sysml.requirements.Requirement#getText <em>Text</em>}' attribute.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Text</em>' attribute.
+ * @see #getText()
+ * @generated
+ */
+ void setText(String value);
+
+} // Requirement
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/RequirementRelated.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/RequirementRelated.java
new file mode 100755
index 0000000..c0b446e
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/RequirementRelated.java
@@ -0,0 +1,137 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.requirements;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.uml2.uml.NamedElement;
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object ' <em><b>Requirement Related</b></em> '. <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.requirements.RequirementRelated#getBase_NamedElement <em>Base Named Element</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.requirements.RequirementRelated#getTracedFrom <em>Traced From</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.requirements.RequirementRelated#getSatisfies <em>Satisfies</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.requirements.RequirementRelated#getRefines <em>Refines</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.requirements.RequirementRelated#getVerifies <em>Verifies</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.sysml.requirements.RequirementsPackage#getRequirementRelated()
+ * @model
+ * @generated
+ */
+public interface RequirementRelated extends EObject {
+
+ /**
+ * Returns the value of the '<em><b>Base Named Element</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Base Named Element</em>' reference isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Base Named Element</em>' reference.
+ * @see #setBase_NamedElement(NamedElement)
+ * @see org.eclipse.papyrus.sysml.requirements.RequirementsPackage#getRequirementRelated_Base_NamedElement()
+ * @model required="true" ordered="false"
+ * @generated
+ */
+ NamedElement getBase_NamedElement();
+
+ /**
+ * Returns the value of the '<em><b>Refines</b></em>' reference list. The
+ * list contents are of type {@link org.eclipse.papyrus.sysml.requirements.Requirement}. <!--
+ * begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Refines</em>' reference list isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Refines</em>' reference list.
+ * @see org.eclipse.papyrus.sysml.requirements.RequirementsPackage#getRequirementRelated_Refines()
+ * @model transient="true" changeable="false" volatile="true" derived="true"
+ * ordered="false"
+ * @generated
+ */
+ EList<Requirement> getRefines();
+
+ /**
+ * Returns the value of the '<em><b>Satisfies</b></em>' reference list. The
+ * list contents are of type {@link org.eclipse.papyrus.sysml.requirements.Requirement}. <!--
+ * begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Satisfies</em>' reference list isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Satisfies</em>' reference list.
+ * @see org.eclipse.papyrus.sysml.requirements.RequirementsPackage#getRequirementRelated_Satisfies()
+ * @model transient="true" changeable="false" volatile="true" derived="true"
+ * ordered="false"
+ * @generated
+ */
+ EList<Requirement> getSatisfies();
+
+ /**
+ * Returns the value of the '<em><b>Traced From</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.sysml.requirements.Requirement}. <!--
+ * begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Traced From</em>' reference list isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Traced From</em>' reference list.
+ * @see org.eclipse.papyrus.sysml.requirements.RequirementsPackage#getRequirementRelated_TracedFrom()
+ * @model transient="true" changeable="false" volatile="true" derived="true"
+ * ordered="false"
+ * @generated
+ */
+ EList<Requirement> getTracedFrom();
+
+ /**
+ * Returns the value of the '<em><b>Verifies</b></em>' reference list. The
+ * list contents are of type {@link org.eclipse.papyrus.sysml.requirements.Requirement}. <!--
+ * begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Verifies</em>' reference list isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Verifies</em>' reference list.
+ * @see org.eclipse.papyrus.sysml.requirements.RequirementsPackage#getRequirementRelated_Verifies()
+ * @model transient="true" changeable="false" volatile="true" derived="true"
+ * ordered="false"
+ * @generated
+ */
+ EList<Requirement> getVerifies();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.sysml.requirements.RequirementRelated#getBase_NamedElement <em>Base Named Element</em>}'
+ * reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Base Named Element</em>' reference.
+ * @see #getBase_NamedElement()
+ * @generated
+ */
+ void setBase_NamedElement(NamedElement value);
+
+} // RequirementRelated
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/RequirementsFactory.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/RequirementsFactory.java
new file mode 100755
index 0000000..e7173a0
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/RequirementsFactory.java
@@ -0,0 +1,115 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.requirements;
+
+import org.eclipse.emf.ecore.EFactory;
+
+/**
+ * <!-- begin-user-doc --> The <b>Factory</b> for the model. It provides a
+ * create method for each non-abstract class of the model. <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.requirements.RequirementsPackage
+ * @generated
+ */
+public interface RequirementsFactory extends EFactory {
+
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ RequirementsFactory eINSTANCE = org.eclipse.papyrus.sysml.requirements.internal.impl.RequirementsFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>Copy</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Copy</em>'.
+ * @generated
+ */
+ Copy createCopy();
+
+ /**
+ * Returns a new object of class '<em>Derive Reqt</em>'.
+ * <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Derive Reqt</em>'.
+ * @generated
+ */
+ DeriveReqt createDeriveReqt();
+
+ /**
+ * Returns a new object of class '<em>Requirement</em>'.
+ * <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Requirement</em>'.
+ * @generated
+ */
+ Requirement createRequirement();
+
+ /**
+ * Returns a new object of class '<em>Requirement Related</em>'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Requirement Related</em>'.
+ * @generated
+ */
+ RequirementRelated createRequirementRelated();
+
+ /**
+ * Returns a new object of class '<em>Satisfy</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Satisfy</em>'.
+ * @generated
+ */
+ Satisfy createSatisfy();
+
+ /**
+ * Returns a new object of class '<em>Test Case</em>'.
+ * <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Test Case</em>'.
+ * @generated
+ */
+ TestCase createTestCase();
+
+ /**
+ * Returns a new object of class '<em>Verify</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Verify</em>'.
+ * @generated
+ */
+ Verify createVerify();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the package supported by this factory.
+ * @generated
+ */
+ RequirementsPackage getRequirementsPackage();
+
+} // RequirementsFactory
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/RequirementsPackage.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/RequirementsPackage.java
new file mode 100755
index 0000000..47c20cf
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/RequirementsPackage.java
@@ -0,0 +1,996 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.requirements;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.uml2.uml.profile.standard.StandardPackage;
+
+/**
+ * <!-- begin-user-doc --> The <b>Package</b> for the model. It contains
+ * accessors for the meta objects to represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.requirements.RequirementsFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface RequirementsPackage extends EPackage {
+
+ /**
+ * <!-- begin-user-doc --> Defines literals for the meta objects that
+ * represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ interface Literals {
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.sysml.requirements.internal.impl.DeriveReqtImpl <em>Derive Reqt</em>}' class.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.requirements.internal.impl.DeriveReqtImpl
+ * @see org.eclipse.papyrus.sysml.requirements.internal.impl.RequirementsPackageImpl#getDeriveReqt()
+ * @generated
+ */
+ EClass DERIVE_REQT = eINSTANCE.getDeriveReqt();
+
+ /**
+ * The meta object literal for the ' {@link org.eclipse.papyrus.sysml.requirements.internal.impl.VerifyImpl
+ * <em>Verify</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @see org.eclipse.papyrus.sysml.requirements.internal.impl.VerifyImpl
+ * @see org.eclipse.papyrus.sysml.requirements.internal.impl.RequirementsPackageImpl#getVerify()
+ * @generated
+ */
+ EClass VERIFY = eINSTANCE.getVerify();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.sysml.requirements.internal.impl.CopyImpl <em>Copy</em>}' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.requirements.internal.impl.CopyImpl
+ * @see org.eclipse.papyrus.sysml.requirements.internal.impl.RequirementsPackageImpl#getCopy()
+ * @generated
+ */
+ EClass COPY = eINSTANCE.getCopy();
+
+ /**
+ * The meta object literal for the ' {@link org.eclipse.papyrus.sysml.requirements.internal.impl.SatisfyImpl
+ * <em>Satisfy</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @see org.eclipse.papyrus.sysml.requirements.internal.impl.SatisfyImpl
+ * @see org.eclipse.papyrus.sysml.requirements.internal.impl.RequirementsPackageImpl#getSatisfy()
+ * @generated
+ */
+ EClass SATISFY = eINSTANCE.getSatisfy();
+
+ /**
+ * The meta object literal for the ' {@link org.eclipse.papyrus.sysml.requirements.internal.impl.TestCaseImpl
+ * <em>Test Case</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @see org.eclipse.papyrus.sysml.requirements.internal.impl.TestCaseImpl
+ * @see org.eclipse.papyrus.sysml.requirements.internal.impl.RequirementsPackageImpl#getTestCase()
+ * @generated
+ */
+ EClass TEST_CASE = eINSTANCE.getTestCase();
+
+ /**
+ * The meta object literal for the '<em><b>Base Behavior</b></em>' reference feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference TEST_CASE__BASE_BEHAVIOR = eINSTANCE.getTestCase_Base_Behavior();
+
+ /**
+ * The meta object literal for the '<em><b>Base Operation</b></em>' reference feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference TEST_CASE__BASE_OPERATION = eINSTANCE.getTestCase_Base_Operation();
+
+ /**
+ * The meta object literal for the '<em><b>Verifies</b></em>' reference list feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference TEST_CASE__VERIFIES = eINSTANCE.getTestCase_Verifies();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.sysml.requirements.internal.impl.RequirementImpl <em>Requirement</em>}' class.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.requirements.internal.impl.RequirementImpl
+ * @see org.eclipse.papyrus.sysml.requirements.internal.impl.RequirementsPackageImpl#getRequirement()
+ * @generated
+ */
+ EClass REQUIREMENT = eINSTANCE.getRequirement();
+
+ /**
+ * The meta object literal for the '<em><b>Text</b></em>' attribute feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EAttribute REQUIREMENT__TEXT = eINSTANCE.getRequirement_Text();
+
+ /**
+ * The meta object literal for the '<em><b>Id</b></em>' attribute feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EAttribute REQUIREMENT__ID = eINSTANCE.getRequirement_Id();
+
+ /**
+ * The meta object literal for the '<em><b>Derived</b></em>' reference list feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference REQUIREMENT__DERIVED = eINSTANCE.getRequirement_Derived();
+
+ /**
+ * The meta object literal for the '<em><b>Derived From</b></em>' reference list feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference REQUIREMENT__DERIVED_FROM = eINSTANCE.getRequirement_DerivedFrom();
+
+ /**
+ * The meta object literal for the '<em><b>Satisfied By</b></em>' reference list feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference REQUIREMENT__SATISFIED_BY = eINSTANCE.getRequirement_SatisfiedBy();
+
+ /**
+ * The meta object literal for the '<em><b>Refined By</b></em>' reference list feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference REQUIREMENT__REFINED_BY = eINSTANCE.getRequirement_RefinedBy();
+
+ /**
+ * The meta object literal for the '<em><b>Traced To</b></em>' reference list feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference REQUIREMENT__TRACED_TO = eINSTANCE.getRequirement_TracedTo();
+
+ /**
+ * The meta object literal for the '<em><b>Verified By</b></em>' reference list feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference REQUIREMENT__VERIFIED_BY = eINSTANCE.getRequirement_VerifiedBy();
+
+ /**
+ * The meta object literal for the '<em><b>Master</b></em>' reference feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference REQUIREMENT__MASTER = eINSTANCE.getRequirement_Master();
+
+ /**
+ * The meta object literal for the '<em><b>Base Class</b></em>' reference feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference REQUIREMENT__BASE_CLASS = eINSTANCE.getRequirement_Base_Class();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.sysml.requirements.internal.impl.RequirementRelatedImpl
+ * <em>Requirement Related</em>}' class.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.requirements.internal.impl.RequirementRelatedImpl
+ * @see org.eclipse.papyrus.sysml.requirements.internal.impl.RequirementsPackageImpl#getRequirementRelated()
+ * @generated
+ */
+ EClass REQUIREMENT_RELATED = eINSTANCE.getRequirementRelated();
+
+ /**
+ * The meta object literal for the '<em><b>Base Named Element</b></em>' reference feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference REQUIREMENT_RELATED__BASE_NAMED_ELEMENT = eINSTANCE.getRequirementRelated_Base_NamedElement();
+
+ /**
+ * The meta object literal for the '<em><b>Traced From</b></em>' reference list feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference REQUIREMENT_RELATED__TRACED_FROM = eINSTANCE.getRequirementRelated_TracedFrom();
+
+ /**
+ * The meta object literal for the '<em><b>Satisfies</b></em>' reference list feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference REQUIREMENT_RELATED__SATISFIES = eINSTANCE.getRequirementRelated_Satisfies();
+
+ /**
+ * The meta object literal for the '<em><b>Refines</b></em>' reference list feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference REQUIREMENT_RELATED__REFINES = eINSTANCE.getRequirementRelated_Refines();
+
+ /**
+ * The meta object literal for the '<em><b>Verifies</b></em>' reference list feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference REQUIREMENT_RELATED__VERIFIES = eINSTANCE.getRequirementRelated_Verifies();
+
+ }
+
+ /**
+ * The package name.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ String eNAME = "requirements";
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ String eNS_URI = "http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements";
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ String eNS_PREFIX = "Requirements";
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ RequirementsPackage eINSTANCE = org.eclipse.papyrus.sysml.requirements.internal.impl.RequirementsPackageImpl.init();
+
+ /**
+ * The meta object id for the ' {@link org.eclipse.papyrus.sysml.requirements.internal.impl.DeriveReqtImpl
+ * <em>Derive Reqt</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @see org.eclipse.papyrus.sysml.requirements.internal.impl.DeriveReqtImpl
+ * @see org.eclipse.papyrus.sysml.requirements.internal.impl.RequirementsPackageImpl#getDeriveReqt()
+ * @generated
+ */
+ int DERIVE_REQT = 0;
+
+ /**
+ * The feature id for the '<em><b>Base Abstraction</b></em>' reference. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int DERIVE_REQT__BASE_ABSTRACTION = StandardPackage.TRACE__BASE_ABSTRACTION;
+
+ /**
+ * The number of structural features of the '<em>Derive Reqt</em>' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int DERIVE_REQT_FEATURE_COUNT = StandardPackage.TRACE_FEATURE_COUNT + 0;
+
+ /**
+ * The number of operations of the '<em>Derive Reqt</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int DERIVE_REQT_OPERATION_COUNT = StandardPackage.TRACE_OPERATION_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.sysml.requirements.internal.impl.VerifyImpl <em>Verify</em>}' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.requirements.internal.impl.VerifyImpl
+ * @see org.eclipse.papyrus.sysml.requirements.internal.impl.RequirementsPackageImpl#getVerify()
+ * @generated
+ */
+ int VERIFY = 1;
+
+ /**
+ * The feature id for the '<em><b>Base Abstraction</b></em>' reference. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int VERIFY__BASE_ABSTRACTION = StandardPackage.TRACE__BASE_ABSTRACTION;
+
+ /**
+ * The number of structural features of the '<em>Verify</em>' class. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int VERIFY_FEATURE_COUNT = StandardPackage.TRACE_FEATURE_COUNT + 0;
+
+ /**
+ * The number of operations of the '<em>Verify</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int VERIFY_OPERATION_COUNT = StandardPackage.TRACE_OPERATION_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.sysml.requirements.internal.impl.CopyImpl <em>Copy</em>}' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.requirements.internal.impl.CopyImpl
+ * @see org.eclipse.papyrus.sysml.requirements.internal.impl.RequirementsPackageImpl#getCopy()
+ * @generated
+ */
+ int COPY = 2;
+
+ /**
+ * The feature id for the '<em><b>Base Abstraction</b></em>' reference. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int COPY__BASE_ABSTRACTION = StandardPackage.TRACE__BASE_ABSTRACTION;
+
+ /**
+ * The number of structural features of the '<em>Copy</em>' class. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int COPY_FEATURE_COUNT = StandardPackage.TRACE_FEATURE_COUNT + 0;
+
+ /**
+ * The number of operations of the '<em>Copy</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int COPY_OPERATION_COUNT = StandardPackage.TRACE_OPERATION_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.sysml.requirements.internal.impl.SatisfyImpl <em>Satisfy</em>}' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.requirements.internal.impl.SatisfyImpl
+ * @see org.eclipse.papyrus.sysml.requirements.internal.impl.RequirementsPackageImpl#getSatisfy()
+ * @generated
+ */
+ int SATISFY = 3;
+
+ /**
+ * The feature id for the '<em><b>Base Abstraction</b></em>' reference. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int SATISFY__BASE_ABSTRACTION = StandardPackage.TRACE__BASE_ABSTRACTION;
+
+ /**
+ * The number of structural features of the '<em>Satisfy</em>' class. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int SATISFY_FEATURE_COUNT = StandardPackage.TRACE_FEATURE_COUNT + 0;
+
+ /**
+ * The number of operations of the '<em>Satisfy</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int SATISFY_OPERATION_COUNT = StandardPackage.TRACE_OPERATION_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.sysml.requirements.internal.impl.TestCaseImpl <em>Test Case</em>}' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.requirements.internal.impl.TestCaseImpl
+ * @see org.eclipse.papyrus.sysml.requirements.internal.impl.RequirementsPackageImpl#getTestCase()
+ * @generated
+ */
+ int TEST_CASE = 4;
+
+ /**
+ * The feature id for the '<em><b>Base Behavior</b></em>' reference. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int TEST_CASE__BASE_BEHAVIOR = 0;
+
+ /**
+ * The feature id for the '<em><b>Base Operation</b></em>' reference. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int TEST_CASE__BASE_OPERATION = 1;
+
+ /**
+ * The feature id for the '<em><b>Verifies</b></em>' reference list. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int TEST_CASE__VERIFIES = 2;
+
+ /**
+ * The number of structural features of the '<em>Test Case</em>' class. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int TEST_CASE_FEATURE_COUNT = 3;
+
+ /**
+ * The number of operations of the '<em>Test Case</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int TEST_CASE_OPERATION_COUNT = 0;
+
+ /**
+ * The meta object id for the ' {@link org.eclipse.papyrus.sysml.requirements.internal.impl.RequirementImpl
+ * <em>Requirement</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @see org.eclipse.papyrus.sysml.requirements.internal.impl.RequirementImpl
+ * @see org.eclipse.papyrus.sysml.requirements.internal.impl.RequirementsPackageImpl#getRequirement()
+ * @generated
+ */
+ int REQUIREMENT = 5;
+
+ /**
+ * The feature id for the '<em><b>Text</b></em>' attribute. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int REQUIREMENT__TEXT = 0;
+
+ /**
+ * The feature id for the '<em><b>Id</b></em>' attribute. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int REQUIREMENT__ID = 1;
+
+ /**
+ * The feature id for the '<em><b>Derived</b></em>' reference list. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int REQUIREMENT__DERIVED = 2;
+
+ /**
+ * The feature id for the '<em><b>Derived From</b></em>' reference list.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int REQUIREMENT__DERIVED_FROM = 3;
+
+ /**
+ * The feature id for the '<em><b>Satisfied By</b></em>' reference list.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int REQUIREMENT__SATISFIED_BY = 4;
+
+ /**
+ * The feature id for the '<em><b>Refined By</b></em>' reference list. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int REQUIREMENT__REFINED_BY = 5;
+
+ /**
+ * The feature id for the '<em><b>Traced To</b></em>' reference list. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int REQUIREMENT__TRACED_TO = 6;
+
+ /**
+ * The feature id for the '<em><b>Verified By</b></em>' reference list. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int REQUIREMENT__VERIFIED_BY = 7;
+
+ /**
+ * The feature id for the '<em><b>Master</b></em>' reference. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int REQUIREMENT__MASTER = 8;
+
+ /**
+ * The feature id for the '<em><b>Base Class</b></em>' reference. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int REQUIREMENT__BASE_CLASS = 9;
+
+ /**
+ * The number of structural features of the '<em>Requirement</em>' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int REQUIREMENT_FEATURE_COUNT = 10;
+
+ /**
+ * The number of operations of the '<em>Requirement</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int REQUIREMENT_OPERATION_COUNT = 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.sysml.requirements.internal.impl.RequirementRelatedImpl <em>Requirement Related</em>}'
+ * class.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.requirements.internal.impl.RequirementRelatedImpl
+ * @see org.eclipse.papyrus.sysml.requirements.internal.impl.RequirementsPackageImpl#getRequirementRelated()
+ * @generated
+ */
+ int REQUIREMENT_RELATED = 6;
+
+ /**
+ * The feature id for the '<em><b>Base Named Element</b></em>' reference.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int REQUIREMENT_RELATED__BASE_NAMED_ELEMENT = 0;
+
+ /**
+ * The feature id for the '<em><b>Traced From</b></em>' reference list. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int REQUIREMENT_RELATED__TRACED_FROM = 1;
+
+ /**
+ * The feature id for the '<em><b>Satisfies</b></em>' reference list. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int REQUIREMENT_RELATED__SATISFIES = 2;
+
+ /**
+ * The feature id for the '<em><b>Refines</b></em>' reference list. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int REQUIREMENT_RELATED__REFINES = 3;
+
+ /**
+ * The feature id for the '<em><b>Verifies</b></em>' reference list. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int REQUIREMENT_RELATED__VERIFIES = 4;
+
+ /**
+ * The number of structural features of the '<em>Requirement Related</em>' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int REQUIREMENT_RELATED_FEATURE_COUNT = 5;
+
+ /**
+ * The number of operations of the '<em>Requirement Related</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int REQUIREMENT_RELATED_OPERATION_COUNT = 0;
+
+ /**
+ * Returns the meta object for class ' {@link org.eclipse.papyrus.sysml.requirements.Copy <em>Copy</em>}'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Copy</em>'.
+ * @see org.eclipse.papyrus.sysml.requirements.Copy
+ * @generated
+ */
+ EClass getCopy();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.sysml.requirements.DeriveReqt <em>Derive Reqt</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Derive Reqt</em>'.
+ * @see org.eclipse.papyrus.sysml.requirements.DeriveReqt
+ * @generated
+ */
+ EClass getDeriveReqt();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.sysml.requirements.Requirement <em>Requirement</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Requirement</em>'.
+ * @see org.eclipse.papyrus.sysml.requirements.Requirement
+ * @generated
+ */
+ EClass getRequirement();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.sysml.requirements.Requirement#getBase_Class <em>Base Class</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference '<em>Base Class</em>'.
+ * @see org.eclipse.papyrus.sysml.requirements.Requirement#getBase_Class()
+ * @see #getRequirement()
+ * @generated
+ */
+ EReference getRequirement_Base_Class();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.papyrus.sysml.requirements.Requirement#getDerived <em>Derived</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference list '<em>Derived</em>'.
+ * @see org.eclipse.papyrus.sysml.requirements.Requirement#getDerived()
+ * @see #getRequirement()
+ * @generated
+ */
+ EReference getRequirement_Derived();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.papyrus.sysml.requirements.Requirement#getDerivedFrom <em>Derived From</em>} '.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference list '<em>Derived From</em>'.
+ * @see org.eclipse.papyrus.sysml.requirements.Requirement#getDerivedFrom()
+ * @see #getRequirement()
+ * @generated
+ */
+ EReference getRequirement_DerivedFrom();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.sysml.requirements.Requirement#getId <em>Id</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the attribute '<em>Id</em>'.
+ * @see org.eclipse.papyrus.sysml.requirements.Requirement#getId()
+ * @see #getRequirement()
+ * @generated
+ */
+ EAttribute getRequirement_Id();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.sysml.requirements.Requirement#getMaster <em>Master</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference '<em>Master</em>'.
+ * @see org.eclipse.papyrus.sysml.requirements.Requirement#getMaster()
+ * @see #getRequirement()
+ * @generated
+ */
+ EReference getRequirement_Master();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.papyrus.sysml.requirements.Requirement#getRefinedBy <em>Refined By</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference list '<em>Refined By</em>'.
+ * @see org.eclipse.papyrus.sysml.requirements.Requirement#getRefinedBy()
+ * @see #getRequirement()
+ * @generated
+ */
+ EReference getRequirement_RefinedBy();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.papyrus.sysml.requirements.Requirement#getSatisfiedBy <em>Satisfied By</em>} '.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference list '<em>Satisfied By</em>'.
+ * @see org.eclipse.papyrus.sysml.requirements.Requirement#getSatisfiedBy()
+ * @see #getRequirement()
+ * @generated
+ */
+ EReference getRequirement_SatisfiedBy();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.sysml.requirements.Requirement#getText <em>Text</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the attribute '<em>Text</em>'.
+ * @see org.eclipse.papyrus.sysml.requirements.Requirement#getText()
+ * @see #getRequirement()
+ * @generated
+ */
+ EAttribute getRequirement_Text();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.papyrus.sysml.requirements.Requirement#getTracedTo <em>Traced To</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference list '<em>Traced To</em>'.
+ * @see org.eclipse.papyrus.sysml.requirements.Requirement#getTracedTo()
+ * @see #getRequirement()
+ * @generated
+ */
+ EReference getRequirement_TracedTo();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.papyrus.sysml.requirements.Requirement#getVerifiedBy <em>Verified By</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference list '<em>Verified By</em>'.
+ * @see org.eclipse.papyrus.sysml.requirements.Requirement#getVerifiedBy()
+ * @see #getRequirement()
+ * @generated
+ */
+ EReference getRequirement_VerifiedBy();
+
+ /**
+ * Returns the meta object for class ' {@link org.eclipse.papyrus.sysml.requirements.RequirementRelated
+ * <em>Requirement Related</em>}'. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @return the meta object for class '<em>Requirement Related</em>'.
+ * @see org.eclipse.papyrus.sysml.requirements.RequirementRelated
+ * @generated
+ */
+ EClass getRequirementRelated();
+
+ /**
+ * Returns the meta object for the reference ' {@link org.eclipse.papyrus.sysml.requirements.RequirementRelated#getBase_NamedElement
+ * <em>Base Named Element</em>}'. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @return the meta object for the reference '<em>Base Named Element</em>'.
+ * @see org.eclipse.papyrus.sysml.requirements.RequirementRelated#getBase_NamedElement()
+ * @see #getRequirementRelated()
+ * @generated
+ */
+ EReference getRequirementRelated_Base_NamedElement();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.papyrus.sysml.requirements.RequirementRelated#getRefines <em>Refines</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference list '<em>Refines</em>'.
+ * @see org.eclipse.papyrus.sysml.requirements.RequirementRelated#getRefines()
+ * @see #getRequirementRelated()
+ * @generated
+ */
+ EReference getRequirementRelated_Refines();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.papyrus.sysml.requirements.RequirementRelated#getSatisfies
+ * <em>Satisfies</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference list '<em>Satisfies</em>'.
+ * @see org.eclipse.papyrus.sysml.requirements.RequirementRelated#getSatisfies()
+ * @see #getRequirementRelated()
+ * @generated
+ */
+ EReference getRequirementRelated_Satisfies();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.papyrus.sysml.requirements.RequirementRelated#getTracedFrom
+ * <em>Traced From</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference list '<em>Traced From</em>'.
+ * @see org.eclipse.papyrus.sysml.requirements.RequirementRelated#getTracedFrom()
+ * @see #getRequirementRelated()
+ * @generated
+ */
+ EReference getRequirementRelated_TracedFrom();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.papyrus.sysml.requirements.RequirementRelated#getVerifies <em>Verifies</em>} '.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference list '<em>Verifies</em>'.
+ * @see org.eclipse.papyrus.sysml.requirements.RequirementRelated#getVerifies()
+ * @see #getRequirementRelated()
+ * @generated
+ */
+ EReference getRequirementRelated_Verifies();
+
+ /**
+ * Returns the factory that creates the instances of the model. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the factory that creates the instances of the model.
+ * @generated
+ */
+ RequirementsFactory getRequirementsFactory();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.sysml.requirements.Satisfy <em>Satisfy</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Satisfy</em>'.
+ * @see org.eclipse.papyrus.sysml.requirements.Satisfy
+ * @generated
+ */
+ EClass getSatisfy();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.sysml.requirements.TestCase <em>Test Case</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Test Case</em>'.
+ * @see org.eclipse.papyrus.sysml.requirements.TestCase
+ * @generated
+ */
+ EClass getTestCase();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.sysml.requirements.TestCase#getBase_Behavior <em>Base Behavior</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference '<em>Base Behavior</em>'.
+ * @see org.eclipse.papyrus.sysml.requirements.TestCase#getBase_Behavior()
+ * @see #getTestCase()
+ * @generated
+ */
+ EReference getTestCase_Base_Behavior();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.sysml.requirements.TestCase#getBase_Operation <em>Base Operation</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference '<em>Base Operation</em>'.
+ * @see org.eclipse.papyrus.sysml.requirements.TestCase#getBase_Operation()
+ * @see #getTestCase()
+ * @generated
+ */
+ EReference getTestCase_Base_Operation();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.papyrus.sysml.requirements.TestCase#getVerifies <em>Verifies</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference list '<em>Verifies</em>'.
+ * @see org.eclipse.papyrus.sysml.requirements.TestCase#getVerifies()
+ * @see #getTestCase()
+ * @generated
+ */
+ EReference getTestCase_Verifies();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.sysml.requirements.Verify <em>Verify</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Verify</em>'.
+ * @see org.eclipse.papyrus.sysml.requirements.Verify
+ * @generated
+ */
+ EClass getVerify();
+
+} // RequirementsPackage
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/Satisfy.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/Satisfy.java
new file mode 100755
index 0000000..c111dd2
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/Satisfy.java
@@ -0,0 +1,27 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.requirements;
+
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object ' <em><b>Satisfy</b></em>'. <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.papyrus.sysml.requirements.RequirementsPackage#getSatisfy()
+ * @model
+ * @generated
+ */
+public interface Satisfy extends org.eclipse.uml2.uml.profile.standard.Trace {
+
+} // Satisfy
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/TestCase.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/TestCase.java
new file mode 100755
index 0000000..ffbf7e5
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/TestCase.java
@@ -0,0 +1,112 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.requirements;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.uml2.uml.Behavior;
+import org.eclipse.uml2.uml.Operation;
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object ' <em><b>Test Case</b></em>'. <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.requirements.TestCase#getBase_Behavior <em>Base Behavior</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.requirements.TestCase#getBase_Operation <em>Base Operation</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.requirements.TestCase#getVerifies <em>Verifies</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.sysml.requirements.RequirementsPackage#getTestCase()
+ * @model
+ * @generated
+ */
+public interface TestCase extends EObject {
+
+ /**
+ * Returns the value of the '<em><b>Base Behavior</b></em>' reference. <!--
+ * begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Base Behavior</em>' reference isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Base Behavior</em>' reference.
+ * @see #setBase_Behavior(Behavior)
+ * @see org.eclipse.papyrus.sysml.requirements.RequirementsPackage#getTestCase_Base_Behavior()
+ * @model required="true" ordered="false"
+ * @generated
+ */
+ Behavior getBase_Behavior();
+
+ /**
+ * Returns the value of the '<em><b>Base Operation</b></em>' reference. <!--
+ * begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Base Operation</em>' reference isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Base Operation</em>' reference.
+ * @see #setBase_Operation(Operation)
+ * @see org.eclipse.papyrus.sysml.requirements.RequirementsPackage#getTestCase_Base_Operation()
+ * @model required="true" ordered="false"
+ * @generated
+ */
+ Operation getBase_Operation();
+
+ /**
+ * Returns the value of the '<em><b>Verifies</b></em>' reference list. The
+ * list contents are of type {@link org.eclipse.papyrus.sysml.requirements.Requirement}. <!--
+ * begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Verifies</em>' reference list isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Verifies</em>' reference list.
+ * @see org.eclipse.papyrus.sysml.requirements.RequirementsPackage#getTestCase_Verifies()
+ * @model transient="true" changeable="false" volatile="true" derived="true"
+ * ordered="false"
+ * @generated
+ */
+ EList<Requirement> getVerifies();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.sysml.requirements.TestCase#getBase_Behavior <em>Base Behavior</em>}' reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Base Behavior</em>' reference.
+ * @see #getBase_Behavior()
+ * @generated
+ */
+ void setBase_Behavior(Behavior value);
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.sysml.requirements.TestCase#getBase_Operation <em>Base Operation</em>}' reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Base Operation</em>' reference.
+ * @see #getBase_Operation()
+ * @generated
+ */
+ void setBase_Operation(Operation value);
+
+} // TestCase
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/VerdictKind.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/VerdictKind.java
new file mode 100755
index 0000000..9df6752
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/VerdictKind.java
@@ -0,0 +1,267 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.requirements;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.emf.common.util.Enumerator;
+
+/**
+ * <!-- begin-user-doc --> A representation of the literals of the enumeration ' <em><b>Verdict Kind</b></em>', and utility methods for working with
+ * them.
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.requirements.RequirementsPackage#getVerdictKind()
+ * @model
+ * @generated
+ */
+public enum VerdictKind implements Enumerator {
+ /**
+ * The '<em><b>Pass</b></em>' literal object. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see #PASS_VALUE
+ * @generated
+ * @ordered
+ */
+ PASS(0, "pass", "pass"),
+
+ /**
+ * The '<em><b>Fail</b></em>' literal object. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see #FAIL_VALUE
+ * @generated
+ * @ordered
+ */
+ FAIL(1, "fail", "fail"),
+
+ /**
+ * The '<em><b>Inconclusive</b></em>' literal object. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @see #INCONCLUSIVE_VALUE
+ * @generated
+ * @ordered
+ */
+ INCONCLUSIVE(2, "inconclusive", "inconclusive"),
+
+ /**
+ * The '<em><b>Error</b></em>' literal object. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see #ERROR_VALUE
+ * @generated
+ * @ordered
+ */
+ ERROR(3, "error", "error");
+
+ /**
+ * The '<em><b>Pass</b></em>' literal value. <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>Pass</b></em>' literal object isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @see #PASS
+ * @model name="pass"
+ * @generated
+ * @ordered
+ */
+ public static final int PASS_VALUE = 0;
+
+ /**
+ * The '<em><b>Fail</b></em>' literal value. <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>Fail</b></em>' literal object isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @see #FAIL
+ * @model name="fail"
+ * @generated
+ * @ordered
+ */
+ public static final int FAIL_VALUE = 1;
+
+ /**
+ * The '<em><b>Inconclusive</b></em>' literal value. <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>Inconclusive</b></em>' literal object isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @see #INCONCLUSIVE
+ * @model name="inconclusive"
+ * @generated
+ * @ordered
+ */
+ public static final int INCONCLUSIVE_VALUE = 2;
+
+ /**
+ * The '<em><b>Error</b></em>' literal value. <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>Error</b></em>' literal object isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @see #ERROR
+ * @model name="error"
+ * @generated
+ * @ordered
+ */
+ public static final int ERROR_VALUE = 3;
+
+ /**
+ * An array of all the '<em><b>Verdict Kind</b></em>' enumerators. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private static final VerdictKind[] VALUES_ARRAY = new VerdictKind[] { PASS, FAIL, INCONCLUSIVE, ERROR, };
+
+ /**
+ * A public read-only list of all the '<em><b>Verdict Kind</b></em>'
+ * enumerators. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static final List<VerdictKind> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
+
+ /**
+ * Returns the '<em><b>Verdict Kind</b></em>' literal with the specified
+ * integer value. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static VerdictKind get(int value) {
+ switch (value) {
+ case PASS_VALUE:
+ return PASS;
+ case FAIL_VALUE:
+ return FAIL;
+ case INCONCLUSIVE_VALUE:
+ return INCONCLUSIVE;
+ case ERROR_VALUE:
+ return ERROR;
+ }
+ return null;
+ }
+
+ /**
+ * Returns the '<em><b>Verdict Kind</b></em>' literal with the specified
+ * literal value. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static VerdictKind get(String literal) {
+ for (int i = 0; i < VALUES_ARRAY.length; ++i) {
+ VerdictKind result = VALUES_ARRAY[i];
+ if (result.toString().equals(literal)) {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the '<em><b>Verdict Kind</b></em>' literal with the specified
+ * name. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static VerdictKind getByName(String name) {
+ for (int i = 0; i < VALUES_ARRAY.length; ++i) {
+ VerdictKind result = VALUES_ARRAY[i];
+ if (result.getName().equals(name)) {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private final int value;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private final String name;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private final String literal;
+
+ /**
+ * Only this class can construct instances. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ private VerdictKind(int value, String name, String literal) {
+ this.value = value;
+ this.name = name;
+ this.literal = literal;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public String getLiteral() {
+ return literal;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public int getValue() {
+ return value;
+ }
+
+ /**
+ * Returns the literal value of the enumerator, which is its string
+ * representation. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String toString() {
+ return literal;
+ }
+
+} // VerdictKind
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/Verify.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/Verify.java
new file mode 100755
index 0000000..b7f1f09
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/Verify.java
@@ -0,0 +1,26 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.requirements;
+
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object ' <em><b>Verify</b></em>'. <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.papyrus.sysml.requirements.RequirementsPackage#getVerify()
+ * @model
+ * @generated
+ */
+public interface Verify extends org.eclipse.uml2.uml.profile.standard.Trace {
+} // Verify
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/internal/impl/CopyImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/internal/impl/CopyImpl.java
new file mode 100755
index 0000000..bd171d3
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/internal/impl/CopyImpl.java
@@ -0,0 +1,48 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.requirements.internal.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.papyrus.sysml.requirements.Copy;
+import org.eclipse.papyrus.sysml.requirements.RequirementsPackage;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object ' <em><b>Copy</b></em>'. <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class CopyImpl extends org.eclipse.uml2.uml.profile.standard.internal.impl.TraceImpl implements Copy {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected CopyImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return RequirementsPackage.Literals.COPY;
+ }
+
+} // CopyImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/internal/impl/DeriveReqtImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/internal/impl/DeriveReqtImpl.java
new file mode 100755
index 0000000..5964f59
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/internal/impl/DeriveReqtImpl.java
@@ -0,0 +1,48 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.requirements.internal.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.papyrus.sysml.requirements.DeriveReqt;
+import org.eclipse.papyrus.sysml.requirements.RequirementsPackage;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object ' <em><b>Derive Reqt</b></em>'. <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class DeriveReqtImpl extends org.eclipse.uml2.uml.profile.standard.internal.impl.TraceImpl implements DeriveReqt {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected DeriveReqtImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return RequirementsPackage.Literals.DERIVE_REQT;
+ }
+
+} // DeriveReqtImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/internal/impl/RequirementImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/internal/impl/RequirementImpl.java
new file mode 100755
index 0000000..8f383b5
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/internal/impl/RequirementImpl.java
@@ -0,0 +1,708 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.requirements.internal.impl;
+
+import java.util.Iterator;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.BasicEList;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+import org.eclipse.emf.ecore.util.EcoreEList.UnmodifiableEList;
+import org.eclipse.papyrus.sysml.requirements.Copy;
+import org.eclipse.papyrus.sysml.requirements.DeriveReqt;
+import org.eclipse.papyrus.sysml.requirements.Requirement;
+import org.eclipse.papyrus.sysml.requirements.RequirementsPackage;
+import org.eclipse.papyrus.sysml.requirements.Satisfy;
+import org.eclipse.papyrus.sysml.requirements.Verify;
+import org.eclipse.uml2.uml.Dependency;
+import org.eclipse.uml2.uml.DirectedRelationship;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.profile.standard.Refine;
+import org.eclipse.uml2.uml.profile.standard.StandardPackage;
+import org.eclipse.uml2.uml.profile.standard.Trace;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object ' <em><b>Requirement</b></em>'. <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.requirements.internal.impl.RequirementImpl#getText <em>Text</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.requirements.internal.impl.RequirementImpl#getId <em>Id</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.requirements.internal.impl.RequirementImpl#getDerived <em>Derived</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.requirements.internal.impl.RequirementImpl#getDerivedFrom <em>Derived From</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.requirements.internal.impl.RequirementImpl#getSatisfiedBy <em>Satisfied By</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.requirements.internal.impl.RequirementImpl#getRefinedBy <em>Refined By</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.requirements.internal.impl.RequirementImpl#getTracedTo <em>Traced To</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.requirements.internal.impl.RequirementImpl#getVerifiedBy <em>Verified By</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.requirements.internal.impl.RequirementImpl#getMaster <em>Master</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.requirements.internal.impl.RequirementImpl#getBase_Class <em>Base Class</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class RequirementImpl extends MinimalEObjectImpl.Container implements Requirement {
+
+ /**
+ * The default value of the '{@link #getText() <em>Text</em>}' attribute.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #getText()
+ * @generated
+ * @ordered
+ */
+ protected static final String TEXT_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getText() <em>Text</em>}' attribute.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #getText()
+ * @generated
+ * @ordered
+ */
+ protected String text = TEXT_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getId() <em>Id</em>}' attribute. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #getId()
+ * @generated
+ * @ordered
+ */
+ protected static final String ID_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getId() <em>Id</em>}' attribute. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #getId()
+ * @generated
+ * @ordered
+ */
+ protected String id = ID_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getBase_Class() <em>Base Class</em>}' reference.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #getBase_Class()
+ * @generated
+ * @ordered
+ */
+ protected org.eclipse.uml2.uml.Class base_Class;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected RequirementImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public org.eclipse.uml2.uml.Class basicGetBase_Class() {
+ return base_Class;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public Requirement basicGetMaster() {
+ // The Requirement is the supplier of the Copy link between the master
+ // Requirement and
+ // current
+ // This should return the TestCase verifying current Requirement
+ Requirement master = null;
+ Copy currentCopy = null;
+
+ if (getBase_Class() != null) {
+ Iterator<Dependency> itDep = getBase_Class().getClientDependencies().iterator();
+
+ // Find Copy link
+ while (itDep.hasNext()) {
+ Dependency currentDep = itDep.next();
+ currentCopy = UMLUtil.getStereotypeApplication(currentDep, Copy.class);
+
+ if (currentCopy != null) {
+ EList<NamedElement> suppliers = currentCopy.getBase_Abstraction().getSuppliers();
+ Iterator<NamedElement> it = suppliers.iterator();
+ while (it.hasNext() && (master == null)) {
+ Requirement currentRequirement = UMLUtil.getStereotypeApplication(it.next(), Requirement.class);
+ if (currentRequirement != null) {
+ master = currentRequirement;
+ }
+ }
+ }
+ }
+ }
+ return master;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case RequirementsPackage.REQUIREMENT__TEXT:
+ return getText();
+ case RequirementsPackage.REQUIREMENT__ID:
+ return getId();
+ case RequirementsPackage.REQUIREMENT__DERIVED:
+ return getDerived();
+ case RequirementsPackage.REQUIREMENT__DERIVED_FROM:
+ return getDerivedFrom();
+ case RequirementsPackage.REQUIREMENT__SATISFIED_BY:
+ return getSatisfiedBy();
+ case RequirementsPackage.REQUIREMENT__REFINED_BY:
+ return getRefinedBy();
+ case RequirementsPackage.REQUIREMENT__TRACED_TO:
+ return getTracedTo();
+ case RequirementsPackage.REQUIREMENT__VERIFIED_BY:
+ return getVerifiedBy();
+ case RequirementsPackage.REQUIREMENT__MASTER:
+ if (resolve) {
+ return getMaster();
+ }
+ return basicGetMaster();
+ case RequirementsPackage.REQUIREMENT__BASE_CLASS:
+ if (resolve) {
+ return getBase_Class();
+ }
+ return basicGetBase_Class();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case RequirementsPackage.REQUIREMENT__TEXT:
+ return TEXT_EDEFAULT == null ? text != null : !TEXT_EDEFAULT.equals(text);
+ case RequirementsPackage.REQUIREMENT__ID:
+ return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id);
+ case RequirementsPackage.REQUIREMENT__DERIVED:
+ return !getDerived().isEmpty();
+ case RequirementsPackage.REQUIREMENT__DERIVED_FROM:
+ return !getDerivedFrom().isEmpty();
+ case RequirementsPackage.REQUIREMENT__SATISFIED_BY:
+ return !getSatisfiedBy().isEmpty();
+ case RequirementsPackage.REQUIREMENT__REFINED_BY:
+ return !getRefinedBy().isEmpty();
+ case RequirementsPackage.REQUIREMENT__TRACED_TO:
+ return !getTracedTo().isEmpty();
+ case RequirementsPackage.REQUIREMENT__VERIFIED_BY:
+ return !getVerifiedBy().isEmpty();
+ case RequirementsPackage.REQUIREMENT__MASTER:
+ return basicGetMaster() != null;
+ case RequirementsPackage.REQUIREMENT__BASE_CLASS:
+ return base_Class != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case RequirementsPackage.REQUIREMENT__TEXT:
+ setText((String) newValue);
+ return;
+ case RequirementsPackage.REQUIREMENT__ID:
+ setId((String) newValue);
+ return;
+ case RequirementsPackage.REQUIREMENT__BASE_CLASS:
+ setBase_Class((org.eclipse.uml2.uml.Class) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return RequirementsPackage.Literals.REQUIREMENT;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case RequirementsPackage.REQUIREMENT__TEXT:
+ setText(TEXT_EDEFAULT);
+ return;
+ case RequirementsPackage.REQUIREMENT__ID:
+ setId(ID_EDEFAULT);
+ return;
+ case RequirementsPackage.REQUIREMENT__BASE_CLASS:
+ setBase_Class((org.eclipse.uml2.uml.Class) null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public org.eclipse.uml2.uml.Class getBase_Class() {
+ if (base_Class != null && base_Class.eIsProxy()) {
+ InternalEObject oldBase_Class = (InternalEObject) base_Class;
+ base_Class = (org.eclipse.uml2.uml.Class) eResolveProxy(oldBase_Class);
+ if (base_Class != oldBase_Class) {
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, RequirementsPackage.REQUIREMENT__BASE_CLASS, oldBase_Class, base_Class));
+ }
+ }
+ }
+ return base_Class;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public EList<Requirement> getDerived() {
+ // This should return the Requirement(s) derived from current
+ EList<Requirement> derived = new BasicEList<Requirement>();
+ DeriveReqt currentDeriveReqt = null;
+
+ if (getBase_Class() != null) {
+ Iterator<DirectedRelationship> itDep = getBase_Class().getTargetDirectedRelationships().iterator();
+
+ // Find DeriveReqt link
+ while (itDep.hasNext()) {
+ DirectedRelationship currentDirectedRelationship = itDep.next();
+ currentDeriveReqt = UMLUtil.getStereotypeApplication(currentDirectedRelationship, DeriveReqt.class);
+
+ if (currentDeriveReqt != null) {
+ EList<NamedElement> clients = currentDeriveReqt.getBase_Abstraction().getClients();
+ Iterator<NamedElement> it = clients.iterator();
+ while (it.hasNext()) {
+ Requirement currentRequirement = UMLUtil.getStereotypeApplication(it.next(), Requirement.class);
+ if (currentRequirement != null) {
+ derived.add(currentRequirement);
+ }
+ }
+ }
+ }
+ }
+
+ UnmodifiableEList<Requirement> resultList = new UnmodifiableEList<Requirement>(this, RequirementsPackage.eINSTANCE.getRequirement_Derived(), derived.size(), derived.toArray());
+ return resultList;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public EList<Requirement> getDerivedFrom() {
+ // This should return the Requirement(s) this Requirement is derived
+ // from
+ EList<Requirement> derivedFrom = new BasicEList<Requirement>();
+ DeriveReqt currentDeriveReqt = null;
+ if (getBase_Class() != null) {
+ Iterator<DirectedRelationship> itDep = getBase_Class().getSourceDirectedRelationships().iterator();
+
+ // Find DeriveReqt link
+ while (itDep.hasNext()) {
+ DirectedRelationship currentDRelationship = itDep.next();
+ currentDeriveReqt = UMLUtil.getStereotypeApplication(currentDRelationship, DeriveReqt.class);
+
+ if (currentDeriveReqt != null) {
+ EList<NamedElement> suppliers = currentDeriveReqt.getBase_Abstraction().getSuppliers();
+ Iterator<NamedElement> it = suppliers.iterator();
+ while (it.hasNext()) {
+ Requirement currentRequirement = UMLUtil.getStereotypeApplication(it.next(), Requirement.class);
+ if (currentRequirement != null) {
+ derivedFrom.add(currentRequirement);
+ }
+ }
+ }
+ }
+ }
+
+ UnmodifiableEList<Requirement> resultList = new UnmodifiableEList<Requirement>(this, RequirementsPackage.eINSTANCE.getRequirement_DerivedFrom(), derivedFrom.size(), derivedFrom.toArray());
+ return resultList;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public String getId() {
+ return id;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Requirement getMaster() {
+ Requirement master = basicGetMaster();
+ return master != null && master.eIsProxy() ? (Requirement) eResolveProxy((InternalEObject) master) : master;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public EList<NamedElement> getRefinedBy() {
+ // This should return the NamedElement(s) that refine current
+ // Requirement
+ EList<NamedElement> refinedBy = new BasicEList<NamedElement>();
+ Refine currentRefine = null;
+
+ if (getBase_Class() != null) {
+ Iterator<DirectedRelationship> itDep = getBase_Class().getTargetDirectedRelationships().iterator();
+
+ // Find Refine link
+ while (itDep.hasNext()) {
+ DirectedRelationship currentDRelationship = itDep.next();
+ currentRefine = UMLUtil.getStereotypeApplication(currentDRelationship, Refine.class);
+
+ if (currentRefine != null) {
+ refinedBy.addAll(currentRefine.getBase_Abstraction().getClients());
+ }
+ }
+ }
+
+ UnmodifiableEList<NamedElement> resultList = new UnmodifiableEList<NamedElement>(this, RequirementsPackage.eINSTANCE.getRequirement_RefinedBy(), refinedBy.size(), refinedBy.toArray());
+ return resultList;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public NamedElement getRefinedBy(String name) {
+ return getRefinedBy(name, false, null);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public NamedElement getRefinedBy(String name, boolean ignoreCase, EClass eClass) {
+ refinedByLoop: for (NamedElement refinedBy : getRefinedBy()) {
+ if (eClass != null && !eClass.isInstance(refinedBy)) {
+ continue refinedByLoop;
+ }
+ if (name != null && !(ignoreCase ? name.equalsIgnoreCase(refinedBy.getName()) : name.equals(refinedBy.getName()))) {
+ continue refinedByLoop;
+ }
+ return refinedBy;
+ }
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public EList<NamedElement> getSatisfiedBy() {
+ // This should return the NamedElement(s) that satisfy current
+ // Requirement
+ EList<NamedElement> satisfyBy = new BasicEList<NamedElement>();
+ Satisfy currentSatisfy = null;
+
+ if (getBase_Class() != null) {
+ Iterator<DirectedRelationship> itDep = getBase_Class().getTargetDirectedRelationships().iterator();
+
+ // Find Satisfy link
+ while (itDep.hasNext()) {
+ DirectedRelationship currentDRelationship = itDep.next();
+ currentSatisfy = UMLUtil.getStereotypeApplication(currentDRelationship, Satisfy.class);
+
+ if (currentSatisfy != null) {
+ satisfyBy.addAll(currentSatisfy.getBase_Abstraction().getClients());
+ }
+ }
+ }
+
+ UnmodifiableEList<NamedElement> resultList = new UnmodifiableEList<NamedElement>(this, RequirementsPackage.eINSTANCE.getRequirement_SatisfiedBy(), satisfyBy.size(), satisfyBy.toArray());
+ return resultList;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public NamedElement getSatisfiedBy(String name) {
+ return getSatisfiedBy(name, false, null);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public NamedElement getSatisfiedBy(String name, boolean ignoreCase, EClass eClass) {
+ satisfiedByLoop: for (NamedElement satisfiedBy : getSatisfiedBy()) {
+ if (eClass != null && !eClass.isInstance(satisfiedBy)) {
+ continue satisfiedByLoop;
+ }
+ if (name != null && !(ignoreCase ? name.equalsIgnoreCase(satisfiedBy.getName()) : name.equals(satisfiedBy.getName()))) {
+ continue satisfiedByLoop;
+ }
+ return satisfiedBy;
+ }
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public String getText() {
+ return text;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public EList<NamedElement> getTracedTo() {
+ // This should return the NamedElement(s) traced by current Requirement
+ // SysML spec. : Derived from all elements that are the client of a
+ // «trace» relationship
+ // for which this requirement is a supplier.
+ EList<NamedElement> tracedTo = new BasicEList<NamedElement>();
+ Trace currentTrace = null;
+
+ if (getBase_Class() != null) {
+ Iterator<DirectedRelationship> itDep = getBase_Class().getTargetDirectedRelationships().iterator();
+
+ // Find Trace link
+ while (itDep.hasNext()) {
+ DirectedRelationship currentDR = itDep.next();
+ currentTrace = UMLUtil.getStereotypeApplication(currentDR, Trace.class);
+
+ // Must be a Trace not a subtype (see bug #352563).
+ if ((currentTrace != null) && (currentTrace.eClass() == StandardPackage.eINSTANCE.getTrace())) {
+ EList<NamedElement> suppliers = currentTrace.getBase_Abstraction().getClients();
+ tracedTo.addAll(suppliers);
+ }
+ }
+ }
+
+ UnmodifiableEList<NamedElement> resultList = new UnmodifiableEList<NamedElement>(this, RequirementsPackage.eINSTANCE.getRequirement_TracedTo(), tracedTo.size(), tracedTo.toArray());
+ return resultList;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public NamedElement getTracedTo(String name) {
+ return getTracedTo(name, false, null);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public NamedElement getTracedTo(String name, boolean ignoreCase, EClass eClass) {
+ tracedToLoop: for (NamedElement tracedTo : getTracedTo()) {
+ if (eClass != null && !eClass.isInstance(tracedTo)) {
+ continue tracedToLoop;
+ }
+ if (name != null && !(ignoreCase ? name.equalsIgnoreCase(tracedTo.getName()) : name.equals(tracedTo.getName()))) {
+ continue tracedToLoop;
+ }
+ return tracedTo;
+ }
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public EList<NamedElement> getVerifiedBy() {
+ // This should return the list of NamedElement verifying current
+ // Requirement
+ EList<NamedElement> verifiedBy = new BasicEList<NamedElement>();
+ Verify currentVerify = null;
+
+ if (getBase_Class() != null) {
+ Iterator<DirectedRelationship> itDep = getBase_Class().getTargetDirectedRelationships().iterator();
+
+ // Find Verify link
+ while (itDep.hasNext()) {
+ DirectedRelationship currentDRelationship = itDep.next();
+ currentVerify = UMLUtil.getStereotypeApplication(currentDRelationship, Verify.class);
+
+ if (currentVerify != null) {
+ verifiedBy.addAll(currentVerify.getBase_Abstraction().getClients());
+ }
+ }
+ }
+
+ UnmodifiableEList<NamedElement> resultList = new UnmodifiableEList<NamedElement>(this, RequirementsPackage.eINSTANCE.getRequirement_VerifiedBy(), verifiedBy.size(), verifiedBy.toArray());
+ return resultList;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public NamedElement getVerifiedBy(String name) {
+ return getVerifiedBy(name, false, null);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public NamedElement getVerifiedBy(String name, boolean ignoreCase, EClass eClass) {
+ verifiedByLoop: for (NamedElement verifiedBy : getVerifiedBy()) {
+ if (eClass != null && !eClass.isInstance(verifiedBy)) {
+ continue verifiedByLoop;
+ }
+ if (name != null && !(ignoreCase ? name.equalsIgnoreCase(verifiedBy.getName()) : name.equals(verifiedBy.getName()))) {
+ continue verifiedByLoop;
+ }
+ return verifiedBy;
+ }
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setBase_Class(org.eclipse.uml2.uml.Class newBase_Class) {
+ org.eclipse.uml2.uml.Class oldBase_Class = base_Class;
+ base_Class = newBase_Class;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, RequirementsPackage.REQUIREMENT__BASE_CLASS, oldBase_Class, base_Class));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setId(String newId) {
+ String oldId = id;
+ id = newId;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, RequirementsPackage.REQUIREMENT__ID, oldId, id));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public void setMaster(Requirement newMaster) {
+
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setText(String newText) {
+ String oldText = text;
+ text = newText;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, RequirementsPackage.REQUIREMENT__TEXT, oldText, text));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) {
+ return super.toString();
+ }
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (text: ");
+ result.append(text);
+ result.append(", id: ");
+ result.append(id);
+ result.append(')');
+ return result.toString();
+ }
+
+} // RequirementImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/internal/impl/RequirementRelatedImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/internal/impl/RequirementRelatedImpl.java
new file mode 100755
index 0000000..c57605c
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/internal/impl/RequirementRelatedImpl.java
@@ -0,0 +1,350 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.requirements.internal.impl;
+
+import java.util.Iterator;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.BasicEList;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+import org.eclipse.emf.ecore.util.EcoreEList.UnmodifiableEList;
+import org.eclipse.papyrus.sysml.requirements.Requirement;
+import org.eclipse.papyrus.sysml.requirements.RequirementRelated;
+import org.eclipse.papyrus.sysml.requirements.RequirementsPackage;
+import org.eclipse.papyrus.sysml.requirements.Satisfy;
+import org.eclipse.papyrus.sysml.requirements.Verify;
+import org.eclipse.uml2.uml.Dependency;
+import org.eclipse.uml2.uml.DirectedRelationship;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.profile.standard.Refine;
+import org.eclipse.uml2.uml.profile.standard.StandardPackage;
+import org.eclipse.uml2.uml.profile.standard.Trace;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object ' <em><b>Requirement Related</b></em>'. <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.requirements.internal.impl.RequirementRelatedImpl#getBase_NamedElement <em>Base Named Element</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.requirements.internal.impl.RequirementRelatedImpl#getTracedFrom <em>Traced From</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.requirements.internal.impl.RequirementRelatedImpl#getSatisfies <em>Satisfies</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.requirements.internal.impl.RequirementRelatedImpl#getRefines <em>Refines</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.requirements.internal.impl.RequirementRelatedImpl#getVerifies <em>Verifies</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class RequirementRelatedImpl extends MinimalEObjectImpl.Container implements RequirementRelated {
+
+ /**
+ * The cached value of the '{@link #getBase_NamedElement() <em>Base Named Element</em>}' reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see #getBase_NamedElement()
+ * @generated
+ * @ordered
+ */
+ protected NamedElement base_NamedElement;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected RequirementRelatedImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public NamedElement basicGetBase_NamedElement() {
+ return base_NamedElement;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case RequirementsPackage.REQUIREMENT_RELATED__BASE_NAMED_ELEMENT:
+ if (resolve) {
+ return getBase_NamedElement();
+ }
+ return basicGetBase_NamedElement();
+ case RequirementsPackage.REQUIREMENT_RELATED__TRACED_FROM:
+ return getTracedFrom();
+ case RequirementsPackage.REQUIREMENT_RELATED__SATISFIES:
+ return getSatisfies();
+ case RequirementsPackage.REQUIREMENT_RELATED__REFINES:
+ return getRefines();
+ case RequirementsPackage.REQUIREMENT_RELATED__VERIFIES:
+ return getVerifies();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case RequirementsPackage.REQUIREMENT_RELATED__BASE_NAMED_ELEMENT:
+ return base_NamedElement != null;
+ case RequirementsPackage.REQUIREMENT_RELATED__TRACED_FROM:
+ return !getTracedFrom().isEmpty();
+ case RequirementsPackage.REQUIREMENT_RELATED__SATISFIES:
+ return !getSatisfies().isEmpty();
+ case RequirementsPackage.REQUIREMENT_RELATED__REFINES:
+ return !getRefines().isEmpty();
+ case RequirementsPackage.REQUIREMENT_RELATED__VERIFIES:
+ return !getVerifies().isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case RequirementsPackage.REQUIREMENT_RELATED__BASE_NAMED_ELEMENT:
+ setBase_NamedElement((NamedElement) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return RequirementsPackage.Literals.REQUIREMENT_RELATED;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case RequirementsPackage.REQUIREMENT_RELATED__BASE_NAMED_ELEMENT:
+ setBase_NamedElement((NamedElement) null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public NamedElement getBase_NamedElement() {
+ if (base_NamedElement != null && base_NamedElement.eIsProxy()) {
+ InternalEObject oldBase_NamedElement = (InternalEObject) base_NamedElement;
+ base_NamedElement = (NamedElement) eResolveProxy(oldBase_NamedElement);
+ if (base_NamedElement != oldBase_NamedElement) {
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, RequirementsPackage.REQUIREMENT_RELATED__BASE_NAMED_ELEMENT, oldBase_NamedElement, base_NamedElement));
+ }
+ }
+ }
+ return base_NamedElement;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public EList<Requirement> getRefines() {
+ // This should return the Requirement(s) refined by current element
+ EList<Requirement> refines = new BasicEList<Requirement>();
+ Refine currentRefine = null;
+
+ if (getBase_NamedElement() != null) {
+ // Find Refine link
+ Iterator<Dependency> itDep = getBase_NamedElement().getClientDependencies().iterator();
+
+ while (itDep.hasNext()) {
+ Dependency currentDependency = itDep.next();
+ currentRefine = UMLUtil.getStereotypeApplication(currentDependency, Refine.class);
+
+ if (currentRefine != null) {
+ EList<NamedElement> suppliers = currentRefine.getBase_Abstraction().getSuppliers();
+ Iterator<NamedElement> it = suppliers.iterator();
+ while (it.hasNext()) {
+ Requirement currentRequirement = UMLUtil.getStereotypeApplication(it.next(), Requirement.class);
+ if (currentRequirement != null) {
+ refines.add(currentRequirement);
+ }
+ }
+ }
+ }
+ }
+
+ UnmodifiableEList<Requirement> resultList = new UnmodifiableEList<Requirement>(this, RequirementsPackage.eINSTANCE.getRequirementRelated_Refines(), refines.size(), refines.toArray());
+ return resultList;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public EList<Requirement> getSatisfies() {
+ // This should return the Requirement(s) satisfied by current element
+ EList<Requirement> satisfies = new BasicEList<Requirement>();
+ Satisfy currentSatisfy = null;
+
+ if (getBase_NamedElement() != null) {
+ // Find Satisfy link
+ Iterator<Dependency> itDep = getBase_NamedElement().getClientDependencies().iterator();
+
+ while (itDep.hasNext()) {
+ Dependency currentDependency = itDep.next();
+ currentSatisfy = UMLUtil.getStereotypeApplication(currentDependency, Satisfy.class);
+
+ if (currentSatisfy != null) {
+ EList<NamedElement> suppliers = currentSatisfy.getBase_Abstraction().getSuppliers();
+ Iterator<NamedElement> it = suppliers.iterator();
+ while (it.hasNext()) {
+ Requirement currentRequirement = UMLUtil.getStereotypeApplication(it.next(), Requirement.class);
+ if (currentRequirement != null) {
+ satisfies.add(currentRequirement);
+ }
+ }
+ }
+ }
+ }
+
+ UnmodifiableEList<Requirement> resultList = new UnmodifiableEList<Requirement>(this, RequirementsPackage.eINSTANCE.getRequirementRelated_Satisfies(), satisfies.size(), satisfies.toArray());
+ return resultList;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public EList<Requirement> getTracedFrom() {
+
+ // Derived from all requirements that are supplier of a "trace"
+ // relationship for
+ // which this element is a client.
+ // "trace" subtypes are not included (see bug #352563).
+ EList<Requirement> tracedFrom = new BasicEList<Requirement>();
+ Trace currentTrace = null;
+
+ if (getBase_NamedElement() != null) {
+ // Find Trace link
+ EList<DirectedRelationship> relationships = getBase_NamedElement().getSourceDirectedRelationships();
+ Iterator<DirectedRelationship> itDep = relationships.iterator();
+
+ while (itDep.hasNext()) {
+ DirectedRelationship currentDRelationship = itDep.next();
+ currentTrace = UMLUtil.getStereotypeApplication(currentDRelationship, Trace.class);
+
+ // Must be a Trace not a subtype (see bug #352563).
+ if ((currentTrace != null) && (currentTrace.eClass() == StandardPackage.eINSTANCE.getTrace())) {
+ EList<NamedElement> clients = currentTrace.getBase_Abstraction().getSuppliers();
+ Iterator<NamedElement> it = clients.iterator();
+ while (it.hasNext()) {
+ Requirement currentRequirement = UMLUtil.getStereotypeApplication(it.next(), Requirement.class);
+ if (currentRequirement != null) {
+ tracedFrom.add(currentRequirement);
+ }
+ }
+ }
+ }
+ }
+
+ UnmodifiableEList<Requirement> resultList = new UnmodifiableEList<Requirement>(this, RequirementsPackage.eINSTANCE.getRequirementRelated_TracedFrom(), tracedFrom.size(), tracedFrom.toArray());
+ return resultList;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public EList<Requirement> getVerifies() {
+ // This should return the Requirement(s) verified by current element
+ EList<Requirement> verifies = new BasicEList<Requirement>();
+ Verify currentVerify = null;
+
+ if (getBase_NamedElement() != null) {
+ // Find Satisfy link
+ Iterator<Dependency> itDep = getBase_NamedElement().getClientDependencies().iterator();
+
+ while (itDep.hasNext()) {
+ Dependency currentDependency = itDep.next();
+ currentVerify = UMLUtil.getStereotypeApplication(currentDependency, Verify.class);
+
+ if (currentVerify != null) {
+ EList<NamedElement> suppliers = currentVerify.getBase_Abstraction().getSuppliers();
+ Iterator<NamedElement> it = suppliers.iterator();
+ while (it.hasNext()) {
+ Requirement currentRequirement = UMLUtil.getStereotypeApplication(it.next(), Requirement.class);
+ if (currentRequirement != null) {
+ verifies.add(currentRequirement);
+ }
+ }
+ }
+ }
+ }
+
+
+ UnmodifiableEList<Requirement> resultList = new UnmodifiableEList<Requirement>(this, RequirementsPackage.eINSTANCE.getRequirementRelated_Verifies(), verifies.size(), verifies.toArray());
+ return resultList;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setBase_NamedElement(NamedElement newBase_NamedElement) {
+ NamedElement oldBase_NamedElement = base_NamedElement;
+ base_NamedElement = newBase_NamedElement;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, RequirementsPackage.REQUIREMENT_RELATED__BASE_NAMED_ELEMENT, oldBase_NamedElement, base_NamedElement));
+ }
+ }
+
+} // RequirementRelatedImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/internal/impl/RequirementsFactoryImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/internal/impl/RequirementsFactoryImpl.java
new file mode 100755
index 0000000..4622a0f
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/internal/impl/RequirementsFactoryImpl.java
@@ -0,0 +1,186 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.requirements.internal.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+import org.eclipse.papyrus.sysml.requirements.Copy;
+import org.eclipse.papyrus.sysml.requirements.DeriveReqt;
+import org.eclipse.papyrus.sysml.requirements.Requirement;
+import org.eclipse.papyrus.sysml.requirements.RequirementRelated;
+import org.eclipse.papyrus.sysml.requirements.RequirementsFactory;
+import org.eclipse.papyrus.sysml.requirements.RequirementsPackage;
+import org.eclipse.papyrus.sysml.requirements.Satisfy;
+import org.eclipse.papyrus.sysml.requirements.TestCase;
+import org.eclipse.papyrus.sysml.requirements.Verify;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model <b>Factory</b>. <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+public class RequirementsFactoryImpl extends EFactoryImpl implements RequirementsFactory {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static RequirementsPackage getPackage() {
+ return RequirementsPackage.eINSTANCE;
+ }
+
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public static RequirementsFactory init() {
+ try {
+ RequirementsFactory theRequirementsFactory = (RequirementsFactory) EPackage.Registry.INSTANCE.getEFactory(RequirementsPackage.eNS_URI);
+ if (theRequirementsFactory != null) {
+ return theRequirementsFactory;
+ }
+ } catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new RequirementsFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public RequirementsFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ case RequirementsPackage.DERIVE_REQT:
+ return createDeriveReqt();
+ case RequirementsPackage.VERIFY:
+ return createVerify();
+ case RequirementsPackage.COPY:
+ return createCopy();
+ case RequirementsPackage.SATISFY:
+ return createSatisfy();
+ case RequirementsPackage.TEST_CASE:
+ return createTestCase();
+ case RequirementsPackage.REQUIREMENT:
+ return createRequirement();
+ case RequirementsPackage.REQUIREMENT_RELATED:
+ return createRequirementRelated();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Copy createCopy() {
+ CopyImpl copy = new CopyImpl();
+ return copy;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public DeriveReqt createDeriveReqt() {
+ DeriveReqtImpl deriveReqt = new DeriveReqtImpl();
+ return deriveReqt;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Requirement createRequirement() {
+ RequirementImpl requirement = new RequirementImpl();
+ return requirement;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public RequirementRelated createRequirementRelated() {
+ RequirementRelatedImpl requirementRelated = new RequirementRelatedImpl();
+ return requirementRelated;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Satisfy createSatisfy() {
+ SatisfyImpl satisfy = new SatisfyImpl();
+ return satisfy;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public TestCase createTestCase() {
+ TestCaseImpl testCase = new TestCaseImpl();
+ return testCase;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Verify createVerify() {
+ VerifyImpl verify = new VerifyImpl();
+ return verify;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public RequirementsPackage getRequirementsPackage() {
+ return (RequirementsPackage) getEPackage();
+ }
+
+} // RequirementsFactoryImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/internal/impl/RequirementsPackageImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/internal/impl/RequirementsPackageImpl.java
new file mode 100755
index 0000000..ca87f35
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/internal/impl/RequirementsPackageImpl.java
@@ -0,0 +1,589 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.requirements.internal.impl;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+import org.eclipse.papyrus.sysml.SysmlPackage;
+import org.eclipse.papyrus.sysml.activities.ActivitiesPackage;
+import org.eclipse.papyrus.sysml.activities.internal.impl.ActivitiesPackageImpl;
+import org.eclipse.papyrus.sysml.allocations.AllocationsPackage;
+import org.eclipse.papyrus.sysml.allocations.internal.impl.AllocationsPackageImpl;
+import org.eclipse.papyrus.sysml.blocks.BlocksPackage;
+import org.eclipse.papyrus.sysml.blocks.internal.impl.BlocksPackageImpl;
+import org.eclipse.papyrus.sysml.constraints.ConstraintsPackage;
+import org.eclipse.papyrus.sysml.constraints.internal.impl.ConstraintsPackageImpl;
+import org.eclipse.papyrus.sysml.interactions.InteractionsPackage;
+import org.eclipse.papyrus.sysml.interactions.internal.impl.InteractionsPackageImpl;
+import org.eclipse.papyrus.sysml.internal.impl.SysmlPackageImpl;
+import org.eclipse.papyrus.sysml.modelelements.ModelelementsPackage;
+import org.eclipse.papyrus.sysml.modelelements.internal.impl.ModelelementsPackageImpl;
+import org.eclipse.papyrus.sysml.portandflows.PortandflowsPackage;
+import org.eclipse.papyrus.sysml.portandflows.internal.impl.PortandflowsPackageImpl;
+import org.eclipse.papyrus.sysml.requirements.Copy;
+import org.eclipse.papyrus.sysml.requirements.DeriveReqt;
+import org.eclipse.papyrus.sysml.requirements.Requirement;
+import org.eclipse.papyrus.sysml.requirements.RequirementRelated;
+import org.eclipse.papyrus.sysml.requirements.RequirementsFactory;
+import org.eclipse.papyrus.sysml.requirements.RequirementsPackage;
+import org.eclipse.papyrus.sysml.requirements.Satisfy;
+import org.eclipse.papyrus.sysml.requirements.TestCase;
+import org.eclipse.papyrus.sysml.requirements.Verify;
+import org.eclipse.papyrus.sysml.statemachines.StatemachinesPackage;
+import org.eclipse.papyrus.sysml.statemachines.internal.impl.StatemachinesPackageImpl;
+import org.eclipse.papyrus.sysml.usecases.UsecasesPackage;
+import org.eclipse.papyrus.sysml.usecases.internal.impl.UsecasesPackageImpl;
+import org.eclipse.uml2.types.TypesPackage;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.eclipse.uml2.uml.profile.standard.StandardPackage;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model <b>Package</b>. <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+public class RequirementsPackageImpl extends EPackageImpl implements RequirementsPackage {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private static boolean isInited = false;
+
+ /**
+ * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+ *
+ * <p>
+ * This method is used to initialize {@link RequirementsPackage#eINSTANCE} when that field is accessed. Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @see #eNS_URI
+ * @see #createPackageContents()
+ * @see #initializePackageContents()
+ * @generated
+ */
+ public static RequirementsPackage init() {
+ if (isInited) {
+ return (RequirementsPackage) EPackage.Registry.INSTANCE.getEPackage(RequirementsPackage.eNS_URI);
+ }
+
+ // Obtain or create and register package
+ RequirementsPackageImpl theRequirementsPackage = (RequirementsPackageImpl) (EPackage.Registry.INSTANCE.get(eNS_URI) instanceof RequirementsPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new RequirementsPackageImpl());
+
+ isInited = true;
+
+ // Initialize simple dependencies
+ StandardPackage.eINSTANCE.eClass();
+
+ // Obtain or create and register interdependencies
+ SysmlPackageImpl theSysmlPackage = (SysmlPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(SysmlPackage.eNS_URI) instanceof SysmlPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(SysmlPackage.eNS_URI) : SysmlPackage.eINSTANCE);
+ ModelelementsPackageImpl theModelelementsPackage = (ModelelementsPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(ModelelementsPackage.eNS_URI) instanceof ModelelementsPackageImpl ? EPackage.Registry.INSTANCE
+ .getEPackage(ModelelementsPackage.eNS_URI) : ModelelementsPackage.eINSTANCE);
+ BlocksPackageImpl theBlocksPackage = (BlocksPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(BlocksPackage.eNS_URI) instanceof BlocksPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(BlocksPackage.eNS_URI) : BlocksPackage.eINSTANCE);
+ PortandflowsPackageImpl thePortandflowsPackage = (PortandflowsPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(PortandflowsPackage.eNS_URI) instanceof PortandflowsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(PortandflowsPackage.eNS_URI)
+ : PortandflowsPackage.eINSTANCE);
+ ConstraintsPackageImpl theConstraintsPackage = (ConstraintsPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(ConstraintsPackage.eNS_URI) instanceof ConstraintsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ConstraintsPackage.eNS_URI)
+ : ConstraintsPackage.eINSTANCE);
+ ActivitiesPackageImpl theActivitiesPackage = (ActivitiesPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(ActivitiesPackage.eNS_URI) instanceof ActivitiesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ActivitiesPackage.eNS_URI)
+ : ActivitiesPackage.eINSTANCE);
+ AllocationsPackageImpl theAllocationsPackage = (AllocationsPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(AllocationsPackage.eNS_URI) instanceof AllocationsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(AllocationsPackage.eNS_URI)
+ : AllocationsPackage.eINSTANCE);
+ InteractionsPackageImpl theInteractionsPackage = (InteractionsPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(InteractionsPackage.eNS_URI) instanceof InteractionsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(InteractionsPackage.eNS_URI)
+ : InteractionsPackage.eINSTANCE);
+ StatemachinesPackageImpl theStatemachinesPackage = (StatemachinesPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(StatemachinesPackage.eNS_URI) instanceof StatemachinesPackageImpl ? EPackage.Registry.INSTANCE
+ .getEPackage(StatemachinesPackage.eNS_URI) : StatemachinesPackage.eINSTANCE);
+ UsecasesPackageImpl theUsecasesPackage = (UsecasesPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(UsecasesPackage.eNS_URI) instanceof UsecasesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(UsecasesPackage.eNS_URI)
+ : UsecasesPackage.eINSTANCE);
+
+ // Create package meta-data objects
+ theRequirementsPackage.createPackageContents();
+ theSysmlPackage.createPackageContents();
+ theModelelementsPackage.createPackageContents();
+ theBlocksPackage.createPackageContents();
+ thePortandflowsPackage.createPackageContents();
+ theConstraintsPackage.createPackageContents();
+ theActivitiesPackage.createPackageContents();
+ theAllocationsPackage.createPackageContents();
+ theInteractionsPackage.createPackageContents();
+ theStatemachinesPackage.createPackageContents();
+ theUsecasesPackage.createPackageContents();
+
+ // Initialize created meta-data
+ theRequirementsPackage.initializePackageContents();
+ theSysmlPackage.initializePackageContents();
+ theModelelementsPackage.initializePackageContents();
+ theBlocksPackage.initializePackageContents();
+ thePortandflowsPackage.initializePackageContents();
+ theConstraintsPackage.initializePackageContents();
+ theActivitiesPackage.initializePackageContents();
+ theAllocationsPackage.initializePackageContents();
+ theInteractionsPackage.initializePackageContents();
+ theStatemachinesPackage.initializePackageContents();
+ theUsecasesPackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theRequirementsPackage.freeze();
+
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(RequirementsPackage.eNS_URI, theRequirementsPackage);
+ return theRequirementsPackage;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass deriveReqtEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass verifyEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass copyEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass satisfyEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass testCaseEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass requirementEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass requirementRelatedEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private boolean isCreated = false;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Creates an instance of the model <b>Package</b>, registered with {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the
+ * package
+ * package URI value.
+ * <p>
+ * Note: the correct way to create the package is via the static factory method {@link #init init()}, which also performs initialization of the package, or returns the registered package, if one already exists. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.emf.ecore.EPackage.Registry
+ * @see org.eclipse.papyrus.sysml.requirements.RequirementsPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private RequirementsPackageImpl() {
+ super(eNS_URI, RequirementsFactory.eINSTANCE);
+ }
+
+ /**
+ * Creates the meta-model objects for the package. This method is
+ * guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void createPackageContents() {
+ if (isCreated) {
+ return;
+ }
+ isCreated = true;
+
+ // Create classes and their features
+ deriveReqtEClass = createEClass(DERIVE_REQT);
+
+ verifyEClass = createEClass(VERIFY);
+
+ copyEClass = createEClass(COPY);
+
+ satisfyEClass = createEClass(SATISFY);
+
+ testCaseEClass = createEClass(TEST_CASE);
+ createEReference(testCaseEClass, TEST_CASE__BASE_BEHAVIOR);
+ createEReference(testCaseEClass, TEST_CASE__BASE_OPERATION);
+ createEReference(testCaseEClass, TEST_CASE__VERIFIES);
+
+ requirementEClass = createEClass(REQUIREMENT);
+ createEAttribute(requirementEClass, REQUIREMENT__TEXT);
+ createEAttribute(requirementEClass, REQUIREMENT__ID);
+ createEReference(requirementEClass, REQUIREMENT__DERIVED);
+ createEReference(requirementEClass, REQUIREMENT__DERIVED_FROM);
+ createEReference(requirementEClass, REQUIREMENT__SATISFIED_BY);
+ createEReference(requirementEClass, REQUIREMENT__REFINED_BY);
+ createEReference(requirementEClass, REQUIREMENT__TRACED_TO);
+ createEReference(requirementEClass, REQUIREMENT__VERIFIED_BY);
+ createEReference(requirementEClass, REQUIREMENT__MASTER);
+ createEReference(requirementEClass, REQUIREMENT__BASE_CLASS);
+
+ requirementRelatedEClass = createEClass(REQUIREMENT_RELATED);
+ createEReference(requirementRelatedEClass, REQUIREMENT_RELATED__BASE_NAMED_ELEMENT);
+ createEReference(requirementRelatedEClass, REQUIREMENT_RELATED__TRACED_FROM);
+ createEReference(requirementRelatedEClass, REQUIREMENT_RELATED__SATISFIES);
+ createEReference(requirementRelatedEClass, REQUIREMENT_RELATED__REFINES);
+ createEReference(requirementRelatedEClass, REQUIREMENT_RELATED__VERIFIES);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EClass getCopy() {
+ return copyEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EClass getDeriveReqt() {
+ return deriveReqtEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EClass getRequirement() {
+ return requirementEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getRequirement_Base_Class() {
+ return (EReference) requirementEClass.getEStructuralFeatures().get(9);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getRequirement_Derived() {
+ return (EReference) requirementEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getRequirement_DerivedFrom() {
+ return (EReference) requirementEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EAttribute getRequirement_Id() {
+ return (EAttribute) requirementEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getRequirement_Master() {
+ return (EReference) requirementEClass.getEStructuralFeatures().get(8);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getRequirement_RefinedBy() {
+ return (EReference) requirementEClass.getEStructuralFeatures().get(5);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getRequirement_SatisfiedBy() {
+ return (EReference) requirementEClass.getEStructuralFeatures().get(4);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EAttribute getRequirement_Text() {
+ return (EAttribute) requirementEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getRequirement_TracedTo() {
+ return (EReference) requirementEClass.getEStructuralFeatures().get(6);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getRequirement_VerifiedBy() {
+ return (EReference) requirementEClass.getEStructuralFeatures().get(7);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EClass getRequirementRelated() {
+ return requirementRelatedEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getRequirementRelated_Base_NamedElement() {
+ return (EReference) requirementRelatedEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getRequirementRelated_Refines() {
+ return (EReference) requirementRelatedEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getRequirementRelated_Satisfies() {
+ return (EReference) requirementRelatedEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getRequirementRelated_TracedFrom() {
+ return (EReference) requirementRelatedEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getRequirementRelated_Verifies() {
+ return (EReference) requirementRelatedEClass.getEStructuralFeatures().get(4);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public RequirementsFactory getRequirementsFactory() {
+ return (RequirementsFactory) getEFactoryInstance();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EClass getSatisfy() {
+ return satisfyEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EClass getTestCase() {
+ return testCaseEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getTestCase_Base_Behavior() {
+ return (EReference) testCaseEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getTestCase_Base_Operation() {
+ return (EReference) testCaseEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getTestCase_Verifies() {
+ return (EReference) testCaseEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EClass getVerify() {
+ return verifyEClass;
+ }
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void initializePackageContents() {
+ if (isInitialized) {
+ return;
+ }
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Obtain other dependent packages
+ StandardPackage theStandardPackage = (StandardPackage) EPackage.Registry.INSTANCE.getEPackage(StandardPackage.eNS_URI);
+ UMLPackage theUMLPackage = (UMLPackage) EPackage.Registry.INSTANCE.getEPackage(UMLPackage.eNS_URI);
+ TypesPackage theTypesPackage = (TypesPackage) EPackage.Registry.INSTANCE.getEPackage(TypesPackage.eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+ deriveReqtEClass.getESuperTypes().add(theStandardPackage.getTrace());
+ verifyEClass.getESuperTypes().add(theStandardPackage.getTrace());
+ copyEClass.getESuperTypes().add(theStandardPackage.getTrace());
+ satisfyEClass.getESuperTypes().add(theStandardPackage.getTrace());
+
+ // Initialize classes, features, and operations; add parameters
+ initEClass(deriveReqtEClass, DeriveReqt.class, "DeriveReqt", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+ initEClass(verifyEClass, Verify.class, "Verify", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+ initEClass(copyEClass, Copy.class, "Copy", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+ initEClass(satisfyEClass, Satisfy.class, "Satisfy", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+ initEClass(testCaseEClass, TestCase.class, "TestCase", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getTestCase_Base_Behavior(), theUMLPackage.getBehavior(), null, "base_Behavior", null, 1, 1, TestCase.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, !IS_DERIVED,
+ !IS_ORDERED);
+ initEReference(getTestCase_Base_Operation(), theUMLPackage.getOperation(), null, "base_Operation", null, 1, 1, TestCase.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, !IS_DERIVED,
+ !IS_ORDERED);
+ initEReference(getTestCase_Verifies(), this.getRequirement(), null, "verifies", null, 0, -1, TestCase.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, IS_DERIVED, !IS_ORDERED);
+
+ initEClass(requirementEClass, Requirement.class, "Requirement", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getRequirement_Text(), theTypesPackage.getString(), "text", null, 1, 1, Requirement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+ initEAttribute(getRequirement_Id(), theTypesPackage.getString(), "id", null, 1, 1, Requirement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+ initEReference(getRequirement_Derived(), this.getRequirement(), null, "derived", null, 0, -1, Requirement.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, IS_DERIVED, !IS_ORDERED);
+ initEReference(getRequirement_DerivedFrom(), this.getRequirement(), null, "derivedFrom", null, 0, -1, Requirement.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, IS_DERIVED, !IS_ORDERED);
+ initEReference(getRequirement_SatisfiedBy(), theUMLPackage.getNamedElement(), null, "satisfiedBy", null, 0, -1, Requirement.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, IS_DERIVED,
+ !IS_ORDERED);
+ initEReference(getRequirement_RefinedBy(), theUMLPackage.getNamedElement(), null, "refinedBy", null, 0, -1, Requirement.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, IS_DERIVED,
+ !IS_ORDERED);
+ initEReference(getRequirement_TracedTo(), theUMLPackage.getNamedElement(), null, "tracedTo", null, 0, -1, Requirement.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, IS_DERIVED,
+ !IS_ORDERED);
+ initEReference(getRequirement_VerifiedBy(), theUMLPackage.getNamedElement(), null, "verifiedBy", null, 0, -1, Requirement.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, IS_DERIVED,
+ !IS_ORDERED);
+ initEReference(getRequirement_Master(), this.getRequirement(), null, "master", null, 0, 1, Requirement.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, IS_DERIVED, !IS_ORDERED);
+ initEReference(getRequirement_Base_Class(), theUMLPackage.getClass_(), null, "base_Class", null, 1, 1, Requirement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, !IS_DERIVED,
+ !IS_ORDERED);
+
+ initEClass(requirementRelatedEClass, RequirementRelated.class, "RequirementRelated", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getRequirementRelated_Base_NamedElement(), theUMLPackage.getNamedElement(), null, "base_NamedElement", null, 1, 1, RequirementRelated.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE,
+ !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+ initEReference(getRequirementRelated_TracedFrom(), this.getRequirement(), null, "tracedFrom", null, 0, -1, RequirementRelated.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, IS_DERIVED,
+ !IS_ORDERED);
+ initEReference(getRequirementRelated_Satisfies(), this.getRequirement(), null, "satisfies", null, 0, -1, RequirementRelated.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, IS_DERIVED,
+ !IS_ORDERED);
+ initEReference(getRequirementRelated_Refines(), this.getRequirement(), null, "refines", null, 0, -1, RequirementRelated.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, IS_DERIVED,
+ !IS_ORDERED);
+ initEReference(getRequirementRelated_Verifies(), this.getRequirement(), null, "verifies", null, 0, -1, RequirementRelated.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, IS_DERIVED,
+ !IS_ORDERED);
+ }
+
+} // RequirementsPackageImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/internal/impl/SatisfyImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/internal/impl/SatisfyImpl.java
new file mode 100755
index 0000000..d25eee0
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/internal/impl/SatisfyImpl.java
@@ -0,0 +1,48 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.requirements.internal.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.papyrus.sysml.requirements.RequirementsPackage;
+import org.eclipse.papyrus.sysml.requirements.Satisfy;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object ' <em><b>Satisfy</b></em>'. <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class SatisfyImpl extends org.eclipse.uml2.uml.profile.standard.internal.impl.TraceImpl implements Satisfy {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected SatisfyImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return RequirementsPackage.Literals.SATISFY;
+ }
+
+} // SatisfyImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/internal/impl/TestCaseImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/internal/impl/TestCaseImpl.java
new file mode 100755
index 0000000..f388996
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/internal/impl/TestCaseImpl.java
@@ -0,0 +1,290 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.requirements.internal.impl;
+
+import java.util.Iterator;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.BasicEList;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+import org.eclipse.emf.ecore.util.EcoreEList.UnmodifiableEList;
+import org.eclipse.papyrus.sysml.requirements.Requirement;
+import org.eclipse.papyrus.sysml.requirements.RequirementsPackage;
+import org.eclipse.papyrus.sysml.requirements.TestCase;
+import org.eclipse.papyrus.sysml.requirements.Verify;
+import org.eclipse.uml2.uml.Behavior;
+import org.eclipse.uml2.uml.Dependency;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.Operation;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object ' <em><b>Test Case</b></em>'. <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.requirements.internal.impl.TestCaseImpl#getBase_Behavior <em>Base Behavior</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.requirements.internal.impl.TestCaseImpl#getBase_Operation <em>Base Operation</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.requirements.internal.impl.TestCaseImpl#getVerifies <em>Verifies</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class TestCaseImpl extends MinimalEObjectImpl.Container implements TestCase {
+
+ /**
+ * The cached value of the '{@link #getBase_Behavior() <em>Base Behavior</em>}' reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see #getBase_Behavior()
+ * @generated
+ * @ordered
+ */
+ protected Behavior base_Behavior;
+
+ /**
+ * The cached value of the '{@link #getBase_Operation() <em>Base Operation</em>}' reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see #getBase_Operation()
+ * @generated
+ * @ordered
+ */
+ protected Operation base_Operation;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected TestCaseImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Behavior basicGetBase_Behavior() {
+ return base_Behavior;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Operation basicGetBase_Operation() {
+ return base_Operation;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case RequirementsPackage.TEST_CASE__BASE_BEHAVIOR:
+ if (resolve) {
+ return getBase_Behavior();
+ }
+ return basicGetBase_Behavior();
+ case RequirementsPackage.TEST_CASE__BASE_OPERATION:
+ if (resolve) {
+ return getBase_Operation();
+ }
+ return basicGetBase_Operation();
+ case RequirementsPackage.TEST_CASE__VERIFIES:
+ return getVerifies();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case RequirementsPackage.TEST_CASE__BASE_BEHAVIOR:
+ return base_Behavior != null;
+ case RequirementsPackage.TEST_CASE__BASE_OPERATION:
+ return base_Operation != null;
+ case RequirementsPackage.TEST_CASE__VERIFIES:
+ return !getVerifies().isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case RequirementsPackage.TEST_CASE__BASE_BEHAVIOR:
+ setBase_Behavior((Behavior) newValue);
+ return;
+ case RequirementsPackage.TEST_CASE__BASE_OPERATION:
+ setBase_Operation((Operation) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return RequirementsPackage.Literals.TEST_CASE;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case RequirementsPackage.TEST_CASE__BASE_BEHAVIOR:
+ setBase_Behavior((Behavior) null);
+ return;
+ case RequirementsPackage.TEST_CASE__BASE_OPERATION:
+ setBase_Operation((Operation) null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Behavior getBase_Behavior() {
+ if (base_Behavior != null && base_Behavior.eIsProxy()) {
+ InternalEObject oldBase_Behavior = (InternalEObject) base_Behavior;
+ base_Behavior = (Behavior) eResolveProxy(oldBase_Behavior);
+ if (base_Behavior != oldBase_Behavior) {
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, RequirementsPackage.TEST_CASE__BASE_BEHAVIOR, oldBase_Behavior, base_Behavior));
+ }
+ }
+ }
+ return base_Behavior;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Operation getBase_Operation() {
+ if (base_Operation != null && base_Operation.eIsProxy()) {
+ InternalEObject oldBase_Operation = (InternalEObject) base_Operation;
+ base_Operation = (Operation) eResolveProxy(oldBase_Operation);
+ if (base_Operation != oldBase_Operation) {
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, RequirementsPackage.TEST_CASE__BASE_OPERATION, oldBase_Operation, base_Operation));
+ }
+ }
+ }
+ return base_Operation;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public EList<Requirement> getVerifies() {
+ // This should return the Requirements verified by current TestCase
+ EList<Requirement> verifies = new BasicEList<Requirement>();
+ Verify currentVerify = null;
+
+ if ((getBase_Behavior() != null) || (getBase_Operation() != null)) {
+ // Find Verify link
+ Iterator<Dependency> itDep;
+ if (getBase_Behavior() != null) {
+ itDep = getBase_Behavior().getClientDependencies().iterator();
+ } else { // if (getBase_Operation() != null)
+ itDep = getBase_Operation().getClientDependencies().iterator();
+ }
+
+ while (itDep.hasNext()) {
+ Dependency currentDependency = itDep.next();
+ currentVerify = UMLUtil.getStereotypeApplication(currentDependency, Verify.class);
+
+ if (currentVerify != null) {
+ EList<NamedElement> suppliers = currentVerify.getBase_Abstraction().getSuppliers();
+ Iterator<NamedElement> it = suppliers.iterator();
+ while (it.hasNext()) {
+ Requirement currentRequirement = UMLUtil.getStereotypeApplication(it.next(), Requirement.class);
+ if (currentRequirement != null) {
+ verifies.add(currentRequirement);
+ }
+ }
+ }
+ }
+ }
+
+ UnmodifiableEList<Requirement> resultList = new UnmodifiableEList<Requirement>(this, RequirementsPackage.eINSTANCE.getTestCase_Verifies(), verifies.size(), verifies.toArray());
+ return resultList;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setBase_Behavior(Behavior newBase_Behavior) {
+ Behavior oldBase_Behavior = base_Behavior;
+ base_Behavior = newBase_Behavior;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, RequirementsPackage.TEST_CASE__BASE_BEHAVIOR, oldBase_Behavior, base_Behavior));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setBase_Operation(Operation newBase_Operation) {
+ Operation oldBase_Operation = base_Operation;
+ base_Operation = newBase_Operation;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, RequirementsPackage.TEST_CASE__BASE_OPERATION, oldBase_Operation, base_Operation));
+ }
+ }
+
+} // TestCaseImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/internal/impl/VerifyImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/internal/impl/VerifyImpl.java
new file mode 100755
index 0000000..4668384
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/internal/impl/VerifyImpl.java
@@ -0,0 +1,48 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.requirements.internal.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.papyrus.sysml.requirements.RequirementsPackage;
+import org.eclipse.papyrus.sysml.requirements.Verify;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object ' <em><b>Verify</b></em>'. <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class VerifyImpl extends org.eclipse.uml2.uml.profile.standard.internal.impl.TraceImpl implements Verify {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected VerifyImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return RequirementsPackage.Literals.VERIFY;
+ }
+
+} // VerifyImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/util/RequirementsAdapterFactory.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/util/RequirementsAdapterFactory.java
new file mode 100755
index 0000000..1769565
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/util/RequirementsAdapterFactory.java
@@ -0,0 +1,277 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.requirements.util;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notifier;
+import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.sysml.requirements.Copy;
+import org.eclipse.papyrus.sysml.requirements.DeriveReqt;
+import org.eclipse.papyrus.sysml.requirements.Requirement;
+import org.eclipse.papyrus.sysml.requirements.RequirementRelated;
+import org.eclipse.papyrus.sysml.requirements.RequirementsPackage;
+import org.eclipse.papyrus.sysml.requirements.Satisfy;
+import org.eclipse.papyrus.sysml.requirements.TestCase;
+import org.eclipse.papyrus.sysml.requirements.Verify;
+
+/**
+ * <!-- begin-user-doc --> The <b>Adapter Factory</b> for the model. It provides
+ * an adapter <code>createXXX</code> method for each class of the model. <!--
+ * end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.requirements.RequirementsPackage
+ * @generated
+ */
+public class RequirementsAdapterFactory extends AdapterFactoryImpl {
+
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected static RequirementsPackage modelPackage;
+
+ /**
+ * The switch that delegates to the <code>createXXX</code> methods. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected RequirementsSwitch<Adapter> modelSwitch = new RequirementsSwitch<Adapter>() {
+
+ @Override
+ public Adapter caseDeriveReqt(DeriveReqt object) {
+ return createDeriveReqtAdapter();
+ }
+
+ @Override
+ public Adapter caseVerify(Verify object) {
+ return createVerifyAdapter();
+ }
+
+ @Override
+ public Adapter caseCopy(Copy object) {
+ return createCopyAdapter();
+ }
+
+ @Override
+ public Adapter caseSatisfy(Satisfy object) {
+ return createSatisfyAdapter();
+ }
+
+ @Override
+ public Adapter caseTestCase(TestCase object) {
+ return createTestCaseAdapter();
+ }
+
+ @Override
+ public Adapter caseRequirement(Requirement object) {
+ return createRequirementAdapter();
+ }
+
+ @Override
+ public Adapter caseRequirementRelated(RequirementRelated object) {
+ return createRequirementRelatedAdapter();
+ }
+
+ @Override
+ public Adapter caseTrace(org.eclipse.uml2.uml.profile.standard.Trace object) {
+ return createTraceAdapter();
+ }
+
+ @Override
+ public Adapter defaultCase(EObject object) {
+ return createEObjectAdapter();
+ }
+ };
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public RequirementsAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = RequirementsPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Creates an adapter for the <code>target</code>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @param target
+ * the object to adapt.
+ * @return the adapter for the <code>target</code>.
+ * @generated
+ */
+ @Override
+ public Adapter createAdapter(Notifier target) {
+ return modelSwitch.doSwitch((EObject) target);
+ }
+
+ /**
+ * Creates a new adapter for an object of class ' {@link org.eclipse.papyrus.sysml.requirements.Copy <em>Copy</em>}'. <!--
+ * begin-user-doc --> This default implementation returns null so that we
+ * can easily ignore cases; it's useful to ignore a case when inheritance
+ * will catch all the cases anyway. <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.sysml.requirements.Copy
+ * @generated
+ */
+ public Adapter createCopyAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.sysml.requirements.DeriveReqt <em>Derive Reqt</em>}'.
+ * <!-- begin-user-doc --> This default
+ * implementation returns null so that we can easily ignore cases; it's
+ * useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.sysml.requirements.DeriveReqt
+ * @generated
+ */
+ public Adapter createDeriveReqtAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for the default case.
+ * <!-- begin-user-doc --> This
+ * default implementation returns null. <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @generated
+ */
+ public Adapter createEObjectAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.sysml.requirements.Requirement <em>Requirement</em>}'.
+ * <!-- begin-user-doc --> This default
+ * implementation returns null so that we can easily ignore cases; it's
+ * useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.sysml.requirements.Requirement
+ * @generated
+ */
+ public Adapter createRequirementAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.sysml.requirements.RequirementRelated <em>Requirement Related</em>}'.
+ * <!-- begin-user-doc --> This default
+ * implementation returns null so that we can easily ignore cases; it's
+ * useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.sysml.requirements.RequirementRelated
+ * @generated
+ */
+ public Adapter createRequirementRelatedAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.sysml.requirements.Satisfy <em>Satisfy</em>}'.
+ * <!-- begin-user-doc --> This default implementation returns null so that
+ * we can easily ignore cases; it's useful to ignore a case when inheritance
+ * will catch all the cases anyway. <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.sysml.requirements.Satisfy
+ * @generated
+ */
+ public Adapter createSatisfyAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class ' {@link org.eclipse.papyrus.sysml.requirements.TestCase
+ * <em>Test Case</em>}'. <!-- begin-user-doc --> This default implementation
+ * returns null so that we can easily ignore cases; it's useful to ignore a
+ * case when inheritance will catch all the cases anyway. <!-- end-user-doc
+ * -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.sysml.requirements.TestCase
+ * @generated
+ */
+ public Adapter createTestCaseAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class ' {@link org.eclipse.papyrus.uml.standard.Trace <em>Trace</em>}'. <!--
+ * begin-user-doc --> This default implementation returns null so that we
+ * can easily ignore cases; it's useful to ignore a case when inheritance
+ * will catch all the cases anyway. <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.uml.standard.Trace
+ * @generated
+ */
+ public Adapter createTraceAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.sysml.requirements.Verify <em>Verify</em>}'.
+ * <!-- begin-user-doc --> This default implementation returns null so that
+ * we can easily ignore cases; it's useful to ignore a case when inheritance
+ * will catch all the cases anyway. <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.sysml.requirements.Verify
+ * @generated
+ */
+ public Adapter createVerifyAdapter() {
+ return null;
+ }
+
+ /**
+ * Returns whether this factory is applicable for the type of the object.
+ * <!-- begin-user-doc --> This implementation returns <code>true</code> if
+ * the object is either the model's package or is an instance object of the
+ * model. <!-- end-user-doc -->
+ *
+ * @return whether this factory is applicable for the type of the object.
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object object) {
+ if (object == modelPackage) {
+ return true;
+ }
+ if (object instanceof EObject) {
+ return ((EObject) object).eClass().getEPackage() == modelPackage;
+ }
+ return false;
+ }
+
+} // RequirementsAdapterFactory
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/util/RequirementsResourceFactoryImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/util/RequirementsResourceFactoryImpl.java
new file mode 100755
index 0000000..4dc74a7
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/util/RequirementsResourceFactoryImpl.java
@@ -0,0 +1,63 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.requirements.util;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl;
+import org.eclipse.emf.ecore.xmi.XMLResource;
+
+/**
+ * <!-- begin-user-doc --> The <b>Resource Factory</b> associated with the
+ * package. <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.requirements.util.RequirementsResourceImpl
+ * @generated
+ */
+public class RequirementsResourceFactoryImpl extends ResourceFactoryImpl {
+
+ /**
+ * Creates an instance of the resource factory.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public RequirementsResourceFactoryImpl() {
+ super();
+ }
+
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Resource createResource(URI uri) {
+ XMLResource result = new RequirementsResourceImpl(uri);
+ result.getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
+ result.getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
+
+ result.getDefaultSaveOptions().put(XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE);
+
+ result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
+ result.getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
+
+ result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_LEXICAL_HANDLER, Boolean.TRUE);
+ return result;
+ }
+
+} // RequirementsResourceFactoryImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/util/RequirementsResourceImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/util/RequirementsResourceImpl.java
new file mode 100755
index 0000000..ec6ffd2
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/util/RequirementsResourceImpl.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.requirements.util;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl;
+
+/**
+ * <!-- begin-user-doc --> The <b>Resource </b> associated with the package.
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.requirements.util.RequirementsResourceFactoryImpl
+ * @generated
+ */
+public class RequirementsResourceImpl extends XMLResourceImpl {
+
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @param uri
+ * the URI of the new resource.
+ * @generated
+ */
+ public RequirementsResourceImpl(URI uri) {
+ super(uri);
+ }
+
+} // RequirementsResourceImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/util/RequirementsSwitch.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/util/RequirementsSwitch.java
new file mode 100755
index 0000000..74f558a
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/util/RequirementsSwitch.java
@@ -0,0 +1,303 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.requirements.util;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.util.Switch;
+import org.eclipse.papyrus.sysml.requirements.Copy;
+import org.eclipse.papyrus.sysml.requirements.DeriveReqt;
+import org.eclipse.papyrus.sysml.requirements.Requirement;
+import org.eclipse.papyrus.sysml.requirements.RequirementRelated;
+import org.eclipse.papyrus.sysml.requirements.RequirementsPackage;
+import org.eclipse.papyrus.sysml.requirements.Satisfy;
+import org.eclipse.papyrus.sysml.requirements.TestCase;
+import org.eclipse.papyrus.sysml.requirements.Verify;
+
+/**
+ * <!-- begin-user-doc --> The <b>Switch</b> for the model's inheritance
+ * hierarchy. It supports the call {@link #doSwitch(EObject) doSwitch(object)} to invoke the <code>caseXXX</code> method for each class of the model,
+ * starting with the actual class of the object and proceeding up the
+ * inheritance hierarchy until a non-null result is returned, which is the
+ * result of the switch. <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.requirements.RequirementsPackage
+ * @generated
+ */
+public class RequirementsSwitch<T> extends Switch<T> {
+
+ /**
+ * The cached model package
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected static RequirementsPackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public RequirementsSwitch() {
+ if (modelPackage == null) {
+ modelPackage = RequirementsPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Checks whether this is a switch for the given package. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @parameter ePackage the package in question.
+ * @return whether this is a switch for the given package.
+ * @generated
+ */
+ @Override
+ protected boolean isSwitchFor(EPackage ePackage) {
+ return ePackage == modelPackage;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of ' <em>Copy</em>'. <!-- begin-user-doc --> This implementation returns null;
+ * returning a non-null result will terminate the switch. <!-- end-user-doc
+ * -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of ' <em>Copy</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseCopy(Copy object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Derive Reqt</em>'.
+ * <!-- begin-user-doc --> This implementation
+ * returns null; returning a non-null result will terminate the switch. <!--
+ * end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Derive Reqt</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseDeriveReqt(DeriveReqt object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Requirement</em>'.
+ * <!-- begin-user-doc --> This implementation
+ * returns null; returning a non-null result will terminate the switch. <!--
+ * end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Requirement</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseRequirement(Requirement object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Requirement Related</em>'.
+ * <!-- begin-user-doc --> This
+ * implementation returns null; returning a non-null result will terminate
+ * the switch. <!-- end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Requirement Related</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseRequirementRelated(RequirementRelated object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Trace</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Trace</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseTrace(org.eclipse.uml2.uml.profile.standard.Trace object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Satisfy</em>'.
+ * <!-- begin-user-doc --> This implementation returns
+ * null; returning a non-null result will terminate the switch. <!--
+ * end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Satisfy</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseSatisfy(Satisfy object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Test Case</em>'.
+ * <!-- begin-user-doc --> This implementation returns
+ * null; returning a non-null result will terminate the switch. <!--
+ * end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Test Case</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseTestCase(TestCase object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Verify</em>'.
+ * <!-- begin-user-doc --> This implementation returns
+ * null; returning a non-null result will terminate the switch. <!--
+ * end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Verify</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseVerify(Verify object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * <!-- begin-user-doc --> This implementation returns
+ * null; returning a non-null result will terminate the switch, but this is
+ * the last case anyway. <!-- end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+ * @generated
+ */
+ @Override
+ public T defaultCase(EObject object) {
+ return null;
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ @Override
+ protected T doSwitch(int classifierID, EObject theEObject) {
+ switch (classifierID) {
+ case RequirementsPackage.DERIVE_REQT: {
+ DeriveReqt deriveReqt = (DeriveReqt) theEObject;
+ T result = caseDeriveReqt(deriveReqt);
+ if (result == null) {
+ result = caseTrace(deriveReqt);
+ }
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case RequirementsPackage.VERIFY: {
+ Verify verify = (Verify) theEObject;
+ T result = caseVerify(verify);
+ if (result == null) {
+ result = caseTrace(verify);
+ }
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case RequirementsPackage.COPY: {
+ Copy copy = (Copy) theEObject;
+ T result = caseCopy(copy);
+ if (result == null) {
+ result = caseTrace(copy);
+ }
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case RequirementsPackage.SATISFY: {
+ Satisfy satisfy = (Satisfy) theEObject;
+ T result = caseSatisfy(satisfy);
+ if (result == null) {
+ result = caseTrace(satisfy);
+ }
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case RequirementsPackage.TEST_CASE: {
+ TestCase testCase = (TestCase) theEObject;
+ T result = caseTestCase(testCase);
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case RequirementsPackage.REQUIREMENT: {
+ Requirement requirement = (Requirement) theEObject;
+ T result = caseRequirement(requirement);
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case RequirementsPackage.REQUIREMENT_RELATED: {
+ RequirementRelated requirementRelated = (RequirementRelated) theEObject;
+ T result = caseRequirementRelated(requirementRelated);
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ default:
+ return defaultCase(theEObject);
+ }
+ }
+
+} // RequirementsSwitch
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/util/RequirementsXMLProcessor.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/util/RequirementsXMLProcessor.java
new file mode 100755
index 0000000..e27ac6e
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/requirements/util/RequirementsXMLProcessor.java
@@ -0,0 +1,60 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.requirements.util;
+
+import java.util.Map;
+
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.xmi.util.XMLProcessor;
+import org.eclipse.papyrus.sysml.requirements.RequirementsPackage;
+
+/**
+ * This class contains helper methods to serialize and deserialize XML documents
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class RequirementsXMLProcessor extends XMLProcessor {
+
+ /**
+ * Public constructor to instantiate the helper.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public RequirementsXMLProcessor() {
+ super((EPackage.Registry.INSTANCE));
+ RequirementsPackage.eINSTANCE.eClass();
+ }
+
+ /**
+ * Register for "*" and "xml" file extensions the RequirementsResourceFactoryImpl factory.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected Map<String, Resource.Factory> getRegistrations() {
+ if (registrations == null) {
+ super.getRegistrations();
+ registrations.put(XML_EXTENSION, new RequirementsResourceFactoryImpl());
+ registrations.put(STAR_EXTENSION, new RequirementsResourceFactoryImpl());
+ }
+ return registrations;
+ }
+
+} // RequirementsXMLProcessor
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/statemachines/StatemachinesFactory.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/statemachines/StatemachinesFactory.java
new file mode 100755
index 0000000..8ceeb5d
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/statemachines/StatemachinesFactory.java
@@ -0,0 +1,46 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.statemachines;
+
+import org.eclipse.emf.ecore.EFactory;
+
+/**
+ * <!-- begin-user-doc --> The <b>Factory</b> for the model. It provides a
+ * create method for each non-abstract class of the model. <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.statemachines.StatemachinesPackage
+ * @generated
+ */
+public interface StatemachinesFactory extends EFactory {
+
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ StatemachinesFactory eINSTANCE = org.eclipse.papyrus.sysml.statemachines.internal.impl.StatemachinesFactoryImpl.init();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the package supported by this factory.
+ * @generated
+ */
+ StatemachinesPackage getStatemachinesPackage();
+
+} // StatemachinesFactory
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/statemachines/StatemachinesPackage.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/statemachines/StatemachinesPackage.java
new file mode 100755
index 0000000..7a35cbc
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/statemachines/StatemachinesPackage.java
@@ -0,0 +1,126 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.statemachines;
+
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EPackage;
+
+/**
+ * <!-- begin-user-doc --> The <b>Package</b> for the model. It contains
+ * accessors for the meta objects to represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.statemachines.StatemachinesFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface StatemachinesPackage extends EPackage {
+
+ /**
+ * <!-- begin-user-doc --> Defines literals for the meta objects that
+ * represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ interface Literals {
+
+ /**
+ * The meta object literal for the '<em>Dummy</em>' data type. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see java.lang.String
+ * @see org.eclipse.papyrus.sysml.statemachines.internal.impl.StatemachinesPackageImpl#getDummy()
+ * @generated
+ */
+ EDataType DUMMY = eINSTANCE.getDummy();
+
+ }
+
+ /**
+ * The package name.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ String eNAME = "statemachines";
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ String eNS_URI = "http://www.eclipse.org/papyrus/0.7.0/SysML/StateMachines";
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ String eNS_PREFIX = "StateMachines";
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ StatemachinesPackage eINSTANCE = org.eclipse.papyrus.sysml.statemachines.internal.impl.StatemachinesPackageImpl.init();
+
+ /**
+ * The meta object id for the '<em>Dummy</em>' data type. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see java.lang.String
+ * @see org.eclipse.papyrus.sysml.statemachines.internal.impl.StatemachinesPackageImpl#getDummy()
+ * @generated
+ */
+ int DUMMY = 0;
+
+ /**
+ * Returns the meta object for data type '{@link java.lang.String <em>Dummy</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for data type '<em>Dummy</em>'.
+ * @see java.lang.String
+ * @model instanceClass="java.lang.String"
+ * @generated
+ */
+ EDataType getDummy();
+
+ /**
+ * Returns the factory that creates the instances of the model. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the factory that creates the instances of the model.
+ * @generated
+ */
+ StatemachinesFactory getStatemachinesFactory();
+
+} // StatemachinesPackage
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/statemachines/internal/impl/StatemachinesFactoryImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/statemachines/internal/impl/StatemachinesFactoryImpl.java
new file mode 100755
index 0000000..4187a0e
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/statemachines/internal/impl/StatemachinesFactoryImpl.java
@@ -0,0 +1,144 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.statemachines.internal.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+import org.eclipse.papyrus.sysml.statemachines.StatemachinesFactory;
+import org.eclipse.papyrus.sysml.statemachines.StatemachinesPackage;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model <b>Factory</b>. <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+public class StatemachinesFactoryImpl extends EFactoryImpl implements StatemachinesFactory {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static StatemachinesPackage getPackage() {
+ return StatemachinesPackage.eINSTANCE;
+ }
+
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public static StatemachinesFactory init() {
+ try {
+ StatemachinesFactory theStatemachinesFactory = (StatemachinesFactory) EPackage.Registry.INSTANCE.getEFactory(StatemachinesPackage.eNS_URI);
+ if (theStatemachinesFactory != null) {
+ return theStatemachinesFactory;
+ }
+ } catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new StatemachinesFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public StatemachinesFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public String convertDummyToString(EDataType eDataType, Object instanceValue) {
+ return super.convertToString(eDataType, instanceValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String convertToString(EDataType eDataType, Object instanceValue) {
+ switch (eDataType.getClassifierID()) {
+ case StatemachinesPackage.DUMMY:
+ return convertDummyToString(eDataType, instanceValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public String createDummyFromString(EDataType eDataType, String initialValue) {
+ return (String) super.createFromString(eDataType, initialValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object createFromString(EDataType eDataType, String initialValue) {
+ switch (eDataType.getClassifierID()) {
+ case StatemachinesPackage.DUMMY:
+ return createDummyFromString(eDataType, initialValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public StatemachinesPackage getStatemachinesPackage() {
+ return (StatemachinesPackage) getEPackage();
+ }
+
+} // StatemachinesFactoryImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/statemachines/internal/impl/StatemachinesPackageImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/statemachines/internal/impl/StatemachinesPackageImpl.java
new file mode 100755
index 0000000..3bbe935
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/statemachines/internal/impl/StatemachinesPackageImpl.java
@@ -0,0 +1,233 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.statemachines.internal.impl;
+
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+import org.eclipse.papyrus.sysml.SysmlPackage;
+import org.eclipse.papyrus.sysml.activities.ActivitiesPackage;
+import org.eclipse.papyrus.sysml.activities.internal.impl.ActivitiesPackageImpl;
+import org.eclipse.papyrus.sysml.allocations.AllocationsPackage;
+import org.eclipse.papyrus.sysml.allocations.internal.impl.AllocationsPackageImpl;
+import org.eclipse.papyrus.sysml.blocks.BlocksPackage;
+import org.eclipse.papyrus.sysml.blocks.internal.impl.BlocksPackageImpl;
+import org.eclipse.papyrus.sysml.constraints.ConstraintsPackage;
+import org.eclipse.papyrus.sysml.constraints.internal.impl.ConstraintsPackageImpl;
+import org.eclipse.papyrus.sysml.interactions.InteractionsPackage;
+import org.eclipse.papyrus.sysml.interactions.internal.impl.InteractionsPackageImpl;
+import org.eclipse.papyrus.sysml.internal.impl.SysmlPackageImpl;
+import org.eclipse.papyrus.sysml.modelelements.ModelelementsPackage;
+import org.eclipse.papyrus.sysml.modelelements.internal.impl.ModelelementsPackageImpl;
+import org.eclipse.papyrus.sysml.portandflows.PortandflowsPackage;
+import org.eclipse.papyrus.sysml.portandflows.internal.impl.PortandflowsPackageImpl;
+import org.eclipse.papyrus.sysml.requirements.RequirementsPackage;
+import org.eclipse.papyrus.sysml.requirements.internal.impl.RequirementsPackageImpl;
+import org.eclipse.papyrus.sysml.statemachines.StatemachinesFactory;
+import org.eclipse.papyrus.sysml.statemachines.StatemachinesPackage;
+import org.eclipse.papyrus.sysml.usecases.UsecasesPackage;
+import org.eclipse.papyrus.sysml.usecases.internal.impl.UsecasesPackageImpl;
+import org.eclipse.uml2.uml.profile.standard.StandardPackage;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model <b>Package</b>. <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+public class StatemachinesPackageImpl extends EPackageImpl implements StatemachinesPackage {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private static boolean isInited = false;
+
+ /**
+ * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+ *
+ * <p>
+ * This method is used to initialize {@link StatemachinesPackage#eINSTANCE} when that field is accessed. Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @see #eNS_URI
+ * @see #createPackageContents()
+ * @see #initializePackageContents()
+ * @generated
+ */
+ public static StatemachinesPackage init() {
+ if (isInited) {
+ return (StatemachinesPackage) EPackage.Registry.INSTANCE.getEPackage(StatemachinesPackage.eNS_URI);
+ }
+
+ // Obtain or create and register package
+ StatemachinesPackageImpl theStatemachinesPackage = (StatemachinesPackageImpl) (EPackage.Registry.INSTANCE.get(eNS_URI) instanceof StatemachinesPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new StatemachinesPackageImpl());
+
+ isInited = true;
+
+ // Initialize simple dependencies
+ StandardPackage.eINSTANCE.eClass();
+
+ // Obtain or create and register interdependencies
+ SysmlPackageImpl theSysmlPackage = (SysmlPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(SysmlPackage.eNS_URI) instanceof SysmlPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(SysmlPackage.eNS_URI) : SysmlPackage.eINSTANCE);
+ ModelelementsPackageImpl theModelelementsPackage = (ModelelementsPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(ModelelementsPackage.eNS_URI) instanceof ModelelementsPackageImpl ? EPackage.Registry.INSTANCE
+ .getEPackage(ModelelementsPackage.eNS_URI) : ModelelementsPackage.eINSTANCE);
+ BlocksPackageImpl theBlocksPackage = (BlocksPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(BlocksPackage.eNS_URI) instanceof BlocksPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(BlocksPackage.eNS_URI) : BlocksPackage.eINSTANCE);
+ PortandflowsPackageImpl thePortandflowsPackage = (PortandflowsPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(PortandflowsPackage.eNS_URI) instanceof PortandflowsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(PortandflowsPackage.eNS_URI)
+ : PortandflowsPackage.eINSTANCE);
+ ConstraintsPackageImpl theConstraintsPackage = (ConstraintsPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(ConstraintsPackage.eNS_URI) instanceof ConstraintsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ConstraintsPackage.eNS_URI)
+ : ConstraintsPackage.eINSTANCE);
+ ActivitiesPackageImpl theActivitiesPackage = (ActivitiesPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(ActivitiesPackage.eNS_URI) instanceof ActivitiesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ActivitiesPackage.eNS_URI)
+ : ActivitiesPackage.eINSTANCE);
+ AllocationsPackageImpl theAllocationsPackage = (AllocationsPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(AllocationsPackage.eNS_URI) instanceof AllocationsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(AllocationsPackage.eNS_URI)
+ : AllocationsPackage.eINSTANCE);
+ RequirementsPackageImpl theRequirementsPackage = (RequirementsPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(RequirementsPackage.eNS_URI) instanceof RequirementsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(RequirementsPackage.eNS_URI)
+ : RequirementsPackage.eINSTANCE);
+ InteractionsPackageImpl theInteractionsPackage = (InteractionsPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(InteractionsPackage.eNS_URI) instanceof InteractionsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(InteractionsPackage.eNS_URI)
+ : InteractionsPackage.eINSTANCE);
+ UsecasesPackageImpl theUsecasesPackage = (UsecasesPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(UsecasesPackage.eNS_URI) instanceof UsecasesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(UsecasesPackage.eNS_URI)
+ : UsecasesPackage.eINSTANCE);
+
+ // Create package meta-data objects
+ theStatemachinesPackage.createPackageContents();
+ theSysmlPackage.createPackageContents();
+ theModelelementsPackage.createPackageContents();
+ theBlocksPackage.createPackageContents();
+ thePortandflowsPackage.createPackageContents();
+ theConstraintsPackage.createPackageContents();
+ theActivitiesPackage.createPackageContents();
+ theAllocationsPackage.createPackageContents();
+ theRequirementsPackage.createPackageContents();
+ theInteractionsPackage.createPackageContents();
+ theUsecasesPackage.createPackageContents();
+
+ // Initialize created meta-data
+ theStatemachinesPackage.initializePackageContents();
+ theSysmlPackage.initializePackageContents();
+ theModelelementsPackage.initializePackageContents();
+ theBlocksPackage.initializePackageContents();
+ thePortandflowsPackage.initializePackageContents();
+ theConstraintsPackage.initializePackageContents();
+ theActivitiesPackage.initializePackageContents();
+ theAllocationsPackage.initializePackageContents();
+ theRequirementsPackage.initializePackageContents();
+ theInteractionsPackage.initializePackageContents();
+ theUsecasesPackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theStatemachinesPackage.freeze();
+
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(StatemachinesPackage.eNS_URI, theStatemachinesPackage);
+ return theStatemachinesPackage;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EDataType dummyEDataType = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private boolean isCreated = false;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Creates an instance of the model <b>Package</b>, registered with {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the
+ * package
+ * package URI value.
+ * <p>
+ * Note: the correct way to create the package is via the static factory method {@link #init init()}, which also performs initialization of the package, or returns the registered package, if one already exists. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.emf.ecore.EPackage.Registry
+ * @see org.eclipse.papyrus.sysml.statemachines.StatemachinesPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private StatemachinesPackageImpl() {
+ super(eNS_URI, StatemachinesFactory.eINSTANCE);
+ }
+
+ /**
+ * Creates the meta-model objects for the package. This method is
+ * guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void createPackageContents() {
+ if (isCreated) {
+ return;
+ }
+ isCreated = true;
+
+ // Create data types
+ dummyEDataType = createEDataType(DUMMY);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EDataType getDummy() {
+ return dummyEDataType;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public StatemachinesFactory getStatemachinesFactory() {
+ return (StatemachinesFactory) getEFactoryInstance();
+ }
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void initializePackageContents() {
+ if (isInitialized) {
+ return;
+ }
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Initialize data types
+ initEDataType(dummyEDataType, String.class, "Dummy", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS);
+ }
+
+} // StatemachinesPackageImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/statemachines/util/StatemachinesResourceFactoryImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/statemachines/util/StatemachinesResourceFactoryImpl.java
new file mode 100755
index 0000000..47a5e9e
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/statemachines/util/StatemachinesResourceFactoryImpl.java
@@ -0,0 +1,53 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.statemachines.util;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl;
+
+/**
+ * <!-- begin-user-doc --> The <b>Resource Factory</b> associated with the
+ * package. <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.statemachines.util.StatemachinesResourceImpl
+ * @generated
+ */
+public class StatemachinesResourceFactoryImpl extends ResourceFactoryImpl {
+
+ /**
+ * Creates an instance of the resource factory.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public StatemachinesResourceFactoryImpl() {
+ super();
+ }
+
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Resource createResource(URI uri) {
+ Resource result = new StatemachinesResourceImpl(uri);
+ return result;
+ }
+
+} // StatemachinesResourceFactoryImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/statemachines/util/StatemachinesResourceImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/statemachines/util/StatemachinesResourceImpl.java
new file mode 100755
index 0000000..b3d9f94
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/statemachines/util/StatemachinesResourceImpl.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.statemachines.util;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl;
+
+/**
+ * <!-- begin-user-doc --> The <b>Resource </b> associated with the package.
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.statemachines.util.StatemachinesResourceFactoryImpl
+ * @generated
+ */
+public class StatemachinesResourceImpl extends XMLResourceImpl {
+
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @param uri
+ * the URI of the new resource.
+ * @generated
+ */
+ public StatemachinesResourceImpl(URI uri) {
+ super(uri);
+ }
+
+} // StatemachinesResourceImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/statemachines/util/StatemachinesXMLProcessor.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/statemachines/util/StatemachinesXMLProcessor.java
new file mode 100755
index 0000000..f1f793f
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/statemachines/util/StatemachinesXMLProcessor.java
@@ -0,0 +1,60 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.statemachines.util;
+
+import java.util.Map;
+
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.xmi.util.XMLProcessor;
+import org.eclipse.papyrus.sysml.statemachines.StatemachinesPackage;
+
+/**
+ * This class contains helper methods to serialize and deserialize XML documents
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class StatemachinesXMLProcessor extends XMLProcessor {
+
+ /**
+ * Public constructor to instantiate the helper.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public StatemachinesXMLProcessor() {
+ super((EPackage.Registry.INSTANCE));
+ StatemachinesPackage.eINSTANCE.eClass();
+ }
+
+ /**
+ * Register for "*" and "xml" file extensions the StatemachinesResourceFactoryImpl factory.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected Map<String, Resource.Factory> getRegistrations() {
+ if (registrations == null) {
+ super.getRegistrations();
+ registrations.put(XML_EXTENSION, new StatemachinesResourceFactoryImpl());
+ registrations.put(STAR_EXTENSION, new StatemachinesResourceFactoryImpl());
+ }
+ return registrations;
+ }
+
+} // StatemachinesXMLProcessor
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/usecases/UsecasesFactory.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/usecases/UsecasesFactory.java
new file mode 100755
index 0000000..c537c49
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/usecases/UsecasesFactory.java
@@ -0,0 +1,46 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.usecases;
+
+import org.eclipse.emf.ecore.EFactory;
+
+/**
+ * <!-- begin-user-doc --> The <b>Factory</b> for the model. It provides a
+ * create method for each non-abstract class of the model. <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.usecases.UsecasesPackage
+ * @generated
+ */
+public interface UsecasesFactory extends EFactory {
+
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ UsecasesFactory eINSTANCE = org.eclipse.papyrus.sysml.usecases.internal.impl.UsecasesFactoryImpl.init();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the package supported by this factory.
+ * @generated
+ */
+ UsecasesPackage getUsecasesPackage();
+
+} // UsecasesFactory
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/usecases/UsecasesPackage.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/usecases/UsecasesPackage.java
new file mode 100755
index 0000000..59f641a
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/usecases/UsecasesPackage.java
@@ -0,0 +1,126 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.usecases;
+
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EPackage;
+
+/**
+ * <!-- begin-user-doc --> The <b>Package</b> for the model. It contains
+ * accessors for the meta objects to represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.usecases.UsecasesFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface UsecasesPackage extends EPackage {
+
+ /**
+ * <!-- begin-user-doc --> Defines literals for the meta objects that
+ * represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ interface Literals {
+
+ /**
+ * The meta object literal for the '<em>Dummy</em>' data type. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see java.lang.String
+ * @see org.eclipse.papyrus.sysml.usecases.internal.impl.UsecasesPackageImpl#getDummy()
+ * @generated
+ */
+ EDataType DUMMY = eINSTANCE.getDummy();
+
+ }
+
+ /**
+ * The package name.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ String eNAME = "usecases";
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ String eNS_URI = "http://www.eclipse.org/papyrus/0.7.0/SysML/UseCases";
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ String eNS_PREFIX = "UseCases";
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ UsecasesPackage eINSTANCE = org.eclipse.papyrus.sysml.usecases.internal.impl.UsecasesPackageImpl.init();
+
+ /**
+ * The meta object id for the '<em>Dummy</em>' data type. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see java.lang.String
+ * @see org.eclipse.papyrus.sysml.usecases.internal.impl.UsecasesPackageImpl#getDummy()
+ * @generated
+ */
+ int DUMMY = 0;
+
+ /**
+ * Returns the meta object for data type '{@link java.lang.String <em>Dummy</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for data type '<em>Dummy</em>'.
+ * @see java.lang.String
+ * @model instanceClass="java.lang.String"
+ * @generated
+ */
+ EDataType getDummy();
+
+ /**
+ * Returns the factory that creates the instances of the model. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the factory that creates the instances of the model.
+ * @generated
+ */
+ UsecasesFactory getUsecasesFactory();
+
+} // UsecasesPackage
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/usecases/internal/impl/UsecasesFactoryImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/usecases/internal/impl/UsecasesFactoryImpl.java
new file mode 100755
index 0000000..ed69000
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/usecases/internal/impl/UsecasesFactoryImpl.java
@@ -0,0 +1,144 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.usecases.internal.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+import org.eclipse.papyrus.sysml.usecases.UsecasesFactory;
+import org.eclipse.papyrus.sysml.usecases.UsecasesPackage;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model <b>Factory</b>. <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+public class UsecasesFactoryImpl extends EFactoryImpl implements UsecasesFactory {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static UsecasesPackage getPackage() {
+ return UsecasesPackage.eINSTANCE;
+ }
+
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public static UsecasesFactory init() {
+ try {
+ UsecasesFactory theUsecasesFactory = (UsecasesFactory) EPackage.Registry.INSTANCE.getEFactory(UsecasesPackage.eNS_URI);
+ if (theUsecasesFactory != null) {
+ return theUsecasesFactory;
+ }
+ } catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new UsecasesFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public UsecasesFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public String convertDummyToString(EDataType eDataType, Object instanceValue) {
+ return super.convertToString(eDataType, instanceValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String convertToString(EDataType eDataType, Object instanceValue) {
+ switch (eDataType.getClassifierID()) {
+ case UsecasesPackage.DUMMY:
+ return convertDummyToString(eDataType, instanceValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public String createDummyFromString(EDataType eDataType, String initialValue) {
+ return (String) super.createFromString(eDataType, initialValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object createFromString(EDataType eDataType, String initialValue) {
+ switch (eDataType.getClassifierID()) {
+ case UsecasesPackage.DUMMY:
+ return createDummyFromString(eDataType, initialValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public UsecasesPackage getUsecasesPackage() {
+ return (UsecasesPackage) getEPackage();
+ }
+
+} // UsecasesFactoryImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/usecases/internal/impl/UsecasesPackageImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/usecases/internal/impl/UsecasesPackageImpl.java
new file mode 100755
index 0000000..ae9f0e7
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/usecases/internal/impl/UsecasesPackageImpl.java
@@ -0,0 +1,232 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.usecases.internal.impl;
+
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+import org.eclipse.papyrus.sysml.SysmlPackage;
+import org.eclipse.papyrus.sysml.activities.ActivitiesPackage;
+import org.eclipse.papyrus.sysml.activities.internal.impl.ActivitiesPackageImpl;
+import org.eclipse.papyrus.sysml.allocations.AllocationsPackage;
+import org.eclipse.papyrus.sysml.allocations.internal.impl.AllocationsPackageImpl;
+import org.eclipse.papyrus.sysml.blocks.BlocksPackage;
+import org.eclipse.papyrus.sysml.blocks.internal.impl.BlocksPackageImpl;
+import org.eclipse.papyrus.sysml.constraints.ConstraintsPackage;
+import org.eclipse.papyrus.sysml.constraints.internal.impl.ConstraintsPackageImpl;
+import org.eclipse.papyrus.sysml.interactions.InteractionsPackage;
+import org.eclipse.papyrus.sysml.interactions.internal.impl.InteractionsPackageImpl;
+import org.eclipse.papyrus.sysml.internal.impl.SysmlPackageImpl;
+import org.eclipse.papyrus.sysml.modelelements.ModelelementsPackage;
+import org.eclipse.papyrus.sysml.modelelements.internal.impl.ModelelementsPackageImpl;
+import org.eclipse.papyrus.sysml.portandflows.PortandflowsPackage;
+import org.eclipse.papyrus.sysml.portandflows.internal.impl.PortandflowsPackageImpl;
+import org.eclipse.papyrus.sysml.requirements.RequirementsPackage;
+import org.eclipse.papyrus.sysml.requirements.internal.impl.RequirementsPackageImpl;
+import org.eclipse.papyrus.sysml.statemachines.StatemachinesPackage;
+import org.eclipse.papyrus.sysml.statemachines.internal.impl.StatemachinesPackageImpl;
+import org.eclipse.papyrus.sysml.usecases.UsecasesFactory;
+import org.eclipse.papyrus.sysml.usecases.UsecasesPackage;
+import org.eclipse.uml2.uml.profile.standard.StandardPackage;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model <b>Package</b>. <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+public class UsecasesPackageImpl extends EPackageImpl implements UsecasesPackage {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private static boolean isInited = false;
+
+ /**
+ * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+ *
+ * <p>
+ * This method is used to initialize {@link UsecasesPackage#eINSTANCE} when that field is accessed. Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #eNS_URI
+ * @see #createPackageContents()
+ * @see #initializePackageContents()
+ * @generated
+ */
+ public static UsecasesPackage init() {
+ if (isInited) {
+ return (UsecasesPackage) EPackage.Registry.INSTANCE.getEPackage(UsecasesPackage.eNS_URI);
+ }
+
+ // Obtain or create and register package
+ UsecasesPackageImpl theUsecasesPackage = (UsecasesPackageImpl) (EPackage.Registry.INSTANCE.get(eNS_URI) instanceof UsecasesPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new UsecasesPackageImpl());
+
+ isInited = true;
+
+ // Initialize simple dependencies
+ StandardPackage.eINSTANCE.eClass();
+
+ // Obtain or create and register interdependencies
+ SysmlPackageImpl theSysmlPackage = (SysmlPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(SysmlPackage.eNS_URI) instanceof SysmlPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(SysmlPackage.eNS_URI) : SysmlPackage.eINSTANCE);
+ ModelelementsPackageImpl theModelelementsPackage = (ModelelementsPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(ModelelementsPackage.eNS_URI) instanceof ModelelementsPackageImpl ? EPackage.Registry.INSTANCE
+ .getEPackage(ModelelementsPackage.eNS_URI) : ModelelementsPackage.eINSTANCE);
+ BlocksPackageImpl theBlocksPackage = (BlocksPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(BlocksPackage.eNS_URI) instanceof BlocksPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(BlocksPackage.eNS_URI) : BlocksPackage.eINSTANCE);
+ PortandflowsPackageImpl thePortandflowsPackage = (PortandflowsPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(PortandflowsPackage.eNS_URI) instanceof PortandflowsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(PortandflowsPackage.eNS_URI)
+ : PortandflowsPackage.eINSTANCE);
+ ConstraintsPackageImpl theConstraintsPackage = (ConstraintsPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(ConstraintsPackage.eNS_URI) instanceof ConstraintsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ConstraintsPackage.eNS_URI)
+ : ConstraintsPackage.eINSTANCE);
+ ActivitiesPackageImpl theActivitiesPackage = (ActivitiesPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(ActivitiesPackage.eNS_URI) instanceof ActivitiesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ActivitiesPackage.eNS_URI)
+ : ActivitiesPackage.eINSTANCE);
+ AllocationsPackageImpl theAllocationsPackage = (AllocationsPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(AllocationsPackage.eNS_URI) instanceof AllocationsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(AllocationsPackage.eNS_URI)
+ : AllocationsPackage.eINSTANCE);
+ RequirementsPackageImpl theRequirementsPackage = (RequirementsPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(RequirementsPackage.eNS_URI) instanceof RequirementsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(RequirementsPackage.eNS_URI)
+ : RequirementsPackage.eINSTANCE);
+ InteractionsPackageImpl theInteractionsPackage = (InteractionsPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(InteractionsPackage.eNS_URI) instanceof InteractionsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(InteractionsPackage.eNS_URI)
+ : InteractionsPackage.eINSTANCE);
+ StatemachinesPackageImpl theStatemachinesPackage = (StatemachinesPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(StatemachinesPackage.eNS_URI) instanceof StatemachinesPackageImpl ? EPackage.Registry.INSTANCE
+ .getEPackage(StatemachinesPackage.eNS_URI) : StatemachinesPackage.eINSTANCE);
+
+ // Create package meta-data objects
+ theUsecasesPackage.createPackageContents();
+ theSysmlPackage.createPackageContents();
+ theModelelementsPackage.createPackageContents();
+ theBlocksPackage.createPackageContents();
+ thePortandflowsPackage.createPackageContents();
+ theConstraintsPackage.createPackageContents();
+ theActivitiesPackage.createPackageContents();
+ theAllocationsPackage.createPackageContents();
+ theRequirementsPackage.createPackageContents();
+ theInteractionsPackage.createPackageContents();
+ theStatemachinesPackage.createPackageContents();
+
+ // Initialize created meta-data
+ theUsecasesPackage.initializePackageContents();
+ theSysmlPackage.initializePackageContents();
+ theModelelementsPackage.initializePackageContents();
+ theBlocksPackage.initializePackageContents();
+ thePortandflowsPackage.initializePackageContents();
+ theConstraintsPackage.initializePackageContents();
+ theActivitiesPackage.initializePackageContents();
+ theAllocationsPackage.initializePackageContents();
+ theRequirementsPackage.initializePackageContents();
+ theInteractionsPackage.initializePackageContents();
+ theStatemachinesPackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theUsecasesPackage.freeze();
+
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(UsecasesPackage.eNS_URI, theUsecasesPackage);
+ return theUsecasesPackage;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EDataType dummyEDataType = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private boolean isCreated = false;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Creates an instance of the model <b>Package</b>, registered with {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the
+ * package
+ * package URI value.
+ * <p>
+ * Note: the correct way to create the package is via the static factory method {@link #init init()}, which also performs initialization of the package, or returns the registered package, if one already exists. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.emf.ecore.EPackage.Registry
+ * @see org.eclipse.papyrus.sysml.usecases.UsecasesPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private UsecasesPackageImpl() {
+ super(eNS_URI, UsecasesFactory.eINSTANCE);
+ }
+
+ /**
+ * Creates the meta-model objects for the package. This method is
+ * guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void createPackageContents() {
+ if (isCreated) {
+ return;
+ }
+ isCreated = true;
+
+ // Create data types
+ dummyEDataType = createEDataType(DUMMY);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EDataType getDummy() {
+ return dummyEDataType;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public UsecasesFactory getUsecasesFactory() {
+ return (UsecasesFactory) getEFactoryInstance();
+ }
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void initializePackageContents() {
+ if (isInitialized) {
+ return;
+ }
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Initialize data types
+ initEDataType(dummyEDataType, String.class, "Dummy", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS);
+ }
+
+} // UsecasesPackageImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/usecases/util/UsecasesResourceFactoryImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/usecases/util/UsecasesResourceFactoryImpl.java
new file mode 100755
index 0000000..d9e585d
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/usecases/util/UsecasesResourceFactoryImpl.java
@@ -0,0 +1,53 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.usecases.util;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl;
+
+/**
+ * <!-- begin-user-doc --> The <b>Resource Factory</b> associated with the
+ * package. <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.usecases.util.UsecasesResourceImpl
+ * @generated
+ */
+public class UsecasesResourceFactoryImpl extends ResourceFactoryImpl {
+
+ /**
+ * Creates an instance of the resource factory.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public UsecasesResourceFactoryImpl() {
+ super();
+ }
+
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Resource createResource(URI uri) {
+ Resource result = new UsecasesResourceImpl(uri);
+ return result;
+ }
+
+} // UsecasesResourceFactoryImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/usecases/util/UsecasesResourceImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/usecases/util/UsecasesResourceImpl.java
new file mode 100755
index 0000000..f165a43
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/usecases/util/UsecasesResourceImpl.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.usecases.util;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl;
+
+/**
+ * <!-- begin-user-doc --> The <b>Resource </b> associated with the package.
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.usecases.util.UsecasesResourceFactoryImpl
+ * @generated
+ */
+public class UsecasesResourceImpl extends XMLResourceImpl {
+
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @param uri
+ * the URI of the new resource.
+ * @generated
+ */
+ public UsecasesResourceImpl(URI uri) {
+ super(uri);
+ }
+
+} // UsecasesResourceImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/usecases/util/UsecasesXMLProcessor.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/usecases/util/UsecasesXMLProcessor.java
new file mode 100755
index 0000000..6ce2e7f
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/usecases/util/UsecasesXMLProcessor.java
@@ -0,0 +1,60 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.usecases.util;
+
+import java.util.Map;
+
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.xmi.util.XMLProcessor;
+import org.eclipse.papyrus.sysml.usecases.UsecasesPackage;
+
+/**
+ * This class contains helper methods to serialize and deserialize XML documents
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class UsecasesXMLProcessor extends XMLProcessor {
+
+ /**
+ * Public constructor to instantiate the helper.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public UsecasesXMLProcessor() {
+ super((EPackage.Registry.INSTANCE));
+ UsecasesPackage.eINSTANCE.eClass();
+ }
+
+ /**
+ * Register for "*" and "xml" file extensions the UsecasesResourceFactoryImpl factory.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected Map<String, Resource.Factory> getRegistrations() {
+ if (registrations == null) {
+ super.getRegistrations();
+ registrations.put(XML_EXTENSION, new UsecasesResourceFactoryImpl());
+ registrations.put(STAR_EXTENSION, new UsecasesResourceFactoryImpl());
+ }
+ return registrations;
+ }
+
+} // UsecasesXMLProcessor
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/util/ElementUtil.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/util/ElementUtil.java
new file mode 100755
index 0000000..a62a851
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/util/ElementUtil.java
@@ -0,0 +1,49 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.util;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+@Deprecated
+public class ElementUtil {
+
+ /**
+ * Check if the StereotypedElement has the given stereotype, or if one of
+ * its stereotype is inherits from the stereotype passed in parameter. This
+ * method currently exists in UMLUtils, this one is a copy created to avoid
+ * some dependencies propagated by UMLUtils (jface...). Current UMLUtils
+ * plug-in should probably be separated into two parts one depending on UML2
+ * plug-in only, and the other bringing ui related features;
+ *
+ * @deprecated prefer using {@link UMLUtil#getStereotypeApplication(Element, Class)}
+ */
+ @Deprecated
+ public static EObject hasStereotype(Element elt, EClass stereotypeClass) {
+ return UMLUtil.getStereotypeApplication(elt, stereotypeClass.getClass());
+ }
+
+ /**
+ * Convenient method to retrieve the StereotypeApplication by passing an
+ * element of the static profile.
+ *
+ * @deprecated prefer using {@link UMLUtil#getStereotypeApplication(Element, Class)}
+ */
+ @Deprecated
+ public static <T extends EObject> T getStereotypeApplication(Element element, java.lang.Class<T> clazz) {
+ return UMLUtil.getStereotypeApplication(element, clazz);
+ }
+}
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/util/SysmlResource.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/util/SysmlResource.java
new file mode 100755
index 0000000..753a52a
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/util/SysmlResource.java
@@ -0,0 +1,223 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.util;
+
+import org.eclipse.papyrus.sysml.SysmlPackage;
+
+/**
+ * For all deprecated : use org.eclipse.uml2.uml.util.UMLUtil.getStereotypeApplication
+ * Ex :
+ * replace appliedStereotype =
+ * connectorEnd.getAppliedStereotype("SysML::Blocks::NestedConnectorEnd");connectorEnd.getStereotypeApplication(appliedStereotype);
+ * by org.eclipse.uml2.uml.util.UMLUtil.getStereotypeApplication(element, NestedConnectorEnd.class);
+ */
+public class SysmlResource {
+
+ public static final String LIBRARIES_PATHMAP = "pathmap://SysML_LIBRARIES/"; //$NON-NLS-1$
+
+ public static final String SYSML_PRIMITIVE_TYPES_LIBRARY_URI = LIBRARIES_PATHMAP + "SysMLPrimitiveTypes.uml"; //$NON-NLS-1$
+
+ public static final String PROFILES_PATHMAP = "pathmap://SysML_PROFILES/"; //$NON-NLS-1$
+
+ public static final String SYSML_PROFILE_NS_URI = SysmlPackage.eNS_URI;
+
+ public static final String SYSML_PROFILE_URI = PROFILES_PATHMAP + "SysML.profile.uml"; //$NON-NLS-1$
+
+
+ // Stereotypes ids
+ @Deprecated
+ public static String CONFORM_ID = "SysML::ModelElements::Conform";
+
+ @Deprecated
+ public static String VIEW_ID = "SysML::ModelElements::View";
+
+ @Deprecated
+ public static String VIEW_POINT_ID = "SysML::ModelElements::ViewPoint";
+
+ /**
+ * @deprecated use VIEW_POINT_ID instead
+ */
+ @Deprecated
+ public static String VIEWPOINT_ID = VIEW_POINT_ID;
+
+ @Deprecated
+ public static String RATIONALE_ID = "SysML::ModelElements::Rationale";
+
+ @Deprecated
+ public static String PROBLEM_ID = "SysML::ModelElements::Problem";
+
+ @Deprecated
+ public static String BLOCK_ID = "SysML::Blocks::Block";
+
+ @Deprecated
+ public static String DISTRIBUTED_PROPERTY_ID = "SysML::Blocks::DistributedProperty";
+
+ @Deprecated
+ public static String DIMENSION_ID = "SysML::Blocks::Dimension";
+
+ @Deprecated
+ public static String UNIT_ID = "SysML::Blocks::Unit";
+
+ @Deprecated
+ public static String VALUE_TYPE_ID = "SysML::Blocks::ValueType";
+
+ @Deprecated
+ public static String NESTED_CONNECTOR_END_ID = "SysML::Blocks::NestedConnectorEnd";
+
+ /** @deprecated use NESTED_CONNECTOR_END_ID instead */
+ @Deprecated
+ public static String NESTED_CONNECTOREND_ID = NESTED_CONNECTOR_END_ID;
+
+ @Deprecated
+ public static String PARTICIPANT_PROPERTY_ID = "SysML::Blocks::ParticipantProperty";
+
+ @Deprecated
+ public static String CONNECTOR_PROPERTY_ID = "SysML::Blocks::ConnectorProperty";
+
+ @Deprecated
+ public static String BINDING_CONNECTOR_ID = "SysML::Blocks::BindingConnector";
+
+ @Deprecated
+ public static String PROPERTY_SPECIFIC_TYPE_ID = "SysML::Blocks::PropertySpecificType";
+
+ @Deprecated
+ public static String FLOW_PORT_ID = "SysML::PortAndFlows::FlowPort";
+
+ @Deprecated
+ public static String FLOW_PROPERTY_ID = "SysML::PortAndFlows::FlowProperty";
+
+ @Deprecated
+ public static String FLOW_SPECIFICATION_ID = "SysML::PortAndFlows::FlowSpecification";
+
+ @Deprecated
+ public static String ITEM_FLOW_ID = "SysML::PortAndFlows::ItemFlow";
+
+ @Deprecated
+ public static String CONSTRAINT_BLOCK_ID = "SysML::Constraints::ConstraintBlock";
+
+ @Deprecated
+ public static String CONSTRAINT_PROPERTY_ID = "SysML::Constraints::ConstraintProperty";
+
+ @Deprecated
+ public static String OPTIONAL_ID = "SysML::Activities::Optional";
+
+ @Deprecated
+ public static String RATE_ID = "SysML::Activities::Rate";
+
+ @Deprecated
+ public static String PROBABILITY_ID = "SysML::Activities::Probability";
+
+ @Deprecated
+ public static String CONTINUOUS_ID = "SysML::Activities::Continuous";
+
+ @Deprecated
+ public static String DISCRETE_ID = "SysML::Activities::Discrete";
+
+ @Deprecated
+ public static String CONTROL_OPERATOR_ID = "SysML::Activities::ControlOperator";
+
+ @Deprecated
+ public static String NO_BUFFER_ID = "SysML::Activities::NoBuffer";
+
+ @Deprecated
+ public static String OVERWRITE_ID = "SysML::Activities::Overwrite";
+
+ @Deprecated
+ public static String ALLOCATE_ID = "SysML::Allocations::Allocate";
+
+ @Deprecated
+ public static String ALLOCATED_ID = "SysML::Allocations::Allocated";
+
+ @Deprecated
+ public static String ALLOCATE_ACTIVITY_PARTITION_ID = "SysML::Allocations::AllocateActivityPartition";
+
+ @Deprecated
+ public static String DERIVE_REQT_ID = "SysML::Requirements::DeriveReqt";
+
+ @Deprecated
+ public static String VERIFY_ID = "SysML::Requirements::Verify";
+
+ @Deprecated
+ public static String COPY_ID = "SysML::Requirements::Copy";
+
+ @Deprecated
+ public static String SATISFY_ID = "SysML::Requirements::Satisfy";
+
+ @Deprecated
+ public static String TEST_CASE_ID = "SysML::Requirements::TestCase";
+
+ @Deprecated
+ public static String REQUIREMENT_ID = "SysML::Requirements::Requirement";
+
+ @Deprecated
+ public static String REQUIREMENT_RELATED_ID = "SysML::Requirements::RequirementRelated";
+
+ // SubProfiles ids
+ @Deprecated
+ public static String SYSML_ID = "SysML";
+
+ @Deprecated
+ public static String MODEL_ELEMENTS_ID = "SysML::ModelElements";
+
+ @Deprecated
+ public static String BLOCKS_ID = "SysML::Blocks";
+
+ @Deprecated
+ public static String PORT_AND_FLOWS_ID = "SysML::PortAndFlows";
+
+ @Deprecated
+ public static String CONSTRAINTS_ID = "SysML::Constraints";
+
+ @Deprecated
+ public static String ACTIVITIES_ID = "SysML::Activities";
+
+ @Deprecated
+ public static String ALLOCATIONS_ID = "SysML::Allocations";
+
+ @Deprecated
+ public static String REQUIREMENTS_ID = "SysML::Requirements";
+
+ // stereotype properties ids
+ // requirements properties
+ @Deprecated
+ public static String REQUIREMENT_BASE_CLASS_ID = "base_Class"; //$NON-NLS-1$
+
+ @Deprecated
+ public static String REQUIREMENT_DERIVED_ID = "derived"; //$NON-NLS-1$
+
+ @Deprecated
+ public static String REQUIREMENT_DERIVED_FROM_ID = "derivedFrom";//$NON-NLS-1$
+
+ @Deprecated
+ public static String REQUIREMENT_ID_ID = "id";//$NON-NLS-1$
+
+ @Deprecated
+ public static String REQUIREMENT_MASTER_ID = "master";//$NON-NLS-1$
+
+ @Deprecated
+ public static String REQUIREMENT_REFINED_BY_ID = "refinedBy";//$NON-NLS-1$
+
+ @Deprecated
+ public static String REQUIREMENT_SATISFIED_BY_ID = "satisfiedBy";//$NON-NLS-1$
+
+ @Deprecated
+ public static String REQUIREMENT_TEXT_ID = "text";//$NON-NLS-1$
+
+ @Deprecated
+ public static String REQUIREMENT_TRACED_TO_ID = "tracedTo";//$NON-NLS-1$
+
+ @Deprecated
+ public static String REQUIREMENT_VERIFIED_BY_ID = "verifiedBy";//$NON-NLS-1$
+
+}
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/util/SysmlResourceFactoryImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/util/SysmlResourceFactoryImpl.java
new file mode 100755
index 0000000..b6eb78a
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/util/SysmlResourceFactoryImpl.java
@@ -0,0 +1,53 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.util;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl;
+
+/**
+ * <!-- begin-user-doc --> The <b>Resource Factory</b> associated with the
+ * package. <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.util.SysmlResourceImpl
+ * @generated
+ */
+public class SysmlResourceFactoryImpl extends ResourceFactoryImpl {
+
+ /**
+ * Creates an instance of the resource factory.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public SysmlResourceFactoryImpl() {
+ super();
+ }
+
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Resource createResource(URI uri) {
+ Resource result = new SysmlResourceImpl(uri);
+ return result;
+ }
+
+} // SysmlResourceFactoryImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/util/SysmlResourceImpl.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/util/SysmlResourceImpl.java
new file mode 100755
index 0000000..dc5a9f9
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/util/SysmlResourceImpl.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.util;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl;
+
+/**
+ * <!-- begin-user-doc --> The <b>Resource </b> associated with the package.
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.util.SysmlResourceFactoryImpl
+ * @generated
+ */
+public class SysmlResourceImpl extends XMLResourceImpl {
+
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @param uri
+ * the URI of the new resource.
+ * @generated
+ */
+ public SysmlResourceImpl(URI uri) {
+ super(uri);
+ }
+
+} // SysmlResourceImpl
diff --git a/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/util/SysmlXMLProcessor.java b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/util/SysmlXMLProcessor.java
new file mode 100755
index 0000000..4841936
--- /dev/null
+++ b/plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/util/SysmlXMLProcessor.java
@@ -0,0 +1,59 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.util;
+
+import java.util.Map;
+
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.xmi.util.XMLProcessor;
+import org.eclipse.papyrus.sysml.SysmlPackage;
+
+/**
+ * This class contains helper methods to serialize and deserialize XML documents
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class SysmlXMLProcessor extends XMLProcessor {
+
+ /**
+ * Public constructor to instantiate the helper.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public SysmlXMLProcessor() {
+ super((EPackage.Registry.INSTANCE));
+ SysmlPackage.eINSTANCE.eClass();
+ }
+
+ /**
+ * Register for "*" and "xml" file extensions the SysmlResourceFactoryImpl factory.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected Map<String, Resource.Factory> getRegistrations() {
+ if (registrations == null) {
+ super.getRegistrations();
+ registrations.put(XML_EXTENSION, new SysmlResourceFactoryImpl());
+ registrations.put(STAR_EXTENSION, new SysmlResourceFactoryImpl());
+ }
+ return registrations;
+ }
+
+} // SysmlXMLProcessor
diff --git a/plugins/pom.xml b/plugins/pom.xml
new file mode 100755
index 0000000..45cd1c7
--- /dev/null
+++ b/plugins/pom.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<project>
+ <parent>
+ <groupId>org.eclipse.papyrus.sysml</groupId>
+ <artifactId>org.eclipse.papyrus.sysml.parent</artifactId>
+ <version>3.0.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>org.eclipse.papyrus.sysml</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <packaging>pom</packaging>
+
+ <name>Papyrus SysML</name>
+ <description>Top container of the Papyrus SysML 1.1 modeler</description>
+
+ <modules>
+ <module>architecture</module>
+ <module>diagram</module>
+ <module>modelexplorer</module>
+ <module>nattable</module>
+ <module>org.eclipse.papyrus.sysml</module>
+ <module>org.eclipse.papyrus.sysml.edit</module>
+ <module>org.eclipse.papyrus.sysml.service.types</module>
+ <module>properties</module>
+ </modules>
+
+
+
+</project>
diff --git a/plugins/properties/.project b/plugins/properties/.project
new file mode 100755
index 0000000..0f5b2bc
--- /dev/null
+++ b/plugins/properties/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>properties</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/properties/.settings/org.eclipse.core.resources.prefs b/plugins/properties/.settings/org.eclipse.core.resources.prefs
new file mode 100755
index 0000000..99f26c0
--- /dev/null
+++ b/plugins/properties/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/.classpath b/plugins/properties/org.eclipse.papyrus.sysml.properties/.classpath
new file mode 100755
index 0000000..5e4c1fe
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/.project b/plugins/properties/org.eclipse.papyrus.sysml.properties/.project
new file mode 100755
index 0000000..620558a
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/.project
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.sysml.properties</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>
+ <buildCommand>
+ <name>org.eclipse.oomph.version.VersionBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>check.maven.pom</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>ignore.lower.bound.dependency.ranges</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>release.path</key>
+ <value>/org.eclipse.papyrus.releng.main.release/release.xml</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.oomph.version.VersionNature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/.settings/org.eclipse.jdt.core.prefs b/plugins/properties/org.eclipse.papyrus.sysml.properties/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 0000000..c585cc4
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,291 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/.settings/org.eclipse.jdt.ui.prefs b/plugins/properties/org.eclipse.papyrus.sysml.properties/.settings/org.eclipse.jdt.ui.prefs
new file mode 100755
index 0000000..954281d
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,68 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+formatter_profile=_Papyrus
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/.settings/org.eclipse.pde.api.tools.prefs b/plugins/properties/org.eclipse.papyrus.sysml.properties/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100755
index 0000000..23fb95e
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/.settings/org.eclipse.pde.api.tools.prefs
@@ -0,0 +1,98 @@
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+API_USE_SCAN_FIELD_SEVERITY=Error
+API_USE_SCAN_METHOD_SEVERITY=Error
+API_USE_SCAN_TYPE_SEVERITY=Error
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Ignore
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_ANNOTATION=Ignore
+INVALID_JAVADOC_TAG=Ignore
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Ignore
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+MISSING_EE_DESCRIPTIONS=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=Enabled
+eclipse.preferences.version=1
+incompatible_api_component_version=Error
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Warning
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/META-INF/MANIFEST.MF b/plugins/properties/org.eclipse.papyrus.sysml.properties/META-INF/MANIFEST.MF
new file mode 100755
index 0000000..237c58b
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/META-INF/MANIFEST.MF
@@ -0,0 +1,12 @@
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.papyrus.infra.properties.ui;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.uml.properties;bundle-version="[3.0.0,4.0.0)"
+Bundle-Vendor: %Bundle-Vendor
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 1.2.0.qualifier
+Bundle-Name: %Bundle-Name
+Bundle-Activator: org.eclipse.papyrus.sysml.properties.Activator
+Bundle-ManifestVersion: 2
+Bundle-Description: %pluginDescription
+Bundle-SymbolicName: org.eclipse.papyrus.sysml.properties;singleton:=true
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/SysML.ctx b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/SysML.ctx
new file mode 100755
index 0000000..9776a07
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/SysML.ctx
@@ -0,0 +1,759 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<contexts:Context xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:constraints="http://www.eclipse.org/papyrus/constraints/0.9" xmlns:contexts="http://www.eclipse.org/papyrus/properties/contexts/0.9" xmi:id="_dm3VYMNaEeS3R6PXxQ7txw" name="SysML">
+ <dependencies href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#_69QJkKDJEeSZxfCXzZz3-w"/>
+ <tabs xmi:id="_dm3VYcNaEeS3R6PXxQ7txw" label="SysML" id="basicTabSysML" category="org.eclipse.papyrus" priority="20">
+ <sections xmi:id="_dm3VYsNaEeS3R6PXxQ7txw" name="SingleConform" sectionFile="ui/SingleConform.xwt">
+ <widget href="ui/SingleConform.xwt#/"/>
+ </sections>
+ <sections xmi:id="_dm3VY8NaEeS3R6PXxQ7txw" name="MultipleConform" sectionFile="ui/MultipleConform.xwt">
+ <widget href="ui/MultipleConform.xwt#/"/>
+ </sections>
+ <sections xmi:id="_dm38cMNaEeS3R6PXxQ7txw" name="SingleView" sectionFile="ui/SingleView.xwt">
+ <widget href="ui/SingleView.xwt#/"/>
+ </sections>
+ <sections xmi:id="_dm38ccNaEeS3R6PXxQ7txw" name="MultipleView" sectionFile="ui/MultipleView.xwt">
+ <widget href="ui/MultipleView.xwt#/"/>
+ </sections>
+ <sections xmi:id="_dm38csNaEeS3R6PXxQ7txw" name="SingleViewPoint" sectionFile="ui/SingleViewPoint.xwt">
+ <widget href="ui/SingleViewPoint.xwt#/"/>
+ </sections>
+ <sections xmi:id="_dm38c8NaEeS3R6PXxQ7txw" name="MultipleViewPoint" sectionFile="ui/MultipleViewPoint.xwt">
+ <widget href="ui/MultipleViewPoint.xwt#/"/>
+ </sections>
+ <sections xmi:id="_dm38dMNaEeS3R6PXxQ7txw" name="SingleBlock" sectionFile="ui/SingleBlock.xwt">
+ <widget href="ui/SingleBlock.xwt#/"/>
+ </sections>
+ <sections xmi:id="_dm38dcNaEeS3R6PXxQ7txw" name="MultipleBlock" sectionFile="ui/MultipleBlock.xwt">
+ <widget href="ui/MultipleBlock.xwt#/"/>
+ </sections>
+ <sections xmi:id="_dm38dsNaEeS3R6PXxQ7txw" name="SingleDistributedProperty" sectionFile="ui/SingleDistributedProperty.xwt">
+ <widget href="ui/SingleDistributedProperty.xwt#/"/>
+ </sections>
+ <sections xmi:id="_dm38d8NaEeS3R6PXxQ7txw" name="MultipleDistributedProperty" sectionFile="ui/MultipleDistributedProperty.xwt">
+ <widget href="ui/MultipleDistributedProperty.xwt#/"/>
+ </sections>
+ <sections xmi:id="_dm38eMNaEeS3R6PXxQ7txw" name="SingleDimension" sectionFile="ui/SingleDimension.xwt">
+ <widget href="ui/SingleDimension.xwt#/"/>
+ </sections>
+ <sections xmi:id="_dm38ecNaEeS3R6PXxQ7txw" name="MultipleDimension" sectionFile="ui/MultipleDimension.xwt">
+ <widget href="ui/MultipleDimension.xwt#/"/>
+ </sections>
+ <sections xmi:id="_dm38esNaEeS3R6PXxQ7txw" name="SingleUnit" sectionFile="ui/SingleUnit.xwt">
+ <widget href="ui/SingleUnit.xwt#/"/>
+ </sections>
+ <sections xmi:id="_dm4jgMNaEeS3R6PXxQ7txw" name="MultipleUnit" sectionFile="ui/MultipleUnit.xwt">
+ <widget href="ui/MultipleUnit.xwt#/"/>
+ </sections>
+ <sections xmi:id="_dm4jgcNaEeS3R6PXxQ7txw" name="SingleValueType" sectionFile="ui/SingleValueType.xwt">
+ <widget href="ui/SingleValueType.xwt#/"/>
+ </sections>
+ <sections xmi:id="_dm4jgsNaEeS3R6PXxQ7txw" name="MultipleValueType" sectionFile="ui/MultipleValueType.xwt">
+ <widget href="ui/MultipleValueType.xwt#/"/>
+ </sections>
+ <sections xmi:id="_dm4jg8NaEeS3R6PXxQ7txw" name="SingleNestedConnectorEnd" sectionFile="ui/SingleNestedConnectorEnd.xwt">
+ <widget href="ui/SingleNestedConnectorEnd.xwt#/"/>
+ </sections>
+ <sections xmi:id="_dm4jhMNaEeS3R6PXxQ7txw" name="MultipleNestedConnectorEnd" sectionFile="ui/MultipleNestedConnectorEnd.xwt">
+ <widget href="ui/MultipleNestedConnectorEnd.xwt#/"/>
+ </sections>
+ <sections xmi:id="_dm4jhcNaEeS3R6PXxQ7txw" name="SingleParticipantProperty" sectionFile="ui/SingleParticipantProperty.xwt">
+ <widget href="ui/SingleParticipantProperty.xwt#/"/>
+ </sections>
+ <sections xmi:id="_dm4jhsNaEeS3R6PXxQ7txw" name="MultipleParticipantProperty" sectionFile="ui/MultipleParticipantProperty.xwt">
+ <widget href="ui/MultipleParticipantProperty.xwt#/"/>
+ </sections>
+ <sections xmi:id="_dm4jh8NaEeS3R6PXxQ7txw" name="SingleConnectorProperty" sectionFile="ui/SingleConnectorProperty.xwt">
+ <widget href="ui/SingleConnectorProperty.xwt#/"/>
+ </sections>
+ <sections xmi:id="_dm4jiMNaEeS3R6PXxQ7txw" name="MultipleConnectorProperty" sectionFile="ui/MultipleConnectorProperty.xwt">
+ <widget href="ui/MultipleConnectorProperty.xwt#/"/>
+ </sections>
+ <sections xmi:id="_dm4jicNaEeS3R6PXxQ7txw" name="SingleBindingConnector" sectionFile="ui/SingleBindingConnector.xwt">
+ <widget href="ui/SingleBindingConnector.xwt#/"/>
+ </sections>
+ <sections xmi:id="_dm5KkMNaEeS3R6PXxQ7txw" name="MultipleBindingConnector" sectionFile="ui/MultipleBindingConnector.xwt">
+ <widget href="ui/MultipleBindingConnector.xwt#/"/>
+ </sections>
+ <sections xmi:id="_dm5KkcNaEeS3R6PXxQ7txw" name="SinglePropertySpecificType" sectionFile="ui/SinglePropertySpecificType.xwt">
+ <widget href="ui/SinglePropertySpecificType.xwt#/"/>
+ </sections>
+ <sections xmi:id="_dm5KksNaEeS3R6PXxQ7txw" name="MultiplePropertySpecificType" sectionFile="ui/MultiplePropertySpecificType.xwt">
+ <widget href="ui/MultiplePropertySpecificType.xwt#/"/>
+ </sections>
+ <sections xmi:id="_dm5Kk8NaEeS3R6PXxQ7txw" name="SingleFlowPort" sectionFile="ui/SingleFlowPort.xwt">
+ <widget href="ui/SingleFlowPort.xwt#/"/>
+ </sections>
+ <sections xmi:id="_dm5KlMNaEeS3R6PXxQ7txw" name="MultipleFlowPort" sectionFile="ui/MultipleFlowPort.xwt">
+ <widget href="ui/MultipleFlowPort.xwt#/"/>
+ </sections>
+ <sections xmi:id="_dm5KlcNaEeS3R6PXxQ7txw" name="SingleFlowProperty" sectionFile="ui/SingleFlowProperty.xwt">
+ <widget href="ui/SingleFlowProperty.xwt#/"/>
+ </sections>
+ <sections xmi:id="_dm5KlsNaEeS3R6PXxQ7txw" name="MultipleFlowProperty" sectionFile="ui/MultipleFlowProperty.xwt">
+ <widget href="ui/MultipleFlowProperty.xwt#/"/>
+ </sections>
+ <sections xmi:id="_dm5Kl8NaEeS3R6PXxQ7txw" name="SingleFlowSpecification" sectionFile="ui/SingleFlowSpecification.xwt">
+ <widget href="ui/SingleFlowSpecification.xwt#/"/>
+ </sections>
+ <sections xmi:id="_dm5KmMNaEeS3R6PXxQ7txw" name="MultipleFlowSpecification" sectionFile="ui/MultipleFlowSpecification.xwt">
+ <widget href="ui/MultipleFlowSpecification.xwt#/"/>
+ </sections>
+ <sections xmi:id="_dm5KmcNaEeS3R6PXxQ7txw" name="SingleItemFlow" sectionFile="ui/SingleItemFlow.xwt">
+ <widget href="ui/SingleItemFlow.xwt#/"/>
+ </sections>
+ <sections xmi:id="_dm5xoMNaEeS3R6PXxQ7txw" name="MultipleItemFlow" sectionFile="ui/MultipleItemFlow.xwt">
+ <widget href="ui/MultipleItemFlow.xwt#/"/>
+ </sections>
+ <sections xmi:id="_dm5xocNaEeS3R6PXxQ7txw" name="SingleConstraintBlock" sectionFile="ui/SingleConstraintBlock.xwt">
+ <widget href="ui/SingleConstraintBlock.xwt#/"/>
+ </sections>
+ <sections xmi:id="_dm5xosNaEeS3R6PXxQ7txw" name="MultipleConstraintBlock" sectionFile="ui/MultipleConstraintBlock.xwt">
+ <widget href="ui/MultipleConstraintBlock.xwt#/"/>
+ </sections>
+ <sections xmi:id="_dm5xo8NaEeS3R6PXxQ7txw" name="SingleConstraintProperty" sectionFile="ui/SingleConstraintProperty.xwt">
+ <widget href="ui/SingleConstraintProperty.xwt#/"/>
+ </sections>
+ <sections xmi:id="_dm5xpMNaEeS3R6PXxQ7txw" name="MultipleConstraintProperty" sectionFile="ui/MultipleConstraintProperty.xwt">
+ <widget href="ui/MultipleConstraintProperty.xwt#/"/>
+ </sections>
+ <sections xmi:id="_dm5xpcNaEeS3R6PXxQ7txw" name="SingleOptional" sectionFile="ui/SingleOptional.xwt">
+ <widget href="ui/SingleOptional.xwt#/"/>
+ </sections>
+ <sections xmi:id="_dm5xpsNaEeS3R6PXxQ7txw" name="MultipleOptional" sectionFile="ui/MultipleOptional.xwt">
+ <widget href="ui/MultipleOptional.xwt#/"/>
+ </sections>
+ <sections xmi:id="_dm5xp8NaEeS3R6PXxQ7txw" name="SingleRate" sectionFile="ui/SingleRate.xwt">
+ <widget href="ui/SingleRate.xwt#/"/>
+ </sections>
+ <sections xmi:id="_dm5xqMNaEeS3R6PXxQ7txw" name="MultipleRate" sectionFile="ui/MultipleRate.xwt">
+ <widget href="ui/MultipleRate.xwt#/"/>
+ </sections>
+ <sections xmi:id="_dm5xqcNaEeS3R6PXxQ7txw" name="SingleProbability" sectionFile="ui/SingleProbability.xwt">
+ <widget href="ui/SingleProbability.xwt#/"/>
+ </sections>
+ <sections xmi:id="_dm5xqsNaEeS3R6PXxQ7txw" name="MultipleProbability" sectionFile="ui/MultipleProbability.xwt">
+ <widget href="ui/MultipleProbability.xwt#/"/>
+ </sections>
+ <sections xmi:id="_dm6YsMNaEeS3R6PXxQ7txw" name="SingleContinuous" sectionFile="ui/SingleContinuous.xwt">
+ <widget href="ui/SingleContinuous.xwt#/"/>
+ </sections>
+ <sections xmi:id="_dm6YscNaEeS3R6PXxQ7txw" name="MultipleContinuous" sectionFile="ui/MultipleContinuous.xwt">
+ <widget href="ui/MultipleContinuous.xwt#/"/>
+ </sections>
+ <sections xmi:id="_dm6YssNaEeS3R6PXxQ7txw" name="SingleDiscrete" sectionFile="ui/SingleDiscrete.xwt">
+ <widget href="ui/SingleDiscrete.xwt#/"/>
+ </sections>
+ <sections xmi:id="_dm6Ys8NaEeS3R6PXxQ7txw" name="MultipleDiscrete" sectionFile="ui/MultipleDiscrete.xwt">
+ <widget href="ui/MultipleDiscrete.xwt#/"/>
+ </sections>
+ <sections xmi:id="_dm6YtMNaEeS3R6PXxQ7txw" name="SingleControlOperator" sectionFile="ui/SingleControlOperator.xwt">
+ <widget href="ui/SingleControlOperator.xwt#/"/>
+ </sections>
+ <sections xmi:id="_dm6YtcNaEeS3R6PXxQ7txw" name="MultipleControlOperator" sectionFile="ui/MultipleControlOperator.xwt">
+ <widget href="ui/MultipleControlOperator.xwt#/"/>
+ </sections>
+ <sections xmi:id="_dm6YtsNaEeS3R6PXxQ7txw" name="SingleNoBuffer" sectionFile="ui/SingleNoBuffer.xwt">
+ <widget href="ui/SingleNoBuffer.xwt#/"/>
+ </sections>
+ <sections xmi:id="_dm6Yt8NaEeS3R6PXxQ7txw" name="MultipleNoBuffer" sectionFile="ui/MultipleNoBuffer.xwt">
+ <widget href="ui/MultipleNoBuffer.xwt#/"/>
+ </sections>
+ <sections xmi:id="_dm6YuMNaEeS3R6PXxQ7txw" name="SingleOverwrite" sectionFile="ui/SingleOverwrite.xwt">
+ <widget href="ui/SingleOverwrite.xwt#/"/>
+ </sections>
+ <sections xmi:id="_dm6_wMNaEeS3R6PXxQ7txw" name="MultipleOverwrite" sectionFile="ui/MultipleOverwrite.xwt">
+ <widget href="ui/MultipleOverwrite.xwt#/"/>
+ </sections>
+ <sections xmi:id="_dm6_wcNaEeS3R6PXxQ7txw" name="SingleAllocate" sectionFile="ui/SingleAllocate.xwt">
+ <widget href="ui/SingleAllocate.xwt#/"/>
+ </sections>
+ <sections xmi:id="_dm6_wsNaEeS3R6PXxQ7txw" name="MultipleAllocate" sectionFile="ui/MultipleAllocate.xwt">
+ <widget href="ui/MultipleAllocate.xwt#/"/>
+ </sections>
+ <sections xmi:id="_dm6_w8NaEeS3R6PXxQ7txw" name="SingleAllocated" sectionFile="ui/SingleAllocated.xwt">
+ <widget href="ui/SingleAllocated.xwt#/"/>
+ </sections>
+ <sections xmi:id="_dm6_xMNaEeS3R6PXxQ7txw" name="MultipleAllocated" sectionFile="ui/MultipleAllocated.xwt">
+ <widget href="ui/MultipleAllocated.xwt#/"/>
+ </sections>
+ <sections xmi:id="_dm6_xcNaEeS3R6PXxQ7txw" name="SingleAllocateActivityPartition" sectionFile="ui/SingleAllocateActivityPartition.xwt">
+ <widget href="ui/SingleAllocateActivityPartition.xwt#/"/>
+ </sections>
+ <sections xmi:id="_dm6_xsNaEeS3R6PXxQ7txw" name="MultipleAllocateActivityPartition" sectionFile="ui/MultipleAllocateActivityPartition.xwt">
+ <widget href="ui/MultipleAllocateActivityPartition.xwt#/"/>
+ </sections>
+ <sections xmi:id="_dm6_x8NaEeS3R6PXxQ7txw" name="SingleTestCase" sectionFile="ui/SingleTestCase.xwt">
+ <widget href="ui/SingleTestCase.xwt#/"/>
+ </sections>
+ <sections xmi:id="_dm6_yMNaEeS3R6PXxQ7txw" name="MultipleTestCase" sectionFile="ui/MultipleTestCase.xwt">
+ <widget href="ui/MultipleTestCase.xwt#/"/>
+ </sections>
+ <sections xmi:id="_dm6_ycNaEeS3R6PXxQ7txw" name="SingleRequirement" sectionFile="ui/SingleRequirement.xwt">
+ <widget href="ui/SingleRequirement.xwt#/"/>
+ </sections>
+ <sections xmi:id="_dm7m0MNaEeS3R6PXxQ7txw" name="MultipleRequirement" sectionFile="ui/MultipleRequirement.xwt">
+ <widget href="ui/MultipleRequirement.xwt#/"/>
+ </sections>
+ <sections xmi:id="_dm7m0cNaEeS3R6PXxQ7txw" name="SingleRequirementRelated" sectionFile="ui/SingleRequirementRelated.xwt">
+ <widget href="ui/SingleRequirementRelated.xwt#/"/>
+ </sections>
+ <sections xmi:id="_dm7m0sNaEeS3R6PXxQ7txw" name="MultipleRequirementRelated" sectionFile="ui/MultipleRequirementRelated.xwt">
+ <widget href="ui/MultipleRequirementRelated.xwt#/"/>
+ </sections>
+ </tabs>
+ <views xmi:id="_dm7m08NaEeS3R6PXxQ7txw" name="SingleConform" sections="_dm3VYsNaEeS3R6PXxQ7txw" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_dm7m1MNaEeS3R6PXxQ7txw" name="isSingleConform">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_dm7m1cNaEeS3R6PXxQ7txw" name="stereotypeName" value="SysML::ModelElements::Conform"/>
+ </constraints>
+ </views>
+ <views xmi:id="_dm7m1sNaEeS3R6PXxQ7txw" elementMultiplicity="-1" name="MultipleConform" sections="_dm3VY8NaEeS3R6PXxQ7txw" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_dm7m18NaEeS3R6PXxQ7txw" name="isMultipleConform">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_dm7m2MNaEeS3R6PXxQ7txw" name="stereotypeName" value="SysML::ModelElements::Conform"/>
+ </constraints>
+ </views>
+ <views xmi:id="_dm7m2cNaEeS3R6PXxQ7txw" name="SingleView" sections="_dm38cMNaEeS3R6PXxQ7txw" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_dm7m2sNaEeS3R6PXxQ7txw" name="isSingleView">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_dm7m28NaEeS3R6PXxQ7txw" name="stereotypeName" value="SysML::ModelElements::View"/>
+ </constraints>
+ </views>
+ <views xmi:id="_dm7m3MNaEeS3R6PXxQ7txw" elementMultiplicity="-1" name="MultipleView" sections="_dm38ccNaEeS3R6PXxQ7txw" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_dm7m3cNaEeS3R6PXxQ7txw" name="isMultipleView">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_dm7m3sNaEeS3R6PXxQ7txw" name="stereotypeName" value="SysML::ModelElements::View"/>
+ </constraints>
+ </views>
+ <views xmi:id="_dm8N4MNaEeS3R6PXxQ7txw" name="SingleViewPoint" sections="_dm38csNaEeS3R6PXxQ7txw" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_dm8N4cNaEeS3R6PXxQ7txw" name="isSingleViewPoint">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_dm8N4sNaEeS3R6PXxQ7txw" name="stereotypeName" value="SysML::ModelElements::ViewPoint"/>
+ </constraints>
+ </views>
+ <views xmi:id="_dm8N48NaEeS3R6PXxQ7txw" elementMultiplicity="-1" name="MultipleViewPoint" sections="_dm38c8NaEeS3R6PXxQ7txw" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_dm8N5MNaEeS3R6PXxQ7txw" name="isMultipleViewPoint">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_dm8N5cNaEeS3R6PXxQ7txw" name="stereotypeName" value="SysML::ModelElements::ViewPoint"/>
+ </constraints>
+ </views>
+ <views xmi:id="_dm8N5sNaEeS3R6PXxQ7txw" name="SingleBlock" sections="_dm38dMNaEeS3R6PXxQ7txw" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_dm8N58NaEeS3R6PXxQ7txw" name="isSingleBlock">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_dm8N6MNaEeS3R6PXxQ7txw" name="stereotypeName" value="SysML::Blocks::Block"/>
+ </constraints>
+ </views>
+ <views xmi:id="_dm8N6cNaEeS3R6PXxQ7txw" elementMultiplicity="-1" name="MultipleBlock" sections="_dm38dcNaEeS3R6PXxQ7txw" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_dm8N6sNaEeS3R6PXxQ7txw" name="isMultipleBlock">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_dm8N68NaEeS3R6PXxQ7txw" name="stereotypeName" value="SysML::Blocks::Block"/>
+ </constraints>
+ </views>
+ <views xmi:id="_dm8N7MNaEeS3R6PXxQ7txw" name="SingleDistributedProperty" sections="_dm38dsNaEeS3R6PXxQ7txw" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_dm8N7cNaEeS3R6PXxQ7txw" name="isSingleDistributedProperty">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_dm8N7sNaEeS3R6PXxQ7txw" name="stereotypeName" value="SysML::Blocks::DistributedProperty"/>
+ </constraints>
+ </views>
+ <views xmi:id="_dm8N78NaEeS3R6PXxQ7txw" elementMultiplicity="-1" name="MultipleDistributedProperty" sections="_dm38d8NaEeS3R6PXxQ7txw" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_dm8N8MNaEeS3R6PXxQ7txw" name="isMultipleDistributedProperty">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_dm8N8cNaEeS3R6PXxQ7txw" name="stereotypeName" value="SysML::Blocks::DistributedProperty"/>
+ </constraints>
+ </views>
+ <views xmi:id="_dm808MNaEeS3R6PXxQ7txw" name="SingleDimension" sections="_dm38eMNaEeS3R6PXxQ7txw" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_dm808cNaEeS3R6PXxQ7txw" name="isSingleDimension">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_dm808sNaEeS3R6PXxQ7txw" name="stereotypeName" value="SysML::Blocks::Dimension"/>
+ </constraints>
+ </views>
+ <views xmi:id="_dm8088NaEeS3R6PXxQ7txw" elementMultiplicity="-1" name="MultipleDimension" sections="_dm38ecNaEeS3R6PXxQ7txw" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_dm809MNaEeS3R6PXxQ7txw" name="isMultipleDimension">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_dm809cNaEeS3R6PXxQ7txw" name="stereotypeName" value="SysML::Blocks::Dimension"/>
+ </constraints>
+ </views>
+ <views xmi:id="_dm809sNaEeS3R6PXxQ7txw" name="SingleUnit" sections="_dm38esNaEeS3R6PXxQ7txw" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_dm8098NaEeS3R6PXxQ7txw" name="isSingleUnit">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_dm80-MNaEeS3R6PXxQ7txw" name="stereotypeName" value="SysML::Blocks::Unit"/>
+ </constraints>
+ </views>
+ <views xmi:id="_dm80-cNaEeS3R6PXxQ7txw" elementMultiplicity="-1" name="MultipleUnit" sections="_dm4jgMNaEeS3R6PXxQ7txw" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_dm80-sNaEeS3R6PXxQ7txw" name="isMultipleUnit">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_dm80-8NaEeS3R6PXxQ7txw" name="stereotypeName" value="SysML::Blocks::Unit"/>
+ </constraints>
+ </views>
+ <views xmi:id="_dm80_MNaEeS3R6PXxQ7txw" name="SingleValueType" sections="_dm4jgcNaEeS3R6PXxQ7txw" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_dm80_cNaEeS3R6PXxQ7txw" name="isSingleValueType">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_dm80_sNaEeS3R6PXxQ7txw" name="stereotypeName" value="SysML::Blocks::ValueType"/>
+ </constraints>
+ </views>
+ <views xmi:id="_dm80_8NaEeS3R6PXxQ7txw" elementMultiplicity="-1" name="MultipleValueType" sections="_dm4jgsNaEeS3R6PXxQ7txw" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_dm81AMNaEeS3R6PXxQ7txw" name="isMultipleValueType">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_dm81AcNaEeS3R6PXxQ7txw" name="stereotypeName" value="SysML::Blocks::ValueType"/>
+ </constraints>
+ </views>
+ <views xmi:id="_dm9cAMNaEeS3R6PXxQ7txw" name="SingleNestedConnectorEnd" sections="_dm4jg8NaEeS3R6PXxQ7txw" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_dm9cAcNaEeS3R6PXxQ7txw" name="isSingleNestedConnectorEnd">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_dm9cAsNaEeS3R6PXxQ7txw" name="stereotypeName" value="SysML::Blocks::NestedConnectorEnd"/>
+ </constraints>
+ </views>
+ <views xmi:id="_dm9cA8NaEeS3R6PXxQ7txw" elementMultiplicity="-1" name="MultipleNestedConnectorEnd" sections="_dm4jhMNaEeS3R6PXxQ7txw" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_dm9cBMNaEeS3R6PXxQ7txw" name="isMultipleNestedConnectorEnd">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_dm9cBcNaEeS3R6PXxQ7txw" name="stereotypeName" value="SysML::Blocks::NestedConnectorEnd"/>
+ </constraints>
+ </views>
+ <views xmi:id="_dm9cBsNaEeS3R6PXxQ7txw" name="SingleParticipantProperty" sections="_dm4jhcNaEeS3R6PXxQ7txw" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_dm9cB8NaEeS3R6PXxQ7txw" name="isSingleParticipantProperty">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_dm9cCMNaEeS3R6PXxQ7txw" name="stereotypeName" value="SysML::Blocks::ParticipantProperty"/>
+ </constraints>
+ </views>
+ <views xmi:id="_dm9cCcNaEeS3R6PXxQ7txw" elementMultiplicity="-1" name="MultipleParticipantProperty" sections="_dm4jhsNaEeS3R6PXxQ7txw" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_dm9cCsNaEeS3R6PXxQ7txw" name="isMultipleParticipantProperty">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_dm9cC8NaEeS3R6PXxQ7txw" name="stereotypeName" value="SysML::Blocks::ParticipantProperty"/>
+ </constraints>
+ </views>
+ <views xmi:id="_dm9cDMNaEeS3R6PXxQ7txw" name="SingleConnectorProperty" sections="_dm4jh8NaEeS3R6PXxQ7txw" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_dm9cDcNaEeS3R6PXxQ7txw" name="isSingleConnectorProperty">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_dm9cDsNaEeS3R6PXxQ7txw" name="stereotypeName" value="SysML::Blocks::ConnectorProperty"/>
+ </constraints>
+ </views>
+ <views xmi:id="_dm9cD8NaEeS3R6PXxQ7txw" elementMultiplicity="-1" name="MultipleConnectorProperty" sections="_dm4jiMNaEeS3R6PXxQ7txw" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_dm9cEMNaEeS3R6PXxQ7txw" name="isMultipleConnectorProperty">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_dm9cEcNaEeS3R6PXxQ7txw" name="stereotypeName" value="SysML::Blocks::ConnectorProperty"/>
+ </constraints>
+ </views>
+ <views xmi:id="_dm-DEMNaEeS3R6PXxQ7txw" name="SingleBindingConnector" sections="_dm4jicNaEeS3R6PXxQ7txw" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_dm-DEcNaEeS3R6PXxQ7txw" name="isSingleBindingConnector">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_dm-DEsNaEeS3R6PXxQ7txw" name="stereotypeName" value="SysML::Blocks::BindingConnector"/>
+ </constraints>
+ </views>
+ <views xmi:id="_dm-DE8NaEeS3R6PXxQ7txw" elementMultiplicity="-1" name="MultipleBindingConnector" sections="_dm5KkMNaEeS3R6PXxQ7txw" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_dm-DFMNaEeS3R6PXxQ7txw" name="isMultipleBindingConnector">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_dm-DFcNaEeS3R6PXxQ7txw" name="stereotypeName" value="SysML::Blocks::BindingConnector"/>
+ </constraints>
+ </views>
+ <views xmi:id="_dm-DFsNaEeS3R6PXxQ7txw" name="SinglePropertySpecificType" sections="_dm5KkcNaEeS3R6PXxQ7txw" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_dm-DF8NaEeS3R6PXxQ7txw" name="isSinglePropertySpecificType">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_dm-DGMNaEeS3R6PXxQ7txw" name="stereotypeName" value="SysML::Blocks::PropertySpecificType"/>
+ </constraints>
+ </views>
+ <views xmi:id="_dm-DGcNaEeS3R6PXxQ7txw" elementMultiplicity="-1" name="MultiplePropertySpecificType" sections="_dm5KksNaEeS3R6PXxQ7txw" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_dm-DGsNaEeS3R6PXxQ7txw" name="isMultiplePropertySpecificType">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_dm-DG8NaEeS3R6PXxQ7txw" name="stereotypeName" value="SysML::Blocks::PropertySpecificType"/>
+ </constraints>
+ </views>
+ <views xmi:id="_dm-DHMNaEeS3R6PXxQ7txw" name="SingleFlowPort" sections="_dm5Kk8NaEeS3R6PXxQ7txw" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_dm-DHcNaEeS3R6PXxQ7txw" name="isSingleFlowPort">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_dm-DHsNaEeS3R6PXxQ7txw" name="stereotypeName" value="SysML::PortAndFlows::FlowPort"/>
+ </constraints>
+ </views>
+ <views xmi:id="_dm-DH8NaEeS3R6PXxQ7txw" elementMultiplicity="-1" name="MultipleFlowPort" sections="_dm5KlMNaEeS3R6PXxQ7txw" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_dm-DIMNaEeS3R6PXxQ7txw" name="isMultipleFlowPort">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_dm-DIcNaEeS3R6PXxQ7txw" name="stereotypeName" value="SysML::PortAndFlows::FlowPort"/>
+ </constraints>
+ </views>
+ <views xmi:id="_dm-DIsNaEeS3R6PXxQ7txw" name="SingleFlowProperty" sections="_dm5KlcNaEeS3R6PXxQ7txw" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_dm-qIMNaEeS3R6PXxQ7txw" name="isSingleFlowProperty">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_dm-qIcNaEeS3R6PXxQ7txw" name="stereotypeName" value="SysML::PortAndFlows::FlowProperty"/>
+ </constraints>
+ </views>
+ <views xmi:id="_dm-qIsNaEeS3R6PXxQ7txw" elementMultiplicity="-1" name="MultipleFlowProperty" sections="_dm5KlsNaEeS3R6PXxQ7txw" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_dm-qI8NaEeS3R6PXxQ7txw" name="isMultipleFlowProperty">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_dm-qJMNaEeS3R6PXxQ7txw" name="stereotypeName" value="SysML::PortAndFlows::FlowProperty"/>
+ </constraints>
+ </views>
+ <views xmi:id="_dm-qJcNaEeS3R6PXxQ7txw" name="SingleFlowSpecification" sections="_dm5Kl8NaEeS3R6PXxQ7txw" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_dm-qJsNaEeS3R6PXxQ7txw" name="isSingleFlowSpecification">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_dm-qJ8NaEeS3R6PXxQ7txw" name="stereotypeName" value="SysML::PortAndFlows::FlowSpecification"/>
+ </constraints>
+ </views>
+ <views xmi:id="_dm-qKMNaEeS3R6PXxQ7txw" elementMultiplicity="-1" name="MultipleFlowSpecification" sections="_dm5KmMNaEeS3R6PXxQ7txw" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_dm-qKcNaEeS3R6PXxQ7txw" name="isMultipleFlowSpecification">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_dm-qKsNaEeS3R6PXxQ7txw" name="stereotypeName" value="SysML::PortAndFlows::FlowSpecification"/>
+ </constraints>
+ </views>
+ <views xmi:id="_dm-qK8NaEeS3R6PXxQ7txw" name="SingleItemFlow" sections="_dm5KmcNaEeS3R6PXxQ7txw" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_dm-qLMNaEeS3R6PXxQ7txw" name="isSingleItemFlow">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_dm-qLcNaEeS3R6PXxQ7txw" name="stereotypeName" value="SysML::PortAndFlows::ItemFlow"/>
+ </constraints>
+ </views>
+ <views xmi:id="_dm-qLsNaEeS3R6PXxQ7txw" elementMultiplicity="-1" name="MultipleItemFlow" sections="_dm5xoMNaEeS3R6PXxQ7txw" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_dm-qL8NaEeS3R6PXxQ7txw" name="isMultipleItemFlow">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_dm-qMMNaEeS3R6PXxQ7txw" name="stereotypeName" value="SysML::PortAndFlows::ItemFlow"/>
+ </constraints>
+ </views>
+ <views xmi:id="_dm-qMcNaEeS3R6PXxQ7txw" name="SingleConstraintBlock" sections="_dm5xocNaEeS3R6PXxQ7txw" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_dm_RMMNaEeS3R6PXxQ7txw" name="isSingleConstraintBlock">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_dm_RMcNaEeS3R6PXxQ7txw" name="stereotypeName" value="SysML::Constraints::ConstraintBlock"/>
+ </constraints>
+ </views>
+ <views xmi:id="_dm_RMsNaEeS3R6PXxQ7txw" elementMultiplicity="-1" name="MultipleConstraintBlock" sections="_dm5xosNaEeS3R6PXxQ7txw" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_dm_RM8NaEeS3R6PXxQ7txw" name="isMultipleConstraintBlock">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_dm_RNMNaEeS3R6PXxQ7txw" name="stereotypeName" value="SysML::Constraints::ConstraintBlock"/>
+ </constraints>
+ </views>
+ <views xmi:id="_dm_RNcNaEeS3R6PXxQ7txw" name="SingleConstraintProperty" sections="_dm5xo8NaEeS3R6PXxQ7txw" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_dm_RNsNaEeS3R6PXxQ7txw" name="isSingleConstraintProperty">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_dm_RN8NaEeS3R6PXxQ7txw" name="stereotypeName" value="SysML::Constraints::ConstraintProperty"/>
+ </constraints>
+ </views>
+ <views xmi:id="_dm_ROMNaEeS3R6PXxQ7txw" elementMultiplicity="-1" name="MultipleConstraintProperty" sections="_dm5xpMNaEeS3R6PXxQ7txw" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_dm_ROcNaEeS3R6PXxQ7txw" name="isMultipleConstraintProperty">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_dm_ROsNaEeS3R6PXxQ7txw" name="stereotypeName" value="SysML::Constraints::ConstraintProperty"/>
+ </constraints>
+ </views>
+ <views xmi:id="_dm_RO8NaEeS3R6PXxQ7txw" name="SingleOptional" sections="_dm5xpcNaEeS3R6PXxQ7txw" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_dm_RPMNaEeS3R6PXxQ7txw" name="isSingleOptional">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_dm_RPcNaEeS3R6PXxQ7txw" name="stereotypeName" value="SysML::Activities::Optional"/>
+ </constraints>
+ </views>
+ <views xmi:id="_dm_RPsNaEeS3R6PXxQ7txw" elementMultiplicity="-1" name="MultipleOptional" sections="_dm5xpsNaEeS3R6PXxQ7txw" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_dm_RP8NaEeS3R6PXxQ7txw" name="isMultipleOptional">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_dm_RQMNaEeS3R6PXxQ7txw" name="stereotypeName" value="SysML::Activities::Optional"/>
+ </constraints>
+ </views>
+ <views xmi:id="_dm_RQcNaEeS3R6PXxQ7txw" name="SingleRate" sections="_dm5xp8NaEeS3R6PXxQ7txw" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_dm_RQsNaEeS3R6PXxQ7txw" name="isSingleRate">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_dm_4QMNaEeS3R6PXxQ7txw" name="stereotypeName" value="SysML::Activities::Rate"/>
+ </constraints>
+ </views>
+ <views xmi:id="_dm_4QcNaEeS3R6PXxQ7txw" elementMultiplicity="-1" name="MultipleRate" sections="_dm5xqMNaEeS3R6PXxQ7txw" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_dm_4QsNaEeS3R6PXxQ7txw" name="isMultipleRate">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_dm_4Q8NaEeS3R6PXxQ7txw" name="stereotypeName" value="SysML::Activities::Rate"/>
+ </constraints>
+ </views>
+ <views xmi:id="_dm_4RMNaEeS3R6PXxQ7txw" name="SingleProbability" sections="_dm5xqcNaEeS3R6PXxQ7txw" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_dm_4RcNaEeS3R6PXxQ7txw" name="isSingleProbability">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_dm_4RsNaEeS3R6PXxQ7txw" name="stereotypeName" value="SysML::Activities::Probability"/>
+ </constraints>
+ </views>
+ <views xmi:id="_dm_4R8NaEeS3R6PXxQ7txw" elementMultiplicity="-1" name="MultipleProbability" sections="_dm5xqsNaEeS3R6PXxQ7txw" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_dm_4SMNaEeS3R6PXxQ7txw" name="isMultipleProbability">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_dm_4ScNaEeS3R6PXxQ7txw" name="stereotypeName" value="SysML::Activities::Probability"/>
+ </constraints>
+ </views>
+ <views xmi:id="_dm_4SsNaEeS3R6PXxQ7txw" name="SingleContinuous" sections="_dm6YsMNaEeS3R6PXxQ7txw" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_dm_4S8NaEeS3R6PXxQ7txw" name="isSingleContinuous">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_dm_4TMNaEeS3R6PXxQ7txw" name="stereotypeName" value="SysML::Activities::Continuous"/>
+ </constraints>
+ </views>
+ <views xmi:id="_dm_4TcNaEeS3R6PXxQ7txw" elementMultiplicity="-1" name="MultipleContinuous" sections="_dm6YscNaEeS3R6PXxQ7txw" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_dm_4TsNaEeS3R6PXxQ7txw" name="isMultipleContinuous">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_dm_4T8NaEeS3R6PXxQ7txw" name="stereotypeName" value="SysML::Activities::Continuous"/>
+ </constraints>
+ </views>
+ <views xmi:id="_dm_4UMNaEeS3R6PXxQ7txw" name="SingleDiscrete" sections="_dm6YssNaEeS3R6PXxQ7txw" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_dm_4UcNaEeS3R6PXxQ7txw" name="isSingleDiscrete">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_dnAfUMNaEeS3R6PXxQ7txw" name="stereotypeName" value="SysML::Activities::Discrete"/>
+ </constraints>
+ </views>
+ <views xmi:id="_dnAfUcNaEeS3R6PXxQ7txw" elementMultiplicity="-1" name="MultipleDiscrete" sections="_dm6Ys8NaEeS3R6PXxQ7txw" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_dnAfUsNaEeS3R6PXxQ7txw" name="isMultipleDiscrete">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_dnAfU8NaEeS3R6PXxQ7txw" name="stereotypeName" value="SysML::Activities::Discrete"/>
+ </constraints>
+ </views>
+ <views xmi:id="_dnAfVMNaEeS3R6PXxQ7txw" name="SingleControlOperator" sections="_dm6YtMNaEeS3R6PXxQ7txw" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_dnAfVcNaEeS3R6PXxQ7txw" name="isSingleControlOperator">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_dnAfVsNaEeS3R6PXxQ7txw" name="stereotypeName" value="SysML::Activities::ControlOperator"/>
+ </constraints>
+ </views>
+ <views xmi:id="_dnAfV8NaEeS3R6PXxQ7txw" elementMultiplicity="-1" name="MultipleControlOperator" sections="_dm6YtcNaEeS3R6PXxQ7txw" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_dnAfWMNaEeS3R6PXxQ7txw" name="isMultipleControlOperator">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_dnAfWcNaEeS3R6PXxQ7txw" name="stereotypeName" value="SysML::Activities::ControlOperator"/>
+ </constraints>
+ </views>
+ <views xmi:id="_dnAfWsNaEeS3R6PXxQ7txw" name="SingleNoBuffer" sections="_dm6YtsNaEeS3R6PXxQ7txw" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_dnAfW8NaEeS3R6PXxQ7txw" name="isSingleNoBuffer">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_dnAfXMNaEeS3R6PXxQ7txw" name="stereotypeName" value="SysML::Activities::NoBuffer"/>
+ </constraints>
+ </views>
+ <views xmi:id="_dnAfXcNaEeS3R6PXxQ7txw" elementMultiplicity="-1" name="MultipleNoBuffer" sections="_dm6Yt8NaEeS3R6PXxQ7txw" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_dnAfXsNaEeS3R6PXxQ7txw" name="isMultipleNoBuffer">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_dnAfX8NaEeS3R6PXxQ7txw" name="stereotypeName" value="SysML::Activities::NoBuffer"/>
+ </constraints>
+ </views>
+ <views xmi:id="_dnBGYMNaEeS3R6PXxQ7txw" name="SingleOverwrite" sections="_dm6YuMNaEeS3R6PXxQ7txw" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_dnBGYcNaEeS3R6PXxQ7txw" name="isSingleOverwrite">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_dnBGYsNaEeS3R6PXxQ7txw" name="stereotypeName" value="SysML::Activities::Overwrite"/>
+ </constraints>
+ </views>
+ <views xmi:id="_dnBGY8NaEeS3R6PXxQ7txw" elementMultiplicity="-1" name="MultipleOverwrite" sections="_dm6_wMNaEeS3R6PXxQ7txw" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_dnBGZMNaEeS3R6PXxQ7txw" name="isMultipleOverwrite">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_dnBGZcNaEeS3R6PXxQ7txw" name="stereotypeName" value="SysML::Activities::Overwrite"/>
+ </constraints>
+ </views>
+ <views xmi:id="_dnBGZsNaEeS3R6PXxQ7txw" name="SingleAllocate" sections="_dm6_wcNaEeS3R6PXxQ7txw" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_dnBGZ8NaEeS3R6PXxQ7txw" name="isSingleAllocate">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_dnBGaMNaEeS3R6PXxQ7txw" name="stereotypeName" value="SysML::Allocations::Allocate"/>
+ </constraints>
+ </views>
+ <views xmi:id="_dnBGacNaEeS3R6PXxQ7txw" elementMultiplicity="-1" name="MultipleAllocate" sections="_dm6_wsNaEeS3R6PXxQ7txw" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_dnBGasNaEeS3R6PXxQ7txw" name="isMultipleAllocate">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_dnBGa8NaEeS3R6PXxQ7txw" name="stereotypeName" value="SysML::Allocations::Allocate"/>
+ </constraints>
+ </views>
+ <views xmi:id="_dnBGbMNaEeS3R6PXxQ7txw" name="SingleAllocated" sections="_dm6_w8NaEeS3R6PXxQ7txw" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_dnBGbcNaEeS3R6PXxQ7txw" name="isSingleAllocated">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_dnBGbsNaEeS3R6PXxQ7txw" name="stereotypeName" value="SysML::Allocations::Allocated"/>
+ </constraints>
+ </views>
+ <views xmi:id="_dnBGb8NaEeS3R6PXxQ7txw" elementMultiplicity="-1" name="MultipleAllocated" sections="_dm6_xMNaEeS3R6PXxQ7txw" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_dnBtcMNaEeS3R6PXxQ7txw" name="isMultipleAllocated">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_dnBtccNaEeS3R6PXxQ7txw" name="stereotypeName" value="SysML::Allocations::Allocated"/>
+ </constraints>
+ </views>
+ <views xmi:id="_dnBtcsNaEeS3R6PXxQ7txw" name="SingleAllocateActivityPartition" sections="_dm6_xcNaEeS3R6PXxQ7txw" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_dnBtc8NaEeS3R6PXxQ7txw" name="isSingleAllocateActivityPartition">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_dnBtdMNaEeS3R6PXxQ7txw" name="stereotypeName" value="SysML::Allocations::AllocateActivityPartition"/>
+ </constraints>
+ </views>
+ <views xmi:id="_dnBtdcNaEeS3R6PXxQ7txw" elementMultiplicity="-1" name="MultipleAllocateActivityPartition" sections="_dm6_xsNaEeS3R6PXxQ7txw" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_dnBtdsNaEeS3R6PXxQ7txw" name="isMultipleAllocateActivityPartition">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_dnBtd8NaEeS3R6PXxQ7txw" name="stereotypeName" value="SysML::Allocations::AllocateActivityPartition"/>
+ </constraints>
+ </views>
+ <views xmi:id="_dnBteMNaEeS3R6PXxQ7txw" name="SingleTestCase" sections="_dm6_x8NaEeS3R6PXxQ7txw" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_dnBtecNaEeS3R6PXxQ7txw" name="isSingleTestCase">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_dnBtesNaEeS3R6PXxQ7txw" name="stereotypeName" value="SysML::Requirements::TestCase"/>
+ </constraints>
+ </views>
+ <views xmi:id="_dnBte8NaEeS3R6PXxQ7txw" elementMultiplicity="-1" name="MultipleTestCase" sections="_dm6_yMNaEeS3R6PXxQ7txw" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_dnBtfMNaEeS3R6PXxQ7txw" name="isMultipleTestCase">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_dnBtfcNaEeS3R6PXxQ7txw" name="stereotypeName" value="SysML::Requirements::TestCase"/>
+ </constraints>
+ </views>
+ <views xmi:id="_dnBtfsNaEeS3R6PXxQ7txw" name="SingleRequirement" sections="_dm6_ycNaEeS3R6PXxQ7txw" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_dnBtf8NaEeS3R6PXxQ7txw" name="isSingleRequirement">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_dnBtgMNaEeS3R6PXxQ7txw" name="stereotypeName" value="SysML::Requirements::Requirement"/>
+ </constraints>
+ </views>
+ <views xmi:id="_dnCUgMNaEeS3R6PXxQ7txw" elementMultiplicity="-1" name="MultipleRequirement" sections="_dm7m0MNaEeS3R6PXxQ7txw" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_dnCUgcNaEeS3R6PXxQ7txw" name="isMultipleRequirement">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_dnCUgsNaEeS3R6PXxQ7txw" name="stereotypeName" value="SysML::Requirements::Requirement"/>
+ </constraints>
+ </views>
+ <views xmi:id="_dnCUg8NaEeS3R6PXxQ7txw" name="SingleRequirementRelated" sections="_dm7m0cNaEeS3R6PXxQ7txw" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_dnCUhMNaEeS3R6PXxQ7txw" name="isSingleRequirementRelated">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_dnCUhcNaEeS3R6PXxQ7txw" name="stereotypeName" value="SysML::Requirements::RequirementRelated"/>
+ </constraints>
+ </views>
+ <views xmi:id="_dnCUhsNaEeS3R6PXxQ7txw" elementMultiplicity="-1" name="MultipleRequirementRelated" sections="_dm7m0sNaEeS3R6PXxQ7txw" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_dnCUh8NaEeS3R6PXxQ7txw" name="isMultipleRequirementRelated">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_dnCUiMNaEeS3R6PXxQ7txw" name="stereotypeName" value="SysML::Requirements::RequirementRelated"/>
+ </constraints>
+ </views>
+ <dataContexts xmi:id="_dnCUicNaEeS3R6PXxQ7txw" name="SysML" label="SysML">
+ <elements xsi:type="contexts:DataContextPackage" xmi:id="_dnCUisNaEeS3R6PXxQ7txw" name="Activities">
+ <elements xmi:id="_dnCUi8NaEeS3R6PXxQ7txw" name="Continuous" supertypes="_dnC7kMNaEeS3R6PXxQ7txw"/>
+ <elements xmi:id="_dnCUjMNaEeS3R6PXxQ7txw" name="Discrete" supertypes="_dnC7kMNaEeS3R6PXxQ7txw"/>
+ <elements xmi:id="_dnCUjcNaEeS3R6PXxQ7txw" name="NoBuffer">
+ <supertypes href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#//@dataContexts.0/@elements.116"/>
+ </elements>
+ <elements xmi:id="_dnCUjsNaEeS3R6PXxQ7txw" name="Overwrite">
+ <supertypes href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#//@dataContexts.0/@elements.116"/>
+ </elements>
+ <elements xmi:id="_dnCUj8NaEeS3R6PXxQ7txw" name="Probability">
+ <properties xmi:id="_dnCUkMNaEeS3R6PXxQ7txw" name="probability" type="Reference"/>
+ <supertypes href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#//@dataContexts.0/@elements.112"/>
+ <supertypes href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#//@dataContexts.0/@elements.72"/>
+ </elements>
+ <elements xmi:id="_dnC7kMNaEeS3R6PXxQ7txw" name="Rate">
+ <properties xmi:id="_dnC7kcNaEeS3R6PXxQ7txw" name="rate" type="Reference"/>
+ <supertypes href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#//@dataContexts.0/@elements.112"/>
+ <supertypes href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#//@dataContexts.0/@elements.31"/>
+ </elements>
+ <elements xmi:id="_dnC7ksNaEeS3R6PXxQ7txw" name="ControlOperator">
+ <supertypes href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#//@dataContexts.0/@elements.42"/>
+ <supertypes href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#//@dataContexts.0/@elements.44"/>
+ </elements>
+ <elements xmi:id="_dnC7k8NaEeS3R6PXxQ7txw" name="Optional">
+ <supertypes href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#//@dataContexts.0/@elements.31"/>
+ </elements>
+ </elements>
+ <elements xsi:type="contexts:DataContextPackage" xmi:id="_dnC7lMNaEeS3R6PXxQ7txw" name="PortAndFlows">
+ <elements xmi:id="_dnC7lcNaEeS3R6PXxQ7txw" name="FlowSpecification">
+ <supertypes href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#//@dataContexts.0/@elements.48"/>
+ </elements>
+ <elements xmi:id="_dnC7lsNaEeS3R6PXxQ7txw" name="FlowProperty">
+ <properties xmi:id="_dnC7l8NaEeS3R6PXxQ7txw" name="direction" type="Enumeration"/>
+ <supertypes href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#//@dataContexts.0/@elements.35"/>
+ </elements>
+ <elements xmi:id="_dnC7mMNaEeS3R6PXxQ7txw" name="FlowPort">
+ <properties xmi:id="_dnC7mcNaEeS3R6PXxQ7txw" name="isAtomic" type="Boolean"/>
+ <properties xmi:id="_dnC7msNaEeS3R6PXxQ7txw" name="direction" type="Enumeration"/>
+ <properties xmi:id="_dnC7m8NaEeS3R6PXxQ7txw" name="isConjugated" type="Boolean"/>
+ <supertypes href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#//@dataContexts.0/@elements.58"/>
+ </elements>
+ <elements xmi:id="_dnC7nMNaEeS3R6PXxQ7txw" name="ItemFlow">
+ <properties xmi:id="_dnC7ncNaEeS3R6PXxQ7txw" name="itemProperty" type="Reference"/>
+ <supertypes href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#//@dataContexts.0/@elements.224"/>
+ </elements>
+ </elements>
+ <elements xsi:type="contexts:DataContextPackage" xmi:id="_dnC7nsNaEeS3R6PXxQ7txw" name="Blocks">
+ <elements xmi:id="_dnC7n8NaEeS3R6PXxQ7txw" name="Dimension">
+ <supertypes href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#//@dataContexts.0/@elements.92"/>
+ </elements>
+ <elements xmi:id="_dnC7oMNaEeS3R6PXxQ7txw" name="Unit">
+ <properties xmi:id="_dnC7ocNaEeS3R6PXxQ7txw" name="dimension" type="Reference"/>
+ <supertypes href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#//@dataContexts.0/@elements.92"/>
+ </elements>
+ <elements xmi:id="_dnC7osNaEeS3R6PXxQ7txw" name="DistributedProperty">
+ <supertypes href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#//@dataContexts.0/@elements.35"/>
+ </elements>
+ <elements xmi:id="_dnDioMNaEeS3R6PXxQ7txw" name="Block">
+ <properties xmi:id="_dnDiocNaEeS3R6PXxQ7txw" name="isEncapsulated" type="Boolean"/>
+ <supertypes href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#//@dataContexts.0/@elements.45"/>
+ </elements>
+ <elements xmi:id="_dnDiosNaEeS3R6PXxQ7txw" name="ValueType">
+ <properties xmi:id="_dnDio8NaEeS3R6PXxQ7txw" name="dimension" type="Reference"/>
+ <properties xmi:id="_dnDipMNaEeS3R6PXxQ7txw" name="unit" type="Reference"/>
+ <supertypes href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#//@dataContexts.0/@elements.73"/>
+ </elements>
+ <elements xmi:id="_dnDipcNaEeS3R6PXxQ7txw" name="ParticipantProperty">
+ <properties xmi:id="_dnDipsNaEeS3R6PXxQ7txw" name="end" type="Reference"/>
+ <supertypes href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#//@dataContexts.0/@elements.35"/>
+ </elements>
+ <elements xmi:id="_dnDip8NaEeS3R6PXxQ7txw" name="NestedConnectorEnd">
+ <properties xmi:id="_dnDiqMNaEeS3R6PXxQ7txw" name="propertyPath" type="Reference"/>
+ <supertypes href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#//@dataContexts.0/@elements.34"/>
+ </elements>
+ <elements xmi:id="_dnDiqcNaEeS3R6PXxQ7txw" name="PropertySpecificType">
+ <supertypes href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#//@dataContexts.0/@elements.16"/>
+ </elements>
+ <elements xmi:id="_dnDiqsNaEeS3R6PXxQ7txw" name="ConnectorProperty">
+ <properties xmi:id="_dnDiq8NaEeS3R6PXxQ7txw" name="connector" type="Reference"/>
+ <supertypes href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#//@dataContexts.0/@elements.35"/>
+ </elements>
+ <elements xmi:id="_dnDirMNaEeS3R6PXxQ7txw" name="BindingConnector">
+ <supertypes href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#//@dataContexts.0/@elements.65"/>
+ </elements>
+ </elements>
+ <elements xsi:type="contexts:DataContextPackage" xmi:id="_dnDircNaEeS3R6PXxQ7txw" name="Requirements">
+ <elements xmi:id="_dnDirsNaEeS3R6PXxQ7txw" name="Requirement">
+ <properties xmi:id="_dnDir8NaEeS3R6PXxQ7txw" name="satisfiedBy" type="Reference"/>
+ <properties xmi:id="_dnDisMNaEeS3R6PXxQ7txw" name="verifiedBy" type="Reference"/>
+ <properties xmi:id="_dnDiscNaEeS3R6PXxQ7txw" name="tracedTo" type="Reference"/>
+ <properties xmi:id="_dnDissNaEeS3R6PXxQ7txw" name="derivedFrom" type="Reference"/>
+ <properties xmi:id="_dnDis8NaEeS3R6PXxQ7txw" name="refinedBy" type="Reference"/>
+ <properties xmi:id="_dnDitMNaEeS3R6PXxQ7txw" name="text"/>
+ <properties xmi:id="_dnDitcNaEeS3R6PXxQ7txw" name="master" type="Reference"/>
+ <properties xmi:id="_dnDitsNaEeS3R6PXxQ7txw" name="derived" type="Reference"/>
+ <properties xmi:id="_dnEJsMNaEeS3R6PXxQ7txw" name="id"/>
+ <supertypes href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#//@dataContexts.0/@elements.45"/>
+ </elements>
+ <elements xmi:id="_dnEJscNaEeS3R6PXxQ7txw" name="RequirementRelated">
+ <properties xmi:id="_dnEJssNaEeS3R6PXxQ7txw" name="refines" type="Reference"/>
+ <properties xmi:id="_dnEJs8NaEeS3R6PXxQ7txw" name="verifies" type="Reference"/>
+ <properties xmi:id="_dnEJtMNaEeS3R6PXxQ7txw" name="satisfies" type="Reference"/>
+ <properties xmi:id="_dnEJtcNaEeS3R6PXxQ7txw" name="tracedFrom" type="Reference"/>
+ <supertypes href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#//@dataContexts.0/@elements.4"/>
+ </elements>
+ <elements xmi:id="_dnEJtsNaEeS3R6PXxQ7txw" name="TestCase">
+ <properties xmi:id="_dnEJt8NaEeS3R6PXxQ7txw" name="verifies" type="Reference"/>
+ <supertypes href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#//@dataContexts.0/@elements.42"/>
+ <supertypes href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#//@dataContexts.0/@elements.44"/>
+ </elements>
+ </elements>
+ <elements xsi:type="contexts:DataContextPackage" xmi:id="_dnEJuMNaEeS3R6PXxQ7txw" name="ModelElements">
+ <elements xmi:id="_dnEJucNaEeS3R6PXxQ7txw" name="View">
+ <properties xmi:id="_dnEJusNaEeS3R6PXxQ7txw" name="viewPoint" type="Reference"/>
+ <supertypes href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#//@dataContexts.0/@elements.2"/>
+ </elements>
+ <elements xmi:id="_dnEJu8NaEeS3R6PXxQ7txw" name="ViewPoint">
+ <properties xmi:id="_dnEJvMNaEeS3R6PXxQ7txw" name="concerns"/>
+ <properties xmi:id="_dnEJvcNaEeS3R6PXxQ7txw" name="languages"/>
+ <properties xmi:id="_dnEJvsNaEeS3R6PXxQ7txw" name="methods"/>
+ <properties xmi:id="_dnEJv8NaEeS3R6PXxQ7txw" name="purpose"/>
+ <properties xmi:id="_dnEJwMNaEeS3R6PXxQ7txw" name="stakeHolders"/>
+ <supertypes href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#//@dataContexts.0/@elements.45"/>
+ </elements>
+ <elements xmi:id="_dnEJwcNaEeS3R6PXxQ7txw" name="Conform">
+ <supertypes href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#//@dataContexts.0/@elements.5"/>
+ </elements>
+ <elements xmi:id="_dnEJwsNaEeS3R6PXxQ7txw" name="Problem">
+ <supertypes href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#//@dataContexts.0/@elements.0"/>
+ </elements>
+ <elements xmi:id="_dnEJw8NaEeS3R6PXxQ7txw" name="Rationale">
+ <supertypes href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#//@dataContexts.0/@elements.0"/>
+ </elements>
+ </elements>
+ <elements xsi:type="contexts:DataContextPackage" xmi:id="_dnEJxMNaEeS3R6PXxQ7txw" name="Interactions"/>
+ <elements xsi:type="contexts:DataContextPackage" xmi:id="_dnEJxcNaEeS3R6PXxQ7txw" name="UseCases"/>
+ <elements xsi:type="contexts:DataContextPackage" xmi:id="_dnEJxsNaEeS3R6PXxQ7txw" name="Constraints">
+ <elements xmi:id="_dnEwwMNaEeS3R6PXxQ7txw" name="ConstraintBlock" supertypes="_dnDioMNaEeS3R6PXxQ7txw"/>
+ <elements xmi:id="_dnEwwcNaEeS3R6PXxQ7txw" name="ConstraintProperty">
+ <supertypes href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#//@dataContexts.0/@elements.35"/>
+ </elements>
+ </elements>
+ <elements xsi:type="contexts:DataContextPackage" xmi:id="_dnEwwsNaEeS3R6PXxQ7txw" name="Allocations">
+ <elements xmi:id="_dnEww8NaEeS3R6PXxQ7txw" name="Allocate">
+ <supertypes href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#//@dataContexts.0/@elements.29"/>
+ </elements>
+ <elements xmi:id="_dnEwxMNaEeS3R6PXxQ7txw" name="Allocated">
+ <properties xmi:id="_dnEwxcNaEeS3R6PXxQ7txw" name="allocatedFrom" type="Reference"/>
+ <properties xmi:id="_dnEwxsNaEeS3R6PXxQ7txw" name="allocatedTo" type="Reference"/>
+ <supertypes href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#//@dataContexts.0/@elements.4"/>
+ </elements>
+ <elements xmi:id="_dnEwx8NaEeS3R6PXxQ7txw" name="AllocateActivityPartition">
+ <supertypes href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#//@dataContexts.0/@elements.113"/>
+ </elements>
+ </elements>
+ <elements xsi:type="contexts:DataContextPackage" xmi:id="_dnEwyMNaEeS3R6PXxQ7txw" name="StateMachines"/>
+ <modelElementFactory href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@modelElementFactories.2"/>
+ </dataContexts>
+</contexts:Context>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleAllocate.xwt b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleAllocate.xwt
new file mode 100755
index 0000000..b0b8b3a
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleAllocate.xwt
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns="http://www.eclipse.org/xwt/presentation"
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
+ xmlns:x="http://www.eclipse.org/xwt" xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"
+ xmlns:j="clr-namespace:java.lang">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+</Composite>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleAllocateActivityPartition.xwt b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleAllocateActivityPartition.xwt
new file mode 100755
index 0000000..f88853e
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleAllocateActivityPartition.xwt
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"
+ xmlns="http://www.eclipse.org/xwt/presentation" xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
+ xmlns:j="clr-namespace:java.lang" xmlns:x="http://www.eclipse.org/xwt">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:ActivityPartition:isDimension"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:ActivityPartition:isExternal"></ppe:BooleanRadio>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+</Composite>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleAllocated.xwt b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleAllocated.xwt
new file mode 100755
index 0000000..a1e3018
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleAllocated.xwt
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
+ xmlns="http://www.eclipse.org/xwt/presentation" xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"
+ xmlns:j="clr-namespace:java.lang" xmlns:x="http://www.eclipse.org/xwt">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+</Composite>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleBindingConnector.xwt b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleBindingConnector.xwt
new file mode 100755
index 0000000..e3d3ecf
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleBindingConnector.xwt
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"
+ xmlns="http://www.eclipse.org/xwt/presentation" xmlns:x="http://www.eclipse.org/xwt"
+ xmlns:j="clr-namespace:java.lang" xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:RedefinableElement:isLeaf"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Feature:isStatic"></ppe:BooleanRadio>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:Connector:kind"></ppe:EnumCombo>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+</Composite>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleBlock.xwt b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleBlock.xwt
new file mode 100755
index 0000000..dbf9551
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleBlock.xwt
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
+ xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" xmlns="http://www.eclipse.org/xwt/presentation"
+ xmlns:x="http://www.eclipse.org/xwt" xmlns:j="clr-namespace:java.lang">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Classifier:isAbstract"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Class:isActive"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:RedefinableElement:isLeaf"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="SysML:Blocks:Block:isEncapsulated"></ppe:BooleanRadio>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+</Composite>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleConform.xwt b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleConform.xwt
new file mode 100755
index 0000000..3e74168
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleConform.xwt
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:j="clr-namespace:java.lang"
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
+ xmlns="http://www.eclipse.org/xwt/presentation" xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"
+ xmlns:x="http://www.eclipse.org/xwt">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+</Composite>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleConnectorProperty.xwt b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleConnectorProperty.xwt
new file mode 100755
index 0000000..918eca5
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleConnectorProperty.xwt
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns="http://www.eclipse.org/xwt/presentation"
+ xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
+ xmlns:x="http://www.eclipse.org/xwt" xmlns:j="clr-namespace:java.lang">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Property:isDerived"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Property:isDerivedUnion"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:RedefinableElement:isLeaf"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isOrdered"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:StructuralFeature:isReadOnly"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Feature:isStatic"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isUnique"></ppe:BooleanRadio>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:Property:aggregation"></ppe:EnumCombo>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+</Composite>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleConstraintBlock.xwt b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleConstraintBlock.xwt
new file mode 100755
index 0000000..559fcc4
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleConstraintBlock.xwt
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
+ xmlns:j="clr-namespace:java.lang" xmlns="http://www.eclipse.org/xwt/presentation"
+ xmlns:x="http://www.eclipse.org/xwt">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Classifier:isAbstract"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Class:isActive"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:RedefinableElement:isLeaf"></ppe:BooleanRadio>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+</Composite>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleConstraintProperty.xwt b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleConstraintProperty.xwt
new file mode 100755
index 0000000..515f8ae
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleConstraintProperty.xwt
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns="http://www.eclipse.org/xwt/presentation"
+ xmlns:j="clr-namespace:java.lang" xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
+ xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"
+ xmlns:x="http://www.eclipse.org/xwt">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Property:isDerived"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Property:isDerivedUnion"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:RedefinableElement:isLeaf"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isOrdered"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:StructuralFeature:isReadOnly"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Feature:isStatic"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isUnique"></ppe:BooleanRadio>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:Property:aggregation"></ppe:EnumCombo>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+</Composite>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleContinuous.xwt b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleContinuous.xwt
new file mode 100755
index 0000000..4cdb465
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleContinuous.xwt
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:x="http://www.eclipse.org/xwt"
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
+ xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" xmlns="http://www.eclipse.org/xwt/presentation"
+ xmlns:j="clr-namespace:java.lang">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Parameter:isException"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:RedefinableElement:isLeaf"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isOrdered"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Parameter:isStream"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isUnique"></ppe:BooleanRadio>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:Parameter:direction"></ppe:EnumCombo>
+ <ppe:EnumCombo input="{Binding}" property="UML:Parameter:effect"></ppe:EnumCombo>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+</Composite>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleControlOperator.xwt b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleControlOperator.xwt
new file mode 100755
index 0000000..349c924
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleControlOperator.xwt
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
+ xmlns:j="clr-namespace:java.lang" xmlns="http://www.eclipse.org/xwt/presentation"
+ xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"
+ xmlns:x="http://www.eclipse.org/xwt">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Classifier:isAbstract"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Class:isActive"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:RedefinableElement:isLeaf"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Operation:isQuery"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Behavior:isReentrant"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Feature:isStatic"></ppe:BooleanRadio>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:BehavioralFeature:concurrency"></ppe:EnumCombo>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+</Composite>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleDimension.xwt b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleDimension.xwt
new file mode 100755
index 0000000..4bb903e
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleDimension.xwt
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:x="http://www.eclipse.org/xwt"
+ xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" xmlns="http://www.eclipse.org/xwt/presentation"
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
+ xmlns:j="clr-namespace:java.lang">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+</Composite>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleDiscrete.xwt b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleDiscrete.xwt
new file mode 100755
index 0000000..684c060
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleDiscrete.xwt
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
+ xmlns="http://www.eclipse.org/xwt/presentation" xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"
+ xmlns:j="clr-namespace:java.lang" xmlns:x="http://www.eclipse.org/xwt">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Parameter:isException"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:RedefinableElement:isLeaf"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isOrdered"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Parameter:isStream"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isUnique"></ppe:BooleanRadio>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:Parameter:direction"></ppe:EnumCombo>
+ <ppe:EnumCombo input="{Binding}" property="UML:Parameter:effect"></ppe:EnumCombo>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+</Composite>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleDistributedProperty.xwt b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleDistributedProperty.xwt
new file mode 100755
index 0000000..3c73aec
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleDistributedProperty.xwt
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
+ xmlns:j="clr-namespace:java.lang" xmlns:x="http://www.eclipse.org/xwt"
+ xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" xmlns="http://www.eclipse.org/xwt/presentation">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Property:isDerived"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Property:isDerivedUnion"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:RedefinableElement:isLeaf"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isOrdered"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:StructuralFeature:isReadOnly"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Feature:isStatic"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isUnique"></ppe:BooleanRadio>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:Property:aggregation"></ppe:EnumCombo>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+</Composite>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleFlowPort.xwt b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleFlowPort.xwt
new file mode 100755
index 0000000..d7dd5cb
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleFlowPort.xwt
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:j="clr-namespace:java.lang"
+ xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"
+ xmlns:x="http://www.eclipse.org/xwt" xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
+ xmlns="http://www.eclipse.org/xwt/presentation">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Port:isBehavior"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Property:isDerived"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Property:isDerivedUnion"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:RedefinableElement:isLeaf"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isOrdered"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:StructuralFeature:isReadOnly"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Port:isService"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Feature:isStatic"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isUnique"></ppe:BooleanRadio>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:Property:aggregation"></ppe:EnumCombo>
+ <ppe:EnumCombo input="{Binding}"
+ property="SysML:PortAndFlows:FlowPort:direction"></ppe:EnumCombo>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+</Composite>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleFlowProperty.xwt b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleFlowProperty.xwt
new file mode 100755
index 0000000..ea2c9fd
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleFlowProperty.xwt
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"
+ xmlns:x="http://www.eclipse.org/xwt" xmlns:j="clr-namespace:java.lang"
+ xmlns="http://www.eclipse.org/xwt/presentation" xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Property:isDerived"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Property:isDerivedUnion"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:RedefinableElement:isLeaf"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isOrdered"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:StructuralFeature:isReadOnly"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Feature:isStatic"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isUnique"></ppe:BooleanRadio>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:Property:aggregation"></ppe:EnumCombo>
+ <ppe:EnumCombo input="{Binding}"
+ property="SysML:PortAndFlows:FlowProperty:direction"></ppe:EnumCombo>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+</Composite>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleFlowSpecification.xwt b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleFlowSpecification.xwt
new file mode 100755
index 0000000..9946121
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleFlowSpecification.xwt
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:j="clr-namespace:java.lang" xmlns="http://www.eclipse.org/xwt/presentation"
+ xmlns:x="http://www.eclipse.org/xwt" xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
+ xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Classifier:isAbstract"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:RedefinableElement:isLeaf"></ppe:BooleanRadio>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+</Composite>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleItemFlow.xwt b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleItemFlow.xwt
new file mode 100755
index 0000000..e8afd32
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleItemFlow.xwt
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
+ xmlns:j="clr-namespace:java.lang" xmlns:x="http://www.eclipse.org/xwt"
+ xmlns="http://www.eclipse.org/xwt/presentation" xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+</Composite>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleNestedConnectorEnd.xwt b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleNestedConnectorEnd.xwt
new file mode 100755
index 0000000..0b18d0e
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleNestedConnectorEnd.xwt
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns="http://www.eclipse.org/xwt/presentation"
+ xmlns:x="http://www.eclipse.org/xwt" xmlns:j="clr-namespace:java.lang"
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
+ xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isOrdered"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isUnique"></ppe:BooleanRadio>
+ </Composite>
+</Composite>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleNoBuffer.xwt b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleNoBuffer.xwt
new file mode 100755
index 0000000..af627cb
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleNoBuffer.xwt
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
+ xmlns:j="clr-namespace:java.lang" xmlns:x="http://www.eclipse.org/xwt"
+ xmlns="http://www.eclipse.org/xwt/presentation">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:ObjectNode:isControlType"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:RedefinableElement:isLeaf"></ppe:BooleanRadio>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:ObjectNode:ordering"></ppe:EnumCombo>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+</Composite>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleOptional.xwt b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleOptional.xwt
new file mode 100755
index 0000000..23c53e7
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleOptional.xwt
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns="http://www.eclipse.org/xwt/presentation"
+ xmlns:j="clr-namespace:java.lang" xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"
+ xmlns:x="http://www.eclipse.org/xwt" xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Parameter:isException"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isOrdered"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Parameter:isStream"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isUnique"></ppe:BooleanRadio>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:Parameter:direction"></ppe:EnumCombo>
+ <ppe:EnumCombo input="{Binding}" property="UML:Parameter:effect"></ppe:EnumCombo>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+</Composite>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleOverwrite.xwt b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleOverwrite.xwt
new file mode 100755
index 0000000..0719424
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleOverwrite.xwt
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
+ xmlns:j="clr-namespace:java.lang" xmlns="http://www.eclipse.org/xwt/presentation"
+ xmlns:x="http://www.eclipse.org/xwt">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:ObjectNode:isControlType"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:RedefinableElement:isLeaf"></ppe:BooleanRadio>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:ObjectNode:ordering"></ppe:EnumCombo>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+</Composite>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleParticipantProperty.xwt b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleParticipantProperty.xwt
new file mode 100755
index 0000000..0babcc2
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleParticipantProperty.xwt
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"
+ xmlns="http://www.eclipse.org/xwt/presentation" xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
+ xmlns:j="clr-namespace:java.lang" xmlns:x="http://www.eclipse.org/xwt">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Property:isDerived"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Property:isDerivedUnion"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:RedefinableElement:isLeaf"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isOrdered"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:StructuralFeature:isReadOnly"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Feature:isStatic"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isUnique"></ppe:BooleanRadio>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:Property:aggregation"></ppe:EnumCombo>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+</Composite>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleProbability.xwt b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleProbability.xwt
new file mode 100755
index 0000000..b5af577
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleProbability.xwt
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
+ xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"
+ xmlns:j="clr-namespace:java.lang" xmlns="http://www.eclipse.org/xwt/presentation"
+ xmlns:x="http://www.eclipse.org/xwt">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:RedefinableElement:isLeaf"></ppe:BooleanRadio>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+</Composite>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultiplePropertySpecificType.xwt b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultiplePropertySpecificType.xwt
new file mode 100755
index 0000000..91bc870
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultiplePropertySpecificType.xwt
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:x="http://www.eclipse.org/xwt"
+ xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"
+ xmlns:j="clr-namespace:java.lang" xmlns="http://www.eclipse.org/xwt/presentation"
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Classifier:isAbstract"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:RedefinableElement:isLeaf"></ppe:BooleanRadio>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+</Composite>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleRate.xwt b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleRate.xwt
new file mode 100755
index 0000000..6089ce6
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleRate.xwt
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns="http://www.eclipse.org/xwt/presentation"
+ xmlns:j="clr-namespace:java.lang" xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
+ xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"
+ xmlns:x="http://www.eclipse.org/xwt">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Parameter:isException"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:RedefinableElement:isLeaf"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isOrdered"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Parameter:isStream"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isUnique"></ppe:BooleanRadio>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:Parameter:direction"></ppe:EnumCombo>
+ <ppe:EnumCombo input="{Binding}" property="UML:Parameter:effect"></ppe:EnumCombo>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+</Composite>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleRequirement.xwt b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleRequirement.xwt
new file mode 100755
index 0000000..bbbbc16
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleRequirement.xwt
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:j="clr-namespace:java.lang"
+ xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
+ xmlns:x="http://www.eclipse.org/xwt" xmlns="http://www.eclipse.org/xwt/presentation">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Classifier:isAbstract"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:RedefinableElement:isLeaf"></ppe:BooleanRadio>
+ </Composite>
+</Composite>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleRequirementRelated.xwt b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleRequirementRelated.xwt
new file mode 100755
index 0000000..6ddfb23
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleRequirementRelated.xwt
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns="http://www.eclipse.org/xwt/presentation"
+ xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"
+ xmlns:x="http://www.eclipse.org/xwt" xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
+ xmlns:j="clr-namespace:java.lang">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+</Composite>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleTestCase.xwt b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleTestCase.xwt
new file mode 100755
index 0000000..d649c24
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleTestCase.xwt
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:j="clr-namespace:java.lang"
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
+ xmlns:x="http://www.eclipse.org/xwt" xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"
+ xmlns="http://www.eclipse.org/xwt/presentation">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Classifier:isAbstract"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Class:isActive"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:RedefinableElement:isLeaf"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Operation:isQuery"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Behavior:isReentrant"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Feature:isStatic"></ppe:BooleanRadio>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:BehavioralFeature:concurrency"></ppe:EnumCombo>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+</Composite>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleUnit.xwt b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleUnit.xwt
new file mode 100755
index 0000000..6e18862
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleUnit.xwt
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns="http://www.eclipse.org/xwt/presentation"
+ xmlns:x="http://www.eclipse.org/xwt" xmlns:j="clr-namespace:java.lang"
+ xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+</Composite>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleValueType.xwt b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleValueType.xwt
new file mode 100755
index 0000000..98d15b4
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleValueType.xwt
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:j="clr-namespace:java.lang" xmlns:x="http://www.eclipse.org/xwt"
+ xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" xmlns="http://www.eclipse.org/xwt/presentation"
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Classifier:isAbstract"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:RedefinableElement:isLeaf"></ppe:BooleanRadio>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+</Composite>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleView.xwt b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleView.xwt
new file mode 100755
index 0000000..2cd8576
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleView.xwt
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"
+ xmlns="http://www.eclipse.org/xwt/presentation" xmlns:x="http://www.eclipse.org/xwt"
+ xmlns:j="clr-namespace:java.lang" xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+</Composite>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleViewPoint.xwt b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleViewPoint.xwt
new file mode 100755
index 0000000..b2e12a3
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/MultipleViewPoint.xwt
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
+ xmlns:x="http://www.eclipse.org/xwt" xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"
+ xmlns:j="clr-namespace:java.lang" xmlns="http://www.eclipse.org/xwt/presentation">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Classifier:isAbstract"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Class:isActive"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:RedefinableElement:isLeaf"></ppe:BooleanRadio>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+</Composite>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleAllocate.xwt b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleAllocate.xwt
new file mode 100755
index 0000000..2f15bb6
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleAllocate.xwt
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns="http://www.eclipse.org/xwt/presentation"
+ xmlns:x="http://www.eclipse.org/xwt" xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
+ xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"
+ xmlns:j="clr-namespace:java.lang">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:StringEditor input="{Binding}" property="UML:NamedElement:name"></ppe:StringEditor>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:MultiReference input="{Binding}" property="UML:Dependency:client"></ppe:MultiReference>
+ <ppe:MultiReference input="{Binding}" property="UML:Dependency:supplier"></ppe:MultiReference>
+ </Composite>
+</Composite>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleAllocateActivityPartition.xwt b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleAllocateActivityPartition.xwt
new file mode 100755
index 0000000..67fc19b
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleAllocateActivityPartition.xwt
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:x="http://www.eclipse.org/xwt" xmlns="http://www.eclipse.org/xwt/presentation"
+ xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
+ xmlns:j="clr-namespace:java.lang">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:StringEditor input="{Binding}" property="UML:NamedElement:name"></ppe:StringEditor>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:ActivityPartition:isDimension"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:ActivityPartition:isExternal"></ppe:BooleanRadio>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+</Composite>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleAllocated.xwt b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleAllocated.xwt
new file mode 100755
index 0000000..cf971d2
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleAllocated.xwt
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"
+ xmlns:x="http://www.eclipse.org/xwt" xmlns="http://www.eclipse.org/xwt/presentation"
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
+ xmlns:j="clr-namespace:java.lang">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:StringEditor input="{Binding}" property="UML:NamedElement:name"></ppe:StringEditor>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:MultiReference input="{Binding}"
+ property="SysML:Allocations:Allocated:allocatedFrom"></ppe:MultiReference>
+ <ppe:MultiReference input="{Binding}"
+ property="SysML:Allocations:Allocated:allocatedTo"></ppe:MultiReference>
+ </Composite>
+</Composite>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleBindingConnector.xwt b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleBindingConnector.xwt
new file mode 100755
index 0000000..925e301
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleBindingConnector.xwt
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
+ xmlns:x="http://www.eclipse.org/xwt" xmlns="http://www.eclipse.org/xwt/presentation"
+ xmlns:j="clr-namespace:java.lang" xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:StringEditor input="{Binding}" property="UML:NamedElement:name"></ppe:StringEditor>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:RedefinableElement:isLeaf"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Feature:isStatic"></ppe:BooleanRadio>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:Connector:kind"></ppe:EnumCombo>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+</Composite>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleBlock.xwt b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleBlock.xwt
new file mode 100755
index 0000000..95f57c2
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleBlock.xwt
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:x="http://www.eclipse.org/xwt"
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
+ xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"
+ xmlns:j="clr-namespace:java.lang" xmlns="http://www.eclipse.org/xwt/presentation">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:StringEditor input="{Binding}" property="UML:NamedElement:name"></ppe:StringEditor>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Classifier:isAbstract"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Class:isActive"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="SysML:Blocks:Block:isEncapsulated"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:RedefinableElement:isLeaf"></ppe:BooleanRadio>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+</Composite>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleConform.xwt b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleConform.xwt
new file mode 100755
index 0000000..5afd8d3
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleConform.xwt
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
+ xmlns="http://www.eclipse.org/xwt/presentation" xmlns:x="http://www.eclipse.org/xwt"
+ xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"
+ xmlns:j="clr-namespace:java.lang">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:StringEditor input="{Binding}" property="UML:NamedElement:name"></ppe:StringEditor>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:MultiReference input="{Binding}" property="UML:Dependency:client"></ppe:MultiReference>
+ <ppe:MultiReference input="{Binding}" property="UML:Dependency:supplier"></ppe:MultiReference>
+ </Composite>
+</Composite>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleConnectorProperty.xwt b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleConnectorProperty.xwt
new file mode 100755
index 0000000..551d8d6
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleConnectorProperty.xwt
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:j="clr-namespace:java.lang"
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
+ xmlns:x="http://www.eclipse.org/xwt" xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"
+ xmlns="http://www.eclipse.org/xwt/presentation">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:StringEditor input="{Binding}" property="UML:NamedElement:name"></ppe:StringEditor>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Property:isDerived"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Property:isDerivedUnion"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:RedefinableElement:isLeaf"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isOrdered"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:StructuralFeature:isReadOnly"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Feature:isStatic"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isUnique"></ppe:BooleanRadio>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:Property:aggregation"></ppe:EnumCombo>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:ReferenceDialog input="{Binding}"
+ property="SysML:Blocks:ConnectorProperty:connector"></ppe:ReferenceDialog>
+ </Composite>
+</Composite>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleConstraintBlock.xwt b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleConstraintBlock.xwt
new file mode 100755
index 0000000..93d9e8f
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleConstraintBlock.xwt
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:j="clr-namespace:java.lang"
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
+ xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" xmlns="http://www.eclipse.org/xwt/presentation"
+ xmlns:x="http://www.eclipse.org/xwt">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:StringEditor input="{Binding}" property="UML:NamedElement:name"></ppe:StringEditor>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Classifier:isAbstract"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Class:isActive"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="SysML:Blocks:Block:isEncapsulated"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:RedefinableElement:isLeaf"></ppe:BooleanRadio>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+</Composite>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleConstraintProperty.xwt b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleConstraintProperty.xwt
new file mode 100755
index 0000000..2f99f20
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleConstraintProperty.xwt
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns="http://www.eclipse.org/xwt/presentation"
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
+ xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"
+ xmlns:x="http://www.eclipse.org/xwt" xmlns:j="clr-namespace:java.lang">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:StringEditor input="{Binding}" property="UML:NamedElement:name"></ppe:StringEditor>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Property:isDerived"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Property:isDerivedUnion"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:RedefinableElement:isLeaf"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isOrdered"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:StructuralFeature:isReadOnly"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Feature:isStatic"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isUnique"></ppe:BooleanRadio>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:Property:aggregation"></ppe:EnumCombo>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+</Composite>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleContinuous.xwt b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleContinuous.xwt
new file mode 100755
index 0000000..b5226c6
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleContinuous.xwt
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
+ xmlns:j="clr-namespace:java.lang" xmlns:x="http://www.eclipse.org/xwt"
+ xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" xmlns="http://www.eclipse.org/xwt/presentation">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:StringEditor input="{Binding}" property="UML:NamedElement:name"></ppe:StringEditor>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Parameter:isException"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:RedefinableElement:isLeaf"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isOrdered"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Parameter:isStream"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isUnique"></ppe:BooleanRadio>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:Parameter:direction"></ppe:EnumCombo>
+ <ppe:EnumCombo input="{Binding}" property="UML:Parameter:effect"></ppe:EnumCombo>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:ReferenceDialog input="{Binding}"
+ property="SysML:Activities:Rate:rate"></ppe:ReferenceDialog>
+ </Composite>
+</Composite>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleControlOperator.xwt b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleControlOperator.xwt
new file mode 100755
index 0000000..7ca8ab4
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleControlOperator.xwt
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:x="http://www.eclipse.org/xwt"
+ xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
+ xmlns="http://www.eclipse.org/xwt/presentation" xmlns:j="clr-namespace:java.lang">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:StringEditor input="{Binding}" property="UML:NamedElement:name"></ppe:StringEditor>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Classifier:isAbstract"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Class:isActive"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:RedefinableElement:isLeaf"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Operation:isQuery"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Behavior:isReentrant"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Feature:isStatic"></ppe:BooleanRadio>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:BehavioralFeature:concurrency"></ppe:EnumCombo>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+</Composite>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleDimension.xwt b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleDimension.xwt
new file mode 100755
index 0000000..b65e8c3
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleDimension.xwt
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns="http://www.eclipse.org/xwt/presentation"
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
+ xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"
+ xmlns:j="clr-namespace:java.lang" xmlns:x="http://www.eclipse.org/xwt">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:StringEditor input="{Binding}" property="UML:NamedElement:name"></ppe:StringEditor>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+</Composite>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleDiscrete.xwt b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleDiscrete.xwt
new file mode 100755
index 0000000..318f8d5
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleDiscrete.xwt
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:j="clr-namespace:java.lang"
+ xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"
+ xmlns:x="http://www.eclipse.org/xwt" xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
+ xmlns="http://www.eclipse.org/xwt/presentation">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:StringEditor input="{Binding}" property="UML:NamedElement:name"></ppe:StringEditor>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Parameter:isException"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:RedefinableElement:isLeaf"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isOrdered"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Parameter:isStream"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isUnique"></ppe:BooleanRadio>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:Parameter:direction"></ppe:EnumCombo>
+ <ppe:EnumCombo input="{Binding}" property="UML:Parameter:effect"></ppe:EnumCombo>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:ReferenceDialog input="{Binding}"
+ property="SysML:Activities:Rate:rate"></ppe:ReferenceDialog>
+ </Composite>
+</Composite>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleDistributedProperty.xwt b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleDistributedProperty.xwt
new file mode 100755
index 0000000..fb925b3
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleDistributedProperty.xwt
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:x="http://www.eclipse.org/xwt"
+ xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"
+ xmlns:j="clr-namespace:java.lang" xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
+ xmlns="http://www.eclipse.org/xwt/presentation">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:StringEditor input="{Binding}" property="UML:NamedElement:name"></ppe:StringEditor>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Property:isDerived"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Property:isDerivedUnion"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:RedefinableElement:isLeaf"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isOrdered"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:StructuralFeature:isReadOnly"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Feature:isStatic"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isUnique"></ppe:BooleanRadio>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:Property:aggregation"></ppe:EnumCombo>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+</Composite>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleFlowPort.xwt b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleFlowPort.xwt
new file mode 100755
index 0000000..62215a6
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleFlowPort.xwt
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:x="http://www.eclipse.org/xwt"
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
+ xmlns:j="clr-namespace:java.lang" xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"
+ xmlns="http://www.eclipse.org/xwt/presentation">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:StringEditor input="{Binding}" property="UML:NamedElement:name"></ppe:StringEditor>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}"
+ property="SysML:PortAndFlows:FlowPort:isAtomic"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Port:isBehavior"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="SysML:PortAndFlows:FlowPort:isConjugated"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Property:isDerived"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Property:isDerivedUnion"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:RedefinableElement:isLeaf"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isOrdered"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:StructuralFeature:isReadOnly"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Port:isService"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Feature:isStatic"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isUnique"></ppe:BooleanRadio>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:Property:aggregation"></ppe:EnumCombo>
+ <ppe:EnumCombo input="{Binding}"
+ property="SysML:PortAndFlows:FlowPort:direction"></ppe:EnumCombo>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+</Composite>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleFlowProperty.xwt b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleFlowProperty.xwt
new file mode 100755
index 0000000..4bdb1e4
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleFlowProperty.xwt
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
+ xmlns="http://www.eclipse.org/xwt/presentation" xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"
+ xmlns:j="clr-namespace:java.lang" xmlns:x="http://www.eclipse.org/xwt">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:StringEditor input="{Binding}" property="UML:NamedElement:name"></ppe:StringEditor>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Property:isDerived"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Property:isDerivedUnion"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:RedefinableElement:isLeaf"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isOrdered"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:StructuralFeature:isReadOnly"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Feature:isStatic"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isUnique"></ppe:BooleanRadio>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:Property:aggregation"></ppe:EnumCombo>
+ <ppe:EnumCombo input="{Binding}"
+ property="SysML:PortAndFlows:FlowProperty:direction"></ppe:EnumCombo>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+</Composite>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleFlowSpecification.xwt b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleFlowSpecification.xwt
new file mode 100755
index 0000000..b2ea939
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleFlowSpecification.xwt
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
+ xmlns:x="http://www.eclipse.org/xwt" xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"
+ xmlns="http://www.eclipse.org/xwt/presentation" xmlns:j="clr-namespace:java.lang">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:StringEditor input="{Binding}" property="UML:NamedElement:name"></ppe:StringEditor>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Classifier:isAbstract"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:RedefinableElement:isLeaf"></ppe:BooleanRadio>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+</Composite>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleItemFlow.xwt b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleItemFlow.xwt
new file mode 100755
index 0000000..6b17054
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleItemFlow.xwt
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:x="http://www.eclipse.org/xwt" xmlns:j="clr-namespace:java.lang"
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
+ xmlns="http://www.eclipse.org/xwt/presentation" xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:StringEditor input="{Binding}" property="UML:NamedElement:name"></ppe:StringEditor>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:ReferenceDialog input="{Binding}"
+ property="SysML:PortAndFlows:ItemFlow:itemProperty"></ppe:ReferenceDialog>
+ </Composite>
+</Composite>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleNestedConnectorEnd.xwt b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleNestedConnectorEnd.xwt
new file mode 100755
index 0000000..2b4fc6c
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleNestedConnectorEnd.xwt
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
+ xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" xmlns="http://www.eclipse.org/xwt/presentation"
+ xmlns:j="clr-namespace:java.lang" xmlns:x="http://www.eclipse.org/xwt">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isOrdered"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isUnique"></ppe:BooleanRadio>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:MultiReference input="{Binding}"
+ property="SysML:Blocks:NestedConnectorEnd:propertyPath"></ppe:MultiReference>
+ </Composite>
+</Composite>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleNoBuffer.xwt b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleNoBuffer.xwt
new file mode 100755
index 0000000..209090b
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleNoBuffer.xwt
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:x="http://www.eclipse.org/xwt"
+ xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"
+ xmlns:j="clr-namespace:java.lang" xmlns="http://www.eclipse.org/xwt/presentation"
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:StringEditor input="{Binding}" property="UML:NamedElement:name"></ppe:StringEditor>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:ObjectNode:isControlType"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:RedefinableElement:isLeaf"></ppe:BooleanRadio>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:ObjectNode:ordering"></ppe:EnumCombo>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+</Composite>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleOptional.xwt b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleOptional.xwt
new file mode 100755
index 0000000..0872343
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleOptional.xwt
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
+ xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"
+ xmlns:j="clr-namespace:java.lang" xmlns="http://www.eclipse.org/xwt/presentation"
+ xmlns:x="http://www.eclipse.org/xwt">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:StringEditor input="{Binding}" property="UML:NamedElement:name"></ppe:StringEditor>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Parameter:isException"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isOrdered"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Parameter:isStream"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isUnique"></ppe:BooleanRadio>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:Parameter:direction"></ppe:EnumCombo>
+ <ppe:EnumCombo input="{Binding}" property="UML:Parameter:effect"></ppe:EnumCombo>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+</Composite>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleOverwrite.xwt b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleOverwrite.xwt
new file mode 100755
index 0000000..ad9e445
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleOverwrite.xwt
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns="http://www.eclipse.org/xwt/presentation"
+ xmlns:x="http://www.eclipse.org/xwt" xmlns:j="clr-namespace:java.lang"
+ xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:StringEditor input="{Binding}" property="UML:NamedElement:name"></ppe:StringEditor>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:ObjectNode:isControlType"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:RedefinableElement:isLeaf"></ppe:BooleanRadio>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:ObjectNode:ordering"></ppe:EnumCombo>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+</Composite>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleParticipantProperty.xwt b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleParticipantProperty.xwt
new file mode 100755
index 0000000..c188e0b
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleParticipantProperty.xwt
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:x="http://www.eclipse.org/xwt" xmlns="http://www.eclipse.org/xwt/presentation"
+ xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
+ xmlns:j="clr-namespace:java.lang">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:StringEditor input="{Binding}" property="UML:NamedElement:name"></ppe:StringEditor>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Property:isDerived"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Property:isDerivedUnion"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:RedefinableElement:isLeaf"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isOrdered"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:StructuralFeature:isReadOnly"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Feature:isStatic"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isUnique"></ppe:BooleanRadio>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:Property:aggregation"></ppe:EnumCombo>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:ReferenceDialog input="{Binding}"
+ property="SysML:Blocks:ParticipantProperty:end"></ppe:ReferenceDialog>
+ </Composite>
+</Composite>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleProbability.xwt b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleProbability.xwt
new file mode 100755
index 0000000..48cf081
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleProbability.xwt
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:x="http://www.eclipse.org/xwt" xmlns="http://www.eclipse.org/xwt/presentation"
+ xmlns:j="clr-namespace:java.lang" xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:StringEditor input="{Binding}" property="UML:NamedElement:name"></ppe:StringEditor>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:RedefinableElement:isLeaf"></ppe:BooleanRadio>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:ReferenceDialog input="{Binding}"
+ property="SysML:Activities:Probability:probability"></ppe:ReferenceDialog>
+ </Composite>
+</Composite>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SinglePropertySpecificType.xwt b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SinglePropertySpecificType.xwt
new file mode 100755
index 0000000..75a5eee
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SinglePropertySpecificType.xwt
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"
+ xmlns:j="clr-namespace:java.lang" xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
+ xmlns="http://www.eclipse.org/xwt/presentation" xmlns:x="http://www.eclipse.org/xwt">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:StringEditor input="{Binding}" property="UML:NamedElement:name"></ppe:StringEditor>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Classifier:isAbstract"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:RedefinableElement:isLeaf"></ppe:BooleanRadio>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+</Composite>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleRate.xwt b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleRate.xwt
new file mode 100755
index 0000000..43eac11
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleRate.xwt
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns="http://www.eclipse.org/xwt/presentation"
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
+ xmlns:x="http://www.eclipse.org/xwt" xmlns:j="clr-namespace:java.lang"
+ xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:StringEditor input="{Binding}" property="UML:NamedElement:name"></ppe:StringEditor>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Parameter:isException"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:RedefinableElement:isLeaf"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isOrdered"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Parameter:isStream"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isUnique"></ppe:BooleanRadio>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:Parameter:direction"></ppe:EnumCombo>
+ <ppe:EnumCombo input="{Binding}" property="UML:Parameter:effect"></ppe:EnumCombo>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:ReferenceDialog input="{Binding}"
+ property="SysML:Activities:Rate:rate"></ppe:ReferenceDialog>
+ </Composite>
+</Composite>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleRequirement.xwt b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleRequirement.xwt
new file mode 100755
index 0000000..f5f6a26
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleRequirement.xwt
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"
+ xmlns="http://www.eclipse.org/xwt/presentation" xmlns:j="clr-namespace:java.lang"
+ xmlns:x="http://www.eclipse.org/xwt"
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:StringEditor input="{Binding}"
+ property="SysML:Requirements:Requirement:id"></ppe:StringEditor>
+ <ppe:StringEditor input="{Binding}" property="UML:NamedElement:name"></ppe:StringEditor>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:StringMultiline input="{Binding}"
+ property="SysML:Requirements:Requirement:text"></ppe:StringMultiline>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Classifier:isAbstract"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:RedefinableElement:isLeaf"></ppe:BooleanRadio>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:ReferenceDialog input="{Binding}"
+ property="SysML:Requirements:Requirement:master"></ppe:ReferenceDialog>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:MultiReference input="{Binding}"
+ property="SysML:Requirements:Requirement:derived"></ppe:MultiReference>
+ <ppe:MultiReference input="{Binding}"
+ property="SysML:Requirements:Requirement:derivedFrom"></ppe:MultiReference>
+ <ppe:MultiReference input="{Binding}"
+ property="SysML:Requirements:Requirement:refinedBy"></ppe:MultiReference>
+ <ppe:MultiReference input="{Binding}"
+ property="SysML:Requirements:Requirement:satisfiedBy"></ppe:MultiReference>
+ <ppe:MultiReference input="{Binding}"
+ property="SysML:Requirements:Requirement:tracedTo"></ppe:MultiReference>
+ <ppe:MultiReference input="{Binding}"
+ property="SysML:Requirements:Requirement:verifiedBy"></ppe:MultiReference>
+ </Composite>
+</Composite>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleRequirementRelated.xwt b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleRequirementRelated.xwt
new file mode 100755
index 0000000..d0d14a2
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleRequirementRelated.xwt
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
+ xmlns="http://www.eclipse.org/xwt/presentation" xmlns:x="http://www.eclipse.org/xwt"
+ xmlns:j="clr-namespace:java.lang" xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:StringEditor input="{Binding}" property="UML:NamedElement:name"></ppe:StringEditor>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:MultiReference input="{Binding}"
+ property="SysML:Requirements:RequirementRelated:refines"></ppe:MultiReference>
+ <ppe:MultiReference input="{Binding}"
+ property="SysML:Requirements:RequirementRelated:satisfies"></ppe:MultiReference>
+ <ppe:MultiReference input="{Binding}"
+ property="SysML:Requirements:RequirementRelated:tracedFrom"></ppe:MultiReference>
+ <ppe:MultiReference input="{Binding}"
+ property="SysML:Requirements:RequirementRelated:verifies"></ppe:MultiReference>
+ </Composite>
+</Composite>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleTestCase.xwt b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleTestCase.xwt
new file mode 100755
index 0000000..8331bee
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleTestCase.xwt
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:x="http://www.eclipse.org/xwt" xmlns="http://www.eclipse.org/xwt/presentation"
+ xmlns:j="clr-namespace:java.lang" xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:StringEditor input="{Binding}" property="UML:NamedElement:name"></ppe:StringEditor>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Classifier:isAbstract"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Class:isActive"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:RedefinableElement:isLeaf"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Operation:isQuery"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Behavior:isReentrant"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Feature:isStatic"></ppe:BooleanRadio>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:BehavioralFeature:concurrency"></ppe:EnumCombo>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:MultiReference input="{Binding}"
+ property="SysML:Requirements:TestCase:verifies"></ppe:MultiReference>
+ </Composite>
+</Composite>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleUnit.xwt b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleUnit.xwt
new file mode 100755
index 0000000..a2a0076
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleUnit.xwt
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:x="http://www.eclipse.org/xwt"
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
+ xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" xmlns="http://www.eclipse.org/xwt/presentation"
+ xmlns:j="clr-namespace:java.lang">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:StringEditor input="{Binding}" property="UML:NamedElement:name"></ppe:StringEditor>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:ReferenceDialog input="{Binding}"
+ property="SysML:Blocks:Unit:dimension"></ppe:ReferenceDialog>
+ </Composite>
+</Composite>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleValueType.xwt b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleValueType.xwt
new file mode 100755
index 0000000..3e7b530
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleValueType.xwt
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:x="http://www.eclipse.org/xwt"
+ xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" xmlns="http://www.eclipse.org/xwt/presentation"
+ xmlns:j="clr-namespace:java.lang" xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:StringEditor input="{Binding}" property="UML:NamedElement:name"></ppe:StringEditor>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Classifier:isAbstract"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:RedefinableElement:isLeaf"></ppe:BooleanRadio>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:ReferenceDialog input="{Binding}"
+ property="SysML:Blocks:ValueType:dimension"></ppe:ReferenceDialog>
+ <ppe:ReferenceDialog input="{Binding}"
+ property="SysML:Blocks:ValueType:unit"></ppe:ReferenceDialog>
+ </Composite>
+</Composite>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleView.xwt b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleView.xwt
new file mode 100755
index 0000000..72d22c1
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleView.xwt
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:j="clr-namespace:java.lang" xmlns:x="http://www.eclipse.org/xwt"
+ xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
+ xmlns="http://www.eclipse.org/xwt/presentation">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:StringEditor input="{Binding}" property="UML:NamedElement:name"></ppe:StringEditor>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:ReferenceDialog input="{Binding}"
+ property="SysML:ModelElements:View:viewPoint"></ppe:ReferenceDialog>
+ </Composite>
+</Composite>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleViewPoint.xwt b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleViewPoint.xwt
new file mode 100755
index 0000000..8fb9f2e
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/Model/ui/SingleViewPoint.xwt
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:j="clr-namespace:java.lang" xmlns="http://www.eclipse.org/xwt/presentation"
+ xmlns:x="http://www.eclipse.org/xwt" xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
+ xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:MultiString input="{Binding}"
+ property="SysML:ModelElements:ViewPoint:concerns"></ppe:MultiString>
+ <ppe:MultiString input="{Binding}"
+ property="SysML:ModelElements:ViewPoint:languages"></ppe:MultiString>
+ <ppe:MultiString input="{Binding}"
+ property="SysML:ModelElements:ViewPoint:methods"></ppe:MultiString>
+ <ppe:StringEditor input="{Binding}" property="UML:NamedElement:name"></ppe:StringEditor>
+ <ppe:StringEditor input="{Binding}"
+ property="SysML:ModelElements:ViewPoint:purpose"></ppe:StringEditor>
+ <ppe:MultiString input="{Binding}"
+ property="SysML:ModelElements:ViewPoint:stakeHolders"></ppe:MultiString>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Classifier:isAbstract"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Class:isActive"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:RedefinableElement:isLeaf"></ppe:BooleanRadio>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+</Composite>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/OSGI-INF/l10n/bundle.properties b/plugins/properties/org.eclipse.papyrus.sysml.properties/OSGI-INF/l10n/bundle.properties
new file mode 100755
index 0000000..acc97b4
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/OSGI-INF/l10n/bundle.properties
@@ -0,0 +1,3 @@
+#Properties file for org.eclipse.papyrus.sysml.properties
+Bundle-Name = Papyrus properties SysML
+Bundle-Vendor = Eclipse Modeling Project
\ No newline at end of file
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/about.html b/plugins/properties/org.eclipse.papyrus.sysml.properties/about.html
new file mode 100755
index 0000000..d35d5ae
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/build.properties b/plugins/properties/org.eclipse.papyrus.sysml.properties/build.properties
new file mode 100755
index 0000000..f329bdb
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/build.properties
@@ -0,0 +1,7 @@
+#
+#Mon Sep 12 09:30:06 CEST 2011
+bin.includes=META-INF/,.,plugin.xml,Model/,about.html,OSGI-INF/
+output..=bin/
+src.includes = about.html
+source..=src/
+bin..=bin/
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/org.eclipse.papyrus.sysml.properties.iml b/plugins/properties/org.eclipse.papyrus.sysml.properties/org.eclipse.papyrus.sysml.properties.iml
new file mode 100755
index 0000000..64b5367
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/org.eclipse.papyrus.sysml.properties.iml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+ <component name="NewModuleRootManager" inherit-compiler-output="false">
+ <output url="file://$MODULE_DIR$/bin" />
+ <exclude-output />
+ <content url="file://$MODULE_DIR$">
+ <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
+ </content>
+ <orderEntry type="module" module-name="org.eclipse.papyrus.infra.properties.ui" />
+ <orderEntry type="module" module-name="org.eclipse.papyrus.uml.properties" />
+ <orderEntry type="library" name="ECLIPSE" level="application" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ <orderEntry type="jdk" jdkName="J2SE-1.5" jdkType="JavaSDK" />
+ </component>
+</module>
\ No newline at end of file
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/plugin.properties b/plugins/properties/org.eclipse.papyrus.sysml.properties/plugin.properties
new file mode 100755
index 0000000..aea0794
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/plugin.properties
@@ -0,0 +1,12 @@
+#################################################################################
+# Copyright (c) 2015 CEA LIST.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Benoit Maggi (CEA LIST) benoit.maggi@cea.fr - initial API and implementation
+##################################################################################)
+
+pluginDescription=This plug-in contains the SysML property view configuration
\ No newline at end of file
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/plugin.xml b/plugins/properties/org.eclipse.papyrus.sysml.properties/plugin.xml
new file mode 100755
index 0000000..3dd9f89
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/plugin.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.papyrus.infra.properties.contexts">
+ <context
+ contextModel="Model/SysML.ctx">
+ </context>
+ </extension>
+
+</plugin>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/pom.xml b/plugins/properties/org.eclipse.papyrus.sysml.properties/pom.xml
new file mode 100755
index 0000000..23ca133
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/pom.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.papyrus.sysml</groupId>
+ <artifactId>org.eclipse.papyrus.sysml-properties</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.papyrus.sysml.properties</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/plugins/properties/org.eclipse.papyrus.sysml.properties/src/org/eclipse/papyrus/sysml/properties/Activator.java b/plugins/properties/org.eclipse.papyrus.sysml.properties/src/org/eclipse/papyrus/sysml/properties/Activator.java
new file mode 100755
index 0000000..625e0ed
--- /dev/null
+++ b/plugins/properties/org.eclipse.papyrus.sysml.properties/src/org/eclipse/papyrus/sysml/properties/Activator.java
@@ -0,0 +1,44 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.properties;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+/** The activator class controls the plug-in life cycle */
+public class Activator implements BundleActivator {
+
+ private static BundleContext context;
+
+ static BundleContext getContext() {
+ return context;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext bundleContext) throws Exception {
+ Activator.context = bundleContext;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext bundleContext) throws Exception {
+ Activator.context = null;
+ }
+
+}
diff --git a/plugins/properties/pom.xml b/plugins/properties/pom.xml
new file mode 100755
index 0000000..d72e529
--- /dev/null
+++ b/plugins/properties/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>org.eclipse.papyrus.sysml-properties</artifactId>
+ <packaging>pom</packaging>
+ <parent>
+ <groupId>org.eclipse.papyrus.sysml</groupId>
+ <artifactId>org.eclipse.papyrus.sysml</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <name>Papyrus SysML Properties</name>
+ <description>Papyrus Properties View configurations for SysML modeling.</description>
+
+ <modules>
+ <module>org.eclipse.papyrus.sysml.properties</module>
+ </modules>
+</project>
diff --git a/pom.xml b/pom.xml
index 4a525df..28b6ce0 100755
--- a/pom.xml
+++ b/pom.xml
@@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
-
+
<parent>
<groupId>org.eclipse.papyrus.components</groupId>
<artifactId>org.eclipse.papyrus.components.parent</artifactId>
@@ -14,9 +14,42 @@
<version>3.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>SysML</name>
+ <description>A Papyrus DSML for the SysML 1.1 OMG norm</description>
+ <url>https://eclipse.org/papyrus/components/${component.shortname}/</url>
+ <inceptionYear>2015</inceptionYear>
+
+ <modules>
+ <module>org.eclipse.papyrus.sysml.targetplatform.oxygen</module>
+ <module>plugins</module>
+ <module>features</module>
+ <module>tests</module>
+ <!--<module>releng</module> -->
+ </modules>
+ <properties>
+ <component.shortname>sysml</component.shortname>
+ <component.fullartifactId>org.eclipse.papyrus.sysml</component.fullartifactId>
+ <component.hudson.tabname>Sysml</component.hudson.tabname>
+ <component.bugzilla.name>SysML</component.bugzilla.name>
+ <component.package.rootname>org.eclipse.papyrus.sysml</component.package.rootname>
+ <component.rcp.name>org.eclipse.papyrus.sysml.rcp</component.rcp.name>
+ <component.apibaseline.url>http://download.eclipse.org/modeling/mdt/papyrus/components/sysml14/0.8.0_papyrus-sysml-mars_190/</component.apibaseline.url>
+ <component.servicetype>org.eclipse.papyrus.sysml.service.types</component.servicetype>
+ <eclipse.targetrelease>oxygen</eclipse.targetrelease>
+ <target.version>${project.version}</target.version>
+ <sonar.exclusions>**/src-gen/**</sonar.exclusions>
+ <testConfig>CI_TESTS_CONFIG</testConfig> <!-- See org.eclipse.papyrus.junit.framework.classification.ClassificationConfig -->
+ </properties>
+ <licenses>
+ <license>
+ <name>Eclipse Public License</name>
+ <url>https://www.eclipse.org/legal/epl-v10.html</url>
+ <distribution>repo</distribution>
+ </license>
+ </licenses>
+
<repositories>
@@ -32,18 +65,60 @@
<enabled>false</enabled>
</snapshots>
</repository>
- <repository>
- <id>paps.repo.eclipse.org</id>
- <name>Papyrus Repository - Snapshots</name>
- <url>https://repo.eclipse.org/content/repositories/papyrus-snapshots/</url>
- <releases>
- <enabled>false</enabled>
- </releases>
- <snapshots>
- <enabled>true</enabled>
- <updatePolicy>daily</updatePolicy>
- </snapshots>
- </repository>
</repositories>
-
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>target-platform-configuration</artifactId>
+ <configuration>
+ <includePackedArtifacts>true</includePackedArtifacts>
+ <targetDefinitionIncludeSource>honor</targetDefinitionIncludeSource>
+ <environments>
+ <environment>
+ <os>win32</os>
+ <ws>win32</ws>
+ <arch>x86_64</arch>
+ </environment>
+ <environment>
+ <os>linux</os>
+ <ws>gtk</ws>
+ <arch>x86_64</arch>
+ </environment>
+ <environment>
+ <os>macosx</os>
+ <ws>cocoa</ws>
+ <arch>x86_64</arch>
+ </environment>
+ </environments>
+ <target>
+ <artifact>
+ <groupId>${component.package.rootname}</groupId>
+ <artifactId>${component.fullartifactId}.targetplatform.${eclipse.targetrelease}</artifactId>
+ <version>3.0.0-SNAPSHOT</version>
+ </artifact>
+ </target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-surefire-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <configuration>
+ <failIfNoTests>false</failIfNoTests>
+ <useUIHarness>true</useUIHarness>
+ <useUIThread>true</useUIThread>
+ <!--<testFailureIgnore>true</testFailureIgnore>
+ ${tycho.testArgLine} is populated by JaCoCo and is required to enable code coverage
+ <argLine>${tycho.testArgLine} ${test.argLine}</argLine>
+ <appArgLine>-testConfig=${testConfig}</appArgLine>
+ <argLine>-Xms512m -Xmx2048m</argLine>
+ <appArgLine>-testConfig=${testConfig}</appArgLine> -->
+ <product>org.eclipse.sdk.ide</product>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
</project>
\ No newline at end of file
diff --git a/tests/.project b/tests/.project
new file mode 100755
index 0000000..a56b479
--- /dev/null
+++ b/tests/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>tests</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>
+ </natures>
+</projectDescription>
diff --git a/tests/.settings/org.eclipse.core.resources.prefs b/tests/.settings/org.eclipse.core.resources.prefs
new file mode 100755
index 0000000..99f26c0
--- /dev/null
+++ b/tests/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/.classpath b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/.classpath
new file mode 100755
index 0000000..64c5e31
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/.project b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/.project
new file mode 100755
index 0000000..c422cc7
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.sysml.diagram.blockdefinition.tests</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/.settings/org.eclipse.jdt.core.prefs b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 0000000..c585cc4
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,291 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/.settings/org.eclipse.jdt.ui.prefs b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/.settings/org.eclipse.jdt.ui.prefs
new file mode 100755
index 0000000..954281d
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,68 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+formatter_profile=_Papyrus
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/META-INF/MANIFEST.MF
new file mode 100755
index 0000000..239a6dd
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,38 @@
+Manifest-Version: 1.0
+Require-Bundle: org.junit;bundle-version="4.10.0",
+ org.eclipse.papyrus.junit.framework;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.papyrus.junit.utils;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.sysml.diagram.blockdefinition;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.sysml;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.uml.diagram.common;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.sysml.service.types;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.infra.core.sashwindows.di;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.papyrus.uml.diagram.clazz,
+ org.eclipse.papyrus.uml.diagram.menu;bundle-version="2.0.0",
+ org.eclipse.papyrus.uml.internationalization;bundle-version="1.0.0",
+ org.eclipse.papyrus.uml.diagram.stereotype.edition;bundle-version="2.0.0",
+ org.eclipse.papyrus.uml.nattable.stereotype.display;bundle-version="2.0.0",
+ org.eclipse.papyrus.infra.gmfdiag.dnd,
+ org.eclipse.papyrus.uml.diagram.dnd,
+ org.eclipse.papyrus.uml.types.core,
+ org.eclipse.papyrus.infra.types.core,
+ org.eclipse.papyrus.sysml.architecture;bundle-version="1.0.0",
+ org.eclipse.papyrus.sysml.edit;bundle-version="1.2.0",
+ org.eclipse.papyrus.sysml.diagram.ui;bundle-version="2.0.0",
+ org.eclipse.papyrus.sysml.diagram.common,
+ org.eclipse.papyrus.sysml.modelexplorer;bundle-version="1.2.0",
+ org.eclipse.papyrus.sysml.properties;bundle-version="1.2.0",
+ org.eclipse.papyrus.sysml.tests;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.gmfdiag.modelexplorer;bundle-version="1.2.0",
+ org.eclipse.papyrus.uml.diagram.modelexplorer;bundle-version="1.2.0",
+ org.eclipse.papyrus.uml.modelexplorer;bundle-version="2.0.0",
+ org.eclipse.papyrus.views.modelexplorer;bundle-version="3.0.0"
+Export-Package: org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.suites
+Bundle-Vendor: %providerName
+Bundle-Version: 1.2.0.qualifier
+Bundle-Name: %pluginName
+Bundle-Localization: plugin
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.papyrus.sysml.diagram.blockdefinition.tests;singleton:=true
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/about.html b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/about.html
new file mode 100755
index 0000000..d35d5ae
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/build.properties b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/build.properties
new file mode 100755
index 0000000..b69e84e
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/build.properties
@@ -0,0 +1,9 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ about.html,\
+ model/,\
+ plugin.properties,\
+ resources/
+src.includes = about.html
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/model/ModelWithBDD.di b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/model/ModelWithBDD.di
new file mode 100755
index 0000000..f1a1021
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/model/ModelWithBDD.di
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi">
+ <di:SashWindowsMngr>
+ <pageList>
+ <availablePage>
+ <emfPageIdentifier href="ModelWithBDD.notation#_LXISYJdgEeCIWccnqNjPug"/>
+ </availablePage>
+ </pageList>
+ <sashModel currentSelection="/0/@sashModel/@windows.0/@children.0">
+ <windows>
+ <children xsi:type="di:TabFolder">
+ <children>
+ <emfPageIdentifier href="ModelWithBDD.notation#_LXISYJdgEeCIWccnqNjPug"/>
+ </children>
+ </children>
+ </windows>
+ </sashModel>
+ </di:SashWindowsMngr>
+ <architecture:ArchitectureDescription contextId="org.eclipse.papyrus.sysml.architecture.SysML"/>
+ <architecture:ArchitectureDescriptionPreferences>
+ <viewpointIds>org.eclipse.papyrus.sysml.analysis</viewpointIds>
+ <viewpointIds>org.eclipse.papyrus.sysml.design</viewpointIds>
+ </architecture:ArchitectureDescriptionPreferences>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/model/ModelWithBDD.notation b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/model/ModelWithBDD.notation
new file mode 100755
index 0000000..bbef322
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/model/ModelWithBDD.notation
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:uml="http://www.eclipse.org/uml2/3.0.0/UML" xmi:id="_LXISYJdgEeCIWccnqNjPug" type="BlockDefinition" name="NewDiagram" measurementUnit="Pixel">
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_LXISYZdgEeCIWccnqNjPug"/>
+ <element xmi:type="uml:Model" href="ModelWithBDD.uml#_UV0P8EAREeCMpNWxgNcrog"/>
+</notation:Diagram>
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/model/ModelWithBDD.uml b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/model/ModelWithBDD.uml
new file mode 100755
index 0000000..2ec891e
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/model/ModelWithBDD.uml
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/3.0.0/UML" xmi:id="_UV0P8EAREeCMpNWxgNcrog" name="model">
+ <profileApplication xmi:id="_sT65AJdfEeCIWccnqNjPug">
+ <eAnnotations xmi:id="_sUNz8JdfEeCIWccnqNjPug" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#/"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://SysML_PROFILES/SysML.profile.uml#_TZ_nULU5EduiKqCzJMWbGw"/>
+ </profileApplication>
+ <profileApplication xmi:id="_sUNz8ZdfEeCIWccnqNjPug">
+ <eAnnotations xmi:id="_sUNz8pdfEeCIWccnqNjPug" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:id="_sUNz85dfEeCIWccnqNjPug">
+ <eAnnotations xmi:id="_sUNz9JdfEeCIWccnqNjPug" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:id="_sUNz9ZdfEeCIWccnqNjPug">
+ <eAnnotations xmi:id="_sUNz9pdfEeCIWccnqNjPug" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:id="_sUNz95dfEeCIWccnqNjPug">
+ <eAnnotations xmi:id="_sUNz-JdfEeCIWccnqNjPug" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://SysML_PROFILES/SysML.profile.uml#_5WYJ0LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:id="_sUNz-ZdfEeCIWccnqNjPug">
+ <eAnnotations xmi:id="_sUNz-pdfEeCIWccnqNjPug" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//activities"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://SysML_PROFILES/SysML.profile.uml#_C2zXMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:id="_sUNz-5dfEeCIWccnqNjPug">
+ <eAnnotations xmi:id="_sUNz_JdfEeCIWccnqNjPug" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://SysML_PROFILES/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:id="_sUNz_ZdfEeCIWccnqNjPug">
+ <eAnnotations xmi:id="_sUNz_pdfEeCIWccnqNjPug" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:id="_sUNz_5dfEeCIWccnqNjPug">
+ <eAnnotations xmi:id="_sUN0AJdfEeCIWccnqNjPug" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//interactions"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://SysML_PROFILES/SysML.profile.uml#_meOioLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:id="_sUN0AZdfEeCIWccnqNjPug">
+ <eAnnotations xmi:id="_sUN0ApdfEeCIWccnqNjPug" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//statemachines"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://SysML_PROFILES/SysML.profile.uml#_nAF5kLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:id="_sUN0A5dfEeCIWccnqNjPug">
+ <eAnnotations xmi:id="_sUN0BJdfEeCIWccnqNjPug" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//usecases"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://SysML_PROFILES/SysML.profile.uml#_neZmMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+</uml:Model>
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/plugin.properties b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/plugin.properties
new file mode 100755
index 0000000..dda89bc
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/plugin.properties
@@ -0,0 +1,14 @@
+#################################################################################
+# Copyright (c) 2011 CEA LIST.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#
+# CEA LIST - Initial API and Implementation.
+#
+##################################################################################
+pluginName=Papyrus SysML Block Definition Diagram Tests
+providerName=Eclipse Modeling Project
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/pom.xml b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/pom.xml
new file mode 100755
index 0000000..ae3877d
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/pom.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.papyrus.sysml</groupId>
+ <artifactId>org.eclipse.papyrus.sysml.test</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.papyrus.sysml.diagram.blockdefinition.tests</artifactId>
+ <packaging>eclipse-test-plugin</packaging>
+
+<!-- <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-surefire-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <configuration>
+ <failIfNoTests>false</failIfNoTests>
+ <useUIHarness>true</useUIHarness>
+ <useUIThread>true</useUIThread>
+ <argLine>-Xms512m -Xmx2048m</argLine>
+ <appArgLine>-testConfig=${testConfig}</appArgLine>
+ <product>org.eclipse.sdk.ide</product>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build> -->
+</project>
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/resources/bugs/Bug481317_BDD/sysml.di b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/resources/bugs/Bug481317_BDD/sysml.di
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/resources/bugs/Bug481317_BDD/sysml.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/resources/bugs/Bug481317_BDD/sysml.notation b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/resources/bugs/Bug481317_BDD/sysml.notation
new file mode 100755
index 0000000..c04c44c
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/resources/bugs/Bug481317_BDD/sysml.notation
@@ -0,0 +1,242 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/viewpoints/policy/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_FQYHcMweEeWUHbt_nZR2Hw" type="BlockDefinition" name="Block Definition Diagram" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_GUugYMweEeWUHbt_nZR2Hw" type="shape_sysml_block_as_classifier">
+ <children xmi:type="notation:DecorationNode" xmi:id="_GUvugMweEeWUHbt_nZR2Hw" type="label_sysml_block_name"/>
+ <children xmi:type="notation:ListCompartment" xmi:id="_GUzY4MweEeWUHbt_nZR2Hw" type="compartment_sysml_property_as_list">
+ <children xmi:type="notation:Node" xmi:id="_IBRhwMweEeWUHbt_nZR2Hw" type="shape_uml_property_as_label">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_IBRhwcweEeWUHbt_nZR2Hw"/>
+ <element xmi:type="uml:Property" href="sysml.uml#_IBDfUMweEeWUHbt_nZR2Hw"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_IBRhwsweEeWUHbt_nZR2Hw"/>
+ </children>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_GUzY4cweEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_GUzY4sweEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_GUzY48weEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_GUzY5MweEeWUHbt_nZR2Hw"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_GUzY5cweEeWUHbt_nZR2Hw" type="compartment_sysml_part_as_list">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_GUzY5sweEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_GUzY58weEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_GUzY6MweEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_GUzY6cweEeWUHbt_nZR2Hw"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_GUz_8MweEeWUHbt_nZR2Hw" type="compartment_sysml_reference_as_list">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_GUz_8cweEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_GUz_8sweEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_GUz_88weEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_GUz_9MweEeWUHbt_nZR2Hw"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_GUz_9cweEeWUHbt_nZR2Hw" type="compartment_uml_port_as_list">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_GUz_9sweEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_GUz_98weEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_GUz_-MweEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_GUz_-cweEeWUHbt_nZR2Hw"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_GUz_-sweEeWUHbt_nZR2Hw" type="compartment_sysml_flowport_as_list">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_GUz_-8weEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_GUz__MweEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_GUz__cweEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_GUz__sweEeWUHbt_nZR2Hw"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_GUz__8weEeWUHbt_nZR2Hw" type="compartment_uml_operation_as_list">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_GU0AAMweEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_GU0AAcweEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_GU0AAsweEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_GU0AA8weEeWUHbt_nZR2Hw"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_GU0ABMweEeWUHbt_nZR2Hw" type="compartment_sysml_constraint_as_list">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_GU0ABcweEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_GU0ABsweEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_GU0AB8weEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_GU0ACMweEeWUHbt_nZR2Hw"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_GU0ACcweEeWUHbt_nZR2Hw" type="compartment_sysml_value_as_list">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_GU0ACsweEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_GU0AC8weEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_GU0ADMweEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_GU0ADcweEeWUHbt_nZR2Hw"/>
+ </children>
+ <element xmi:type="uml:Class" href="sysml.uml#_GSXv8MweEeWUHbt_nZR2Hw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_GUugYcweEeWUHbt_nZR2Hw" x="156" y="63" width="100" height="150"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_GVofUMweEeWUHbt_nZR2Hw" type="StereotypeComment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_GVofUcweEeWUHbt_nZR2Hw" showTitle="true"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_GVpGYMweEeWUHbt_nZR2Hw" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Class" href="sysml.uml#_GSXv8MweEeWUHbt_nZR2Hw"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_GVofUsweEeWUHbt_nZR2Hw" x="200"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_GgcBIMweEeWUHbt_nZR2Hw" type="shape_sysml_block_as_classifier">
+ <children xmi:type="notation:DecorationNode" xmi:id="_GgdPQMweEeWUHbt_nZR2Hw" type="label_sysml_block_name"/>
+ <children xmi:type="notation:ListCompartment" xmi:id="_GgdPQcweEeWUHbt_nZR2Hw" type="compartment_sysml_property_as_list">
+ <children xmi:type="notation:Node" xmi:id="_LGGksMweEeWUHbt_nZR2Hw" type="shape_uml_property_as_label">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_LGHLwMweEeWUHbt_nZR2Hw"/>
+ <element xmi:type="uml:Property" href="sysml.uml#_IBDfUMweEeWUHbt_nZR2Hw"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_LGHLwcweEeWUHbt_nZR2Hw"/>
+ </children>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_GgdPQsweEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_GgdPQ8weEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_GgdPRMweEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_GgdPRcweEeWUHbt_nZR2Hw"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_GgdPRsweEeWUHbt_nZR2Hw" type="compartment_sysml_part_as_list">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_GgdPR8weEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_GgdPSMweEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_GgdPScweEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_GgdPSsweEeWUHbt_nZR2Hw"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_GgdPS8weEeWUHbt_nZR2Hw" type="compartment_sysml_reference_as_list">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_GgdPTMweEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_GgdPTcweEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_GgdPTsweEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_GgdPT8weEeWUHbt_nZR2Hw"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_Ggd2UMweEeWUHbt_nZR2Hw" type="compartment_uml_port_as_list">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_Ggd2UcweEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_Ggd2UsweEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_Ggd2U8weEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_Ggd2VMweEeWUHbt_nZR2Hw"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_Ggd2VcweEeWUHbt_nZR2Hw" type="compartment_sysml_flowport_as_list">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_Ggd2VsweEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_Ggd2V8weEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_Ggd2WMweEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_Ggd2WcweEeWUHbt_nZR2Hw"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_Ggd2WsweEeWUHbt_nZR2Hw" type="compartment_uml_operation_as_list">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_Ggd2W8weEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_Ggd2XMweEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_Ggd2XcweEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_Ggd2XsweEeWUHbt_nZR2Hw"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_Ggd2X8weEeWUHbt_nZR2Hw" type="compartment_sysml_constraint_as_list">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_Ggd2YMweEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_Ggd2YcweEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_Ggd2YsweEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_Ggd2Y8weEeWUHbt_nZR2Hw"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_GgedYMweEeWUHbt_nZR2Hw" type="compartment_sysml_value_as_list">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_GgedYcweEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_GgedYsweEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_GgedY8weEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_GgedZMweEeWUHbt_nZR2Hw"/>
+ </children>
+ <element xmi:type="uml:Class" href="sysml.uml#_GgZk4MweEeWUHbt_nZR2Hw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_GgcBIcweEeWUHbt_nZR2Hw" x="539" y="66" width="100" height="150"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_GglLHMweEeWUHbt_nZR2Hw" type="StereotypeComment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_GglLHcweEeWUHbt_nZR2Hw" showTitle="true"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_GglLH8weEeWUHbt_nZR2Hw" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Class" href="sysml.uml#_GgZk4MweEeWUHbt_nZR2Hw"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_GglLHsweEeWUHbt_nZR2Hw" x="200"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_GszCIMweEeWUHbt_nZR2Hw" type="shape_sysml_block_as_classifier">
+ <children xmi:type="notation:DecorationNode" xmi:id="_GszpMcweEeWUHbt_nZR2Hw" type="label_sysml_block_name"/>
+ <children xmi:type="notation:ListCompartment" xmi:id="_GszpMsweEeWUHbt_nZR2Hw" type="compartment_sysml_property_as_list">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_GszpM8weEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_GszpNMweEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_GszpNcweEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_GszpNsweEeWUHbt_nZR2Hw"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_GszpN8weEeWUHbt_nZR2Hw" type="compartment_sysml_part_as_list">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_GszpOMweEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_GszpOcweEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_GszpOsweEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_GszpO8weEeWUHbt_nZR2Hw"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_GszpPMweEeWUHbt_nZR2Hw" type="compartment_sysml_reference_as_list">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_Gs0QQMweEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_Gs0QQcweEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_Gs0QQsweEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_Gs0QQ8weEeWUHbt_nZR2Hw"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_Gs0QRMweEeWUHbt_nZR2Hw" type="compartment_uml_port_as_list">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_Gs0QRcweEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_Gs0QRsweEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_Gs0QR8weEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_Gs0QSMweEeWUHbt_nZR2Hw"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_Gs0QScweEeWUHbt_nZR2Hw" type="compartment_sysml_flowport_as_list">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_Gs0QSsweEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_Gs0QS8weEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_Gs0QTMweEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_Gs0QTcweEeWUHbt_nZR2Hw"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_Gs0QTsweEeWUHbt_nZR2Hw" type="compartment_uml_operation_as_list">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_Gs0QT8weEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_Gs0QUMweEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_Gs0QUcweEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_Gs0QUsweEeWUHbt_nZR2Hw"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_Gs0QU8weEeWUHbt_nZR2Hw" type="compartment_sysml_constraint_as_list">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_Gs0QVMweEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_Gs0QVcweEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_Gs0QVsweEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_Gs0QV8weEeWUHbt_nZR2Hw"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_Gs0QWMweEeWUHbt_nZR2Hw" type="compartment_sysml_value_as_list">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_Gs0QWcweEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_Gs0QWsweEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_Gs0QW8weEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_Gs0QXMweEeWUHbt_nZR2Hw"/>
+ </children>
+ <element xmi:type="uml:Class" href="sysml.uml#_Gsv-0MweEeWUHbt_nZR2Hw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_GszpMMweEeWUHbt_nZR2Hw" x="381" y="276" width="100" height="150"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_Gs-oU8weEeWUHbt_nZR2Hw" type="StereotypeComment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_Gs-oVMweEeWUHbt_nZR2Hw" showTitle="true"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_Gs-oVsweEeWUHbt_nZR2Hw" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Class" href="sysml.uml#_Gsv-0MweEeWUHbt_nZR2Hw"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Gs-oVcweEeWUHbt_nZR2Hw" x="200"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_FQYHccweEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="style:PapyrusViewStyle" xmi:id="_FQYHcsweEeWUHbt_nZR2Hw">
+ <owner xmi:type="uml:Model" href="sysml.uml#_FGsnAMweEeWUHbt_nZR2Hw"/>
+ </styles>
+ <styles xmi:type="notation:StringValueStyle" xmi:id="_FS-vgMweEeWUHbt_nZR2Hw" name="diagram_compatibility_version" stringValue="1.1.0"/>
+ <element xmi:type="uml:Model" href="sysml.uml#_FGsnAMweEeWUHbt_nZR2Hw"/>
+ <edges xmi:type="notation:Connector" xmi:id="_GVptcMweEeWUHbt_nZR2Hw" type="StereotypeCommentLink" source="_GUugYMweEeWUHbt_nZR2Hw" target="_GVofUMweEeWUHbt_nZR2Hw">
+ <styles xmi:type="notation:FontStyle" xmi:id="_GVptccweEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_GVptdcweEeWUHbt_nZR2Hw" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Class" href="sysml.uml#_GSXv8MweEeWUHbt_nZR2Hw"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_GVptcsweEeWUHbt_nZR2Hw" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_GVptc8weEeWUHbt_nZR2Hw"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_GVptdMweEeWUHbt_nZR2Hw"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_GglyIMweEeWUHbt_nZR2Hw" type="StereotypeCommentLink" source="_GgcBIMweEeWUHbt_nZR2Hw" target="_GglLHMweEeWUHbt_nZR2Hw">
+ <styles xmi:type="notation:FontStyle" xmi:id="_GglyIcweEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_GglyJcweEeWUHbt_nZR2Hw" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Class" href="sysml.uml#_GgZk4MweEeWUHbt_nZR2Hw"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_GglyIsweEeWUHbt_nZR2Hw" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_GglyI8weEeWUHbt_nZR2Hw"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_GglyJMweEeWUHbt_nZR2Hw"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_Gs-oV8weEeWUHbt_nZR2Hw" type="StereotypeCommentLink" source="_GszCIMweEeWUHbt_nZR2Hw" target="_Gs-oU8weEeWUHbt_nZR2Hw">
+ <styles xmi:type="notation:FontStyle" xmi:id="_Gs-oWMweEeWUHbt_nZR2Hw"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_Gs-oXMweEeWUHbt_nZR2Hw" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Class" href="sysml.uml#_Gsv-0MweEeWUHbt_nZR2Hw"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_Gs-oWcweEeWUHbt_nZR2Hw" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Gs-oWsweEeWUHbt_nZR2Hw"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Gs-oW8weEeWUHbt_nZR2Hw"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_JRrZsMweEeWUHbt_nZR2Hw" type="link_uml_generalization" source="_GgcBIMweEeWUHbt_nZR2Hw" target="_GUugYMweEeWUHbt_nZR2Hw">
+ <children xmi:type="notation:DecorationNode" xmi:id="_JRsAwMweEeWUHbt_nZR2Hw" type="linklabel_uml_appliedstereotype">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_JRsAwcweEeWUHbt_nZR2Hw" y="-30"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_JRrZscweEeWUHbt_nZR2Hw"/>
+ <element xmi:type="uml:Generalization" href="sysml.uml#_JRa7AMweEeWUHbt_nZR2Hw"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_JRrZssweEeWUHbt_nZR2Hw" points="[539, 115, -643984, -643984]$[256, 113, -643984, -643984]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_JSFpYMweEeWUHbt_nZR2Hw" id="(0.0,0.32666666666666666)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_JSFpYcweEeWUHbt_nZR2Hw" id="(1.0,0.3333333333333333)"/>
+ </edges>
+</notation:Diagram>
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/resources/bugs/Bug481317_BDD/sysml.uml b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/resources/bugs/Bug481317_BDD/sysml.uml
new file mode 100755
index 0000000..17435a4
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/resources/bugs/Bug481317_BDD/sysml.uml
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Blocks="http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks">
+ <uml:Model xmi:id="_FGsnAMweEeWUHbt_nZR2Hw" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_GSXv8MweEeWUHbt_nZR2Hw" name="Block1">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_IBDfUMweEeWUHbt_nZR2Hw" name="Attribute1"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_GgZk4MweEeWUHbt_nZR2Hw" name="Block2">
+ <generalization xmi:type="uml:Generalization" xmi:id="_JRa7AMweEeWUHbt_nZR2Hw" general="_GSXv8MweEeWUHbt_nZR2Hw"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_Gsv-0MweEeWUHbt_nZR2Hw" name="Block3"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_FO1PUMweEeWUHbt_nZR2Hw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_FO3EgMweEeWUHbt_nZR2Hw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_TZ_nULU5EduiKqCzJMWbGw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_FO45sMweEeWUHbt_nZR2Hw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_FO5gwMweEeWUHbt_nZR2Hw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_FO79AMweEeWUHbt_nZR2Hw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_FO8kEMweEeWUHbt_nZR2Hw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_FO8kEcweEeWUHbt_nZR2Hw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_FO9LIMweEeWUHbt_nZR2Hw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_FO9LIcweEeWUHbt_nZR2Hw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_FO9yMMweEeWUHbt_nZR2Hw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_5WYJ0LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_FO9yMcweEeWUHbt_nZR2Hw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_FO-ZQMweEeWUHbt_nZR2Hw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//activities"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_C2zXMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_FO-ZQcweEeWUHbt_nZR2Hw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_FO-ZQsweEeWUHbt_nZR2Hw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_FO-ZQ8weEeWUHbt_nZR2Hw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_FO_AUMweEeWUHbt_nZR2Hw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_FO_AUcweEeWUHbt_nZR2Hw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_FO_AUsweEeWUHbt_nZR2Hw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//interactions"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_meOioLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_FO_AU8weEeWUHbt_nZR2Hw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_FO_nYMweEeWUHbt_nZR2Hw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//statemachines"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_nAF5kLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_FPAOcMweEeWUHbt_nZR2Hw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_FPAOccweEeWUHbt_nZR2Hw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//usecases"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_neZmMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Blocks:Block xmi:id="_GScBYMweEeWUHbt_nZR2Hw" base_Class="_GSXv8MweEeWUHbt_nZR2Hw"/>
+ <Blocks:Block xmi:id="_GgazAMweEeWUHbt_nZR2Hw" base_Class="_GgZk4MweEeWUHbt_nZR2Hw"/>
+ <Blocks:Block xmi:id="_GsxM8MweEeWUHbt_nZR2Hw" base_Class="_Gsv-0MweEeWUHbt_nZR2Hw"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/AbstractTest.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/AbstractTest.java
new file mode 100755
index 0000000..1f721cf
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/AbstractTest.java
@@ -0,0 +1,91 @@
+/*****************************************************************************
+ * Copyright (c) 2011, 2016 CEA LIST, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ * Fanch Bonnabesse (ALL4TEC) fanch.bonnabesse@alltec.net - Bug 419357
+ * Christian W. Damus - 488791
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests;
+
+import java.util.Map;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.infra.types.ElementTypeSetConfiguration;
+import org.eclipse.papyrus.infra.types.core.registries.ElementTypeSetConfigurationRegistry;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.HouseKeeper;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.Activator;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.intro.IIntroPart;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.ClassRule;
+import org.osgi.framework.Bundle;
+
+/**
+ * Abstract Papyrus initialization class (required to get Service activation).
+ */
+public abstract class AbstractTest extends AbstractPapyrusTest {
+
+ @ClassRule
+ public static final HouseKeeper.Static houseKeeper = new HouseKeeper.Static();
+
+ public static IEditorPart editor = null;
+
+ @BeforeClass
+ public static void openPapyrusWithAnEmptyProject() throws Exception {
+ Runnable closeIntroRunnable = new Runnable() {
+
+ public void run() {
+ IIntroPart introPart = PlatformUI.getWorkbench().getIntroManager().getIntro();
+ PlatformUI.getWorkbench().getIntroManager().closeIntro(introPart);
+ }
+ };
+ PlatformUI.getWorkbench().getDisplay().syncExec(closeIntroRunnable);
+
+ // Prepare new project for tests
+ IProject testProject = houseKeeper.createProject("TestProject");
+
+ // Copy EmptyModel from bundle to the test project
+ final IFile emptyModel_di = testProject.getFile("ModelWithBDD.di");
+ IFile emptyModel_no = testProject.getFile("ModelWithBDD.notation");
+ IFile emptyModel_uml = testProject.getFile("ModelWithBDD.uml");
+
+ Bundle bundle = Platform.getBundle("org.eclipse.papyrus.sysml.diagram.blockdefinition.tests");
+ emptyModel_di.create(bundle.getResource("/model/ModelWithBDD.di").openStream(), true, new NullProgressMonitor());
+ emptyModel_no.create(bundle.getResource("/model/ModelWithBDD.notation").openStream(), true, new NullProgressMonitor());
+ emptyModel_uml.create(bundle.getResource("/model/ModelWithBDD.uml").openStream(), true, new NullProgressMonitor());
+
+ // Open the EmptyModel.di file with Papyrus (assumed to be the default editor for "di" files here).
+ editor = houseKeeper.openPapyrusEditor(emptyModel_di);
+
+ // Set the preference to never for the dialog to display existing link instead of create a new one.
+ // The activator of "org.eclipse.papyrus.sysml.diagram.blockdefinition" returns the preference store of "org.eclipse.papyrus.infra.gmfdiag.preferences".
+ final IPreferenceStore store = Activator.getInstance().getPreferenceStore();
+ final String alwaysCreateLinkPreferenceName = PreferencesConstantsHelper.getPapyrusEditorConstant(PreferencesConstantsHelper.RESTORE_LINK_ELEMENT);
+ store.setValue(alwaysCreateLinkPreferenceName, true);
+ store.setDefault(alwaysCreateLinkPreferenceName, true);
+
+ ElementTypeSetConfigurationRegistry instance = ElementTypeSetConfigurationRegistry.getInstance();
+ Map<String, Map<String, ElementTypeSetConfiguration>> elementTypeSetConfigurations = instance.getElementTypeSetConfigurations();
+ Map<String, ElementTypeSetConfiguration> map = elementTypeSetConfigurations.get("org.eclipse.papyrus.sysml.architecture.SysML");
+ ElementTypeSetConfiguration elementTypeSetConfiguration = map.get("org.eclipse.papyrus.sysml.service.types.elementTypeSetBlocks");
+ Assert.assertNotNull("The SysML element type set definition is missing", elementTypeSetConfiguration);
+
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/canonical/TestAggregationValue.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/canonical/TestAggregationValue.java
new file mode 100755
index 0000000..78a2939
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/canonical/TestAggregationValue.java
@@ -0,0 +1,43 @@
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.canonical;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramCommandStack;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getTransactionalEditingDomain;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createElement;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.uml2.uml.AggregationKind;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class TestAggregationValue extends AbstractTest {
+
+ @Test
+ public void testValueTypedBlockPropertyAggregation() throws Exception {
+ EObject container = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ Assert.assertNotNull("Can't create container.", container);
+ // create ValueType node
+ EObject valueType = createElement(SysMLElementTypes.VALUE_TYPE, getDiagramView());
+ Assert.assertNotNull("Can't create ValueType node.", valueType);
+ // add Property to the container
+ EObject propertyObject = createElement(SysMLElementTypes.REFERENCE_PROPERTY, container);
+ Assert.assertNotNull("Can't create property.", propertyObject);
+ // test property aggregation
+ Assert.assertEquals("Wrong aggregation.", AggregationKind.NONE_LITERAL, ((Property) propertyObject).getAggregation());
+ // setup type of the property
+ SetRequest setTypeRequest = new SetRequest(getTransactionalEditingDomain(), propertyObject, UMLPackage.eINSTANCE.getTypedElement_Type(), valueType);
+ ICommand setTypeCommand = ElementEditServiceUtils.getCommandProvider(propertyObject.eContainer()).getEditCommand(setTypeRequest);
+ Assert.assertTrue("SetType command is not executable.", setTypeCommand.canExecute());
+ getDiagramCommandStack().execute(new ICommandProxy(setTypeCommand));
+ // test property aggregation
+ Assert.assertEquals("Wrong aggregation.", AggregationKind.COMPOSITE_LITERAL, ((Property) propertyObject).getAggregation());
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/copypaste/TestCopyGraphicallyPasteBlock.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/copypaste/TestCopyGraphicallyPasteBlock.java
new file mode 100755
index 0000000..9cfefeb
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/copypaste/TestCopyGraphicallyPasteBlock.java
@@ -0,0 +1,485 @@
+/*****************************************************************************
+ * Copyright (c) 2011-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:
+ * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.copypaste;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.createNodeFromPalette;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import junit.framework.Assert;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.sysml.blocks.Block;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.BeforeClass;
+import org.junit.Ignore;
+import org.junit.Test;
+
+/**
+ * Test class for Copy/paste actions
+ */
+public class TestCopyGraphicallyPasteBlock extends AbstractTest {
+
+
+ /** view to select, copy and paste */
+ private static View blockView1;
+
+ /** additional view to select, copy and paste a list of elements */
+ private static View blockView2;
+
+ /**
+ * Prepare the diagram before testing
+ *
+ * @throws Exception
+ * exception thrown in case of problem
+ */
+ @BeforeClass
+ public static void prepareBlockForTest() throws Exception {
+ try {
+ createNodeFromPalette("blockdefinition.tool.block", getDiagramView(), true);
+ blockView1 = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_CLASSIFIER_ID);
+
+ if(blockView1 == null) {
+ throw new Exception("Unable to prepare block for test.");
+ }
+
+ createNodeFromPalette("blockdefinition.tool.block", getDiagramView(), true);
+ blockView2 = (View)getDiagramView().getChildren().get(1);
+
+ if(blockView2 == null) {
+ throw new Exception("Unable to prepare block for test.");
+ }
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare block for test.", e);
+ }
+ }
+
+ /**
+ * Test the copy of a {@link Block} and paste in a {@link Diagram}
+ *
+ * @throws Exception
+ * exception thrown in case of problems
+ */
+ @SuppressWarnings("unchecked")
+ @Test
+ @Ignore("The test implementation is not compatible with Eclipse 4.2")
+ public void testCopyPasteBlockInDiagram() throws Exception {
+ // initial checks
+ EditPart blockEP = EditorUtils.getEditPart(blockView1);
+ Object initialBlockViewObject = blockEP.getModel();
+ Assert.assertTrue("Element should be a View, but is " + initialBlockViewObject, initialBlockViewObject instanceof View);
+ View initialBlockView = (View)initialBlockViewObject;
+ EObject modelElement = initialBlockView.getElement();
+ Assert.assertTrue("Model Element should be a Class, but is " + modelElement, modelElement instanceof org.eclipse.uml2.uml.Class);
+ Class initialBlock = (Class)modelElement;
+ Assert.assertTrue("model element should be stereotyped", initialBlock.getAppliedStereotype("SysML::Blocks::Block") != null);
+ List<EObject> initialViews = new ArrayList<EObject>();
+ initialViews.addAll(getDiagramView().getChildren());
+ Assert.assertEquals("Initial number of views do not fit expectations", 2, initialViews.size());
+ List<EObject> initialModelElements = new ArrayList<EObject>();
+ initialModelElements.addAll((List)getDiagramView().getElement().eGet(UMLPackage.eINSTANCE.getPackage_PackagedElement()));
+ Assert.assertEquals("Initial number of model elemnts do not fit expectations", 2, initialViews.size());
+
+
+ Assert.assertNotNull("Impossible to find edit part", blockEP);
+ TestUtils.copyEditParts(Collections.<Object> singletonList((Object)blockEP));
+
+ checkElements(getDiagramView().getChildren(), getDiagramView().getElement().eGet(UMLPackage.eINSTANCE.getPackage_PackagedElement(), true), 2, 2);
+ // Now should paste the elements
+ TestUtils.pasteEditParts(EditorUtils.getDiagramEditPart(), true);
+ checkElements(getDiagramView().getChildren(), getDiagramView().getElement().eGet(UMLPackage.eINSTANCE.getPackage_PackagedElement(), true), 3, 2);
+
+ // get copied element : new element from the collection (compare the 2 collections => before/after, and get the new one)
+ List<EObject> postPasteViews = new ArrayList<EObject>();
+ postPasteViews.addAll(getDiagramView().getChildren());
+ List<EObject> addedViews = new ArrayList<EObject>();
+ addedViews.addAll(postPasteViews);
+ //remove already existing elements
+ addedViews.removeAll(initialViews);
+ // check there is only one new
+ Assert.assertEquals("Final number of views do not fit expectations", 3, postPasteViews.size());
+ Assert.assertEquals("There should be only one element added to the diagram", 1, addedViews.size());
+
+ List<EObject> postPasteModelElements = new ArrayList<EObject>();
+ postPasteModelElements.addAll((List)getDiagramView().getElement().eGet(UMLPackage.eINSTANCE.getPackage_PackagedElement()));
+ List<EObject> addedModelElements = new ArrayList<EObject>();
+ addedModelElements.addAll(postPasteModelElements);
+ //remove already existing elements
+ addedModelElements.removeAll(initialModelElements);
+ // check there is only one new
+ Assert.assertEquals("Final number of model elements do not fit expectations", 2, postPasteModelElements.size());
+ Assert.assertEquals("There should be no element added to the model", 0, addedModelElements.size());
+
+
+ // test undo
+ EditorUtils.getCommandStack().undo();
+ checkElements(getDiagramView().getChildren(), getDiagramView().getElement().eGet(UMLPackage.eINSTANCE.getPackage_PackagedElement(), true), 2, 2);
+ Assert.assertEquals("Both collections should be equivalent", initialViews, getDiagramView().getChildren());
+ Assert.assertEquals("Both collections should be equivalent", initialModelElements, getDiagramView().getElement().eGet(UMLPackage.eINSTANCE.getPackage_PackagedElement(), true));
+
+ // test redo
+ EditorUtils.getCommandStack().redo();
+ checkElements(getDiagramView().getChildren(), getDiagramView().getElement().eGet(UMLPackage.eINSTANCE.getPackage_PackagedElement(), true), 3, 2);
+ Assert.assertEquals("Both collections should be equivalent", postPasteViews, getDiagramView().getChildren());
+ Assert.assertEquals("Both collections should be equivalent", postPasteModelElements, getDiagramView().getElement().eGet(UMLPackage.eINSTANCE.getPackage_PackagedElement(), true));
+
+ // do undo to get back previous state
+ EditorUtils.getCommandStack().undo();
+ checkElements(getDiagramView().getChildren(), getDiagramView().getElement().eGet(UMLPackage.eINSTANCE.getPackage_PackagedElement(), true), 2, 2);
+ Assert.assertEquals("Both collections should be equivalent", initialViews, getDiagramView().getChildren());
+ Assert.assertEquals("Both collections should be equivalent", initialModelElements, getDiagramView().getElement().eGet(UMLPackage.eINSTANCE.getPackage_PackagedElement(), true));
+ }
+
+ /**
+ * check the elements given expected numbers
+ *
+ * @param viewChildren
+ * list of view elements to check
+ * @param modelChildren
+ * model elements
+ * @param expectedChildrenViewsSize
+ * expected size of the view children
+ * @param expectedModelChildrenSize
+ * expected children for the parent element
+ */
+ protected static void checkElements(List<View> viewChildren, Object modelChildren, int expectedChildrenViewsSize, int expectedModelChildrenSize) {
+ Assert.assertEquals("There are no as many graphical children as expected", expectedChildrenViewsSize, viewChildren.size());
+ if(modelChildren instanceof List) {
+ Assert.assertEquals("There are no as many model children as expected", expectedModelChildrenSize, ((List<?>)modelChildren).size());
+ }
+ }
+
+
+ /**
+ * Test the copy of a {@link Block} and paste in a {@link Diagram}
+ *
+ * @throws Exception
+ * exception thrown in case of problems
+ */
+ @SuppressWarnings("unchecked")
+ @Test
+ @Ignore("The test implementation is not compatible with Eclipse 4.2")
+ public void testCopyPasteListOfBlocksInDiagram() throws Exception {
+ // initial checks
+ EditPart blockEP1 = EditorUtils.getEditPart(blockView1);
+ Assert.assertNotNull("Impossible to find edit part", blockEP1);
+ EditPart blockEP2 = EditorUtils.getEditPart(blockView2);
+ Assert.assertNotNull("Impossible to find edit part", blockEP2);
+ Object initialBlockViewObject1 = blockEP1.getModel();
+ Object initialBlockViewObject2 = blockEP2.getModel();
+ Assert.assertTrue("Element should be a View, but is " + initialBlockViewObject1, initialBlockViewObject1 instanceof View);
+ Assert.assertTrue("Element should be a View, but is " + initialBlockViewObject2, initialBlockViewObject2 instanceof View);
+ View initialBlockView1 = (View)initialBlockViewObject1;
+ View initialBlockView2 = (View)initialBlockViewObject2;
+ EObject modelElement1 = initialBlockView1.getElement();
+ EObject modelElement2 = initialBlockView2.getElement();
+ Assert.assertTrue("Model Element should be a Class, but is " + modelElement1, modelElement1 instanceof org.eclipse.uml2.uml.Class);
+ Assert.assertTrue("Model Element should be a Class, but is " + modelElement2, modelElement1 instanceof org.eclipse.uml2.uml.Class);
+
+ Class initialBlock1 = (Class)modelElement1;
+ Class initialBlock2 = (Class)modelElement2;
+ Assert.assertTrue("model element should be stereotyped", initialBlock1.getAppliedStereotype("SysML::Blocks::Block") != null);
+ Assert.assertTrue("model element should be stereotyped", initialBlock2.getAppliedStereotype("SysML::Blocks::Block") != null);
+ List<EObject> initialViews = new ArrayList<EObject>();
+ initialViews.addAll(getDiagramView().getChildren());
+ Assert.assertEquals("Initial number of views do not fit expectations", 2, initialViews.size());
+ List<EObject> initialModelElements = new ArrayList<EObject>();
+ initialModelElements.addAll((List)getDiagramView().getElement().eGet(UMLPackage.eINSTANCE.getPackage_PackagedElement()));
+ Assert.assertEquals("Initial number of model elemnts do not fit expectations", 2, initialModelElements.size());
+
+ TestUtils.copyEditParts(Arrays.<Object> asList(blockEP1, blockEP2));
+
+ checkElements(getDiagramView().getChildren(), getDiagramView().getElement().eGet(UMLPackage.eINSTANCE.getPackage_PackagedElement(), true), 2, 2);
+ // Now should paste the elements
+ TestUtils.pasteEditParts(EditorUtils.getDiagramEditPart(), true);
+ checkElements(getDiagramView().getChildren(), getDiagramView().getElement().eGet(UMLPackage.eINSTANCE.getPackage_PackagedElement(), true), 4, 2);
+
+ // get copied element : new element from the collection (compare the 2 collections => before/after, and get the new one)
+ List<EObject> postPasteViews = new ArrayList<EObject>();
+ postPasteViews.addAll(getDiagramView().getChildren());
+ List<EObject> addedObjects = new ArrayList<EObject>();
+ addedObjects.addAll(postPasteViews);
+ //remove already existing elements
+ addedObjects.removeAll(initialViews);
+ // check there is only one new
+ Assert.assertEquals("Final number of views do not fit expectations", 4, postPasteViews.size());
+ Assert.assertEquals("There should be only one element added to the diagram", 2, addedObjects.size());
+
+ List<EObject> postPasteModelElements = new ArrayList<EObject>();
+ postPasteModelElements.addAll((List)getDiagramView().getElement().eGet(UMLPackage.eINSTANCE.getPackage_PackagedElement()));
+ List<EObject> addedModelElements = new ArrayList<EObject>();
+ addedModelElements.addAll(postPasteModelElements);
+ //remove already existing elements
+ addedModelElements.removeAll(initialModelElements);
+ // check there is only one new
+ Assert.assertEquals("Final number of model elements do not fit expectations", 2, postPasteModelElements.size());
+ Assert.assertEquals("There should be no element added to the model", 0, addedModelElements.size());
+
+
+ // test undo
+ EditorUtils.getCommandStack().undo();
+ checkElements(getDiagramView().getChildren(), getDiagramView().getElement().eGet(UMLPackage.eINSTANCE.getPackage_PackagedElement(), true), 2, 2);
+ Assert.assertEquals("Both collections should be equivalent", initialViews, getDiagramView().getChildren());
+ Assert.assertEquals("Both collections should be equivalent", initialModelElements, getDiagramView().getElement().eGet(UMLPackage.eINSTANCE.getPackage_PackagedElement(), true));
+
+ // test redo
+ EditorUtils.getCommandStack().redo();
+ checkElements(getDiagramView().getChildren(), getDiagramView().getElement().eGet(UMLPackage.eINSTANCE.getPackage_PackagedElement(), true), 4, 2);
+ Assert.assertEquals("Both collections should be equivalent", postPasteViews, getDiagramView().getChildren());
+ Assert.assertEquals("Both collections should be equivalent", postPasteModelElements, getDiagramView().getElement().eGet(UMLPackage.eINSTANCE.getPackage_PackagedElement(), true));
+
+ // undo to restore previous state
+ EditorUtils.getCommandStack().undo();
+ checkElements(getDiagramView().getChildren(), getDiagramView().getElement().eGet(UMLPackage.eINSTANCE.getPackage_PackagedElement(), true), 2, 2);
+ Assert.assertEquals("Both collections should be equivalent", initialViews, getDiagramView().getChildren());
+ Assert.assertEquals("Both collections should be equivalent", initialModelElements, getDiagramView().getElement().eGet(UMLPackage.eINSTANCE.getPackage_PackagedElement(), true));
+
+ }
+
+ /**
+ * Test the copy of a {@link Block} and paste with model in a {@link Diagram}
+ *
+ * @throws Exception
+ * exception thrown in case of problems
+ */
+ @SuppressWarnings("unchecked")
+ @Test
+ @Ignore("The test implementation is not compatible with Eclipse 4.2")
+ public void testCopyPasteWithModelBlockInDiagram() throws Exception {
+ // initial checks
+ EditPart blockEP = EditorUtils.getEditPart(blockView1);
+ Object initialBlockViewObject = blockEP.getModel();
+ Assert.assertTrue("Element should be a View, but is " + initialBlockViewObject, initialBlockViewObject instanceof View);
+ View initialBlockView = (View)initialBlockViewObject;
+ EObject modelElement = initialBlockView.getElement();
+ Assert.assertTrue("Model Element should be a Class, but is " + modelElement, modelElement instanceof org.eclipse.uml2.uml.Class);
+ Class initialBlock = (Class)modelElement;
+ Assert.assertTrue("model element should be stereotyped", initialBlock.getAppliedStereotype("SysML::Blocks::Block") != null);
+ List<EObject> initialViews = new ArrayList<EObject>();
+ initialViews.addAll(getDiagramView().getChildren());
+ Assert.assertEquals("Initial number of views do not fit expectations", 2, initialViews.size());
+ List<EObject> initialModelElements = new ArrayList<EObject>();
+ initialModelElements.addAll((List)getDiagramView().getElement().eGet(UMLPackage.eINSTANCE.getPackage_PackagedElement()));
+ Assert.assertEquals("Initial number of model elemnts do not fit expectations", 2, initialViews.size());
+
+ Assert.assertNotNull("Impossible to find edit part", blockEP);
+ TestUtils.copyEditParts(Collections.<Object> singletonList((Object)blockEP));
+
+ checkElements(getDiagramView().getChildren(), getDiagramView().getElement().eGet(UMLPackage.eINSTANCE.getPackage_PackagedElement(), true), 2, 2);
+ // Now should paste the elements
+ TestUtils.pasteWithModelEditParts(EditorUtils.getDiagramEditPart(), true);
+ checkElements(getDiagramView().getChildren(), getDiagramView().getElement().eGet(UMLPackage.eINSTANCE.getPackage_PackagedElement(), true), 3, 3);
+
+ // get copied element : new element from the collection (compare the 2 collections => before/after, and get the new one)
+ List<EObject> postPasteViews = new ArrayList<EObject>();
+ postPasteViews.addAll(getDiagramView().getChildren());
+ List<EObject> addedViews = new ArrayList<EObject>();
+ addedViews.addAll(postPasteViews);
+ //remove already existing elements
+ addedViews.removeAll(initialViews);
+ // check there is only one new
+ Assert.assertEquals("Final number of views do not fit expectations", 3, postPasteViews.size());
+ Assert.assertEquals("There should be only one element added to the diagram", 1, addedViews.size());
+
+ List<EObject> postPasteModelElements = new ArrayList<EObject>();
+ postPasteModelElements.addAll((List)getDiagramView().getElement().eGet(UMLPackage.eINSTANCE.getPackage_PackagedElement()));
+ List<EObject> addedModelElements = new ArrayList<EObject>();
+ addedModelElements.addAll(postPasteModelElements);
+ //remove already existing elements
+ addedModelElements.removeAll(initialModelElements);
+ // check there is only one new
+ Assert.assertEquals("Final number of model elements do not fit expectations", 3, postPasteModelElements.size());
+ Assert.assertEquals("There should be no element added to the model", 1, addedModelElements.size());
+
+ //Retrieve added model element and check name
+ EObject addedObject = addedModelElements.get(0);
+ Assert.assertTrue("Element should be a class", addedObject instanceof Class);
+ Class addedBlock = (Class)addedObject;
+ Assert.assertTrue("Model element should be stereotyped", addedBlock.getAppliedStereotype("SysML::Blocks::Block") != null);
+
+ // check name
+ String expectedName = "Copy_Of_Block1_1";
+ Assert.assertEquals("Name of the element is not " + expectedName, expectedName, addedBlock.getName());
+
+ // test undo
+ EditorUtils.getCommandStack().undo();
+ checkElements(getDiagramView().getChildren(), getDiagramView().getElement().eGet(UMLPackage.eINSTANCE.getPackage_PackagedElement(), true), 2, 2);
+ Assert.assertEquals("Both collections should be equivalent", initialViews, getDiagramView().getChildren());
+ Assert.assertEquals("Both collections should be equivalent", initialModelElements, getDiagramView().getElement().eGet(UMLPackage.eINSTANCE.getPackage_PackagedElement(), true));
+
+ // test redo
+ EditorUtils.getCommandStack().redo();
+ checkElements(getDiagramView().getChildren(), getDiagramView().getElement().eGet(UMLPackage.eINSTANCE.getPackage_PackagedElement(), true), 3, 3);
+ Assert.assertEquals("Both collections should be equivalent", postPasteViews, getDiagramView().getChildren());
+ Assert.assertEquals("Both collections should be equivalent", postPasteModelElements, getDiagramView().getElement().eGet(UMLPackage.eINSTANCE.getPackage_PackagedElement(), true));
+
+ // do undo to get back previous state
+ EditorUtils.getCommandStack().undo();
+ checkElements(getDiagramView().getChildren(), getDiagramView().getElement().eGet(UMLPackage.eINSTANCE.getPackage_PackagedElement(), true), 2, 2);
+ Assert.assertEquals("Both collections should be equivalent", initialViews, getDiagramView().getChildren());
+ Assert.assertEquals("Both collections should be equivalent", initialModelElements, getDiagramView().getElement().eGet(UMLPackage.eINSTANCE.getPackage_PackagedElement(), true));
+
+ }
+
+ /**
+ * Test the copy of a {@link Block} and paste in a {@link Diagram}
+ *
+ * @throws Exception
+ * exception thrown in case of problems
+ */
+ @SuppressWarnings("unchecked")
+ @Test
+ @Ignore("The test implementation is not compatible with Eclipse 4.2")
+ public void testCopyPasteWithModelListOfBlocksInDiagram() throws Exception {
+ // initial checks
+ EditPart blockEP1 = EditorUtils.getEditPart(blockView1);
+ Assert.assertNotNull("Impossible to find edit part", blockEP1);
+ EditPart blockEP2 = EditorUtils.getEditPart(blockView2);
+ Assert.assertNotNull("Impossible to find edit part", blockEP2);
+ Object initialBlockViewObject1 = blockEP1.getModel();
+ Object initialBlockViewObject2 = blockEP2.getModel();
+ Assert.assertTrue("Element should be a View, but is " + initialBlockViewObject1, initialBlockViewObject1 instanceof View);
+ Assert.assertTrue("Element should be a View, but is " + initialBlockViewObject2, initialBlockViewObject2 instanceof View);
+ View initialBlockView1 = (View)initialBlockViewObject1;
+ View initialBlockView2 = (View)initialBlockViewObject2;
+ EObject modelElement1 = initialBlockView1.getElement();
+ EObject modelElement2 = initialBlockView2.getElement();
+ Assert.assertTrue("Model Element should be a Class, but is " + modelElement1, modelElement1 instanceof org.eclipse.uml2.uml.Class);
+ Assert.assertTrue("Model Element should be a Class, but is " + modelElement2, modelElement1 instanceof org.eclipse.uml2.uml.Class);
+ setName(modelElement1, "Copy_Of_Block");
+ setName(modelElement2, "Copy_Of_Block1");
+
+ Class initialBlock1 = (Class)modelElement1;
+ Class initialBlock2 = (Class)modelElement2;
+ Assert.assertTrue("model element should be stereotyped", initialBlock1.getAppliedStereotype("SysML::Blocks::Block") != null);
+ Assert.assertTrue("model element should be stereotyped", initialBlock2.getAppliedStereotype("SysML::Blocks::Block") != null);
+ List<EObject> initialViews = new ArrayList<EObject>();
+ initialViews.addAll(getDiagramView().getChildren());
+ Assert.assertEquals("Initial number of views do not fit expectations", 2, initialViews.size());
+ List<EObject> initialModelElements = new ArrayList<EObject>();
+ initialModelElements.addAll((List)getDiagramView().getElement().eGet(UMLPackage.eINSTANCE.getPackage_PackagedElement()));
+ Assert.assertEquals("Initial number of model elemnts do not fit expectations", 2, initialViews.size());
+
+ TestUtils.copyEditParts(Arrays.<Object> asList(blockEP1, blockEP2));
+
+ checkElements(getDiagramView().getChildren(), getDiagramView().getElement().eGet(UMLPackage.eINSTANCE.getPackage_PackagedElement(), true), 2, 2);
+ // Now should paste the elements
+ TestUtils.pasteWithModelEditParts(EditorUtils.getDiagramEditPart(), true);
+ checkElements(getDiagramView().getChildren(), getDiagramView().getElement().eGet(UMLPackage.eINSTANCE.getPackage_PackagedElement(), true), 4, 4);
+
+ // get copied element : new element from the collection (compare the 2 collections => before/after, and get the new one)
+ List<EObject> postPasteViews = new ArrayList<EObject>();
+ postPasteViews.addAll(getDiagramView().getChildren());
+ List<EObject> addedObjects = new ArrayList<EObject>();
+ addedObjects.addAll(postPasteViews);
+ //remove already existing elements
+ addedObjects.removeAll(initialViews);
+ // check there is only one new
+ Assert.assertEquals("Final number of views do not fit expectations", 4, postPasteViews.size());
+ Assert.assertEquals("There should be only one element added to the diagram", 2, addedObjects.size());
+
+ List<EObject> postPasteModelElements = new ArrayList<EObject>();
+ postPasteModelElements.addAll((List)getDiagramView().getElement().eGet(UMLPackage.eINSTANCE.getPackage_PackagedElement()));
+ List<EObject> addedModelElements = new ArrayList<EObject>();
+ addedModelElements.addAll(postPasteModelElements);
+ //remove already existing elements
+ addedModelElements.removeAll(initialModelElements);
+ // check there is only one new
+ Assert.assertEquals("Final number of model elements do not fit expectations", 4, postPasteModelElements.size());
+ Assert.assertEquals("There should be no element added to the model", 2, addedModelElements.size());
+
+ //Retrieve added model element and check name
+ EObject addedObject1 = addedModelElements.get(0);
+ Assert.assertTrue("Element should be a class", addedObject1 instanceof Class);
+ Class addedBlock1 = (Class)addedObject1;
+ Assert.assertTrue("Model element should be stereotyped", addedBlock1.getAppliedStereotype("SysML::Blocks::Block") != null);
+
+ // check name: not possible, because list are not ordered.
+ //String expectedName = "Copy_Of_Block_1"; // Warning: this name already exists...
+ //Assert.assertEquals("Name of the element is not " + expectedName, expectedName, addedBlock1.getName());
+
+ //Retrieve added model element and check name
+ EObject addedObject2 = addedModelElements.get(1);
+ Assert.assertTrue("Element should be a class", addedObject2 instanceof Class);
+ Class addedBlock2 = (Class)addedObject2;
+ Assert.assertTrue("Model element should be stereotyped", addedBlock2.getAppliedStereotype("SysML::Blocks::Block") != null);
+
+ // check name
+ //expectedName = "Copy_Of_Block_1"; // Warning: this name already exists...
+ // Assert.assertEquals("Name of the element is not " + expectedName, expectedName, addedBlock2.getName());
+
+ // test undo
+ EditorUtils.getCommandStack().undo();
+ checkElements(getDiagramView().getChildren(), getDiagramView().getElement().eGet(UMLPackage.eINSTANCE.getPackage_PackagedElement(), true), 2, 2);
+ Assert.assertEquals("Both collections should be equivalent", initialViews, getDiagramView().getChildren());
+ Assert.assertEquals("Both collections should be equivalent", initialModelElements, getDiagramView().getElement().eGet(UMLPackage.eINSTANCE.getPackage_PackagedElement(), true));
+
+ // test redo
+ EditorUtils.getCommandStack().redo();
+ checkElements(getDiagramView().getChildren(), getDiagramView().getElement().eGet(UMLPackage.eINSTANCE.getPackage_PackagedElement(), true), 4, 4);
+ Assert.assertEquals("Both collections should be equivalent", postPasteViews, getDiagramView().getChildren());
+ Assert.assertEquals("Both collections should be equivalent", postPasteModelElements, getDiagramView().getElement().eGet(UMLPackage.eINSTANCE.getPackage_PackagedElement(), true));
+
+ // undo to restore previous state
+ EditorUtils.getCommandStack().undo();
+ checkElements(getDiagramView().getChildren(), getDiagramView().getElement().eGet(UMLPackage.eINSTANCE.getPackage_PackagedElement(), true), 2, 2);
+ Assert.assertEquals("Both collections should be equivalent", initialViews, getDiagramView().getChildren());
+ Assert.assertEquals("Both collections should be equivalent", initialModelElements, getDiagramView().getElement().eGet(UMLPackage.eINSTANCE.getPackage_PackagedElement(), true));
+
+ }
+
+ /**
+ * Sets the name of a {@link NamedElement}
+ *
+ * @param eObject
+ * the named element to rename
+ * @param newName
+ * the new name to set
+ * @throws Exception
+ * exception thrown when something bad happens
+ */
+ private static void setName(EObject eObject, String newName) throws Exception {
+ SetRequest request = new SetRequest(eObject, UMLPackage.eINSTANCE.getNamedElement_Name(), newName);
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(eObject);
+ if(provider != null) {
+ // Retrieve delete command from the Element Edit service
+ ICommand setNameCommand = provider.getEditCommand(request);
+ IStatus status = setNameCommand.execute(null, null);
+ Assert.assertTrue("Problem during set name: " + status.getMessage(), status.isOK());
+ } else {
+ Assert.fail("no provider found");
+ }
+ Assert.assertEquals("Name expected: " + newName, newName, eObject.eGet(UMLPackage.eINSTANCE.getNamedElement_Name()));
+
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/TestDiagramCreation.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/TestDiagramCreation.java
new file mode 100755
index 0000000..2069385
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/TestDiagramCreation.java
@@ -0,0 +1,33 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation;
+
+import static org.junit.Assert.fail;
+
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.junit.Ignore;
+import org.junit.Test;
+
+/**
+ * JUnit tests for Block Definition Diagram Creation.
+ */
+public class TestDiagramCreation extends AbstractTest {
+
+ @Ignore("Test not implemented.")
+ @Test
+ public void createDiagram() {
+ fail("Test not implemented.");
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/TestNodeCreationOnDiagram.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/TestNodeCreationOnDiagram.java
new file mode 100755
index 0000000..dd28f91
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/TestNodeCreationOnDiagram.java
@@ -0,0 +1,218 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getEditPart;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.changeVisibility;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in diagram.
+ */
+public class TestNodeCreationOnDiagram extends AbstractTest {
+
+ @Test // https://bugs.eclipse.org/bugs/show_bug.cgi?id=348549
+ public void dropExceptionToFix_bug348549() throws Exception {
+
+ View propertyView;
+ View containerView;
+
+ try {
+ View elementView = TestPrepareUtils.createGraphicalNode(SysMLElementTypes.BLOCK, SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_CLASSIFIER_ID, getDiagramView());
+ containerView = ViewUtil.getChildBySemanticHint(elementView, SysMLGraphicalTypes.COMPARTMENT_SYSML_PROPERTY_AS_LIST_ID);
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!containerView.isVisible()) {
+ changeVisibility(containerView);
+ }
+
+ propertyView = TestPrepareUtils.createGraphicalNode(UMLElementTypes.PROPERTY, UMLGraphicalTypes.SHAPE_UML_PROPERTY_AS_LABEL_ID, containerView);
+
+ } catch (Exception e) {
+ throw new Exception("Failure during test preparation.", e);
+ }
+
+ getEditPart(getDiagramView()).setFocus(true);
+ getEditPart(propertyView).setFocus(true); // This should not throw the following exception
+// getEditPart(containerView).setFocus(true); // This should throw the following exception (assuming the owner does not have the focus).
+// java.lang.IllegalArgumentException: An EditPart has to be selectable (isSelectable() == true) in order to obtain focus.
+// at org.eclipse.core.runtime.Assert.isLegal(Assert.java:63)
+// at org.eclipse.gef.editparts.AbstractEditPart.setFocus(AbstractEditPart.java:1005)
+// at org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.link.TestLinkDropOnModel.dropDependency(TestLinkDropOnModel.java:71)
+ }
+
+ @Test
+ public void testCreationActorInDiagram() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actor", getDiagramView(), true);
+ }
+
+ @Test
+ public void testCreationActorPartInDiagram() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actorpart", getDiagramView(), false);
+ }
+
+ @Test
+ public void testCreationBlockInDiagram() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.block", getDiagramView(), true);
+ }
+
+ @Test
+ public void testCreationCommentInDiagram() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.comment", getDiagramView(), true);
+ }
+
+ @Test
+ public void testCreationConstraintBlockInDiagram() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintblock", getDiagramView(), true);
+ }
+
+ @Test
+ public void testCreationConstraintInDiagram() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraint", getDiagramView(), true);
+ }
+
+ @Test
+ public void testCreationConstraintPropertyInDiagram() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintproperty", getDiagramView(), false);
+ }
+
+ @Test
+ public void testCreationDataTypeInDiagram() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.datatype", getDiagramView(), true);
+ }
+
+ @Test
+ public void testCreationDimensionInDiagram() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.dimension", getDiagramView(), true);
+ }
+
+ @Test
+ public void testCreationEnumerationInDiagram() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumeration", getDiagramView(), true);
+ }
+
+ @Test
+ public void testCreationEnumerationLiteralInDiagram() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumerationliteral", getDiagramView(), false);
+ }
+
+ @Test
+ public void testCreationFlowPortInDiagram() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowport", getDiagramView(), false);
+ }
+
+ @Test
+ public void testCreationFlowPropertyInDiagram() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowproperty", getDiagramView(), false);
+ }
+
+ @Test
+ public void testCreationFlowSpecificationInDiagram() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowspecification", getDiagramView(), true);
+ }
+
+ @Test
+ public void testCreationInstanceSpecificationInDiagram() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.instancespecification", getDiagramView(), true);
+ }
+
+ @Test
+ public void testCreationInterfaceInDiagram() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.interface", getDiagramView(), true);
+ }
+
+ @Test
+ public void testCreationModelInDiagram() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.model", getDiagramView(), true);
+ }
+
+ @Test
+ public void testCreationOperationInDiagram() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.operation", getDiagramView(), false);
+ }
+
+ @Test
+ public void testCreationPackageInDiagram() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.package", getDiagramView(), true);
+ }
+
+ @Test
+ public void testCreationPartInDiagram() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.part", getDiagramView(), false);
+ }
+
+ @Test
+ public void testCreationPortInDiagram() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.port", getDiagramView(), false);
+ }
+
+ @Test
+ public void testCreationPrimitiveTypeInDiagram() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.primitivetype", getDiagramView(), true);
+ }
+
+ @Test
+ public void testCreationPropertyInDiagram() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.property", getDiagramView(), false);
+ }
+
+ @Test
+ public void testCreationReceptionInDiagram() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reception", getDiagramView(), false);
+ }
+
+ @Test
+ public void testCreationReferenceInDiagram() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reference", getDiagramView(), false);
+ }
+
+ @Test
+ public void testCreationSignalInDiagram() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.signal", getDiagramView(), true);
+ }
+
+ @Test
+ public void testCreationSlotInDiagram() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.slot", getDiagramView(), false);
+ }
+
+ @Test
+ public void testCreationUnitInDiagram() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.unit", getDiagramView(), true);
+ }
+
+ @Test
+ public void testCreationValueInDiagram() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.value", getDiagramView(), false);
+ }
+
+ @Test
+ public void testCreationValueTypeInDiagram() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.valuetype", getDiagramView(), true);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnActor.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnActor.java
new file mode 100755
index 0000000..7f56b4d
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnActor.java
@@ -0,0 +1,201 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in an Actor.
+ */
+public class TestNodeCreationOnActor extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ // force inherited provider loading...
+ createGraphicalNode(UMLElementTypes.PACKAGE, ElementTypes.PACKAGE.getSemanticHint(), getDiagramView());
+
+ // prepare container
+ containerView = createGraphicalNode(UMLElementTypes.ACTOR, UMLGraphicalTypes.SHAPE_UML_ACTOR_AS_CLASSIFIER_ID, getDiagramView());
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActor() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actor", containerView, false);
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.block", containerView, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.comment", containerView, false);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraint", containerView, false);
+ }
+
+ @Test
+ public void createConstraintBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintblock", containerView, false);
+ }
+
+ @Test
+ public void createConstraintProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintproperty", containerView, false);
+ }
+
+ @Test
+ public void createDataType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.datatype", containerView, false);
+ }
+
+ @Test
+ public void createDimension() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.dimension", containerView, false);
+ }
+
+ @Test
+ public void createEnumeration() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumeration", containerView, false);
+ }
+
+ @Test
+ public void createEnumerationLiteral() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumerationliteral", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowport", containerView, false);
+ }
+
+ @Test
+ public void createFlowProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowproperty", containerView, false);
+ }
+
+ @Test
+ public void createFlowSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowspecification", containerView, false);
+ }
+
+ @Test
+ public void createInstanceSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.instancespecification", containerView, false);
+ }
+
+ @Test
+ public void createInterface() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.interface", containerView, false);
+ }
+
+ @Test
+ public void createModel() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.model", containerView, false);
+ }
+
+ @Test
+ public void createOperation() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.operation", containerView, false);
+ }
+
+ @Test
+ public void createPackage() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.package", containerView, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createPrimitiveType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.primitivetype", containerView, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.property", containerView, false);
+ }
+
+ @Test
+ public void createReception() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reception", containerView, false);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createSignal() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.signal", containerView, false);
+ }
+
+ @Test
+ public void createSlot() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.slot", containerView, false);
+ }
+
+ @Test
+ public void createUnit() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.unit", containerView, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createValueType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.valuetype", containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnActorOperationCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnActorOperationCompartment.java
new file mode 100755
index 0000000..ed85c8d
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnActorOperationCompartment.java
@@ -0,0 +1,30 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom;
+
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.junit.Ignore;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in an Actor "operations" compartment.
+ */
+public class TestNodeCreationOnActorOperationCompartment extends AbstractTest {
+
+ @Ignore("Actor should not have operations compartment.")
+ @Test
+ public void warning() {
+ };
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnActorPropertyCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnActorPropertyCompartment.java
new file mode 100755
index 0000000..e333dc4
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnActorPropertyCompartment.java
@@ -0,0 +1,30 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom;
+
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.junit.Ignore;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in an Actor "properties" compartment.
+ */
+public class TestNodeCreationOnActorPropertyCompartment extends AbstractTest {
+
+ @Ignore("Actor should not have properties compartment.")
+ @Test
+ public void warning() {
+ };
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnBlock.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnBlock.java
new file mode 100755
index 0000000..2d78444
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnBlock.java
@@ -0,0 +1,202 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in a Block.
+ */
+public class TestNodeCreationOnBlock extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ // force inherited provider loading...
+ createGraphicalNode(UMLElementTypes.PACKAGE, ElementTypes.PACKAGE.getSemanticHint(), getDiagramView());
+
+ // prepare container
+ containerView = createGraphicalNode(SysMLElementTypes.BLOCK, SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_CLASSIFIER_ID, getDiagramView());
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActor() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actor", containerView, false);
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.block", containerView, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.comment", containerView, false);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraint", containerView, false);
+ }
+
+ @Test
+ public void createConstraintBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintblock", containerView, false);
+ }
+
+ @Test
+ public void createConstraintProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintproperty", containerView, false);
+ }
+
+ @Test
+ public void createDataType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.datatype", containerView, false);
+ }
+
+ @Test
+ public void createDimension() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.dimension", containerView, false);
+ }
+
+ @Test
+ public void createEnumeration() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumeration", containerView, false);
+ }
+
+ @Test
+ public void createEnumerationLiteral() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumerationliteral", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowport", containerView, true);
+ }
+
+ @Test
+ public void createFlowProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowproperty", containerView, false);
+ }
+
+ @Test
+ public void createFlowSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowspecification", containerView, false);
+ }
+
+ @Test
+ public void createInstanceSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.instancespecification", containerView, false);
+ }
+
+ @Test
+ public void createInterface() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.interface", containerView, false);
+ }
+
+ @Test
+ public void createModel() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.model", containerView, false);
+ }
+
+ @Test
+ public void createOperation() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.operation", containerView, false);
+ }
+
+ @Test
+ public void createPackage() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.package", containerView, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.port", containerView, true);
+ }
+
+ @Test
+ public void createPrimitiveType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.primitivetype", containerView, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.property", containerView, false);
+ }
+
+ @Test
+ public void createReception() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reception", containerView, false);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createSignal() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.signal", containerView, false);
+ }
+
+ @Test
+ public void createSlot() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.slot", containerView, false);
+ }
+
+ @Test
+ public void createUnit() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.unit", containerView, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createValueType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.valuetype", containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnBlockConstraintCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnBlockConstraintCompartment.java
new file mode 100755
index 0000000..c28f084
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnBlockConstraintCompartment.java
@@ -0,0 +1,207 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.changeVisibility;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in a Block "constraints" compartment.
+ */
+public class TestNodeCreationOnBlockConstraintCompartment extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ createNodeFromPalette("blockdefinition.tool.block", getDiagramView(), true);
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_CLASSIFIER_ID);
+ containerView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_CONSTRAINT_AS_LIST_ID);
+
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!containerView.isVisible()) {
+ changeVisibility(containerView);
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActor() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actor", containerView, false);
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.block", containerView, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.comment", containerView, false);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraint", containerView, true);
+ }
+
+ @Test
+ public void createConstraintBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintblock", containerView, false);
+ }
+
+ @Test
+ public void createConstraintProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintproperty", containerView, true);
+ }
+
+ @Test
+ public void createDataType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.datatype", containerView, false);
+ }
+
+ @Test
+ public void createDimension() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.dimension", containerView, false);
+ }
+
+ @Test
+ public void createEnumeration() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumeration", containerView, false);
+ }
+
+ @Test
+ public void createEnumerationLiteral() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumerationliteral", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowport", containerView, false);
+ }
+
+ @Test
+ public void createFlowProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowproperty", containerView, false);
+ }
+
+ @Test
+ public void createFlowSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowspecification", containerView, false);
+ }
+
+ @Test
+ public void createInstanceSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.instancespecification", containerView, false);
+ }
+
+ @Test
+ public void createInterface() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.interface", containerView, false);
+ }
+
+ @Test
+ public void createModel() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.model", containerView, false);
+ }
+
+ @Test
+ public void createOperation() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.operation", containerView, false);
+ }
+
+ @Test
+ public void createPackage() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.package", containerView, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ // Do not execute as this requires user interaction (dialog)
+ createNodeFromPalette("blockdefinition.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createPrimitiveType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.primitivetype", containerView, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.property", containerView, false);
+ }
+
+ @Test
+ public void createReception() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reception", containerView, false);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ // Do not execute as this requires user interaction (dialog)
+ createNodeFromPalette("blockdefinition.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createSignal() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.signal", containerView, false);
+ }
+
+ @Test
+ public void createSlot() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.slot", containerView, false);
+ }
+
+ @Test
+ public void createUnit() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.unit", containerView, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ // Do not execute as this requires user interaction (dialog)
+ createNodeFromPalette("blockdefinition.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createValueType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.valuetype", containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnBlockFlowPortCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnBlockFlowPortCompartment.java
new file mode 100755
index 0000000..05d2d86
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnBlockFlowPortCompartment.java
@@ -0,0 +1,207 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.changeVisibility;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in a Block "flow ports" compartment.
+ */
+public class TestNodeCreationOnBlockFlowPortCompartment extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ createNodeFromPalette("blockdefinition.tool.block", getDiagramView(), true);
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_CLASSIFIER_ID);
+ containerView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_FLOWPORT_AS_LIST_ID);
+
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!containerView.isVisible()) {
+ changeVisibility(containerView);
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActor() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actor", containerView, false);
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.block", containerView, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.comment", containerView, false);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraint", containerView, false);
+ }
+
+ @Test
+ public void createConstraintBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintblock", containerView, false);
+ }
+
+ @Test
+ public void createConstraintProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintproperty", containerView, false);
+ }
+
+ @Test
+ public void createDataType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.datatype", containerView, false);
+ }
+
+ @Test
+ public void createDimension() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.dimension", containerView, false);
+ }
+
+ @Test
+ public void createEnumeration() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumeration", containerView, false);
+ }
+
+ @Test
+ public void createEnumerationLiteral() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumerationliteral", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowport", containerView, true);
+ }
+
+ @Test
+ public void createFlowProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowproperty", containerView, false);
+ }
+
+ @Test
+ public void createFlowSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowspecification", containerView, false);
+ }
+
+ @Test
+ public void createInstanceSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.instancespecification", containerView, false);
+ }
+
+ @Test
+ public void createInterface() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.interface", containerView, false);
+ }
+
+ @Test
+ public void createModel() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.model", containerView, false);
+ }
+
+ @Test
+ public void createOperation() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.operation", containerView, false);
+ }
+
+ @Test
+ public void createPackage() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.package", containerView, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ // Do not execute as this requires user interaction (dialog)
+ createNodeFromPalette("blockdefinition.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createPrimitiveType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.primitivetype", containerView, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.property", containerView, false);
+ }
+
+ @Test
+ public void createReception() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reception", containerView, false);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ // Do not execute as this requires user interaction (dialog)
+ createNodeFromPalette("blockdefinition.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createSignal() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.signal", containerView, false);
+ }
+
+ @Test
+ public void createSlot() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.slot", containerView, false);
+ }
+
+ @Test
+ public void createUnit() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.unit", containerView, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ // Do not execute as this requires user interaction (dialog)
+ createNodeFromPalette("blockdefinition.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createValueType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.valuetype", containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnBlockOperationCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnBlockOperationCompartment.java
new file mode 100755
index 0000000..d9a9627
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnBlockOperationCompartment.java
@@ -0,0 +1,208 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.changeVisibility;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in a Block "operations" compartment.
+ */
+public class TestNodeCreationOnBlockOperationCompartment extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ createNodeFromPalette("blockdefinition.tool.block", getDiagramView(), true);
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_CLASSIFIER_ID);
+ containerView = ViewUtil.getChildBySemanticHint(blockView, UMLGraphicalTypes.COMPARTMENT_UML_OPERATION_AS_LIST_ID);
+
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!containerView.isVisible()) {
+ changeVisibility(containerView);
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActor() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actor", containerView, false);
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.block", containerView, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.comment", containerView, false);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraint", containerView, false);
+ }
+
+ @Test
+ public void createConstraintBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintblock", containerView, false);
+ }
+
+ @Test
+ public void createConstraintProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintproperty", containerView, false);
+ }
+
+ @Test
+ public void createDataType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.datatype", containerView, false);
+ }
+
+ @Test
+ public void createDimension() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.dimension", containerView, false);
+ }
+
+ @Test
+ public void createEnumeration() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumeration", containerView, false);
+ }
+
+ @Test
+ public void createEnumerationLiteral() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumerationliteral", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowport", containerView, false);
+ }
+
+ @Test
+ public void createFlowProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowproperty", containerView, false);
+ }
+
+ @Test
+ public void createFlowSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowspecification", containerView, false);
+ }
+
+ @Test
+ public void createInstanceSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.instancespecification", containerView, false);
+ }
+
+ @Test
+ public void createInterface() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.interface", containerView, false);
+ }
+
+ @Test
+ public void createModel() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.model", containerView, false);
+ }
+
+ @Test
+ public void createOperation() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.operation", containerView, true);
+ }
+
+ @Test
+ public void createPackage() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.package", containerView, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ // Do not execute as this requires user interaction (dialog)
+ createNodeFromPalette("blockdefinition.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createPrimitiveType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.primitivetype", containerView, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.property", containerView, false);
+ }
+
+ @Test
+ public void createReception() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reception", containerView, true);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ // Do not execute as this requires user interaction (dialog)
+ createNodeFromPalette("blockdefinition.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createSignal() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.signal", containerView, false);
+ }
+
+ @Test
+ public void createSlot() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.slot", containerView, false);
+ }
+
+ @Test
+ public void createUnit() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.unit", containerView, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ // Do not execute as this requires user interaction (dialog)
+ createNodeFromPalette("blockdefinition.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createValueType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.valuetype", containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnBlockPartCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnBlockPartCompartment.java
new file mode 100755
index 0000000..d57dd18
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnBlockPartCompartment.java
@@ -0,0 +1,207 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.changeVisibility;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in a Block "parts" compartment.
+ */
+public class TestNodeCreationOnBlockPartCompartment extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ createNodeFromPalette("blockdefinition.tool.block", getDiagramView(), true);
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_CLASSIFIER_ID);
+ containerView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_PART_AS_LIST_ID);
+
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!containerView.isVisible()) {
+ changeVisibility(containerView);
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActor() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actor", containerView, false);
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.block", containerView, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.comment", containerView, false);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraint", containerView, false);
+ }
+
+ @Test
+ public void createConstraintBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintblock", containerView, false);
+ }
+
+ @Test
+ public void createConstraintProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintproperty", containerView, false);
+ }
+
+ @Test
+ public void createDataType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.datatype", containerView, false);
+ }
+
+ @Test
+ public void createDimension() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.dimension", containerView, false);
+ }
+
+ @Test
+ public void createEnumeration() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumeration", containerView, false);
+ }
+
+ @Test
+ public void createEnumerationLiteral() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumerationliteral", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowport", containerView, false);
+ }
+
+ @Test
+ public void createFlowProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowproperty", containerView, false);
+ }
+
+ @Test
+ public void createFlowSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowspecification", containerView, false);
+ }
+
+ @Test
+ public void createInstanceSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.instancespecification", containerView, false);
+ }
+
+ @Test
+ public void createInterface() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.interface", containerView, false);
+ }
+
+ @Test
+ public void createModel() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.model", containerView, false);
+ }
+
+ @Test
+ public void createOperation() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.operation", containerView, false);
+ }
+
+ @Test
+ public void createPackage() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.package", containerView, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ // Do not execute as this requires user interaction (dialog)
+ createNodeFromPalette("blockdefinition.tool.part", containerView, true, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createPrimitiveType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.primitivetype", containerView, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.property", containerView, false);
+ }
+
+ @Test
+ public void createReception() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reception", containerView, false);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ // Do not execute as this requires user interaction (dialog)
+ createNodeFromPalette("blockdefinition.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createSignal() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.signal", containerView, false);
+ }
+
+ @Test
+ public void createSlot() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.slot", containerView, false);
+ }
+
+ @Test
+ public void createUnit() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.unit", containerView, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ // Do not execute as this requires user interaction (dialog)
+ createNodeFromPalette("blockdefinition.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createValueType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.valuetype", containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnBlockPortCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnBlockPortCompartment.java
new file mode 100755
index 0000000..59c471c
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnBlockPortCompartment.java
@@ -0,0 +1,208 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.changeVisibility;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in a Block "standard ports" compartment.
+ */
+public class TestNodeCreationOnBlockPortCompartment extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ createNodeFromPalette("blockdefinition.tool.block", getDiagramView(), true);
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_CLASSIFIER_ID);
+ containerView = ViewUtil.getChildBySemanticHint(blockView, UMLGraphicalTypes.COMPARTMENT_UML_PORT_AS_LIST_ID);
+
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!containerView.isVisible()) {
+ changeVisibility(containerView);
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActor() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actor", containerView, false);
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.block", containerView, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.comment", containerView, false);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraint", containerView, false);
+ }
+
+ @Test
+ public void createConstraintBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintblock", containerView, false);
+ }
+
+ @Test
+ public void createConstraintProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintproperty", containerView, false);
+ }
+
+ @Test
+ public void createDataType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.datatype", containerView, false);
+ }
+
+ @Test
+ public void createDimension() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.dimension", containerView, false);
+ }
+
+ @Test
+ public void createEnumeration() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumeration", containerView, false);
+ }
+
+ @Test
+ public void createEnumerationLiteral() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumerationliteral", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowport", containerView, false);
+ }
+
+ @Test
+ public void createFlowProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowproperty", containerView, false);
+ }
+
+ @Test
+ public void createFlowSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowspecification", containerView, false);
+ }
+
+ @Test
+ public void createInstanceSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.instancespecification", containerView, false);
+ }
+
+ @Test
+ public void createInterface() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.interface", containerView, false);
+ }
+
+ @Test
+ public void createModel() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.model", containerView, false);
+ }
+
+ @Test
+ public void createOperation() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.operation", containerView, false);
+ }
+
+ @Test
+ public void createPackage() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.package", containerView, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ // Do not execute as this requires user interaction (dialog)
+ createNodeFromPalette("blockdefinition.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.port", containerView, true);
+ }
+
+ @Test
+ public void createPrimitiveType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.primitivetype", containerView, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.property", containerView, false);
+ }
+
+ @Test
+ public void createReception() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reception", containerView, false);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ // Do not execute as this requires user interaction (dialog)
+ createNodeFromPalette("blockdefinition.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createSignal() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.signal", containerView, false);
+ }
+
+ @Test
+ public void createSlot() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.slot", containerView, false);
+ }
+
+ @Test
+ public void createUnit() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.unit", containerView, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ // Do not execute as this requires user interaction (dialog)
+ createNodeFromPalette("blockdefinition.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createValueType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.valuetype", containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnBlockPropertyCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnBlockPropertyCompartment.java
new file mode 100755
index 0000000..f6a1d74
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnBlockPropertyCompartment.java
@@ -0,0 +1,208 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.changeVisibility;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in a Block "properties" compartment.
+ */
+public class TestNodeCreationOnBlockPropertyCompartment extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ createNodeFromPalette("blockdefinition.tool.block", getDiagramView(), true);
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_CLASSIFIER_ID);
+ containerView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_PROPERTY_AS_LIST_ID);
+
+ if(containerView == null) {
+ throw new Exception("Unable to prepare Block for test.");
+ }
+
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!containerView.isVisible()) {
+ changeVisibility(containerView);
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare Block for test.", e);
+ }
+ }
+
+ @Test
+ public void createActor() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actor", containerView, false);
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ // Do not execute as this requires user interaction (dialog)
+ createNodeFromPalette("blockdefinition.tool.actorpart", containerView, true, false);
+ }
+
+ @Test
+ public void createBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.block", containerView, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.comment", containerView, false);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraint", containerView, false);
+ }
+
+ @Test
+ public void createConstraintBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintblock", containerView, false);
+ }
+
+ @Test
+ public void createConstraintProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintproperty", containerView, false);
+ }
+
+ @Test
+ public void createDataType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.datatype", containerView, false);
+ }
+
+ @Test
+ public void createDimension() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.dimension", containerView, false);
+ }
+
+ @Test
+ public void createEnumeration() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumeration", containerView, false);
+ }
+
+ @Test
+ public void createEnumerationLiteral() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumerationliteral", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowport", containerView, true);
+ }
+
+ @Test
+ public void createFlowProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowproperty", containerView, false);
+ }
+
+ @Test
+ public void createFlowSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowspecification", containerView, false);
+ }
+
+ @Test
+ public void createInstanceSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.instancespecification", containerView, false);
+ }
+
+ @Test
+ public void createInterface() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.interface", containerView, false);
+ }
+
+ @Test
+ public void createModel() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.model", containerView, false);
+ }
+
+ @Test
+ public void createOperation() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.operation", containerView, false);
+ }
+
+ @Test
+ public void createPackage() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.package", containerView, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ // Do not execute as this requires user interaction (dialog)
+ createNodeFromPalette("blockdefinition.tool.part", containerView, true, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.port", containerView, true);
+ }
+
+ @Test
+ public void createPrimitiveType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.primitivetype", containerView, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.property", containerView, true);
+ }
+
+ @Test
+ public void createReception() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reception", containerView, false);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ // Do not execute as this requires user interaction (dialog)
+ createNodeFromPalette("blockdefinition.tool.reference", containerView, true, false);
+ }
+
+ @Test
+ public void createSignal() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.signal", containerView, false);
+ }
+
+ @Test
+ public void createSlot() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.slot", containerView, false);
+ }
+
+ @Test
+ public void createUnit() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.unit", containerView, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ // Do not execute as this requires user interaction (dialog)
+ createNodeFromPalette("blockdefinition.tool.value", containerView, true, false);
+ }
+
+ @Test
+ public void createValueType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.valuetype", containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnBlockReferenceCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnBlockReferenceCompartment.java
new file mode 100755
index 0000000..7de542f
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnBlockReferenceCompartment.java
@@ -0,0 +1,207 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.changeVisibility;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in a Block "references" compartment.
+ */
+public class TestNodeCreationOnBlockReferenceCompartment extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ createNodeFromPalette("blockdefinition.tool.block", getDiagramView(), true);
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_CLASSIFIER_ID);
+ containerView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_REFERENCE_AS_LIST_ID);
+
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!containerView.isVisible()) {
+ changeVisibility(containerView);
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActor() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actor", containerView, false);
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.block", containerView, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.comment", containerView, false);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraint", containerView, false);
+ }
+
+ @Test
+ public void createConstraintBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintblock", containerView, false);
+ }
+
+ @Test
+ public void createConstraintProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintproperty", containerView, false);
+ }
+
+ @Test
+ public void createDataType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.datatype", containerView, false);
+ }
+
+ @Test
+ public void createDimension() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.dimension", containerView, false);
+ }
+
+ @Test
+ public void createEnumeration() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumeration", containerView, false);
+ }
+
+ @Test
+ public void createEnumerationLiteral() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumerationliteral", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowport", containerView, false);
+ }
+
+ @Test
+ public void createFlowProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowproperty", containerView, false);
+ }
+
+ @Test
+ public void createFlowSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowspecification", containerView, false);
+ }
+
+ @Test
+ public void createInstanceSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.instancespecification", containerView, false);
+ }
+
+ @Test
+ public void createInterface() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.interface", containerView, false);
+ }
+
+ @Test
+ public void createModel() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.model", containerView, false);
+ }
+
+ @Test
+ public void createOperation() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.operation", containerView, false);
+ }
+
+ @Test
+ public void createPackage() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.package", containerView, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ // Do not execute as this requires user interaction (dialog)
+ createNodeFromPalette("blockdefinition.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createPrimitiveType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.primitivetype", containerView, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.property", containerView, false);
+ }
+
+ @Test
+ public void createReception() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reception", containerView, false);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ // Do not execute as this requires user interaction (dialog)
+ createNodeFromPalette("blockdefinition.tool.reference", containerView, true, false);
+ }
+
+ @Test
+ public void createSignal() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.signal", containerView, false);
+ }
+
+ @Test
+ public void createSlot() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.slot", containerView, false);
+ }
+
+ @Test
+ public void createUnit() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.unit", containerView, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ // Do not execute as this requires user interaction (dialog)
+ createNodeFromPalette("blockdefinition.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createValueType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.valuetype", containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnBlockValueCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnBlockValueCompartment.java
new file mode 100755
index 0000000..3c1025b
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnBlockValueCompartment.java
@@ -0,0 +1,207 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.changeVisibility;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in a Block "values" compartment.
+ */
+public class TestNodeCreationOnBlockValueCompartment extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ createNodeFromPalette("blockdefinition.tool.block", getDiagramView(), true);
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_CLASSIFIER_ID);
+ containerView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_VALUE_AS_LIST_ID);
+
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!containerView.isVisible()) {
+ changeVisibility(containerView);
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActor() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actor", containerView, false);
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.block", containerView, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.comment", containerView, false);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraint", containerView, false);
+ }
+
+ @Test
+ public void createConstraintBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintblock", containerView, false);
+ }
+
+ @Test
+ public void createConstraintProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintproperty", containerView, false);
+ }
+
+ @Test
+ public void createDataType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.datatype", containerView, false);
+ }
+
+ @Test
+ public void createDimension() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.dimension", containerView, false);
+ }
+
+ @Test
+ public void createEnumeration() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumeration", containerView, false);
+ }
+
+ @Test
+ public void createEnumerationLiteral() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumerationliteral", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowport", containerView, false);
+ }
+
+ @Test
+ public void createFlowProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowproperty", containerView, false);
+ }
+
+ @Test
+ public void createFlowSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowspecification", containerView, false);
+ }
+
+ @Test
+ public void createInstanceSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.instancespecification", containerView, false);
+ }
+
+ @Test
+ public void createInterface() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.interface", containerView, false);
+ }
+
+ @Test
+ public void createModel() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.model", containerView, false);
+ }
+
+ @Test
+ public void createOperation() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.operation", containerView, false);
+ }
+
+ @Test
+ public void createPackage() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.package", containerView, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ // Do not execute as this requires user interaction (dialog)
+ createNodeFromPalette("blockdefinition.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createPrimitiveType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.primitivetype", containerView, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.property", containerView, false);
+ }
+
+ @Test
+ public void createReception() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reception", containerView, false);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ // Do not execute as this requires user interaction (dialog)
+ createNodeFromPalette("blockdefinition.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createSignal() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.signal", containerView, false);
+ }
+
+ @Test
+ public void createSlot() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.slot", containerView, false);
+ }
+
+ @Test
+ public void createUnit() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.unit", containerView, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ // Do not execute as this requires user interaction (dialog)
+ createNodeFromPalette("blockdefinition.tool.value", containerView, true, false);
+ }
+
+ @Test
+ public void createValueType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.valuetype", containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnConstraintBlock.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnConstraintBlock.java
new file mode 100755
index 0000000..46e7c37
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnConstraintBlock.java
@@ -0,0 +1,203 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in a ConstraintBlock.
+ */
+public class TestNodeCreationOnConstraintBlock extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ // force inherited provider loading...
+ createGraphicalNode(UMLElementTypes.PACKAGE, ElementTypes.PACKAGE.getSemanticHint(), getDiagramView());
+
+ createNodeFromPalette("blockdefinition.tool.constraintblock", getDiagramView(), true);
+ containerView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_CONSTRAINTBLOCK_AS_CLASSIFIER_ID);
+
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActor() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actor", containerView, false);
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.block", containerView, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.comment", containerView, false);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraint", containerView, false);
+ }
+
+ @Test
+ public void createConstraintBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintblock", containerView, false);
+ }
+
+ @Test
+ public void createConstraintProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintproperty", containerView, false);
+ }
+
+ @Test
+ public void createDataType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.datatype", containerView, false);
+ }
+
+ @Test
+ public void createDimension() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.dimension", containerView, false);
+ }
+
+ @Test
+ public void createEnumeration() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumeration", containerView, false);
+ }
+
+ @Test
+ public void createEnumerationLiteral() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumerationliteral", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowport", containerView, false);
+ }
+
+ @Test
+ public void createFlowProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowproperty", containerView, false);
+ }
+
+ @Test
+ public void createFlowSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowspecification", containerView, false);
+ }
+
+ @Test
+ public void createInstanceSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.instancespecification", containerView, false);
+ }
+
+ @Test
+ public void createInterface() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.interface", containerView, false);
+ }
+
+ @Test
+ public void createModel() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.model", containerView, false);
+ }
+
+ @Test
+ public void createOperation() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.operation", containerView, false);
+ }
+
+ @Test
+ public void createPackage() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.package", containerView, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createPrimitiveType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.primitivetype", containerView, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.property", containerView, false);
+ }
+
+ @Test
+ public void createReception() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reception", containerView, false);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createSignal() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.signal", containerView, false);
+ }
+
+ @Test
+ public void createSlot() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.slot", containerView, false);
+ }
+
+ @Test
+ public void createUnit() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.unit", containerView, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createValueType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.valuetype", containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnConstraintBlockConstraintCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnConstraintBlockConstraintCompartment.java
new file mode 100755
index 0000000..3ef5856
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnConstraintBlockConstraintCompartment.java
@@ -0,0 +1,207 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.changeVisibility;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in a ConstraintBlock "constraints" compartment.
+ */
+public class TestNodeCreationOnConstraintBlockConstraintCompartment extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ createNodeFromPalette("blockdefinition.tool.constraintblock", getDiagramView(), true);
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_CONSTRAINTBLOCK_AS_CLASSIFIER_ID);
+ containerView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_CONSTRAINT_AS_LIST_ID);
+
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!containerView.isVisible()) {
+ changeVisibility(containerView);
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActor() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actor", containerView, false);
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.block", containerView, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.comment", containerView, false);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraint", containerView, true);
+ }
+
+ @Test
+ public void createConstraintBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintblock", containerView, false);
+ }
+
+ @Test
+ public void createConstraintProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintproperty", containerView, true);
+ }
+
+ @Test
+ public void createDataType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.datatype", containerView, false);
+ }
+
+ @Test
+ public void createDimension() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.dimension", containerView, false);
+ }
+
+ @Test
+ public void createEnumeration() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumeration", containerView, false);
+ }
+
+ @Test
+ public void createEnumerationLiteral() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumerationliteral", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowport", containerView, false);
+ }
+
+ @Test
+ public void createFlowProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowproperty", containerView, false);
+ }
+
+ @Test
+ public void createFlowSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowspecification", containerView, false);
+ }
+
+ @Test
+ public void createInstanceSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.instancespecification", containerView, false);
+ }
+
+ @Test
+ public void createInterface() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.interface", containerView, false);
+ }
+
+ @Test
+ public void createModel() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.model", containerView, false);
+ }
+
+ @Test
+ public void createOperation() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.operation", containerView, false);
+ }
+
+ @Test
+ public void createPackage() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.package", containerView, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ // Do not execute as this requires user interaction (dialog)
+ createNodeFromPalette("blockdefinition.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createPrimitiveType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.primitivetype", containerView, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.property", containerView, false);
+ }
+
+ @Test
+ public void createReception() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reception", containerView, false);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ // Do not execute as this requires user interaction (dialog)
+ createNodeFromPalette("blockdefinition.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createSignal() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.signal", containerView, false);
+ }
+
+ @Test
+ public void createSlot() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.slot", containerView, false);
+ }
+
+ @Test
+ public void createUnit() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.unit", containerView, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ // Do not execute as this requires user interaction (dialog)
+ createNodeFromPalette("blockdefinition.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createValueType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.valuetype", containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnConstraintBlockParameterCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnConstraintBlockParameterCompartment.java
new file mode 100755
index 0000000..7a4ace2
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnConstraintBlockParameterCompartment.java
@@ -0,0 +1,207 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.changeVisibility;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in a ConstraintBlock "parameter" compartment.
+ */
+public class TestNodeCreationOnConstraintBlockParameterCompartment extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ createNodeFromPalette("blockdefinition.tool.constraintblock", getDiagramView(), true);
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_CONSTRAINTBLOCK_AS_CLASSIFIER_ID);
+ containerView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_PARAMETER_AS_LIST_ID);
+
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!containerView.isVisible()) {
+ changeVisibility(containerView);
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActor() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actor", containerView, false);
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.block", containerView, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.comment", containerView, false);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraint", containerView, false);
+ }
+
+ @Test
+ public void createConstraintBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintblock", containerView, false);
+ }
+
+ @Test
+ public void createConstraintProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintproperty", containerView, false);
+ }
+
+ @Test
+ public void createDataType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.datatype", containerView, false);
+ }
+
+ @Test
+ public void createDimension() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.dimension", containerView, false);
+ }
+
+ @Test
+ public void createEnumeration() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumeration", containerView, false);
+ }
+
+ @Test
+ public void createEnumerationLiteral() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumerationliteral", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowport", containerView, false);
+ }
+
+ @Test
+ public void createFlowProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowproperty", containerView, false);
+ }
+
+ @Test
+ public void createFlowSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowspecification", containerView, false);
+ }
+
+ @Test
+ public void createInstanceSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.instancespecification", containerView, false);
+ }
+
+ @Test
+ public void createInterface() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.interface", containerView, false);
+ }
+
+ @Test
+ public void createModel() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.model", containerView, false);
+ }
+
+ @Test
+ public void createOperation() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.operation", containerView, false);
+ }
+
+ @Test
+ public void createPackage() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.package", containerView, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ // Do not execute as this requires user interaction (dialog)
+ createNodeFromPalette("blockdefinition.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createPrimitiveType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.primitivetype", containerView, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.property", containerView, true);
+ }
+
+ @Test
+ public void createReception() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reception", containerView, false);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ // Do not execute as this requires user interaction (dialog)
+ createNodeFromPalette("blockdefinition.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createSignal() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.signal", containerView, false);
+ }
+
+ @Test
+ public void createSlot() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.slot", containerView, false);
+ }
+
+ @Test
+ public void createUnit() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.unit", containerView, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ // Do not execute as this requires user interaction (dialog)
+ createNodeFromPalette("blockdefinition.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createValueType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.valuetype", containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnDataType.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnDataType.java
new file mode 100755
index 0000000..c7f7bd0
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnDataType.java
@@ -0,0 +1,203 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in a DataType.
+ */
+public class TestNodeCreationOnDataType extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ // force inherited provider loading...
+ createGraphicalNode(UMLElementTypes.PACKAGE, ElementTypes.PACKAGE.getSemanticHint(), getDiagramView());
+
+ createNodeFromPalette("blockdefinition.tool.datatype", getDiagramView(), true);
+ containerView = ViewUtil.getChildBySemanticHint(getDiagramView(), UMLGraphicalTypes.SHAPE_UML_DATATYPE_AS_CLASSIFIER_ID);
+
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActor() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actor", containerView, false);
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.block", containerView, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.comment", containerView, false);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraint", containerView, false);
+ }
+
+ @Test
+ public void createConstraintBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintblock", containerView, false);
+ }
+
+ @Test
+ public void createConstraintProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintproperty", containerView, false);
+ }
+
+ @Test
+ public void createDataType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.datatype", containerView, false);
+ }
+
+ @Test
+ public void createDimension() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.dimension", containerView, false);
+ }
+
+ @Test
+ public void createEnumeration() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumeration", containerView, false);
+ }
+
+ @Test
+ public void createEnumerationLiteral() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumerationliteral", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowport", containerView, false);
+ }
+
+ @Test
+ public void createFlowProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowproperty", containerView, false);
+ }
+
+ @Test
+ public void createFlowSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowspecification", containerView, false);
+ }
+
+ @Test
+ public void createInstanceSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.instancespecification", containerView, false);
+ }
+
+ @Test
+ public void createInterface() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.interface", containerView, false);
+ }
+
+ @Test
+ public void createModel() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.model", containerView, false);
+ }
+
+ @Test
+ public void createOperation() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.operation", containerView, false);
+ }
+
+ @Test
+ public void createPackage() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.package", containerView, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createPrimitiveType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.primitivetype", containerView, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.property", containerView, false);
+ }
+
+ @Test
+ public void createReception() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reception", containerView, false);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createSignal() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.signal", containerView, false);
+ }
+
+ @Test
+ public void createSlot() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.slot", containerView, false);
+ }
+
+ @Test
+ public void createUnit() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.unit", containerView, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createValueType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.valuetype", containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnDataTypeOperationCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnDataTypeOperationCompartment.java
new file mode 100755
index 0000000..b5aaa88
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnDataTypeOperationCompartment.java
@@ -0,0 +1,207 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.changeVisibility;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in a DataType "operations" compartment.
+ */
+public class TestNodeCreationOnDataTypeOperationCompartment extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ createNodeFromPalette("blockdefinition.tool.datatype", getDiagramView(), true);
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), UMLGraphicalTypes.SHAPE_UML_DATATYPE_AS_CLASSIFIER_ID);
+ containerView = ViewUtil.getChildBySemanticHint(blockView, UMLGraphicalTypes.COMPARTMENT_UML_OPERATION_AS_LIST_ID);
+
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!containerView.isVisible()) {
+ changeVisibility(containerView);
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActor() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actor", containerView, false);
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.block", containerView, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.comment", containerView, false);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraint", containerView, false);
+ }
+
+ @Test
+ public void createConstraintBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintblock", containerView, false);
+ }
+
+ @Test
+ public void createConstraintProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintproperty", containerView, false);
+ }
+
+ @Test
+ public void createDataType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.datatype", containerView, false);
+ }
+
+ @Test
+ public void createDimension() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.dimension", containerView, false);
+ }
+
+ @Test
+ public void createEnumeration() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumeration", containerView, false);
+ }
+
+ @Test
+ public void createEnumerationLiteral() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumerationliteral", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowport", containerView, false);
+ }
+
+ @Test
+ public void createFlowProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowproperty", containerView, false);
+ }
+
+ @Test
+ public void createFlowSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowspecification", containerView, false);
+ }
+
+ @Test
+ public void createInstanceSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.instancespecification", containerView, false);
+ }
+
+ @Test
+ public void createInterface() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.interface", containerView, false);
+ }
+
+ @Test
+ public void createModel() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.model", containerView, false);
+ }
+
+ @Test
+ public void createOperation() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.operation", containerView, true);
+ }
+
+ @Test
+ public void createPackage() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.package", containerView, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ // Do not execute as this requires user interaction (dialog)
+ createNodeFromPalette("blockdefinition.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createPrimitiveType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.primitivetype", containerView, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.property", containerView, false);
+ }
+
+ @Test
+ public void createReception() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reception", containerView, false);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ // Do not execute as this requires user interaction (dialog)
+ createNodeFromPalette("blockdefinition.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createSignal() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.signal", containerView, false);
+ }
+
+ @Test
+ public void createSlot() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.slot", containerView, false);
+ }
+
+ @Test
+ public void createUnit() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.unit", containerView, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ // Do not execute as this requires user interaction (dialog)
+ createNodeFromPalette("blockdefinition.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createValueType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.valuetype", containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnDataTypePropertyCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnDataTypePropertyCompartment.java
new file mode 100755
index 0000000..9fcd10c
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnDataTypePropertyCompartment.java
@@ -0,0 +1,207 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.changeVisibility;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in a DataType "properties" compartment.
+ */
+public class TestNodeCreationOnDataTypePropertyCompartment extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ createNodeFromPalette("blockdefinition.tool.datatype", getDiagramView(), true);
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), UMLGraphicalTypes.SHAPE_UML_DATATYPE_AS_CLASSIFIER_ID);
+ containerView = ViewUtil.getChildBySemanticHint(blockView, UMLGraphicalTypes.COMPARTMENT_UML_PROPERTY_AS_LIST_ID);
+
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!containerView.isVisible()) {
+ changeVisibility(containerView);
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActor() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actor", containerView, false);
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.block", containerView, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.comment", containerView, false);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraint", containerView, false);
+ }
+
+ @Test
+ public void createConstraintBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintblock", containerView, false);
+ }
+
+ @Test
+ public void createConstraintProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintproperty", containerView, false);
+ }
+
+ @Test
+ public void createDataType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.datatype", containerView, false);
+ }
+
+ @Test
+ public void createDimension() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.dimension", containerView, false);
+ }
+
+ @Test
+ public void createEnumeration() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumeration", containerView, false);
+ }
+
+ @Test
+ public void createEnumerationLiteral() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumerationliteral", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowport", containerView, false);
+ }
+
+ @Test
+ public void createFlowProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowproperty", containerView, false);
+ }
+
+ @Test
+ public void createFlowSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowspecification", containerView, false);
+ }
+
+ @Test
+ public void createInstanceSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.instancespecification", containerView, false);
+ }
+
+ @Test
+ public void createInterface() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.interface", containerView, false);
+ }
+
+ @Test
+ public void createModel() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.model", containerView, false);
+ }
+
+ @Test
+ public void createOperation() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.operation", containerView, false);
+ }
+
+ @Test
+ public void createPackage() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.package", containerView, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ // Do not execute as this requires user interaction (dialog)
+ createNodeFromPalette("blockdefinition.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createPrimitiveType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.primitivetype", containerView, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.property", containerView, true);
+ }
+
+ @Test
+ public void createReception() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reception", containerView, false);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ // Do not execute as this requires user interaction (dialog)
+ createNodeFromPalette("blockdefinition.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createSignal() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.signal", containerView, false);
+ }
+
+ @Test
+ public void createSlot() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.slot", containerView, false);
+ }
+
+ @Test
+ public void createUnit() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.unit", containerView, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ // Do not execute as this requires user interaction (dialog)
+ createNodeFromPalette("blockdefinition.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createValueType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.valuetype", containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnDimension.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnDimension.java
new file mode 100755
index 0000000..cf361bf
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnDimension.java
@@ -0,0 +1,203 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in a Dimension.
+ */
+public class TestNodeCreationOnDimension extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ // force inherited provider loading...
+ createGraphicalNode(UMLElementTypes.PACKAGE, ElementTypes.PACKAGE.getSemanticHint(), getDiagramView());
+
+ createNodeFromPalette("blockdefinition.tool.dimension", getDiagramView(), true);
+ containerView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_DIMENSION_AS_CLASSIFIER_ID);
+
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActor() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actor", containerView, false);
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.block", containerView, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.comment", containerView, false);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraint", containerView, false);
+ }
+
+ @Test
+ public void createConstraintBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintblock", containerView, false);
+ }
+
+ @Test
+ public void createConstraintProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintproperty", containerView, false);
+ }
+
+ @Test
+ public void createDataType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.datatype", containerView, false);
+ }
+
+ @Test
+ public void createDimension() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.dimension", containerView, false);
+ }
+
+ @Test
+ public void createEnumeration() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumeration", containerView, false);
+ }
+
+ @Test
+ public void createEnumerationLiteral() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumerationliteral", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowport", containerView, false);
+ }
+
+ @Test
+ public void createFlowProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowproperty", containerView, false);
+ }
+
+ @Test
+ public void createFlowSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowspecification", containerView, false);
+ }
+
+ @Test
+ public void createInstanceSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.instancespecification", containerView, false);
+ }
+
+ @Test
+ public void createInterface() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.interface", containerView, false);
+ }
+
+ @Test
+ public void createModel() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.model", containerView, false);
+ }
+
+ @Test
+ public void createOperation() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.operation", containerView, false);
+ }
+
+ @Test
+ public void createPackage() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.package", containerView, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createPrimitiveType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.primitivetype", containerView, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.property", containerView, false);
+ }
+
+ @Test
+ public void createReception() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reception", containerView, false);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createSignal() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.signal", containerView, false);
+ }
+
+ @Test
+ public void createSlot() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.slot", containerView, false);
+ }
+
+ @Test
+ public void createUnit() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.unit", containerView, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createValueType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.valuetype", containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnEnumeration.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnEnumeration.java
new file mode 100755
index 0000000..c98c2f9
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnEnumeration.java
@@ -0,0 +1,203 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in an Enumeration.
+ */
+public class TestNodeCreationOnEnumeration extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ // force inherited provider loading...
+ createGraphicalNode(UMLElementTypes.PACKAGE, ElementTypes.PACKAGE.getSemanticHint(), getDiagramView());
+
+ createNodeFromPalette("blockdefinition.tool.enumeration", getDiagramView(), true);
+ containerView = ViewUtil.getChildBySemanticHint(getDiagramView(), UMLGraphicalTypes.SHAPE_UML_ENUMERATION_AS_CLASSIFIER_ID);
+
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActor() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actor", containerView, false);
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.block", containerView, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.comment", containerView, false);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraint", containerView, false);
+ }
+
+ @Test
+ public void createConstraintBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintblock", containerView, false);
+ }
+
+ @Test
+ public void createConstraintProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintproperty", containerView, false);
+ }
+
+ @Test
+ public void createDataType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.datatype", containerView, false);
+ }
+
+ @Test
+ public void createDimension() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.dimension", containerView, false);
+ }
+
+ @Test
+ public void createEnumeration() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumeration", containerView, false);
+ }
+
+ @Test
+ public void createEnumerationLiteral() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumerationliteral", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowport", containerView, false);
+ }
+
+ @Test
+ public void createFlowProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowproperty", containerView, false);
+ }
+
+ @Test
+ public void createFlowSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowspecification", containerView, false);
+ }
+
+ @Test
+ public void createInstanceSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.instancespecification", containerView, false);
+ }
+
+ @Test
+ public void createInterface() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.interface", containerView, false);
+ }
+
+ @Test
+ public void createModel() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.model", containerView, false);
+ }
+
+ @Test
+ public void createOperation() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.operation", containerView, false);
+ }
+
+ @Test
+ public void createPackage() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.package", containerView, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createPrimitiveType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.primitivetype", containerView, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.property", containerView, false);
+ }
+
+ @Test
+ public void createReception() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reception", containerView, false);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createSignal() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.signal", containerView, false);
+ }
+
+ @Test
+ public void createSlot() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.slot", containerView, false);
+ }
+
+ @Test
+ public void createUnit() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.unit", containerView, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createValueType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.valuetype", containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnEnumerationLiteralCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnEnumerationLiteralCompartment.java
new file mode 100755
index 0000000..82be9e4
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnEnumerationLiteralCompartment.java
@@ -0,0 +1,207 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.changeVisibility;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in an Enumeration "literals" compartment.
+ */
+public class TestNodeCreationOnEnumerationLiteralCompartment extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ createNodeFromPalette("blockdefinition.tool.enumeration", getDiagramView(), true);
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), UMLGraphicalTypes.SHAPE_UML_ENUMERATION_AS_CLASSIFIER_ID);
+ containerView = ViewUtil.getChildBySemanticHint(blockView, UMLGraphicalTypes.COMPARTMENT_UML_ENUMERATIONLITERAL_AS_LIST_ID);
+
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!containerView.isVisible()) {
+ changeVisibility(containerView);
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActor() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actor", containerView, false);
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.block", containerView, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.comment", containerView, false);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraint", containerView, false);
+ }
+
+ @Test
+ public void createConstraintBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintblock", containerView, false);
+ }
+
+ @Test
+ public void createConstraintProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintproperty", containerView, false);
+ }
+
+ @Test
+ public void createDataType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.datatype", containerView, false);
+ }
+
+ @Test
+ public void createDimension() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.dimension", containerView, false);
+ }
+
+ @Test
+ public void createEnumeration() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumeration", containerView, false);
+ }
+
+ @Test
+ public void createEnumerationLiteral() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumerationliteral", containerView, true);
+ }
+
+ @Test
+ public void createFlowPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowport", containerView, false);
+ }
+
+ @Test
+ public void createFlowProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowproperty", containerView, false);
+ }
+
+ @Test
+ public void createFlowSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowspecification", containerView, false);
+ }
+
+ @Test
+ public void createInstanceSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.instancespecification", containerView, false);
+ }
+
+ @Test
+ public void createInterface() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.interface", containerView, false);
+ }
+
+ @Test
+ public void createModel() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.model", containerView, false);
+ }
+
+ @Test
+ public void createOperation() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.operation", containerView, false);
+ }
+
+ @Test
+ public void createPackage() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.package", containerView, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ // Do not execute as this requires user interaction (dialog)
+ createNodeFromPalette("blockdefinition.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createPrimitiveType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.primitivetype", containerView, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.property", containerView, false);
+ }
+
+ @Test
+ public void createReception() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reception", containerView, false);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ // Do not execute as this requires user interaction (dialog)
+ createNodeFromPalette("blockdefinition.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createSignal() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.signal", containerView, false);
+ }
+
+ @Test
+ public void createSlot() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.slot", containerView, false);
+ }
+
+ @Test
+ public void createUnit() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.unit", containerView, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ // Do not execute as this requires user interaction (dialog)
+ createNodeFromPalette("blockdefinition.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createValueType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.valuetype", containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnFlowSpecification.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnFlowSpecification.java
new file mode 100755
index 0000000..1ed8eed
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnFlowSpecification.java
@@ -0,0 +1,203 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in a FlowSpecification.
+ */
+public class TestNodeCreationOnFlowSpecification extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ // force inherited provider loading...
+ createGraphicalNode(UMLElementTypes.PACKAGE, ElementTypes.PACKAGE.getSemanticHint(), getDiagramView());
+
+ createNodeFromPalette("blockdefinition.tool.flowspecification", getDiagramView(), true);
+ containerView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_FLOWSPECIFICATION_AS_CLASSIFIER_ID);
+
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActor() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actor", containerView, false);
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.block", containerView, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.comment", containerView, false);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraint", containerView, false);
+ }
+
+ @Test
+ public void createConstraintBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintblock", containerView, false);
+ }
+
+ @Test
+ public void createConstraintProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintproperty", containerView, false);
+ }
+
+ @Test
+ public void createDataType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.datatype", containerView, false);
+ }
+
+ @Test
+ public void createDimension() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.dimension", containerView, false);
+ }
+
+ @Test
+ public void createEnumeration() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumeration", containerView, false);
+ }
+
+ @Test
+ public void createEnumerationLiteral() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumerationliteral", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowport", containerView, false);
+ }
+
+ @Test
+ public void createFlowProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowproperty", containerView, false);
+ }
+
+ @Test
+ public void createFlowSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowspecification", containerView, false);
+ }
+
+ @Test
+ public void createInstanceSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.instancespecification", containerView, false);
+ }
+
+ @Test
+ public void createInterface() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.interface", containerView, false);
+ }
+
+ @Test
+ public void createModel() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.model", containerView, false);
+ }
+
+ @Test
+ public void createOperation() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.operation", containerView, false);
+ }
+
+ @Test
+ public void createPackage() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.package", containerView, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createPrimitiveType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.primitivetype", containerView, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.property", containerView, false);
+ }
+
+ @Test
+ public void createReception() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reception", containerView, false);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createSignal() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.signal", containerView, false);
+ }
+
+ @Test
+ public void createSlot() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.slot", containerView, false);
+ }
+
+ @Test
+ public void createUnit() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.unit", containerView, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createValueType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.valuetype", containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnFlowSpecificationFlowCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnFlowSpecificationFlowCompartment.java
new file mode 100755
index 0000000..a881dfc
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnFlowSpecificationFlowCompartment.java
@@ -0,0 +1,207 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.changeVisibility;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in a ValueType "properties" compartment.
+ */
+public class TestNodeCreationOnFlowSpecificationFlowCompartment extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ createNodeFromPalette("blockdefinition.tool.flowspecification", getDiagramView(), true);
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_FLOWSPECIFICATION_AS_CLASSIFIER_ID);
+ containerView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_FLOWPROPERTY_AS_LIST_ID);
+
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!containerView.isVisible()) {
+ changeVisibility(containerView);
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActor() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actor", containerView, false);
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.block", containerView, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.comment", containerView, false);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraint", containerView, false);
+ }
+
+ @Test
+ public void createConstraintBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintblock", containerView, false);
+ }
+
+ @Test
+ public void createConstraintProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintproperty", containerView, false);
+ }
+
+ @Test
+ public void createDataType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.datatype", containerView, false);
+ }
+
+ @Test
+ public void createDimension() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.dimension", containerView, false);
+ }
+
+ @Test
+ public void createEnumeration() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumeration", containerView, false);
+ }
+
+ @Test
+ public void createEnumerationLiteral() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumerationliteral", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowport", containerView, false);
+ }
+
+ @Test
+ public void createFlowProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowproperty", containerView, true);
+ }
+
+ @Test
+ public void createFlowSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowspecification", containerView, false);
+ }
+
+ @Test
+ public void createInstanceSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.instancespecification", containerView, false);
+ }
+
+ @Test
+ public void createInterface() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.interface", containerView, false);
+ }
+
+ @Test
+ public void createModel() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.model", containerView, false);
+ }
+
+ @Test
+ public void createOperation() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.operation", containerView, false);
+ }
+
+ @Test
+ public void createPackage() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.package", containerView, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ // Do not execute as this requires user interaction (dialog)
+ createNodeFromPalette("blockdefinition.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createPrimitiveType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.primitivetype", containerView, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.property", containerView, false);
+ }
+
+ @Test
+ public void createReception() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reception", containerView, false);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ // Do not execute as this requires user interaction (dialog)
+ createNodeFromPalette("blockdefinition.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createSignal() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.signal", containerView, false);
+ }
+
+ @Test
+ public void createSlot() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.slot", containerView, false);
+ }
+
+ @Test
+ public void createUnit() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.unit", containerView, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ // Do not execute as this requires user interaction (dialog)
+ createNodeFromPalette("blockdefinition.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createValueType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.valuetype", containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnInterface.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnInterface.java
new file mode 100755
index 0000000..9898c8c
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnInterface.java
@@ -0,0 +1,203 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in an Interface.
+ */
+public class TestNodeCreationOnInterface extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ // force inherited provider loading...
+ createGraphicalNode(UMLElementTypes.PACKAGE, ElementTypes.PACKAGE.getSemanticHint(), getDiagramView());
+
+ createNodeFromPalette("blockdefinition.tool.interface", getDiagramView(), true);
+ containerView = ViewUtil.getChildBySemanticHint(getDiagramView(), UMLGraphicalTypes.SHAPE_UML_INTERFACE_AS_CLASSIFIER_ID);
+
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActor() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actor", containerView, false);
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.block", containerView, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.comment", containerView, false);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraint", containerView, false);
+ }
+
+ @Test
+ public void createConstraintBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintblock", containerView, false);
+ }
+
+ @Test
+ public void createConstraintProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintproperty", containerView, false);
+ }
+
+ @Test
+ public void createDataType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.datatype", containerView, false);
+ }
+
+ @Test
+ public void createDimension() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.dimension", containerView, false);
+ }
+
+ @Test
+ public void createEnumeration() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumeration", containerView, false);
+ }
+
+ @Test
+ public void createEnumerationLiteral() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumerationliteral", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowport", containerView, false);
+ }
+
+ @Test
+ public void createFlowProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowproperty", containerView, false);
+ }
+
+ @Test
+ public void createFlowSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowspecification", containerView, false);
+ }
+
+ @Test
+ public void createInstanceSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.instancespecification", containerView, false);
+ }
+
+ @Test
+ public void createInterface() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.interface", containerView, false);
+ }
+
+ @Test
+ public void createModel() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.model", containerView, false);
+ }
+
+ @Test
+ public void createOperation() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.operation", containerView, false);
+ }
+
+ @Test
+ public void createPackage() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.package", containerView, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createPrimitiveType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.primitivetype", containerView, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.property", containerView, false);
+ }
+
+ @Test
+ public void createReception() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reception", containerView, false);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createSignal() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.signal", containerView, false);
+ }
+
+ @Test
+ public void createSlot() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.slot", containerView, false);
+ }
+
+ @Test
+ public void createUnit() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.unit", containerView, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createValueType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.valuetype", containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnInterfaceOperationCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnInterfaceOperationCompartment.java
new file mode 100755
index 0000000..8457525
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnInterfaceOperationCompartment.java
@@ -0,0 +1,207 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.changeVisibility;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in an Interface "operations" compartment.
+ */
+public class TestNodeCreationOnInterfaceOperationCompartment extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ createNodeFromPalette("blockdefinition.tool.interface", getDiagramView(), true);
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), UMLGraphicalTypes.SHAPE_UML_INTERFACE_AS_CLASSIFIER_ID);
+ containerView = ViewUtil.getChildBySemanticHint(blockView, UMLGraphicalTypes.COMPARTMENT_UML_OPERATION_AS_LIST_ID);
+
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!containerView.isVisible()) {
+ changeVisibility(containerView);
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActor() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actor", containerView, false);
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.block", containerView, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.comment", containerView, false);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraint", containerView, false);
+ }
+
+ @Test
+ public void createConstraintBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintblock", containerView, false);
+ }
+
+ @Test
+ public void createConstraintProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintproperty", containerView, false);
+ }
+
+ @Test
+ public void createDataType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.datatype", containerView, false);
+ }
+
+ @Test
+ public void createDimension() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.dimension", containerView, false);
+ }
+
+ @Test
+ public void createEnumeration() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumeration", containerView, false);
+ }
+
+ @Test
+ public void createEnumerationLiteral() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumerationliteral", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowport", containerView, false);
+ }
+
+ @Test
+ public void createFlowProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowproperty", containerView, false);
+ }
+
+ @Test
+ public void createFlowSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowspecification", containerView, false);
+ }
+
+ @Test
+ public void createInstanceSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.instancespecification", containerView, false);
+ }
+
+ @Test
+ public void createInterface() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.interface", containerView, false);
+ }
+
+ @Test
+ public void createModel() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.model", containerView, false);
+ }
+
+ @Test
+ public void createOperation() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.operation", containerView, true);
+ }
+
+ @Test
+ public void createPackage() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.package", containerView, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ // Do not execute as this requires user interaction (dialog)
+ createNodeFromPalette("blockdefinition.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createPrimitiveType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.primitivetype", containerView, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.property", containerView, false);
+ }
+
+ @Test
+ public void createReception() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reception", containerView, true);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ // Do not execute as this requires user interaction (dialog)
+ createNodeFromPalette("blockdefinition.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createSignal() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.signal", containerView, false);
+ }
+
+ @Test
+ public void createSlot() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.slot", containerView, false);
+ }
+
+ @Test
+ public void createUnit() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.unit", containerView, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ // Do not execute as this requires user interaction (dialog)
+ createNodeFromPalette("blockdefinition.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createValueType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.valuetype", containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnInterfacePropertyCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnInterfacePropertyCompartment.java
new file mode 100755
index 0000000..50b04e8
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnInterfacePropertyCompartment.java
@@ -0,0 +1,207 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.changeVisibility;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in an Interface "properties" compartment.
+ */
+public class TestNodeCreationOnInterfacePropertyCompartment extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ createNodeFromPalette("blockdefinition.tool.interface", getDiagramView(), true);
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), UMLGraphicalTypes.SHAPE_UML_INTERFACE_AS_CLASSIFIER_ID);
+ containerView = ViewUtil.getChildBySemanticHint(blockView, UMLGraphicalTypes.COMPARTMENT_UML_PROPERTY_AS_LIST_ID);
+
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!containerView.isVisible()) {
+ changeVisibility(containerView);
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActor() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actor", containerView, false);
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.block", containerView, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.comment", containerView, false);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraint", containerView, false);
+ }
+
+ @Test
+ public void createConstraintBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintblock", containerView, false);
+ }
+
+ @Test
+ public void createConstraintProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintproperty", containerView, false);
+ }
+
+ @Test
+ public void createDataType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.datatype", containerView, false);
+ }
+
+ @Test
+ public void createDimension() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.dimension", containerView, false);
+ }
+
+ @Test
+ public void createEnumeration() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumeration", containerView, false);
+ }
+
+ @Test
+ public void createEnumerationLiteral() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumerationliteral", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowport", containerView, false);
+ }
+
+ @Test
+ public void createFlowProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowproperty", containerView, false);
+ }
+
+ @Test
+ public void createFlowSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowspecification", containerView, false);
+ }
+
+ @Test
+ public void createInstanceSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.instancespecification", containerView, false);
+ }
+
+ @Test
+ public void createInterface() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.interface", containerView, false);
+ }
+
+ @Test
+ public void createModel() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.model", containerView, false);
+ }
+
+ @Test
+ public void createOperation() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.operation", containerView, false);
+ }
+
+ @Test
+ public void createPackage() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.package", containerView, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ // Do not execute as this requires user interaction (dialog)
+ createNodeFromPalette("blockdefinition.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createPrimitiveType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.primitivetype", containerView, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.property", containerView, true);
+ }
+
+ @Test
+ public void createReception() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reception", containerView, false);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ // Do not execute as this requires user interaction (dialog)
+ createNodeFromPalette("blockdefinition.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createSignal() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.signal", containerView, false);
+ }
+
+ @Test
+ public void createSlot() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.slot", containerView, false);
+ }
+
+ @Test
+ public void createUnit() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.unit", containerView, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ // Do not execute as this requires user interaction (dialog)
+ createNodeFromPalette("blockdefinition.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createValueType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.valuetype", containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnPrimitiveType.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnPrimitiveType.java
new file mode 100755
index 0000000..f7c023e
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnPrimitiveType.java
@@ -0,0 +1,203 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in a PrimitiveType.
+ */
+public class TestNodeCreationOnPrimitiveType extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ // force inherited provider loading...
+ createGraphicalNode(UMLElementTypes.PACKAGE, ElementTypes.PACKAGE.getSemanticHint(), getDiagramView());
+
+ createNodeFromPalette("blockdefinition.tool.primitivetype", getDiagramView(), true);
+ containerView = ViewUtil.getChildBySemanticHint(getDiagramView(), UMLGraphicalTypes.SHAPE_UML_PRIMITIVETYPE_AS_CLASSIFIER_ID);
+
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActor() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actor", containerView, false);
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.block", containerView, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.comment", containerView, false);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraint", containerView, false);
+ }
+
+ @Test
+ public void createConstraintBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintblock", containerView, false);
+ }
+
+ @Test
+ public void createConstraintProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintproperty", containerView, false);
+ }
+
+ @Test
+ public void createDataType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.datatype", containerView, false);
+ }
+
+ @Test
+ public void createDimension() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.dimension", containerView, false);
+ }
+
+ @Test
+ public void createEnumeration() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumeration", containerView, false);
+ }
+
+ @Test
+ public void createEnumerationLiteral() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumerationliteral", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowport", containerView, false);
+ }
+
+ @Test
+ public void createFlowProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowproperty", containerView, false);
+ }
+
+ @Test
+ public void createFlowSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowspecification", containerView, false);
+ }
+
+ @Test
+ public void createInstanceSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.instancespecification", containerView, false);
+ }
+
+ @Test
+ public void createInterface() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.interface", containerView, false);
+ }
+
+ @Test
+ public void createModel() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.model", containerView, false);
+ }
+
+ @Test
+ public void createOperation() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.operation", containerView, false);
+ }
+
+ @Test
+ public void createPackage() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.package", containerView, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createPrimitiveType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.primitivetype", containerView, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.property", containerView, false);
+ }
+
+ @Test
+ public void createReception() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reception", containerView, false);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createSignal() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.signal", containerView, false);
+ }
+
+ @Test
+ public void createSlot() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.slot", containerView, false);
+ }
+
+ @Test
+ public void createUnit() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.unit", containerView, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createValueType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.valuetype", containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnSignal.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnSignal.java
new file mode 100755
index 0000000..613b93a
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnSignal.java
@@ -0,0 +1,203 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in a Block.
+ */
+public class TestNodeCreationOnSignal extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ // force inherited provider loading...
+ createGraphicalNode(UMLElementTypes.PACKAGE, ElementTypes.PACKAGE.getSemanticHint(), getDiagramView());
+
+ createNodeFromPalette("blockdefinition.tool.signal", getDiagramView(), true);
+ containerView = ViewUtil.getChildBySemanticHint(getDiagramView(), UMLGraphicalTypes.SHAPE_UML_SIGNAL_AS_CLASSIFIER_ID);
+
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActor() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actor", containerView, false);
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.block", containerView, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.comment", containerView, false);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraint", containerView, false);
+ }
+
+ @Test
+ public void createConstraintBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintblock", containerView, false);
+ }
+
+ @Test
+ public void createConstraintProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintproperty", containerView, false);
+ }
+
+ @Test
+ public void createDataType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.datatype", containerView, false);
+ }
+
+ @Test
+ public void createDimension() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.dimension", containerView, false);
+ }
+
+ @Test
+ public void createEnumeration() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumeration", containerView, false);
+ }
+
+ @Test
+ public void createEnumerationLiteral() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumerationliteral", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowport", containerView, false);
+ }
+
+ @Test
+ public void createFlowProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowproperty", containerView, false);
+ }
+
+ @Test
+ public void createFlowSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowspecification", containerView, false);
+ }
+
+ @Test
+ public void createInstanceSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.instancespecification", containerView, false);
+ }
+
+ @Test
+ public void createInterface() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.interface", containerView, false);
+ }
+
+ @Test
+ public void createModel() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.model", containerView, false);
+ }
+
+ @Test
+ public void createOperation() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.operation", containerView, false);
+ }
+
+ @Test
+ public void createPackage() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.package", containerView, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createPrimitiveType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.primitivetype", containerView, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.property", containerView, false);
+ }
+
+ @Test
+ public void createReception() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reception", containerView, false);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createSignal() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.signal", containerView, false);
+ }
+
+ @Test
+ public void createSlot() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.slot", containerView, false);
+ }
+
+ @Test
+ public void createUnit() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.unit", containerView, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createValueType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.valuetype", containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnSignalOperationCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnSignalOperationCompartment.java
new file mode 100755
index 0000000..c7c7a14
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnSignalOperationCompartment.java
@@ -0,0 +1,30 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom;
+
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.junit.Ignore;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in a Signal "operations" compartment.
+ */
+public class TestNodeCreationOnSignalOperationCompartment extends AbstractTest {
+
+ @Ignore("Signal should not have operations compartment.")
+ @Test
+ public void warning() {
+ };
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnSignalPropertyCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnSignalPropertyCompartment.java
new file mode 100755
index 0000000..2a74197
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnSignalPropertyCompartment.java
@@ -0,0 +1,207 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.changeVisibility;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in a Signal "properties" compartment.
+ */
+public class TestNodeCreationOnSignalPropertyCompartment extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ createNodeFromPalette("blockdefinition.tool.signal", getDiagramView(), true);
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), UMLGraphicalTypes.SHAPE_UML_SIGNAL_AS_CLASSIFIER_ID);
+ containerView = ViewUtil.getChildBySemanticHint(blockView, UMLGraphicalTypes.COMPARTMENT_UML_PROPERTY_AS_LIST_ID);
+
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!containerView.isVisible()) {
+ changeVisibility(containerView);
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActor() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actor", containerView, false);
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.block", containerView, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.comment", containerView, false);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraint", containerView, false);
+ }
+
+ @Test
+ public void createConstraintBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintblock", containerView, false);
+ }
+
+ @Test
+ public void createConstraintProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintproperty", containerView, false);
+ }
+
+ @Test
+ public void createDataType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.datatype", containerView, false);
+ }
+
+ @Test
+ public void createDimension() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.dimension", containerView, false);
+ }
+
+ @Test
+ public void createEnumeration() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumeration", containerView, false);
+ }
+
+ @Test
+ public void createEnumerationLiteral() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumerationliteral", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowport", containerView, false);
+ }
+
+ @Test
+ public void createFlowProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowproperty", containerView, false);
+ }
+
+ @Test
+ public void createFlowSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowspecification", containerView, false);
+ }
+
+ @Test
+ public void createInstanceSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.instancespecification", containerView, false);
+ }
+
+ @Test
+ public void createInterface() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.interface", containerView, false);
+ }
+
+ @Test
+ public void createModel() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.model", containerView, false);
+ }
+
+ @Test
+ public void createOperation() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.operation", containerView, false);
+ }
+
+ @Test
+ public void createPackage() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.package", containerView, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ // Do not execute as this requires user interaction (dialog)
+ createNodeFromPalette("blockdefinition.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createPrimitiveType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.primitivetype", containerView, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.property", containerView, true);
+ }
+
+ @Test
+ public void createReception() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reception", containerView, false);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ // Do not execute as this requires user interaction (dialog)
+ createNodeFromPalette("blockdefinition.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createSignal() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.signal", containerView, false);
+ }
+
+ @Test
+ public void createSlot() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.slot", containerView, false);
+ }
+
+ @Test
+ public void createUnit() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.unit", containerView, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ // Do not execute as this requires user interaction (dialog)
+ createNodeFromPalette("blockdefinition.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createValueType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.valuetype", containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnUnit.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnUnit.java
new file mode 100755
index 0000000..8612633
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnUnit.java
@@ -0,0 +1,203 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in a Block.
+ */
+public class TestNodeCreationOnUnit extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ // force inherited provider loading...
+ createGraphicalNode(UMLElementTypes.PACKAGE, ElementTypes.PACKAGE.getSemanticHint(), getDiagramView());
+
+ createNodeFromPalette("blockdefinition.tool.unit", getDiagramView(), true);
+ containerView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_UNIT_AS_CLASSIFIER_ID);
+
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActor() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actor", containerView, false);
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.block", containerView, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.comment", containerView, false);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraint", containerView, false);
+ }
+
+ @Test
+ public void createConstraintBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintblock", containerView, false);
+ }
+
+ @Test
+ public void createConstraintProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintproperty", containerView, false);
+ }
+
+ @Test
+ public void createDataType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.datatype", containerView, false);
+ }
+
+ @Test
+ public void createDimension() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.dimension", containerView, false);
+ }
+
+ @Test
+ public void createEnumeration() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumeration", containerView, false);
+ }
+
+ @Test
+ public void createEnumerationLiteral() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumerationliteral", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowport", containerView, false);
+ }
+
+ @Test
+ public void createFlowProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowproperty", containerView, false);
+ }
+
+ @Test
+ public void createFlowSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowspecification", containerView, false);
+ }
+
+ @Test
+ public void createInstanceSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.instancespecification", containerView, false);
+ }
+
+ @Test
+ public void createInterface() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.interface", containerView, false);
+ }
+
+ @Test
+ public void createModel() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.model", containerView, false);
+ }
+
+ @Test
+ public void createOperation() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.operation", containerView, false);
+ }
+
+ @Test
+ public void createPackage() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.package", containerView, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createPrimitiveType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.primitivetype", containerView, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.property", containerView, false);
+ }
+
+ @Test
+ public void createReception() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reception", containerView, false);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createSignal() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.signal", containerView, false);
+ }
+
+ @Test
+ public void createSlot() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.slot", containerView, false);
+ }
+
+ @Test
+ public void createUnit() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.unit", containerView, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createValueType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.valuetype", containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnValueType.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnValueType.java
new file mode 100755
index 0000000..c3bd1fd
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnValueType.java
@@ -0,0 +1,203 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in a ValueType.
+ */
+public class TestNodeCreationOnValueType extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ // force inherited provider loading...
+ createGraphicalNode(UMLElementTypes.PACKAGE, ElementTypes.PACKAGE.getSemanticHint(), getDiagramView());
+
+ createNodeFromPalette("blockdefinition.tool.valuetype", getDiagramView(), true);
+ containerView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_VALUETYPE_AS_CLASSIFIER_ID);
+
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActor() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actor", containerView, false);
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.block", containerView, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.comment", containerView, false);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraint", containerView, false);
+ }
+
+ @Test
+ public void createConstraintBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintblock", containerView, false);
+ }
+
+ @Test
+ public void createConstraintProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintproperty", containerView, false);
+ }
+
+ @Test
+ public void createDataType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.datatype", containerView, false);
+ }
+
+ @Test
+ public void createDimension() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.dimension", containerView, false);
+ }
+
+ @Test
+ public void createEnumeration() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumeration", containerView, false);
+ }
+
+ @Test
+ public void createEnumerationLiteral() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumerationliteral", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowport", containerView, false);
+ }
+
+ @Test
+ public void createFlowProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowproperty", containerView, false);
+ }
+
+ @Test
+ public void createFlowSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowspecification", containerView, false);
+ }
+
+ @Test
+ public void createInstanceSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.instancespecification", containerView, false);
+ }
+
+ @Test
+ public void createInterface() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.interface", containerView, false);
+ }
+
+ @Test
+ public void createModel() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.model", containerView, false);
+ }
+
+ @Test
+ public void createOperation() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.operation", containerView, false);
+ }
+
+ @Test
+ public void createPackage() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.package", containerView, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createPrimitiveType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.primitivetype", containerView, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.property", containerView, false);
+ }
+
+ @Test
+ public void createReception() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reception", containerView, false);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createSignal() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.signal", containerView, false);
+ }
+
+ @Test
+ public void createSlot() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.slot", containerView, false);
+ }
+
+ @Test
+ public void createUnit() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.unit", containerView, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createValueType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.valuetype", containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnValueTypeOperationCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnValueTypeOperationCompartment.java
new file mode 100755
index 0000000..393f704
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnValueTypeOperationCompartment.java
@@ -0,0 +1,208 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.changeVisibility;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in a ValueType "properties" compartment.
+ */
+public class TestNodeCreationOnValueTypeOperationCompartment extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ createNodeFromPalette("blockdefinition.tool.valuetype", getDiagramView(), true);
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_VALUETYPE_AS_CLASSIFIER_ID);
+ containerView = ViewUtil.getChildBySemanticHint(blockView, UMLGraphicalTypes.COMPARTMENT_UML_OPERATION_AS_LIST_ID);
+
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!containerView.isVisible()) {
+ changeVisibility(containerView);
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActor() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actor", containerView, false);
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.block", containerView, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.comment", containerView, false);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraint", containerView, false);
+ }
+
+ @Test
+ public void createConstraintBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintblock", containerView, false);
+ }
+
+ @Test
+ public void createConstraintProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintproperty", containerView, false);
+ }
+
+ @Test
+ public void createDataType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.datatype", containerView, false);
+ }
+
+ @Test
+ public void createDimension() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.dimension", containerView, false);
+ }
+
+ @Test
+ public void createEnumeration() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumeration", containerView, false);
+ }
+
+ @Test
+ public void createEnumerationLiteral() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumerationliteral", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowport", containerView, false);
+ }
+
+ @Test
+ public void createFlowProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowproperty", containerView, false);
+ }
+
+ @Test
+ public void createFlowSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowspecification", containerView, false);
+ }
+
+ @Test
+ public void createInstanceSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.instancespecification", containerView, false);
+ }
+
+ @Test
+ public void createInterface() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.interface", containerView, false);
+ }
+
+ @Test
+ public void createModel() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.model", containerView, false);
+ }
+
+ @Test
+ public void createOperation() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.operation", containerView, true);
+ }
+
+ @Test
+ public void createPackage() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.package", containerView, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ // Do not execute as this requires user interaction (dialog)
+ createNodeFromPalette("blockdefinition.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createPrimitiveType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.primitivetype", containerView, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.property", containerView, false);
+ }
+
+ @Test
+ public void createReception() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reception", containerView, false);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ // Do not execute as this requires user interaction (dialog)
+ createNodeFromPalette("blockdefinition.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createSignal() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.signal", containerView, false);
+ }
+
+ @Test
+ public void createSlot() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.slot", containerView, false);
+ }
+
+ @Test
+ public void createUnit() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.unit", containerView, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ // Do not execute as this requires user interaction (dialog)
+ createNodeFromPalette("blockdefinition.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createValueType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.valuetype", containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnValueTypePropertyCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnValueTypePropertyCompartment.java
new file mode 100755
index 0000000..a24e552
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/custom/TestNodeCreationOnValueTypePropertyCompartment.java
@@ -0,0 +1,208 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.changeVisibility;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in a ValueType "properties" compartment.
+ */
+public class TestNodeCreationOnValueTypePropertyCompartment extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ createNodeFromPalette("blockdefinition.tool.valuetype", getDiagramView(), true);
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_VALUETYPE_AS_CLASSIFIER_ID);
+ containerView = ViewUtil.getChildBySemanticHint(blockView, UMLGraphicalTypes.COMPARTMENT_UML_PROPERTY_AS_LIST_ID);
+
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!containerView.isVisible()) {
+ changeVisibility(containerView);
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActor() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actor", containerView, false);
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.block", containerView, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.comment", containerView, false);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraint", containerView, false);
+ }
+
+ @Test
+ public void createConstraintBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintblock", containerView, false);
+ }
+
+ @Test
+ public void createConstraintProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintproperty", containerView, false);
+ }
+
+ @Test
+ public void createDataType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.datatype", containerView, false);
+ }
+
+ @Test
+ public void createDimension() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.dimension", containerView, false);
+ }
+
+ @Test
+ public void createEnumeration() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumeration", containerView, false);
+ }
+
+ @Test
+ public void createEnumerationLiteral() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumerationliteral", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowport", containerView, false);
+ }
+
+ @Test
+ public void createFlowProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowproperty", containerView, false);
+ }
+
+ @Test
+ public void createFlowSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowspecification", containerView, false);
+ }
+
+ @Test
+ public void createInstanceSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.instancespecification", containerView, false);
+ }
+
+ @Test
+ public void createInterface() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.interface", containerView, false);
+ }
+
+ @Test
+ public void createModel() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.model", containerView, false);
+ }
+
+ @Test
+ public void createOperation() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.operation", containerView, false);
+ }
+
+ @Test
+ public void createPackage() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.package", containerView, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ // Do not execute as this requires user interaction (dialog)
+ createNodeFromPalette("blockdefinition.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createPrimitiveType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.primitivetype", containerView, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.property", containerView, true);
+ }
+
+ @Test
+ public void createReception() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reception", containerView, false);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ // Do not execute as this requires user interaction (dialog)
+ createNodeFromPalette("blockdefinition.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createSignal() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.signal", containerView, false);
+ }
+
+ @Test
+ public void createSlot() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.slot", containerView, false);
+ }
+
+ @Test
+ public void createUnit() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.unit", containerView, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ // Do not execute as this requires user interaction (dialog)
+ createNodeFromPalette("blockdefinition.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createValueType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.valuetype", containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/inherited/TestNodeCreationOnComment.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/inherited/TestNodeCreationOnComment.java
new file mode 100755
index 0000000..ccd77fe
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/inherited/TestNodeCreationOnComment.java
@@ -0,0 +1,201 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.inherited;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in a Comment (TopNode - still inherited from class diagram).
+ */
+public class TestNodeCreationOnComment extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ // force inherited provider loading...
+ createGraphicalNode(SysMLElementTypes.BLOCK, SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_CLASSIFIER_ID, getDiagramView());
+
+ containerView = createGraphicalNode(UMLElementTypes.COMMENT, ElementTypes.COMMENT.getSemanticHint(), getDiagramView());
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActor() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actor", containerView, false);
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.block", containerView, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.comment", containerView, false);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraint", containerView, false);
+ }
+
+ @Test
+ public void createConstraintBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintblock", containerView, false);
+ }
+
+ @Test
+ public void createConstraintProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintproperty", containerView, false);
+ }
+
+ @Test
+ public void createDataType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.datatype", containerView, false);
+ }
+
+ @Test
+ public void createDimension() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.dimension", containerView, false);
+ }
+
+ @Test
+ public void createEnumeration() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumeration", containerView, false);
+ }
+
+ @Test
+ public void createEnumerationLiteral() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumerationliteral", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowport", containerView, false);
+ }
+
+ @Test
+ public void createFlowProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowproperty", containerView, false);
+ }
+
+ @Test
+ public void createFlowSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowspecification", containerView, false);
+ }
+
+ @Test
+ public void createInstanceSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.instancespecification", containerView, false);
+ }
+
+ @Test
+ public void createInterface() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.interface", containerView, false);
+ }
+
+ @Test
+ public void createModel() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.model", containerView, false);
+ }
+
+ @Test
+ public void createOperation() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.operation", containerView, false);
+ }
+
+ @Test
+ public void createPackage() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.package", containerView, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createPrimitiveType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.primitivetype", containerView, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.property", containerView, false);
+ }
+
+ @Test
+ public void createReception() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reception", containerView, false);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createSignal() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.signal", containerView, false);
+ }
+
+ @Test
+ public void createSlot() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.slot", containerView, false);
+ }
+
+ @Test
+ public void createUnit() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.unit", containerView, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createValueType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.valuetype", containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/inherited/TestNodeCreationOnCommentCN.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/inherited/TestNodeCreationOnCommentCN.java
new file mode 100755
index 0000000..d780e1a
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/inherited/TestNodeCreationOnCommentCN.java
@@ -0,0 +1,210 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.inherited;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.changeVisibility;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in a Comment (ChildNode - still inherited from class diagram).
+ */
+public class TestNodeCreationOnCommentCN extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ // force custom provider loading...
+ createGraphicalNode(SysMLElementTypes.BLOCK, SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_CLASSIFIER_ID, getDiagramView());
+
+ View topNodeView = createGraphicalNode(UMLElementTypes.MODEL, ElementTypes.MODEL.getSemanticHint(), getDiagramView());
+ View topNodeCompartmentView = ViewUtil.getChildBySemanticHint(topNodeView, ElementTypes.MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT);
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!topNodeCompartmentView.isVisible()) {
+ changeVisibility(topNodeCompartmentView);
+ }
+
+ containerView = createGraphicalNode(UMLElementTypes.COMMENT, ElementTypes.COMMENT_CN.getSemanticHint(), topNodeCompartmentView);
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActor() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actor", containerView, false);
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.block", containerView, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.comment", containerView, false);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraint", containerView, false);
+ }
+
+ @Test
+ public void createConstraintBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintblock", containerView, false);
+ }
+
+ @Test
+ public void createConstraintProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintproperty", containerView, false);
+ }
+
+ @Test
+ public void createDataType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.datatype", containerView, false);
+ }
+
+ @Test
+ public void createDimension() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.dimension", containerView, false);
+ }
+
+ @Test
+ public void createEnumeration() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumeration", containerView, false);
+ }
+
+ @Test
+ public void createEnumerationLiteral() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumerationliteral", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowport", containerView, false);
+ }
+
+ @Test
+ public void createFlowProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowproperty", containerView, false);
+ }
+
+ @Test
+ public void createFlowSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowspecification", containerView, false);
+ }
+
+ @Test
+ public void createInstanceSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.instancespecification", containerView, false);
+ }
+
+ @Test
+ public void createInterface() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.interface", containerView, false);
+ }
+
+ @Test
+ public void createModel() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.model", containerView, false);
+ }
+
+ @Test
+ public void createOperation() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.operation", containerView, false);
+ }
+
+ @Test
+ public void createPackage() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.package", containerView, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createPrimitiveType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.primitivetype", containerView, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.property", containerView, false);
+ }
+
+ @Test
+ public void createReception() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reception", containerView, false);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createSignal() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.signal", containerView, false);
+ }
+
+ @Test
+ public void createSlot() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.slot", containerView, false);
+ }
+
+ @Test
+ public void createUnit() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.unit", containerView, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createValueType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.valuetype", containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/inherited/TestNodeCreationOnConstraint.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/inherited/TestNodeCreationOnConstraint.java
new file mode 100755
index 0000000..176e82f
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/inherited/TestNodeCreationOnConstraint.java
@@ -0,0 +1,201 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.inherited;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in a Constraint (TopNode - still inherited from class diagram).
+ */
+public class TestNodeCreationOnConstraint extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ // force inherited provider loading...
+ createGraphicalNode(SysMLElementTypes.BLOCK, SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_CLASSIFIER_ID, getDiagramView());
+
+ containerView = createGraphicalNode(UMLElementTypes.CONSTRAINT, ElementTypes.CONSTRAINT.getSemanticHint(), getDiagramView());
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActor() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actor", containerView, false);
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.block", containerView, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.comment", containerView, false);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraint", containerView, false);
+ }
+
+ @Test
+ public void createConstraintBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintblock", containerView, false);
+ }
+
+ @Test
+ public void createConstraintProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintproperty", containerView, false);
+ }
+
+ @Test
+ public void createDataType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.datatype", containerView, false);
+ }
+
+ @Test
+ public void createDimension() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.dimension", containerView, false);
+ }
+
+ @Test
+ public void createEnumeration() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumeration", containerView, false);
+ }
+
+ @Test
+ public void createEnumerationLiteral() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumerationliteral", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowport", containerView, false);
+ }
+
+ @Test
+ public void createFlowProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowproperty", containerView, false);
+ }
+
+ @Test
+ public void createFlowSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowspecification", containerView, false);
+ }
+
+ @Test
+ public void createInstanceSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.instancespecification", containerView, false);
+ }
+
+ @Test
+ public void createInterface() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.interface", containerView, false);
+ }
+
+ @Test
+ public void createModel() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.model", containerView, false);
+ }
+
+ @Test
+ public void createOperation() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.operation", containerView, false);
+ }
+
+ @Test
+ public void createPackage() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.package", containerView, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createPrimitiveType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.primitivetype", containerView, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.property", containerView, false);
+ }
+
+ @Test
+ public void createReception() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reception", containerView, false);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createSignal() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.signal", containerView, false);
+ }
+
+ @Test
+ public void createSlot() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.slot", containerView, false);
+ }
+
+ @Test
+ public void createUnit() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.unit", containerView, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createValueType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.valuetype", containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/inherited/TestNodeCreationOnConstraintCN.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/inherited/TestNodeCreationOnConstraintCN.java
new file mode 100755
index 0000000..0b05894
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/inherited/TestNodeCreationOnConstraintCN.java
@@ -0,0 +1,210 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.inherited;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.changeVisibility;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in a Constraint (ChildNode - still inherited from class diagram).
+ */
+public class TestNodeCreationOnConstraintCN extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ // force custom provider loading...
+ createGraphicalNode(SysMLElementTypes.BLOCK, SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_CLASSIFIER_ID, getDiagramView());
+
+ View topNodeView = createGraphicalNode(UMLElementTypes.MODEL, ElementTypes.MODEL.getSemanticHint(), getDiagramView());
+ View topNodeCompartmentView = ViewUtil.getChildBySemanticHint(topNodeView, ElementTypes.MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT);
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!topNodeCompartmentView.isVisible()) {
+ changeVisibility(topNodeCompartmentView);
+ }
+
+ containerView = createGraphicalNode(UMLElementTypes.CONSTRAINT, ElementTypes.CONSTRAINT_CN.getSemanticHint(), topNodeCompartmentView);
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActor() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actor", containerView, false);
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.block", containerView, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.comment", containerView, false);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraint", containerView, false);
+ }
+
+ @Test
+ public void createConstraintBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintblock", containerView, false);
+ }
+
+ @Test
+ public void createConstraintProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintproperty", containerView, false);
+ }
+
+ @Test
+ public void createDataType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.datatype", containerView, false);
+ }
+
+ @Test
+ public void createDimension() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.dimension", containerView, false);
+ }
+
+ @Test
+ public void createEnumeration() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumeration", containerView, false);
+ }
+
+ @Test
+ public void createEnumerationLiteral() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumerationliteral", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowport", containerView, false);
+ }
+
+ @Test
+ public void createFlowProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowproperty", containerView, false);
+ }
+
+ @Test
+ public void createFlowSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowspecification", containerView, false);
+ }
+
+ @Test
+ public void createInstanceSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.instancespecification", containerView, false);
+ }
+
+ @Test
+ public void createInterface() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.interface", containerView, false);
+ }
+
+ @Test
+ public void createModel() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.model", containerView, false);
+ }
+
+ @Test
+ public void createOperation() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.operation", containerView, false);
+ }
+
+ @Test
+ public void createPackage() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.package", containerView, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createPrimitiveType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.primitivetype", containerView, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.property", containerView, false);
+ }
+
+ @Test
+ public void createReception() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reception", containerView, false);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createSignal() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.signal", containerView, false);
+ }
+
+ @Test
+ public void createSlot() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.slot", containerView, false);
+ }
+
+ @Test
+ public void createUnit() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.unit", containerView, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createValueType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.valuetype", containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/inherited/TestNodeCreationOnInstanceSpecification.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/inherited/TestNodeCreationOnInstanceSpecification.java
new file mode 100755
index 0000000..36c879b
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/inherited/TestNodeCreationOnInstanceSpecification.java
@@ -0,0 +1,201 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.inherited;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in an InstanceSpecification (TopNode - still inherited from class diagram).
+ */
+public class TestNodeCreationOnInstanceSpecification extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ // force inherited provider loading...
+ createGraphicalNode(SysMLElementTypes.BLOCK, SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_CLASSIFIER_ID, getDiagramView());
+
+ containerView = createGraphicalNode(UMLElementTypes.INSTANCE_SPECIFICATION, ElementTypes.INSTANCE_SPECIFICATION.getSemanticHint(), getDiagramView());
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActor() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actor", containerView, false);
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.block", containerView, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.comment", containerView, false);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraint", containerView, false);
+ }
+
+ @Test
+ public void createConstraintBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintblock", containerView, false);
+ }
+
+ @Test
+ public void createConstraintProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintproperty", containerView, false);
+ }
+
+ @Test
+ public void createDataType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.datatype", containerView, false);
+ }
+
+ @Test
+ public void createDimension() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.dimension", containerView, false);
+ }
+
+ @Test
+ public void createEnumeration() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumeration", containerView, false);
+ }
+
+ @Test
+ public void createEnumerationLiteral() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumerationliteral", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowport", containerView, false);
+ }
+
+ @Test
+ public void createFlowProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowproperty", containerView, false);
+ }
+
+ @Test
+ public void createFlowSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowspecification", containerView, false);
+ }
+
+ @Test
+ public void createInstanceSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.instancespecification", containerView, false);
+ }
+
+ @Test
+ public void createInterface() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.interface", containerView, false);
+ }
+
+ @Test
+ public void createModel() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.model", containerView, false);
+ }
+
+ @Test
+ public void createOperation() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.operation", containerView, false);
+ }
+
+ @Test
+ public void createPackage() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.package", containerView, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createPrimitiveType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.primitivetype", containerView, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.property", containerView, false);
+ }
+
+ @Test
+ public void createReception() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reception", containerView, false);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createSignal() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.signal", containerView, false);
+ }
+
+ @Test
+ public void createSlot() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.slot", containerView, false);
+ }
+
+ @Test
+ public void createUnit() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.unit", containerView, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createValueType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.valuetype", containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/inherited/TestNodeCreationOnInstanceSpecificationCN.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/inherited/TestNodeCreationOnInstanceSpecificationCN.java
new file mode 100755
index 0000000..30716f8
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/inherited/TestNodeCreationOnInstanceSpecificationCN.java
@@ -0,0 +1,210 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.inherited;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.changeVisibility;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in an InstanceSpecification (ChildNode - still inherited from class diagram).
+ */
+public class TestNodeCreationOnInstanceSpecificationCN extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ // force custom provider loading...
+ createGraphicalNode(SysMLElementTypes.BLOCK, SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_CLASSIFIER_ID, getDiagramView());
+
+ View topNodeView = createGraphicalNode(UMLElementTypes.MODEL, ElementTypes.MODEL.getSemanticHint(), getDiagramView());
+ View topNodeCompartmentView = ViewUtil.getChildBySemanticHint(topNodeView, ElementTypes.MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT);
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!topNodeCompartmentView.isVisible()) {
+ changeVisibility(topNodeCompartmentView);
+ }
+
+ containerView = createGraphicalNode(UMLElementTypes.INSTANCE_SPECIFICATION, ElementTypes.INSTANCE_SPECIFICATION.getSemanticHint(), topNodeCompartmentView);
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActor() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actor", containerView, false);
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.block", containerView, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.comment", containerView, false);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraint", containerView, false);
+ }
+
+ @Test
+ public void createConstraintBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintblock", containerView, false);
+ }
+
+ @Test
+ public void createConstraintProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintproperty", containerView, false);
+ }
+
+ @Test
+ public void createDataType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.datatype", containerView, false);
+ }
+
+ @Test
+ public void createDimension() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.dimension", containerView, false);
+ }
+
+ @Test
+ public void createEnumeration() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumeration", containerView, false);
+ }
+
+ @Test
+ public void createEnumerationLiteral() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumerationliteral", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowport", containerView, false);
+ }
+
+ @Test
+ public void createFlowProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowproperty", containerView, false);
+ }
+
+ @Test
+ public void createFlowSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowspecification", containerView, false);
+ }
+
+ @Test
+ public void createInstanceSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.instancespecification", containerView, false);
+ }
+
+ @Test
+ public void createInterface() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.interface", containerView, false);
+ }
+
+ @Test
+ public void createModel() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.model", containerView, false);
+ }
+
+ @Test
+ public void createOperation() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.operation", containerView, false);
+ }
+
+ @Test
+ public void createPackage() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.package", containerView, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createPrimitiveType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.primitivetype", containerView, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.property", containerView, false);
+ }
+
+ @Test
+ public void createReception() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reception", containerView, false);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createSignal() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.signal", containerView, false);
+ }
+
+ @Test
+ public void createSlot() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.slot", containerView, false);
+ }
+
+ @Test
+ public void createUnit() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.unit", containerView, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createValueType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.valuetype", containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/inherited/TestNodeCreationOnInstanceSpecificationCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/inherited/TestNodeCreationOnInstanceSpecificationCompartment.java
new file mode 100755
index 0000000..cd03247
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/inherited/TestNodeCreationOnInstanceSpecificationCompartment.java
@@ -0,0 +1,209 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.inherited;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.changeVisibility;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in an InstanceSpecification compartment (TopNode - still inherited from class diagram).
+ */
+public class TestNodeCreationOnInstanceSpecificationCompartment extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ // force custom provider loading...
+ createNodeFromPalette("blockdefinition.tool.block", getDiagramView(), true);
+ //
+
+ createNodeFromPalette("blockdefinition.tool.instancespecification", getDiagramView(), true);
+ View nodeView = ViewUtil.getChildBySemanticHint(getDiagramView(), ElementTypes.INSTANCE_SPECIFICATION.getSemanticHint());
+
+ containerView = ViewUtil.getChildBySemanticHint(nodeView, ElementTypes.INSTANCE_SPECIFICATION_COMPARTMENT_SLOT_HINT);
+
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!containerView.isVisible()) {
+ changeVisibility(containerView);
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActor() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actor", containerView, false);
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.block", containerView, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.comment", containerView, false);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraint", containerView, false);
+ }
+
+ @Test
+ public void createConstraintBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintblock", containerView, false);
+ }
+
+ @Test
+ public void createConstraintProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintproperty", containerView, false);
+ }
+
+ @Test
+ public void createDataType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.datatype", containerView, false);
+ }
+
+ @Test
+ public void createDimension() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.dimension", containerView, false);
+ }
+
+ @Test
+ public void createEnumeration() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumeration", containerView, false);
+ }
+
+ @Test
+ public void createEnumerationLiteral() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumerationliteral", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowport", containerView, false);
+ }
+
+ @Test
+ public void createFlowProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowproperty", containerView, false);
+ }
+
+ @Test
+ public void createFlowSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowspecification", containerView, false);
+ }
+
+ @Test
+ public void createInstanceSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.instancespecification", containerView, false);
+ }
+
+ @Test
+ public void createInterface() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.interface", containerView, false);
+ }
+
+ @Test
+ public void createModel() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.model", containerView, false);
+ }
+
+ @Test
+ public void createOperation() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.operation", containerView, false);
+ }
+
+ @Test
+ public void createPackage() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.package", containerView, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createPrimitiveType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.primitivetype", containerView, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.property", containerView, false);
+ }
+
+ @Test
+ public void createReception() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reception", containerView, false);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createSignal() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.signal", containerView, false);
+ }
+
+ @Test
+ public void createSlot() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.slot", containerView, true);
+ }
+
+ @Test
+ public void createUnit() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.unit", containerView, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createValueType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.valuetype", containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/inherited/TestNodeCreationOnInstanceSpecificationCompartmentCN.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/inherited/TestNodeCreationOnInstanceSpecificationCompartmentCN.java
new file mode 100755
index 0000000..8930525
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/inherited/TestNodeCreationOnInstanceSpecificationCompartmentCN.java
@@ -0,0 +1,217 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.inherited;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.changeVisibility;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in a Model compartment (TopNode - still inherited from class diagram).
+ */
+public class TestNodeCreationOnInstanceSpecificationCompartmentCN extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ // force custom provider loading...
+ createNodeFromPalette("blockdefinition.tool.block", getDiagramView(), true);
+ //
+
+ createNodeFromPalette("blockdefinition.tool.model", getDiagramView(), true);
+ View topNodeView = ViewUtil.getChildBySemanticHint(getDiagramView(), ElementTypes.MODEL.getSemanticHint());
+ View topNodeCompartmentView = ViewUtil.getChildBySemanticHint(topNodeView, ElementTypes.MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT);
+
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!topNodeCompartmentView.isVisible()) {
+ changeVisibility(topNodeCompartmentView);
+ }
+
+ createNodeFromPalette("blockdefinition.tool.instancespecification", topNodeCompartmentView, true);
+ View childNodeView = ViewUtil.getChildBySemanticHint(topNodeCompartmentView, ElementTypes.INSTANCE_SPECIFICATION_CN.getSemanticHint());
+ containerView = ViewUtil.getChildBySemanticHint(childNodeView, ElementTypes.INSTANCE_SPECIFICATION_CN_COMPARTMENT_SLOT_HINT);
+
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!containerView.isVisible()) {
+ changeVisibility(containerView);
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActor() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actor", containerView, false);
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.block", containerView, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.comment", containerView, false);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraint", containerView, false);
+ }
+
+ @Test
+ public void createConstraintBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintblock", containerView, false);
+ }
+
+ @Test
+ public void createConstraintProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintproperty", containerView, false);
+ }
+
+ @Test
+ public void createDataType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.datatype", containerView, false);
+ }
+
+ @Test
+ public void createDimension() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.dimension", containerView, false);
+ }
+
+ @Test
+ public void createEnumeration() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumeration", containerView, false);
+ }
+
+ @Test
+ public void createEnumerationLiteral() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumerationliteral", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowport", containerView, false);
+ }
+
+ @Test
+ public void createFlowProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowproperty", containerView, false);
+ }
+
+ @Test
+ public void createFlowSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowspecification", containerView, false);
+ }
+
+ @Test
+ public void createInstanceSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.instancespecification", containerView, false);
+ }
+
+ @Test
+ public void createInterface() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.interface", containerView, false);
+ }
+
+ @Test
+ public void createModel() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.model", containerView, false);
+ }
+
+ @Test
+ public void createOperation() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.operation", containerView, false);
+ }
+
+ @Test
+ public void createPackage() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.package", containerView, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createPrimitiveType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.primitivetype", containerView, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.property", containerView, false);
+ }
+
+ @Test
+ public void createReception() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reception", containerView, false);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createSignal() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.signal", containerView, false);
+ }
+
+ @Test
+ public void createSlot() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.slot", containerView, true);
+ }
+
+ @Test
+ public void createUnit() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.unit", containerView, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createValueType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.valuetype", containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/inherited/TestNodeCreationOnModel.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/inherited/TestNodeCreationOnModel.java
new file mode 100755
index 0000000..f2db63c
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/inherited/TestNodeCreationOnModel.java
@@ -0,0 +1,201 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.inherited;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in a Model (TopNode - still inherited from class diagram).
+ */
+public class TestNodeCreationOnModel extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ // force custom provider loading...
+ createGraphicalNode(SysMLElementTypes.BLOCK, SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_CLASSIFIER_ID, getDiagramView());
+
+ containerView = createGraphicalNode(UMLElementTypes.MODEL, ElementTypes.MODEL.getSemanticHint(), getDiagramView());
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActor() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actor", containerView, false);
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.block", containerView, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.comment", containerView, false);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraint", containerView, false);
+ }
+
+ @Test
+ public void createConstraintBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintblock", containerView, false);
+ }
+
+ @Test
+ public void createConstraintProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintproperty", containerView, false);
+ }
+
+ @Test
+ public void createDataType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.datatype", containerView, false);
+ }
+
+ @Test
+ public void createDimension() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.dimension", containerView, false);
+ }
+
+ @Test
+ public void createEnumeration() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumeration", containerView, false);
+ }
+
+ @Test
+ public void createEnumerationLiteral() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumerationliteral", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowport", containerView, false);
+ }
+
+ @Test
+ public void createFlowProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowproperty", containerView, false);
+ }
+
+ @Test
+ public void createFlowSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowspecification", containerView, false);
+ }
+
+ @Test
+ public void createInstanceSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.instancespecification", containerView, false);
+ }
+
+ @Test
+ public void createInterface() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.interface", containerView, false);
+ }
+
+ @Test
+ public void createModel() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.model", containerView, false);
+ }
+
+ @Test
+ public void createOperation() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.operation", containerView, false);
+ }
+
+ @Test
+ public void createPackage() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.package", containerView, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createPrimitiveType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.primitivetype", containerView, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.property", containerView, false);
+ }
+
+ @Test
+ public void createReception() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reception", containerView, false);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createSignal() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.signal", containerView, false);
+ }
+
+ @Test
+ public void createSlot() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.slot", containerView, false);
+ }
+
+ @Test
+ public void createUnit() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.unit", containerView, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createValueType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.valuetype", containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/inherited/TestNodeCreationOnModelCN.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/inherited/TestNodeCreationOnModelCN.java
new file mode 100755
index 0000000..0714385
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/inherited/TestNodeCreationOnModelCN.java
@@ -0,0 +1,210 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.inherited;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.changeVisibility;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in a Model (ChildNode - still inherited from class diagram).
+ */
+public class TestNodeCreationOnModelCN extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ // force custom provider loading...
+ createGraphicalNode(SysMLElementTypes.BLOCK, SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_CLASSIFIER_ID, getDiagramView());
+
+ View topNodeView = createGraphicalNode(UMLElementTypes.MODEL, ElementTypes.MODEL.getSemanticHint(), getDiagramView());
+ View topNodeCompartmentView = ViewUtil.getChildBySemanticHint(topNodeView, ElementTypes.MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT);
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!topNodeCompartmentView.isVisible()) {
+ changeVisibility(topNodeCompartmentView);
+ }
+
+ containerView = createGraphicalNode(UMLElementTypes.MODEL, ElementTypes.MODEL_CN.getSemanticHint(), topNodeCompartmentView);
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActor() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actor", containerView, false);
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.block", containerView, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.comment", containerView, false);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraint", containerView, false);
+ }
+
+ @Test
+ public void createConstraintBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintblock", containerView, false);
+ }
+
+ @Test
+ public void createConstraintProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintproperty", containerView, false);
+ }
+
+ @Test
+ public void createDataType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.datatype", containerView, false);
+ }
+
+ @Test
+ public void createDimension() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.dimension", containerView, false);
+ }
+
+ @Test
+ public void createEnumeration() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumeration", containerView, false);
+ }
+
+ @Test
+ public void createEnumerationLiteral() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumerationliteral", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowport", containerView, false);
+ }
+
+ @Test
+ public void createFlowProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowproperty", containerView, false);
+ }
+
+ @Test
+ public void createFlowSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowspecification", containerView, false);
+ }
+
+ @Test
+ public void createInstanceSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.instancespecification", containerView, false);
+ }
+
+ @Test
+ public void createInterface() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.interface", containerView, false);
+ }
+
+ @Test
+ public void createModel() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.model", containerView, false);
+ }
+
+ @Test
+ public void createOperation() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.operation", containerView, false);
+ }
+
+ @Test
+ public void createPackage() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.package", containerView, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createPrimitiveType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.primitivetype", containerView, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.property", containerView, false);
+ }
+
+ @Test
+ public void createReception() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reception", containerView, false);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createSignal() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.signal", containerView, false);
+ }
+
+ @Test
+ public void createSlot() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.slot", containerView, false);
+ }
+
+ @Test
+ public void createUnit() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.unit", containerView, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createValueType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.valuetype", containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/inherited/TestNodeCreationOnModelCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/inherited/TestNodeCreationOnModelCompartment.java
new file mode 100755
index 0000000..f8edb9a
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/inherited/TestNodeCreationOnModelCompartment.java
@@ -0,0 +1,209 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.inherited;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.changeVisibility;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in a Model compartment (TopNode - still inherited from class diagram).
+ */
+public class TestNodeCreationOnModelCompartment extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ // force custom provider loading...
+ createNodeFromPalette("blockdefinition.tool.block", getDiagramView(), true);
+ //
+
+ createNodeFromPalette("blockdefinition.tool.model", getDiagramView(), true);
+ View nodeView = ViewUtil.getChildBySemanticHint(getDiagramView(), ElementTypes.MODEL.getSemanticHint());
+
+ containerView = ViewUtil.getChildBySemanticHint(nodeView, ElementTypes.MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT);
+
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!containerView.isVisible()) {
+ changeVisibility(containerView);
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActor() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actor", containerView, true);
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.block", containerView, true);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.comment", containerView, true);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraint", containerView, true);
+ }
+
+ @Test
+ public void createConstraintBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintblock", containerView, true);
+ }
+
+ @Test
+ public void createConstraintProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintproperty", containerView, false);
+ }
+
+ @Test
+ public void createDataType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.datatype", containerView, true);
+ }
+
+ @Test
+ public void createDimension() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.dimension", containerView, true);
+ }
+
+ @Test
+ public void createEnumeration() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumeration", containerView, true);
+ }
+
+ @Test
+ public void createEnumerationLiteral() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumerationliteral", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowport", containerView, false);
+ }
+
+ @Test
+ public void createFlowProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowproperty", containerView, false);
+ }
+
+ @Test
+ public void createFlowSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowspecification", containerView, true);
+ }
+
+ @Test
+ public void createInstanceSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.instancespecification", containerView, true);
+ }
+
+ @Test
+ public void createInterface() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.interface", containerView, true);
+ }
+
+ @Test
+ public void createModel() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.model", containerView, true);
+ }
+
+ @Test
+ public void createOperation() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.operation", containerView, false);
+ }
+
+ @Test
+ public void createPackage() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.package", containerView, true);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createPrimitiveType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.primitivetype", containerView, true);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.property", containerView, false);
+ }
+
+ @Test
+ public void createReception() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reception", containerView, false);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createSignal() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.signal", containerView, true);
+ }
+
+ @Test
+ public void createSlot() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.slot", containerView, false);
+ }
+
+ @Test
+ public void createUnit() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.unit", containerView, true);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createValueType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.valuetype", containerView, true);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/inherited/TestNodeCreationOnModelCompartmentCN.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/inherited/TestNodeCreationOnModelCompartmentCN.java
new file mode 100755
index 0000000..d45ef24
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/inherited/TestNodeCreationOnModelCompartmentCN.java
@@ -0,0 +1,217 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.inherited;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.changeVisibility;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in a Model compartment (TopNode - still inherited from class diagram).
+ */
+public class TestNodeCreationOnModelCompartmentCN extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ // force custom provider loading...
+ createNodeFromPalette("blockdefinition.tool.block", getDiagramView(), true);
+ //
+
+ createNodeFromPalette("blockdefinition.tool.model", getDiagramView(), true);
+ View topNodeView = ViewUtil.getChildBySemanticHint(getDiagramView(), ElementTypes.MODEL.getSemanticHint());
+ View topNodeCompartmentView = ViewUtil.getChildBySemanticHint(topNodeView, ElementTypes.MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT);
+
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!topNodeCompartmentView.isVisible()) {
+ changeVisibility(topNodeCompartmentView);
+ }
+
+ createNodeFromPalette("blockdefinition.tool.model", topNodeCompartmentView, true);
+ View childNodeView = ViewUtil.getChildBySemanticHint(topNodeCompartmentView, ElementTypes.MODEL_CN.getSemanticHint());
+ containerView = ViewUtil.getChildBySemanticHint(childNodeView, ElementTypes.MODEL_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT);
+
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!containerView.isVisible()) {
+ changeVisibility(containerView);
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActor() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actor", containerView, true);
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.block", containerView, true);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.comment", containerView, true);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraint", containerView, true);
+ }
+
+ @Test
+ public void createConstraintBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintblock", containerView, true);
+ }
+
+ @Test
+ public void createConstraintProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintproperty", containerView, false);
+ }
+
+ @Test
+ public void createDataType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.datatype", containerView, true);
+ }
+
+ @Test
+ public void createDimension() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.dimension", containerView, true);
+ }
+
+ @Test
+ public void createEnumeration() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumeration", containerView, true);
+ }
+
+ @Test
+ public void createEnumerationLiteral() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumerationliteral", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowport", containerView, false);
+ }
+
+ @Test
+ public void createFlowProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowproperty", containerView, false);
+ }
+
+ @Test
+ public void createFlowSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowspecification", containerView, true);
+ }
+
+ @Test
+ public void createInstanceSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.instancespecification", containerView, true);
+ }
+
+ @Test
+ public void createInterface() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.interface", containerView, true);
+ }
+
+ @Test
+ public void createModel() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.model", containerView, true);
+ }
+
+ @Test
+ public void createOperation() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.operation", containerView, false);
+ }
+
+ @Test
+ public void createPackage() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.package", containerView, true);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createPrimitiveType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.primitivetype", containerView, true);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.property", containerView, false);
+ }
+
+ @Test
+ public void createReception() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reception", containerView, false);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createSignal() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.signal", containerView, true);
+ }
+
+ @Test
+ public void createSlot() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.slot", containerView, false);
+ }
+
+ @Test
+ public void createUnit() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.unit", containerView, true);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createValueType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.valuetype", containerView, true);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/inherited/TestNodeCreationOnPackage.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/inherited/TestNodeCreationOnPackage.java
new file mode 100755
index 0000000..9d30e2e
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/inherited/TestNodeCreationOnPackage.java
@@ -0,0 +1,201 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.inherited;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in a Package (TopNode - still inherited from class diagram).
+ */
+public class TestNodeCreationOnPackage extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ // force custom provider loading...
+ createGraphicalNode(SysMLElementTypes.BLOCK, SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_CLASSIFIER_ID, getDiagramView());
+
+ containerView = createGraphicalNode(UMLElementTypes.PACKAGE, ElementTypes.PACKAGE.getSemanticHint(), getDiagramView());
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActor() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actor", containerView, false);
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.block", containerView, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.comment", containerView, false);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraint", containerView, false);
+ }
+
+ @Test
+ public void createConstraintBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintblock", containerView, false);
+ }
+
+ @Test
+ public void createConstraintProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintproperty", containerView, false);
+ }
+
+ @Test
+ public void createDataType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.datatype", containerView, false);
+ }
+
+ @Test
+ public void createDimension() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.dimension", containerView, false);
+ }
+
+ @Test
+ public void createEnumeration() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumeration", containerView, false);
+ }
+
+ @Test
+ public void createEnumerationLiteral() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumerationliteral", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowport", containerView, false);
+ }
+
+ @Test
+ public void createFlowProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowproperty", containerView, false);
+ }
+
+ @Test
+ public void createFlowSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowspecification", containerView, false);
+ }
+
+ @Test
+ public void createInstanceSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.instancespecification", containerView, false);
+ }
+
+ @Test
+ public void createInterface() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.interface", containerView, false);
+ }
+
+ @Test
+ public void createModel() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.model", containerView, false);
+ }
+
+ @Test
+ public void createOperation() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.operation", containerView, false);
+ }
+
+ @Test
+ public void createPackage() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.package", containerView, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createPrimitiveType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.primitivetype", containerView, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.property", containerView, false);
+ }
+
+ @Test
+ public void createReception() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reception", containerView, false);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createSignal() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.signal", containerView, false);
+ }
+
+ @Test
+ public void createSlot() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.slot", containerView, false);
+ }
+
+ @Test
+ public void createUnit() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.unit", containerView, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createValueType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.valuetype", containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/inherited/TestNodeCreationOnPackageCN.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/inherited/TestNodeCreationOnPackageCN.java
new file mode 100755
index 0000000..e2bbfae
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/inherited/TestNodeCreationOnPackageCN.java
@@ -0,0 +1,210 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.inherited;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.changeVisibility;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in a Package (ChildNode - still inherited from class diagram).
+ */
+public class TestNodeCreationOnPackageCN extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ // force custom provider loading...
+ createGraphicalNode(SysMLElementTypes.BLOCK, SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_CLASSIFIER_ID, getDiagramView());
+
+ View topNodeView = createGraphicalNode(UMLElementTypes.MODEL, ElementTypes.MODEL.getSemanticHint(), getDiagramView());
+ View topNodeCompartmentView = ViewUtil.getChildBySemanticHint(topNodeView, ElementTypes.MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT);
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!topNodeCompartmentView.isVisible()) {
+ changeVisibility(topNodeCompartmentView);
+ }
+
+ containerView = createGraphicalNode(UMLElementTypes.PACKAGE, ElementTypes.PACKAGE_CN.getSemanticHint(), topNodeCompartmentView);
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActor() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actor", containerView, false);
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.block", containerView, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.comment", containerView, false);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraint", containerView, false);
+ }
+
+ @Test
+ public void createConstraintBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintblock", containerView, false);
+ }
+
+ @Test
+ public void createConstraintProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintproperty", containerView, false);
+ }
+
+ @Test
+ public void createDataType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.datatype", containerView, false);
+ }
+
+ @Test
+ public void createDimension() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.dimension", containerView, false);
+ }
+
+ @Test
+ public void createEnumeration() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumeration", containerView, false);
+ }
+
+ @Test
+ public void createEnumerationLiteral() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumerationliteral", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowport", containerView, false);
+ }
+
+ @Test
+ public void createFlowProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowproperty", containerView, false);
+ }
+
+ @Test
+ public void createFlowSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowspecification", containerView, false);
+ }
+
+ @Test
+ public void createInstanceSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.instancespecification", containerView, false);
+ }
+
+ @Test
+ public void createInterface() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.interface", containerView, false);
+ }
+
+ @Test
+ public void createModel() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.model", containerView, false);
+ }
+
+ @Test
+ public void createOperation() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.operation", containerView, false);
+ }
+
+ @Test
+ public void createPackage() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.package", containerView, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createPrimitiveType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.primitivetype", containerView, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.property", containerView, false);
+ }
+
+ @Test
+ public void createReception() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reception", containerView, false);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createSignal() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.signal", containerView, false);
+ }
+
+ @Test
+ public void createSlot() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.slot", containerView, false);
+ }
+
+ @Test
+ public void createUnit() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.unit", containerView, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createValueType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.valuetype", containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/inherited/TestNodeCreationOnPackageCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/inherited/TestNodeCreationOnPackageCompartment.java
new file mode 100755
index 0000000..835b0f0
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/inherited/TestNodeCreationOnPackageCompartment.java
@@ -0,0 +1,209 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.inherited;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.changeVisibility;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in a Package compartment (TopNode - still inherited from class diagram).
+ */
+public class TestNodeCreationOnPackageCompartment extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ // force custom provider loading...
+ createNodeFromPalette("blockdefinition.tool.block", getDiagramView(), true);
+ //
+
+ createNodeFromPalette("blockdefinition.tool.package", getDiagramView(), true);
+ View nodeView = ViewUtil.getChildBySemanticHint(getDiagramView(), ElementTypes.PACKAGE.getSemanticHint());
+
+ containerView = ViewUtil.getChildBySemanticHint(nodeView, ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT);
+
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!containerView.isVisible()) {
+ changeVisibility(containerView);
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActor() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actor", containerView, true);
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.block", containerView, true);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.comment", containerView, true);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraint", containerView, true);
+ }
+
+ @Test
+ public void createConstraintBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintblock", containerView, true);
+ }
+
+ @Test
+ public void createConstraintProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintproperty", containerView, false);
+ }
+
+ @Test
+ public void createDataType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.datatype", containerView, true);
+ }
+
+ @Test
+ public void createDimension() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.dimension", containerView, true);
+ }
+
+ @Test
+ public void createEnumeration() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumeration", containerView, true);
+ }
+
+ @Test
+ public void createEnumerationLiteral() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumerationliteral", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowport", containerView, false);
+ }
+
+ @Test
+ public void createFlowProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowproperty", containerView, false);
+ }
+
+ @Test
+ public void createFlowSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowspecification", containerView, true);
+ }
+
+ @Test
+ public void createInstanceSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.instancespecification", containerView, true);
+ }
+
+ @Test
+ public void createInterface() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.interface", containerView, true);
+ }
+
+ @Test
+ public void createModel() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.model", containerView, true);
+ }
+
+ @Test
+ public void createOperation() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.operation", containerView, false);
+ }
+
+ @Test
+ public void createPackage() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.package", containerView, true);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createPrimitiveType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.primitivetype", containerView, true);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.property", containerView, false);
+ }
+
+ @Test
+ public void createReception() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reception", containerView, false);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createSignal() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.signal", containerView, true);
+ }
+
+ @Test
+ public void createSlot() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.slot", containerView, false);
+ }
+
+ @Test
+ public void createUnit() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.unit", containerView, true);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createValueType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.valuetype", containerView, true);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/inherited/TestNodeCreationOnPackageCompartmentCN.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/inherited/TestNodeCreationOnPackageCompartmentCN.java
new file mode 100755
index 0000000..bf38d95
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/inherited/TestNodeCreationOnPackageCompartmentCN.java
@@ -0,0 +1,217 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.inherited;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.changeVisibility;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in a Package compartment (ChildNode - still inherited from class diagram).
+ */
+public class TestNodeCreationOnPackageCompartmentCN extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ // force custom provider loading...
+ createNodeFromPalette("blockdefinition.tool.block", getDiagramView(), true);
+ //
+
+ createNodeFromPalette("blockdefinition.tool.package", getDiagramView(), true);
+ View topNodeView = ViewUtil.getChildBySemanticHint(getDiagramView(), ElementTypes.PACKAGE.getSemanticHint());
+ View topNodeCompartmentView = ViewUtil.getChildBySemanticHint(topNodeView, ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT);
+
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!topNodeCompartmentView.isVisible()) {
+ changeVisibility(topNodeCompartmentView);
+ }
+
+ createNodeFromPalette("blockdefinition.tool.package", topNodeCompartmentView, true);
+ View childNodeView = ViewUtil.getChildBySemanticHint(topNodeCompartmentView, ElementTypes.PACKAGE_CN.getSemanticHint());
+ containerView = ViewUtil.getChildBySemanticHint(childNodeView, ElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT);
+
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!containerView.isVisible()) {
+ changeVisibility(containerView);
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActor() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actor", containerView, true);
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.block", containerView, true);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.comment", containerView, true);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraint", containerView, true);
+ }
+
+ @Test
+ public void createConstraintBlock() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintblock", containerView, true);
+ }
+
+ @Test
+ public void createConstraintProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.constraintproperty", containerView, false);
+ }
+
+ @Test
+ public void createDataType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.datatype", containerView, true);
+ }
+
+ @Test
+ public void createDimension() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.dimension", containerView, true);
+ }
+
+ @Test
+ public void createEnumeration() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumeration", containerView, true);
+ }
+
+ @Test
+ public void createEnumerationLiteral() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.enumerationliteral", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowport", containerView, false);
+ }
+
+ @Test
+ public void createFlowProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowproperty", containerView, false);
+ }
+
+ @Test
+ public void createFlowSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.flowspecification", containerView, true);
+ }
+
+ @Test
+ public void createInstanceSpecification() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.instancespecification", containerView, true);
+ }
+
+ @Test
+ public void createInterface() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.interface", containerView, true);
+ }
+
+ @Test
+ public void createModel() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.model", containerView, true);
+ }
+
+ @Test
+ public void createOperation() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.operation", containerView, false);
+ }
+
+ @Test
+ public void createPackage() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.package", containerView, true);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createPrimitiveType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.primitivetype", containerView, true);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.property", containerView, false);
+ }
+
+ @Test
+ public void createReception() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reception", containerView, false);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createSignal() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.signal", containerView, true);
+ }
+
+ @Test
+ public void createSlot() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.slot", containerView, false);
+ }
+
+ @Test
+ public void createUnit() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.unit", containerView, true);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createValueType() throws Exception {
+ createNodeFromPalette("blockdefinition.tool.valuetype", containerView, true);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/AbstractLinkCreationForSourcesTest.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/AbstractLinkCreationForSourcesTest.java
new file mode 100755
index 0000000..a3e906c
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/AbstractLinkCreationForSourcesTest.java
@@ -0,0 +1,253 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.link;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.createEdgeFromPalette;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.junit.Test;
+
+/**
+ * JUnit tests for Dependency creation test (via palette tools).
+ */
+public abstract class AbstractLinkCreationForSourcesTest extends AbstractLinkPrepareTest {
+
+ public static String toolID;
+
+ @Test
+ public void createLinkWithSourceActor() throws Exception {
+ View sourceView = actorSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceActorPart() throws Exception {
+ View sourceView = actorPartSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceBlock() throws Exception {
+ View sourceView = blockSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceConstraintBlock() throws Exception {
+ View sourceView = constraintBlockSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceDataType() throws Exception {
+ View sourceView = dataTypeSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceDimension() throws Exception {
+ View sourceView = dimensionSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceEnumeration() throws Exception {
+ View sourceView = enumerationSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceFlowSpecification() throws Exception {
+ View sourceView = flowSpecificationSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceInterface() throws Exception {
+ View sourceView = interfaceSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourcePrimitiveType() throws Exception {
+ View sourceView = primitiveTypeSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceSignal() throws Exception {
+ View sourceView = signalSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceUnit() throws Exception {
+ View sourceView = unitSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceValueType() throws Exception {
+ View sourceView = valueTypeSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceComment() throws Exception {
+ View sourceView = commentSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceCommentCN() throws Exception {
+ View sourceView = commentCNSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceConstraint() throws Exception {
+ View sourceView = constraintSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceConstraintCN() throws Exception {
+ View sourceView = constraintCNSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceInstanceSpec() throws Exception {
+ View sourceView = instanceSpecSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceInstanceSpecCN() throws Exception {
+ View sourceView = instanceSpecCNSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceModel() throws Exception {
+ View sourceView = modelSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceModelCN() throws Exception {
+ View sourceView = modelCNSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourcePackage() throws Exception {
+ View sourceView = packageSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourcePackageCN() throws Exception {
+ View sourceView = packageCNSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ // Test child label nodes
+
+ @Test
+ public void createLinkWithSourceSlot() throws Exception {
+ View sourceView = slotSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceProperty() throws Exception {
+ View sourceView = propertySourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourcePort() throws Exception {
+ View sourceView = portSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceFlowPort() throws Exception {
+ View sourceView = flowportSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourcePart() throws Exception {
+ View sourceView = partSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceReference() throws Exception {
+ View sourceView = referenceSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceValue() throws Exception {
+ View sourceView = valueSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceOperation() throws Exception {
+ View sourceView = operationSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceReception() throws Exception {
+ View sourceView = receptionSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceConstraintCLN() throws Exception {
+ View sourceView = constraintCLNSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceConstraintProperty() throws Exception {
+ View sourceView = constraintPropertySourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceAssociation() throws Exception {
+ View sourceView = associationSourceView;
+ boolean isAllowed = isCreationAllowed.get(sourceView);
+ createEdgeFromPalette(toolID, sourceView, null, isAllowed);
+ }
+
+
+ @Test
+ public void createLinkWithSourceEnumerationLiteral() throws Exception {
+ View sourceView = enumerationLiteralSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceFlowProperty() throws Exception {
+ View sourceView = flowPropertySourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/AbstractLinkCreationFromElementTest.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/AbstractLinkCreationFromElementTest.java
new file mode 100755
index 0000000..9306a49
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/AbstractLinkCreationFromElementTest.java
@@ -0,0 +1,252 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.link;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.createEdgeFromPalette;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.junit.Test;
+
+/**
+ * JUnit tests for Link creation with Block source (via palette tools).
+ */
+public abstract class AbstractLinkCreationFromElementTest extends AbstractLinkPrepareTest {
+
+ public static String toolID;
+ public static View sourceView;
+
+ @Test
+ public void createLinkWithTargetActor() throws Exception {
+ View targetView = actorTargetView;
+ createEdgeFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetActorPart() throws Exception {
+ View targetView = actorPartTargetView;
+ createEdgeFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetBlock() throws Exception {
+ View targetView = blockTargetView;
+ createEdgeFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetConstraintBlock() throws Exception {
+ View targetView = constraintBlockTargetView;
+ createEdgeFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetDataType() throws Exception {
+ View targetView = dataTypeTargetView;
+ createEdgeFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetDimension() throws Exception {
+ View targetView = dimensionTargetView;
+ createEdgeFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetEnumeration() throws Exception {
+ View targetView = enumerationTargetView;
+ createEdgeFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetFlowSpecification() throws Exception {
+ View targetView = flowSpecificationTargetView;
+ createEdgeFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetInterface() throws Exception {
+ View targetView = interfaceTargetView;
+ createEdgeFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetPrimitiveType() throws Exception {
+ View targetView = primitiveTypeTargetView;
+ createEdgeFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetSignal() throws Exception {
+ View targetView = signalTargetView;
+ createEdgeFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetUnit() throws Exception {
+ View targetView = unitTargetView;
+ createEdgeFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetValueType() throws Exception {
+ View targetView = valueTypeTargetView;
+ createEdgeFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetComment() throws Exception {
+ View targetView = commentTargetView;
+ createEdgeFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetCommentCN() throws Exception {
+ View targetView = commentCNTargetView;
+ createEdgeFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetConstraint() throws Exception {
+ View targetView = constraintTargetView;
+ createEdgeFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetConstraintCN() throws Exception {
+ View targetView = constraintCNTargetView;
+ createEdgeFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetInstanceSpec() throws Exception {
+ View targetView = instanceSpecTargetView;
+ createEdgeFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetInstanceSpecCN() throws Exception {
+ View targetView = instanceSpecCNTargetView;
+ createEdgeFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetModel() throws Exception {
+ View targetView = modelTargetView;
+ createEdgeFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetModelCN() throws Exception {
+ View targetView = modelCNTargetView;
+ createEdgeFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetPackage() throws Exception {
+ View targetView = packageTargetView;
+ createEdgeFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetPackageCN() throws Exception {
+ View targetView = packageCNTargetView;
+ createEdgeFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView));
+ }
+
+ // Test child label nodes
+
+ @Test
+ public void createLinkWithTargetSlot() throws Exception {
+ View targetView = slotTargetView;
+ createEdgeFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetProperty() throws Exception {
+ View targetView = propertyTargetView;
+ createEdgeFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetPort() throws Exception {
+ View targetView = portTargetView;
+ createEdgeFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetFlowPort() throws Exception {
+ View targetView = flowportTargetView;
+ createEdgeFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetPart() throws Exception {
+ View targetView = partTargetView;
+ createEdgeFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetReference() throws Exception {
+ View targetView = referenceTargetView;
+ createEdgeFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetValue() throws Exception {
+ View targetView = valueTargetView;
+ createEdgeFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetOperation() throws Exception {
+ View targetView = operationTargetView;
+ createEdgeFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetReception() throws Exception {
+ View targetView = receptionTargetView;
+ createEdgeFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetConstraintCLN() throws Exception {
+ View targetView = constraintCLNTargetView;
+ createEdgeFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetConstraintProperty() throws Exception {
+ View targetView = constraintPropertyTargetView;
+ createEdgeFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetAssociation() throws Exception {
+ View targetView = associationTargetView;
+ createEdgeFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetEnumerationLiteral() throws Exception {
+ View targetView = enumerationLiteralTargetView;
+ createEdgeFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetFlowProperty() throws Exception {
+ View targetView = flowPropertyTargetView;
+ createEdgeFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView));
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/AbstractLinkPrepareTest.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/AbstractLinkPrepareTest.java
new file mode 100755
index 0000000..17e6bc6
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/AbstractLinkPrepareTest.java
@@ -0,0 +1,242 @@
+/*****************************************************************************
+ * Copyright (c) 2011, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.link;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.createEdgeFromPalette;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Dependency creation test (via palette tools).
+ */
+public abstract class AbstractLinkPrepareTest extends AbstractTest {
+
+ public static String toolID;
+
+ // Custom nodes
+ public static View actorSourceView, actorTargetView;
+ public static View blockSourceView, blockTargetView;
+ public static View constraintBlockSourceView, constraintBlockTargetView;
+ public static View dataTypeSourceView, dataTypeTargetView;
+ public static View dimensionSourceView, dimensionTargetView;
+ public static View enumerationSourceView, enumerationTargetView;
+ public static View flowSpecificationSourceView, flowSpecificationTargetView;
+ public static View interfaceSourceView, interfaceTargetView;
+ public static View primitiveTypeSourceView, primitiveTypeTargetView;
+ public static View signalSourceView, signalTargetView;
+ public static View unitSourceView, unitTargetView;
+ public static View valueTypeSourceView, valueTypeTargetView;
+
+ // Custom child label nodes
+ public static View actorPartSourceView, actorPartTargetView;
+ public static View propertySourceView, propertyTargetView;
+ public static View portSourceView, portTargetView;
+ public static View flowportSourceView, flowportTargetView;
+ public static View partSourceView, partTargetView;
+ public static View referenceSourceView, referenceTargetView;
+ public static View valueSourceView, valueTargetView;
+ public static View operationSourceView, operationTargetView;
+ public static View receptionSourceView, receptionTargetView;
+ public static View constraintCLNSourceView, constraintCLNTargetView;
+ public static View constraintPropertySourceView, constraintPropertyTargetView;
+ public static View flowPropertySourceView, flowPropertyTargetView;
+ public static View enumerationLiteralSourceView, enumerationLiteralTargetView;
+
+ // Inherited nodes
+ public static View commentSourceView, commentTargetView, commentCNSourceView, commentCNTargetView;
+ public static View constraintSourceView, constraintTargetView, constraintCNSourceView, constraintCNTargetView;
+ public static View instanceSpecSourceView, instanceSpecTargetView, instanceSpecCNSourceView, instanceSpecCNTargetView;
+ public static View modelSourceView, modelTargetView, modelCNSourceView, modelCNTargetView;
+ public static View packageSourceView, packageTargetView, packageCNSourceView, packageCNTargetView;
+
+ // Inherited child label nodes
+ public static View slotSourceView, slotTargetView;
+
+ // links (creation of association on association)
+ public static View associationSourceView, associationTargetView;
+
+
+ public static final Map<View, Boolean> isCreationAllowed = new HashMap<View, Boolean>();
+// {
+// public Boolean put(View arg0, Boolean arg1) {
+// return true;
+// };
+// };
+
+ @BeforeClass
+ public static void initializeCreationAllowedMap() {
+ houseKeeper.cleanUpLater(isCreationAllowed);
+ }
+
+ @BeforeClass
+ public static void prepareInheritedNodes() throws Exception {
+ View container = createGraphicalNode(UMLElementTypes.PACKAGE, ElementTypes.PACKAGE.getSemanticHint(), getDiagramView());
+ View containerCpt = ViewUtil.getChildBySemanticHint(container, ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT);
+
+ // Prepare elements for link creation tests
+ commentSourceView = createGraphicalNode(UMLElementTypes.COMMENT, ElementTypes.COMMENT.getSemanticHint(), getDiagramView());
+ commentTargetView = createGraphicalNode(UMLElementTypes.COMMENT, ElementTypes.COMMENT.getSemanticHint(), getDiagramView());
+ commentCNSourceView = createGraphicalNode(UMLElementTypes.COMMENT, ElementTypes.COMMENT_CN.getSemanticHint(), containerCpt);
+ commentCNTargetView = createGraphicalNode(UMLElementTypes.COMMENT, ElementTypes.COMMENT_CN.getSemanticHint(), containerCpt);
+
+ constraintSourceView = createGraphicalNode(UMLElementTypes.CONSTRAINT, ElementTypes.CONSTRAINT.getSemanticHint(), getDiagramView());
+ constraintTargetView = createGraphicalNode(UMLElementTypes.CONSTRAINT, ElementTypes.CONSTRAINT.getSemanticHint(), getDiagramView());
+ constraintCNSourceView = createGraphicalNode(UMLElementTypes.CONSTRAINT, ElementTypes.CONSTRAINT_CN.getSemanticHint(), containerCpt);
+ constraintCNTargetView = createGraphicalNode(UMLElementTypes.CONSTRAINT, ElementTypes.CONSTRAINT_CN.getSemanticHint(), containerCpt);
+
+ instanceSpecSourceView = createGraphicalNode(UMLElementTypes.INSTANCE_SPECIFICATION, ElementTypes.INSTANCE_SPECIFICATION.getSemanticHint(), getDiagramView());
+ instanceSpecTargetView = createGraphicalNode(UMLElementTypes.INSTANCE_SPECIFICATION, ElementTypes.INSTANCE_SPECIFICATION.getSemanticHint(), getDiagramView());
+ instanceSpecCNSourceView = createGraphicalNode(UMLElementTypes.INSTANCE_SPECIFICATION, ElementTypes.INSTANCE_SPECIFICATION_CN.getSemanticHint(), containerCpt);
+ instanceSpecCNTargetView = createGraphicalNode(UMLElementTypes.INSTANCE_SPECIFICATION, ElementTypes.INSTANCE_SPECIFICATION_CN.getSemanticHint(), containerCpt);
+
+ modelSourceView = createGraphicalNode(UMLElementTypes.MODEL, ElementTypes.MODEL.getSemanticHint(), getDiagramView());
+ modelTargetView = createGraphicalNode(UMLElementTypes.MODEL, ElementTypes.MODEL.getSemanticHint(), getDiagramView());
+ modelCNSourceView = createGraphicalNode(UMLElementTypes.MODEL, ElementTypes.MODEL_CN.getSemanticHint(), containerCpt);
+ modelCNTargetView = createGraphicalNode(UMLElementTypes.MODEL, ElementTypes.MODEL_CN.getSemanticHint(), containerCpt);
+
+ packageSourceView = createGraphicalNode(UMLElementTypes.PACKAGE, ElementTypes.PACKAGE.getSemanticHint(), getDiagramView());
+ packageTargetView = createGraphicalNode(UMLElementTypes.PACKAGE, ElementTypes.PACKAGE.getSemanticHint(), getDiagramView());
+ packageCNSourceView = createGraphicalNode(UMLElementTypes.PACKAGE, ElementTypes.PACKAGE_CN.getSemanticHint(), containerCpt);
+ packageCNTargetView = createGraphicalNode(UMLElementTypes.PACKAGE, ElementTypes.PACKAGE_CN.getSemanticHint(), containerCpt);
+
+ // Prepare child nodes
+ View slotSourceCpt = ViewUtil.getChildBySemanticHint(instanceSpecSourceView, ElementTypes.INSTANCE_SPECIFICATION_COMPARTMENT_SLOT_HINT);
+ View slotTargetCpt = ViewUtil.getChildBySemanticHint(instanceSpecTargetView, ElementTypes.INSTANCE_SPECIFICATION_COMPARTMENT_SLOT_HINT);
+
+ slotSourceView = createGraphicalNode(UMLElementTypes.SLOT, ElementTypes.INSTANCE_SPECIFICATION_SLOT_CLN.getSemanticHint(), slotSourceCpt);
+ slotTargetView = createGraphicalNode(UMLElementTypes.SLOT, ElementTypes.INSTANCE_SPECIFICATION_SLOT_CLN.getSemanticHint(), slotTargetCpt);
+ }
+
+ @BeforeClass
+ public static void prepareCustomNodes() throws Exception {
+ // Prepare elements for link creation tests
+ actorSourceView = createGraphicalNode(UMLElementTypes.ACTOR, UMLGraphicalTypes.SHAPE_UML_ACTOR_AS_CLASSIFIER_ID, getDiagramView());
+ actorTargetView = createGraphicalNode(UMLElementTypes.ACTOR, UMLGraphicalTypes.SHAPE_UML_ACTOR_AS_CLASSIFIER_ID, getDiagramView());
+ blockSourceView = createGraphicalNode(SysMLElementTypes.BLOCK, SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_CLASSIFIER_ID, getDiagramView());
+ blockTargetView = createGraphicalNode(SysMLElementTypes.BLOCK, SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_CLASSIFIER_ID, getDiagramView());
+ constraintBlockSourceView = createGraphicalNode(SysMLElementTypes.CONSTRAINT_BLOCK, SysMLGraphicalTypes.SHAPE_SYSML_CONSTRAINTBLOCK_AS_CLASSIFIER_ID, getDiagramView());
+ constraintBlockTargetView = createGraphicalNode(SysMLElementTypes.CONSTRAINT_BLOCK, SysMLGraphicalTypes.SHAPE_SYSML_CONSTRAINTBLOCK_AS_CLASSIFIER_ID, getDiagramView());
+ dataTypeSourceView = createGraphicalNode(UMLElementTypes.DATA_TYPE, UMLGraphicalTypes.SHAPE_UML_DATATYPE_AS_CLASSIFIER_ID, getDiagramView());
+ dataTypeTargetView = createGraphicalNode(UMLElementTypes.DATA_TYPE, UMLGraphicalTypes.SHAPE_UML_DATATYPE_AS_CLASSIFIER_ID, getDiagramView());
+ dimensionSourceView = createGraphicalNode(SysMLElementTypes.DIMENSION, SysMLGraphicalTypes.SHAPE_SYSML_DIMENSION_AS_CLASSIFIER_ID, getDiagramView());
+ dimensionTargetView = createGraphicalNode(SysMLElementTypes.DIMENSION, SysMLGraphicalTypes.SHAPE_SYSML_DIMENSION_AS_CLASSIFIER_ID, getDiagramView());
+ enumerationSourceView = createGraphicalNode(UMLElementTypes.ENUMERATION, UMLGraphicalTypes.SHAPE_UML_ENUMERATION_AS_CLASSIFIER_ID, getDiagramView());
+ enumerationTargetView = createGraphicalNode(UMLElementTypes.ENUMERATION, UMLGraphicalTypes.SHAPE_UML_ENUMERATION_AS_CLASSIFIER_ID, getDiagramView());
+ flowSpecificationSourceView = createGraphicalNode(SysMLElementTypes.FLOW_SPECIFICATION, SysMLGraphicalTypes.SHAPE_SYSML_FLOWSPECIFICATION_AS_CLASSIFIER_ID, getDiagramView());
+ flowSpecificationTargetView = createGraphicalNode(SysMLElementTypes.FLOW_SPECIFICATION, SysMLGraphicalTypes.SHAPE_SYSML_FLOWSPECIFICATION_AS_CLASSIFIER_ID, getDiagramView());
+ interfaceSourceView = createGraphicalNode(UMLElementTypes.INTERFACE, UMLGraphicalTypes.SHAPE_UML_INTERFACE_AS_CLASSIFIER_ID, getDiagramView());
+ interfaceTargetView = createGraphicalNode(UMLElementTypes.INTERFACE, UMLGraphicalTypes.SHAPE_UML_INTERFACE_AS_CLASSIFIER_ID, getDiagramView());
+ primitiveTypeSourceView = createGraphicalNode(UMLElementTypes.PRIMITIVE_TYPE, UMLGraphicalTypes.SHAPE_UML_PRIMITIVETYPE_AS_CLASSIFIER_ID, getDiagramView());
+ primitiveTypeTargetView = createGraphicalNode(UMLElementTypes.PRIMITIVE_TYPE, UMLGraphicalTypes.SHAPE_UML_PRIMITIVETYPE_AS_CLASSIFIER_ID, getDiagramView());
+ signalSourceView = createGraphicalNode(UMLElementTypes.SIGNAL, UMLGraphicalTypes.SHAPE_UML_SIGNAL_AS_CLASSIFIER_ID, getDiagramView());
+ signalTargetView = createGraphicalNode(UMLElementTypes.SIGNAL, UMLGraphicalTypes.SHAPE_UML_SIGNAL_AS_CLASSIFIER_ID, getDiagramView());
+ unitSourceView = createGraphicalNode(SysMLElementTypes.UNIT, SysMLGraphicalTypes.SHAPE_SYSML_UNIT_AS_CLASSIFIER_ID, getDiagramView());
+ unitTargetView = createGraphicalNode(SysMLElementTypes.UNIT, SysMLGraphicalTypes.SHAPE_SYSML_UNIT_AS_CLASSIFIER_ID, getDiagramView());
+ valueTypeSourceView = createGraphicalNode(SysMLElementTypes.VALUE_TYPE, SysMLGraphicalTypes.SHAPE_SYSML_VALUETYPE_AS_CLASSIFIER_ID, getDiagramView());
+ valueTypeTargetView = createGraphicalNode(SysMLElementTypes.VALUE_TYPE, SysMLGraphicalTypes.SHAPE_SYSML_VALUETYPE_AS_CLASSIFIER_ID, getDiagramView());
+
+ // Prepare child nodes
+
+ // TODO : Add Port / FlowPort as AffixedNode
+
+ View propertySourceCpt = ViewUtil.getChildBySemanticHint(blockSourceView, SysMLGraphicalTypes.COMPARTMENT_SYSML_PROPERTY_AS_LIST_ID);
+ View propertyTargetCpt = ViewUtil.getChildBySemanticHint(blockTargetView, SysMLGraphicalTypes.COMPARTMENT_SYSML_PROPERTY_AS_LIST_ID);
+
+ actorPartSourceView = createGraphicalNode(SysMLElementTypes.ACTOR_PART_PROPERTY, UMLGraphicalTypes.SHAPE_UML_PROPERTY_AS_LABEL_ID, propertySourceCpt);
+ actorPartTargetView = createGraphicalNode(SysMLElementTypes.ACTOR_PART_PROPERTY, UMLGraphicalTypes.SHAPE_UML_PROPERTY_AS_LABEL_ID, propertyTargetCpt);
+ propertySourceView = createGraphicalNode(UMLElementTypes.PROPERTY, UMLGraphicalTypes.SHAPE_UML_PROPERTY_AS_LABEL_ID, propertySourceCpt);
+ propertyTargetView = createGraphicalNode(UMLElementTypes.PROPERTY, UMLGraphicalTypes.SHAPE_UML_PROPERTY_AS_LABEL_ID, propertyTargetCpt);
+ portSourceView = createGraphicalNode(UMLElementTypes.PORT, UMLGraphicalTypes.SHAPE_UML_PORT_AS_LABEL_ID, propertySourceCpt);
+ portTargetView = createGraphicalNode(UMLElementTypes.PORT, UMLGraphicalTypes.SHAPE_UML_PORT_AS_LABEL_ID, propertyTargetCpt);
+ flowportSourceView = createGraphicalNode(SysMLElementTypes.FLOW_PORT, SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_LABEL_ID, propertySourceCpt);
+ flowportTargetView = createGraphicalNode(SysMLElementTypes.FLOW_PORT, SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_LABEL_ID, propertyTargetCpt);
+ partSourceView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_PART_AS_LABEL_ID, propertySourceCpt);
+ partTargetView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_PART_AS_LABEL_ID, propertyTargetCpt);
+ referenceSourceView = createGraphicalNode(SysMLElementTypes.REFERENCE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_REFERENCE_AS_LABEL_ID, propertySourceCpt);
+ referenceTargetView = createGraphicalNode(SysMLElementTypes.REFERENCE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_REFERENCE_AS_LABEL_ID, propertyTargetCpt);
+ valueSourceView = createGraphicalNode(SysMLElementTypes.VALUE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_VALUE_AS_LABEL_ID, propertySourceCpt);
+ valueTargetView = createGraphicalNode(SysMLElementTypes.VALUE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_VALUE_AS_LABEL_ID, propertyTargetCpt);
+
+ View operationSourceCpt = ViewUtil.getChildBySemanticHint(blockSourceView, UMLGraphicalTypes.COMPARTMENT_UML_OPERATION_AS_LIST_ID);
+ View operationTargetCpt = ViewUtil.getChildBySemanticHint(blockTargetView, UMLGraphicalTypes.COMPARTMENT_UML_OPERATION_AS_LIST_ID);
+
+ operationSourceView = createGraphicalNode(UMLElementTypes.OPERATION, UMLGraphicalTypes.SHAPE_UML_OPERATION_AS_LABEL_ID, operationSourceCpt);
+ operationTargetView = createGraphicalNode(UMLElementTypes.OPERATION, UMLGraphicalTypes.SHAPE_UML_OPERATION_AS_LABEL_ID, operationTargetCpt);
+ receptionSourceView = createGraphicalNode(UMLElementTypes.RECEPTION, UMLGraphicalTypes.SHAPE_UML_RECEPTION_AS_LABEL_ID, operationSourceCpt);
+ receptionTargetView = createGraphicalNode(UMLElementTypes.RECEPTION, UMLGraphicalTypes.SHAPE_UML_RECEPTION_AS_LABEL_ID, operationTargetCpt);
+
+ View constraintSourceCpt = ViewUtil.getChildBySemanticHint(blockSourceView, SysMLGraphicalTypes.COMPARTMENT_SYSML_CONSTRAINT_AS_LIST_ID);
+ View constraintTargetCpt = ViewUtil.getChildBySemanticHint(blockTargetView, SysMLGraphicalTypes.COMPARTMENT_SYSML_CONSTRAINT_AS_LIST_ID);
+
+ constraintCLNSourceView = createGraphicalNode(UMLElementTypes.CONSTRAINT, UMLGraphicalTypes.SHAPE_UML_CONSTRAINT_AS_LABEL_ID, constraintSourceCpt);
+ constraintCLNTargetView = createGraphicalNode(UMLElementTypes.CONSTRAINT, UMLGraphicalTypes.SHAPE_UML_CONSTRAINT_AS_LABEL_ID, constraintTargetCpt);
+ constraintPropertySourceView = createGraphicalNode(SysMLElementTypes.CONSTRAINT_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_CONSTRAINTPROPERTY_AS_LABEL_ID, constraintSourceCpt);
+ constraintPropertyTargetView = createGraphicalNode(SysMLElementTypes.CONSTRAINT_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_CONSTRAINTPROPERTY_AS_LABEL_ID, constraintTargetCpt);
+
+ View flowPropertySourceCpt = ViewUtil.getChildBySemanticHint(flowSpecificationSourceView, SysMLGraphicalTypes.COMPARTMENT_SYSML_FLOWPROPERTY_AS_LIST_ID);
+ View flowPropertyTargetCpt = ViewUtil.getChildBySemanticHint(flowSpecificationTargetView, SysMLGraphicalTypes.COMPARTMENT_SYSML_FLOWPROPERTY_AS_LIST_ID);
+
+ flowPropertySourceView = createGraphicalNode(SysMLElementTypes.FLOW_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_FLOWPROPERTY_AS_LABEL_ID, flowPropertySourceCpt);
+ flowPropertyTargetView = createGraphicalNode(SysMLElementTypes.FLOW_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_FLOWPROPERTY_AS_LABEL_ID, flowPropertyTargetCpt);
+
+ View enumLiteralSourceCpt = ViewUtil.getChildBySemanticHint(enumerationSourceView, UMLGraphicalTypes.COMPARTMENT_UML_ENUMERATIONLITERAL_AS_LIST_ID);
+ View enumLiteralTargetCpt = ViewUtil.getChildBySemanticHint(enumerationTargetView, UMLGraphicalTypes.COMPARTMENT_UML_ENUMERATIONLITERAL_AS_LIST_ID);
+
+ enumerationLiteralSourceView = createGraphicalNode(UMLElementTypes.ENUMERATION_LITERAL, UMLGraphicalTypes.SHAPE_UML_ENUMERATIONLITERAL_AS_LABEL_ID, enumLiteralSourceCpt);
+ enumerationLiteralTargetView = createGraphicalNode(UMLElementTypes.ENUMERATION_LITERAL, UMLGraphicalTypes.SHAPE_UML_ENUMERATIONLITERAL_AS_LABEL_ID, enumLiteralTargetCpt);
+ }
+
+ @BeforeClass
+ public static void prepareLinks() throws Exception {
+ // creates two blocks representation, and then creates an association between these 2 blocks
+ View sourceBlockView = createGraphicalNode(SysMLElementTypes.BLOCK, SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_CLASSIFIER_ID, getDiagramView());
+ View targetBlockView = createGraphicalNode(SysMLElementTypes.BLOCK, SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_CLASSIFIER_ID, getDiagramView());
+
+ createEdgeFromPalette("blockdefinition.tool.association_none", sourceBlockView, targetBlockView, true);
+ createEdgeFromPalette("blockdefinition.tool.association_none", sourceBlockView, targetBlockView, true);
+ Set<Edge> edges = ViewUtil.getAllInnerEdges(sourceBlockView.getDiagram());
+ // The edges are filtered to exclude the Stereotype Comment Link from the Edges to be tested.
+ List<Edge> edgeListToTest = new ArrayList<Edge>();
+ for (Edge edge : edges) {
+ if (!edge.getType().equals("StereotypeCommentLink")) {
+ edgeListToTest.add(edge);
+ }
+ }
+ Assert.assertEquals("There should be 2 edges", 2, edgeListToTest.size());
+ associationSourceView = edgeListToTest.toArray(new Edge[] {})[0];
+ associationTargetView = edgeListToTest.toArray(new Edge[] {})[1];
+ Assert.assertNotNull("association should not be null", associationSourceView);
+ Assert.assertNotNull("association should not be null", associationTargetView);
+
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/TestLinkCreationCommentConstraintForSources.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/TestLinkCreationCommentConstraintForSources.java
new file mode 100755
index 0000000..bf7e99d
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/TestLinkCreationCommentConstraintForSources.java
@@ -0,0 +1,76 @@
+/*****************************************************************************
+ * Copyright (c) 2011, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.link;
+
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Comment-Constraint link creation test (via palette tools).
+ */
+public class TestLinkCreationCommentConstraintForSources extends AbstractLinkCreationForSourcesTest {
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "blockdefinition.tool.comment_constraint_link";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+ isCreationAllowed.put(actorSourceView, false);
+ isCreationAllowed.put(actorPartSourceView, false);
+ isCreationAllowed.put(blockSourceView, false);
+ isCreationAllowed.put(constraintBlockSourceView, false);
+ isCreationAllowed.put(dataTypeSourceView, false);
+ isCreationAllowed.put(dimensionSourceView, false);
+ isCreationAllowed.put(enumerationSourceView, false);
+ isCreationAllowed.put(flowSpecificationSourceView, false);
+ isCreationAllowed.put(interfaceSourceView, false);
+ isCreationAllowed.put(primitiveTypeSourceView, false);
+ isCreationAllowed.put(signalSourceView, false);
+ isCreationAllowed.put(unitSourceView, false);
+ isCreationAllowed.put(valueTypeSourceView, false);
+
+ isCreationAllowed.put(commentSourceView, true);
+ isCreationAllowed.put(commentCNSourceView, true);
+ isCreationAllowed.put(constraintSourceView, true);
+ isCreationAllowed.put(constraintCNSourceView, true);
+ isCreationAllowed.put(instanceSpecSourceView, false);
+ isCreationAllowed.put(instanceSpecCNSourceView, false);
+ isCreationAllowed.put(modelSourceView, false);
+ isCreationAllowed.put(modelCNSourceView, false);
+ isCreationAllowed.put(packageSourceView, false);
+ isCreationAllowed.put(packageCNSourceView, false);
+
+ isCreationAllowed.put(slotSourceView, false);
+
+ isCreationAllowed.put(propertySourceView, false);
+ isCreationAllowed.put(portSourceView, false);
+ isCreationAllowed.put(flowportSourceView, false);
+ isCreationAllowed.put(partSourceView, false);
+ isCreationAllowed.put(referenceSourceView, false);
+ isCreationAllowed.put(valueSourceView, false);
+ isCreationAllowed.put(operationSourceView, false);
+ isCreationAllowed.put(receptionSourceView, false);
+ isCreationAllowed.put(constraintCLNSourceView, true);
+ isCreationAllowed.put(constraintPropertySourceView, false);
+ isCreationAllowed.put(flowPropertySourceView, false);
+ isCreationAllowed.put(enumerationLiteralSourceView, false);
+
+ isCreationAllowed.put(associationSourceView, false);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/TestLinkCreationCommentConstraintFromComment.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/TestLinkCreationCommentConstraintFromComment.java
new file mode 100755
index 0000000..4a07d5f
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/TestLinkCreationCommentConstraintFromComment.java
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ * Copyright (c) 2011, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.link;
+
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Comment-Constraint link creation test (via palette tools).
+ */
+public class TestLinkCreationCommentConstraintFromComment extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = commentSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "blockdefinition.tool.comment_constraint_link";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+ isCreationAllowed.put(actorTargetView, true);
+ isCreationAllowed.put(actorPartTargetView, true);
+ isCreationAllowed.put(blockTargetView, true);
+ isCreationAllowed.put(constraintBlockTargetView, true);
+ isCreationAllowed.put(dataTypeTargetView, true);
+ isCreationAllowed.put(dimensionTargetView, true);
+ isCreationAllowed.put(enumerationTargetView, true);
+ isCreationAllowed.put(flowSpecificationTargetView, true);
+ isCreationAllowed.put(interfaceTargetView, true);
+ isCreationAllowed.put(primitiveTypeTargetView, true);
+ isCreationAllowed.put(signalTargetView, true);
+ isCreationAllowed.put(unitTargetView, true);
+ isCreationAllowed.put(valueTypeTargetView, true);
+
+ isCreationAllowed.put(commentTargetView, true);
+ isCreationAllowed.put(commentCNTargetView, true);
+ isCreationAllowed.put(constraintTargetView, true);
+ isCreationAllowed.put(constraintCNTargetView, true);
+ isCreationAllowed.put(instanceSpecTargetView, true);
+ isCreationAllowed.put(instanceSpecCNTargetView, true);
+ isCreationAllowed.put(modelTargetView, true);
+ isCreationAllowed.put(modelCNTargetView, true);
+ isCreationAllowed.put(packageTargetView, true);
+ isCreationAllowed.put(packageCNTargetView, true);
+
+ isCreationAllowed.put(slotTargetView, true);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(portTargetView, true);
+ isCreationAllowed.put(flowportTargetView, true);
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(operationTargetView, true);
+ isCreationAllowed.put(receptionTargetView, true);
+ isCreationAllowed.put(constraintCLNTargetView, true);
+ isCreationAllowed.put(constraintPropertyTargetView, true);
+ isCreationAllowed.put(flowPropertyTargetView, true);
+ isCreationAllowed.put(enumerationLiteralTargetView, true);
+
+ isCreationAllowed.put(associationTargetView, true);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/TestLinkCreationCommentConstraintFromConstraint.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/TestLinkCreationCommentConstraintFromConstraint.java
new file mode 100755
index 0000000..27ef84c
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/TestLinkCreationCommentConstraintFromConstraint.java
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ * Copyright (c) 2011, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.link;
+
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Comment-Constraint link creation test (via palette tools).
+ */
+public class TestLinkCreationCommentConstraintFromConstraint extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = constraintSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "blockdefinition.tool.comment_constraint_link";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+ isCreationAllowed.put(actorTargetView, true);
+ isCreationAllowed.put(actorPartTargetView, true);
+ isCreationAllowed.put(blockTargetView, true);
+ isCreationAllowed.put(constraintBlockTargetView, true);
+ isCreationAllowed.put(dataTypeTargetView, true);
+ isCreationAllowed.put(dimensionTargetView, true);
+ isCreationAllowed.put(enumerationTargetView, true);
+ isCreationAllowed.put(flowSpecificationTargetView, true);
+ isCreationAllowed.put(interfaceTargetView, true);
+ isCreationAllowed.put(primitiveTypeTargetView, true);
+ isCreationAllowed.put(signalTargetView, true);
+ isCreationAllowed.put(unitTargetView, true);
+ isCreationAllowed.put(valueTypeTargetView, true);
+
+ isCreationAllowed.put(commentTargetView, true);
+ isCreationAllowed.put(commentCNTargetView, true);
+ isCreationAllowed.put(constraintTargetView, true);
+ isCreationAllowed.put(constraintCNTargetView, true);
+ isCreationAllowed.put(instanceSpecTargetView, true);
+ isCreationAllowed.put(instanceSpecCNTargetView, true);
+ isCreationAllowed.put(modelTargetView, true);
+ isCreationAllowed.put(modelCNTargetView, true);
+ isCreationAllowed.put(packageTargetView, true);
+ isCreationAllowed.put(packageCNTargetView, true);
+
+ isCreationAllowed.put(slotTargetView, true);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(portTargetView, true);
+ isCreationAllowed.put(flowportTargetView, true);
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(operationTargetView, true);
+ isCreationAllowed.put(receptionTargetView, true);
+ isCreationAllowed.put(constraintCLNTargetView, true);
+ isCreationAllowed.put(constraintPropertyTargetView, true);
+ isCreationAllowed.put(flowPropertyTargetView, true);
+ isCreationAllowed.put(enumerationLiteralTargetView, true);
+
+ isCreationAllowed.put(associationTargetView, true);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/TestLinkCreationDependencyForSources.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/TestLinkCreationDependencyForSources.java
new file mode 100755
index 0000000..011852f
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/TestLinkCreationDependencyForSources.java
@@ -0,0 +1,76 @@
+/*****************************************************************************
+ * Copyright (c) 2011, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.link;
+
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Dependency creation test (via palette tools).
+ */
+public class TestLinkCreationDependencyForSources extends AbstractLinkCreationForSourcesTest {
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "blockdefinition.tool.dependency";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+ isCreationAllowed.put(actorSourceView, true);
+ isCreationAllowed.put(actorPartSourceView, true);
+ isCreationAllowed.put(blockSourceView, true);
+ isCreationAllowed.put(constraintBlockSourceView, true);
+ isCreationAllowed.put(dataTypeSourceView, true);
+ isCreationAllowed.put(dimensionSourceView, true);
+ isCreationAllowed.put(enumerationSourceView, true);
+ isCreationAllowed.put(flowSpecificationSourceView, true);
+ isCreationAllowed.put(interfaceSourceView, true);
+ isCreationAllowed.put(primitiveTypeSourceView, true);
+ isCreationAllowed.put(signalSourceView, true);
+ isCreationAllowed.put(unitSourceView, true);
+ isCreationAllowed.put(valueTypeSourceView, true);
+
+ isCreationAllowed.put(commentSourceView, false);
+ isCreationAllowed.put(commentCNSourceView, false);
+ isCreationAllowed.put(constraintSourceView, true);
+ isCreationAllowed.put(constraintCNSourceView, true);
+ isCreationAllowed.put(instanceSpecSourceView, true);
+ isCreationAllowed.put(instanceSpecCNSourceView, true);
+ isCreationAllowed.put(modelSourceView, true);
+ isCreationAllowed.put(modelCNSourceView, true);
+ isCreationAllowed.put(packageSourceView, true);
+ isCreationAllowed.put(packageCNSourceView, true);
+
+ isCreationAllowed.put(slotSourceView, false);
+
+ isCreationAllowed.put(propertySourceView, true);
+ isCreationAllowed.put(portSourceView, true);
+ isCreationAllowed.put(flowportSourceView, true);
+ isCreationAllowed.put(partSourceView, true);
+ isCreationAllowed.put(referenceSourceView, true);
+ isCreationAllowed.put(valueSourceView, true);
+ isCreationAllowed.put(operationSourceView, true);
+ isCreationAllowed.put(receptionSourceView, true);
+ isCreationAllowed.put(constraintCLNSourceView, true);
+ isCreationAllowed.put(constraintPropertySourceView, true);
+ isCreationAllowed.put(flowPropertySourceView, true);
+ isCreationAllowed.put(enumerationLiteralSourceView, true);
+
+ isCreationAllowed.put(associationSourceView, true);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/TestLinkCreationDependencyFromBlock.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/TestLinkCreationDependencyFromBlock.java
new file mode 100755
index 0000000..2bef514
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/TestLinkCreationDependencyFromBlock.java
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ * Copyright (c) 2011, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.link;
+
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Dependency creation test (via palette tools).
+ */
+public class TestLinkCreationDependencyFromBlock extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = blockSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "blockdefinition.tool.dependency";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+ isCreationAllowed.put(actorTargetView, true);
+ isCreationAllowed.put(actorPartTargetView, true);
+ isCreationAllowed.put(blockTargetView, true);
+ isCreationAllowed.put(constraintBlockTargetView, true);
+ isCreationAllowed.put(dataTypeTargetView, true);
+ isCreationAllowed.put(dimensionTargetView, true);
+ isCreationAllowed.put(enumerationTargetView, true);
+ isCreationAllowed.put(flowSpecificationTargetView, true);
+ isCreationAllowed.put(interfaceTargetView, true);
+ isCreationAllowed.put(primitiveTypeTargetView, true);
+ isCreationAllowed.put(signalTargetView, true);
+ isCreationAllowed.put(unitTargetView, true);
+ isCreationAllowed.put(valueTypeTargetView, true);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, true);
+ isCreationAllowed.put(constraintCNTargetView, true);
+ isCreationAllowed.put(instanceSpecTargetView, true);
+ isCreationAllowed.put(instanceSpecCNTargetView, true);
+ isCreationAllowed.put(modelTargetView, true);
+ isCreationAllowed.put(modelCNTargetView, true);
+ isCreationAllowed.put(packageTargetView, true);
+ isCreationAllowed.put(packageCNTargetView, true);
+
+ isCreationAllowed.put(slotTargetView, false);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(portTargetView, true);
+ isCreationAllowed.put(flowportTargetView, true);
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(operationTargetView, true);
+ isCreationAllowed.put(receptionTargetView, true);
+ isCreationAllowed.put(constraintCLNTargetView, true);
+ isCreationAllowed.put(constraintPropertyTargetView, true);
+ isCreationAllowed.put(flowPropertyTargetView, true);
+ isCreationAllowed.put(enumerationLiteralTargetView, true);
+
+ isCreationAllowed.put(associationTargetView, true);
+
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/TestLinkCreationGeneralizationForSources.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/TestLinkCreationGeneralizationForSources.java
new file mode 100755
index 0000000..1d37bae
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/TestLinkCreationGeneralizationForSources.java
@@ -0,0 +1,76 @@
+/*****************************************************************************
+ * Copyright (c) 2011, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.link;
+
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Generalization creation test (via palette tools).
+ */
+public class TestLinkCreationGeneralizationForSources extends AbstractLinkCreationForSourcesTest {
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "blockdefinition.tool.generalization";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+ isCreationAllowed.put(actorSourceView, true);
+ isCreationAllowed.put(actorPartSourceView, false);
+ isCreationAllowed.put(blockSourceView, true);
+ isCreationAllowed.put(constraintBlockSourceView, true);
+ isCreationAllowed.put(dataTypeSourceView, true);
+ isCreationAllowed.put(dimensionSourceView, false);
+ isCreationAllowed.put(enumerationSourceView, true);
+ isCreationAllowed.put(flowSpecificationSourceView, true);
+ isCreationAllowed.put(interfaceSourceView, true);
+ isCreationAllowed.put(primitiveTypeSourceView, true);
+ isCreationAllowed.put(signalSourceView, true);
+ isCreationAllowed.put(unitSourceView, false);
+ isCreationAllowed.put(valueTypeSourceView, true);
+
+ isCreationAllowed.put(commentSourceView, false);
+ isCreationAllowed.put(commentCNSourceView, false);
+ isCreationAllowed.put(constraintSourceView, false);
+ isCreationAllowed.put(constraintCNSourceView, false);
+ isCreationAllowed.put(instanceSpecSourceView, false);
+ isCreationAllowed.put(instanceSpecCNSourceView, false);
+ isCreationAllowed.put(modelSourceView, false);
+ isCreationAllowed.put(modelCNSourceView, false);
+ isCreationAllowed.put(packageSourceView, false);
+ isCreationAllowed.put(packageCNSourceView, false);
+
+ isCreationAllowed.put(slotSourceView, false);
+
+ isCreationAllowed.put(propertySourceView, false);
+ isCreationAllowed.put(portSourceView, false);
+ isCreationAllowed.put(flowportSourceView, false);
+ isCreationAllowed.put(partSourceView, false);
+ isCreationAllowed.put(referenceSourceView, false);
+ isCreationAllowed.put(valueSourceView, false);
+ isCreationAllowed.put(operationSourceView, false);
+ isCreationAllowed.put(receptionSourceView, false);
+ isCreationAllowed.put(constraintCLNSourceView, false);
+ isCreationAllowed.put(constraintPropertySourceView, false);
+ isCreationAllowed.put(flowPropertySourceView, false);
+ isCreationAllowed.put(enumerationLiteralSourceView, false);
+
+ isCreationAllowed.put(associationSourceView, true);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/TestLinkCreationGeneralizationFromBlock.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/TestLinkCreationGeneralizationFromBlock.java
new file mode 100755
index 0000000..8e107c6
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/TestLinkCreationGeneralizationFromBlock.java
@@ -0,0 +1,117 @@
+/*****************************************************************************
+ * Copyright (c) 2011, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.link;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.createEdgeFromPalette;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Ignore;
+import org.junit.Test;
+
+/**
+ * JUnit tests for Dependency creation test (via palette tools).
+ */
+public class TestLinkCreationGeneralizationFromBlock extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = blockSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "blockdefinition.tool.generalization";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+ isCreationAllowed.put(actorTargetView, true);
+ isCreationAllowed.put(actorPartTargetView, false);
+ isCreationAllowed.put(blockTargetView, true);
+ isCreationAllowed.put(constraintBlockTargetView, true);
+ isCreationAllowed.put(dataTypeTargetView, true);
+ isCreationAllowed.put(dimensionTargetView, false);
+ isCreationAllowed.put(enumerationTargetView, true);
+ isCreationAllowed.put(flowSpecificationTargetView, true);
+ isCreationAllowed.put(interfaceTargetView, true);
+ isCreationAllowed.put(primitiveTypeTargetView, true);
+ isCreationAllowed.put(signalTargetView, true);
+ isCreationAllowed.put(unitTargetView, false);
+ isCreationAllowed.put(valueTypeTargetView, true);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, false);
+ isCreationAllowed.put(constraintCNTargetView, false);
+ isCreationAllowed.put(instanceSpecTargetView, false);
+ isCreationAllowed.put(instanceSpecCNTargetView, false);
+ isCreationAllowed.put(modelTargetView, false);
+ isCreationAllowed.put(modelCNTargetView, false);
+ isCreationAllowed.put(packageTargetView, false);
+ isCreationAllowed.put(packageCNTargetView, false);
+
+ isCreationAllowed.put(slotTargetView, false);
+
+ isCreationAllowed.put(propertyTargetView, false);
+ isCreationAllowed.put(portTargetView, false);
+ isCreationAllowed.put(flowportTargetView, false);
+ isCreationAllowed.put(partTargetView, false);
+ isCreationAllowed.put(referenceTargetView, false);
+ isCreationAllowed.put(valueTargetView, false);
+ isCreationAllowed.put(operationTargetView, false);
+ isCreationAllowed.put(receptionTargetView, false);
+ isCreationAllowed.put(constraintCLNTargetView, false);
+ isCreationAllowed.put(constraintPropertyTargetView, false);
+ isCreationAllowed.put(flowPropertyTargetView, false);
+ isCreationAllowed.put(enumerationLiteralTargetView, false);
+
+ isCreationAllowed.put(associationTargetView, true);
+ }
+
+ @Ignore("UML Rules not implemented.")
+ @Test
+ public void verifyUMLRulesForGeneralization() throws Exception {
+ // TODO : check the spec. and decide which rule should be verified by
+ // construction (tested here).
+ // ex.: generalization link from Class to Interface should probably not be allowed.
+ }
+
+ @Ignore("SysML Rule not implemented.")
+ @Test
+ public void onlyBlockCanSpecializeBlock() throws Exception {
+ // [8] Any classifier which specializes a Block must also have the Block stereotype applied.
+ }
+
+ @Test
+ public void createGeneralizationWithCycleIsForbidden() throws Exception {
+ createEdgeFromPalette(toolID, blockSourceView, blockSourceView, false);
+ }
+
+ @Ignore("This is not tested on creation. This should be tested on validation.")
+ @Test
+ public void createGeneralizationWithIndirectCycleIsForbidden() throws Exception {
+ View intermediate = createGraphicalNode(SysMLElementTypes.BLOCK, SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_CLASSIFIER_ID, getDiagramView());
+ createEdgeFromPalette(toolID, blockSourceView, intermediate, true);
+ createEdgeFromPalette(toolID, intermediate, blockTargetView, true);
+ createEdgeFromPalette(toolID, blockTargetView, blockSourceView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/TestLinkCreationInterfaceRealizationForSources.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/TestLinkCreationInterfaceRealizationForSources.java
new file mode 100755
index 0000000..40ee991
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/TestLinkCreationInterfaceRealizationForSources.java
@@ -0,0 +1,76 @@
+/*****************************************************************************
+ * Copyright (c) 2011, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.link;
+
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for InterfaceRealization creation test (via palette tools).
+ */
+public class TestLinkCreationInterfaceRealizationForSources extends AbstractLinkCreationForSourcesTest {
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "blockdefinition.tool.interfacerealization";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results (must be a BehavioredClassifier)
+ isCreationAllowed.put(actorSourceView, true);
+ isCreationAllowed.put(actorPartSourceView, false);
+ isCreationAllowed.put(blockSourceView, true);
+ isCreationAllowed.put(constraintBlockSourceView, true);
+ isCreationAllowed.put(dataTypeSourceView, false);
+ isCreationAllowed.put(dimensionSourceView, false);
+ isCreationAllowed.put(enumerationSourceView, false);
+ isCreationAllowed.put(flowSpecificationSourceView, false);
+ isCreationAllowed.put(interfaceSourceView, false);
+ isCreationAllowed.put(primitiveTypeSourceView, false);
+ isCreationAllowed.put(signalSourceView, false);
+ isCreationAllowed.put(unitSourceView, false);
+ isCreationAllowed.put(valueTypeSourceView, false);
+
+ isCreationAllowed.put(commentSourceView, false);
+ isCreationAllowed.put(commentCNSourceView, false);
+ isCreationAllowed.put(constraintSourceView, false);
+ isCreationAllowed.put(constraintCNSourceView, false);
+ isCreationAllowed.put(instanceSpecSourceView, false);
+ isCreationAllowed.put(instanceSpecCNSourceView, false);
+ isCreationAllowed.put(modelSourceView, false);
+ isCreationAllowed.put(modelCNSourceView, false);
+ isCreationAllowed.put(packageSourceView, false);
+ isCreationAllowed.put(packageCNSourceView, false);
+
+ isCreationAllowed.put(slotSourceView, false);
+
+ isCreationAllowed.put(propertySourceView, false);
+ isCreationAllowed.put(portSourceView, false);
+ isCreationAllowed.put(flowportSourceView, false);
+ isCreationAllowed.put(partSourceView, false);
+ isCreationAllowed.put(referenceSourceView, false);
+ isCreationAllowed.put(valueSourceView, false);
+ isCreationAllowed.put(operationSourceView, false);
+ isCreationAllowed.put(receptionSourceView, false);
+ isCreationAllowed.put(constraintCLNSourceView, false);
+ isCreationAllowed.put(constraintPropertySourceView, false);
+ isCreationAllowed.put(flowPropertySourceView, false);
+ isCreationAllowed.put(enumerationLiteralSourceView, false);
+
+ isCreationAllowed.put(associationSourceView, false);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/TestLinkCreationInterfaceRealizationFromBlock.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/TestLinkCreationInterfaceRealizationFromBlock.java
new file mode 100755
index 0000000..04f7997
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/TestLinkCreationInterfaceRealizationFromBlock.java
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ * Copyright (c) 2011, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.link;
+
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for InterfaceRealization creation test (via palette tools).
+ */
+public class TestLinkCreationInterfaceRealizationFromBlock extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = blockSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "blockdefinition.tool.interfacerealization";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results (must be an Interface)
+ isCreationAllowed.put(actorTargetView, false);
+ isCreationAllowed.put(actorPartTargetView, false);
+ isCreationAllowed.put(blockTargetView, false);
+ isCreationAllowed.put(constraintBlockTargetView, false);
+ isCreationAllowed.put(dataTypeTargetView, false);
+ isCreationAllowed.put(dimensionTargetView, false);
+ isCreationAllowed.put(enumerationTargetView, false);
+ isCreationAllowed.put(flowSpecificationTargetView, true); // TODO : Verify if SysML provide a rule to forbid this
+ isCreationAllowed.put(interfaceTargetView, true);
+ isCreationAllowed.put(primitiveTypeTargetView, false);
+ isCreationAllowed.put(signalTargetView, false);
+ isCreationAllowed.put(unitTargetView, false);
+ isCreationAllowed.put(valueTypeTargetView, false);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, false);
+ isCreationAllowed.put(constraintCNTargetView, false);
+ isCreationAllowed.put(instanceSpecTargetView, false);
+ isCreationAllowed.put(instanceSpecCNTargetView, false);
+ isCreationAllowed.put(modelTargetView, false);
+ isCreationAllowed.put(modelCNTargetView, false);
+ isCreationAllowed.put(packageTargetView, false);
+ isCreationAllowed.put(packageCNTargetView, false);
+
+ isCreationAllowed.put(slotTargetView, false);
+
+ isCreationAllowed.put(propertyTargetView, false);
+ isCreationAllowed.put(portTargetView, false);
+ isCreationAllowed.put(flowportTargetView, false);
+ isCreationAllowed.put(partTargetView, false);
+ isCreationAllowed.put(referenceTargetView, false);
+ isCreationAllowed.put(valueTargetView, false);
+ isCreationAllowed.put(operationTargetView, false);
+ isCreationAllowed.put(receptionTargetView, false);
+ isCreationAllowed.put(constraintCLNTargetView, false);
+ isCreationAllowed.put(constraintPropertyTargetView, false);
+ isCreationAllowed.put(flowPropertyTargetView, false);
+ isCreationAllowed.put(enumerationLiteralTargetView, false);
+
+ isCreationAllowed.put(associationTargetView, false);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/TestLinkCreationUsageForSources.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/TestLinkCreationUsageForSources.java
new file mode 100755
index 0000000..0e1f761
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/TestLinkCreationUsageForSources.java
@@ -0,0 +1,76 @@
+/*****************************************************************************
+ * Copyright (c) 2011, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.link;
+
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Usage creation test (via palette tools).
+ */
+public class TestLinkCreationUsageForSources extends AbstractLinkCreationForSourcesTest {
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "blockdefinition.tool.usage";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+ isCreationAllowed.put(actorSourceView, true);
+ isCreationAllowed.put(actorPartSourceView, true);
+ isCreationAllowed.put(blockSourceView, true);
+ isCreationAllowed.put(constraintBlockSourceView, true);
+ isCreationAllowed.put(dataTypeSourceView, true);
+ isCreationAllowed.put(dimensionSourceView, true);
+ isCreationAllowed.put(enumerationSourceView, true);
+ isCreationAllowed.put(flowSpecificationSourceView, true);
+ isCreationAllowed.put(interfaceSourceView, true);
+ isCreationAllowed.put(primitiveTypeSourceView, true);
+ isCreationAllowed.put(signalSourceView, true);
+ isCreationAllowed.put(unitSourceView, true);
+ isCreationAllowed.put(valueTypeSourceView, true);
+
+ isCreationAllowed.put(commentSourceView, false);
+ isCreationAllowed.put(commentCNSourceView, false);
+ isCreationAllowed.put(constraintSourceView, true);
+ isCreationAllowed.put(constraintCNSourceView, true);
+ isCreationAllowed.put(instanceSpecSourceView, true);
+ isCreationAllowed.put(instanceSpecCNSourceView, true);
+ isCreationAllowed.put(modelSourceView, true);
+ isCreationAllowed.put(modelCNSourceView, true);
+ isCreationAllowed.put(packageSourceView, true);
+ isCreationAllowed.put(packageCNSourceView, true);
+
+ isCreationAllowed.put(slotSourceView, false);
+
+ isCreationAllowed.put(propertySourceView, true);
+ isCreationAllowed.put(portSourceView, true);
+ isCreationAllowed.put(flowportSourceView, true);
+ isCreationAllowed.put(partSourceView, true);
+ isCreationAllowed.put(referenceSourceView, true);
+ isCreationAllowed.put(valueSourceView, true);
+ isCreationAllowed.put(operationSourceView, true);
+ isCreationAllowed.put(receptionSourceView, true);
+ isCreationAllowed.put(constraintCLNSourceView, true);
+ isCreationAllowed.put(constraintPropertySourceView, true);
+ isCreationAllowed.put(flowPropertySourceView, true);
+ isCreationAllowed.put(enumerationLiteralSourceView, true);
+
+ isCreationAllowed.put(associationSourceView, true);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/TestLinkCreationUsageFromBlock.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/TestLinkCreationUsageFromBlock.java
new file mode 100755
index 0000000..44515ac
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/TestLinkCreationUsageFromBlock.java
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ * Copyright (c) 2011, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.link;
+
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Usage creation test (via palette tools).
+ */
+public class TestLinkCreationUsageFromBlock extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = blockSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "blockdefinition.tool.usage";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+ isCreationAllowed.put(actorTargetView, true);
+ isCreationAllowed.put(actorPartTargetView, true);
+ isCreationAllowed.put(blockTargetView, true);
+ isCreationAllowed.put(constraintBlockTargetView, true);
+ isCreationAllowed.put(dataTypeTargetView, true);
+ isCreationAllowed.put(dimensionTargetView, true);
+ isCreationAllowed.put(enumerationTargetView, true);
+ isCreationAllowed.put(flowSpecificationTargetView, true);
+ isCreationAllowed.put(interfaceTargetView, true);
+ isCreationAllowed.put(primitiveTypeTargetView, true);
+ isCreationAllowed.put(signalTargetView, true);
+ isCreationAllowed.put(unitTargetView, true);
+ isCreationAllowed.put(valueTypeTargetView, true);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, true);
+ isCreationAllowed.put(constraintCNTargetView, true);
+ isCreationAllowed.put(instanceSpecTargetView, true);
+ isCreationAllowed.put(instanceSpecCNTargetView, true);
+ isCreationAllowed.put(modelTargetView, true);
+ isCreationAllowed.put(modelCNTargetView, true);
+ isCreationAllowed.put(packageTargetView, true);
+ isCreationAllowed.put(packageCNTargetView, true);
+
+ isCreationAllowed.put(slotTargetView, false);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(portTargetView, true);
+ isCreationAllowed.put(flowportTargetView, true);
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(operationTargetView, true);
+ isCreationAllowed.put(receptionTargetView, true);
+ isCreationAllowed.put(constraintCLNTargetView, true);
+ isCreationAllowed.put(constraintPropertyTargetView, true);
+ isCreationAllowed.put(flowPropertyTargetView, true);
+ isCreationAllowed.put(enumerationLiteralTargetView, true);
+
+ isCreationAllowed.put(associationTargetView, true);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/association/TestLinkCreationAssociationCompositeDirectedForSources.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/association/TestLinkCreationAssociationCompositeDirectedForSources.java
new file mode 100755
index 0000000..a79eefb
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/association/TestLinkCreationAssociationCompositeDirectedForSources.java
@@ -0,0 +1,78 @@
+/*****************************************************************************
+ * Copyright (c) 2011, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.link.association;
+
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.link.AbstractLinkCreationForSourcesTest;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Association creation test (via palette tools).
+ */
+public class TestLinkCreationAssociationCompositeDirectedForSources extends AbstractLinkCreationForSourcesTest {
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "blockdefinition.tool.association_composite_directed";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+ isCreationAllowed.put(actorSourceView, false);
+ isCreationAllowed.put(actorPartSourceView, false);
+ isCreationAllowed.put(blockSourceView, true);
+ isCreationAllowed.put(constraintBlockSourceView, true);
+ isCreationAllowed.put(dataTypeSourceView, true);
+ isCreationAllowed.put(dimensionSourceView, false);
+ isCreationAllowed.put(enumerationSourceView, true);
+ isCreationAllowed.put(flowSpecificationSourceView, true);
+ isCreationAllowed.put(interfaceSourceView, true);
+ isCreationAllowed.put(primitiveTypeSourceView, true);
+ isCreationAllowed.put(signalSourceView, true);
+ isCreationAllowed.put(unitSourceView, false);
+ isCreationAllowed.put(valueTypeSourceView, true);
+
+ isCreationAllowed.put(commentSourceView, false);
+ isCreationAllowed.put(commentCNSourceView, false);
+ isCreationAllowed.put(constraintSourceView, false);
+ isCreationAllowed.put(constraintCNSourceView, false);
+ isCreationAllowed.put(instanceSpecSourceView, false);
+ isCreationAllowed.put(instanceSpecCNSourceView, false);
+ isCreationAllowed.put(modelSourceView, false);
+ isCreationAllowed.put(modelCNSourceView, false);
+ isCreationAllowed.put(packageSourceView, false);
+ isCreationAllowed.put(packageCNSourceView, false);
+
+ isCreationAllowed.put(slotSourceView, false);
+
+ isCreationAllowed.put(propertySourceView, false);
+ isCreationAllowed.put(portSourceView, false);
+ isCreationAllowed.put(flowportSourceView, false);
+ isCreationAllowed.put(partSourceView, false);
+ isCreationAllowed.put(referenceSourceView, false);
+ isCreationAllowed.put(valueSourceView, false);
+ isCreationAllowed.put(operationSourceView, false);
+ isCreationAllowed.put(receptionSourceView, false);
+ isCreationAllowed.put(constraintCLNSourceView, false);
+ isCreationAllowed.put(constraintPropertySourceView, false);
+ isCreationAllowed.put(flowPropertySourceView, false);
+ isCreationAllowed.put(enumerationLiteralSourceView, false);
+
+ isCreationAllowed.put(associationSourceView, false);
+
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/association/TestLinkCreationAssociationCompositeDirectedFromBlock.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/association/TestLinkCreationAssociationCompositeDirectedFromBlock.java
new file mode 100755
index 0000000..d18493b
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/association/TestLinkCreationAssociationCompositeDirectedFromBlock.java
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ * Copyright (c) 2011, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.link.association;
+
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.link.AbstractLinkCreationFromElementTest;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Association creation test (via palette tools).
+ */
+public class TestLinkCreationAssociationCompositeDirectedFromBlock extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = blockSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "blockdefinition.tool.association_composite_directed";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+ isCreationAllowed.put(actorTargetView, true);
+ isCreationAllowed.put(actorPartTargetView, false);
+ isCreationAllowed.put(blockTargetView, true);
+ isCreationAllowed.put(constraintBlockTargetView, true);
+ isCreationAllowed.put(dataTypeTargetView, true);
+ isCreationAllowed.put(dimensionTargetView, false);
+ isCreationAllowed.put(enumerationTargetView, true);
+ isCreationAllowed.put(flowSpecificationTargetView, true);
+ isCreationAllowed.put(interfaceTargetView, true);
+ isCreationAllowed.put(primitiveTypeTargetView, true);
+ isCreationAllowed.put(signalTargetView, true);
+ isCreationAllowed.put(unitTargetView, false);
+ isCreationAllowed.put(valueTypeTargetView, true);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, false);
+ isCreationAllowed.put(constraintCNTargetView, false);
+ isCreationAllowed.put(instanceSpecTargetView, false);
+ isCreationAllowed.put(instanceSpecCNTargetView, false);
+ isCreationAllowed.put(modelTargetView, false);
+ isCreationAllowed.put(modelCNTargetView, false);
+ isCreationAllowed.put(packageTargetView, false);
+ isCreationAllowed.put(packageCNTargetView, false);
+
+ isCreationAllowed.put(slotTargetView, false);
+
+ isCreationAllowed.put(propertyTargetView, false);
+ isCreationAllowed.put(portTargetView, false);
+ isCreationAllowed.put(flowportTargetView, false);
+ isCreationAllowed.put(partTargetView, false);
+ isCreationAllowed.put(referenceTargetView, false);
+ isCreationAllowed.put(valueTargetView, false);
+ isCreationAllowed.put(operationTargetView, false);
+ isCreationAllowed.put(receptionTargetView, false);
+ isCreationAllowed.put(constraintCLNTargetView, false);
+ isCreationAllowed.put(constraintPropertyTargetView, false);
+ isCreationAllowed.put(flowPropertyTargetView, false);
+ isCreationAllowed.put(enumerationLiteralTargetView, false);
+
+ isCreationAllowed.put(associationTargetView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/association/TestLinkCreationAssociationCompositeForSources.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/association/TestLinkCreationAssociationCompositeForSources.java
new file mode 100755
index 0000000..f0210bd
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/association/TestLinkCreationAssociationCompositeForSources.java
@@ -0,0 +1,78 @@
+/*****************************************************************************
+ * Copyright (c) 2011, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.link.association;
+
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.link.AbstractLinkCreationForSourcesTest;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Association creation test (via palette tools).
+ */
+public class TestLinkCreationAssociationCompositeForSources extends AbstractLinkCreationForSourcesTest {
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "blockdefinition.tool.association_composite";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+ isCreationAllowed.put(actorSourceView, false);
+ isCreationAllowed.put(actorPartSourceView, false);
+ isCreationAllowed.put(blockSourceView, true);
+ isCreationAllowed.put(constraintBlockSourceView, true);
+ isCreationAllowed.put(dataTypeSourceView, true);
+ isCreationAllowed.put(dimensionSourceView, false);
+ isCreationAllowed.put(enumerationSourceView, true);
+ isCreationAllowed.put(flowSpecificationSourceView, true);
+ isCreationAllowed.put(interfaceSourceView, true);
+ isCreationAllowed.put(primitiveTypeSourceView, true);
+ isCreationAllowed.put(signalSourceView, true);
+ isCreationAllowed.put(unitSourceView, false);
+ isCreationAllowed.put(valueTypeSourceView, true);
+
+ isCreationAllowed.put(commentSourceView, false);
+ isCreationAllowed.put(commentCNSourceView, false);
+ isCreationAllowed.put(constraintSourceView, false);
+ isCreationAllowed.put(constraintCNSourceView, false);
+ isCreationAllowed.put(instanceSpecSourceView, false);
+ isCreationAllowed.put(instanceSpecCNSourceView, false);
+ isCreationAllowed.put(modelSourceView, false);
+ isCreationAllowed.put(modelCNSourceView, false);
+ isCreationAllowed.put(packageSourceView, false);
+ isCreationAllowed.put(packageCNSourceView, false);
+
+ isCreationAllowed.put(slotSourceView, false);
+
+ isCreationAllowed.put(propertySourceView, false);
+ isCreationAllowed.put(portSourceView, false);
+ isCreationAllowed.put(flowportSourceView, false);
+ isCreationAllowed.put(partSourceView, false);
+ isCreationAllowed.put(referenceSourceView, false);
+ isCreationAllowed.put(valueSourceView, false);
+ isCreationAllowed.put(operationSourceView, false);
+ isCreationAllowed.put(receptionSourceView, false);
+ isCreationAllowed.put(constraintCLNSourceView, false);
+ isCreationAllowed.put(constraintPropertySourceView, false);
+ isCreationAllowed.put(flowPropertySourceView, false);
+ isCreationAllowed.put(enumerationLiteralSourceView, false);
+
+ isCreationAllowed.put(associationSourceView, false);
+
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/association/TestLinkCreationAssociationCompositeFromBlock.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/association/TestLinkCreationAssociationCompositeFromBlock.java
new file mode 100755
index 0000000..1cde9a2
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/association/TestLinkCreationAssociationCompositeFromBlock.java
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ * Copyright (c) 2011, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.link.association;
+
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.link.AbstractLinkCreationFromElementTest;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Association creation test (via palette tools).
+ */
+public class TestLinkCreationAssociationCompositeFromBlock extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = blockSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "blockdefinition.tool.association_composite";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+ isCreationAllowed.put(actorTargetView, false);
+ isCreationAllowed.put(actorPartTargetView, false);
+ isCreationAllowed.put(blockTargetView, true);
+ isCreationAllowed.put(constraintBlockTargetView, true);
+ isCreationAllowed.put(dataTypeTargetView, true);
+ isCreationAllowed.put(dimensionTargetView, false);
+ isCreationAllowed.put(enumerationTargetView, true);
+ isCreationAllowed.put(flowSpecificationTargetView, true);
+ isCreationAllowed.put(interfaceTargetView, true);
+ isCreationAllowed.put(primitiveTypeTargetView, true);
+ isCreationAllowed.put(signalTargetView, true);
+ isCreationAllowed.put(unitTargetView, false);
+ isCreationAllowed.put(valueTypeTargetView, true);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, false);
+ isCreationAllowed.put(constraintCNTargetView, false);
+ isCreationAllowed.put(instanceSpecTargetView, false);
+ isCreationAllowed.put(instanceSpecCNTargetView, false);
+ isCreationAllowed.put(modelTargetView, false);
+ isCreationAllowed.put(modelCNTargetView, false);
+ isCreationAllowed.put(packageTargetView, false);
+ isCreationAllowed.put(packageCNTargetView, false);
+
+ isCreationAllowed.put(slotTargetView, false);
+
+ isCreationAllowed.put(propertyTargetView, false);
+ isCreationAllowed.put(portTargetView, false);
+ isCreationAllowed.put(flowportTargetView, false);
+ isCreationAllowed.put(partTargetView, false);
+ isCreationAllowed.put(referenceTargetView, false);
+ isCreationAllowed.put(valueTargetView, false);
+ isCreationAllowed.put(operationTargetView, false);
+ isCreationAllowed.put(receptionTargetView, false);
+ isCreationAllowed.put(constraintCLNTargetView, false);
+ isCreationAllowed.put(constraintPropertyTargetView, false);
+ isCreationAllowed.put(flowPropertyTargetView, false);
+ isCreationAllowed.put(enumerationLiteralTargetView, false);
+
+ isCreationAllowed.put(associationTargetView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/association/TestLinkCreationAssociationNoneDirectedForSources.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/association/TestLinkCreationAssociationNoneDirectedForSources.java
new file mode 100755
index 0000000..06ee626
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/association/TestLinkCreationAssociationNoneDirectedForSources.java
@@ -0,0 +1,78 @@
+/*****************************************************************************
+ * Copyright (c) 2011, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.link.association;
+
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.link.AbstractLinkCreationForSourcesTest;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Association creation test (via palette tools).
+ */
+public class TestLinkCreationAssociationNoneDirectedForSources extends AbstractLinkCreationForSourcesTest {
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "blockdefinition.tool.association_none_directed";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+ isCreationAllowed.put(actorSourceView, false);
+ isCreationAllowed.put(actorPartSourceView, false);
+ isCreationAllowed.put(blockSourceView, true);
+ isCreationAllowed.put(constraintBlockSourceView, true);
+ isCreationAllowed.put(dataTypeSourceView, true);
+ isCreationAllowed.put(dimensionSourceView, false);
+ isCreationAllowed.put(enumerationSourceView, true);
+ isCreationAllowed.put(flowSpecificationSourceView, true);
+ isCreationAllowed.put(interfaceSourceView, true);
+ isCreationAllowed.put(primitiveTypeSourceView, true);
+ isCreationAllowed.put(signalSourceView, true);
+ isCreationAllowed.put(unitSourceView, false);
+ isCreationAllowed.put(valueTypeSourceView, true);
+
+ isCreationAllowed.put(commentSourceView, false);
+ isCreationAllowed.put(commentCNSourceView, false);
+ isCreationAllowed.put(constraintSourceView, false);
+ isCreationAllowed.put(constraintCNSourceView, false);
+ isCreationAllowed.put(instanceSpecSourceView, false);
+ isCreationAllowed.put(instanceSpecCNSourceView, false);
+ isCreationAllowed.put(modelSourceView, false);
+ isCreationAllowed.put(modelCNSourceView, false);
+ isCreationAllowed.put(packageSourceView, false);
+ isCreationAllowed.put(packageCNSourceView, false);
+
+ isCreationAllowed.put(slotSourceView, false);
+
+ isCreationAllowed.put(propertySourceView, false);
+ isCreationAllowed.put(portSourceView, false);
+ isCreationAllowed.put(flowportSourceView, false);
+ isCreationAllowed.put(partSourceView, false);
+ isCreationAllowed.put(referenceSourceView, false);
+ isCreationAllowed.put(valueSourceView, false);
+ isCreationAllowed.put(operationSourceView, false);
+ isCreationAllowed.put(receptionSourceView, false);
+ isCreationAllowed.put(constraintCLNSourceView, false);
+ isCreationAllowed.put(constraintPropertySourceView, false);
+ isCreationAllowed.put(flowPropertySourceView, false);
+ isCreationAllowed.put(enumerationLiteralSourceView, false);
+
+ isCreationAllowed.put(associationSourceView, false);
+
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/association/TestLinkCreationAssociationNoneDirectedFromBlock.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/association/TestLinkCreationAssociationNoneDirectedFromBlock.java
new file mode 100755
index 0000000..b98ac2a
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/association/TestLinkCreationAssociationNoneDirectedFromBlock.java
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ * Copyright (c) 2011, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.link.association;
+
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.link.AbstractLinkCreationFromElementTest;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Association creation test (via palette tools).
+ */
+public class TestLinkCreationAssociationNoneDirectedFromBlock extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = blockSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "blockdefinition.tool.association_none_directed";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+ isCreationAllowed.put(actorTargetView, true);
+ isCreationAllowed.put(actorPartTargetView, false);
+ isCreationAllowed.put(blockTargetView, true);
+ isCreationAllowed.put(constraintBlockTargetView, true);
+ isCreationAllowed.put(dataTypeTargetView, true);
+ isCreationAllowed.put(dimensionTargetView, false);
+ isCreationAllowed.put(enumerationTargetView, true);
+ isCreationAllowed.put(flowSpecificationTargetView, true);
+ isCreationAllowed.put(interfaceTargetView, true);
+ isCreationAllowed.put(primitiveTypeTargetView, true);
+ isCreationAllowed.put(signalTargetView, true);
+ isCreationAllowed.put(unitTargetView, false);
+ isCreationAllowed.put(valueTypeTargetView, true);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, false);
+ isCreationAllowed.put(constraintCNTargetView, false);
+ isCreationAllowed.put(instanceSpecTargetView, false);
+ isCreationAllowed.put(instanceSpecCNTargetView, false);
+ isCreationAllowed.put(modelTargetView, false);
+ isCreationAllowed.put(modelCNTargetView, false);
+ isCreationAllowed.put(packageTargetView, false);
+ isCreationAllowed.put(packageCNTargetView, false);
+
+ isCreationAllowed.put(slotTargetView, false);
+
+ isCreationAllowed.put(propertyTargetView, false);
+ isCreationAllowed.put(portTargetView, false);
+ isCreationAllowed.put(flowportTargetView, false);
+ isCreationAllowed.put(partTargetView, false);
+ isCreationAllowed.put(referenceTargetView, false);
+ isCreationAllowed.put(valueTargetView, false);
+ isCreationAllowed.put(operationTargetView, false);
+ isCreationAllowed.put(receptionTargetView, false);
+ isCreationAllowed.put(constraintCLNTargetView, false);
+ isCreationAllowed.put(constraintPropertyTargetView, false);
+ isCreationAllowed.put(flowPropertyTargetView, false);
+ isCreationAllowed.put(enumerationLiteralTargetView, false);
+
+ isCreationAllowed.put(associationTargetView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/association/TestLinkCreationAssociationNoneForSources.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/association/TestLinkCreationAssociationNoneForSources.java
new file mode 100755
index 0000000..7e17f1f
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/association/TestLinkCreationAssociationNoneForSources.java
@@ -0,0 +1,78 @@
+/*****************************************************************************
+ * Copyright (c) 2011, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.link.association;
+
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.link.AbstractLinkCreationForSourcesTest;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Association creation test (via palette tools).
+ */
+public class TestLinkCreationAssociationNoneForSources extends AbstractLinkCreationForSourcesTest {
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "blockdefinition.tool.association_none";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+ isCreationAllowed.put(actorSourceView, false);
+ isCreationAllowed.put(actorPartSourceView, false);
+ isCreationAllowed.put(blockSourceView, true);
+ isCreationAllowed.put(constraintBlockSourceView, true);
+ isCreationAllowed.put(dataTypeSourceView, true);
+ isCreationAllowed.put(dimensionSourceView, false);
+ isCreationAllowed.put(enumerationSourceView, true);
+ isCreationAllowed.put(flowSpecificationSourceView, true);
+ isCreationAllowed.put(interfaceSourceView, true);
+ isCreationAllowed.put(primitiveTypeSourceView, true);
+ isCreationAllowed.put(signalSourceView, true);
+ isCreationAllowed.put(unitSourceView, false);
+ isCreationAllowed.put(valueTypeSourceView, true);
+
+ isCreationAllowed.put(commentSourceView, false);
+ isCreationAllowed.put(commentCNSourceView, false);
+ isCreationAllowed.put(constraintSourceView, false);
+ isCreationAllowed.put(constraintCNSourceView, false);
+ isCreationAllowed.put(instanceSpecSourceView, false);
+ isCreationAllowed.put(instanceSpecCNSourceView, false);
+ isCreationAllowed.put(modelSourceView, false);
+ isCreationAllowed.put(modelCNSourceView, false);
+ isCreationAllowed.put(packageSourceView, false);
+ isCreationAllowed.put(packageCNSourceView, false);
+
+ isCreationAllowed.put(slotSourceView, false);
+
+ isCreationAllowed.put(propertySourceView, false);
+ isCreationAllowed.put(portSourceView, false);
+ isCreationAllowed.put(flowportSourceView, false);
+ isCreationAllowed.put(partSourceView, false);
+ isCreationAllowed.put(referenceSourceView, false);
+ isCreationAllowed.put(valueSourceView, false);
+ isCreationAllowed.put(operationSourceView, false);
+ isCreationAllowed.put(receptionSourceView, false);
+ isCreationAllowed.put(constraintCLNSourceView, false);
+ isCreationAllowed.put(constraintPropertySourceView, false);
+ isCreationAllowed.put(flowPropertySourceView, false);
+ isCreationAllowed.put(enumerationLiteralSourceView, false);
+
+ isCreationAllowed.put(associationSourceView, false);
+
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/association/TestLinkCreationAssociationNoneFromBlock.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/association/TestLinkCreationAssociationNoneFromBlock.java
new file mode 100755
index 0000000..df3a348
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/association/TestLinkCreationAssociationNoneFromBlock.java
@@ -0,0 +1,86 @@
+/*****************************************************************************
+ * Copyright (c) 2011, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.link.association;
+
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.link.AbstractLinkCreationFromElementTest;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Association creation test (via palette tools).
+ */
+public class TestLinkCreationAssociationNoneFromBlock extends AbstractLinkCreationFromElementTest {
+
+
+ public TestLinkCreationAssociationNoneFromBlock() {
+ }
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = blockSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "blockdefinition.tool.association_none";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+ isCreationAllowed.put(actorTargetView, false);
+ isCreationAllowed.put(actorPartTargetView, false);
+ isCreationAllowed.put(blockTargetView, true);
+ isCreationAllowed.put(constraintBlockTargetView, true);
+ isCreationAllowed.put(dataTypeTargetView, true);
+ isCreationAllowed.put(dimensionTargetView, false);
+ isCreationAllowed.put(enumerationTargetView, true);
+ isCreationAllowed.put(flowSpecificationTargetView, true);
+ isCreationAllowed.put(interfaceTargetView, true);
+ isCreationAllowed.put(primitiveTypeTargetView, true);
+ isCreationAllowed.put(signalTargetView, true);
+ isCreationAllowed.put(unitTargetView, false);
+ isCreationAllowed.put(valueTypeTargetView, true);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, false);
+ isCreationAllowed.put(constraintCNTargetView, false);
+ isCreationAllowed.put(instanceSpecTargetView, false);
+ isCreationAllowed.put(instanceSpecCNTargetView, false);
+ isCreationAllowed.put(modelTargetView, false);
+ isCreationAllowed.put(modelCNTargetView, false);
+ isCreationAllowed.put(packageTargetView, false);
+ isCreationAllowed.put(packageCNTargetView, false);
+
+ isCreationAllowed.put(slotTargetView, false);
+
+ isCreationAllowed.put(propertyTargetView, false);
+ isCreationAllowed.put(portTargetView, false);
+ isCreationAllowed.put(flowportTargetView, false);
+ isCreationAllowed.put(partTargetView, false);
+ isCreationAllowed.put(referenceTargetView, false);
+ isCreationAllowed.put(valueTargetView, false);
+ isCreationAllowed.put(operationTargetView, false);
+ isCreationAllowed.put(receptionTargetView, false);
+ isCreationAllowed.put(constraintCLNTargetView, false);
+ isCreationAllowed.put(constraintPropertyTargetView, false);
+ isCreationAllowed.put(flowPropertyTargetView, false);
+ isCreationAllowed.put(enumerationLiteralTargetView, false);
+
+ isCreationAllowed.put(associationTargetView, false);
+
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/association/TestLinkCreationAssociationSharedDirectedForSources.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/association/TestLinkCreationAssociationSharedDirectedForSources.java
new file mode 100755
index 0000000..b602722
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/association/TestLinkCreationAssociationSharedDirectedForSources.java
@@ -0,0 +1,78 @@
+/*****************************************************************************
+ * Copyright (c) 2011, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.link.association;
+
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.link.AbstractLinkCreationForSourcesTest;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Association creation test (via palette tools).
+ */
+public class TestLinkCreationAssociationSharedDirectedForSources extends AbstractLinkCreationForSourcesTest {
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "blockdefinition.tool.association_shared_directed";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+ isCreationAllowed.put(actorSourceView, false);
+ isCreationAllowed.put(actorPartSourceView, false);
+ isCreationAllowed.put(blockSourceView, true);
+ isCreationAllowed.put(constraintBlockSourceView, true);
+ isCreationAllowed.put(dataTypeSourceView, true);
+ isCreationAllowed.put(dimensionSourceView, false);
+ isCreationAllowed.put(enumerationSourceView, true);
+ isCreationAllowed.put(flowSpecificationSourceView, true);
+ isCreationAllowed.put(interfaceSourceView, true);
+ isCreationAllowed.put(primitiveTypeSourceView, true);
+ isCreationAllowed.put(signalSourceView, true);
+ isCreationAllowed.put(unitSourceView, false);
+ isCreationAllowed.put(valueTypeSourceView, true);
+
+ isCreationAllowed.put(commentSourceView, false);
+ isCreationAllowed.put(commentCNSourceView, false);
+ isCreationAllowed.put(constraintSourceView, false);
+ isCreationAllowed.put(constraintCNSourceView, false);
+ isCreationAllowed.put(instanceSpecSourceView, false);
+ isCreationAllowed.put(instanceSpecCNSourceView, false);
+ isCreationAllowed.put(modelSourceView, false);
+ isCreationAllowed.put(modelCNSourceView, false);
+ isCreationAllowed.put(packageSourceView, false);
+ isCreationAllowed.put(packageCNSourceView, false);
+
+ isCreationAllowed.put(slotSourceView, false);
+
+ isCreationAllowed.put(propertySourceView, false);
+ isCreationAllowed.put(portSourceView, false);
+ isCreationAllowed.put(flowportSourceView, false);
+ isCreationAllowed.put(partSourceView, false);
+ isCreationAllowed.put(referenceSourceView, false);
+ isCreationAllowed.put(valueSourceView, false);
+ isCreationAllowed.put(operationSourceView, false);
+ isCreationAllowed.put(receptionSourceView, false);
+ isCreationAllowed.put(constraintCLNSourceView, false);
+ isCreationAllowed.put(constraintPropertySourceView, false);
+ isCreationAllowed.put(flowPropertySourceView, false);
+ isCreationAllowed.put(enumerationLiteralSourceView, false);
+
+ isCreationAllowed.put(associationSourceView, false);
+
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/association/TestLinkCreationAssociationSharedDirectedFromBlock.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/association/TestLinkCreationAssociationSharedDirectedFromBlock.java
new file mode 100755
index 0000000..c9c8082
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/association/TestLinkCreationAssociationSharedDirectedFromBlock.java
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ * Copyright (c) 2011, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.link.association;
+
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.link.AbstractLinkCreationFromElementTest;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Association creation test (via palette tools).
+ */
+public class TestLinkCreationAssociationSharedDirectedFromBlock extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = blockSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "blockdefinition.tool.association_shared_directed";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+ isCreationAllowed.put(actorTargetView, true);
+ isCreationAllowed.put(actorPartTargetView, false);
+ isCreationAllowed.put(blockTargetView, true);
+ isCreationAllowed.put(constraintBlockTargetView, true);
+ isCreationAllowed.put(dataTypeTargetView, true);
+ isCreationAllowed.put(dimensionTargetView, false);
+ isCreationAllowed.put(enumerationTargetView, true);
+ isCreationAllowed.put(flowSpecificationTargetView, true);
+ isCreationAllowed.put(interfaceTargetView, true);
+ isCreationAllowed.put(primitiveTypeTargetView, true);
+ isCreationAllowed.put(signalTargetView, true);
+ isCreationAllowed.put(unitTargetView, false);
+ isCreationAllowed.put(valueTypeTargetView, true);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, false);
+ isCreationAllowed.put(constraintCNTargetView, false);
+ isCreationAllowed.put(instanceSpecTargetView, false);
+ isCreationAllowed.put(instanceSpecCNTargetView, false);
+ isCreationAllowed.put(modelTargetView, false);
+ isCreationAllowed.put(modelCNTargetView, false);
+ isCreationAllowed.put(packageTargetView, false);
+ isCreationAllowed.put(packageCNTargetView, false);
+
+ isCreationAllowed.put(slotTargetView, false);
+
+ isCreationAllowed.put(propertyTargetView, false);
+ isCreationAllowed.put(portTargetView, false);
+ isCreationAllowed.put(flowportTargetView, false);
+ isCreationAllowed.put(partTargetView, false);
+ isCreationAllowed.put(referenceTargetView, false);
+ isCreationAllowed.put(valueTargetView, false);
+ isCreationAllowed.put(operationTargetView, false);
+ isCreationAllowed.put(receptionTargetView, false);
+ isCreationAllowed.put(constraintCLNTargetView, false);
+ isCreationAllowed.put(constraintPropertyTargetView, false);
+ isCreationAllowed.put(flowPropertyTargetView, false);
+ isCreationAllowed.put(enumerationLiteralTargetView, false);
+
+ isCreationAllowed.put(associationTargetView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/association/TestLinkCreationAssociationSharedForSources.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/association/TestLinkCreationAssociationSharedForSources.java
new file mode 100755
index 0000000..7f812d6
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/association/TestLinkCreationAssociationSharedForSources.java
@@ -0,0 +1,78 @@
+/*****************************************************************************
+ * Copyright (c) 2011, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.link.association;
+
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.link.AbstractLinkCreationForSourcesTest;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Association creation test (via palette tools).
+ */
+public class TestLinkCreationAssociationSharedForSources extends AbstractLinkCreationForSourcesTest {
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "blockdefinition.tool.association_shared";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+ isCreationAllowed.put(actorSourceView, false);
+ isCreationAllowed.put(actorPartSourceView, false);
+ isCreationAllowed.put(blockSourceView, true);
+ isCreationAllowed.put(constraintBlockSourceView, true);
+ isCreationAllowed.put(dataTypeSourceView, true);
+ isCreationAllowed.put(dimensionSourceView, false);
+ isCreationAllowed.put(enumerationSourceView, true);
+ isCreationAllowed.put(flowSpecificationSourceView, true);
+ isCreationAllowed.put(interfaceSourceView, true);
+ isCreationAllowed.put(primitiveTypeSourceView, true);
+ isCreationAllowed.put(signalSourceView, true);
+ isCreationAllowed.put(unitSourceView, false);
+ isCreationAllowed.put(valueTypeSourceView, true);
+
+ isCreationAllowed.put(commentSourceView, false);
+ isCreationAllowed.put(commentCNSourceView, false);
+ isCreationAllowed.put(constraintSourceView, false);
+ isCreationAllowed.put(constraintCNSourceView, false);
+ isCreationAllowed.put(instanceSpecSourceView, false);
+ isCreationAllowed.put(instanceSpecCNSourceView, false);
+ isCreationAllowed.put(modelSourceView, false);
+ isCreationAllowed.put(modelCNSourceView, false);
+ isCreationAllowed.put(packageSourceView, false);
+ isCreationAllowed.put(packageCNSourceView, false);
+
+ isCreationAllowed.put(slotSourceView, false);
+
+ isCreationAllowed.put(propertySourceView, false);
+ isCreationAllowed.put(portSourceView, false);
+ isCreationAllowed.put(flowportSourceView, false);
+ isCreationAllowed.put(partSourceView, false);
+ isCreationAllowed.put(referenceSourceView, false);
+ isCreationAllowed.put(valueSourceView, false);
+ isCreationAllowed.put(operationSourceView, false);
+ isCreationAllowed.put(receptionSourceView, false);
+ isCreationAllowed.put(constraintCLNSourceView, false);
+ isCreationAllowed.put(constraintPropertySourceView, false);
+ isCreationAllowed.put(flowPropertySourceView, false);
+ isCreationAllowed.put(enumerationLiteralSourceView, false);
+
+ isCreationAllowed.put(associationSourceView, false);
+
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/association/TestLinkCreationAssociationSharedFromBlock.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/association/TestLinkCreationAssociationSharedFromBlock.java
new file mode 100755
index 0000000..a6a5b37
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/creation/link/association/TestLinkCreationAssociationSharedFromBlock.java
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ * Copyright (c) 2011, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.link.association;
+
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.link.AbstractLinkCreationFromElementTest;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Association creation test (via palette tools).
+ */
+public class TestLinkCreationAssociationSharedFromBlock extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = blockSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "blockdefinition.tool.association_shared";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+ isCreationAllowed.put(actorTargetView, false);
+ isCreationAllowed.put(actorPartTargetView, false);
+ isCreationAllowed.put(blockTargetView, true);
+ isCreationAllowed.put(constraintBlockTargetView, true);
+ isCreationAllowed.put(dataTypeTargetView, true);
+ isCreationAllowed.put(dimensionTargetView, false);
+ isCreationAllowed.put(enumerationTargetView, true);
+ isCreationAllowed.put(flowSpecificationTargetView, true);
+ isCreationAllowed.put(interfaceTargetView, true);
+ isCreationAllowed.put(primitiveTypeTargetView, true);
+ isCreationAllowed.put(signalTargetView, true);
+ isCreationAllowed.put(unitTargetView, false);
+ isCreationAllowed.put(valueTypeTargetView, true);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, false);
+ isCreationAllowed.put(constraintCNTargetView, false);
+ isCreationAllowed.put(instanceSpecTargetView, false);
+ isCreationAllowed.put(instanceSpecCNTargetView, false);
+ isCreationAllowed.put(modelTargetView, false);
+ isCreationAllowed.put(modelCNTargetView, false);
+ isCreationAllowed.put(packageTargetView, false);
+ isCreationAllowed.put(packageCNTargetView, false);
+
+ isCreationAllowed.put(slotTargetView, false);
+
+ isCreationAllowed.put(propertyTargetView, false);
+ isCreationAllowed.put(portTargetView, false);
+ isCreationAllowed.put(flowportTargetView, false);
+ isCreationAllowed.put(partTargetView, false);
+ isCreationAllowed.put(referenceTargetView, false);
+ isCreationAllowed.put(valueTargetView, false);
+ isCreationAllowed.put(operationTargetView, false);
+ isCreationAllowed.put(receptionTargetView, false);
+ isCreationAllowed.put(constraintCLNTargetView, false);
+ isCreationAllowed.put(constraintPropertyTargetView, false);
+ isCreationAllowed.put(flowPropertyTargetView, false);
+ isCreationAllowed.put(enumerationLiteralTargetView, false);
+
+ isCreationAllowed.put(associationTargetView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/delete/TestLinkBasicDeleteFromDiagram.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/delete/TestLinkBasicDeleteFromDiagram.java
new file mode 100755
index 0000000..8064fda
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/delete/TestLinkBasicDeleteFromDiagram.java
@@ -0,0 +1,134 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.delete;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createLink;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.dropFromModelExplorer;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.deleteView;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Delete test (via palette tools) in diagram.
+ */
+public class TestLinkBasicDeleteFromDiagram extends AbstractTest {
+
+ public static EObject blockSource;
+ public static EObject blockTarget;
+ public static EObject interfaceTarget;
+
+ public static View dependency;
+ public static View usage;
+ public static View interfaceRealization;
+ public static View generalization;
+
+ public static View associationComposite;
+ public static View associationCompositeDirected;
+ public static View associationNone;
+ public static View associationNoneDirected;
+ public static View associationShared;
+ public static View associationSharedDirected;
+
+ @BeforeClass
+ public static void prepare() throws Exception {
+ // Prepare elements for link creation tests
+ blockSource = createGraphicalNode(SysMLElementTypes.BLOCK, SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_CLASSIFIER_ID, getDiagramView()).getElement();
+ blockTarget = createGraphicalNode(SysMLElementTypes.BLOCK, SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_CLASSIFIER_ID, getDiagramView()).getElement();
+ interfaceTarget = createGraphicalNode(UMLElementTypes.INTERFACE, UMLGraphicalTypes.SHAPE_UML_INTERFACE_AS_CLASSIFIER_ID, getDiagramView()).getElement();
+
+ EObject tmp = null;
+
+ tmp = createLink(UMLElementTypes.DEPENDENCY, blockSource, blockTarget);
+ dependency = dropFromModelExplorer(tmp, getDiagramView());
+ tmp = createLink(UMLElementTypes.USAGE, blockSource, blockTarget);
+ usage = dropFromModelExplorer(tmp, getDiagramView());
+ tmp = createLink(UMLElementTypes.INTERFACE_REALIZATION, blockSource, interfaceTarget);
+ interfaceRealization = dropFromModelExplorer(tmp, getDiagramView());
+ tmp = createLink(UMLElementTypes.GENERALIZATION, blockSource, blockTarget);
+ generalization = dropFromModelExplorer(tmp, getDiagramView());
+ tmp = createLink(SysMLElementTypes.ASSOCIATION_COMPOSITE, blockSource, blockTarget);
+ associationComposite = dropFromModelExplorer(tmp, getDiagramView());
+ tmp = createLink(SysMLElementTypes.ASSOCIATION_COMPOSITE_DIRECTED, blockSource, blockTarget);
+ associationCompositeDirected = dropFromModelExplorer(tmp, getDiagramView());
+ tmp = createLink(SysMLElementTypes.ASSOCIATION_NONE, blockSource, blockTarget);
+ associationNone = dropFromModelExplorer(tmp, getDiagramView());
+ tmp = createLink(SysMLElementTypes.ASSOCIATION_NONE_DIRECTED, blockSource, blockTarget);
+ associationNoneDirected = dropFromModelExplorer(tmp, getDiagramView());
+ tmp = createLink(SysMLElementTypes.ASSOCIATION_SHARED, blockSource, blockTarget);
+ associationShared = dropFromModelExplorer(tmp, getDiagramView());
+ tmp = createLink(SysMLElementTypes.ASSOCIATION_SHARED_DIRECTED, blockSource, blockTarget);
+ associationSharedDirected = dropFromModelExplorer(tmp, getDiagramView());
+ }
+
+ @Test
+ public void testBasicDeleteFromModelDependency() throws Exception {
+ deleteView(dependency, true);
+ }
+
+ @Test
+ public void testBasicDeleteFromModelUsage() throws Exception {
+ deleteView(usage, true);
+ }
+
+ @Test
+ public void testBasicDeleteFromModelInterfaceRealization() throws Exception {
+ deleteView(interfaceRealization, true);
+ }
+
+ @Test
+ public void testBasicDeleteFromModelGeneralization() throws Exception {
+ deleteView(generalization, true);
+ }
+
+ @Test
+ public void testBasicDeleteFromModelAssociationComposite() throws Exception {
+ deleteView(associationComposite, true);
+ }
+
+ @Test
+ public void testBasicDeleteFromModelAssociationCompositeDirected() throws Exception {
+ deleteView(associationCompositeDirected, true);
+ }
+
+ @Test
+ public void testBasicDeleteFromModelAssociationNone() throws Exception {
+ deleteView(associationNone, true);
+ }
+
+ @Test
+ public void testBasicDeleteFromModelAssociationNoneDirected() throws Exception {
+ deleteView(associationNoneDirected, true);
+ }
+
+ @Test
+ public void testBasicDeleteFromModelAssociationShared() throws Exception {
+ deleteView(associationShared, true);
+ }
+
+ @Test
+ public void testBasicDeleteFromModelAssociationSharedDirected() throws Exception {
+ deleteView(associationSharedDirected, true);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/delete/TestLinkBasicDeleteFromModel.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/delete/TestLinkBasicDeleteFromModel.java
new file mode 100755
index 0000000..f5c2c13
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/delete/TestLinkBasicDeleteFromModel.java
@@ -0,0 +1,134 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.delete;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createLink;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.dropFromModelExplorer;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.deleteElement;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for link element Delete test (via palette tools) in diagram.
+ */
+public class TestLinkBasicDeleteFromModel extends AbstractTest {
+
+ public static EObject blockSource;
+ public static EObject blockTarget;
+ public static EObject interfaceTarget;
+
+ public static View dependency;
+ public static View usage;
+ public static View interfaceRealization;
+ public static View generalization;
+
+ public static View associationComposite;
+ public static View associationCompositeDirected;
+ public static View associationNone;
+ public static View associationNoneDirected;
+ public static View associationShared;
+ public static View associationSharedDirected;
+
+ @BeforeClass
+ public static void prepare() throws Exception {
+ // Prepare elements for link creation tests
+ blockSource = createGraphicalNode(SysMLElementTypes.BLOCK, SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_CLASSIFIER_ID, getDiagramView()).getElement();
+ blockTarget = createGraphicalNode(SysMLElementTypes.BLOCK, SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_CLASSIFIER_ID, getDiagramView()).getElement();
+ interfaceTarget = createGraphicalNode(UMLElementTypes.INTERFACE, UMLGraphicalTypes.SHAPE_UML_INTERFACE_AS_CLASSIFIER_ID, getDiagramView()).getElement();
+
+ EObject tmp = null;
+
+ tmp = createLink(UMLElementTypes.DEPENDENCY, blockSource, blockTarget);
+ dependency = dropFromModelExplorer(tmp, getDiagramView());
+ tmp = createLink(UMLElementTypes.USAGE, blockSource, blockTarget);
+ usage = dropFromModelExplorer(tmp, getDiagramView());
+ tmp = createLink(UMLElementTypes.INTERFACE_REALIZATION, blockSource, interfaceTarget);
+ interfaceRealization = dropFromModelExplorer(tmp, getDiagramView());
+ tmp = createLink(UMLElementTypes.GENERALIZATION, blockSource, blockTarget);
+ generalization = dropFromModelExplorer(tmp, getDiagramView());
+ tmp = createLink(SysMLElementTypes.ASSOCIATION_COMPOSITE, blockSource, blockTarget);
+ associationComposite = dropFromModelExplorer(tmp, getDiagramView());
+ tmp = createLink(SysMLElementTypes.ASSOCIATION_COMPOSITE_DIRECTED, blockSource, blockTarget);
+ associationCompositeDirected = dropFromModelExplorer(tmp, getDiagramView());
+ tmp = createLink(SysMLElementTypes.ASSOCIATION_NONE, blockSource, blockTarget);
+ associationNone = dropFromModelExplorer(tmp, getDiagramView());
+ tmp = createLink(SysMLElementTypes.ASSOCIATION_NONE_DIRECTED, blockSource, blockTarget);
+ associationNoneDirected = dropFromModelExplorer(tmp, getDiagramView());
+ tmp = createLink(SysMLElementTypes.ASSOCIATION_SHARED, blockSource, blockTarget);
+ associationShared = dropFromModelExplorer(tmp, getDiagramView());
+ tmp = createLink(SysMLElementTypes.ASSOCIATION_SHARED_DIRECTED, blockSource, blockTarget);
+ associationSharedDirected = dropFromModelExplorer(tmp, getDiagramView());
+ }
+
+ @Test
+ public void testBasicDeleteFromModelDependency() throws Exception {
+ deleteElement(dependency, true);
+ }
+
+ @Test
+ public void testBasicDeleteFromModelUsage() throws Exception {
+ deleteElement(usage, true);
+ }
+
+ @Test
+ public void testBasicDeleteFromModelInterfaceRealization() throws Exception {
+ deleteElement(interfaceRealization, true);
+ }
+
+ @Test
+ public void testBasicDeleteFromModelGeneralization() throws Exception {
+ deleteElement(generalization, true);
+ }
+
+ @Test
+ public void testBasicDeleteFromModelAssociationComposite() throws Exception {
+ deleteElement(associationComposite, true);
+ }
+
+ @Test
+ public void testBasicDeleteFromModelAssociationCompositeDirected() throws Exception {
+ deleteElement(associationCompositeDirected, true);
+ }
+
+ @Test
+ public void testBasicDeleteFromModelAssociationNone() throws Exception {
+ deleteElement(associationNone, true);
+ }
+
+ @Test
+ public void testBasicDeleteFromModelAssociationNoneDirected() throws Exception {
+ deleteElement(associationNoneDirected, true);
+ }
+
+ @Test
+ public void testBasicDeleteFromModelAssociationShared() throws Exception {
+ deleteElement(associationShared, true);
+ }
+
+ @Test
+ public void testBasicDeleteFromModelAssociationSharedDirected() throws Exception {
+ deleteElement(associationSharedDirected, true);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/delete/TestNodeBasicDeleteFromDiagram.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/delete/TestNodeBasicDeleteFromDiagram.java
new file mode 100755
index 0000000..00da68c
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/delete/TestNodeBasicDeleteFromDiagram.java
@@ -0,0 +1,223 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.delete;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.dropFromModelExplorer;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.deleteView;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Delete test (via palette tools) in diagram.
+ */
+public class TestNodeBasicDeleteFromDiagram extends AbstractTest {
+
+ @Test
+ public void testBasicDeleteFromDiagramActor() throws Exception {
+ deleteView(UMLElementTypes.ACTOR, getDiagramView(), true);
+ }
+
+ @Test
+ public void testBasicDeleteFromDiagramActorPart() throws Exception {
+ View intermediateContainer = dropFromModelExplorer(SysMLElementTypes.BLOCK, getDiagramView());
+ View compartment = ViewUtil.getChildBySemanticHint(intermediateContainer, SysMLGraphicalTypes.COMPARTMENT_SYSML_PROPERTY_AS_LIST_ID);
+ View testedView = dropFromModelExplorer(SysMLElementTypes.ACTOR_PART_PROPERTY, compartment);
+ deleteView(testedView, true);
+ }
+
+ @Test
+ public void testBasicDeleteFromDiagramBlock() throws Exception {
+ deleteView(SysMLElementTypes.BLOCK, getDiagramView(), true);
+ }
+
+ @Test
+ public void testBasicDeleteFromDiagramComment() throws Exception {
+ deleteView(UMLElementTypes.COMMENT, getDiagramView(), true);
+ }
+
+ @Test
+ public void testBasicDeleteFromDiagramConstraintBlock() throws Exception {
+ deleteView(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView(), true);
+ }
+
+ @Test
+ public void testBasicDeleteFromDiagramConstraint() throws Exception {
+ deleteView(UMLElementTypes.CONSTRAINT, getDiagramView(), true);
+ }
+
+ @Test
+ public void testBasicDeleteFromDiagramConstraintProperty() throws Exception {
+ View intermediateContainer = dropFromModelExplorer(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ View compartment = ViewUtil.getChildBySemanticHint(intermediateContainer, SysMLGraphicalTypes.COMPARTMENT_SYSML_CONSTRAINT_AS_LIST_ID);
+ View testedView = dropFromModelExplorer(SysMLElementTypes.CONSTRAINT_PROPERTY, compartment);
+ deleteView(testedView, true);
+ }
+
+ @Test
+ public void testBasicDeleteFromDiagramDataType() throws Exception {
+ deleteView(UMLElementTypes.DATA_TYPE, getDiagramView(), true);
+ }
+
+ @Test
+ public void testBasicDeleteFromDiagramDimension() throws Exception {
+ deleteView(SysMLElementTypes.DIMENSION, getDiagramView(), true);
+ }
+
+ @Test
+ public void testBasicDeleteFromDiagramEnumeration() throws Exception {
+ deleteView(UMLElementTypes.ENUMERATION, getDiagramView(), true);
+ }
+
+ @Test
+ public void testBasicDeleteFromDiagramEnumerationLiteral() throws Exception {
+ View intermediateContainer = dropFromModelExplorer(UMLElementTypes.ENUMERATION, getDiagramView());
+ View compartment = ViewUtil.getChildBySemanticHint(intermediateContainer, UMLGraphicalTypes.COMPARTMENT_UML_ENUMERATIONLITERAL_AS_LIST_ID);
+ View testedView = dropFromModelExplorer(UMLElementTypes.ENUMERATION_LITERAL, compartment);
+ deleteView(testedView, true);
+ }
+
+ @Test
+ public void testBasicDeleteFromDiagramFlowPort() throws Exception {
+ View intermediateContainer = dropFromModelExplorer(SysMLElementTypes.BLOCK, getDiagramView());
+ View compartment = ViewUtil.getChildBySemanticHint(intermediateContainer, SysMLGraphicalTypes.COMPARTMENT_SYSML_PROPERTY_AS_LIST_ID);
+ View testedView = dropFromModelExplorer(SysMLElementTypes.FLOW_PORT, compartment);
+ deleteView(testedView, true);
+ }
+
+ @Test
+ public void testBasicDeleteFromDiagramFlowProperty() throws Exception {
+ View intermediateContainer = dropFromModelExplorer(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ View compartment = ViewUtil.getChildBySemanticHint(intermediateContainer, SysMLGraphicalTypes.COMPARTMENT_SYSML_FLOWPROPERTY_AS_LIST_ID);
+ View testedView = dropFromModelExplorer(SysMLElementTypes.FLOW_PROPERTY, compartment);
+ deleteView(testedView, true);
+ }
+
+ @Test
+ public void testBasicDeleteFromDiagramFlowSpecification() throws Exception {
+ deleteView(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView(), true);
+ }
+
+ @Test
+ public void testBasicDeleteFromDiagramInstanceSpecification() throws Exception {
+ deleteView(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView(), true);
+ }
+
+ @Test
+ public void testBasicDeleteFromDiagramInterface() throws Exception {
+ deleteView(UMLElementTypes.INTERFACE, getDiagramView(), true);
+ }
+
+ @Test
+ public void testBasicDeleteFromDiagramModel() throws Exception {
+ deleteView(UMLElementTypes.MODEL, getDiagramView(), true);
+ }
+
+ @Test
+ public void testBasicDeleteFromDiagramOperation() throws Exception {
+ View intermediateContainer = dropFromModelExplorer(SysMLElementTypes.BLOCK, getDiagramView());
+ View compartment = ViewUtil.getChildBySemanticHint(intermediateContainer, UMLGraphicalTypes.COMPARTMENT_UML_OPERATION_AS_LIST_ID);
+ View testedView = dropFromModelExplorer(UMLElementTypes.OPERATION, compartment);
+ deleteView(testedView, true);
+ }
+
+ @Test
+ public void testBasicDeleteFromDiagramPackage() throws Exception {
+ deleteView(UMLElementTypes.PACKAGE, getDiagramView(), true);
+ }
+
+ @Test
+ public void testBasicDeleteFromDiagramPart() throws Exception {
+ View intermediateContainer = dropFromModelExplorer(SysMLElementTypes.BLOCK, getDiagramView());
+ View compartment = ViewUtil.getChildBySemanticHint(intermediateContainer, SysMLGraphicalTypes.COMPARTMENT_SYSML_PROPERTY_AS_LIST_ID);
+ View testedView = dropFromModelExplorer(SysMLElementTypes.PART_PROPERTY, compartment);
+ deleteView(testedView, true);
+ }
+
+ @Test
+ public void testBasicDeleteFromDiagramPort() throws Exception {
+ View intermediateContainer = dropFromModelExplorer(SysMLElementTypes.BLOCK, getDiagramView());
+ View compartment = ViewUtil.getChildBySemanticHint(intermediateContainer, SysMLGraphicalTypes.COMPARTMENT_SYSML_PROPERTY_AS_LIST_ID);
+ View testedView = dropFromModelExplorer(UMLElementTypes.PORT, compartment);
+ deleteView(testedView, true);
+ }
+
+ @Test
+ public void testBasicDeleteFromDiagramPrimitiveType() throws Exception {
+ deleteView(UMLElementTypes.PRIMITIVE_TYPE, getDiagramView(), true);
+ }
+
+ @Test
+ public void testBasicDeleteFromDiagramProperty() throws Exception {
+ View intermediateContainer = dropFromModelExplorer(UMLElementTypes.INTERFACE, getDiagramView());
+ View compartment = ViewUtil.getChildBySemanticHint(intermediateContainer, UMLGraphicalTypes.COMPARTMENT_UML_PROPERTY_AS_LIST_ID);
+ View testedView = dropFromModelExplorer(UMLElementTypes.PROPERTY, compartment);
+ deleteView(testedView, true);
+ }
+
+ @Test
+ public void testBasicDeleteFromDiagramReception() throws Exception {
+ View intermediateContainer = dropFromModelExplorer(SysMLElementTypes.BLOCK, getDiagramView());
+ View compartment = ViewUtil.getChildBySemanticHint(intermediateContainer, UMLGraphicalTypes.COMPARTMENT_UML_OPERATION_AS_LIST_ID);
+ View droppedElement = dropFromModelExplorer(UMLElementTypes.RECEPTION, compartment);
+ deleteView(droppedElement, true);
+ }
+
+ @Test
+ public void testBasicDeleteFromDiagramReference() throws Exception {
+ View intermediateContainer = dropFromModelExplorer(SysMLElementTypes.BLOCK, getDiagramView());
+ View compartment = ViewUtil.getChildBySemanticHint(intermediateContainer, SysMLGraphicalTypes.COMPARTMENT_SYSML_PROPERTY_AS_LIST_ID);
+ View testedView = dropFromModelExplorer(SysMLElementTypes.REFERENCE_PROPERTY, compartment);
+ deleteView(testedView, true);
+ }
+
+ @Test
+ public void testBasicDeleteFromDiagramSignal() throws Exception {
+ deleteView(UMLElementTypes.SIGNAL, getDiagramView(), true);
+ }
+
+ @Test
+ public void testBasicDeleteFromDiagramSlot() throws Exception {
+ View intermediateContainer = dropFromModelExplorer(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ View compartment = ViewUtil.getChildBySemanticHint(intermediateContainer, ElementTypes.INSTANCE_SPECIFICATION_COMPARTMENT_SLOT_HINT);
+ View testedView = dropFromModelExplorer(UMLElementTypes.SLOT, compartment);
+ deleteView(testedView, true);
+ }
+
+ @Test
+ public void testBasicDeleteFromDiagramUnit() throws Exception {
+ deleteView(SysMLElementTypes.UNIT, getDiagramView(), true);
+ }
+
+ @Test
+ public void testBasicDeleteFromDiagramValue() throws Exception {
+ View intermediateContainer = dropFromModelExplorer(SysMLElementTypes.BLOCK, getDiagramView());
+ View compartment = ViewUtil.getChildBySemanticHint(intermediateContainer, SysMLGraphicalTypes.COMPARTMENT_SYSML_PROPERTY_AS_LIST_ID);
+ View testedView = dropFromModelExplorer(SysMLElementTypes.VALUE_PROPERTY, compartment);
+ deleteView(testedView, true);
+ }
+
+ @Test
+ public void testBasicDeleteFromDiagramValueType() throws Exception {
+ deleteView(SysMLElementTypes.VALUE_TYPE, getDiagramView(), true);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/delete/TestNodeBasicDeleteFromModel.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/delete/TestNodeBasicDeleteFromModel.java
new file mode 100755
index 0000000..65760e4
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/delete/TestNodeBasicDeleteFromModel.java
@@ -0,0 +1,223 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.delete;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.dropFromModelExplorer;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.deleteElement;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Delete test (via palette tools) in diagram.
+ */
+public class TestNodeBasicDeleteFromModel extends AbstractTest {
+
+ @Test
+ public void testBasicDeleteFromModelActor() throws Exception {
+ deleteElement(UMLElementTypes.ACTOR, getDiagramView(), true);
+ }
+
+ @Test
+ public void testBasicDeleteFromDiagramActorPart() throws Exception {
+ View intermediateContainer = dropFromModelExplorer(SysMLElementTypes.BLOCK, getDiagramView());
+ View compartment = ViewUtil.getChildBySemanticHint(intermediateContainer, SysMLGraphicalTypes.COMPARTMENT_SYSML_PROPERTY_AS_LIST_ID);
+ View testedView = dropFromModelExplorer(SysMLElementTypes.ACTOR_PART_PROPERTY, compartment);
+ deleteElement(testedView, true);
+ }
+
+ @Test
+ public void testBasicDeleteFromModelBlock() throws Exception {
+ deleteElement(SysMLElementTypes.BLOCK, getDiagramView(), true);
+ }
+
+ @Test
+ public void testBasicDeleteFromModelComment() throws Exception {
+ deleteElement(UMLElementTypes.COMMENT, getDiagramView(), true);
+ }
+
+ @Test
+ public void testBasicDeleteFromModelConstraintBlock() throws Exception {
+ deleteElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView(), true);
+ }
+
+ @Test
+ public void testBasicDeleteFromModelConstraint() throws Exception {
+ deleteElement(UMLElementTypes.CONSTRAINT, getDiagramView(), true);
+ }
+
+ @Test
+ public void testBasicDeleteFromModelConstraintProperty() throws Exception {
+ View intermediateContainer = dropFromModelExplorer(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ View compartment = ViewUtil.getChildBySemanticHint(intermediateContainer, SysMLGraphicalTypes.COMPARTMENT_SYSML_CONSTRAINT_AS_LIST_ID);
+ View testedView = dropFromModelExplorer(SysMLElementTypes.CONSTRAINT_PROPERTY, compartment);
+ deleteElement(testedView, true);
+ }
+
+ @Test
+ public void testBasicDeleteFromModelDataType() throws Exception {
+ deleteElement(UMLElementTypes.DATA_TYPE, getDiagramView(), true);
+ }
+
+ @Test
+ public void testBasicDeleteFromModelDimension() throws Exception {
+ deleteElement(SysMLElementTypes.DIMENSION, getDiagramView(), true);
+ }
+
+ @Test
+ public void testBasicDeleteFromModelEnumeration() throws Exception {
+ deleteElement(UMLElementTypes.ENUMERATION, getDiagramView(), true);
+ }
+
+ @Test
+ public void testBasicDeleteFromModelEnumerationLiteral() throws Exception {
+ View intermediateContainer = dropFromModelExplorer(UMLElementTypes.ENUMERATION, getDiagramView());
+ View compartment = ViewUtil.getChildBySemanticHint(intermediateContainer, UMLGraphicalTypes.COMPARTMENT_UML_ENUMERATIONLITERAL_AS_LIST_ID);
+ View testedView = dropFromModelExplorer(UMLElementTypes.ENUMERATION_LITERAL, compartment);
+ deleteElement(testedView, true);
+ }
+
+ @Test
+ public void testBasicDeleteFromModelFlowPort() throws Exception {
+ View intermediateContainer = dropFromModelExplorer(SysMLElementTypes.BLOCK, getDiagramView());
+ View compartment = ViewUtil.getChildBySemanticHint(intermediateContainer, SysMLGraphicalTypes.COMPARTMENT_SYSML_PROPERTY_AS_LIST_ID);
+ View testedView = dropFromModelExplorer(SysMLElementTypes.FLOW_PORT, compartment);
+ deleteElement(testedView, true);
+ }
+
+ @Test
+ public void testBasicDeleteFromModelFlowProperty() throws Exception {
+ View intermediateContainer = dropFromModelExplorer(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ View compartment = ViewUtil.getChildBySemanticHint(intermediateContainer, SysMLGraphicalTypes.COMPARTMENT_SYSML_FLOWPROPERTY_AS_LIST_ID);
+ View testedView = dropFromModelExplorer(SysMLElementTypes.FLOW_PROPERTY, compartment);
+ deleteElement(testedView, true);
+ }
+
+ @Test
+ public void testBasicDeleteFromModelFlowSpecification() throws Exception {
+ deleteElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView(), true);
+ }
+
+ @Test
+ public void testBasicDeleteFromModelInstanceSpecification() throws Exception {
+ deleteElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView(), true);
+ }
+
+ @Test
+ public void testBasicDeleteFromModelInterface() throws Exception {
+ deleteElement(UMLElementTypes.INTERFACE, getDiagramView(), true);
+ }
+
+ @Test
+ public void testBasicDeleteFromModelModel() throws Exception {
+ deleteElement(UMLElementTypes.MODEL, getDiagramView(), true);
+ }
+
+ @Test
+ public void testBasicDeleteFromModelOperation() throws Exception {
+ View intermediateContainer = dropFromModelExplorer(SysMLElementTypes.BLOCK, getDiagramView());
+ View compartment = ViewUtil.getChildBySemanticHint(intermediateContainer, UMLGraphicalTypes.COMPARTMENT_UML_OPERATION_AS_LIST_ID);
+ View testedView = dropFromModelExplorer(UMLElementTypes.OPERATION, compartment);
+ deleteElement(testedView, true);
+ }
+
+ @Test
+ public void testBasicDeleteFromModelPackage() throws Exception {
+ deleteElement(UMLElementTypes.PACKAGE, getDiagramView(), true);
+ }
+
+ @Test
+ public void testBasicDeleteFromModelPart() throws Exception {
+ View intermediateContainer = dropFromModelExplorer(SysMLElementTypes.BLOCK, getDiagramView());
+ View compartment = ViewUtil.getChildBySemanticHint(intermediateContainer, SysMLGraphicalTypes.COMPARTMENT_SYSML_PROPERTY_AS_LIST_ID);
+ View testedView = dropFromModelExplorer(SysMLElementTypes.PART_PROPERTY, compartment);
+ deleteElement(testedView, true);
+ }
+
+ @Test
+ public void testBasicDeleteFromModelPort() throws Exception {
+ View intermediateContainer = dropFromModelExplorer(SysMLElementTypes.BLOCK, getDiagramView());
+ View compartment = ViewUtil.getChildBySemanticHint(intermediateContainer, SysMLGraphicalTypes.COMPARTMENT_SYSML_PROPERTY_AS_LIST_ID);
+ View testedView = dropFromModelExplorer(UMLElementTypes.PORT, compartment);
+ deleteElement(testedView, true);
+ }
+
+ @Test
+ public void testBasicDeleteFromModelPrimitiveType() throws Exception {
+ deleteElement(UMLElementTypes.PRIMITIVE_TYPE, getDiagramView(), true);
+ }
+
+ @Test
+ public void testBasicDeleteFromModelProperty() throws Exception {
+ View intermediateContainer = dropFromModelExplorer(UMLElementTypes.INTERFACE, getDiagramView());
+ View compartment = ViewUtil.getChildBySemanticHint(intermediateContainer, UMLGraphicalTypes.COMPARTMENT_UML_PROPERTY_AS_LIST_ID);
+ View testedView = dropFromModelExplorer(UMLElementTypes.PROPERTY, compartment);
+ deleteElement(testedView, true);
+ }
+
+ @Test
+ public void testBasicDeleteFromModelReception() throws Exception {
+ View intermediateContainer = dropFromModelExplorer(SysMLElementTypes.BLOCK, getDiagramView());
+ View compartment = ViewUtil.getChildBySemanticHint(intermediateContainer, UMLGraphicalTypes.COMPARTMENT_UML_OPERATION_AS_LIST_ID);
+ View droppedElement = dropFromModelExplorer(UMLElementTypes.RECEPTION, compartment);
+ deleteElement(droppedElement, true);
+ }
+
+ @Test
+ public void testBasicDeleteFromModelReference() throws Exception {
+ View intermediateContainer = dropFromModelExplorer(SysMLElementTypes.BLOCK, getDiagramView());
+ View compartment = ViewUtil.getChildBySemanticHint(intermediateContainer, SysMLGraphicalTypes.COMPARTMENT_SYSML_PROPERTY_AS_LIST_ID);
+ View testedView = dropFromModelExplorer(SysMLElementTypes.REFERENCE_PROPERTY, compartment);
+ deleteElement(testedView, true);
+ }
+
+ @Test
+ public void testBasicDeleteFromModelSignal() throws Exception {
+ deleteElement(UMLElementTypes.SIGNAL, getDiagramView(), true);
+ }
+
+ @Test
+ public void testBasicDeleteFromModelSlot() throws Exception {
+ View intermediateContainer = dropFromModelExplorer(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ View compartment = ViewUtil.getChildBySemanticHint(intermediateContainer, ElementTypes.INSTANCE_SPECIFICATION_COMPARTMENT_SLOT_HINT);
+ View testedView = dropFromModelExplorer(UMLElementTypes.SLOT, compartment);
+ deleteElement(testedView, true);
+ }
+
+ @Test
+ public void testBasicDeleteFromModelUnit() throws Exception {
+ deleteElement(SysMLElementTypes.UNIT, getDiagramView(), true);
+ }
+
+ @Test
+ public void testBasicDeleteFromModelValue() throws Exception {
+ View intermediateContainer = dropFromModelExplorer(SysMLElementTypes.BLOCK, getDiagramView());
+ View compartment = ViewUtil.getChildBySemanticHint(intermediateContainer, SysMLGraphicalTypes.COMPARTMENT_SYSML_PROPERTY_AS_LIST_ID);
+ View testedView = dropFromModelExplorer(SysMLElementTypes.VALUE_PROPERTY, compartment);
+ deleteElement(testedView, true);
+ }
+
+ @Test
+ public void testBasicDeleteFromModelValueType() throws Exception {
+ deleteElement(SysMLElementTypes.VALUE_TYPE, getDiagramView(), true);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/Bug481317_MoveGeneralizationTest.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/Bug481317_MoveGeneralizationTest.java
new file mode 100755
index 0000000..b999bed
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/Bug481317_MoveGeneralizationTest.java
@@ -0,0 +1,309 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd;
+
+import static org.hamcrest.CoreMatchers.instanceOf;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.assertTrue;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.emf.common.command.CommandStack;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.emf.type.core.requests.MoveRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.gmf.runtime.notation.impl.NodeImpl;
+import org.eclipse.gmf.runtime.notation.impl.ShapeImpl;
+import org.eclipse.papyrus.infra.emf.gmf.command.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.DiagramUtils;
+import org.eclipse.papyrus.junit.utils.rules.PapyrusEditorFixture;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.BlockEditPart;
+import org.eclipse.uml2.uml.Classifier;
+import org.eclipse.uml2.uml.Generalization;
+import org.eclipse.uml2.uml.Property;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+/**
+ *
+ * Used to test the deletion of the inherited property when a generalization is moved.
+ *
+ */
+@PluginResource("/resources/bugs/Bug481317_BDD/sysml.di")
+public class Bug481317_MoveGeneralizationTest extends AbstractPapyrusTest {
+
+ /** The name of the containing block of the property. */
+ private static final String NAME_BLOCK_1 = "Block1"; //$NON-NLS-1$
+ /** The name of the source block of the generalization. */
+ private static final String NAME_BLOCK_2 = "Block2"; //$NON-NLS-1$
+ /** The name of the target block of the generalization. */
+ private static final String NAME_BLOCK_3 = "Block3"; //$NON-NLS-1$
+ /** The name of the diagram used for testing. */
+ private static final String NAME_DIAGRAM = "Block Definition Diagram"; //$NON-NLS-1$
+
+ /** The Papyrus editor fixture. */
+ @Rule
+ public PapyrusEditorFixture papyrusEditorFixture = new PapyrusEditorFixture();
+
+ /** The target Block edit part. */
+ private EditPart targetBlockEditPart = null;
+
+ /** The generalization to move. */
+ private Generalization generalizationToMove = null;
+
+ /** The property to check the deletion. */
+ private Property property = null;
+
+ /** The source Block edit part */
+ private EditPart generalizationSourceBlockEditPart = null;
+
+ /** The diagram. */
+ private Diagram diagram = null;
+
+ @Before
+ public void init() {
+ diagram = DiagramUtils.getNotationDiagram(papyrusEditorFixture.getModelSet(), NAME_DIAGRAM);
+ assertNotNull(diagram);
+
+ papyrusEditorFixture.getPageManager().openPage(diagram);
+ papyrusEditorFixture.flushDisplayEvents();
+
+ // The target block of the generalization
+ targetBlockEditPart = getEditPart(NAME_BLOCK_3);
+ assertTrue("The Edit Part must be a BlockEditPart", targetBlockEditPart instanceof BlockEditPart); //$NON-NLS-1$
+
+ // The source block of the generalization
+ generalizationSourceBlockEditPart = getEditPart(NAME_BLOCK_2);
+ assertTrue("The Edit Part must be a BlockEditPart", generalizationSourceBlockEditPart instanceof BlockEditPart); //$NON-NLS-1$
+
+ Object sourceModel = generalizationSourceBlockEditPart.getModel();
+ if (sourceModel instanceof ShapeImpl) {
+ EObject sourceElement = ((ShapeImpl) sourceModel).getElement();
+ assertTrue("The element must be a Classifier", sourceElement instanceof Classifier);//$NON-NLS-1$
+
+ EList<Generalization> generalizations = ((Classifier) sourceElement).getGeneralizations();
+ assertTrue(generalizations.size() >= 1);
+
+ generalizationToMove = generalizations.get(0);
+ }
+
+ // The edit part of the block which contained the property (Block1)
+ EditPart propertyBlockEditPart = getEditPart(NAME_BLOCK_1); // The source block of the property
+ assertTrue("The Edit Part must be a BlockEditPart", propertyBlockEditPart instanceof BlockEditPart); //$NON-NLS-1$
+
+ Object propertyBlockModel = propertyBlockEditPart.getModel();
+ if (propertyBlockModel instanceof ShapeImpl) {
+ EObject propertyBlockElement = ((ShapeImpl) propertyBlockModel).getElement();
+
+ // Checks that the element is a Block and gets all its attributes
+ assertTrue("The Element must be a Classifier", propertyBlockElement instanceof Classifier);//$NON-NLS-1$
+ EList<Property> properties = ((Classifier) propertyBlockElement).getAttributes();
+
+ assertTrue(properties.size() >= 1);
+ property = properties.get(0);
+ }
+ }
+
+ /**
+ * Tests if the property is referenced on the block on the diagram.
+ */
+ @Test
+ public void testPropertyReference() {
+ // Get views of the property, must be null.
+ View propertyView = getDiagramViewProperty(property, NAME_BLOCK_2);
+ assertNotNull(propertyView);
+ }
+
+ /**
+ * Tests of the move of a generalization (Block2 to Block3) to delete the referencing view of the property (prop1).
+ */
+ @Test
+ public void testMoveGeneralization() {
+ List<EObject> elements = new ArrayList<EObject>();
+ elements.add(generalizationToMove);
+
+ // Retrieve the command to move the generalization.
+ ICommand command = getCommandMovedElements(elements);
+ assertNotNull(command);
+
+ // Moved the generalization
+ getCommandStack().execute(new GMFtoEMFCommandWrapper(command));
+
+ // Get the views, the property view on the must be deleted
+ View propertyView = getDiagramViewProperty(property, NAME_BLOCK_2);
+ assertNull(propertyView);
+
+ getCommandStack().undo();
+
+ // After the undo command, the property view must be NOT null
+ propertyView = getDiagramViewProperty(property, NAME_BLOCK_2);
+ assertNotNull(propertyView);
+
+ getCommandStack().redo();
+
+ // After the redo command, the property view must be null
+ propertyView = getDiagramViewProperty(property, NAME_BLOCK_2);
+ assertNull(propertyView);
+ }
+
+
+ /**
+ * This creates the command to move the Elements.
+ *
+ * @param elementsToMove
+ * The list of the elements to move.
+ * @return The command to move the elements.
+ */
+ private ICommand getCommandMovedElements(final List<EObject> elementsToMove) {
+ ICommand command = null;
+
+ final Object modelTarget = targetBlockEditPart.getModel();
+ assertThat(modelTarget, instanceOf(NodeImpl.class));
+
+ final EObject elementTarget = ((NodeImpl) modelTarget).getElement();
+ assertNotNull(elementTarget);
+
+ final MoveRequest moveRequest = new MoveRequest(elementTarget, elementsToMove);
+ final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(elementTarget);
+
+ assertNotNull(provider);
+
+ // Retrieve delete command from the Element Edit service
+ command = provider.getEditCommand(moveRequest);
+
+ return command;
+ }
+
+
+ /**
+ * Gets the command stack.
+ *
+ * @return the command stack
+ */
+ private CommandStack getCommandStack() {
+ return papyrusEditorFixture.getEditingDomain().getCommandStack();
+ }
+
+ /**
+ * Gets the edit part.
+ *
+ * @param semanticElement
+ * the semantic element
+ * @return The edit part
+ */
+ private EditPart getEditPart(final String semanticElement) {
+ final View diagramView = getDiagramView(semanticElement);
+ assertNotNull(diagramView);
+
+ final IGraphicalEditPart semanticEP = DiagramUtils.findEditPartforView(papyrusEditorFixture.getEditor(), diagramView, IGraphicalEditPart.class);
+ assertNotNull(semanticEP);
+
+ return semanticEP;
+ }
+
+ /**
+ * Gets view of the semantic element.
+ *
+ * @param semanticElement
+ * The name of the semantic element.
+ * @return A corresponding view of the semantic element.
+ */
+ private View getDiagramView(final String semanticElement) {
+ View diagramView = DiagramUtils.findShape(diagram, semanticElement);
+ if (diagramView == null) {
+ diagramView = DiagramUtils.findEdge(diagram, semanticElement);
+ }
+ if (diagramView == null) {
+ Iterator<?> iterator = diagram.eAllContents();
+ while (null == diagramView && iterator.hasNext()) {
+ final Object object = iterator.next();
+ if (object instanceof View) {
+ diagramView = DiagramUtils.findShape((View) object, semanticElement);
+ if (diagramView == null) {
+ diagramView = DiagramUtils.findEdge((View) object, semanticElement);
+ }
+ }
+ }
+ }
+
+ return diagramView;
+ }
+
+ /**
+ * Gets view of a property on the diagram and on a block.
+ *
+ * @param property
+ * The property.
+ * @param blockNameReference
+ * The name of the class in which the property reference must be.
+ * @return A corresponding view of the property.
+ */
+ private View getDiagramViewProperty(final Property property, final String blockNameReference) {
+ View diagramView = findViewPropertyReference(diagram, property);
+
+ if (diagramView == null) {
+ Iterator<?> iterator = diagram.eAllContents();
+ while (null == diagramView && iterator.hasNext()) {
+ final Object object = iterator.next();
+ if (object instanceof View) {
+ EObject element = ((View) object).getElement();
+
+ if (element instanceof Classifier) {
+ if (blockNameReference.equals(((Classifier) element).getName())) {
+ diagramView = findViewPropertyReference((View) object, property);
+ }
+ }
+ }
+ }
+ }
+
+ return diagramView;
+ }
+
+ /**
+ * Gets view of the property on a specific element.
+ *
+ * @param container
+ * The specific element to find property.
+ * @param property
+ * Property to find.
+ * @return A view of the property.
+ */
+ private View findViewPropertyReference(final View container, final Property property) {
+ for (final Object viewObject : container.getChildren()) {
+ final View view = (View) viewObject;
+ if (view.getElement() instanceof Property) {
+ final Property element = (Property) view.getElement();
+ if (property.equals(element)) {
+ return view;
+ }
+ }
+ }
+ return null;
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/TestLinkDropOnDiagram.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/TestLinkDropOnDiagram.java
new file mode 100755
index 0000000..778375e
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/TestLinkDropOnDiagram.java
@@ -0,0 +1,118 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createLink;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for Link DnD tests (via palette tools).
+ */
+public class TestLinkDropOnDiagram extends AbstractTest {
+
+ public static EObject blockSource;
+ public static EObject blockTarget;
+ public static EObject interfaceTarget;
+
+ public static EObject dependency;
+ public static EObject usage;
+ public static EObject interfaceRealization;
+ public static EObject generalization;
+
+ public static EObject associationComposite;
+ public static EObject associationCompositeDirected;
+ public static EObject associationNone;
+ public static EObject associationNoneDirected;
+ public static EObject associationShared;
+ public static EObject associationSharedDirected;
+
+ @BeforeClass
+ public static void prepare() throws Exception {
+ // Prepare elements for link creation tests
+ blockSource = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ blockTarget = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ interfaceTarget = createElement(UMLElementTypes.INTERFACE, getDiagramView());
+
+ dependency = createLink(UMLElementTypes.DEPENDENCY, blockSource, blockTarget);
+ usage = createLink(UMLElementTypes.USAGE, blockSource, blockTarget);
+ interfaceRealization = createLink(UMLElementTypes.INTERFACE_REALIZATION, blockSource, interfaceTarget);
+ generalization = createLink(UMLElementTypes.GENERALIZATION, blockSource, blockTarget);
+
+ associationComposite = createLink(SysMLElementTypes.ASSOCIATION_COMPOSITE, blockSource, blockTarget);
+ associationCompositeDirected = createLink(SysMLElementTypes.ASSOCIATION_COMPOSITE_DIRECTED, blockSource, blockTarget);
+ associationNone = createLink(SysMLElementTypes.ASSOCIATION_NONE, blockSource, blockTarget);
+ associationNoneDirected = createLink(SysMLElementTypes.ASSOCIATION_NONE_DIRECTED, blockSource, blockTarget);
+ associationShared = createLink(SysMLElementTypes.ASSOCIATION_SHARED, blockSource, blockTarget);
+ associationSharedDirected = createLink(SysMLElementTypes.ASSOCIATION_SHARED_DIRECTED, blockSource, blockTarget);
+ }
+
+ @Test
+ public void dropDependencyInDiagram() throws Exception {
+ dropFromModelExplorer(dependency, getDiagramView(), true);
+ }
+
+ @Test
+ public void dropUsageInDiagram() throws Exception {
+ dropFromModelExplorer(usage, getDiagramView(), true);
+ }
+
+ @Test
+ public void dropInterfaceRealizationInDiagram() throws Exception {
+ dropFromModelExplorer(interfaceRealization, getDiagramView(), true);
+ }
+
+ @Test
+ public void dropGeneralizationInDiagram() throws Exception {
+ dropFromModelExplorer(generalization, getDiagramView(), true);
+ }
+
+ @Test
+ public void dropAssociationCompositeInDiagram() throws Exception {
+ dropFromModelExplorer(associationComposite, getDiagramView(), true);
+ }
+
+ @Test
+ public void dropAssociationCompositeDirectedInDiagram() throws Exception {
+ dropFromModelExplorer(associationCompositeDirected, getDiagramView(), true);
+ }
+
+ @Test
+ public void dropAssociationNoneInDiagram() throws Exception {
+ dropFromModelExplorer(associationNone, getDiagramView(), true);
+ }
+
+ @Test
+ public void dropAssociationNoneDirectedInDiagram() throws Exception {
+ dropFromModelExplorer(associationNoneDirected, getDiagramView(), true);
+ }
+
+ @Test
+ public void dropAssociationSharedInDiagram() throws Exception {
+ dropFromModelExplorer(associationShared, getDiagramView(), true);
+ }
+
+ @Test
+ public void dropAssociationSharedDirectedInDiagram() throws Exception {
+ dropFromModelExplorer(associationSharedDirected, getDiagramView(), true);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/TestNodeDropOnDiagram.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/TestNodeDropOnDiagram.java
new file mode 100755
index 0000000..771cd92
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/TestNodeDropOnDiagram.java
@@ -0,0 +1,206 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) in diagram.
+ */
+public class TestNodeDropOnDiagram extends AbstractTest {
+
+ @Test
+ public void testDropActorInDiagram() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.ACTOR, getDiagramView(), true);
+ }
+
+ @Test
+ public void testDropActorPartInDiagram() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, getDiagramView(), false);
+ }
+
+ @Test
+ public void testDropBlockInDiagram() throws Exception {
+ dropFromModelExplorer(SysMLElementTypes.BLOCK, getDiagramView(), true);
+ }
+
+ @Test
+ public void testDropCommentInDiagram() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.COMMENT, getDiagramView(), true);
+ }
+
+ @Test
+ public void testDropConstraintBlockInDiagram() throws Exception {
+ dropFromModelExplorer(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView(), true);
+ }
+
+ @Test
+ public void testDropConstraintInDiagram() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.CONSTRAINT, getDiagramView(), true);
+ }
+
+ @Test
+ public void testDropConstraintPropertyInDiagram() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, getDiagramView(), false);
+ }
+
+ @Test
+ public void testDropDataTypeInDiagram() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.DATA_TYPE, getDiagramView(), true);
+ }
+
+ @Test
+ public void testDropDimensionInDiagram() throws Exception {
+ dropFromModelExplorer(SysMLElementTypes.DIMENSION, getDiagramView(), true);
+ }
+
+ @Test
+ public void testDropEnumerationInDiagram() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.ENUMERATION, getDiagramView(), true);
+ }
+
+ @Test
+ public void testDropEnumerationLiteralInDiagram() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION_LITERAL, intermediateContainer);
+ dropFromModelExplorer(droppedElement, getDiagramView(), false);
+ }
+
+ @Test
+ public void testDropFlowPortInDiagram() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, getDiagramView(), false);
+ }
+
+ @Test
+ public void testDropFlowPropertyInDiagram() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, getDiagramView(), false);
+ }
+
+ @Test
+ public void testDropFlowSpecificationInDiagram() throws Exception {
+ dropFromModelExplorer(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView(), true);
+ }
+
+ @Test
+ public void testDropInstanceSpecificationInDiagram() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView(), true);
+ }
+
+ @Test
+ public void testDropInterfaceInDiagram() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.INTERFACE, getDiagramView(), true);
+ }
+
+ @Test
+ public void testDropModelInDiagram() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.MODEL, getDiagramView(), true);
+ }
+
+ @Test
+ public void testDropOperationInDiagram() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.OPERATION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, getDiagramView(), false);
+ }
+
+ @Test
+ public void testDropPackageInDiagram() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.PACKAGE, getDiagramView(), true);
+ }
+
+ @Test
+ public void testDropPartInDiagram() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, getDiagramView(), false);
+ }
+
+ @Test
+ public void testDropPortInDiagram() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, getDiagramView(), false);
+ }
+
+ @Test
+ public void testDropPrimitiveTypeInDiagram() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.PRIMITIVE_TYPE, getDiagramView(), true);
+ }
+
+ @Test
+ public void testDropPropertyInDiagram() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, getDiagramView(), false);
+ }
+
+ @Test
+ public void testDropReceptionInDiagram() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.RECEPTION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, getDiagramView(), false);
+ }
+
+ @Test
+ public void testDropReferenceInDiagram() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, getDiagramView(), false);
+ }
+
+ @Test
+ public void testDropSignalInDiagram() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.SIGNAL, getDiagramView(), true);
+ }
+
+ @Test
+ public void testDropSlotInDiagram() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.SLOT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, getDiagramView(), false);
+ }
+
+ @Test
+ public void testDropUnitInDiagram() throws Exception {
+ dropFromModelExplorer(SysMLElementTypes.UNIT, getDiagramView(), true);
+ }
+
+ @Test
+ public void testDropValueInDiagram() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, getDiagramView(), false);
+ }
+
+ @Test
+ public void testDropValueTypeInDiagram() throws Exception {
+ dropFromModelExplorer(SysMLElementTypes.VALUE_TYPE, getDiagramView(), true);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnActor.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnActor.java
new file mode 100755
index 0000000..e62576d
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnActor.java
@@ -0,0 +1,251 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on Actor.
+ */
+public class TestNodeDropOnActor extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ containerView = TestPrepareUtils.createGraphicalNode(UMLElementTypes.ACTOR, UMLGraphicalTypes.SHAPE_UML_ACTOR_AS_CLASSIFIER_ID, getDiagramView());
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActor() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ACTOR, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropCommentContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.COMMENT, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.CONSTRAINT, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDataType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.DATA_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDimension() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.DIMENSION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumeration() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumerationLiteral() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION_LITERAL, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowSpecification() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInstanceSpecification() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInterface() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INTERFACE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropModel() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.MODEL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropOperation() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.OPERATION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPackage() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PACKAGE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPrimitiveType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PRIMITIVE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReception() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.RECEPTION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSignal() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.SIGNAL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSlot() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.SLOT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropUnit() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.UNIT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueType() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnActorOperationCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnActorOperationCompartment.java
new file mode 100755
index 0000000..848894e
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnActorOperationCompartment.java
@@ -0,0 +1,30 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom;
+
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.junit.Ignore;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element drop test (via palette tools) in an Actor "operations" compartment.
+ */
+public class TestNodeDropOnActorOperationCompartment extends AbstractTest {
+
+ @Ignore("Actor should not have operations compartment.")
+ @Test
+ public void warning() {
+ };
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnActorPropertyCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnActorPropertyCompartment.java
new file mode 100755
index 0000000..3b6f3c6
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnActorPropertyCompartment.java
@@ -0,0 +1,30 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom;
+
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.junit.Ignore;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element drop test (via palette tools) in an Actor "properties" compartment.
+ */
+public class TestNodeDropOnActorPropertyCompartment extends AbstractTest {
+
+ @Ignore("Actor should not have properties compartment.")
+ @Test
+ public void warning() {
+ };
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnBlock.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnBlock.java
new file mode 100755
index 0000000..e3f168e
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnBlock.java
@@ -0,0 +1,301 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on Block.
+ */
+public class TestNodeDropOnBlock extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ containerView = TestPrepareUtils.createGraphicalNode(SysMLElementTypes.BLOCK, SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_CLASSIFIER_ID, getDiagramView());
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActor() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ACTOR, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropActorPartContained() throws Exception {
+ dropFromModelExplorer(SysMLElementTypes.ACTOR_PART_PROPERTY, containerView, false);
+ }
+
+ @Test
+ public void testDropBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropCommentContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.COMMENT, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.CONSTRAINT, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintPropertyContained() throws Exception {
+ dropFromModelExplorer(SysMLElementTypes.CONSTRAINT_PROPERTY, containerView, false);
+ }
+
+ @Test
+ public void testDropDataType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.DATA_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDimension() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.DIMENSION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumeration() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumerationLiteral() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION_LITERAL, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPortContained() throws Exception {
+ dropFromModelExplorer(SysMLElementTypes.FLOW_PORT, containerView, true);
+ }
+
+ @Test
+ public void testDropFlowProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowSpecification() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInstanceSpecification() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInterface() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INTERFACE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropModel() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.MODEL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropOperation() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.OPERATION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropOperationContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.OPERATION, containerView, false);
+ }
+
+ @Test
+ public void testDropPackage() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PACKAGE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPartContained() throws Exception {
+ dropFromModelExplorer(SysMLElementTypes.PART_PROPERTY, containerView, false);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPortContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.PORT, containerView, true);
+ }
+
+ @Test
+ public void testDropPrimitiveType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PRIMITIVE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPropertyContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.PROPERTY, containerView, false);
+ }
+
+ @Test
+ public void testDropReception() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.RECEPTION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReceptionContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.RECEPTION, containerView, false);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReferenceContained() throws Exception {
+ dropFromModelExplorer(SysMLElementTypes.REFERENCE_PROPERTY, containerView, false);
+ }
+
+ @Test
+ public void testDropSignal() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.SIGNAL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSlot() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.SLOT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropUnit() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.UNIT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueContained() throws Exception {
+ dropFromModelExplorer(SysMLElementTypes.VALUE_PROPERTY, containerView, false);
+ }
+
+ @Test
+ public void testDropValueType() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnBlockConstraintCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnBlockConstraintCompartment.java
new file mode 100755
index 0000000..716bff5
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnBlockConstraintCompartment.java
@@ -0,0 +1,321 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.changeVisibility;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on Block.
+ */
+public class TestNodeDropOnBlockConstraintCompartment extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View elementView = TestPrepareUtils.createGraphicalNode(SysMLElementTypes.BLOCK, SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_CLASSIFIER_ID, getDiagramView());
+ containerView = ViewUtil.getChildBySemanticHint(elementView, SysMLGraphicalTypes.COMPARTMENT_SYSML_CONSTRAINT_AS_LIST_ID);
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!containerView.isVisible()) {
+ changeVisibility(containerView);
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActor() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ACTOR, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropActorPartContained() throws Exception {
+ dropFromModelExplorer(SysMLElementTypes.ACTOR_PART_PROPERTY, containerView, false);
+ }
+
+ @Test
+ public void testDropBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropCommentContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropConstraintProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintPropertyContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_PROPERTY, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropDataType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.DATA_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDimension() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.DIMENSION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumeration() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumerationLiteral() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION_LITERAL, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPortContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowSpecification() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInstanceSpecification() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInterface() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INTERFACE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropModel() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.MODEL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropOperation() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.OPERATION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropOperationContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.OPERATION, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPackage() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PACKAGE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPartContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPortContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PORT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPrimitiveType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PRIMITIVE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPropertyContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReception() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.RECEPTION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReceptionContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.RECEPTION, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReferenceContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSignal() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.SIGNAL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSlot() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.SLOT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropUnit() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.UNIT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueType() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnBlockFlowPortCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnBlockFlowPortCompartment.java
new file mode 100755
index 0000000..cc70ac3
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnBlockFlowPortCompartment.java
@@ -0,0 +1,321 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.changeVisibility;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on Block.
+ */
+public class TestNodeDropOnBlockFlowPortCompartment extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View elementView = TestPrepareUtils.createGraphicalNode(SysMLElementTypes.BLOCK, SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_CLASSIFIER_ID, getDiagramView());
+ containerView = ViewUtil.getChildBySemanticHint(elementView, SysMLGraphicalTypes.COMPARTMENT_SYSML_FLOWPORT_AS_LIST_ID);
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!containerView.isVisible()) {
+ changeVisibility(containerView);
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActor() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ACTOR, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropActorPartContained() throws Exception {
+ dropFromModelExplorer(SysMLElementTypes.ACTOR_PART_PROPERTY, containerView, false);
+ }
+
+ @Test
+ public void testDropBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropCommentContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintPropertyContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_PROPERTY, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDataType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.DATA_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDimension() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.DIMENSION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumeration() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumerationLiteral() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION_LITERAL, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPortContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropFlowProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowSpecification() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInstanceSpecification() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInterface() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INTERFACE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropModel() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.MODEL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropOperation() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.OPERATION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropOperationContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.OPERATION, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPackage() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PACKAGE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPartContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPortContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PORT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPrimitiveType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PRIMITIVE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPropertyContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReception() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.RECEPTION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReceptionContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.RECEPTION, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReferenceContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSignal() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.SIGNAL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSlot() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.SLOT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropUnit() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.UNIT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueType() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnBlockOperationCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnBlockOperationCompartment.java
new file mode 100755
index 0000000..28a4d39
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnBlockOperationCompartment.java
@@ -0,0 +1,322 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.changeVisibility;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on Block.
+ */
+public class TestNodeDropOnBlockOperationCompartment extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View elementView = TestPrepareUtils.createGraphicalNode(SysMLElementTypes.BLOCK, SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_CLASSIFIER_ID, getDiagramView());
+ containerView = ViewUtil.getChildBySemanticHint(elementView, UMLGraphicalTypes.COMPARTMENT_UML_OPERATION_AS_LIST_ID);
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!containerView.isVisible()) {
+ changeVisibility(containerView);
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActor() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ACTOR, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropActorPartContained() throws Exception {
+ dropFromModelExplorer(SysMLElementTypes.ACTOR_PART_PROPERTY, containerView, false);
+ }
+
+ @Test
+ public void testDropBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropCommentContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintPropertyContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_PROPERTY, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDataType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.DATA_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDimension() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.DIMENSION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumeration() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumerationLiteral() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION_LITERAL, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPortContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowSpecification() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInstanceSpecification() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInterface() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INTERFACE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropModel() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.MODEL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropOperation() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.OPERATION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropOperationContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.OPERATION, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropPackage() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PACKAGE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPartContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPortContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PORT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPrimitiveType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PRIMITIVE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPropertyContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReception() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.RECEPTION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReceptionContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.RECEPTION, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReferenceContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSignal() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.SIGNAL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSlot() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.SLOT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropUnit() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.UNIT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueType() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnBlockPartCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnBlockPartCompartment.java
new file mode 100755
index 0000000..0df43c7
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnBlockPartCompartment.java
@@ -0,0 +1,321 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.changeVisibility;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on Block.
+ */
+public class TestNodeDropOnBlockPartCompartment extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View elementView = TestPrepareUtils.createGraphicalNode(SysMLElementTypes.BLOCK, SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_CLASSIFIER_ID, getDiagramView());
+ containerView = ViewUtil.getChildBySemanticHint(elementView, SysMLGraphicalTypes.COMPARTMENT_SYSML_PART_AS_LIST_ID);
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!containerView.isVisible()) {
+ changeVisibility(containerView);
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActor() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ACTOR, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropActorPartContained() throws Exception {
+ dropFromModelExplorer(SysMLElementTypes.ACTOR_PART_PROPERTY, containerView, false);
+ }
+
+ @Test
+ public void testDropBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropCommentContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintPropertyContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_PROPERTY, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDataType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.DATA_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDimension() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.DIMENSION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumeration() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumerationLiteral() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION_LITERAL, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPortContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowSpecification() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInstanceSpecification() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInterface() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INTERFACE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropModel() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.MODEL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropOperation() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.OPERATION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropOperationContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.OPERATION, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPackage() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PACKAGE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPartContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPortContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PORT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPrimitiveType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PRIMITIVE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPropertyContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReception() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.RECEPTION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReceptionContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.RECEPTION, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReferenceContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSignal() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.SIGNAL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSlot() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.SLOT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropUnit() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.UNIT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueType() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnBlockPortCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnBlockPortCompartment.java
new file mode 100755
index 0000000..4c22aab
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnBlockPortCompartment.java
@@ -0,0 +1,322 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.changeVisibility;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on Block.
+ */
+public class TestNodeDropOnBlockPortCompartment extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View elementView = TestPrepareUtils.createGraphicalNode(SysMLElementTypes.BLOCK, SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_CLASSIFIER_ID, getDiagramView());
+ containerView = ViewUtil.getChildBySemanticHint(elementView, UMLGraphicalTypes.COMPARTMENT_UML_PORT_AS_LIST_ID);
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!containerView.isVisible()) {
+ changeVisibility(containerView);
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActor() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ACTOR, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropActorPartContained() throws Exception {
+ dropFromModelExplorer(SysMLElementTypes.ACTOR_PART_PROPERTY, containerView, false);
+ }
+
+ @Test
+ public void testDropBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropCommentContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintPropertyContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_PROPERTY, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDataType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.DATA_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDimension() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.DIMENSION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumeration() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumerationLiteral() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION_LITERAL, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPortContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowSpecification() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInstanceSpecification() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInterface() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INTERFACE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropModel() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.MODEL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropOperation() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.OPERATION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropOperationContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.OPERATION, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPackage() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PACKAGE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPartContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPortContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PORT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropPrimitiveType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PRIMITIVE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPropertyContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReception() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.RECEPTION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReceptionContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.RECEPTION, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReferenceContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSignal() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.SIGNAL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSlot() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.SLOT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropUnit() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.UNIT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueType() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnBlockPropertyCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnBlockPropertyCompartment.java
new file mode 100755
index 0000000..73e6ed5
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnBlockPropertyCompartment.java
@@ -0,0 +1,322 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.changeVisibility;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on Block.
+ */
+public class TestNodeDropOnBlockPropertyCompartment extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View elementView = TestPrepareUtils.createGraphicalNode(SysMLElementTypes.BLOCK, SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_CLASSIFIER_ID, getDiagramView());
+ containerView = ViewUtil.getChildBySemanticHint(elementView, SysMLGraphicalTypes.COMPARTMENT_SYSML_PROPERTY_AS_LIST_ID);
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!containerView.isVisible()) {
+ changeVisibility(containerView);
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActor() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ACTOR, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropActorPartContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropCommentContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintPropertyContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_PROPERTY, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDataType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.DATA_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDimension() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.DIMENSION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumeration() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumerationLiteral() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION_LITERAL, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPortContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropFlowProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowSpecification() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInstanceSpecification() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInterface() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INTERFACE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropModel() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.MODEL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropOperation() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.OPERATION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropOperationContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.OPERATION, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPackage() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PACKAGE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPartContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPortContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PORT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropPrimitiveType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PRIMITIVE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPropertyContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropReception() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.RECEPTION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReceptionContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.RECEPTION, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReferenceContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropSignal() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.SIGNAL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSlot() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.SLOT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropUnit() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.UNIT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropValueType() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnBlockReferenceCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnBlockReferenceCompartment.java
new file mode 100755
index 0000000..58edbb2
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnBlockReferenceCompartment.java
@@ -0,0 +1,321 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.changeVisibility;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on Block.
+ */
+public class TestNodeDropOnBlockReferenceCompartment extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View elementView = TestPrepareUtils.createGraphicalNode(SysMLElementTypes.BLOCK, SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_CLASSIFIER_ID, getDiagramView());
+ containerView = ViewUtil.getChildBySemanticHint(elementView, SysMLGraphicalTypes.COMPARTMENT_SYSML_REFERENCE_AS_LIST_ID);
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!containerView.isVisible()) {
+ changeVisibility(containerView);
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActor() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ACTOR, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropActorPartContained() throws Exception {
+ dropFromModelExplorer(SysMLElementTypes.ACTOR_PART_PROPERTY, containerView, false);
+ }
+
+ @Test
+ public void testDropBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropCommentContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintPropertyContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_PROPERTY, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDataType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.DATA_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDimension() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.DIMENSION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumeration() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumerationLiteral() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION_LITERAL, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPortContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowSpecification() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInstanceSpecification() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInterface() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INTERFACE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropModel() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.MODEL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropOperation() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.OPERATION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropOperationContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.OPERATION, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPackage() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PACKAGE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPartContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPortContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PORT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPrimitiveType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PRIMITIVE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPropertyContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReception() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.RECEPTION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReceptionContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.RECEPTION, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReferenceContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropSignal() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.SIGNAL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSlot() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.SLOT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropUnit() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.UNIT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueType() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnBlockValueCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnBlockValueCompartment.java
new file mode 100755
index 0000000..4250a38
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnBlockValueCompartment.java
@@ -0,0 +1,321 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.changeVisibility;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on Block.
+ */
+public class TestNodeDropOnBlockValueCompartment extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View elementView = TestPrepareUtils.createGraphicalNode(SysMLElementTypes.BLOCK, SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_CLASSIFIER_ID, getDiagramView());
+ containerView = ViewUtil.getChildBySemanticHint(elementView, SysMLGraphicalTypes.COMPARTMENT_SYSML_VALUE_AS_LIST_ID);
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!containerView.isVisible()) {
+ changeVisibility(containerView);
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActor() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ACTOR, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropActorPartContained() throws Exception {
+ dropFromModelExplorer(SysMLElementTypes.ACTOR_PART_PROPERTY, containerView, false);
+ }
+
+ @Test
+ public void testDropBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropCommentContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintPropertyContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_PROPERTY, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDataType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.DATA_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDimension() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.DIMENSION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumeration() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumerationLiteral() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION_LITERAL, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPortContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowSpecification() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInstanceSpecification() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInterface() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INTERFACE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropModel() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.MODEL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropOperation() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.OPERATION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropOperationContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.OPERATION, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPackage() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PACKAGE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPartContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPortContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PORT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPrimitiveType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PRIMITIVE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPropertyContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReception() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.RECEPTION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReceptionContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.RECEPTION, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReferenceContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSignal() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.SIGNAL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSlot() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.SLOT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropUnit() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.UNIT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropValueType() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnConstraintBlock.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnConstraintBlock.java
new file mode 100755
index 0000000..125c39f
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnConstraintBlock.java
@@ -0,0 +1,261 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on ConstraintBlock.
+ */
+public class TestNodeDropOnConstraintBlock extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ containerView = TestPrepareUtils.createGraphicalNode(SysMLElementTypes.CONSTRAINT_BLOCK, SysMLGraphicalTypes.SHAPE_SYSML_CONSTRAINTBLOCK_AS_CLASSIFIER_ID, getDiagramView());
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActor() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ACTOR, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropCommentContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.COMMENT, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.CONSTRAINT, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintPropertyContained() throws Exception {
+ dropFromModelExplorer(SysMLElementTypes.CONSTRAINT_PROPERTY, containerView, false);
+ }
+
+ @Test
+ public void testDropDataType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.DATA_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDimension() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.DIMENSION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumeration() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumerationLiteral() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION_LITERAL, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowSpecification() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInstanceSpecification() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInterface() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INTERFACE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropModel() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.MODEL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropOperation() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.OPERATION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPackage() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PACKAGE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPrimitiveType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PRIMITIVE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPropertyContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.PROPERTY, containerView, false);
+ }
+
+ @Test
+ public void testDropReception() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.RECEPTION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSignal() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.SIGNAL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSlot() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.SLOT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropUnit() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.UNIT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueType() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnConstraintBlockConstraintCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnConstraintBlockConstraintCompartment.java
new file mode 100755
index 0000000..a3d74d6
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnConstraintBlockConstraintCompartment.java
@@ -0,0 +1,274 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.changeVisibility;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on ConstraintBlock.
+ */
+public class TestNodeDropOnConstraintBlockConstraintCompartment extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View elementView = TestPrepareUtils.createGraphicalNode(SysMLElementTypes.CONSTRAINT_BLOCK, SysMLGraphicalTypes.SHAPE_SYSML_CONSTRAINTBLOCK_AS_CLASSIFIER_ID, getDiagramView());
+ containerView = ViewUtil.getChildBySemanticHint(elementView, SysMLGraphicalTypes.COMPARTMENT_SYSML_CONSTRAINT_AS_LIST_ID);
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!containerView.isVisible()) {
+ changeVisibility(containerView);
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActor() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ACTOR, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropCommentContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropConstraintProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintPropertyContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_PROPERTY, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropDataType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.DATA_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDimension() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.DIMENSION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumeration() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumerationLiteral() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION_LITERAL, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowSpecification() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInstanceSpecification() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInterface() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INTERFACE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropModel() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.MODEL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropOperation() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.OPERATION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPackage() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PACKAGE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPrimitiveType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PRIMITIVE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPropertyContained() throws Exception { // Parameter
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReception() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.RECEPTION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSignal() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.SIGNAL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSlot() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.SLOT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropUnit() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.UNIT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueType() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnConstraintBlockParameterCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnConstraintBlockParameterCompartment.java
new file mode 100755
index 0000000..9fe52ba
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnConstraintBlockParameterCompartment.java
@@ -0,0 +1,274 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.changeVisibility;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on ConstraintBlock.
+ */
+public class TestNodeDropOnConstraintBlockParameterCompartment extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View elementView = TestPrepareUtils.createGraphicalNode(SysMLElementTypes.CONSTRAINT_BLOCK, SysMLGraphicalTypes.SHAPE_SYSML_CONSTRAINTBLOCK_AS_CLASSIFIER_ID, getDiagramView());
+ containerView = ViewUtil.getChildBySemanticHint(elementView, SysMLGraphicalTypes.COMPARTMENT_SYSML_PARAMETER_AS_LIST_ID);
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!containerView.isVisible()) {
+ changeVisibility(containerView);
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActor() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ACTOR, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropCommentContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintPropertyContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_PROPERTY, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDataType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.DATA_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDimension() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.DIMENSION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumeration() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumerationLiteral() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION_LITERAL, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowSpecification() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInstanceSpecification() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInterface() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INTERFACE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropModel() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.MODEL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropOperation() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.OPERATION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPackage() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PACKAGE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPrimitiveType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PRIMITIVE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPropertyContained() throws Exception { // Parameter
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropReception() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.RECEPTION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSignal() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.SIGNAL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSlot() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.SLOT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropUnit() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.UNIT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueType() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnDataType.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnDataType.java
new file mode 100755
index 0000000..f41ea9d
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnDataType.java
@@ -0,0 +1,261 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on DataType.
+ */
+public class TestNodeDropOnDataType extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ containerView = TestPrepareUtils.createGraphicalNode(UMLElementTypes.DATA_TYPE, UMLGraphicalTypes.SHAPE_UML_DATATYPE_AS_CLASSIFIER_ID, getDiagramView());
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActor() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ACTOR, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropCommentContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.COMMENT, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.CONSTRAINT, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDataType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.DATA_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDimension() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.DIMENSION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumeration() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumerationLiteral() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION_LITERAL, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowSpecification() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInstanceSpecification() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInterface() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INTERFACE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropModel() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.MODEL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropOperation() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.OPERATION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropOperationContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.OPERATION, containerView, false);
+ }
+
+ @Test
+ public void testDropPackage() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PACKAGE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPrimitiveType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PRIMITIVE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPropertyContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.PROPERTY, containerView, false);
+ }
+
+ @Test
+ public void testDropReception() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.RECEPTION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSignal() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.SIGNAL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSlot() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.SLOT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropUnit() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.UNIT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueType() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnDataTypeOperationCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnDataTypeOperationCompartment.java
new file mode 100755
index 0000000..ffbf84c
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnDataTypeOperationCompartment.java
@@ -0,0 +1,274 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.changeVisibility;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on DataType.
+ */
+public class TestNodeDropOnDataTypeOperationCompartment extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View elementView = TestPrepareUtils.createGraphicalNode(UMLElementTypes.DATA_TYPE, UMLGraphicalTypes.SHAPE_UML_DATATYPE_AS_CLASSIFIER_ID, getDiagramView());
+ containerView = ViewUtil.getChildBySemanticHint(elementView, UMLGraphicalTypes.COMPARTMENT_UML_OPERATION_AS_LIST_ID);
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!containerView.isVisible()) {
+ changeVisibility(containerView);
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActor() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ACTOR, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropCommentContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDataType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.DATA_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDimension() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.DIMENSION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumeration() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumerationLiteral() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION_LITERAL, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowSpecification() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInstanceSpecification() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInterface() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INTERFACE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropModel() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.MODEL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropOperation() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.OPERATION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropOperationContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.OPERATION, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropPackage() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PACKAGE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPrimitiveType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PRIMITIVE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPropertyContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReception() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.RECEPTION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSignal() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.SIGNAL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSlot() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.SLOT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropUnit() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.UNIT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueType() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnDataTypePropertyCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnDataTypePropertyCompartment.java
new file mode 100755
index 0000000..481a316
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnDataTypePropertyCompartment.java
@@ -0,0 +1,274 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.changeVisibility;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on Signal.
+ */
+public class TestNodeDropOnDataTypePropertyCompartment extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View elementView = TestPrepareUtils.createGraphicalNode(UMLElementTypes.DATA_TYPE, UMLGraphicalTypes.SHAPE_UML_DATATYPE_AS_CLASSIFIER_ID, getDiagramView());
+ containerView = ViewUtil.getChildBySemanticHint(elementView, UMLGraphicalTypes.COMPARTMENT_UML_PROPERTY_AS_LIST_ID);
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!containerView.isVisible()) {
+ changeVisibility(containerView);
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActor() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ACTOR, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropCommentContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDataType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.DATA_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDimension() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.DIMENSION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumeration() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumerationLiteral() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION_LITERAL, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowSpecification() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInstanceSpecification() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInterface() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INTERFACE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropModel() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.MODEL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropOperation() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.OPERATION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropOperationContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.OPERATION, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPackage() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PACKAGE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPrimitiveType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PRIMITIVE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPropertyContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropReception() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.RECEPTION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSignal() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.SIGNAL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSlot() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.SLOT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropUnit() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.UNIT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueType() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnDimension.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnDimension.java
new file mode 100755
index 0000000..910d891
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnDimension.java
@@ -0,0 +1,254 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on DataType.
+ */
+//The plug-in org.eclipse.papyrus.uml.diagram.dnd provides custom Drop policies
+//This plug-in is optional (SysML doesn't depend on it), and the Drop policies may
+//be disabled by the user. Thus, the drop behavior is context-dependent.
+//
+//We actually test the default behavior, when this plug-in is available (ie. drop
+//of Classifiers on an Instance Specification is *allowed*)
+//
+//See bug 370819: [Global] A Flexible Drag & Drop framework
+public class TestNodeDropOnDimension extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ containerView = TestPrepareUtils.createGraphicalNode(SysMLElementTypes.DIMENSION, SysMLGraphicalTypes.SHAPE_SYSML_DIMENSION_AS_CLASSIFIER_ID, getDiagramView());
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActor() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ACTOR, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropCommentContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.COMMENT, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDataType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.DATA_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
+ }
+
+ @Test
+ public void testDropDimension() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.DIMENSION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumeration() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
+ }
+
+ @Test
+ public void testDropEnumerationLiteral() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION_LITERAL, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowSpecification() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
+ }
+
+ @Test
+ public void testDropInstanceSpecification() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInterface() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INTERFACE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
+ }
+
+ @Test
+ public void testDropModel() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.MODEL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropOperation() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.OPERATION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPackage() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PACKAGE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPrimitiveType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PRIMITIVE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReception() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.RECEPTION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSignal() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.SIGNAL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
+ }
+
+ @Test
+ public void testDropSlot() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.SLOT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropUnit() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.UNIT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueType() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnEnumeration.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnEnumeration.java
new file mode 100755
index 0000000..7db911d
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnEnumeration.java
@@ -0,0 +1,266 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on DataType.
+ */
+public class TestNodeDropOnEnumeration extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ containerView = TestPrepareUtils.createGraphicalNode(UMLElementTypes.ENUMERATION, UMLGraphicalTypes.SHAPE_UML_ENUMERATION_AS_CLASSIFIER_ID, getDiagramView());
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActor() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ACTOR, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropCommentContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.COMMENT, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.CONSTRAINT, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDataType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.DATA_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDimension() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.DIMENSION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumeration() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumerationLiteral() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION_LITERAL, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumerationLiteralContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.ENUMERATION_LITERAL, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowSpecification() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInstanceSpecification() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInterface() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INTERFACE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropModel() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.MODEL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropOperation() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.OPERATION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropOperationContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.OPERATION, containerView, false);
+ }
+
+ @Test
+ public void testDropPackage() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PACKAGE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPrimitiveType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PRIMITIVE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPropertyContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.PROPERTY, containerView, false);
+ }
+
+ @Test
+ public void testDropReception() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.RECEPTION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSignal() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.SIGNAL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSlot() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.SLOT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropUnit() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.UNIT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueType() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnEnumerationCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnEnumerationCompartment.java
new file mode 100755
index 0000000..6dc87e1
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnEnumerationCompartment.java
@@ -0,0 +1,274 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.changeVisibility;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on Enumeration compartment.
+ */
+public class TestNodeDropOnEnumerationCompartment extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View elementView = TestPrepareUtils.createGraphicalNode(UMLElementTypes.ENUMERATION, UMLGraphicalTypes.SHAPE_UML_ENUMERATION_AS_CLASSIFIER_ID, getDiagramView());
+ containerView = ViewUtil.getChildBySemanticHint(elementView, UMLGraphicalTypes.COMPARTMENT_UML_ENUMERATIONLITERAL_AS_LIST_ID);
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!containerView.isVisible()) {
+ changeVisibility(containerView);
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActor() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ACTOR, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropCommentContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDataType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.DATA_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDimension() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.DIMENSION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumeration() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumerationLiteral() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION_LITERAL, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumerationLiteralContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION_LITERAL, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropFlowPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowSpecification() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInstanceSpecification() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInterface() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INTERFACE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropModel() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.MODEL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropOperation() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.OPERATION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPackage() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PACKAGE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPrimitiveType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PRIMITIVE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPropertyContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReception() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.RECEPTION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSignal() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.SIGNAL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSlot() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.SLOT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropUnit() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.UNIT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueType() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnFlowSpecification.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnFlowSpecification.java
new file mode 100755
index 0000000..9a8c3b3
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnFlowSpecification.java
@@ -0,0 +1,256 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on FlowSpecification.
+ */
+public class TestNodeDropOnFlowSpecification extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ containerView = TestPrepareUtils.createGraphicalNode(SysMLElementTypes.FLOW_SPECIFICATION, SysMLGraphicalTypes.SHAPE_SYSML_FLOWSPECIFICATION_AS_CLASSIFIER_ID, getDiagramView());
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActor() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ACTOR, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropCommentContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.COMMENT, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.CONSTRAINT, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDataType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.DATA_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDimension() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.DIMENSION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumeration() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumerationLiteral() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION_LITERAL, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPropertyContained() throws Exception {
+ dropFromModelExplorer(SysMLElementTypes.FLOW_PROPERTY, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowSpecification() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInstanceSpecification() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInterface() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INTERFACE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropModel() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.MODEL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropOperation() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.OPERATION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPackage() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PACKAGE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPrimitiveType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PRIMITIVE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReception() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.RECEPTION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSignal() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.SIGNAL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSlot() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.SLOT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropUnit() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.UNIT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueType() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnFlowSpecificationCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnFlowSpecificationCompartment.java
new file mode 100755
index 0000000..468283e
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnFlowSpecificationCompartment.java
@@ -0,0 +1,268 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.changeVisibility;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on FlowSpecification compartment.
+ */
+public class TestNodeDropOnFlowSpecificationCompartment extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View elementView = TestPrepareUtils.createGraphicalNode(SysMLElementTypes.FLOW_SPECIFICATION, SysMLGraphicalTypes.SHAPE_SYSML_FLOWSPECIFICATION_AS_CLASSIFIER_ID, getDiagramView());
+ containerView = ViewUtil.getChildBySemanticHint(elementView, SysMLGraphicalTypes.COMPARTMENT_SYSML_FLOWPROPERTY_AS_LIST_ID);
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!containerView.isVisible()) {
+ changeVisibility(containerView);
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActor() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ACTOR, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropCommentContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDataType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.DATA_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDimension() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.DIMENSION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumeration() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumerationLiteral() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION_LITERAL, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPropertyContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PROPERTY, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropFlowSpecification() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInstanceSpecification() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInterface() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INTERFACE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropModel() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.MODEL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropOperation() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.OPERATION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPackage() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PACKAGE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPrimitiveType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PRIMITIVE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReception() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.RECEPTION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSignal() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.SIGNAL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSlot() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.SLOT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropUnit() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.UNIT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueType() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnInterface.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnInterface.java
new file mode 100755
index 0000000..4e83f47
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnInterface.java
@@ -0,0 +1,261 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on Interface.
+ */
+public class TestNodeDropOnInterface extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ containerView = TestPrepareUtils.createGraphicalNode(UMLElementTypes.INTERFACE, UMLGraphicalTypes.SHAPE_UML_INTERFACE_AS_CLASSIFIER_ID, getDiagramView());
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActor() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ACTOR, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropCommentContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.COMMENT, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.CONSTRAINT, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDataType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.DATA_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDimension() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.DIMENSION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumeration() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumerationLiteral() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION_LITERAL, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowSpecification() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInstanceSpecification() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInterface() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INTERFACE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropModel() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.MODEL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropOperation() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.OPERATION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropOperationContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.OPERATION, containerView, false);
+ }
+
+ @Test
+ public void testDropPackage() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PACKAGE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPrimitiveType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PRIMITIVE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPropertyContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.PROPERTY, containerView, false);
+ }
+
+ @Test
+ public void testDropReception() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.RECEPTION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSignal() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.SIGNAL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSlot() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.SLOT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropUnit() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.UNIT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueType() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnInterfaceOperationCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnInterfaceOperationCompartment.java
new file mode 100755
index 0000000..408b4c4
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnInterfaceOperationCompartment.java
@@ -0,0 +1,274 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.changeVisibility;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on Interface.
+ */
+public class TestNodeDropOnInterfaceOperationCompartment extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View elementView = TestPrepareUtils.createGraphicalNode(UMLElementTypes.INTERFACE, UMLGraphicalTypes.SHAPE_UML_INTERFACE_AS_CLASSIFIER_ID, getDiagramView());
+ containerView = ViewUtil.getChildBySemanticHint(elementView, UMLGraphicalTypes.COMPARTMENT_UML_OPERATION_AS_LIST_ID);
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!containerView.isVisible()) {
+ changeVisibility(containerView);
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActor() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ACTOR, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropCommentContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDataType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.DATA_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDimension() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.DIMENSION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumeration() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumerationLiteral() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION_LITERAL, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowSpecification() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInstanceSpecification() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInterface() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INTERFACE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropModel() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.MODEL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropOperation() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.OPERATION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropOperationContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.OPERATION, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropPackage() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PACKAGE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPrimitiveType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PRIMITIVE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPropertyContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReception() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.RECEPTION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSignal() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.SIGNAL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSlot() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.SLOT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropUnit() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.UNIT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueType() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnInterfacePropertyCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnInterfacePropertyCompartment.java
new file mode 100755
index 0000000..9461280
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnInterfacePropertyCompartment.java
@@ -0,0 +1,274 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.changeVisibility;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on Interface.
+ */
+public class TestNodeDropOnInterfacePropertyCompartment extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View elementView = TestPrepareUtils.createGraphicalNode(UMLElementTypes.INTERFACE, UMLGraphicalTypes.SHAPE_UML_INTERFACE_AS_CLASSIFIER_ID, getDiagramView());
+ containerView = ViewUtil.getChildBySemanticHint(elementView, UMLGraphicalTypes.COMPARTMENT_UML_PROPERTY_AS_LIST_ID);
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!containerView.isVisible()) {
+ changeVisibility(containerView);
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActor() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ACTOR, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropCommentContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDataType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.DATA_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDimension() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.DIMENSION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumeration() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumerationLiteral() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION_LITERAL, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowSpecification() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInstanceSpecification() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInterface() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INTERFACE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropModel() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.MODEL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropOperation() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.OPERATION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropOperationContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.OPERATION, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPackage() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PACKAGE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPrimitiveType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PRIMITIVE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPropertyContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropReception() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.RECEPTION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSignal() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.SIGNAL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSlot() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.SLOT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropUnit() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.UNIT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueType() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnPrimitiveType.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnPrimitiveType.java
new file mode 100755
index 0000000..7319708
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnPrimitiveType.java
@@ -0,0 +1,251 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on PrimitiveType.
+ */
+public class TestNodeDropOnPrimitiveType extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ containerView = TestPrepareUtils.createGraphicalNode(UMLElementTypes.PRIMITIVE_TYPE, UMLGraphicalTypes.SHAPE_UML_PRIMITIVETYPE_AS_CLASSIFIER_ID, getDiagramView());
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActor() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ACTOR, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropCommentContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.COMMENT, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.CONSTRAINT, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDataType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.DATA_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDimension() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.DIMENSION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumeration() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumerationLiteral() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION_LITERAL, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowSpecification() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInstanceSpecification() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInterface() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INTERFACE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropModel() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.MODEL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropOperation() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.OPERATION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPackage() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PACKAGE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPrimitiveType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PRIMITIVE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReception() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.RECEPTION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSignal() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.SIGNAL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSlot() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.SLOT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropUnit() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.UNIT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueType() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnSignal.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnSignal.java
new file mode 100755
index 0000000..19f7f2e
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnSignal.java
@@ -0,0 +1,256 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on Signal.
+ */
+public class TestNodeDropOnSignal extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ containerView = TestPrepareUtils.createGraphicalNode(UMLElementTypes.SIGNAL, UMLGraphicalTypes.SHAPE_UML_SIGNAL_AS_CLASSIFIER_ID, getDiagramView());
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActor() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ACTOR, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropCommentContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.COMMENT, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.CONSTRAINT, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDataType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.DATA_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDimension() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.DIMENSION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumeration() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumerationLiteral() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION_LITERAL, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowSpecification() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInstanceSpecification() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInterface() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INTERFACE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropModel() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.MODEL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropOperation() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.OPERATION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPackage() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PACKAGE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPrimitiveType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PRIMITIVE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPropertyContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.PROPERTY, containerView, false);
+ }
+
+ @Test
+ public void testDropReception() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.RECEPTION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSignal() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.SIGNAL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSlot() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.SLOT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropUnit() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.UNIT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueType() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnSignalOperationCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnSignalOperationCompartment.java
new file mode 100755
index 0000000..3047329
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnSignalOperationCompartment.java
@@ -0,0 +1,29 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom;
+
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.junit.Ignore;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on Signal.
+ */
+public class TestNodeDropOnSignalOperationCompartment extends AbstractTest {
+
+ @Ignore("Signal should not have operations compartment.")
+ @Test
+ public void warning() {
+ };
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnSignalPropertyCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnSignalPropertyCompartment.java
new file mode 100755
index 0000000..45bc809
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnSignalPropertyCompartment.java
@@ -0,0 +1,274 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.changeVisibility;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on DataType.
+ */
+public class TestNodeDropOnSignalPropertyCompartment extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View elementView = TestPrepareUtils.createGraphicalNode(UMLElementTypes.DATA_TYPE, UMLGraphicalTypes.SHAPE_UML_DATATYPE_AS_CLASSIFIER_ID, getDiagramView());
+ containerView = ViewUtil.getChildBySemanticHint(elementView, UMLGraphicalTypes.COMPARTMENT_UML_PROPERTY_AS_LIST_ID);
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!containerView.isVisible()) {
+ changeVisibility(containerView);
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActor() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ACTOR, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropCommentContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDataType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.DATA_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDimension() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.DIMENSION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumeration() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumerationLiteral() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION_LITERAL, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowSpecification() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInstanceSpecification() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInterface() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INTERFACE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropModel() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.MODEL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropOperation() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.OPERATION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropOperationContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.OPERATION, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPackage() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PACKAGE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPrimitiveType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PRIMITIVE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPropertyContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropReception() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.RECEPTION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSignal() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.SIGNAL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSlot() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.SLOT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropUnit() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.UNIT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueType() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnUnit.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnUnit.java
new file mode 100755
index 0000000..eaf8711
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnUnit.java
@@ -0,0 +1,254 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on Unit.
+ */
+//The plug-in org.eclipse.papyrus.uml.diagram.dnd provides custom Drop policies
+//This plug-in is optional (SysML doesn't depend on it), and the Drop policies may
+//be disabled by the user. Thus, the drop behavior is context-dependent.
+//
+//We actually test the default behavior, when this plug-in is available (ie. drop
+//of Classifiers on an Instance Specification is *allowed*)
+//
+//See bug 370819: [Global] A Flexible Drag & Drop framework
+public class TestNodeDropOnUnit extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ containerView = TestPrepareUtils.createGraphicalNode(SysMLElementTypes.UNIT, SysMLGraphicalTypes.SHAPE_SYSML_UNIT_AS_CLASSIFIER_ID, getDiagramView());
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActor() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ACTOR, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropCommentContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.COMMENT, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDataType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.DATA_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
+ }
+
+ @Test
+ public void testDropDimension() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.DIMENSION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumeration() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
+ }
+
+ @Test
+ public void testDropEnumerationLiteral() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION_LITERAL, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowSpecification() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
+ }
+
+ @Test
+ public void testDropInstanceSpecification() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInterface() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INTERFACE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
+ }
+
+ @Test
+ public void testDropModel() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.MODEL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropOperation() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.OPERATION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPackage() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PACKAGE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPrimitiveType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PRIMITIVE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReception() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.RECEPTION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSignal() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.SIGNAL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
+ }
+
+ @Test
+ public void testDropSlot() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.SLOT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropUnit() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.UNIT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueType() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnValueType.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnValueType.java
new file mode 100755
index 0000000..ddaa44e
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnValueType.java
@@ -0,0 +1,261 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on ValueType.
+ */
+public class TestNodeDropOnValueType extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ containerView = TestPrepareUtils.createGraphicalNode(SysMLElementTypes.VALUE_TYPE, SysMLGraphicalTypes.SHAPE_SYSML_VALUETYPE_AS_CLASSIFIER_ID, getDiagramView());
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActor() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ACTOR, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropCommentContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.COMMENT, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.CONSTRAINT, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDataType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.DATA_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDimension() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.DIMENSION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumeration() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumerationLiteral() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION_LITERAL, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowSpecification() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInstanceSpecification() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInterface() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INTERFACE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropModel() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.MODEL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropOperation() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.OPERATION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropOperationContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.OPERATION, containerView, false);
+ }
+
+ @Test
+ public void testDropPackage() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PACKAGE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPrimitiveType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PRIMITIVE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPropertyContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.PROPERTY, containerView, false);
+ }
+
+ @Test
+ public void testDropReception() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.RECEPTION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSignal() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.SIGNAL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSlot() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.SLOT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropUnit() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.UNIT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueType() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnValueTypeOperationCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnValueTypeOperationCompartment.java
new file mode 100755
index 0000000..511cbb4
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnValueTypeOperationCompartment.java
@@ -0,0 +1,275 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.changeVisibility;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on DataType.
+ */
+public class TestNodeDropOnValueTypeOperationCompartment extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View elementView = TestPrepareUtils.createGraphicalNode(SysMLElementTypes.VALUE_TYPE, SysMLGraphicalTypes.SHAPE_SYSML_VALUETYPE_AS_CLASSIFIER_ID, getDiagramView());
+ containerView = ViewUtil.getChildBySemanticHint(elementView, UMLGraphicalTypes.COMPARTMENT_UML_OPERATION_AS_LIST_ID);
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!containerView.isVisible()) {
+ changeVisibility(containerView);
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActor() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ACTOR, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropCommentContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDataType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.DATA_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDimension() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.DIMENSION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumeration() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumerationLiteral() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION_LITERAL, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowSpecification() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInstanceSpecification() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInterface() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INTERFACE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropModel() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.MODEL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropOperation() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.OPERATION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropOperationContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.OPERATION, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropPackage() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PACKAGE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPrimitiveType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PRIMITIVE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPropertyContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReception() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.RECEPTION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSignal() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.SIGNAL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSlot() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.SLOT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropUnit() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.UNIT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueType() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnValueTypePropertyCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnValueTypePropertyCompartment.java
new file mode 100755
index 0000000..8a5417e
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/custom/TestNodeDropOnValueTypePropertyCompartment.java
@@ -0,0 +1,275 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.changeVisibility;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on ValueType.
+ */
+public class TestNodeDropOnValueTypePropertyCompartment extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View elementView = TestPrepareUtils.createGraphicalNode(SysMLElementTypes.VALUE_TYPE, SysMLGraphicalTypes.SHAPE_SYSML_VALUETYPE_AS_CLASSIFIER_ID, getDiagramView());
+ containerView = ViewUtil.getChildBySemanticHint(elementView, UMLGraphicalTypes.COMPARTMENT_UML_PROPERTY_AS_LIST_ID);
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!containerView.isVisible()) {
+ changeVisibility(containerView);
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActor() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ACTOR, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropCommentContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDataType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.DATA_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDimension() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.DIMENSION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumeration() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumerationLiteral() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION_LITERAL, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowSpecification() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInstanceSpecification() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInterface() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INTERFACE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropModel() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.MODEL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropOperation() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.OPERATION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropOperationContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.OPERATION, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPackage() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PACKAGE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPrimitiveType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PRIMITIVE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPropertyContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropReception() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.RECEPTION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSignal() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.SIGNAL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSlot() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.SLOT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropUnit() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.UNIT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueType() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnComment.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnComment.java
new file mode 100755
index 0000000..4629302
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnComment.java
@@ -0,0 +1,241 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.inherited;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on Comment.
+ */
+public class TestNodeDropOnComment extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ containerView = TestPrepareUtils.createGraphicalNode(UMLElementTypes.COMMENT, ElementTypes.COMMENT.getSemanticHint(), getDiagramView());
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActor() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ACTOR, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDataType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.DATA_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDimension() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.DIMENSION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumeration() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumerationLiteral() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION_LITERAL, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowSpecification() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInstanceSpecification() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInterface() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INTERFACE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropModel() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.MODEL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropOperation() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.OPERATION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPackage() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PACKAGE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPrimitiveType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PRIMITIVE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReception() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.RECEPTION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSignal() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.SIGNAL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSlot() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.SLOT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropUnit() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.UNIT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueType() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnCommentCN.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnCommentCN.java
new file mode 100755
index 0000000..55213a5
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnCommentCN.java
@@ -0,0 +1,241 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.inherited;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on Comment Child node.
+ */
+public class TestNodeDropOnCommentCN extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ containerView = TestPrepareUtils.createGraphicalNode(UMLElementTypes.COMMENT, ElementTypes.COMMENT_CN.getSemanticHint(), getDiagramView());
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActor() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ACTOR, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDataType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.DATA_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDimension() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.DIMENSION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumeration() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumerationLiteral() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION_LITERAL, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowSpecification() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInstanceSpecification() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInterface() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INTERFACE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropModel() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.MODEL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropOperation() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.OPERATION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPackage() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PACKAGE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPrimitiveType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PRIMITIVE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReception() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.RECEPTION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSignal() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.SIGNAL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSlot() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.SLOT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropUnit() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.UNIT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueType() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnConstraint.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnConstraint.java
new file mode 100755
index 0000000..c4caa79
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnConstraint.java
@@ -0,0 +1,241 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.inherited;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on Constraint.
+ */
+public class TestNodeDropOnConstraint extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ containerView = TestPrepareUtils.createGraphicalNode(UMLElementTypes.CONSTRAINT, ElementTypes.CONSTRAINT.getSemanticHint(), getDiagramView());
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActor() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ACTOR, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDataType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.DATA_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropDimension() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.DIMENSION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumeration() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropEnumerationLiteral() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION_LITERAL, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowSpecification() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropInstanceSpecification() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInterface() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INTERFACE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropModel() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.MODEL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true); //Should set the context of the Constraint
+ }
+
+ @Test
+ public void testDropOperation() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.OPERATION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, true); //Should set the context of the Constraint
+ }
+
+ @Test
+ public void testDropPackage() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PACKAGE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true); //Should set the context of the Constraint
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPrimitiveType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PRIMITIVE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReception() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.RECEPTION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, true); //Should set the context of the Constraint
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSignal() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.SIGNAL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropSlot() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.SLOT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropUnit() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.UNIT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueType() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnConstraintCN.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnConstraintCN.java
new file mode 100755
index 0000000..59d15ae
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnConstraintCN.java
@@ -0,0 +1,241 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.inherited;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on Constraint Child node.
+ */
+public class TestNodeDropOnConstraintCN extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ containerView = TestPrepareUtils.createGraphicalNode(UMLElementTypes.CONSTRAINT, ElementTypes.CONSTRAINT_CN.getSemanticHint(), getDiagramView());
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActor() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ACTOR, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDataType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.DATA_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropDimension() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.DIMENSION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumeration() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropEnumerationLiteral() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION_LITERAL, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowSpecification() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropInstanceSpecification() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInterface() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INTERFACE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropModel() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.MODEL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true); //Should set the context of the Constraint
+ }
+
+ @Test
+ public void testDropOperation() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.OPERATION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, true); //Should set the context of the Constraint
+ }
+
+ @Test
+ public void testDropPackage() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PACKAGE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true); //Should set the context of the Constraint
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPrimitiveType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PRIMITIVE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReception() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.RECEPTION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, true); //Should set the context of the Constraint
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSignal() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.SIGNAL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropSlot() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.SLOT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropUnit() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.UNIT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueType() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnInstanceSpecification.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnInstanceSpecification.java
new file mode 100755
index 0000000..239edc5
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnInstanceSpecification.java
@@ -0,0 +1,249 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.inherited;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on InstanceSpecification.
+ */
+//The plug-in org.eclipse.papyrus.uml.diagram.dnd provides custom Drop policies
+//This plug-in is optional (SysML doesn't depend on it), and the Drop policies may
+//be disabled by the user. Thus, the drop behavior is context-dependent.
+//
+//We actually test the default behavior, when this plug-in is available (ie. drop
+//of Classifiers on an Instance Specification is *allowed*)
+//
+//See bug 370819: [Global] A Flexible Drag & Drop framework
+public class TestNodeDropOnInstanceSpecification extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ containerView = TestPrepareUtils.createGraphicalNode(UMLElementTypes.INSTANCE_SPECIFICATION, ElementTypes.INSTANCE_SPECIFICATION.getSemanticHint(), getDiagramView());
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActor() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ACTOR, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDataType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.DATA_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
+ }
+
+ @Test
+ public void testDropDimension() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.DIMENSION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumeration() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
+ }
+
+ @Test
+ public void testDropEnumerationLiteral() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION_LITERAL, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowSpecification() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
+ }
+
+ @Test
+ public void testDropInstanceSpecification() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInterface() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INTERFACE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
+ }
+
+ @Test
+ public void testDropModel() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.MODEL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropOperation() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.OPERATION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPackage() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PACKAGE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPrimitiveType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PRIMITIVE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReception() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.RECEPTION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSignal() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.SIGNAL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
+ }
+
+ @Test
+ public void testDropSlot() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.SLOT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropUnit() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.UNIT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueType() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnInstanceSpecificationCN.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnInstanceSpecificationCN.java
new file mode 100755
index 0000000..9739bc3
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnInstanceSpecificationCN.java
@@ -0,0 +1,249 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.inherited;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on InstanceSpecification Child node.
+ */
+//The plug-in org.eclipse.papyrus.uml.diagram.dnd provides custom Drop policies
+//This plug-in is optional (SysML doesn't depend on it), and the Drop policies may
+//be disabled by the user. Thus, the drop behavior is context-dependent.
+//
+//We actually test the default behavior, when this plug-in is available (ie. drop
+//of Classifiers on an Instance Specification is *allowed*)
+//
+//See bug 370819: [Global] A Flexible Drag & Drop framework
+public class TestNodeDropOnInstanceSpecificationCN extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ containerView = TestPrepareUtils.createGraphicalNode(UMLElementTypes.INSTANCE_SPECIFICATION, ElementTypes.INSTANCE_SPECIFICATION_CN.getSemanticHint(), getDiagramView());
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActor() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ACTOR, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDataType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.DATA_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
+ }
+
+ @Test
+ public void testDropDimension() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.DIMENSION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumeration() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
+ }
+
+ @Test
+ public void testDropEnumerationLiteral() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION_LITERAL, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowSpecification() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
+ }
+
+ @Test
+ public void testDropInstanceSpecification() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInterface() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INTERFACE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
+ }
+
+ @Test
+ public void testDropModel() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.MODEL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropOperation() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.OPERATION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPackage() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PACKAGE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPrimitiveType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PRIMITIVE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReception() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.RECEPTION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSignal() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.SIGNAL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
+ }
+
+ @Test
+ public void testDropSlot() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.SLOT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropUnit() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.UNIT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueType() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnInstanceSpecificationCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnInstanceSpecificationCompartment.java
new file mode 100755
index 0000000..607f8ff
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnInstanceSpecificationCompartment.java
@@ -0,0 +1,257 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.inherited;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on InstanceSpecification Compartment.
+ */
+//The plug-in org.eclipse.papyrus.uml.diagram.dnd provides custom Drop policies
+//This plug-in is optional (SysML doesn't depend on it), and the Drop policies may
+//be disabled by the user. Thus, the drop behavior is context-dependent.
+//
+//We actually test the default behavior, when this plug-in is available (ie. drop
+//of Classifiers on an Instance Specification is *allowed*)
+//
+//See bug 370819: [Global] A Flexible Drag & Drop framework
+public class TestNodeDropOnInstanceSpecificationCompartment extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View elementView = TestPrepareUtils.createGraphicalNode(UMLElementTypes.INSTANCE_SPECIFICATION, ElementTypes.INSTANCE_SPECIFICATION.getSemanticHint(), getDiagramView());
+ containerView = ViewUtil.getChildBySemanticHint(elementView, ElementTypes.INSTANCE_SPECIFICATION_COMPARTMENT_SLOT_HINT);
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActor() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ACTOR, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDataType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.DATA_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
+ }
+
+ @Test
+ public void testDropDimension() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.DIMENSION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumeration() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
+ }
+
+ @Test
+ public void testDropEnumerationLiteral() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION_LITERAL, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowSpecification() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
+ }
+
+ @Test
+ public void testDropInstanceSpecification() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInterface() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INTERFACE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
+ }
+
+ @Test
+ public void testDropModel() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.MODEL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropOperation() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.OPERATION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPackage() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PACKAGE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPrimitiveType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PRIMITIVE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReception() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.RECEPTION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSignal() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.SIGNAL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
+ }
+
+ @Test
+ public void testDropSlot() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.SLOT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSlotContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.SLOT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropUnit() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.UNIT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueType() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnInstanceSpecificationCompartmentCN.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnInstanceSpecificationCompartmentCN.java
new file mode 100755
index 0000000..b945c3d
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnInstanceSpecificationCompartmentCN.java
@@ -0,0 +1,257 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.inherited;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on InstanceSpecification Compartment.
+ */
+//The plug-in org.eclipse.papyrus.uml.diagram.dnd provides custom Drop policies
+//This plug-in is optional (SysML doesn't depend on it), and the Drop policies may
+//be disabled by the user. Thus, the drop behavior is context-dependent.
+//
+//We actually test the default behavior, when this plug-in is available (ie. drop
+//of Classifiers on an Instance Specification is *allowed*)
+//
+//See bug 370819: [Global] A Flexible Drag & Drop framework
+public class TestNodeDropOnInstanceSpecificationCompartmentCN extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View elementView = TestPrepareUtils.createGraphicalNode(UMLElementTypes.INSTANCE_SPECIFICATION, ElementTypes.INSTANCE_SPECIFICATION_CN.getSemanticHint(), getDiagramView());
+ containerView = ViewUtil.getChildBySemanticHint(elementView, ElementTypes.INSTANCE_SPECIFICATION_CN_COMPARTMENT_SLOT_HINT);
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActor() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ACTOR, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDataType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.DATA_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
+ }
+
+ @Test
+ public void testDropDimension() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.DIMENSION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumeration() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
+ }
+
+ @Test
+ public void testDropEnumerationLiteral() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION_LITERAL, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowSpecification() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
+ }
+
+ @Test
+ public void testDropInstanceSpecification() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInterface() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INTERFACE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
+ }
+
+ @Test
+ public void testDropModel() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.MODEL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropOperation() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.OPERATION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPackage() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PACKAGE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPrimitiveType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PRIMITIVE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReception() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.RECEPTION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSignal() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.SIGNAL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
+ }
+
+ @Test
+ public void testDropSlot() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.SLOT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSlotContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.SLOT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropUnit() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.UNIT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueType() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, true); //UML Custom DND
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnModel.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnModel.java
new file mode 100755
index 0000000..11580f7
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnModel.java
@@ -0,0 +1,326 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.inherited;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on Model.
+ */
+public class TestNodeDropOnModel extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ containerView = TestPrepareUtils.createGraphicalNode(UMLElementTypes.MODEL, ElementTypes.MODEL.getSemanticHint(), getDiagramView());
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActor() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ACTOR, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropActorContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.ACTOR, containerView, false);
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropBlockContained() throws Exception {
+ dropFromModelExplorer(SysMLElementTypes.BLOCK, containerView, false);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropCommentContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.COMMENT, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintBlockContained() throws Exception {
+ dropFromModelExplorer(SysMLElementTypes.CONSTRAINT_BLOCK, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.CONSTRAINT, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDataType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.DATA_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDataTypeContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.DATA_TYPE, containerView, false);
+ }
+
+ @Test
+ public void testDropDimension() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.DIMENSION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDimensionContained() throws Exception {
+ dropFromModelExplorer(SysMLElementTypes.DIMENSION, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumeration() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumerationContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.ENUMERATION, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumerationLiteral() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION_LITERAL, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowSpecification() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowSpecificationContained() throws Exception {
+ dropFromModelExplorer(SysMLElementTypes.FLOW_SPECIFICATION, containerView, false);
+ }
+
+ @Test
+ public void testDropInstanceSpecification() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInstanceSpecificationContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.INSTANCE_SPECIFICATION, containerView, false);
+ }
+
+ @Test
+ public void testDropInterface() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INTERFACE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInterfaceContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.INTERFACE, containerView, false);
+ }
+
+ @Test
+ public void testDropModel() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.MODEL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropModelContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.MODEL, containerView, false);
+ }
+
+ @Test
+ public void testDropOperation() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.OPERATION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPackage() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PACKAGE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPackageContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.PACKAGE, containerView, false);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPrimitiveType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PRIMITIVE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPrimitiveTypeContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.PRIMITIVE_TYPE, containerView, false);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReception() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.RECEPTION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSignal() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.SIGNAL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSignalContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.SIGNAL, containerView, false);
+ }
+
+ @Test
+ public void testDropSlot() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.SLOT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropUnit() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.UNIT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropUnitContained() throws Exception {
+ dropFromModelExplorer(SysMLElementTypes.UNIT, containerView, false);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueType() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueTypeContained() throws Exception {
+ dropFromModelExplorer(SysMLElementTypes.VALUE_TYPE, containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnModelCN.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnModelCN.java
new file mode 100755
index 0000000..9f87d9e
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnModelCN.java
@@ -0,0 +1,326 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.inherited;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on Model CN.
+ */
+public class TestNodeDropOnModelCN extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ containerView = TestPrepareUtils.createGraphicalNode(UMLElementTypes.MODEL, ElementTypes.MODEL_CN.getSemanticHint(), getDiagramView());
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActor() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ACTOR, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropActorContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.ACTOR, containerView, false);
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropBlockContained() throws Exception {
+ dropFromModelExplorer(SysMLElementTypes.BLOCK, containerView, false);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropCommentContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.COMMENT, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintBlockContained() throws Exception {
+ dropFromModelExplorer(SysMLElementTypes.CONSTRAINT_BLOCK, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.CONSTRAINT, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDataType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.DATA_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDataTypeContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.DATA_TYPE, containerView, false);
+ }
+
+ @Test
+ public void testDropDimension() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.DIMENSION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDimensionContained() throws Exception {
+ dropFromModelExplorer(SysMLElementTypes.DIMENSION, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumeration() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumerationContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.ENUMERATION, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumerationLiteral() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION_LITERAL, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowSpecification() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowSpecificationContained() throws Exception {
+ dropFromModelExplorer(SysMLElementTypes.FLOW_SPECIFICATION, containerView, false);
+ }
+
+ @Test
+ public void testDropInstanceSpecification() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInstanceSpecificationContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.INSTANCE_SPECIFICATION, containerView, false);
+ }
+
+ @Test
+ public void testDropInterface() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INTERFACE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInterfaceContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.INTERFACE, containerView, false);
+ }
+
+ @Test
+ public void testDropModel() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.MODEL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropModelContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.MODEL, containerView, false);
+ }
+
+ @Test
+ public void testDropOperation() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.OPERATION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPackage() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PACKAGE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPackageContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.PACKAGE, containerView, false);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPrimitiveType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PRIMITIVE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPrimitiveTypeContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.PRIMITIVE_TYPE, containerView, false);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReception() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.RECEPTION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSignal() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.SIGNAL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSignalContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.SIGNAL, containerView, false);
+ }
+
+ @Test
+ public void testDropSlot() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.SLOT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropUnit() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.UNIT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropUnitContained() throws Exception {
+ dropFromModelExplorer(SysMLElementTypes.UNIT, containerView, false);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueType() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueTypeContained() throws Exception {
+ dropFromModelExplorer(SysMLElementTypes.VALUE_TYPE, containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnModelCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnModelCompartment.java
new file mode 100755
index 0000000..4bdce5e
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnModelCompartment.java
@@ -0,0 +1,345 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.inherited;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on Model Compartment.
+ */
+public class TestNodeDropOnModelCompartment extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View elementView = TestPrepareUtils.createGraphicalNode(UMLElementTypes.MODEL, ElementTypes.MODEL.getSemanticHint(), getDiagramView());
+ containerView = ViewUtil.getChildBySemanticHint(elementView, ElementTypes.MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT);
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActor() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ACTOR, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropActorContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ACTOR, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropBlockContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.BLOCK, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropCommentContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropConstraintBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintBlockContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropConstraintProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDataType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.DATA_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDataTypeContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.DATA_TYPE, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropDimension() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.DIMENSION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDimensionContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.DIMENSION, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropEnumeration() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumerationContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropEnumerationLiteral() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION_LITERAL, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowSpecification() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowSpecificationContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_SPECIFICATION, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropInstanceSpecification() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInstanceSpecificationContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropInterface() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INTERFACE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInterfaceContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INTERFACE, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropModel() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.MODEL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropModelContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.MODEL, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropOperation() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.OPERATION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPackage() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PACKAGE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPackageContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PACKAGE, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPrimitiveType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PRIMITIVE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPrimitiveTypeContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PRIMITIVE_TYPE, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReception() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.RECEPTION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSignal() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.SIGNAL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSignalContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.SIGNAL, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropSlot() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.SLOT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropUnit() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.UNIT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropUnitContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.UNIT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueType() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueTypeContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_TYPE, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnModelCompartmentCN.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnModelCompartmentCN.java
new file mode 100755
index 0000000..f6d2cd2
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnModelCompartmentCN.java
@@ -0,0 +1,345 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.inherited;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on Model Compartment CN.
+ */
+public class TestNodeDropOnModelCompartmentCN extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View elementView = TestPrepareUtils.createGraphicalNode(UMLElementTypes.MODEL, ElementTypes.MODEL_CN.getSemanticHint(), getDiagramView());
+ containerView = ViewUtil.getChildBySemanticHint(elementView, ElementTypes.MODEL_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT);
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActor() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ACTOR, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropActorContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ACTOR, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropBlockContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.BLOCK, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropCommentContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropConstraintBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintBlockContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropConstraintProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDataType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.DATA_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDataTypeContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.DATA_TYPE, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropDimension() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.DIMENSION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDimensionContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.DIMENSION, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropEnumeration() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumerationContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropEnumerationLiteral() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION_LITERAL, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowSpecification() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowSpecificationContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_SPECIFICATION, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropInstanceSpecification() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInstanceSpecificationContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropInterface() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INTERFACE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInterfaceContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INTERFACE, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropModel() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.MODEL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropModelContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.MODEL, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropOperation() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.OPERATION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPackage() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PACKAGE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPackageContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PACKAGE, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPrimitiveType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PRIMITIVE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPrimitiveTypeContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PRIMITIVE_TYPE, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReception() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.RECEPTION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSignal() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.SIGNAL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSignalContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.SIGNAL, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropSlot() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.SLOT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropUnit() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.UNIT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropUnitContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.UNIT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueType() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueTypeContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_TYPE, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnPackage.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnPackage.java
new file mode 100755
index 0000000..bc44e36
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnPackage.java
@@ -0,0 +1,326 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.inherited;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on Package.
+ */
+public class TestNodeDropOnPackage extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ containerView = TestPrepareUtils.createGraphicalNode(UMLElementTypes.PACKAGE, ElementTypes.PACKAGE.getSemanticHint(), getDiagramView());
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActor() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ACTOR, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropActorContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.ACTOR, containerView, false);
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropBlockContained() throws Exception {
+ dropFromModelExplorer(SysMLElementTypes.BLOCK, containerView, false);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropCommentContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.COMMENT, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintBlockContained() throws Exception {
+ dropFromModelExplorer(SysMLElementTypes.CONSTRAINT_BLOCK, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.CONSTRAINT, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDataType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.DATA_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDataTypeContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.DATA_TYPE, containerView, false);
+ }
+
+ @Test
+ public void testDropDimension() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.DIMENSION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDimensionContained() throws Exception {
+ dropFromModelExplorer(SysMLElementTypes.DIMENSION, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumeration() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumerationContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.ENUMERATION, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumerationLiteral() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION_LITERAL, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowSpecification() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowSpecificationContained() throws Exception {
+ dropFromModelExplorer(SysMLElementTypes.FLOW_SPECIFICATION, containerView, false);
+ }
+
+ @Test
+ public void testDropInstanceSpecification() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInstanceSpecificationContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.INSTANCE_SPECIFICATION, containerView, false);
+ }
+
+ @Test
+ public void testDropInterface() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INTERFACE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInterfaceContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.INTERFACE, containerView, false);
+ }
+
+ @Test
+ public void testDropModel() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.MODEL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropModelContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.MODEL, containerView, false);
+ }
+
+ @Test
+ public void testDropOperation() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.OPERATION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPackage() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PACKAGE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPackageContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.PACKAGE, containerView, false);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPrimitiveType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PRIMITIVE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPrimitiveTypeContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.PRIMITIVE_TYPE, containerView, false);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReception() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.RECEPTION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSignal() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.SIGNAL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSignalContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.SIGNAL, containerView, false);
+ }
+
+ @Test
+ public void testDropSlot() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.SLOT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropUnit() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.UNIT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropUnitContained() throws Exception {
+ dropFromModelExplorer(SysMLElementTypes.UNIT, containerView, false);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueType() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueTypeContained() throws Exception {
+ dropFromModelExplorer(SysMLElementTypes.VALUE_TYPE, containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnPackageCN.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnPackageCN.java
new file mode 100755
index 0000000..35e2ce2
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnPackageCN.java
@@ -0,0 +1,326 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.inherited;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on Package CN.
+ */
+public class TestNodeDropOnPackageCN extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ containerView = TestPrepareUtils.createGraphicalNode(UMLElementTypes.PACKAGE, ElementTypes.PACKAGE_CN.getSemanticHint(), getDiagramView());
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActor() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ACTOR, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropActorContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.ACTOR, containerView, false);
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropBlockContained() throws Exception {
+ dropFromModelExplorer(SysMLElementTypes.BLOCK, containerView, false);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropCommentContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.COMMENT, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintBlockContained() throws Exception {
+ dropFromModelExplorer(SysMLElementTypes.CONSTRAINT_BLOCK, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.CONSTRAINT, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDataType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.DATA_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDataTypeContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.DATA_TYPE, containerView, false);
+ }
+
+ @Test
+ public void testDropDimension() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.DIMENSION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDimensionContained() throws Exception {
+ dropFromModelExplorer(SysMLElementTypes.DIMENSION, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumeration() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumerationContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.ENUMERATION, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumerationLiteral() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION_LITERAL, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowSpecification() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowSpecificationContained() throws Exception {
+ dropFromModelExplorer(SysMLElementTypes.FLOW_SPECIFICATION, containerView, false);
+ }
+
+ @Test
+ public void testDropInstanceSpecification() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInstanceSpecificationContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.INSTANCE_SPECIFICATION, containerView, false);
+ }
+
+ @Test
+ public void testDropInterface() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INTERFACE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInterfaceContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.INTERFACE, containerView, false);
+ }
+
+ @Test
+ public void testDropModel() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.MODEL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropModelContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.MODEL, containerView, false);
+ }
+
+ @Test
+ public void testDropOperation() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.OPERATION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPackage() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PACKAGE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPackageContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.PACKAGE, containerView, false);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPrimitiveType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PRIMITIVE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPrimitiveTypeContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.PRIMITIVE_TYPE, containerView, false);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReception() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.RECEPTION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSignal() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.SIGNAL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSignalContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.SIGNAL, containerView, false);
+ }
+
+ @Test
+ public void testDropSlot() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.SLOT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropUnit() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.UNIT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropUnitContained() throws Exception {
+ dropFromModelExplorer(SysMLElementTypes.UNIT, containerView, false);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueType() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueTypeContained() throws Exception {
+ dropFromModelExplorer(SysMLElementTypes.VALUE_TYPE, containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnPackageCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnPackageCompartment.java
new file mode 100755
index 0000000..0f10065
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnPackageCompartment.java
@@ -0,0 +1,345 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.inherited;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on Package Compartment.
+ */
+public class TestNodeDropOnPackageCompartment extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View elementView = TestPrepareUtils.createGraphicalNode(UMLElementTypes.PACKAGE, ElementTypes.PACKAGE.getSemanticHint(), getDiagramView());
+ containerView = ViewUtil.getChildBySemanticHint(elementView, ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT);
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActor() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ACTOR, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropActorContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ACTOR, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropBlockContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.BLOCK, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropCommentContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropConstraintBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintBlockContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropConstraintProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDataType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.DATA_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDataTypeContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.DATA_TYPE, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropDimension() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.DIMENSION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDimensionContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.DIMENSION, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropEnumeration() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumerationContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropEnumerationLiteral() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION_LITERAL, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowSpecification() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowSpecificationContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_SPECIFICATION, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropInstanceSpecification() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInstanceSpecificationContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropInterface() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INTERFACE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInterfaceContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INTERFACE, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropModel() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.MODEL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropModelContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.MODEL, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropOperation() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.OPERATION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPackage() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PACKAGE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPackageContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PACKAGE, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPrimitiveType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PRIMITIVE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPrimitiveTypeContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PRIMITIVE_TYPE, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReception() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.RECEPTION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSignal() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.SIGNAL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSignalContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.SIGNAL, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropSlot() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.SLOT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropUnit() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.UNIT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropUnitContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.UNIT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueType() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueTypeContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_TYPE, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnPackageCompartmentCN.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnPackageCompartmentCN.java
new file mode 100755
index 0000000..978478a
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/inherited/TestNodeDropOnPackageCompartmentCN.java
@@ -0,0 +1,345 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.inherited;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on Package Compartment CN.
+ */
+public class TestNodeDropOnPackageCompartmentCN extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View elementView = TestPrepareUtils.createGraphicalNode(UMLElementTypes.PACKAGE, ElementTypes.PACKAGE_CN.getSemanticHint(), getDiagramView());
+ containerView = ViewUtil.getChildBySemanticHint(elementView, ElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT);
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActor() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ACTOR, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropActorContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ACTOR, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropBlockContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.BLOCK, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropCommentContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropConstraintBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintBlockContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropConstraintProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDataType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.DATA_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDataTypeContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.DATA_TYPE, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropDimension() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.DIMENSION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropDimensionContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.DIMENSION, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropEnumeration() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropEnumerationContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropEnumerationLiteral() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.ENUMERATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.ENUMERATION_LITERAL, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowSpecification() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowSpecificationContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_SPECIFICATION, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropInstanceSpecification() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInstanceSpecificationContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropInterface() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INTERFACE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropInterfaceContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.INTERFACE, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropModel() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.MODEL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropModelContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.MODEL, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropOperation() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.OPERATION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPackage() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PACKAGE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPackageContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PACKAGE, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPrimitiveType() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PRIMITIVE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPrimitiveTypeContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PRIMITIVE_TYPE, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReception() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.RECEPTION, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSignal() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.SIGNAL, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropSignalContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.SIGNAL, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropSlot() throws Exception {
+ EObject intermediateContainer = createElement(UMLElementTypes.INSTANCE_SPECIFICATION, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.SLOT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropUnit() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.UNIT, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropUnitContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.UNIT, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueType() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_TYPE, getDiagramView());
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueTypeContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_TYPE, ViewUtil.getContainerView(containerView));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/link/TestLinkDropOnModel.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/link/TestLinkDropOnModel.java
new file mode 100755
index 0000000..ac4cdc8
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/link/TestLinkDropOnModel.java
@@ -0,0 +1,128 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.link;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createLink;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for Link DnD tests (via palette tools).
+ */
+public class TestLinkDropOnModel extends AbstractTest {
+
+ public static View container;
+ public static View containerNode;
+
+ public static EObject blockSource;
+ public static EObject blockTarget;
+ public static EObject interfaceTarget;
+
+ public static EObject dependency;
+ public static EObject usage;
+ public static EObject interfaceRealization;
+ public static EObject generalization;
+
+ public static EObject associationComposite;
+ public static EObject associationCompositeDirected;
+ public static EObject associationNone;
+ public static EObject associationNoneDirected;
+ public static EObject associationShared;
+ public static EObject associationSharedDirected;
+
+ @BeforeClass
+ public static void prepare() throws Exception {
+ // Prepare elements for link creation tests
+ containerNode = createGraphicalNode(UMLElementTypes.MODEL, ElementTypes.MODEL.getSemanticHint(), getDiagramView());
+ container = ViewUtil.getChildBySemanticHint(containerNode, ElementTypes.MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT);
+
+ blockSource = createElement(SysMLElementTypes.BLOCK, container);
+ blockTarget = createElement(SysMLElementTypes.BLOCK, container);
+ interfaceTarget = createElement(UMLElementTypes.INTERFACE, container);
+
+ dependency = createLink(UMLElementTypes.DEPENDENCY, blockSource, blockTarget);
+ usage = createLink(UMLElementTypes.USAGE, blockSource, blockTarget);
+ interfaceRealization = createLink(UMLElementTypes.INTERFACE_REALIZATION, blockSource, interfaceTarget);
+ generalization = createLink(UMLElementTypes.GENERALIZATION, blockSource, blockTarget);
+
+ associationComposite = createLink(SysMLElementTypes.ASSOCIATION_COMPOSITE, blockSource, blockTarget);
+ associationCompositeDirected = createLink(SysMLElementTypes.ASSOCIATION_COMPOSITE_DIRECTED, blockSource, blockTarget);
+ associationNone = createLink(SysMLElementTypes.ASSOCIATION_NONE, blockSource, blockTarget);
+ associationNoneDirected = createLink(SysMLElementTypes.ASSOCIATION_NONE_DIRECTED, blockSource, blockTarget);
+ associationShared = createLink(SysMLElementTypes.ASSOCIATION_SHARED, blockSource, blockTarget);
+ associationSharedDirected = createLink(SysMLElementTypes.ASSOCIATION_SHARED_DIRECTED, blockSource, blockTarget);
+ }
+
+ @Test
+ public void dropDependency() throws Exception {
+ dropFromModelExplorer(dependency, container, true);
+ }
+
+ @Test
+ public void dropUsage() throws Exception {
+ dropFromModelExplorer(usage, container, true);
+ }
+
+ @Test
+ public void dropInterfaceRealization() throws Exception {
+ dropFromModelExplorer(interfaceRealization, container, true);
+ }
+
+ @Test
+ public void dropGeneralization() throws Exception {
+ dropFromModelExplorer(generalization, container, true);
+ }
+
+ @Test
+ public void dropAssociationComposite() throws Exception {
+ dropFromModelExplorer(associationComposite, container, true);
+ }
+
+ @Test
+ public void dropAssociationCompositeDirected() throws Exception {
+ dropFromModelExplorer(associationCompositeDirected, container, true);
+ }
+
+ @Test
+ public void dropAssociationNone() throws Exception {
+ dropFromModelExplorer(associationNone, container, true);
+ }
+
+ @Test
+ public void dropAssociationNoneDirected() throws Exception {
+ dropFromModelExplorer(associationNoneDirected, container, true);
+ }
+
+ @Test
+ public void dropAssociationShared() throws Exception {
+ dropFromModelExplorer(associationShared, container, true);
+ }
+
+ @Test
+ public void dropAssociationSharedDirected() throws Exception {
+ dropFromModelExplorer(associationSharedDirected, container, true);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/link/TestLinkDropOnModelCN.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/link/TestLinkDropOnModelCN.java
new file mode 100755
index 0000000..28f91ce
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/link/TestLinkDropOnModelCN.java
@@ -0,0 +1,131 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.link;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createLink;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for Link DnD tests (via palette tools).
+ */
+public class TestLinkDropOnModelCN extends AbstractTest {
+
+ public static View container;
+ public static View containerNode;
+
+ public static EObject blockSource;
+ public static EObject blockTarget;
+ public static EObject interfaceTarget;
+
+ public static EObject dependency;
+ public static EObject usage;
+ public static EObject interfaceRealization;
+ public static EObject generalization;
+
+ public static EObject associationComposite;
+ public static EObject associationCompositeDirected;
+ public static EObject associationNone;
+ public static EObject associationNoneDirected;
+ public static EObject associationShared;
+ public static EObject associationSharedDirected;
+
+ @BeforeClass
+ public static void prepare() throws Exception {
+ // Prepare elements for link creation tests
+ // Prepare elements for link creation tests
+ View topNode = createGraphicalNode(UMLElementTypes.PACKAGE, ElementTypes.PACKAGE.getSemanticHint(), getDiagramView());
+ View topNodeCpt = ViewUtil.getChildBySemanticHint(topNode, ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT);
+ containerNode = createGraphicalNode(UMLElementTypes.MODEL, ElementTypes.MODEL_CN.getSemanticHint(), topNodeCpt);
+ container = ViewUtil.getChildBySemanticHint(containerNode, ElementTypes.MODEL_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT);
+
+ blockSource = createElement(SysMLElementTypes.BLOCK, container);
+ blockTarget = createElement(SysMLElementTypes.BLOCK, container);
+ interfaceTarget = createElement(UMLElementTypes.INTERFACE, container);
+
+ dependency = createLink(UMLElementTypes.DEPENDENCY, blockSource, blockTarget);
+ usage = createLink(UMLElementTypes.USAGE, blockSource, blockTarget);
+ interfaceRealization = createLink(UMLElementTypes.INTERFACE_REALIZATION, blockSource, interfaceTarget);
+ generalization = createLink(UMLElementTypes.GENERALIZATION, blockSource, blockTarget);
+
+ associationComposite = createLink(SysMLElementTypes.ASSOCIATION_COMPOSITE, blockSource, blockTarget);
+ associationCompositeDirected = createLink(SysMLElementTypes.ASSOCIATION_COMPOSITE_DIRECTED, blockSource, blockTarget);
+ associationNone = createLink(SysMLElementTypes.ASSOCIATION_NONE, blockSource, blockTarget);
+ associationNoneDirected = createLink(SysMLElementTypes.ASSOCIATION_NONE_DIRECTED, blockSource, blockTarget);
+ associationShared = createLink(SysMLElementTypes.ASSOCIATION_SHARED, blockSource, blockTarget);
+ associationSharedDirected = createLink(SysMLElementTypes.ASSOCIATION_SHARED_DIRECTED, blockSource, blockTarget);
+ }
+
+ @Test
+ public void dropDependency() throws Exception {
+ dropFromModelExplorer(dependency, container, true);
+ }
+
+ @Test
+ public void dropUsage() throws Exception {
+ dropFromModelExplorer(usage, container, true);
+ }
+
+ @Test
+ public void dropInterfaceRealization() throws Exception {
+ dropFromModelExplorer(interfaceRealization, container, true);
+ }
+
+ @Test
+ public void dropGeneralization() throws Exception {
+ dropFromModelExplorer(generalization, container, true);
+ }
+
+ @Test
+ public void dropAssociationComposite() throws Exception {
+ dropFromModelExplorer(associationComposite, container, true);
+ }
+
+ @Test
+ public void dropAssociationCompositeDirected() throws Exception {
+ dropFromModelExplorer(associationCompositeDirected, container, true);
+ }
+
+ @Test
+ public void dropAssociationNone() throws Exception {
+ dropFromModelExplorer(associationNone, container, true);
+ }
+
+ @Test
+ public void dropAssociationNoneDirected() throws Exception {
+ dropFromModelExplorer(associationNoneDirected, container, true);
+ }
+
+ @Test
+ public void dropAssociationShared() throws Exception {
+ dropFromModelExplorer(associationShared, container, true);
+ }
+
+ @Test
+ public void dropAssociationSharedDirected() throws Exception {
+ dropFromModelExplorer(associationSharedDirected, container, true);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/link/TestLinkDropOnPackage.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/link/TestLinkDropOnPackage.java
new file mode 100755
index 0000000..3196b6c
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/link/TestLinkDropOnPackage.java
@@ -0,0 +1,127 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.link;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createLink;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for Link DnD tests (via palette tools).
+ */
+public class TestLinkDropOnPackage extends AbstractTest {
+
+ public static View container;
+
+ public static EObject blockSource;
+ public static EObject blockTarget;
+ public static EObject interfaceTarget;
+
+ public static EObject dependency;
+ public static EObject usage;
+ public static EObject interfaceRealization;
+ public static EObject generalization;
+
+ public static EObject associationComposite;
+ public static EObject associationCompositeDirected;
+ public static EObject associationNone;
+ public static EObject associationNoneDirected;
+ public static EObject associationShared;
+ public static EObject associationSharedDirected;
+
+ @BeforeClass
+ public static void prepare() throws Exception {
+ // Prepare elements for link creation tests
+ View containerNode = createGraphicalNode(UMLElementTypes.PACKAGE, ElementTypes.PACKAGE.getSemanticHint(), getDiagramView());
+ container = ViewUtil.getChildBySemanticHint(containerNode, ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT);
+
+ blockSource = createElement(SysMLElementTypes.BLOCK, container);
+ blockTarget = createElement(SysMLElementTypes.BLOCK, container);
+ interfaceTarget = createElement(UMLElementTypes.INTERFACE, container);
+
+ dependency = createLink(UMLElementTypes.DEPENDENCY, blockSource, blockTarget);
+ usage = createLink(UMLElementTypes.USAGE, blockSource, blockTarget);
+ interfaceRealization = createLink(UMLElementTypes.INTERFACE_REALIZATION, blockSource, interfaceTarget);
+ generalization = createLink(UMLElementTypes.GENERALIZATION, blockSource, blockTarget);
+
+ associationComposite = createLink(SysMLElementTypes.ASSOCIATION_COMPOSITE, blockSource, blockTarget);
+ associationCompositeDirected = createLink(SysMLElementTypes.ASSOCIATION_COMPOSITE_DIRECTED, blockSource, blockTarget);
+ associationNone = createLink(SysMLElementTypes.ASSOCIATION_NONE, blockSource, blockTarget);
+ associationNoneDirected = createLink(SysMLElementTypes.ASSOCIATION_NONE_DIRECTED, blockSource, blockTarget);
+ associationShared = createLink(SysMLElementTypes.ASSOCIATION_SHARED, blockSource, blockTarget);
+ associationSharedDirected = createLink(SysMLElementTypes.ASSOCIATION_SHARED_DIRECTED, blockSource, blockTarget);
+ }
+
+ @Test
+ public void dropDependency() throws Exception {
+ dropFromModelExplorer(dependency, container, true);
+ }
+
+ @Test
+ public void dropUsage() throws Exception {
+ dropFromModelExplorer(usage, container, true);
+ }
+
+ @Test
+ public void dropInterfaceRealization() throws Exception {
+ dropFromModelExplorer(interfaceRealization, container, true);
+ }
+
+ @Test
+ public void dropGeneralization() throws Exception {
+ dropFromModelExplorer(generalization, container, true);
+ }
+
+ @Test
+ public void dropAssociationComposite() throws Exception {
+ dropFromModelExplorer(associationComposite, container, true);
+ }
+
+ @Test
+ public void dropAssociationCompositeDirected() throws Exception {
+ dropFromModelExplorer(associationCompositeDirected, container, true);
+ }
+
+ @Test
+ public void dropAssociationNone() throws Exception {
+ dropFromModelExplorer(associationNone, container, true);
+ }
+
+ @Test
+ public void dropAssociationNoneDirected() throws Exception {
+ dropFromModelExplorer(associationNoneDirected, container, true);
+ }
+
+ @Test
+ public void dropAssociationShared() throws Exception {
+ dropFromModelExplorer(associationShared, container, true);
+ }
+
+ @Test
+ public void dropAssociationSharedDirected() throws Exception {
+ dropFromModelExplorer(associationSharedDirected, container, true);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/link/TestLinkDropOnPackageCN.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/link/TestLinkDropOnPackageCN.java
new file mode 100755
index 0000000..571b50d
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/dnd/link/TestLinkDropOnPackageCN.java
@@ -0,0 +1,129 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.link;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createLink;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for Link DnD tests (via palette tools).
+ */
+public class TestLinkDropOnPackageCN extends AbstractTest {
+
+ public static View container;
+
+ public static EObject blockSource;
+ public static EObject blockTarget;
+ public static EObject interfaceTarget;
+
+ public static EObject dependency;
+ public static EObject usage;
+ public static EObject interfaceRealization;
+ public static EObject generalization;
+
+ public static EObject associationComposite;
+ public static EObject associationCompositeDirected;
+ public static EObject associationNone;
+ public static EObject associationNoneDirected;
+ public static EObject associationShared;
+ public static EObject associationSharedDirected;
+
+ @BeforeClass
+ public static void prepare() throws Exception {
+ // Prepare elements for link creation tests
+ View topNode = createGraphicalNode(UMLElementTypes.PACKAGE, ElementTypes.PACKAGE.getSemanticHint(), getDiagramView());
+ View topNodeCpt = ViewUtil.getChildBySemanticHint(topNode, ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT);
+ View containerNode = createGraphicalNode(UMLElementTypes.PACKAGE, ElementTypes.PACKAGE_CN.getSemanticHint(), topNodeCpt);
+ container = ViewUtil.getChildBySemanticHint(containerNode, ElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT);
+
+ blockSource = createElement(SysMLElementTypes.BLOCK, container);
+ blockTarget = createElement(SysMLElementTypes.BLOCK, container);
+ interfaceTarget = createElement(UMLElementTypes.INTERFACE, container);
+
+ dependency = createLink(UMLElementTypes.DEPENDENCY, blockSource, blockTarget);
+ usage = createLink(UMLElementTypes.USAGE, blockSource, blockTarget);
+ interfaceRealization = createLink(UMLElementTypes.INTERFACE_REALIZATION, blockSource, interfaceTarget);
+ generalization = createLink(UMLElementTypes.GENERALIZATION, blockSource, blockTarget);
+
+ associationComposite = createLink(SysMLElementTypes.ASSOCIATION_COMPOSITE, blockSource, blockTarget);
+ associationCompositeDirected = createLink(SysMLElementTypes.ASSOCIATION_COMPOSITE_DIRECTED, blockSource, blockTarget);
+ associationNone = createLink(SysMLElementTypes.ASSOCIATION_NONE, blockSource, blockTarget);
+ associationNoneDirected = createLink(SysMLElementTypes.ASSOCIATION_NONE_DIRECTED, blockSource, blockTarget);
+ associationShared = createLink(SysMLElementTypes.ASSOCIATION_SHARED, blockSource, blockTarget);
+ associationSharedDirected = createLink(SysMLElementTypes.ASSOCIATION_SHARED_DIRECTED, blockSource, blockTarget);
+ }
+
+ @Test
+ public void dropDependency() throws Exception {
+ dropFromModelExplorer(dependency, container, true);
+ }
+
+ @Test
+ public void dropUsage() throws Exception {
+ dropFromModelExplorer(usage, container, true);
+ }
+
+ @Test
+ public void dropInterfaceRealization() throws Exception {
+ dropFromModelExplorer(interfaceRealization, container, true);
+ }
+
+ @Test
+ public void dropGeneralization() throws Exception {
+ dropFromModelExplorer(generalization, container, true);
+ }
+
+ @Test
+ public void dropAssociationComposite() throws Exception {
+ dropFromModelExplorer(associationComposite, container, true);
+ }
+
+ @Test
+ public void dropAssociationCompositeDirected() throws Exception {
+ dropFromModelExplorer(associationCompositeDirected, container, true);
+ }
+
+ @Test
+ public void dropAssociationNone() throws Exception {
+ dropFromModelExplorer(associationNone, container, true);
+ }
+
+ @Test
+ public void dropAssociationNoneDirected() throws Exception {
+ dropFromModelExplorer(associationNoneDirected, container, true);
+ }
+
+ @Test
+ public void dropAssociationShared() throws Exception {
+ dropFromModelExplorer(associationShared, container, true);
+ }
+
+ @Test
+ public void dropAssociationSharedDirected() throws Exception {
+ dropFromModelExplorer(associationSharedDirected, container, true);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/providers/TestViewProvider_450921.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/providers/TestViewProvider_450921.java
new file mode 100755
index 0000000..0576be4
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/providers/TestViewProvider_450921.java
@@ -0,0 +1,62 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.providers;
+
+import org.junit.Assert;
+
+import org.eclipse.gmf.runtime.common.core.service.IOperation;
+import org.eclipse.gmf.runtime.diagram.core.services.view.CreateNodeViewOperation;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.CustomViewProvider;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Proposed fix for #450921 allows null semantic adapters to be passed to papyrus ViewProvider's.
+ * (Before the patch, all null semantic adapters were filtered by the CreateViewCommand).
+ * This test verifies that the sysml view providers do not fail facing now allowed null adapters.
+ */
+public class TestViewProvider_450921 extends AbstractTest {
+
+ protected CustomViewProvider provider;
+
+ protected View diagram;
+
+ @Before
+ public void setUp() throws Exception {
+ provider = new CustomViewProvider();
+ diagram = EditorUtils.getDiagramView();
+ }
+
+ @Test
+ public void testNullSemanticAdapter() throws Exception {
+ IOperation o = new CreateNodeViewOperation(null, diagram, SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_CLASSIFIER_ID, -1, false, EditorUtils.getDiagramEditPart().getDiagramPreferencesHint());
+ Assert.assertTrue("Provider should provide node while semantic adapter null", provider.provides(o));
+ }
+
+ @Test
+ public void testNullSemanticAdapterAndEmptyHint() throws Exception {
+ IOperation o = new CreateNodeViewOperation(null, diagram, "", -1, false, EditorUtils.getDiagramEditPart().getDiagramPreferencesHint());
+ Assert.assertFalse("Provider should not provide undefined element", provider.provides(o));
+ }
+
+ @Test
+ public void testNullSemanticAdapterAndDabHint() throws Exception {
+ IOperation o = new CreateNodeViewOperation(null, diagram, "Bad hint", -1, false, EditorUtils.getDiagramEditPart().getDiagramPreferencesHint());
+ Assert.assertFalse("Provider should not provide undefined element", provider.provides(o));
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/showhideelements/TestCompartmentUtils.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/showhideelements/TestCompartmentUtils.java
new file mode 100755
index 0000000..47db8a7
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/showhideelements/TestCompartmentUtils.java
@@ -0,0 +1,136 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.showhideelements;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestUtils.createNodeFromPalette;
+
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IResizableCompartmentEditPart;
+import org.eclipse.gmf.runtime.notation.NotationFactory;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils;
+import org.eclipse.papyrus.uml.diagram.common.editparts.ClassifierEditPart;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ClassifierFigure;
+import org.eclipse.papyrus.uml.diagram.common.util.CompartmentUtils;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * Test Class for {@link CompartmentUtils}
+ */
+public class TestCompartmentUtils extends AbstractTest {
+
+ /** view to select, copy and paste */
+ private static EditPart blockEditPart1;
+
+ /** additional view to select, copy and paste a list of elements */
+ private static EditPart blockEditPart2;
+
+ /**
+ * Prepare the diagram before testing
+ *
+ * @throws Exception
+ * exception thrown in case of problem
+ */
+ @BeforeClass
+ public static void prepareBlockForTest() throws Exception {
+ try {
+ createNodeFromPalette("blockdefinition.tool.block", getDiagramView(), true);
+ blockEditPart1 = (EditPart)EditorUtils.getDiagramEditPart().getChildren().get(0);
+
+ if(blockEditPart1 == null) {
+ throw new Exception("Unable to prepare block for test.");
+ }
+
+ createNodeFromPalette("blockdefinition.tool.block", getDiagramView(), true);
+ blockEditPart2 = (EditPart)EditorUtils.getDiagramEditPart().getChildren().get(1);
+
+ if(blockEditPart2 == null) {
+ throw new Exception("Unable to prepare block for test.");
+ }
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare block for test.", e);
+ }
+ }
+
+ /**
+ * Test for {@link CompartmentUtils#getAllCompartmentsEditPart(org.eclipse.gef.EditPart, boolean)}
+ */
+ @Test
+ public void getAllCompartmentEditParts() {
+ List<IResizableCompartmentEditPart> parts1 = CompartmentUtils.getAllCompartmentsEditPart(blockEditPart1, true);
+// Assert.assertEquals(3, parts1.size());
+ List<IResizableCompartmentEditPart> parts2 = CompartmentUtils.getAllCompartmentsEditPart(blockEditPart2, false);
+// Assert.assertEquals(3, parts2.size());
+ }
+
+ /**
+ * Basic class for {@link ClassifierEditPart}
+ */
+ protected static class TestClassifierEditPart extends ClassifierEditPart {
+
+ /** main shape */
+ private ClassifierFigure primaryShape;
+
+ /**
+ * Constructor.
+ *
+ * @param view
+ * view associate to this edit part
+ */
+ public TestClassifierEditPart(View view) {
+ super(view);
+ // addChild(new LabelEditPart(null), -1);
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createNodeShape() {
+ return primaryShape = new ClassifierFigure();
+ }
+
+ /**
+ * @generated
+ */
+ public ClassifierFigure getPrimaryShape() {
+ return (ClassifierFigure)primaryShape;
+ }
+
+ @Override
+ protected IFigure createNodePlate() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ protected IFigure setupContentPane(IFigure nodeShape) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ }
+
+ /**
+ * @return
+ */
+ public static View createViewForClassifier() {
+ return NotationFactory.eINSTANCE.createShape();
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/suites/AllCanonicalTests.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/suites/AllCanonicalTests.java
new file mode 100755
index 0000000..a48494e
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/suites/AllCanonicalTests.java
@@ -0,0 +1,14 @@
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.suites;
+
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.canonical.TestAggregationValue;
+import org.junit.runner.RunWith;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.junit.runners.Suite.SuiteClasses;
+
+
+@RunWith(ClassificationSuite.class)
+@SuiteClasses({
+ TestAggregationValue.class })
+public class AllCanonicalTests {
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/suites/AllCopyPasteTests.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/suites/AllCopyPasteTests.java
new file mode 100755
index 0000000..0115b4c
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/suites/AllCopyPasteTests.java
@@ -0,0 +1,29 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.suites;
+
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.copypaste.TestCopyGraphicallyPasteBlock;
+import org.junit.runner.RunWith;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.junit.runners.Suite.SuiteClasses;
+
+
+/**
+ * Test suite for Copy/Paste/PasteWithModel actions
+ */
+@RunWith(ClassificationSuite.class)
+@SuiteClasses({
+ TestCopyGraphicallyPasteBlock.class,
+})
+public class AllCopyPasteTests {
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/suites/AllCreationAssociationTests.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/suites/AllCreationAssociationTests.java
new file mode 100755
index 0000000..7746c6a
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/suites/AllCreationAssociationTests.java
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.suites;
+
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.link.association.TestLinkCreationAssociationCompositeDirectedForSources;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.link.association.TestLinkCreationAssociationCompositeDirectedFromBlock;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.link.association.TestLinkCreationAssociationCompositeForSources;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.link.association.TestLinkCreationAssociationCompositeFromBlock;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.link.association.TestLinkCreationAssociationNoneDirectedForSources;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.link.association.TestLinkCreationAssociationNoneDirectedFromBlock;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.link.association.TestLinkCreationAssociationNoneForSources;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.link.association.TestLinkCreationAssociationNoneFromBlock;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.link.association.TestLinkCreationAssociationSharedDirectedForSources;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.link.association.TestLinkCreationAssociationSharedDirectedFromBlock;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.link.association.TestLinkCreationAssociationSharedForSources;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.link.association.TestLinkCreationAssociationSharedFromBlock;
+import org.junit.runner.RunWith;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.junit.runners.Suite.SuiteClasses;
+
+
+@RunWith(ClassificationSuite.class)
+@SuiteClasses({
+ TestLinkCreationAssociationCompositeDirectedForSources.class,
+ TestLinkCreationAssociationCompositeForSources.class,
+ TestLinkCreationAssociationNoneDirectedForSources.class,
+ TestLinkCreationAssociationNoneForSources.class,
+ TestLinkCreationAssociationSharedDirectedForSources.class,
+ TestLinkCreationAssociationSharedForSources.class,
+ TestLinkCreationAssociationCompositeFromBlock.class,
+ TestLinkCreationAssociationCompositeDirectedFromBlock.class,
+ TestLinkCreationAssociationNoneFromBlock.class,
+ TestLinkCreationAssociationNoneDirectedFromBlock.class,
+ TestLinkCreationAssociationSharedFromBlock.class,
+ TestLinkCreationAssociationSharedDirectedFromBlock.class
+ })
+public class AllCreationAssociationTests {
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/suites/AllCreationCustomTests.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/suites/AllCreationCustomTests.java
new file mode 100755
index 0000000..1411bc8
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/suites/AllCreationCustomTests.java
@@ -0,0 +1,93 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.suites;
+
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom.TestNodeCreationOnActor;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom.TestNodeCreationOnActorOperationCompartment;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom.TestNodeCreationOnActorPropertyCompartment;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom.TestNodeCreationOnBlock;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom.TestNodeCreationOnBlockConstraintCompartment;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom.TestNodeCreationOnBlockFlowPortCompartment;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom.TestNodeCreationOnBlockOperationCompartment;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom.TestNodeCreationOnBlockPartCompartment;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom.TestNodeCreationOnBlockPortCompartment;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom.TestNodeCreationOnBlockPropertyCompartment;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom.TestNodeCreationOnBlockReferenceCompartment;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom.TestNodeCreationOnBlockValueCompartment;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom.TestNodeCreationOnConstraintBlock;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom.TestNodeCreationOnConstraintBlockConstraintCompartment;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom.TestNodeCreationOnConstraintBlockParameterCompartment;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom.TestNodeCreationOnDataType;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom.TestNodeCreationOnDataTypeOperationCompartment;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom.TestNodeCreationOnDataTypePropertyCompartment;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom.TestNodeCreationOnDimension;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom.TestNodeCreationOnEnumeration;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom.TestNodeCreationOnEnumerationLiteralCompartment;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom.TestNodeCreationOnFlowSpecification;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom.TestNodeCreationOnFlowSpecificationFlowCompartment;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom.TestNodeCreationOnInterface;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom.TestNodeCreationOnInterfaceOperationCompartment;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom.TestNodeCreationOnInterfacePropertyCompartment;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom.TestNodeCreationOnPrimitiveType;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom.TestNodeCreationOnSignal;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom.TestNodeCreationOnSignalOperationCompartment;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom.TestNodeCreationOnSignalPropertyCompartment;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom.TestNodeCreationOnUnit;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom.TestNodeCreationOnValueType;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom.TestNodeCreationOnValueTypeOperationCompartment;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.custom.TestNodeCreationOnValueTypePropertyCompartment;
+import org.junit.runner.RunWith;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.junit.runners.Suite.SuiteClasses;
+
+
+@RunWith(ClassificationSuite.class)
+@SuiteClasses({
+ TestNodeCreationOnActor.class,
+ TestNodeCreationOnActorOperationCompartment.class,
+ TestNodeCreationOnActorPropertyCompartment.class,
+ TestNodeCreationOnBlock.class,
+ TestNodeCreationOnBlockConstraintCompartment.class,
+ TestNodeCreationOnBlockFlowPortCompartment.class,
+ TestNodeCreationOnBlockOperationCompartment.class,
+ TestNodeCreationOnBlockPartCompartment.class,
+ TestNodeCreationOnBlockPortCompartment.class,
+ TestNodeCreationOnBlockPropertyCompartment.class,
+ TestNodeCreationOnBlockReferenceCompartment.class,
+ TestNodeCreationOnBlockValueCompartment.class,
+ TestNodeCreationOnConstraintBlock.class,
+ TestNodeCreationOnConstraintBlockConstraintCompartment.class,
+ TestNodeCreationOnConstraintBlockParameterCompartment.class,
+ TestNodeCreationOnDataType.class,
+ TestNodeCreationOnDataTypeOperationCompartment.class,
+ TestNodeCreationOnDataTypePropertyCompartment.class,
+ TestNodeCreationOnDimension.class,
+ TestNodeCreationOnEnumeration.class,
+ TestNodeCreationOnEnumerationLiteralCompartment.class,
+ TestNodeCreationOnFlowSpecification.class,
+ TestNodeCreationOnFlowSpecificationFlowCompartment.class,
+ TestNodeCreationOnInterface.class,
+ TestNodeCreationOnInterfaceOperationCompartment.class,
+ TestNodeCreationOnInterfacePropertyCompartment.class,
+ TestNodeCreationOnPrimitiveType.class,
+ TestNodeCreationOnSignal.class,
+ TestNodeCreationOnSignalOperationCompartment.class,
+ TestNodeCreationOnSignalPropertyCompartment.class,
+ TestNodeCreationOnUnit.class,
+ TestNodeCreationOnValueType.class,
+ TestNodeCreationOnValueTypeOperationCompartment.class,
+ TestNodeCreationOnValueTypePropertyCompartment.class })
+public class AllCreationCustomTests {
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/suites/AllCreationInheritedTests.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/suites/AllCreationInheritedTests.java
new file mode 100755
index 0000000..2410da2
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/suites/AllCreationInheritedTests.java
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.suites;
+
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.inherited.TestNodeCreationOnInstanceSpecificationCN;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.inherited.TestNodeCreationOnInstanceSpecificationCompartment;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.inherited.TestNodeCreationOnInstanceSpecificationCompartmentCN;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.inherited.TestNodeCreationOnModel;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.inherited.TestNodeCreationOnModelCN;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.inherited.TestNodeCreationOnModelCompartment;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.inherited.TestNodeCreationOnModelCompartmentCN;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.inherited.TestNodeCreationOnPackage;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.inherited.TestNodeCreationOnPackageCN;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.inherited.TestNodeCreationOnPackageCompartment;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.inherited.TestNodeCreationOnPackageCompartmentCN;
+import org.junit.runner.RunWith;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.junit.runners.Suite.SuiteClasses;
+
+@RunWith(ClassificationSuite.class)
+@SuiteClasses({
+ //TestNodeCreationOnComment.class,
+ //TestNodeCreationOnCommentCN.class,
+ //TestNodeCreationOnConstraint.class,
+ //TestNodeCreationOnConstraintCN.class,
+ //TestNodeCreationOnInstanceSpecification.class,
+ TestNodeCreationOnInstanceSpecificationCN.class,
+ TestNodeCreationOnInstanceSpecificationCompartment.class,
+ TestNodeCreationOnInstanceSpecificationCompartmentCN.class,
+ TestNodeCreationOnModel.class,
+ TestNodeCreationOnModelCN.class,
+ TestNodeCreationOnModelCompartment.class,
+ TestNodeCreationOnModelCompartmentCN.class,
+ TestNodeCreationOnPackage.class,
+ TestNodeCreationOnPackageCN.class,
+ TestNodeCreationOnPackageCompartment.class,
+ TestNodeCreationOnPackageCompartmentCN.class })
+public class AllCreationInheritedTests {
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/suites/AllCreationLinkTests.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/suites/AllCreationLinkTests.java
new file mode 100755
index 0000000..21f40df
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/suites/AllCreationLinkTests.java
@@ -0,0 +1,47 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.suites;
+
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.link.TestLinkCreationCommentConstraintForSources;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.link.TestLinkCreationCommentConstraintFromComment;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.link.TestLinkCreationCommentConstraintFromConstraint;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.link.TestLinkCreationDependencyForSources;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.link.TestLinkCreationDependencyFromBlock;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.link.TestLinkCreationGeneralizationForSources;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.link.TestLinkCreationGeneralizationFromBlock;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.link.TestLinkCreationInterfaceRealizationForSources;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.link.TestLinkCreationInterfaceRealizationFromBlock;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.link.TestLinkCreationUsageForSources;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.link.TestLinkCreationUsageFromBlock;
+import org.junit.runner.RunWith;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.junit.runners.Suite.SuiteClasses;
+
+
+@RunWith(ClassificationSuite.class)
+@SuiteClasses({
+ TestLinkCreationDependencyForSources.class,
+ TestLinkCreationGeneralizationForSources.class,
+ TestLinkCreationDependencyFromBlock.class,
+ TestLinkCreationGeneralizationFromBlock.class,
+ TestLinkCreationInterfaceRealizationForSources.class,
+ TestLinkCreationInterfaceRealizationFromBlock.class,
+ TestLinkCreationUsageForSources.class,
+ TestLinkCreationUsageFromBlock.class,
+ TestLinkCreationCommentConstraintForSources.class,
+ TestLinkCreationCommentConstraintFromComment.class,
+ TestLinkCreationCommentConstraintFromConstraint.class })
+public class AllCreationLinkTests {
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/suites/AllDeletionTests.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/suites/AllDeletionTests.java
new file mode 100755
index 0000000..396bec6
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/suites/AllDeletionTests.java
@@ -0,0 +1,33 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.suites;
+
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.delete.TestLinkBasicDeleteFromDiagram;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.delete.TestLinkBasicDeleteFromModel;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.delete.TestNodeBasicDeleteFromDiagram;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.delete.TestNodeBasicDeleteFromModel;
+import org.junit.runner.RunWith;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.junit.runners.Suite.SuiteClasses;
+
+
+@RunWith(ClassificationSuite.class)
+@SuiteClasses({
+ TestLinkBasicDeleteFromDiagram.class,
+ TestLinkBasicDeleteFromModel.class,
+ TestNodeBasicDeleteFromDiagram.class,
+ TestNodeBasicDeleteFromModel.class })
+public class AllDeletionTests {
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/suites/AllDiagramTests.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/suites/AllDiagramTests.java
new file mode 100755
index 0000000..82c88b8
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/suites/AllDiagramTests.java
@@ -0,0 +1,36 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.suites;
+
+import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.TestDiagramCreation;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.creation.TestNodeCreationOnDiagram;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.Bug481317_MoveGeneralizationTest;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.TestLinkDropOnDiagram;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.TestNodeDropOnDiagram;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite.SuiteClasses;
+
+
+@RunWith(ClassificationSuite.class)
+@SuiteClasses({
+ TestDiagramCreation.class,
+ TestNodeCreationOnDiagram.class,
+ TestNodeDropOnDiagram.class,
+ TestLinkDropOnDiagram.class,
+ Bug481317_MoveGeneralizationTest.class
+})
+public class AllDiagramTests {
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/suites/AllDnDCustomTests.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/suites/AllDnDCustomTests.java
new file mode 100755
index 0000000..f8e3b25
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/suites/AllDnDCustomTests.java
@@ -0,0 +1,93 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.suites;
+
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom.TestNodeDropOnActor;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom.TestNodeDropOnActorOperationCompartment;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom.TestNodeDropOnActorPropertyCompartment;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom.TestNodeDropOnBlock;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom.TestNodeDropOnBlockConstraintCompartment;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom.TestNodeDropOnBlockFlowPortCompartment;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom.TestNodeDropOnBlockOperationCompartment;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom.TestNodeDropOnBlockPartCompartment;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom.TestNodeDropOnBlockPortCompartment;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom.TestNodeDropOnBlockPropertyCompartment;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom.TestNodeDropOnBlockReferenceCompartment;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom.TestNodeDropOnBlockValueCompartment;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom.TestNodeDropOnConstraintBlock;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom.TestNodeDropOnConstraintBlockConstraintCompartment;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom.TestNodeDropOnConstraintBlockParameterCompartment;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom.TestNodeDropOnDataType;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom.TestNodeDropOnDataTypeOperationCompartment;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom.TestNodeDropOnDataTypePropertyCompartment;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom.TestNodeDropOnDimension;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom.TestNodeDropOnEnumeration;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom.TestNodeDropOnEnumerationCompartment;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom.TestNodeDropOnFlowSpecification;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom.TestNodeDropOnFlowSpecificationCompartment;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom.TestNodeDropOnInterface;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom.TestNodeDropOnInterfaceOperationCompartment;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom.TestNodeDropOnInterfacePropertyCompartment;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom.TestNodeDropOnPrimitiveType;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom.TestNodeDropOnSignal;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom.TestNodeDropOnSignalOperationCompartment;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom.TestNodeDropOnSignalPropertyCompartment;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom.TestNodeDropOnUnit;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom.TestNodeDropOnValueType;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom.TestNodeDropOnValueTypeOperationCompartment;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.custom.TestNodeDropOnValueTypePropertyCompartment;
+import org.junit.runner.RunWith;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.junit.runners.Suite.SuiteClasses;
+
+
+@RunWith(ClassificationSuite.class)
+@SuiteClasses({
+ TestNodeDropOnActor.class,
+ TestNodeDropOnActorOperationCompartment.class,
+ TestNodeDropOnActorPropertyCompartment.class,
+ TestNodeDropOnBlock.class,
+ TestNodeDropOnBlockConstraintCompartment.class,
+ TestNodeDropOnBlockFlowPortCompartment.class,
+ TestNodeDropOnBlockOperationCompartment.class,
+ TestNodeDropOnBlockPartCompartment.class,
+ TestNodeDropOnBlockPortCompartment.class,
+ TestNodeDropOnBlockPropertyCompartment.class,
+ TestNodeDropOnBlockReferenceCompartment.class,
+ TestNodeDropOnBlockValueCompartment.class,
+ TestNodeDropOnConstraintBlock.class,
+ TestNodeDropOnConstraintBlockConstraintCompartment.class,
+ TestNodeDropOnConstraintBlockParameterCompartment.class,
+ TestNodeDropOnDataType.class,
+ TestNodeDropOnDataTypeOperationCompartment.class,
+ TestNodeDropOnDataTypePropertyCompartment.class,
+ TestNodeDropOnDimension.class,
+ TestNodeDropOnEnumeration.class,
+ TestNodeDropOnEnumerationCompartment.class,
+ TestNodeDropOnFlowSpecification.class,
+ TestNodeDropOnFlowSpecificationCompartment.class,
+ TestNodeDropOnInterface.class,
+ TestNodeDropOnInterfaceOperationCompartment.class,
+ TestNodeDropOnInterfacePropertyCompartment.class,
+ TestNodeDropOnPrimitiveType.class,
+ TestNodeDropOnSignal.class,
+ TestNodeDropOnSignalOperationCompartment.class,
+ TestNodeDropOnSignalPropertyCompartment.class,
+ TestNodeDropOnUnit.class,
+ TestNodeDropOnValueType.class,
+ TestNodeDropOnValueTypeOperationCompartment.class,
+ TestNodeDropOnValueTypePropertyCompartment.class })
+public class AllDnDCustomTests {
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/suites/AllDnDInheritedTests.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/suites/AllDnDInheritedTests.java
new file mode 100755
index 0000000..a0f1b4a
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/suites/AllDnDInheritedTests.java
@@ -0,0 +1,57 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.suites;
+
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.inherited.TestNodeDropOnComment;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.inherited.TestNodeDropOnCommentCN;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.inherited.TestNodeDropOnConstraint;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.inherited.TestNodeDropOnConstraintCN;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.inherited.TestNodeDropOnInstanceSpecification;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.inherited.TestNodeDropOnInstanceSpecificationCN;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.inherited.TestNodeDropOnInstanceSpecificationCompartment;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.inherited.TestNodeDropOnInstanceSpecificationCompartmentCN;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.inherited.TestNodeDropOnModel;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.inherited.TestNodeDropOnModelCN;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.inherited.TestNodeDropOnModelCompartment;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.inherited.TestNodeDropOnModelCompartmentCN;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.inherited.TestNodeDropOnPackage;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.inherited.TestNodeDropOnPackageCN;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.inherited.TestNodeDropOnPackageCompartment;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.inherited.TestNodeDropOnPackageCompartmentCN;
+import org.junit.runner.RunWith;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.junit.runners.Suite.SuiteClasses;
+
+
+@RunWith(ClassificationSuite.class)
+@SuiteClasses({
+ TestNodeDropOnComment.class,
+ TestNodeDropOnCommentCN.class,
+ TestNodeDropOnConstraint.class,
+ TestNodeDropOnConstraintCN.class,
+ TestNodeDropOnInstanceSpecification.class,
+ TestNodeDropOnInstanceSpecificationCN.class,
+ TestNodeDropOnInstanceSpecificationCompartment.class,
+ TestNodeDropOnInstanceSpecificationCompartmentCN.class,
+ TestNodeDropOnModel.class,
+ TestNodeDropOnModelCN.class,
+ TestNodeDropOnModelCompartment.class,
+ TestNodeDropOnModelCompartmentCN.class,
+ TestNodeDropOnPackage.class,
+ TestNodeDropOnPackageCN.class,
+ TestNodeDropOnPackageCompartment.class,
+ TestNodeDropOnPackageCompartmentCN.class })
+public class AllDnDInheritedTests {
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/suites/AllDnDLinkTests.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/suites/AllDnDLinkTests.java
new file mode 100755
index 0000000..419a1b5
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/suites/AllDnDLinkTests.java
@@ -0,0 +1,27 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.suites;
+
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.link.TestLinkDropOnModel;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.dnd.link.TestLinkDropOnPackage;
+import org.junit.runner.RunWith;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.junit.runners.Suite.SuiteClasses;
+
+
+@RunWith(ClassificationSuite.class)
+@SuiteClasses({ TestLinkDropOnModel.class, TestLinkDropOnPackage.class })
+public class AllDnDLinkTests {
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/suites/AllProviderTests.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/suites/AllProviderTests.java
new file mode 100755
index 0000000..8876e13
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/suites/AllProviderTests.java
@@ -0,0 +1,25 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.suites;
+
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.providers.TestViewProvider_450921;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
+
+@RunWith(Suite.class)
+@SuiteClasses({ TestViewProvider_450921.class })
+public class AllProviderTests {
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/suites/AllTests.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/suites/AllTests.java
new file mode 100755
index 0000000..1f6d02f
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/suites/AllTests.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.suites;
+
+import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite.SuiteClasses;
+
+/**
+ * Main test suite class
+ */
+@RunWith(ClassificationSuite.class)
+@SuiteClasses({
+ AllCopyPasteTests.class,
+ AllCreationCustomTests.class,
+ AllCreationInheritedTests.class,
+ AllDiagramTests.class,
+ AllDnDCustomTests.class,
+ AllDnDInheritedTests.class,
+ AllCreationLinkTests.class,
+ AllCreationAssociationTests.class,
+ AllDnDLinkTests.class,
+ AllDeletionTests.class,
+ AllUtilsTests.class,
+ AllCanonicalTests.class,
+ AllProviderTests.class
+})
+public class AllTests {
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/suites/AllUtilsTests.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/suites/AllUtilsTests.java
new file mode 100755
index 0000000..87a257c
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/suites/AllUtilsTests.java
@@ -0,0 +1,28 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.suites;
+
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.showhideelements.TestCompartmentUtils;
+import org.junit.runner.RunWith;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.junit.runners.Suite.SuiteClasses;
+
+
+/**
+ * Test Suite for all classes in this package
+ */
+@RunWith(ClassificationSuite.class)
+@SuiteClasses({ TestCompartmentUtils.class, })
+public class AllUtilsTests {
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/utils/EditorUtils.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/utils/EditorUtils.java
new file mode 100755
index 0000000..490e21b
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/utils/EditorUtils.java
@@ -0,0 +1,145 @@
+/*****************************************************************************
+ * Copyright (c) 2011, 2016 CEA LIST, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus - bug 485220
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils;
+
+import java.util.Iterator;
+
+import org.eclipse.emf.common.command.CommandStack;
+import org.eclipse.emf.transaction.RunnableWithResult;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.Tool;
+import org.eclipse.gef.util.EditPartUtilities;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramCommandStack;
+import org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramEditDomain;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.core.utils.ServiceUtils;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.BlockDefinitionDiagramForMultiEditor;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.factory.DiagramPaletteFactory;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PlatformUI;
+
+
+public class EditorUtils {
+
+ public static BlockDefinitionDiagramForMultiEditor getDiagramEditor() throws Exception {
+
+ ServicesRegistry serviceRegistry = getEditor().getAdapter(ServicesRegistry.class);
+ try {
+ IEditorPart activeEditor = ServiceUtils.getInstance().getService(ISashWindowsContainer.class, serviceRegistry).getActiveEditor();
+ return (BlockDefinitionDiagramForMultiEditor) activeEditor;
+ } catch (ServiceException e) {
+ throw new Exception("Unable to retrieve service.", e);
+ } catch (ClassCastException e) {
+ throw new Exception("Active diagram is not a BDD.", e);
+ }
+ }
+
+ public static DiagramEditPart getDiagramEditPart() throws Exception {
+
+ try {
+ return getDiagramEditor().getDiagramEditPart();
+
+ } catch (NullPointerException e) {
+ throw new Exception("Could not find diagram edit part.", e);
+ }
+ }
+
+ public static Diagram getDiagramView() throws Exception {
+
+ try {
+ return getDiagramEditor().getDiagram();
+
+ } catch (NullPointerException e) {
+ throw new Exception("Could not find diagram view.", e);
+ }
+ }
+
+ public static EditPart getEditPart(View view) throws Exception {
+
+ // Test if the container is the diagram itself first
+ if (getDiagramEditPart().getModel() == view) {
+ return getDiagramEditPart();
+ }
+
+ // Test diagram children and look for the view
+ @SuppressWarnings("unchecked")
+ Iterator<EditPart> it = EditPartUtilities.getAllChildren(getDiagramEditPart()).iterator();
+ while (it.hasNext()) {
+ EditPart editPart = it.next();
+ if (editPart.getModel() == view) {
+ return editPart;
+ }
+ }
+
+ // Test diagram nested connections and look for the view
+ @SuppressWarnings("unchecked")
+ Iterator<EditPart> itLinks = EditPartUtilities.getAllNestedConnectionEditParts(getDiagramEditPart()).iterator();
+ while (itLinks.hasNext()) {
+ EditPart editPart = itLinks.next();
+ if (editPart.getModel() == view) {
+ return editPart;
+ }
+ }
+
+ throw new Exception("Unable to find edit part for the given view.");
+ }
+
+ public static Tool getPaletteTool(String toolId) throws Exception {
+ DiagramPaletteFactory factory = new DiagramPaletteFactory();
+ return factory.createTool(toolId);
+ }
+
+ public static IDiagramEditDomain getDiagramEditingDomain() throws Exception {
+ return getDiagramEditor().getDiagramEditDomain();
+ }
+
+ public static DiagramCommandStack getDiagramCommandStack() throws Exception {
+ return getDiagramEditingDomain().getDiagramCommandStack();
+ }
+
+ public static CommandStack getCommandStack() throws Exception {
+ return getTransactionalEditingDomain().getCommandStack();
+ }
+
+ public static TransactionalEditingDomain getTransactionalEditingDomain() throws Exception {
+
+ ServicesRegistry serviceRegistry = getEditor().getAdapter(ServicesRegistry.class);
+ try {
+ return ServiceUtils.getInstance().getTransactionalEditingDomain(serviceRegistry);
+
+ } catch (ServiceException e) {
+ throw new Exception("Unable to retrieve service.", e);
+ }
+ }
+
+ public static IEditorPart getEditor() throws Exception {
+ RunnableWithResult<IEditorPart> getEditorRunnable = new RunnableWithResult.Impl<IEditorPart>() {
+
+ public void run() {
+ setResult(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor());
+ }
+ };
+ Display.getDefault().syncExec(getEditorRunnable);
+ return getEditorRunnable.getResult();
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/utils/TestPrepareUtils.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/utils/TestPrepareUtils.java
new file mode 100755
index 0000000..5d05dbf
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/utils/TestPrepareUtils.java
@@ -0,0 +1,211 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramCommandStack;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getEditPart;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getTransactionalEditingDomain;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.edit.command.SetCommand;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.RequestConstants;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.diagram.ui.commands.CreateCommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest.ViewDescriptor;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest;
+import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
+import org.eclipse.gmf.runtime.emf.type.core.IClientContext;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.gmfdiag.common.helper.DiagramHelper;
+import org.eclipse.papyrus.infra.services.edit.commands.ConfigureFeatureCommandFactory;
+import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory;
+import org.eclipse.papyrus.infra.services.edit.context.TypeContext;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.utils.GMFCommandUtils;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.Activator;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.commands.SemanticAdapter;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.Assert;
+
+
+public class TestPrepareUtils {
+
+ public static void changeVisibility(View view) throws Exception {
+ SetCommand changeVisibilityCommand = new SetCommand(getTransactionalEditingDomain(), view, NotationPackage.eINSTANCE.getView_Visible(), !view.isVisible());
+ //getCommandStack().execute(new EMFtoGEFCommandWrapper(changeVisibilityCommand));
+ getTransactionalEditingDomain().getCommandStack().execute(changeVisibilityCommand);
+
+ //Workaround for CSS refresh issue (Bug 416737: [CSS] Setters of the CSS runtime notation API don't take into consideration CSS values)
+ DiagramHelper.refresh(EditorUtils.getDiagramEditPart(), true);
+ }
+
+ public static EObject createElement(IElementType elementType, View containerView) throws Exception {
+ return createElement(elementType, containerView.getElement());
+ }
+
+ @SuppressWarnings("unchecked")
+ public static EObject createElement(IElementType elementType, EObject container) throws Exception {
+ CreateElementRequest createElementRequest = new CreateElementRequest(getTransactionalEditingDomain(), container, elementType);
+
+ if(elementType == SysMLElementTypes.PART_PROPERTY) {
+ // Create type
+ CreateElementRequest createTypeRequest = new CreateElementRequest(getTransactionalEditingDomain(), container.eContainer(), SysMLElementTypes.BLOCK);
+ ICommand createTypeCommand = ElementEditServiceUtils.getCommandProvider(container.eContainer()).getEditCommand(createTypeRequest);
+ getDiagramCommandStack().execute(new ICommandProxy(createTypeCommand));
+
+ createElementRequest.getParameters().put(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new ConfigureFeatureCommandFactory(UMLPackage.eINSTANCE.getTypedElement_Type(), GMFCommandUtils.getCommandEObjectResult(createTypeCommand)));
+
+ } else if(elementType == SysMLElementTypes.REFERENCE_PROPERTY) {
+ // Create type
+ CreateElementRequest createTypeRequest = new CreateElementRequest(getTransactionalEditingDomain(), container.eContainer(), SysMLElementTypes.BLOCK);
+ ICommand createTypeCommand = ElementEditServiceUtils.getCommandProvider(container.eContainer()).getEditCommand(createTypeRequest);
+ getDiagramCommandStack().execute(new ICommandProxy(createTypeCommand));
+
+ createElementRequest.getParameters().put(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new ConfigureFeatureCommandFactory(UMLPackage.eINSTANCE.getTypedElement_Type(), GMFCommandUtils.getCommandEObjectResult(createTypeCommand)));
+
+ } else if(elementType == SysMLElementTypes.VALUE_PROPERTY) {
+ // Create type
+ CreateElementRequest createTypeRequest = new CreateElementRequest(getTransactionalEditingDomain(), container.eContainer(), UMLElementTypes.DATA_TYPE);
+ ICommand createTypeCommand = ElementEditServiceUtils.getCommandProvider(container.eContainer()).getEditCommand(createTypeRequest);
+ getDiagramCommandStack().execute(new ICommandProxy(createTypeCommand));
+
+ createElementRequest.getParameters().put(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new ConfigureFeatureCommandFactory(UMLPackage.eINSTANCE.getTypedElement_Type(), GMFCommandUtils.getCommandEObjectResult(createTypeCommand)));
+
+ }
+
+ ICommand createElementCommand = ElementEditServiceUtils.getCommandProvider(container).getEditCommand(createElementRequest);
+ getDiagramCommandStack().execute(new ICommandProxy(createElementCommand));
+
+ return GMFCommandUtils.getCommandEObjectResult(createElementCommand);
+ }
+
+ public static EObject createLink(IElementType elementType, EObject source, EObject target) throws Exception {
+ CreateRelationshipRequest createRelationshipRequest = new CreateRelationshipRequest(getTransactionalEditingDomain(), source, target, elementType);
+
+ IClientContext context;
+ try {
+ context = TypeContext.getContext(getTransactionalEditingDomain());
+ } catch (ServiceException e) {
+ return null;
+ }
+
+ ICommand createRelationshipCommand = ElementEditServiceUtils.getCommandProvider(elementType, context).getEditCommand(createRelationshipRequest);
+ getDiagramCommandStack().execute(new ICommandProxy(createRelationshipCommand));
+
+ return GMFCommandUtils.getCommandEObjectResult(createRelationshipCommand);
+ }
+
+ public static View createGraphicalNode(IElementType elementType, String graphicalType, View containerView) throws Exception {
+
+ EObject newObject = createElement(elementType, containerView);
+
+ // Add view
+ ViewDescriptor viewDescriptor = new ViewDescriptor(new SemanticAdapter(newObject, null), Node.class, graphicalType, ViewUtil.APPEND, true, Activator.DIAGRAM_PREFERENCES_HINT);
+ CreateCommand createViewCommand = new CreateCommand(getTransactionalEditingDomain(), viewDescriptor, containerView);
+ getDiagramCommandStack().execute(new ICommandProxy(createViewCommand));
+
+ EReference[] erefs = new EReference[]{ NotationPackage.eINSTANCE.getView_Element() };
+ @SuppressWarnings("unchecked")
+ Collection<View> views = EMFCoreUtil.getReferencers(newObject, erefs);
+
+ return (View)views.toArray()[0];
+ }
+
+ public static View createGraphicalLink(IElementType elementType, String graphicalType, View containerView, EditPart sourceEP, EditPart targetEP) throws Exception {
+ CreateConnectionViewRequest request = createConnectionRequest(elementType, sourceEP, targetEP);
+
+ Command command = targetEP.getCommand(request);
+ Assert.assertNotNull("Command to create graphical link should not be null", command);
+ Assert.assertTrue("Command should be executable", command.canExecute());
+
+ getDiagramCommandStack().execute(command);
+
+ IAdaptable viewAdapter = (IAdaptable)request.getNewObject();
+ View newView = (View)viewAdapter.getAdapter(View.class);
+ Assert.assertNotNull("View should not be null", newView);
+
+ EReference[] erefs = new EReference[]{ NotationPackage.eINSTANCE.getView_Element() };
+ @SuppressWarnings("unchecked")
+ Collection<View> views = EMFCoreUtil.getReferencers(newView, erefs);
+
+ return (View)views.toArray()[0];
+
+ }
+
+ public static CreateConnectionViewRequest createConnectionRequest(IElementType type, EditPart source, EditPart target) {
+ CreateConnectionViewRequest connectionRequest = CreateViewRequestFactory.getCreateConnectionRequest(type, Activator.DIAGRAM_PREFERENCES_HINT);
+
+ connectionRequest.setSourceEditPart(null);
+ connectionRequest.setTargetEditPart(source);
+ connectionRequest.setType(RequestConstants.REQ_CONNECTION_START);
+ source.getCommand(connectionRequest);
+
+ // Now, setup the request in preparation to get the
+ // connection end
+ // command.
+ connectionRequest.setSourceEditPart(source);
+ connectionRequest.setTargetEditPart(target);
+ connectionRequest.setType(RequestConstants.REQ_CONNECTION_END);
+ return connectionRequest;
+ }
+
+
+ public static View dropFromModelExplorer(IElementType elementType, View containerView) throws Exception {
+ EObject newObject = createElement(elementType, containerView);
+ return dropFromModelExplorer(newObject, containerView);
+ }
+
+ public static View dropFromModelExplorer(EObject eObject, View containerView) throws Exception {
+
+ // Find container EditPart (for command creation)
+ EditPart containerEditPart = getEditPart(containerView);
+
+ // Prepare drop request
+ DropObjectsRequest dropRequest = new DropObjectsRequest();
+ ArrayList<EObject> list = new ArrayList<EObject>();
+ list.add(eObject);
+ dropRequest.setObjects(list);
+ dropRequest.setLocation(new Point(20, 20));
+
+ // Get drop command
+ Command command = containerEditPart.getCommand(dropRequest);
+ getDiagramCommandStack().execute(command);
+
+ EReference[] erefs = new EReference[]{ NotationPackage.eINSTANCE.getView_Element() };
+ @SuppressWarnings("unchecked")
+ Collection<View> views = EMFCoreUtil.getReferencers(eObject, erefs);
+
+ return (View)views.toArray()[0];
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/utils/TestUtils.java b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/utils/TestUtils.java
new file mode 100755
index 0000000..393fa56
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/utils/TestUtils.java
@@ -0,0 +1,510 @@
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils;
+
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramEditor;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getEditPart;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getPaletteTool;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.EditorUtils.getTransactionalEditingDomain;
+import static org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.utils.TestPrepareUtils.createElement;
+import static org.junit.Assert.fail;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.commands.ParameterizedCommand;
+import org.eclipse.core.commands.operations.IOperationHistory;
+import org.eclipse.core.commands.operations.IOperationHistoryListener;
+import org.eclipse.core.commands.operations.OperationHistoryEvent;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.RequestConstants;
+import org.eclipse.gef.Tool;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.requests.GroupRequest;
+import org.eclipse.gmf.runtime.common.ui.action.global.GlobalAction;
+import org.eclipse.gmf.runtime.common.ui.action.internal.actions.global.GlobalCopyAction;
+import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.EditCommandRequestWrapper;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.commands.ActionHandler;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.papyrus.infra.gmfdiag.common.service.palette.AspectUnspecifiedTypeConnectionTool;
+import org.eclipse.papyrus.infra.gmfdiag.common.service.palette.AspectUnspecifiedTypeConnectionTool.CreateAspectUnspecifiedTypeConnectionRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.service.palette.AspectUnspecifiedTypeCreationTool;
+import org.eclipse.papyrus.sysml.diagram.blockdefinition.Activator;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IWorkbenchCommandConstants;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.commands.ICommandService;
+import org.eclipse.ui.handlers.IHandlerService;
+import org.junit.Assert;
+
+
+public class TestUtils {
+
+ public static void deleteView(IElementType elementType, View containerView, boolean isAllowed) throws Exception {
+ View view = TestPrepareUtils.dropFromModelExplorer(elementType, getDiagramView());
+ deleteView(view, isAllowed);
+ }
+
+ public static void deleteView(View view, boolean isAllowed) throws Exception {
+
+ // Find container EditPart (for command creation)
+ EditPart containerEditPart = getEditPart(view);
+
+ // Get delete view command
+ Command command = containerEditPart.getCommand(new GroupRequest(RequestConstants.REQ_DELETE));
+
+ // if the view deletion is not allowed the command should not be executable
+ if (!isAllowed) {
+ if ((command == null) || (!command.canExecute())) {
+ // Ok the command cannot be executed.
+ } else {
+ fail("The command should not be executable.");
+ }
+
+ } else {
+ if ((command == null) || (!command.canExecute())) {
+ fail("The command should be executable.");
+ } else {
+ // Ok the command can be executed.
+ defaultExecutionTest(command);
+
+ // Test the results then
+ // fail("Result tests not implemented.");
+ }
+ }
+ }
+
+ public static void deleteElement(IElementType elementType, View containerView, boolean isAllowed) throws Exception {
+ View view = TestPrepareUtils.dropFromModelExplorer(elementType, getDiagramView());
+ deleteElement(view, isAllowed);
+ }
+
+ public static void deleteElement(View view, boolean isAllowed) throws Exception {
+
+ // Find container EditPart (for command creation)
+ EditPart containerEditPart = getEditPart(view);
+
+ // Prepare request
+ DestroyElementRequest destroyRequest = new DestroyElementRequest(getTransactionalEditingDomain(), false);
+
+ // Get delete command
+ Command command = containerEditPart.getCommand(new EditCommandRequestWrapper(destroyRequest));
+
+ // if the deletion is not allowed the command should not be executable
+ if (!isAllowed) {
+ if ((command == null) || (!command.canExecute())) {
+ // Ok the command cannot be executed.
+ } else {
+ fail("The command should not be executable.");
+ }
+
+ } else {
+ if ((command == null) || (!command.canExecute())) {
+ fail("The command should be executable.");
+ } else {
+ // Ok the command can be executed.
+ defaultExecutionTest(command);
+
+ // Test the results then
+ // fail("Result tests not implemented.");
+ }
+ }
+ }
+
+ public static void dropFromModelExplorer(IElementType elementType, View containerView, boolean isAllowed) throws Exception {
+ EObject newObject = createElement(elementType, containerView);
+ dropFromModelExplorer(newObject, containerView, isAllowed);
+ }
+
+ public static void dropFromModelExplorer(EObject eObject, View containerView, boolean isAllowed) throws Exception {
+
+ // Find container EditPart (for command creation)
+ EditPart containerEditPart = getEditPart(containerView);
+
+ // Prepare drop request
+ DropObjectsRequest dropRequest = new DropObjectsRequest();
+ ArrayList<EObject> list = new ArrayList<EObject>();
+ list.add(eObject);
+ dropRequest.setObjects(list);
+ dropRequest.setLocation(new Point(200, 200));
+
+ // Get drop command
+ Command command = containerEditPart.getCommand(dropRequest);
+
+ // if the drop is not allowed the command should not be executable
+ if (!isAllowed) {
+
+ if ((command == null) || (!command.canExecute())) {
+ // Ok the command cannot be executed.
+ } else {
+ fail("The command should not be executable.");
+ }
+
+ } else {
+ if (command == null) {
+ fail("The command is null! not normal.");
+ }
+ if ((command == null) || (!command.canExecute())) {
+ fail("The command should be executable.");
+ } else {
+ // Ok the command can be executed.
+ defaultExecutionTest(command);
+
+ // Test the results then
+ // fail("Result tests not implemented.");
+ }
+ }
+ }
+
+ public static void createNodeFromPalette(String toolId, View containerView, boolean isAllowed) throws Exception {
+
+ if (isAllowed) {
+ createNodeFromPalette(toolId, containerView, isAllowed, true);
+ } else {
+ createNodeFromPalette(toolId, containerView, isAllowed, false);
+ }
+
+ }
+
+ public static void createNodeFromPalette(String toolId, View containerView, boolean isAllowed, boolean execute) throws Exception {
+
+ // Find container EditPart (for command creation)
+ EditPart containerEditPart = getEditPart(containerView);
+
+ // Find palette tool to simulate element creation
+ Tool tool = getPaletteTool(toolId);
+ Request createRequest = getCreateRequest(tool);
+
+ // Get creation command for request
+ Command command = containerEditPart.getCommand(createRequest);
+
+ // if the creation is not allowed the command should not be executable
+ if (!isAllowed) {
+ if ((command == null) || (!command.canExecute())) {
+ // Ok the command cannot be executed.
+ } else {
+ fail("The command should not be executable.");
+ }
+
+ } else {
+ if ((command == null) || (!command.canExecute())) {
+ fail("The command should be executable.");
+ } else {
+ // Ok the command can be executed.
+ if (execute) {
+ defaultExecutionTest(command);
+ }
+
+ // Test the results then
+ // fail("Result tests not implemented.");
+ }
+
+ }
+ }
+
+ public static Request getCreateRequest(Tool tool) throws Exception {
+
+ if (tool instanceof AspectUnspecifiedTypeCreationTool) {
+ final AspectUnspecifiedTypeCreationTool creationTool = (AspectUnspecifiedTypeCreationTool) tool;
+ // Don't forget to set the diagram viewer (required for preferenceHints to mimic manual creation)
+ Display.getDefault().syncExec(new Runnable() {
+
+ public void run() {
+ try {
+ creationTool.setViewer(getDiagramEditor().getDiagramGraphicalViewer());
+ } catch (Exception ex) {
+ ex.printStackTrace(System.out);
+ }
+ }
+ });
+
+ return creationTool.createCreateRequest();
+
+ } else if (tool instanceof AspectUnspecifiedTypeConnectionTool) {
+ final AspectUnspecifiedTypeConnectionTool connectionTool = (AspectUnspecifiedTypeConnectionTool) tool;
+
+ // Don't forget to set the diagram viewer (required for preferenceHints to mimic manual creation)
+ Display.getDefault().syncExec(new Runnable() {
+
+ public void run() {
+ try {
+ connectionTool.setViewer(getDiagramEditor().getDiagramGraphicalViewer());
+ } catch (Exception ex) {
+ ex.printStackTrace(System.out);
+ }
+ }
+ });
+
+ return connectionTool.new CreateAspectUnspecifiedTypeConnectionRequest(connectionTool.getElementTypes(), false, Activator.DIAGRAM_PREFERENCES_HINT);
+ }
+
+ throw new Exception("Unexpected kind of creation tool.");
+ }
+
+ public static void createEdgeFromPalette(String toolId, View sourceView, View targetView, boolean isAllowed) throws Exception {
+
+ if (isAllowed) {
+ createEdgeFromPalette(toolId, sourceView, targetView, isAllowed, true);
+ } else {
+ createEdgeFromPalette(toolId, sourceView, targetView, isAllowed, false);
+ }
+
+ }
+
+ public static void createEdgeFromPalette(String toolId, View sourceView, View targetView, boolean isAllowed, boolean execute) throws Exception {
+
+ // Find palette tool to simulate element creation and prepare request
+ Tool tool = getPaletteTool(toolId);
+ CreateAspectUnspecifiedTypeConnectionRequest createRequest = (CreateAspectUnspecifiedTypeConnectionRequest) getCreateRequest(tool);
+
+ // Test source creation command
+ createRequest.setSourceEditPart(getEditPart(sourceView));
+ createRequest.setType(RequestConstants.REQ_CONNECTION_START);
+ Command srcCommand = getEditPart(sourceView).getCommand(createRequest);
+
+ // Test source command
+ if ((srcCommand == null) || !(srcCommand.canExecute())) { // Non-executable command
+ if (targetView == null) { // Only test behavior on source
+ if (!isAllowed) {
+ // Current behavior matches the expected results
+ return;
+ } else {
+ fail("The command should be executable.");
+ }
+
+ } else { // Test complete creation, the command should necessary be executable
+ fail("The command should be executable.");
+ }
+
+ } else { // Executable command
+ if (targetView == null) { // Only test behavior on source
+ if (!isAllowed) {
+ fail("The command should not be executable.");
+ } else {
+ // Current behavior matches the expected results - no execution test.
+ return;
+ }
+
+ } else { // The command is executable and a target is provided - continue the test
+
+ // Get target command (complete link creation)
+ createRequest.setSourceEditPart(getEditPart(sourceView));
+ createRequest.setTargetEditPart(getEditPart(targetView));
+ createRequest.setType(RequestConstants.REQ_CONNECTION_END);
+ Command tgtCommand = getEditPart(targetView).getCommand(createRequest);
+
+ // Test the target command
+ if ((tgtCommand == null) || !(tgtCommand.canExecute())) { // Non-executable command
+ if (!isAllowed) {
+ // Current behavior matches the expected results
+ return;
+ } else {
+ fail("The command should be executable.");
+ }
+
+ } else { // Executable command
+ if (!isAllowed) {
+ fail("The command should not be executable.");
+ } else {
+ // Current behavior matches the expected results
+ if (execute) { // Test command execution
+ defaultExecutionTest(tgtCommand);
+ }
+
+ // Test the results then
+ // fail("Result tests not implemented.");
+ }
+ }
+ }
+
+ }
+ }
+
+ /**
+ * Copy the list of objects into the Clipboard
+ *
+ * @param objectsToCopy
+ * the list of objects to copy. should not be <code>null</code>, at least an empty list
+ * @throws Exception
+ * exception thrown in case of problems
+ */
+ public static void copyEditParts(List<Object> objectsToCopy) throws Exception {
+ // select elements to copy
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().activate(EditorUtils.getEditor());
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().bringToTop(EditorUtils.getEditor());
+ EditorUtils.getDiagramEditor().getEditorSite().getSelectionProvider().setSelection(new StructuredSelection(objectsToCopy));
+
+ ISelection selection = EditorUtils.getEditor().getSite().getSelectionProvider().getSelection();
+ Assert.assertEquals("Selection size should be " + objectsToCopy.size(), objectsToCopy.size(), ((IStructuredSelection) selection).size());
+
+ // retrieve the command for copy
+ ICommandService commandService = (ICommandService) PlatformUI.getWorkbench().getService(ICommandService.class);
+ commandService.refreshElements(IWorkbenchCommandConstants.EDIT_COPY, null);
+ org.eclipse.core.commands.Command copyCommand = commandService.getCommand(IWorkbenchCommandConstants.EDIT_COPY);
+ ((GlobalCopyAction) ((ActionHandler) copyCommand.getHandler()).getAction()).setEnabled(true);
+ Assert.assertNotNull("Impossible to find copy command", copyCommand);
+
+ // EditorUtils.getDiagramEditor().getEditingDomain().setClipboard(objectsToCopy);
+
+ // retrieve handler service for the copy command
+ IHandlerService handlerService = (IHandlerService) PlatformUI.getWorkbench().getService(IHandlerService.class);
+ Assert.assertNotNull("Impossible to find handler service", handlerService);
+
+ final ParameterizedCommand parameterizedCommand = new ParameterizedCommand(copyCommand, null);
+
+ // retrieve the command and set some parameters on it
+ copyCommand.setEnabled(handlerService.getCurrentState());
+ final boolean commandEnabled = copyCommand.isEnabled();
+ Assert.assertTrue("Command should be enabled", commandEnabled);
+
+ // execute the copy command
+ handlerService.executeCommand(parameterizedCommand, null);
+ }
+
+ /**
+ * paste the list of objects into the Clipboard into the current diagram
+ *
+ * @param target
+ * object on which content of the clipboard should be added
+ * @param executable
+ * indicates if the paste command should be executable.
+ *
+ * @throws Exception
+ * exception thrown in case of problems
+ */
+ public static void pasteEditParts(Object target, boolean executable) throws Exception {
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().activate(EditorUtils.getEditor());
+ EditorUtils.getDiagramEditor().getEditorSite().getSelectionProvider().setSelection(new StructuredSelection(target));
+
+ // retrieve the command for copy
+ ICommandService commandService = (ICommandService) PlatformUI.getWorkbench().getService(ICommandService.class);
+ commandService.refreshElements(IWorkbenchCommandConstants.EDIT_PASTE, null);
+ org.eclipse.core.commands.Command pasteCommand = commandService.getCommand(IWorkbenchCommandConstants.EDIT_PASTE);
+ Assert.assertNotNull("Impossible to find paste command", pasteCommand);
+ ((GlobalAction) ((ActionHandler) pasteCommand.getHandler()).getAction()).refresh();
+
+ IHandlerService handlerService = (IHandlerService) PlatformUI.getWorkbench().getService(IHandlerService.class);
+ Assert.assertNotNull("Impossible to find handler service", handlerService);
+ final ParameterizedCommand parameterizedCommand = new ParameterizedCommand(pasteCommand, null);
+ Assert.assertEquals("Command is not executable as expected", pasteCommand.isEnabled(), executable);
+
+ if (executable) {
+ // execute the copy command
+ handlerService.executeCommand(parameterizedCommand, null);
+ }
+ }
+
+ /**
+ * paste with model element the list of objects into the Clipboard into the current diagram
+ *
+ * @param target
+ * object on which content of the clipboard should be added
+ * @param executable
+ * indicates if the paste command should be executable.
+ *
+ * @throws Exception
+ * exception thrown in case of problems
+ */
+ public static void pasteWithModelEditParts(Object target, boolean executable) throws Exception {
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().activate(EditorUtils.getEditor());
+ EditorUtils.getDiagramEditor().getEditorSite().getSelectionProvider().setSelection(new StructuredSelection(target));
+
+ // retrieve the command for copy
+ ICommandService commandService = (ICommandService) PlatformUI.getWorkbench().getService(ICommandService.class);
+ commandService.refreshElements(IWorkbenchCommandConstants.EDIT_PASTE, null);
+ org.eclipse.core.commands.Command pasteWithModelCommand = commandService.getCommand("org.eclipse.papyrus.uml.diagram.common.commands.PasteWithModelCommand");
+ Assert.assertNotNull("Impossible to find paste command", pasteWithModelCommand);
+ // ((GlobalAction)((AbstractHandlerWithState)pasteWithModelCommand.getHandler()).getAction()).refresh();
+
+ IHandlerService handlerService = (IHandlerService) PlatformUI.getWorkbench().getService(IHandlerService.class);
+ Assert.assertNotNull("Impossible to find handler service", handlerService);
+ final ParameterizedCommand parameterizedCommand = new ParameterizedCommand(pasteWithModelCommand, null);
+ Assert.assertEquals("Command is not executable as expected", pasteWithModelCommand.isEnabled(), executable);
+
+ if (executable) {
+ // execute the copy command
+ handlerService.executeCommand(parameterizedCommand, null);
+ }
+ }
+
+ // History event type variable to store history error events.
+ public static int historyEventType = OperationHistoryEvent.DONE;
+
+ /**
+ * Test execution, undo, redo of the given command.
+ *
+ * @param command
+ * the command to test.
+ * @throws Exception
+ */
+ public static void defaultExecutionTest(Command command) throws Exception {
+
+ // Execution in the diagram command stack (like Papyrus usual execution for GEF commands). This is important especially for
+ // composed command like Drop links which create intermediate view during execution. With EMF command stack, the whole command
+ // tries to execute and the edit part of the intermediate created views are not created before the command ends.
+ // The diagram command stack let edit part being created after each view creation.
+
+ // The problem in using the DiagramCommandStack (vs EMF CommandStack) is that it hides any exception that can possibly occur during
+ // command execution. This would let the test finish without error (the command result is not tested currently) while the execution failed.
+
+ // For this matter the DiagramCommandStack history is observed to detect execution issues.
+
+ // Add diagram command stack operation history listener
+ IOperationHistory history = EditorUtils.getDiagramEditingDomain().getActionManager().getOperationHistory();
+ IOperationHistoryListener historyChange = new IOperationHistoryListener() {
+
+ public void historyNotification(OperationHistoryEvent event) {
+ // Store history events
+ historyEventType = event.getEventType();
+ }
+ };
+ history.addOperationHistoryListener(historyChange);
+
+ try {
+ // Test execution
+ historyEventType = OperationHistoryEvent.DONE;
+ EditorUtils.getDiagramCommandStack().execute(command);
+ if (historyEventType == OperationHistoryEvent.OPERATION_NOT_OK) {
+ fail("Command execution failed ()");
+ }
+
+ // Test undo
+ historyEventType = OperationHistoryEvent.DONE;
+ EditorUtils.getDiagramCommandStack().undo();
+ if (historyEventType == OperationHistoryEvent.OPERATION_NOT_OK) {
+ fail("Command undo failed ()");
+ }
+
+ // Test redo
+ historyEventType = OperationHistoryEvent.DONE;
+ EditorUtils.getDiagramCommandStack().redo();
+ if (historyEventType == OperationHistoryEvent.OPERATION_NOT_OK) {
+ fail("Command redo failed ()");
+ }
+ } finally {
+ // Remove listener, even when the test has failed.
+ history.removeOperationHistoryListener(historyChange);
+ }
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/.classpath b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/.classpath
new file mode 100755
index 0000000..64c5e31
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/.project b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/.project
new file mode 100755
index 0000000..64c6ce8
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.sysml.diagram.internalblock.tests</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/.settings/org.eclipse.jdt.core.prefs b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 0000000..c585cc4
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,291 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/.settings/org.eclipse.jdt.ui.prefs b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/.settings/org.eclipse.jdt.ui.prefs
new file mode 100755
index 0000000..954281d
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,68 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+formatter_profile=_Papyrus
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/META-INF/MANIFEST.MF
new file mode 100755
index 0000000..a76f6d0
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,35 @@
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="[3.0.0,4.0.0)",
+ org.junit;bundle-version="4.10.0",
+ org.eclipse.papyrus.junit.framework;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.papyrus.junit.utils;bundle-version="[2.0.0,3.0.0)",
+ com.google.guava;bundle-version="21.0.0",
+ org.eclipse.papyrus.sysml.diagram.internalblock;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.sysml;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.uml.diagram.common;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.sysml.service.types;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.infra.core.sashwindows.di;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.papyrus.uml.diagram.clazz,
+ org.eclipse.papyrus.uml.diagram.menu;bundle-version="2.0.0",
+ org.eclipse.papyrus.uml.internationalization;bundle-version="1.0.0",
+ org.eclipse.papyrus.uml.diagram.stereotype.edition;bundle-version="2.0.0",
+ org.eclipse.papyrus.uml.nattable.stereotype.display;bundle-version="2.0.0",
+ org.eclipse.papyrus.infra.gmfdiag.dnd,
+ org.eclipse.papyrus.uml.diagram.dnd,
+ org.eclipse.papyrus.uml.types.core,
+ org.eclipse.papyrus.infra.types.core,
+ org.eclipse.papyrus.sysml.architecture;bundle-version="1.0.0",
+ org.eclipse.papyrus.sysml.edit;bundle-version="1.2.0",
+ org.eclipse.papyrus.sysml.diagram.ui;bundle-version="2.0.0",
+ org.eclipse.papyrus.sysml.diagram.common,
+ org.eclipse.papyrus.sysml.modelexplorer;bundle-version="1.2.0",
+ org.eclipse.papyrus.sysml.properties;bundle-version="1.2.0",
+ org.eclipse.papyrus.sysml.tests;bundle-version="1.2.0"
+Bundle-Vendor: %providerName
+Bundle-Version: 1.2.0.qualifier
+Bundle-Name: %pluginName
+Bundle-Localization: plugin
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.papyrus.sysml.diagram.internalblock.tests;singleton:=true
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/about.html b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/about.html
new file mode 100755
index 0000000..d35d5ae
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/build.properties b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/build.properties
new file mode 100755
index 0000000..505c02a
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/build.properties
@@ -0,0 +1,10 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ model/,\
+ about.html,\
+ plugin.properties
+src.includes = about.html
+src.includes = about.html,\
+ model/
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/model/ModelWithIBD.di b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/model/ModelWithIBD.di
new file mode 100755
index 0000000..523d7f0
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/model/ModelWithIBD.di
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="ASCII"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi">
+ <di:SashWindowsMngr>
+ <pageList>
+ <availablePage>
+ <emfPageIdentifier href="ModelWithIBD.notation#_hbf7wGbVEeGgmux_Cozgdg"/>
+ </availablePage>
+ </pageList>
+ <sashModel currentSelection="//@sashModel/@windows.0/@children.0">
+ <windows>
+ <children xsi:type="di:TabFolder">
+ <children>
+ <emfPageIdentifier href="ModelWithIBD.notation#_hbf7wGbVEeGgmux_Cozgdg"/>
+ </children>
+ </children>
+ </windows>
+ </sashModel>
+ </di:SashWindowsMngr>
+ <architecture:ArchitectureDescription contextId="org.eclipse.papyrus.sysml.architecture.SysML"/>
+ <architecture:ArchitectureDescriptionPreferences>
+ <viewpointIds>org.eclipse.papyrus.sysml.analysis</viewpointIds>
+ <viewpointIds>org.eclipse.papyrus.sysml.design</viewpointIds>
+ </architecture:ArchitectureDescriptionPreferences>
+</xmi:XMI>
+
\ No newline at end of file
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/model/ModelWithIBD.notation b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/model/ModelWithIBD.notation
new file mode 100755
index 0000000..7b90d67
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/model/ModelWithIBD.notation
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xmi:id="_hbf7wGbVEeGgmux_Cozgdg" type="InternalBlock" name="NewDiagram" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_hbf7wWbVEeGgmux_Cozgdg" type="shape_sysml_block_as_composite" fontName="Segoe UI" lineColor="0">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_hbf7wmbVEeGgmux_Cozgdg" source="ShadowFigure">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_hbf7w2bVEeGgmux_Cozgdg" key="ShadowFigure_Value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_hbf7xGbVEeGgmux_Cozgdg" source="displayNameLabelIcon">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_hbf7xWbVEeGgmux_Cozgdg" key="displayNameLabelIcon_value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_hbf7xmbVEeGgmux_Cozgdg" source="QualifiedName">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_hbf7x2bVEeGgmux_Cozgdg" key="QualifiedNameDepth" value="1000"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_hbf7yGbVEeGgmux_Cozgdg" type="label_sysml_block_name"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_hbf7yWbVEeGgmux_Cozgdg" type="compartment_sysml_structure">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_hbf7ymbVEeGgmux_Cozgdg"/>
+ </children>
+ <element xmi:type="uml:Class" href="ModelWithIBD.uml#_gLmaIGbVEeGgmux_Cozgdg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_hbf7y2bVEeGgmux_Cozgdg" x="40" y="40" width="500" height="250"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_hbf7zGbVEeGgmux_Cozgdg"/>
+ <element xmi:type="uml:Class" href="ModelWithIBD.uml#_gLmaIGbVEeGgmux_Cozgdg"/>
+</notation:Diagram>
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/model/ModelWithIBD.uml b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/model/ModelWithIBD.uml
new file mode 100755
index 0000000..06b2e72
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/model/ModelWithIBD.uml
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20110701" xmlns:xmi="http://www.omg.org/spec/XMI/20110701" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Blocks="http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks">
+ <uml:Model xmi:id="_fMOAwGbVEeGgmux_Cozgdg" name="SysMLmodel">
+ <packagedElement xmi:type="uml:Class" xmi:id="_gLmaIGbVEeGgmux_Cozgdg" name="Block1"/>
+ <profileApplication xmi:id="_fM0dsGbVEeGgmux_Cozgdg">
+ <eAnnotations xmi:id="_fM0dsWbVEeGgmux_Cozgdg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#/"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://SysML_PROFILES/SysML.profile.uml#_TZ_nULU5EduiKqCzJMWbGw"/>
+ </profileApplication>
+ <profileApplication xmi:id="_fPWNQGbVEeGgmux_Cozgdg">
+ <eAnnotations xmi:id="_fPWNQWbVEeGgmux_Cozgdg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:id="_fPWNQmbVEeGgmux_Cozgdg">
+ <eAnnotations xmi:id="_fPWNQ2bVEeGgmux_Cozgdg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:id="_fPWNRGbVEeGgmux_Cozgdg">
+ <eAnnotations xmi:id="_fPWNRWbVEeGgmux_Cozgdg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:id="_fPWNRmbVEeGgmux_Cozgdg">
+ <eAnnotations xmi:id="_fPWNR2bVEeGgmux_Cozgdg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://SysML_PROFILES/SysML.profile.uml#_5WYJ0LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:id="_fPWNSGbVEeGgmux_Cozgdg">
+ <eAnnotations xmi:id="_fPWNSWbVEeGgmux_Cozgdg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//activities"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://SysML_PROFILES/SysML.profile.uml#_C2zXMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:id="_fPWNSmbVEeGgmux_Cozgdg">
+ <eAnnotations xmi:id="_fPWNS2bVEeGgmux_Cozgdg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://SysML_PROFILES/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:id="_fPWNTGbVEeGgmux_Cozgdg">
+ <eAnnotations xmi:id="_fPf-QGbVEeGgmux_Cozgdg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:id="_fPf-QWbVEeGgmux_Cozgdg">
+ <eAnnotations xmi:id="_fPf-QmbVEeGgmux_Cozgdg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//interactions"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://SysML_PROFILES/SysML.profile.uml#_meOioLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:id="_fPf-Q2bVEeGgmux_Cozgdg">
+ <eAnnotations xmi:id="_fPf-RGbVEeGgmux_Cozgdg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//statemachines"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://SysML_PROFILES/SysML.profile.uml#_nAF5kLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:id="_fPf-RWbVEeGgmux_Cozgdg">
+ <eAnnotations xmi:id="_fPf-RmbVEeGgmux_Cozgdg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//usecases"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://SysML_PROFILES/SysML.profile.uml#_neZmMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Blocks:Block xmi:id="_gLmaIWbVEeGgmux_Cozgdg" base_Class="_gLmaIGbVEeGgmux_Cozgdg"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/plugin.properties b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/plugin.properties
new file mode 100755
index 0000000..f569c56
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/plugin.properties
@@ -0,0 +1,14 @@
+#################################################################################
+# Copyright (c) 2012 CEA LIST.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#
+# CEA LIST - Initial API and Implementation.
+#
+##################################################################################
+pluginName=Papyrus SysML Internal Block Diagram Tests
+providerName=Eclipse Modeling Project
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/pom.xml b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/pom.xml
new file mode 100755
index 0000000..a1d101c
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/pom.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.papyrus.sysml</groupId>
+ <artifactId>org.eclipse.papyrus.sysml.test</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.papyrus.sysml.diagram.internalblock.tests</artifactId>
+ <packaging>eclipse-test-plugin</packaging>
+</project>
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/AbstractTest.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/AbstractTest.java
new file mode 100755
index 0000000..97aa9bd
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/AbstractTest.java
@@ -0,0 +1,68 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2016 CEA LIST, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ * Fanch Bonnabesse (ALL4TEC) fanch.bonnabesse@alltec.net - Bug 419357
+ * Christian W. Damus - bug 488791
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.HouseKeeper;
+import org.eclipse.papyrus.sysml.diagram.internalblock.Activator;
+import org.eclipse.ui.IEditorPart;
+import org.junit.BeforeClass;
+import org.junit.ClassRule;
+import org.osgi.framework.Bundle;
+
+/**
+ * Abstract Papyrus initialization class (required to get Service activation).
+ */
+public abstract class AbstractTest extends AbstractPapyrusTest {
+
+ @ClassRule
+ public static final HouseKeeper.Static houseKeeper = new HouseKeeper.Static();
+
+ public static IEditorPart editor = null;
+
+ @BeforeClass
+ public static void openPapyrusWithAnEmptyProject() throws Exception {
+ // Prepare new project for tests
+ IProject testProject = houseKeeper.createProject("TestProject");
+
+ // Copy EmptyModel from bundle to the test project
+ final IFile emptyModel_di = testProject.getFile("ModelWithIBD.di");
+ IFile emptyModel_no = testProject.getFile("ModelWithIBD.notation");
+ IFile emptyModel_uml = testProject.getFile("ModelWithIBD.uml");
+
+ Bundle bundle = Platform.getBundle("org.eclipse.papyrus.sysml.diagram.internalblock.tests");
+ emptyModel_di.create(bundle.getResource("/model/ModelWithIBD.di").openStream(), true, new NullProgressMonitor());
+ emptyModel_no.create(bundle.getResource("/model/ModelWithIBD.notation").openStream(), true, new NullProgressMonitor());
+ emptyModel_uml.create(bundle.getResource("/model/ModelWithIBD.uml").openStream(), true, new NullProgressMonitor());
+
+ // Open the EmptyModel.di file with Papyrus (assumed to be the default editor for "di" files here).
+ editor = houseKeeper.openPapyrusEditor(emptyModel_di);
+
+ // Set the preference to never for the dialog to display existing link instead of create a new one.
+ // The activator of "org.eclipse.papyrus.sysml.diagram.internalblock" returns the preference store of "org.eclipse.papyrus.infra.gmfdiag.preferences".
+ final IPreferenceStore store = Activator.getInstance().getPreferenceStore();
+ final String alwaysCreateLinkPreferenceName = PreferencesConstantsHelper.getPapyrusEditorConstant(PreferencesConstantsHelper.RESTORE_LINK_ELEMENT);
+ store.setValue(alwaysCreateLinkPreferenceName, true);
+ store.setDefault(alwaysCreateLinkPreferenceName, true);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/TestDiagramCreation.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/TestDiagramCreation.java
new file mode 100755
index 0000000..68d0d57
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/TestDiagramCreation.java
@@ -0,0 +1,33 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation;
+
+import static org.junit.Assert.fail;
+
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.AbstractTest;
+import org.junit.Ignore;
+import org.junit.Test;
+
+/**
+ * JUnit tests for Block Definition Diagram Creation.
+ */
+public class TestDiagramCreation extends AbstractTest {
+
+ @Ignore("Test not implemented.")
+ @Test
+ public void createDiagram() {
+ fail("Test not implemented.");
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/AbstractLinkCreationForSourcesTest.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/AbstractLinkCreationForSourcesTest.java
new file mode 100755
index 0000000..d5a7fb0
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/AbstractLinkCreationForSourcesTest.java
@@ -0,0 +1,183 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.createEdgeFromPalette;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.junit.Test;
+
+/**
+ * JUnit abstract tests for Link creation test (via palette tools).
+ */
+public abstract class AbstractLinkCreationForSourcesTest extends AbstractLinkPrepareTest {
+
+ public static String toolID;
+
+ @Test
+ public void createLinkWithSourceBlock() throws Exception {
+ View sourceView = blockSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceActorPart() throws Exception {
+ View sourceView = actorPartSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceNestedActorPart() throws Exception {
+ View sourceView = nestedActorPartSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourcePortOnBlock() throws Exception {
+ View sourceView = portOnBlockSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourcePortOnPart() throws Exception {
+ View sourceView = portOnPartSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourcePortOnNestedPart() throws Exception {
+ View sourceView = portOnNestedPartSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceFlowPortOnBlock() throws Exception {
+ View sourceView = flowportOnBlockSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceFlowPortOnPart() throws Exception {
+ View sourceView = flowportOnPartSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceFlowPortOnNestedPart() throws Exception {
+ View sourceView = flowportOnNestedPartSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourcePart() throws Exception {
+ View sourceView = partSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceNestedPart() throws Exception {
+ View sourceView = nestedPartSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceProperty() throws Exception {
+ View sourceView = propertySourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceNestedProperty() throws Exception {
+ View sourceView = nestedPropertySourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceReference() throws Exception {
+ View sourceView = referenceSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceNestedReference() throws Exception {
+ View sourceView = nestedReferenceSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceValue() throws Exception {
+ View sourceView = valueSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceNestedValue() throws Exception {
+ View sourceView = nestedValueSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceComment() throws Exception {
+ View sourceView = commentSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceCommentCN() throws Exception {
+ View sourceView = commentCNSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceConstraint() throws Exception {
+ View sourceView = constraintSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceConstraintCN() throws Exception {
+ View sourceView = constraintCNSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceDeepNestedActorPart() throws Exception {
+ View sourceView = subNestedActorPartContainer1_1_1SourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceDeepNestedPart() throws Exception {
+ View sourceView = subNestedPartContainer1_1_1SourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceDeepNestedProperty() throws Exception {
+ View sourceView = subNestedPropertyContainer1_1_1SourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceDeepNestedReference() throws Exception {
+ View sourceView = subNestedReferenceContainer1_1_1SourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceDeepNestedValue() throws Exception {
+ View sourceView = subNestedValueContainer1_1_1SourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/AbstractLinkCreationFromElementTest.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/AbstractLinkCreationFromElementTest.java
new file mode 100755
index 0000000..f94a365
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/AbstractLinkCreationFromElementTest.java
@@ -0,0 +1,154 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.createEdgeFromPalette;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.junit.Test;
+
+/**
+ * JUnit tests for Link creation with specified source element (via palette tools).
+ */
+public abstract class AbstractLinkCreationFromElementTest extends AbstractLinkPrepareTest {
+
+ public static String toolID;
+ public static View sourceView;
+
+ @Test
+ public void createLinkWithTargetBlock() throws Exception {
+ View targetView = blockTargetView;
+ createEdgeFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetActorPart() throws Exception {
+ View targetView = actorPartTargetView;
+ createEdgeFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetNestedActorPart() throws Exception {
+ View targetView = nestedActorPartTargetView;
+ createEdgeFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetPortOnBlock() throws Exception {
+ View targetView = portOnBlockTargetView;
+ createEdgeFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetPortOnPart() throws Exception {
+ View targetView = portOnPartTargetView;
+ createEdgeFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetPortOnNestedPart() throws Exception {
+ View targetView = portOnNestedPartTargetView;
+ createEdgeFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetFlowPortOnBlock() throws Exception {
+ View targetView = flowportOnBlockTargetView;
+ createEdgeFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetFlowPortOnPart() throws Exception {
+ View targetView = flowportOnPartTargetView;
+ createEdgeFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetFlowPortOnNestedPart() throws Exception {
+ View targetView = flowportOnNestedPartTargetView;
+ createEdgeFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetPart() throws Exception {
+ View targetView = partTargetView;
+ createEdgeFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetNestedPart() throws Exception {
+ View targetView = nestedPartTargetView;
+ createEdgeFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetProperty() throws Exception {
+ View targetView = propertyTargetView;
+ createEdgeFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetNestedProperty() throws Exception {
+ View targetView = nestedPropertyTargetView;
+ createEdgeFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetReference() throws Exception {
+ View targetView = referenceTargetView;
+ createEdgeFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetNestedReference() throws Exception {
+ View targetView = nestedReferenceTargetView;
+ createEdgeFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetValue() throws Exception {
+ View targetView = valueTargetView;
+ createEdgeFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetNestedValue() throws Exception {
+ View targetView = nestedValueTargetView;
+ createEdgeFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetComment() throws Exception {
+ View targetView = commentTargetView;
+ createEdgeFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetCommentCN() throws Exception {
+ View targetView = commentCNTargetView;
+ createEdgeFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetConstraint() throws Exception {
+ View targetView = constraintTargetView;
+ createEdgeFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetConstraintCN() throws Exception {
+ View targetView = constraintCNTargetView;
+ createEdgeFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView));
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/AbstractLinkPrepareTest.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/AbstractLinkPrepareTest.java
new file mode 100755
index 0000000..4b8c22a
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/AbstractLinkPrepareTest.java
@@ -0,0 +1,267 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createGraphicalNode;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for link creation test (via palette tools).
+ */
+public abstract class AbstractLinkPrepareTest extends AbstractTest {
+
+ public static String toolID;
+
+ // Custom nodes
+ public static View blockSourceView, blockTargetView;
+
+ // Custom child label nodes
+ public static View actorPartSourceView, actorPartTargetView;
+ public static View nestedActorPartSourceView, nestedActorPartTargetView;
+ public static View portOnBlockSourceView, portOnBlockTargetView;
+ public static View portOnPartSourceView, portOnPartTargetView;
+ public static View portOnNestedPartSourceView, portOnNestedPartTargetView;
+ public static View flowportOnBlockSourceView, flowportOnBlockTargetView;
+ public static View flowportOnPartSourceView, flowportOnPartTargetView;
+ public static View flowportOnNestedPartSourceView, flowportOnNestedPartTargetView;
+ public static View partSourceView, partTargetView;
+ public static View nestedPartSourceView, nestedPartTargetView;
+ public static View propertySourceView, propertyTargetView;
+ public static View nestedPropertySourceView, nestedPropertyTargetView;
+ public static View referenceSourceView, referenceTargetView;
+ public static View nestedReferenceSourceView, nestedReferenceTargetView;
+ public static View valueSourceView, valueTargetView;
+ public static View nestedValueSourceView, nestedValueTargetView;
+
+ // Inherited nodes
+ public static View commentSourceView, commentTargetView, commentCNSourceView, commentCNTargetView;
+ public static View constraintSourceView, constraintTargetView, constraintCNSourceView, constraintCNTargetView;
+
+ public static View partContainer1; // Its type block may be set encapsulated for testing purpose.
+ public static View partContainer2; // Its type block may be set encapsulated for testing purpose.
+
+ public static final Map<View, Boolean> isCreationAllowed = new HashMap<View, Boolean>();
+
+ public static View subNestedActorPartContainer1_1_1SourceView;
+
+ public static View subNestedActorPartContainer1_1_1TargetView;
+
+ public static View portOnSubNestedPartSourceView;
+
+ public static View portOnSubNestedPartTargetView;
+
+ public static View flowportOnSubNestedPartSourceView;
+
+ public static View flowportOnSubNestedPartTargetView;
+
+ public static View portOnSubNestedPartContainer1_1_1SourceView;
+
+ public static View portOnSubNestedPartContainer2_1_1TargetView;
+
+ public static View portOnSubNestedPartContainer1_1_2TargetView;
+
+ public static View flowportOnSubNestedPartContainer1_1_1SourceView;
+
+ public static View flowportOnSubNestedPartContainer2_1_1TargetView;
+
+ public static View portOnSubNestedPartContainer2SourceView;
+
+ public static View portOnSubNestedPartContainer1_2_1TargetView;
+
+ public static View flowportOnSubNestedPartContainer1_2_1TargetView;
+
+ public static View flowportOnSubNestedPartContainer1_1_2TargetView;
+
+ public static View subNestedPartContainer1_1_1SourceView;
+
+ public static View subNestedPartContainer1_2_1TargetView;
+
+ public static View subNestedPartContainer1_1_1TargetView;
+
+ public static View subNestedPartContainer1_1_2TargetView;
+
+ public static View subNestedPropertyContainer1_1_1SourceView;
+
+ public static View subNestedPropertyContainer1_1_1TargetView;
+
+ public static View subNestedPropertyContainer1_2_1TargetView;
+
+ public static View subNestedPropertyContainer1_1_2TargetView;
+
+ public static View subNestedReferenceContainer1_1_1SourceView;
+
+ public static View subNestedReferenceContainer1_1_1TargetView;
+
+ public static View subNestedReferenceContainer1_2_1TargetView;
+
+ public static View subNestedReferenceContainer1_1_2TargetView;
+
+ public static View subNestedValueContainer1_1_1SourceView;
+
+ public static View subNestedValueContainer1_1_1TargetView, subNestedValueContainer1_2_1TargetView, subNestedValueContainer1_1_2TargetView;
+
+ public static View subNestedActorPartContainer1_2_1TargetView;
+
+ public static View subNestedActorPartContainer1_1_2TargetView;
+
+ public static View nestedPartContainer1_1;
+
+ public static View nestedPartContainer2_1;
+
+ public static View nestedPartContainer1_2;
+
+ @BeforeClass
+ public static void initializeCreationAllowedMap() {
+ houseKeeper.cleanUpLater(isCreationAllowed);
+ }
+
+ @BeforeClass
+ public static void prepareInheritedNodes() throws Exception {
+ View container = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View containerCpt = ViewUtil.getChildBySemanticHint(container, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+
+ // Prepare elements for link creation tests
+ commentSourceView = createGraphicalNode(UMLElementTypes.COMMENT, ElementTypes.COMMENT.getSemanticHint(), getDiagramView());
+ commentTargetView = createGraphicalNode(UMLElementTypes.COMMENT, ElementTypes.COMMENT.getSemanticHint(), getDiagramView());
+ commentCNSourceView = createGraphicalNode(UMLElementTypes.COMMENT, ElementTypes.COMMENT_CN.getSemanticHint(), containerCpt);
+ commentCNTargetView = createGraphicalNode(UMLElementTypes.COMMENT, ElementTypes.COMMENT_CN.getSemanticHint(), containerCpt);
+
+ constraintSourceView = createGraphicalNode(UMLElementTypes.CONSTRAINT, ElementTypes.CONSTRAINT.getSemanticHint(), getDiagramView());
+ constraintTargetView = createGraphicalNode(UMLElementTypes.CONSTRAINT, ElementTypes.CONSTRAINT.getSemanticHint(), getDiagramView());
+ constraintCNSourceView = createGraphicalNode(UMLElementTypes.CONSTRAINT, ElementTypes.CONSTRAINT_CN.getSemanticHint(), containerCpt);
+ constraintCNTargetView = createGraphicalNode(UMLElementTypes.CONSTRAINT, ElementTypes.CONSTRAINT_CN.getSemanticHint(), containerCpt);
+ }
+
+ @BeforeClass
+ public static void prepareCustomNodes() throws Exception {
+ View container = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockStructureView = ViewUtil.getChildBySemanticHint(container, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+ // part in block (level = 1)
+ partContainer1 = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ View partContainer1StructureView = ViewUtil.getChildBySemanticHint(partContainer1, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ partContainer2 = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ View partContainer2StructureView = ViewUtil.getChildBySemanticHint(partContainer2, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+
+
+ nestedPartContainer1_1 = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partContainer1StructureView);
+ View nestedPartContainer1_1StructureView = ViewUtil.getChildBySemanticHint(nestedPartContainer1_1, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ nestedPartContainer2_1 = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partContainer1StructureView);
+ View nestedPartContainer2_1StructureView = ViewUtil.getChildBySemanticHint(nestedPartContainer2_1, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ nestedPartContainer1_2 = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partContainer2StructureView);
+ View nestedPartContainer1_2StructureView = ViewUtil.getChildBySemanticHint(nestedPartContainer1_2, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+
+ // nested container in nested part (level = 3)
+ View subNestedPartContainer1_1_1 = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartContainer1_1StructureView);
+ View subNestedPartContainer2_1_1 = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartContainer1_1StructureView);
+
+ // nested container in nestedPartContainer2_1 (level = 3)
+ View subNestedPartContainer1_2_1 = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartContainer2_1StructureView);
+
+ // nested container in nestedPartContainer1_2StructureView (level = 3)
+ View subNestedPartContainer1_1_2 = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartContainer1_2StructureView);
+
+
+ // Prepare elements for link creation tests
+
+ blockSourceView = container;
+ blockTargetView = container;
+
+ // Prepare child nodes
+
+ partSourceView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ partTargetView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ nestedPartSourceView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partContainer1StructureView);
+ nestedPartTargetView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partContainer1StructureView);
+ subNestedPartContainer1_1_1SourceView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartContainer1_1);
+ subNestedPartContainer1_1_1TargetView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartContainer1_1);
+ subNestedPartContainer1_2_1TargetView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartContainer2_1);
+ subNestedPartContainer1_1_2TargetView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartContainer1_2);
+
+ // Port & FlowPorts no distinction made on FlowPorts kind...
+ portOnBlockSourceView = createGraphicalNode(UMLElementTypes.PORT, UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID, container);
+ portOnBlockTargetView = createGraphicalNode(UMLElementTypes.PORT, UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID, container);
+ portOnPartSourceView = createGraphicalNode(UMLElementTypes.PORT, (EObject)partContainer1.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()), UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID, partContainer1);
+ portOnPartTargetView = createGraphicalNode(UMLElementTypes.PORT, (EObject)partContainer2.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()), UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID, partContainer2);
+ portOnNestedPartSourceView = createGraphicalNode(UMLElementTypes.PORT, (EObject)nestedPartContainer1_1.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()), UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID, nestedPartContainer1_1);
+ portOnNestedPartTargetView = createGraphicalNode(UMLElementTypes.PORT, (EObject)nestedPartContainer2_1.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()), UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID, nestedPartContainer2_1);
+ portOnSubNestedPartContainer1_1_1SourceView = createGraphicalNode(UMLElementTypes.PORT, (EObject)nestedPartContainer1_1.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()), UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID, subNestedPartContainer1_1_1SourceView);
+ portOnSubNestedPartContainer2_1_1TargetView = createGraphicalNode(UMLElementTypes.PORT, (EObject)nestedPartContainer2_1.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()), UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID, subNestedPartContainer2_1_1);
+ portOnSubNestedPartContainer1_2_1TargetView = createGraphicalNode(UMLElementTypes.PORT, (EObject)nestedPartContainer2_1.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()), UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID, subNestedPartContainer1_2_1);
+ portOnSubNestedPartContainer1_1_2TargetView = createGraphicalNode(UMLElementTypes.PORT, (EObject)nestedPartContainer2_1.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()), UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID, subNestedPartContainer1_1_2);
+
+ flowportOnBlockSourceView = createGraphicalNode(SysMLElementTypes.FLOW_PORT, SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID, container);
+ flowportOnBlockTargetView = createGraphicalNode(SysMLElementTypes.FLOW_PORT, SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID, container);
+ flowportOnPartSourceView = createGraphicalNode(SysMLElementTypes.FLOW_PORT, (EObject)partContainer1.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()), SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID, partContainer1);
+ flowportOnPartTargetView = createGraphicalNode(SysMLElementTypes.FLOW_PORT, (EObject)partContainer2.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()), SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID, partContainer2);
+ flowportOnNestedPartSourceView = createGraphicalNode(SysMLElementTypes.FLOW_PORT, (EObject)nestedPartContainer1_1.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()), SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID, nestedPartContainer1_1);
+ flowportOnNestedPartTargetView = createGraphicalNode(SysMLElementTypes.FLOW_PORT, (EObject)nestedPartContainer2_1.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()), SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID, nestedPartContainer2_1);
+ flowportOnSubNestedPartContainer1_1_1SourceView = createGraphicalNode(SysMLElementTypes.FLOW_PORT, (EObject)nestedPartContainer1_1.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()), SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID, subNestedPartContainer1_1_1SourceView);
+ flowportOnSubNestedPartContainer2_1_1TargetView = createGraphicalNode(SysMLElementTypes.FLOW_PORT, (EObject)nestedPartContainer2_1.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()), SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID, subNestedPartContainer2_1_1);
+ flowportOnSubNestedPartContainer1_2_1TargetView = createGraphicalNode(SysMLElementTypes.FLOW_PORT, (EObject)nestedPartContainer1_1.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()), SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID, subNestedPartContainer1_2_1);
+ flowportOnSubNestedPartContainer1_1_2TargetView = createGraphicalNode(SysMLElementTypes.FLOW_PORT, (EObject)nestedPartContainer2_1.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()), SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID, subNestedPartContainer1_1_2);
+
+ propertySourceView = createGraphicalNode(UMLElementTypes.PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ propertyTargetView = createGraphicalNode(UMLElementTypes.PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ nestedPropertySourceView = createGraphicalNode(UMLElementTypes.PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partContainer1StructureView);
+ nestedPropertyTargetView = createGraphicalNode(UMLElementTypes.PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partContainer1StructureView);
+ subNestedPropertyContainer1_1_1SourceView = createGraphicalNode(UMLElementTypes.PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartContainer1_1);
+ subNestedPropertyContainer1_1_1TargetView = createGraphicalNode(UMLElementTypes.PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartContainer1_1);
+ subNestedPropertyContainer1_2_1TargetView = createGraphicalNode(UMLElementTypes.PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartContainer2_1);
+ subNestedPropertyContainer1_1_2TargetView = createGraphicalNode(UMLElementTypes.PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartContainer1_2);
+
+ referenceSourceView = createGraphicalNode(SysMLElementTypes.REFERENCE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ referenceTargetView = createGraphicalNode(SysMLElementTypes.REFERENCE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ nestedReferenceSourceView = createGraphicalNode(SysMLElementTypes.REFERENCE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partContainer1StructureView);
+ nestedReferenceTargetView = createGraphicalNode(SysMLElementTypes.REFERENCE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partContainer1StructureView);
+ subNestedReferenceContainer1_1_1SourceView = createGraphicalNode(SysMLElementTypes.REFERENCE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartContainer1_1);
+ subNestedReferenceContainer1_1_1TargetView = createGraphicalNode(SysMLElementTypes.REFERENCE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartContainer1_1);
+ subNestedReferenceContainer1_2_1TargetView = createGraphicalNode(SysMLElementTypes.REFERENCE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartContainer2_1);
+ subNestedReferenceContainer1_1_2TargetView = createGraphicalNode(SysMLElementTypes.REFERENCE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartContainer1_2);
+
+
+ valueSourceView = createGraphicalNode(SysMLElementTypes.VALUE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ valueTargetView = createGraphicalNode(SysMLElementTypes.VALUE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ nestedValueSourceView = createGraphicalNode(SysMLElementTypes.VALUE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partContainer1StructureView);
+ nestedValueTargetView = createGraphicalNode(SysMLElementTypes.VALUE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partContainer1StructureView);
+ subNestedValueContainer1_1_1SourceView = createGraphicalNode(SysMLElementTypes.VALUE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartContainer1_1);
+ subNestedValueContainer1_1_1TargetView = createGraphicalNode(SysMLElementTypes.VALUE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartContainer1_1);
+ subNestedValueContainer1_2_1TargetView = createGraphicalNode(SysMLElementTypes.VALUE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartContainer2_1);
+ subNestedValueContainer1_1_2TargetView = createGraphicalNode(SysMLElementTypes.VALUE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartContainer1_2);
+
+ actorPartSourceView = createGraphicalNode(SysMLElementTypes.ACTOR_PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ actorPartTargetView = createGraphicalNode(SysMLElementTypes.ACTOR_PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ nestedActorPartSourceView = createGraphicalNode(SysMLElementTypes.ACTOR_PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partContainer1StructureView);
+ nestedActorPartTargetView = createGraphicalNode(SysMLElementTypes.ACTOR_PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partContainer1StructureView);
+ subNestedActorPartContainer1_1_1SourceView = createGraphicalNode(SysMLElementTypes.ACTOR_PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartContainer1_1);
+ subNestedActorPartContainer1_1_1TargetView = createGraphicalNode(SysMLElementTypes.ACTOR_PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartContainer1_1);
+ subNestedActorPartContainer1_2_1TargetView = createGraphicalNode(SysMLElementTypes.VALUE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartContainer2_1);
+ subNestedActorPartContainer1_1_2TargetView = createGraphicalNode(SysMLElementTypes.VALUE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartContainer1_2);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/AbstractLinkCreationFromElementTest.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/AbstractLinkCreationFromElementTest.java
new file mode 100755
index 0000000..21c1b87
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/AbstractLinkCreationFromElementTest.java
@@ -0,0 +1,193 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.createEdgeConnectorFromPalette;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.AbstractLinkPrepareTest;
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit abstract tests for Link creation test (via palette tools).
+ */
+public abstract class AbstractLinkCreationFromElementTest extends AbstractLinkPrepareTest {
+
+ public static String toolID;
+
+ public static View sourceView;
+
+ public static final Map<View, List<Property>> expectedSourceNestedPath = new HashMap<View, List<Property>>();
+
+ public static final Map<View, List<Property>> expectedTargetNestedPath = new HashMap<View, List<Property>>();
+
+ @BeforeClass
+ public static void initExpectedPathMaps() {
+ houseKeeper.cleanUpLater(expectedSourceNestedPath);
+ houseKeeper.cleanUpLater(expectedTargetNestedPath);
+ }
+
+ @Test
+ public void createLinkWithTargetBlock() throws Exception {
+ View targetView = blockTargetView;
+ createEdgeConnectorFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourceNestedPath.get(targetView), expectedTargetNestedPath.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetActorPart() throws Exception {
+ View targetView = actorPartTargetView;
+ createEdgeConnectorFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourceNestedPath.get(targetView), expectedTargetNestedPath.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetNestedActorPart() throws Exception {
+ View targetView = nestedActorPartTargetView;
+ createEdgeConnectorFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourceNestedPath.get(targetView), expectedTargetNestedPath.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetPortOnBlock() throws Exception {
+ View targetView = portOnBlockTargetView;
+ createEdgeConnectorFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourceNestedPath.get(targetView), expectedTargetNestedPath.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetPortOnPart() throws Exception {
+ View targetView = portOnPartTargetView;
+ createEdgeConnectorFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourceNestedPath.get(targetView), expectedTargetNestedPath.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetPortOnNestedPart() throws Exception {
+ View targetView = portOnNestedPartTargetView;
+ createEdgeConnectorFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourceNestedPath.get(targetView), expectedTargetNestedPath.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetFlowPortOnBlock() throws Exception {
+ View targetView = flowportOnBlockTargetView;
+ createEdgeConnectorFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourceNestedPath.get(targetView), expectedTargetNestedPath.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetFlowPortOnPart() throws Exception {
+ View targetView = flowportOnPartTargetView;
+ createEdgeConnectorFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourceNestedPath.get(targetView), expectedTargetNestedPath.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetFlowPortOnNestedPart() throws Exception {
+ View targetView = flowportOnNestedPartTargetView;
+ createEdgeConnectorFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourceNestedPath.get(targetView), expectedTargetNestedPath.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetPart() throws Exception {
+ View targetView = partTargetView;
+ createEdgeConnectorFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourceNestedPath.get(targetView), expectedTargetNestedPath.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetNestedPart() throws Exception {
+ View targetView = nestedPartTargetView;
+ createEdgeConnectorFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourceNestedPath.get(targetView), expectedTargetNestedPath.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetProperty() throws Exception {
+ View targetView = propertyTargetView;
+ createEdgeConnectorFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourceNestedPath.get(targetView), expectedTargetNestedPath.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetNestedProperty() throws Exception {
+ View targetView = nestedPropertyTargetView;
+ createEdgeConnectorFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourceNestedPath.get(targetView), expectedTargetNestedPath.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetReference() throws Exception {
+ View targetView = referenceTargetView;
+ createEdgeConnectorFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourceNestedPath.get(targetView), expectedTargetNestedPath.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetNestedReference() throws Exception {
+ View targetView = nestedReferenceTargetView;
+ createEdgeConnectorFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourceNestedPath.get(targetView), expectedTargetNestedPath.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetValue() throws Exception {
+ View targetView = valueTargetView;
+ createEdgeConnectorFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourceNestedPath.get(targetView), expectedTargetNestedPath.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetNestedValue() throws Exception {
+ View targetView = nestedValueTargetView;
+ createEdgeConnectorFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourceNestedPath.get(targetView), expectedTargetNestedPath.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetComment() throws Exception {
+ View targetView = commentTargetView;
+ createEdgeConnectorFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourceNestedPath.get(targetView), expectedTargetNestedPath.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetCommentCN() throws Exception {
+ View targetView = commentCNTargetView;
+ createEdgeConnectorFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourceNestedPath.get(targetView), expectedTargetNestedPath.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetConstraint() throws Exception {
+ View targetView = constraintTargetView;
+ createEdgeConnectorFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourceNestedPath.get(targetView), expectedTargetNestedPath.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetConstraintCN() throws Exception {
+ View targetView = constraintCNTargetView;
+ createEdgeConnectorFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourceNestedPath.get(targetView), expectedTargetNestedPath.get(targetView));
+ }
+
+ // deep nested tests
+ @Test
+ public void createLinkWithTargetSubNestedPartContainer_1_1_1() throws Exception {
+ View targetView = subNestedPartContainer1_1_1TargetView;
+ createEdgeConnectorFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourceNestedPath.get(targetView), expectedTargetNestedPath.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetSubNestedPartContainer_1_2_1() throws Exception {
+ View targetView = subNestedPartContainer1_2_1TargetView;
+ createEdgeConnectorFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourceNestedPath.get(targetView), expectedTargetNestedPath.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetSubNestedPartContainer_1_1_2() throws Exception {
+ View targetView = subNestedPartContainer1_1_2TargetView;
+ createEdgeConnectorFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourceNestedPath.get(targetView), expectedTargetNestedPath.get(targetView));
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorForSources.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorForSources.java
new file mode 100755
index 0000000..fe39e3b
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorForSources.java
@@ -0,0 +1,73 @@
+/*****************************************************************************
+ * Copyright (c) 2011, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector;
+
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.AbstractLinkCreationForSourcesTest;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Dependency link creation test (via palette tools).
+ */
+public class TestLinkCreationConnectorForSources extends AbstractLinkCreationForSourcesTest {
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.connector";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockSourceView, false);
+
+ isCreationAllowed.put(actorPartSourceView, true);
+ isCreationAllowed.put(nestedActorPartSourceView, true);
+ isCreationAllowed.put(subNestedActorPartContainer1_1_1SourceView, true);
+
+ isCreationAllowed.put(portOnBlockSourceView, true);
+ isCreationAllowed.put(portOnPartSourceView, true);
+ isCreationAllowed.put(portOnNestedPartSourceView, true);
+ isCreationAllowed.put(portOnSubNestedPartContainer1_1_1SourceView, true);
+
+ isCreationAllowed.put(flowportOnBlockSourceView, true);
+ isCreationAllowed.put(flowportOnPartSourceView, true);
+ isCreationAllowed.put(flowportOnNestedPartSourceView, true);
+ isCreationAllowed.put(flowportOnSubNestedPartContainer1_1_1SourceView, true);
+
+ isCreationAllowed.put(partSourceView, true);
+ isCreationAllowed.put(nestedPartSourceView, true);
+ isCreationAllowed.put(subNestedPartContainer1_1_1SourceView, true);
+
+ isCreationAllowed.put(propertySourceView, true);
+ isCreationAllowed.put(nestedPropertySourceView, true);
+ isCreationAllowed.put(subNestedPropertyContainer1_1_1SourceView, true);
+
+ isCreationAllowed.put(referenceSourceView, true);
+ isCreationAllowed.put(nestedReferenceSourceView, true);
+ isCreationAllowed.put(subNestedReferenceContainer1_1_1SourceView, true);
+
+ isCreationAllowed.put(valueSourceView, true);
+ isCreationAllowed.put(nestedValueSourceView, true);
+ isCreationAllowed.put(subNestedValueContainer1_1_1SourceView, true);
+
+ isCreationAllowed.put(commentSourceView, false);
+ isCreationAllowed.put(commentCNSourceView, false);
+ isCreationAllowed.put(constraintSourceView, false);
+ isCreationAllowed.put(constraintCNSourceView, false);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromActorPart.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromActorPart.java
new file mode 100755
index 0000000..c48fb36
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromActorPart.java
@@ -0,0 +1,109 @@
+/*****************************************************************************
+ * Copyright (c) 2011, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link creation test (via palette tools).
+ */
+public class TestLinkCreationConnectorFromActorPart extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = actorPartSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.connector";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, false);
+
+ isCreationAllowed.put(actorPartTargetView, true);
+ isCreationAllowed.put(nestedActorPartTargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(portOnPartTargetView, true);
+ isCreationAllowed.put(portOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowportOnPartTargetView, true);
+ isCreationAllowed.put(flowportOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPartTargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_1_1TargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_2_1TargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_1_2TargetView, true);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, false);
+ isCreationAllowed.put(constraintCNTargetView, false);
+
+ // Initialize nested property path for tests
+ Property part1 = (Property)partContainer1.getElement();
+ Property part2 = (Property)partContainer2.getElement();
+ Property nestedPartContainer1_1Property = (Property)nestedPartContainer1_1.getElement();
+ Property nestedPartContainer1_2Property = (Property)nestedPartContainer1_2.getElement();
+ Property nestedPartContainer2_1Property = (Property)nestedPartContainer2_1.getElement();
+ List<Property> subNestedPath1_1 = Arrays.asList(new Property[]{ part1, nestedPartContainer1_1Property });
+ List<Property> subNestedPath1_2 = Arrays.asList(new Property[]{ part2, nestedPartContainer1_2Property });
+ List<Property> subNestedPath2_1 = Arrays.asList(new Property[]{ part1, nestedPartContainer2_1Property });
+ List<Property> nestedPath = Arrays.asList(new Property[]{ part1 });
+ List<Property> emptyPath = Collections.emptyList();
+
+
+ for(View view : isCreationAllowed.keySet()) {
+ expectedSourceNestedPath.put(view, emptyPath);
+ expectedTargetNestedPath.put(view, emptyPath);
+ }
+
+ expectedTargetNestedPath.put(nestedActorPartTargetView, nestedPath);
+ expectedTargetNestedPath.put(portOnNestedPartTargetView, subNestedPath2_1);
+ expectedTargetNestedPath.put(flowportOnNestedPartTargetView, subNestedPath2_1);
+ expectedTargetNestedPath.put(nestedPartTargetView, nestedPath);
+ expectedTargetNestedPath.put(nestedPropertyTargetView, nestedPath);
+ expectedTargetNestedPath.put(nestedReferenceTargetView, nestedPath);
+ expectedTargetNestedPath.put(nestedValueTargetView, nestedPath);
+
+ expectedTargetNestedPath.put(subNestedPartContainer1_1_1TargetView, subNestedPath1_1);
+ expectedTargetNestedPath.put(subNestedPartContainer1_1_2TargetView, subNestedPath1_2);
+ expectedTargetNestedPath.put(subNestedPartContainer1_2_1TargetView, subNestedPath2_1);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromFlowPortOnBlock.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromFlowPortOnBlock.java
new file mode 100755
index 0000000..081d9b5
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromFlowPortOnBlock.java
@@ -0,0 +1,107 @@
+/*****************************************************************************
+ * Copyright (c) 2011, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link creation test (via palette tools).
+ */
+public class TestLinkCreationConnectorFromFlowPortOnBlock extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = flowportOnBlockSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.connector";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, false);
+
+ isCreationAllowed.put(actorPartTargetView, true);
+ isCreationAllowed.put(nestedActorPartTargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(portOnPartTargetView, true);
+ isCreationAllowed.put(portOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowportOnPartTargetView, true);
+ isCreationAllowed.put(flowportOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPartTargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_1_1TargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_2_1TargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_1_2TargetView, true);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, false);
+ isCreationAllowed.put(constraintCNTargetView, false);
+
+ // Initialize nested property path for tests
+ Property part1 = (Property)partContainer1.getElement();
+ Property part2 = (Property)partContainer2.getElement();
+ Property nestedPartContainer1_1Property = (Property)nestedPartContainer1_1.getElement();
+ Property nestedPartContainer1_2Property = (Property)nestedPartContainer1_2.getElement();
+ Property nestedPartContainer2_1Property = (Property)nestedPartContainer2_1.getElement();
+ List<Property> subNestedPath1_1 = Arrays.asList(new Property[]{ part1, nestedPartContainer1_1Property });
+ List<Property> subNestedPath1_2 = Arrays.asList(new Property[]{ part2, nestedPartContainer1_2Property });
+ List<Property> subNestedPath2_1 = Arrays.asList(new Property[]{ part1, nestedPartContainer2_1Property });
+ List<Property> nestedPath = Arrays.asList(new Property[]{ part1 });
+ List<Property> emptyPath = Collections.emptyList();
+
+
+ for(View view : isCreationAllowed.keySet()) {
+ expectedSourceNestedPath.put(view, emptyPath);
+ expectedTargetNestedPath.put(view, emptyPath);
+ }
+ expectedTargetNestedPath.put(nestedActorPartTargetView, nestedPath);
+ expectedTargetNestedPath.put(portOnNestedPartTargetView, subNestedPath2_1);
+ expectedTargetNestedPath.put(flowportOnNestedPartTargetView, subNestedPath2_1);
+ expectedTargetNestedPath.put(nestedPartTargetView, nestedPath);
+ expectedTargetNestedPath.put(subNestedPartContainer1_1_1TargetView, subNestedPath1_1);
+ expectedTargetNestedPath.put(subNestedPartContainer1_2_1TargetView, subNestedPath2_1);
+ expectedTargetNestedPath.put(subNestedPartContainer1_1_2TargetView, subNestedPath1_2);
+ expectedTargetNestedPath.put(nestedPropertyTargetView, nestedPath);
+ expectedTargetNestedPath.put(nestedReferenceTargetView, nestedPath);
+ expectedTargetNestedPath.put(nestedValueTargetView, nestedPath);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromFlowPortOnNestedPart.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromFlowPortOnNestedPart.java
new file mode 100755
index 0000000..e77d194
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromFlowPortOnNestedPart.java
@@ -0,0 +1,113 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link creation test (via palette tools).
+ */
+public class TestLinkCreationConnectorFromFlowPortOnNestedPart extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = flowportOnNestedPartSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.connector";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, false);
+
+ isCreationAllowed.put(actorPartTargetView, true);
+ isCreationAllowed.put(nestedActorPartTargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(portOnPartTargetView, true);
+ isCreationAllowed.put(portOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowportOnPartTargetView, true);
+ isCreationAllowed.put(flowportOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPartTargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_1_1TargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_2_1TargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_1_2TargetView, true);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, false);
+ isCreationAllowed.put(constraintCNTargetView, false);
+
+ // Initialize nested property path for tests
+ Property part1 = (Property)partContainer1.getElement();
+ Property part2 = (Property)partContainer2.getElement();
+ Property nestedPartContainer1_1Property = (Property)nestedPartContainer1_1.getElement();
+ Property nestedPartContainer1_2Property = (Property)nestedPartContainer1_2.getElement();
+ Property nestedPartContainer2_1Property = (Property)nestedPartContainer2_1.getElement();
+ List<Property> subNestedPath1_1 = Arrays.asList(new Property[]{ part1, nestedPartContainer1_1Property });
+// List<Property> deepNestedPath = Arrays.asList(new Property[] {part1, nestedPartContainer1_1Property, nestedPartContainer2_1Property});
+ List<Property> subNestedPath2_1 = Arrays.asList(new Property[]{ nestedPartContainer2_1Property });
+ List<Property> subNestedPath1_2 = Arrays.asList(new Property[]{ part2, nestedPartContainer1_2Property });
+ List<Property> emptyPath = Collections.emptyList();
+ List<Property> nestedPath = Arrays.asList(new Property[]{ part1 });
+
+
+ for(View view : isCreationAllowed.keySet()) {
+ expectedSourceNestedPath.put(view, emptyPath);
+ expectedTargetNestedPath.put(view, emptyPath);
+ }
+
+ expectedSourceNestedPath.put(blockTargetView, nestedPath);
+ expectedSourceNestedPath.put(actorPartTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(portOnBlockTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(portOnPartTargetView, subNestedPath1_1);
+ expectedTargetNestedPath.put(subNestedPartContainer1_1_1TargetView, emptyPath);
+ expectedTargetNestedPath.put(subNestedPartContainer1_2_1TargetView, subNestedPath2_1);
+ expectedTargetNestedPath.put(subNestedPartContainer1_1_2TargetView, subNestedPath1_2);
+ expectedSourceNestedPath.put(subNestedPartContainer1_1_2TargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(flowportOnBlockTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(flowportOnPartTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(partTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(propertyTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(referenceTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(valueTargetView, subNestedPath1_1);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromFlowPortOnPart.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromFlowPortOnPart.java
new file mode 100755
index 0000000..31449b4
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromFlowPortOnPart.java
@@ -0,0 +1,101 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link creation test (via palette tools).
+ */
+public class TestLinkCreationConnectorFromFlowPortOnPart extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = flowportOnPartSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.connector";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, false);
+
+ isCreationAllowed.put(actorPartTargetView, true);
+ isCreationAllowed.put(nestedActorPartTargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(portOnPartTargetView, true);
+ isCreationAllowed.put(portOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowportOnPartTargetView, true);
+ isCreationAllowed.put(flowportOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPartTargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_1_1TargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_2_1TargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_1_2TargetView, true);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, false);
+ isCreationAllowed.put(constraintCNTargetView, false);
+
+ // Initialize nested property path for tests
+ Property part1 = (Property)partContainer1.getElement();
+ Property part2 = (Property)partContainer2.getElement();
+ Property nestedPartContainer1_1Property = (Property)nestedPartContainer1_1.getElement();
+ Property nestedPartContainer1_2Property = (Property)nestedPartContainer1_2.getElement();
+ Property nestedPartContainer2_1Property = (Property)nestedPartContainer2_1.getElement();
+ List<Property> subNestedPath1_1 = Arrays.asList(new Property[]{ nestedPartContainer1_1Property });
+ List<Property> subNestedPath2_1 = Arrays.asList(new Property[]{ nestedPartContainer2_1Property });
+ List<Property> subNestedPath1_2 = Arrays.asList(new Property[]{ part2, nestedPartContainer1_2Property });
+ List<Property> emptyPath = Collections.emptyList();
+
+
+ for(View view : isCreationAllowed.keySet()) {
+ expectedSourceNestedPath.put(view, emptyPath);
+ expectedTargetNestedPath.put(view, emptyPath);
+ }
+
+ expectedTargetNestedPath.put(subNestedPartContainer1_1_1TargetView, subNestedPath1_1);
+ expectedTargetNestedPath.put(subNestedPartContainer1_2_1TargetView, subNestedPath2_1);
+ expectedTargetNestedPath.put(subNestedPartContainer1_1_2TargetView, subNestedPath1_2);
+
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromFlowPortOnSubNestedPart.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromFlowPortOnSubNestedPart.java
new file mode 100755
index 0000000..db2f10a
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromFlowPortOnSubNestedPart.java
@@ -0,0 +1,109 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link creation test (via palette tools).
+ */
+public class TestLinkCreationConnectorFromFlowPortOnSubNestedPart extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = flowportOnSubNestedPartContainer1_1_1SourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.connector";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+ // Initialize source creation results
+ isCreationAllowed.put(blockTargetView, false);
+ isCreationAllowed.put(actorPartTargetView, true);
+ isCreationAllowed.put(nestedActorPartTargetView, true);
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(portOnPartTargetView, true);
+ isCreationAllowed.put(portOnNestedPartTargetView, true);
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowportOnPartTargetView, true);
+ isCreationAllowed.put(flowportOnNestedPartTargetView, true);
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPartTargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_1_1TargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_2_1TargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_1_2TargetView, true);
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, true);
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, false);
+ isCreationAllowed.put(constraintCNTargetView, false);
+
+ // Initialize nested property path for tests
+ Property part = (Property)partContainer1.getElement();
+ Property part2 = (Property)partContainer2.getElement();
+ Property nestedPart = (Property)nestedPartContainer1_1.getElement();
+ Property subNestedPart = (Property)subNestedPartContainer1_1_1SourceView.getElement();
+ Property nestedPart1_2 = (Property)nestedPartContainer1_2.getElement();
+ Property nestedPart2_1 = (Property)nestedPartContainer2_1.getElement();
+ List<Property> subNestedPath = Arrays.asList(new Property[]{ part, nestedPart, });
+ List<Property> deepNestedPath = Arrays.asList(new Property[]{ part, nestedPart, subNestedPart });
+ List<Property> nestedPath = Arrays.asList(new Property[]{ nestedPart, subNestedPart });
+ List<Property> nestedContainer1_2Path = Arrays.asList(new Property[]{ part2, nestedPart1_2 });
+ List<Property> nestedContainer2_1Path = Arrays.asList(new Property[]{ nestedPart2_1 });
+ List<Property> emptyPath = Collections.emptyList();
+
+
+ for(View view : isCreationAllowed.keySet()) {
+ expectedSourceNestedPath.put(view, emptyPath);
+ expectedTargetNestedPath.put(view, emptyPath);
+ }
+ expectedSourceNestedPath.put(blockTargetView, subNestedPath);
+ expectedSourceNestedPath.put(actorPartTargetView, deepNestedPath);
+ expectedSourceNestedPath.put(portOnBlockTargetView, deepNestedPath);
+ expectedSourceNestedPath.put(portOnPartTargetView, deepNestedPath);
+ expectedSourceNestedPath.put(flowportOnBlockTargetView, deepNestedPath);
+ expectedSourceNestedPath.put(flowportOnPartTargetView, deepNestedPath);
+ expectedSourceNestedPath.put(partTargetView, deepNestedPath);
+ expectedSourceNestedPath.put(propertyTargetView, deepNestedPath);
+ expectedSourceNestedPath.put(referenceTargetView, deepNestedPath);
+ expectedSourceNestedPath.put(valueTargetView, deepNestedPath);
+ expectedSourceNestedPath.put(nestedActorPartTargetView, nestedPath);
+ expectedSourceNestedPath.put(nestedPartTargetView, nestedPath);
+ expectedSourceNestedPath.put(nestedPropertyTargetView, nestedPath);
+ expectedSourceNestedPath.put(nestedReferenceTargetView, nestedPath);
+ expectedSourceNestedPath.put(nestedValueTargetView, nestedPath);
+ expectedSourceNestedPath.put(portOnNestedPartTargetView, nestedPath);
+ expectedSourceNestedPath.put(flowportOnNestedPartTargetView, nestedPath);
+ expectedSourceNestedPath.put(subNestedPartContainer1_1_2TargetView, deepNestedPath);
+ expectedTargetNestedPath.put(subNestedPartContainer1_1_2TargetView, nestedContainer1_2Path);
+ expectedSourceNestedPath.put(subNestedPartContainer1_2_1TargetView, nestedPath);
+ expectedTargetNestedPath.put(subNestedPartContainer1_2_1TargetView, nestedContainer2_1Path);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromNestedActorPart.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromNestedActorPart.java
new file mode 100755
index 0000000..6013357
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromNestedActorPart.java
@@ -0,0 +1,112 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link creation test (via palette tools).
+ */
+public class TestLinkCreationConnectorFromNestedActorPart extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = nestedActorPartSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.connector";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, false);
+
+ isCreationAllowed.put(actorPartTargetView, true);
+ isCreationAllowed.put(nestedActorPartTargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(portOnPartTargetView, true);
+ isCreationAllowed.put(portOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowportOnPartTargetView, true);
+ isCreationAllowed.put(flowportOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPartTargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_1_1TargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_2_1TargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_1_2TargetView, true);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, false);
+ isCreationAllowed.put(constraintCNTargetView, false);
+
+ // Initialize nested property path for tests
+ Property part1 = (Property)partContainer1.getElement();
+ Property part2 = (Property)partContainer2.getElement();
+ Property nestedPartContainer1_1Property = (Property)nestedPartContainer1_1.getElement();
+ Property nestedPartContainer1_2Property = (Property)nestedPartContainer1_2.getElement();
+ Property nestedPartContainer2_1Property = (Property)nestedPartContainer2_1.getElement();
+ List<Property> subNestedPath1_1 = Arrays.asList(nestedPartContainer1_1Property);
+ List<Property> subNestedPath2_1 = Arrays.asList(new Property[]{ nestedPartContainer2_1Property });
+ List<Property> subNestedPath1_2 = Arrays.asList(new Property[]{ part2, nestedPartContainer1_2Property });
+ List<Property> emptyPath = Collections.emptyList();
+ List<Property> nestedPath = Arrays.asList(new Property[]{ part1 });
+
+
+ for(View view : isCreationAllowed.keySet()) {
+ expectedSourceNestedPath.put(view, emptyPath);
+ expectedTargetNestedPath.put(view, emptyPath);
+ }
+
+ expectedSourceNestedPath.put(blockTargetView, nestedPath);
+ expectedSourceNestedPath.put(actorPartTargetView, nestedPath);
+ expectedSourceNestedPath.put(portOnBlockTargetView, nestedPath);
+ expectedSourceNestedPath.put(portOnPartTargetView, nestedPath);
+ expectedTargetNestedPath.put(subNestedPartContainer1_1_1TargetView, subNestedPath1_1);
+ expectedTargetNestedPath.put(subNestedPartContainer1_2_1TargetView, subNestedPath2_1);
+ expectedTargetNestedPath.put(subNestedPartContainer1_1_2TargetView, subNestedPath1_2);
+ expectedSourceNestedPath.put(subNestedPartContainer1_1_2TargetView, nestedPath);
+ expectedSourceNestedPath.put(flowportOnBlockTargetView, nestedPath);
+ expectedSourceNestedPath.put(flowportOnPartTargetView, nestedPath);
+ expectedSourceNestedPath.put(partTargetView, nestedPath);
+ expectedSourceNestedPath.put(propertyTargetView, nestedPath);
+ expectedSourceNestedPath.put(referenceTargetView, nestedPath);
+ expectedSourceNestedPath.put(valueTargetView, nestedPath);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromNestedPart.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromNestedPart.java
new file mode 100755
index 0000000..bcb0fd2
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromNestedPart.java
@@ -0,0 +1,113 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link creation test (via palette tools).
+ */
+public class TestLinkCreationConnectorFromNestedPart extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = nestedPartSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.connector";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, false);
+
+ isCreationAllowed.put(actorPartTargetView, true);
+ isCreationAllowed.put(nestedActorPartTargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(portOnPartTargetView, true);
+ isCreationAllowed.put(portOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowportOnPartTargetView, true);
+ isCreationAllowed.put(flowportOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPartTargetView, true);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_1_1TargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_2_1TargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_1_2TargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, false);
+ isCreationAllowed.put(constraintCNTargetView, false);
+
+ // Initialize nested property path for tests
+ Property part1 = (Property)partContainer1.getElement();
+ Property part2 = (Property)partContainer2.getElement();
+ Property nestedPartContainer1_1Property = (Property)nestedPartContainer1_1.getElement();
+ Property nestedPartContainer1_2Property = (Property)nestedPartContainer1_2.getElement();
+ Property nestedPartContainer2_1Property = (Property)nestedPartContainer2_1.getElement();
+ List<Property> subNestedPath1_1 = Arrays.asList(nestedPartContainer1_1Property);
+ List<Property> subNestedPath2_1 = Arrays.asList(new Property[]{ nestedPartContainer2_1Property });
+ List<Property> subNestedPath1_2 = Arrays.asList(new Property[]{ part2, nestedPartContainer1_2Property });
+ List<Property> emptyPath = Collections.emptyList();
+ List<Property> nestedPath = Arrays.asList(new Property[]{ part1 });
+
+
+ for(View view : isCreationAllowed.keySet()) {
+ expectedSourceNestedPath.put(view, emptyPath);
+ expectedTargetNestedPath.put(view, emptyPath);
+ }
+
+ expectedSourceNestedPath.put(blockTargetView, nestedPath);
+ expectedSourceNestedPath.put(actorPartTargetView, nestedPath);
+ expectedSourceNestedPath.put(portOnBlockTargetView, nestedPath);
+ expectedSourceNestedPath.put(portOnPartTargetView, nestedPath);
+ expectedTargetNestedPath.put(subNestedPartContainer1_1_1TargetView, subNestedPath1_1);
+ expectedTargetNestedPath.put(subNestedPartContainer1_2_1TargetView, subNestedPath2_1);
+ expectedTargetNestedPath.put(subNestedPartContainer1_1_2TargetView, subNestedPath1_2);
+ expectedSourceNestedPath.put(subNestedPartContainer1_1_2TargetView, nestedPath);
+ expectedSourceNestedPath.put(flowportOnBlockTargetView, nestedPath);
+ expectedSourceNestedPath.put(flowportOnPartTargetView, nestedPath);
+ expectedSourceNestedPath.put(partTargetView, nestedPath);
+ expectedSourceNestedPath.put(propertyTargetView, nestedPath);
+ expectedSourceNestedPath.put(referenceTargetView, nestedPath);
+ expectedSourceNestedPath.put(valueTargetView, nestedPath);
+
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromNestedProperty.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromNestedProperty.java
new file mode 100755
index 0000000..32be5e1
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromNestedProperty.java
@@ -0,0 +1,112 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link creation test (via palette tools).
+ */
+public class TestLinkCreationConnectorFromNestedProperty extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = nestedPropertySourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.connector";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, false);
+
+ isCreationAllowed.put(actorPartTargetView, true);
+ isCreationAllowed.put(nestedActorPartTargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(portOnPartTargetView, true);
+ isCreationAllowed.put(portOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowportOnPartTargetView, true);
+ isCreationAllowed.put(flowportOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPartTargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_1_1TargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_2_1TargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_1_2TargetView, true);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, false);
+ isCreationAllowed.put(constraintCNTargetView, false);
+
+ // Initialize nested property path for tests
+ Property part1 = (Property)partContainer1.getElement();
+ Property part2 = (Property)partContainer2.getElement();
+ Property nestedPartContainer1_1Property = (Property)nestedPartContainer1_1.getElement();
+ Property nestedPartContainer1_2Property = (Property)nestedPartContainer1_2.getElement();
+ Property nestedPartContainer2_1Property = (Property)nestedPartContainer2_1.getElement();
+ List<Property> subNestedPath1_1 = Arrays.asList(nestedPartContainer1_1Property);
+ List<Property> subNestedPath2_1 = Arrays.asList(new Property[]{ nestedPartContainer2_1Property });
+ List<Property> subNestedPath1_2 = Arrays.asList(new Property[]{ part2, nestedPartContainer1_2Property });
+ List<Property> emptyPath = Collections.emptyList();
+ List<Property> nestedPath = Arrays.asList(new Property[]{ part1 });
+
+
+ for(View view : isCreationAllowed.keySet()) {
+ expectedSourceNestedPath.put(view, emptyPath);
+ expectedTargetNestedPath.put(view, emptyPath);
+ }
+
+ expectedSourceNestedPath.put(blockTargetView, nestedPath);
+ expectedSourceNestedPath.put(actorPartTargetView, nestedPath);
+ expectedSourceNestedPath.put(portOnBlockTargetView, nestedPath);
+ expectedSourceNestedPath.put(portOnPartTargetView, nestedPath);
+ expectedTargetNestedPath.put(subNestedPartContainer1_1_1TargetView, subNestedPath1_1);
+ expectedTargetNestedPath.put(subNestedPartContainer1_2_1TargetView, subNestedPath2_1);
+ expectedTargetNestedPath.put(subNestedPartContainer1_1_2TargetView, subNestedPath1_2);
+ expectedSourceNestedPath.put(subNestedPartContainer1_1_2TargetView, nestedPath);
+ expectedSourceNestedPath.put(flowportOnBlockTargetView, nestedPath);
+ expectedSourceNestedPath.put(flowportOnPartTargetView, nestedPath);
+ expectedSourceNestedPath.put(partTargetView, nestedPath);
+ expectedSourceNestedPath.put(propertyTargetView, nestedPath);
+ expectedSourceNestedPath.put(referenceTargetView, nestedPath);
+ expectedSourceNestedPath.put(valueTargetView, nestedPath);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromNestedReference.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromNestedReference.java
new file mode 100755
index 0000000..4893076
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromNestedReference.java
@@ -0,0 +1,112 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link creation test (via palette tools).
+ */
+public class TestLinkCreationConnectorFromNestedReference extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = nestedReferenceSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.connector";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, false);
+
+ isCreationAllowed.put(actorPartTargetView, true);
+ isCreationAllowed.put(nestedActorPartTargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(portOnPartTargetView, true);
+ isCreationAllowed.put(portOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowportOnPartTargetView, true);
+ isCreationAllowed.put(flowportOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPartTargetView, true);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_1_1TargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_2_1TargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_1_2TargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, false);
+ isCreationAllowed.put(constraintCNTargetView, false);
+
+ // Initialize nested property path for tests
+ Property part1 = (Property)partContainer1.getElement();
+ Property part2 = (Property)partContainer2.getElement();
+ Property nestedPartContainer1_1Property = (Property)nestedPartContainer1_1.getElement();
+ Property nestedPartContainer1_2Property = (Property)nestedPartContainer1_2.getElement();
+ Property nestedPartContainer2_1Property = (Property)nestedPartContainer2_1.getElement();
+ List<Property> subNestedPath1_1 = Arrays.asList(nestedPartContainer1_1Property);
+ List<Property> subNestedPath2_1 = Arrays.asList(new Property[]{ nestedPartContainer2_1Property });
+ List<Property> subNestedPath1_2 = Arrays.asList(new Property[]{ part2, nestedPartContainer1_2Property });
+ List<Property> emptyPath = Collections.emptyList();
+ List<Property> nestedPath = Arrays.asList(new Property[]{ part1 });
+
+
+ for(View view : isCreationAllowed.keySet()) {
+ expectedSourceNestedPath.put(view, emptyPath);
+ expectedTargetNestedPath.put(view, emptyPath);
+ }
+
+ expectedSourceNestedPath.put(blockTargetView, nestedPath);
+ expectedSourceNestedPath.put(actorPartTargetView, nestedPath);
+ expectedSourceNestedPath.put(portOnBlockTargetView, nestedPath);
+ expectedSourceNestedPath.put(portOnPartTargetView, nestedPath);
+ expectedTargetNestedPath.put(subNestedPartContainer1_1_1TargetView, subNestedPath1_1);
+ expectedTargetNestedPath.put(subNestedPartContainer1_2_1TargetView, subNestedPath2_1);
+ expectedTargetNestedPath.put(subNestedPartContainer1_1_2TargetView, subNestedPath1_2);
+ expectedSourceNestedPath.put(subNestedPartContainer1_1_2TargetView, nestedPath);
+ expectedSourceNestedPath.put(flowportOnBlockTargetView, nestedPath);
+ expectedSourceNestedPath.put(flowportOnPartTargetView, nestedPath);
+ expectedSourceNestedPath.put(partTargetView, nestedPath);
+ expectedSourceNestedPath.put(propertyTargetView, nestedPath);
+ expectedSourceNestedPath.put(referenceTargetView, nestedPath);
+ expectedSourceNestedPath.put(valueTargetView, nestedPath);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromNestedValue.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromNestedValue.java
new file mode 100755
index 0000000..9d32782
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromNestedValue.java
@@ -0,0 +1,112 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link creation test (via palette tools).
+ */
+public class TestLinkCreationConnectorFromNestedValue extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = nestedValueSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.connector";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, false);
+
+ isCreationAllowed.put(actorPartTargetView, true);
+ isCreationAllowed.put(nestedActorPartTargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(portOnPartTargetView, true);
+ isCreationAllowed.put(portOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowportOnPartTargetView, true);
+ isCreationAllowed.put(flowportOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPartTargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_1_1TargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_2_1TargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_1_2TargetView, true);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, false);
+ isCreationAllowed.put(constraintCNTargetView, false);
+
+ // Initialize nested property path for tests
+ Property part1 = (Property)partContainer1.getElement();
+ Property part2 = (Property)partContainer2.getElement();
+ Property nestedPartContainer1_1Property = (Property)nestedPartContainer1_1.getElement();
+ Property nestedPartContainer1_2Property = (Property)nestedPartContainer1_2.getElement();
+ Property nestedPartContainer2_1Property = (Property)nestedPartContainer2_1.getElement();
+ List<Property> subNestedPath1_1 = Arrays.asList(nestedPartContainer1_1Property);
+ List<Property> subNestedPath2_1 = Arrays.asList(new Property[]{ nestedPartContainer2_1Property });
+ List<Property> subNestedPath1_2 = Arrays.asList(new Property[]{ part2, nestedPartContainer1_2Property });
+ List<Property> emptyPath = Collections.emptyList();
+ List<Property> nestedPath = Arrays.asList(new Property[]{ part1 });
+
+
+ for(View view : isCreationAllowed.keySet()) {
+ expectedSourceNestedPath.put(view, emptyPath);
+ expectedTargetNestedPath.put(view, emptyPath);
+ }
+
+ expectedSourceNestedPath.put(blockTargetView, nestedPath);
+ expectedSourceNestedPath.put(actorPartTargetView, nestedPath);
+ expectedSourceNestedPath.put(portOnBlockTargetView, nestedPath);
+ expectedSourceNestedPath.put(portOnPartTargetView, nestedPath);
+ expectedTargetNestedPath.put(subNestedPartContainer1_1_1TargetView, subNestedPath1_1);
+ expectedTargetNestedPath.put(subNestedPartContainer1_2_1TargetView, subNestedPath2_1);
+ expectedTargetNestedPath.put(subNestedPartContainer1_1_2TargetView, subNestedPath1_2);
+ expectedSourceNestedPath.put(subNestedPartContainer1_1_2TargetView, nestedPath);
+ expectedSourceNestedPath.put(flowportOnBlockTargetView, nestedPath);
+ expectedSourceNestedPath.put(flowportOnPartTargetView, nestedPath);
+ expectedSourceNestedPath.put(partTargetView, nestedPath);
+ expectedSourceNestedPath.put(propertyTargetView, nestedPath);
+ expectedSourceNestedPath.put(referenceTargetView, nestedPath);
+ expectedSourceNestedPath.put(valueTargetView, nestedPath);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromPart.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromPart.java
new file mode 100755
index 0000000..5dd267f
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromPart.java
@@ -0,0 +1,109 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link creation test (via palette tools).
+ */
+public class TestLinkCreationConnectorFromPart extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = partSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.connector";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, false);
+
+ isCreationAllowed.put(actorPartTargetView, true);
+ isCreationAllowed.put(nestedActorPartTargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(portOnPartTargetView, true);
+ isCreationAllowed.put(portOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowportOnPartTargetView, true);
+ isCreationAllowed.put(flowportOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPartTargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_1_1TargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_2_1TargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_1_2TargetView, true);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, false);
+ isCreationAllowed.put(constraintCNTargetView, false);
+
+ // Initialize nested property path for tests
+ Property part1 = (Property)partContainer1.getElement();
+ Property part2 = (Property)partContainer2.getElement();
+ Property nestedPartContainer1_1Property = (Property)nestedPartContainer1_1.getElement();
+ Property nestedPartContainer1_2Property = (Property)nestedPartContainer1_2.getElement();
+ Property nestedPartContainer2_1Property = (Property)nestedPartContainer2_1.getElement();
+ List<Property> subNestedPath1_1 = Arrays.asList(new Property[]{ part1, nestedPartContainer1_1Property });
+ List<Property> subNestedPath1_2 = Arrays.asList(new Property[]{ part2, nestedPartContainer1_2Property });
+ List<Property> subNestedPath2_1 = Arrays.asList(new Property[]{ part1, nestedPartContainer2_1Property });
+ List<Property> nestedPath = Arrays.asList(new Property[]{ part1 });
+ List<Property> emptyPath = Collections.emptyList();
+
+
+ for(View view : isCreationAllowed.keySet()) {
+ expectedSourceNestedPath.put(view, emptyPath);
+ expectedTargetNestedPath.put(view, emptyPath);
+ }
+
+ expectedTargetNestedPath.put(nestedActorPartTargetView, nestedPath);
+ expectedTargetNestedPath.put(portOnNestedPartTargetView, subNestedPath2_1);
+ expectedTargetNestedPath.put(flowportOnNestedPartTargetView, subNestedPath2_1);
+ expectedTargetNestedPath.put(nestedPartTargetView, nestedPath);
+ expectedTargetNestedPath.put(nestedPropertyTargetView, nestedPath);
+ expectedTargetNestedPath.put(nestedReferenceTargetView, nestedPath);
+ expectedTargetNestedPath.put(nestedValueTargetView, nestedPath);
+
+ expectedTargetNestedPath.put(subNestedPartContainer1_1_1TargetView, subNestedPath1_1);
+ expectedTargetNestedPath.put(subNestedPartContainer1_1_2TargetView, subNestedPath1_2);
+ expectedTargetNestedPath.put(subNestedPartContainer1_2_1TargetView, subNestedPath2_1);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromPortOnBlock.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromPortOnBlock.java
new file mode 100755
index 0000000..5caf3b2
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromPortOnBlock.java
@@ -0,0 +1,108 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link creation test (via palette tools).
+ */
+public class TestLinkCreationConnectorFromPortOnBlock extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = portOnBlockSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.connector";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, false);
+
+ isCreationAllowed.put(actorPartTargetView, true);
+ isCreationAllowed.put(nestedActorPartTargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(portOnPartTargetView, true);
+ isCreationAllowed.put(portOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowportOnPartTargetView, true);
+ isCreationAllowed.put(flowportOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPartTargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_1_1TargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_2_1TargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_1_2TargetView, true);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, false);
+ isCreationAllowed.put(constraintCNTargetView, false);
+
+ // Initialize nested property path for tests
+ Property part1 = (Property)partContainer1.getElement();
+ Property part2 = (Property)partContainer2.getElement();
+ Property nestedPartContainer1_1Property = (Property)nestedPartContainer1_1.getElement();
+ Property nestedPartContainer1_2Property = (Property)nestedPartContainer1_2.getElement();
+ Property nestedPartContainer2_1Property = (Property)nestedPartContainer2_1.getElement();
+ List<Property> subNestedPath1_1 = Arrays.asList(new Property[]{ part1, nestedPartContainer1_1Property });
+ List<Property> subNestedPath1_2 = Arrays.asList(new Property[]{ part2, nestedPartContainer1_2Property });
+ List<Property> subNestedPath2_1 = Arrays.asList(new Property[]{ part1, nestedPartContainer2_1Property });
+ List<Property> nestedPath = Arrays.asList(new Property[]{ part1 });
+ List<Property> emptyPath = Collections.emptyList();
+
+
+ for(View view : isCreationAllowed.keySet()) {
+ expectedSourceNestedPath.put(view, emptyPath);
+ expectedTargetNestedPath.put(view, emptyPath);
+ }
+
+ expectedTargetNestedPath.put(nestedActorPartTargetView, nestedPath);
+ expectedTargetNestedPath.put(portOnNestedPartTargetView, subNestedPath2_1);
+ expectedTargetNestedPath.put(flowportOnNestedPartTargetView, subNestedPath2_1);
+ expectedTargetNestedPath.put(nestedPartTargetView, nestedPath);
+ expectedTargetNestedPath.put(subNestedPartContainer1_1_1TargetView, subNestedPath1_1);
+ expectedTargetNestedPath.put(subNestedPartContainer1_2_1TargetView, subNestedPath2_1);
+ expectedTargetNestedPath.put(subNestedPartContainer1_1_2TargetView, subNestedPath1_2);
+ expectedTargetNestedPath.put(nestedPropertyTargetView, nestedPath);
+ expectedTargetNestedPath.put(nestedReferenceTargetView, nestedPath);
+ expectedTargetNestedPath.put(nestedValueTargetView, nestedPath);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromPortOnNestedPart.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromPortOnNestedPart.java
new file mode 100755
index 0000000..b59f50f
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromPortOnNestedPart.java
@@ -0,0 +1,112 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link creation test (via palette tools).
+ */
+public class TestLinkCreationConnectorFromPortOnNestedPart extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = portOnNestedPartSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.connector";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, false);
+
+ isCreationAllowed.put(actorPartTargetView, true);
+ isCreationAllowed.put(nestedActorPartTargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(portOnPartTargetView, true);
+ isCreationAllowed.put(portOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowportOnPartTargetView, true);
+ isCreationAllowed.put(flowportOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPartTargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_1_1TargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_2_1TargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_1_2TargetView, true);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, false);
+ isCreationAllowed.put(constraintCNTargetView, false);
+
+ // Initialize nested property path for tests
+ Property part1 = (Property)partContainer1.getElement();
+ Property part2 = (Property)partContainer2.getElement();
+ Property nestedPartContainer1_1Property = (Property)nestedPartContainer1_1.getElement();
+ Property nestedPartContainer1_2Property = (Property)nestedPartContainer1_2.getElement();
+ Property nestedPartContainer2_1Property = (Property)nestedPartContainer2_1.getElement();
+ List<Property> subNestedPath1_1 = Arrays.asList(new Property[]{ part1, nestedPartContainer1_1Property });
+ List<Property> subNestedPath2_1 = Arrays.asList(new Property[]{ nestedPartContainer2_1Property });
+ List<Property> subNestedPath1_2 = Arrays.asList(new Property[]{ part2, nestedPartContainer1_2Property });
+ List<Property> emptyPath = Collections.emptyList();
+ List<Property> nestedPath = Arrays.asList(new Property[]{ part1 });
+
+
+ for(View view : isCreationAllowed.keySet()) {
+ expectedSourceNestedPath.put(view, emptyPath);
+ expectedTargetNestedPath.put(view, emptyPath);
+ }
+
+ expectedSourceNestedPath.put(blockTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(actorPartTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(portOnBlockTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(portOnPartTargetView, subNestedPath1_1);
+ expectedTargetNestedPath.put(subNestedPartContainer1_1_1TargetView, emptyPath);
+ expectedTargetNestedPath.put(subNestedPartContainer1_2_1TargetView, subNestedPath2_1);
+ expectedTargetNestedPath.put(subNestedPartContainer1_1_2TargetView, subNestedPath1_2);
+ expectedSourceNestedPath.put(subNestedPartContainer1_1_2TargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(flowportOnBlockTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(flowportOnPartTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(partTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(propertyTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(referenceTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(valueTargetView, subNestedPath1_1);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromPortOnPart.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromPortOnPart.java
new file mode 100755
index 0000000..963d77b
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromPortOnPart.java
@@ -0,0 +1,100 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link creation test (via palette tools).
+ */
+public class TestLinkCreationConnectorFromPortOnPart extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = portOnPartSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.connector";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, false);
+
+ isCreationAllowed.put(actorPartTargetView, true);
+ isCreationAllowed.put(nestedActorPartTargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(portOnPartTargetView, true);
+ isCreationAllowed.put(portOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowportOnPartTargetView, true);
+ isCreationAllowed.put(flowportOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPartTargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_1_1TargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_2_1TargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_1_2TargetView, true);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, false);
+ isCreationAllowed.put(constraintCNTargetView, false);
+
+ // Initialize nested property path for tests
+ Property part1 = (Property)partContainer1.getElement();
+ Property part2 = (Property)partContainer2.getElement();
+ Property nestedPartContainer1_1Property = (Property)nestedPartContainer1_1.getElement();
+ Property nestedPartContainer1_2Property = (Property)nestedPartContainer1_2.getElement();
+ Property nestedPartContainer2_1Property = (Property)nestedPartContainer2_1.getElement();
+ List<Property> subNestedPath1_1 = Arrays.asList(new Property[]{ nestedPartContainer1_1Property });
+ List<Property> subNestedPath2_1 = Arrays.asList(new Property[]{ nestedPartContainer2_1Property });
+ List<Property> subNestedPath1_2 = Arrays.asList(new Property[]{ part2, nestedPartContainer1_2Property });
+ List<Property> emptyPath = Collections.emptyList();
+
+
+ for(View view : isCreationAllowed.keySet()) {
+ expectedSourceNestedPath.put(view, emptyPath);
+ expectedTargetNestedPath.put(view, emptyPath);
+ }
+
+ expectedTargetNestedPath.put(subNestedPartContainer1_1_1TargetView, subNestedPath1_1);
+ expectedTargetNestedPath.put(subNestedPartContainer1_2_1TargetView, subNestedPath2_1);
+ expectedTargetNestedPath.put(subNestedPartContainer1_1_2TargetView, subNestedPath1_2);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromPortOnSubNestedPart.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromPortOnSubNestedPart.java
new file mode 100755
index 0000000..1b9ecba
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromPortOnSubNestedPart.java
@@ -0,0 +1,127 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link creation test (via palette tools).
+ */
+public class TestLinkCreationConnectorFromPortOnSubNestedPart extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = portOnSubNestedPartContainer1_1_1SourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.connector";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, false);
+
+ isCreationAllowed.put(actorPartTargetView, true);
+ isCreationAllowed.put(nestedActorPartTargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(portOnPartTargetView, true);
+ isCreationAllowed.put(portOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowportOnPartTargetView, true);
+ isCreationAllowed.put(flowportOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPartTargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_1_1TargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_2_1TargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_1_2TargetView, true);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, false);
+ isCreationAllowed.put(constraintCNTargetView, false);
+
+ // Initialize nested property path for tests
+ Property part = (Property)partContainer1.getElement();
+ Property part2 = (Property)partContainer2.getElement();
+ Property nestedPart = (Property)nestedPartContainer1_1.getElement();
+ Property subNestedPart = (Property)subNestedPartContainer1_1_1SourceView.getElement();
+ Property nestedPart1_2 = (Property)nestedPartContainer1_2.getElement();
+ Property nestedPart2_1 = (Property)nestedPartContainer2_1.getElement();
+ List<Property> subNestedPath = Arrays.asList(new Property[] {part, nestedPart, });
+ List<Property> deepNestedPath = Arrays.asList(new Property[] {part, nestedPart, subNestedPart});
+ List<Property> nestedPath = Arrays.asList(new Property[]{ nestedPart, subNestedPart});
+ List<Property> nestedContainer1_2Path = Arrays.asList(new Property[]{ part2, nestedPart1_2 });
+ List<Property> nestedContainer2_1Path = Arrays.asList(new Property[]{ nestedPart2_1 });
+ List<Property> emptyPath = Collections.emptyList();
+
+
+ for(View view : isCreationAllowed.keySet()) {
+ expectedSourceNestedPath.put(view, emptyPath);
+ expectedTargetNestedPath.put(view, emptyPath);
+ }
+
+ expectedSourceNestedPath.put(blockTargetView, subNestedPath);
+ expectedSourceNestedPath.put(actorPartTargetView, deepNestedPath);
+ expectedSourceNestedPath.put(portOnBlockTargetView, deepNestedPath);
+ expectedSourceNestedPath.put(portOnPartTargetView, deepNestedPath);
+ expectedSourceNestedPath.put(flowportOnBlockTargetView, deepNestedPath);
+ expectedSourceNestedPath.put(flowportOnPartTargetView, deepNestedPath);
+ expectedSourceNestedPath.put(partTargetView, deepNestedPath);
+ expectedSourceNestedPath.put(propertyTargetView, deepNestedPath);
+ expectedSourceNestedPath.put(referenceTargetView, deepNestedPath);
+ expectedSourceNestedPath.put(valueTargetView, deepNestedPath);
+
+ expectedSourceNestedPath.put(nestedActorPartTargetView, nestedPath);
+ expectedSourceNestedPath.put(nestedPartTargetView, nestedPath);
+ expectedSourceNestedPath.put(nestedPropertyTargetView, nestedPath);
+ expectedSourceNestedPath.put(nestedReferenceTargetView, nestedPath);
+ expectedSourceNestedPath.put(nestedValueTargetView, nestedPath);
+
+ expectedSourceNestedPath.put(portOnNestedPartTargetView, nestedPath);
+ expectedSourceNestedPath.put(flowportOnNestedPartTargetView, nestedPath);
+
+ expectedSourceNestedPath.put(subNestedPartContainer1_1_2TargetView, deepNestedPath);
+ expectedTargetNestedPath.put(subNestedPartContainer1_1_2TargetView, nestedContainer1_2Path);
+ expectedSourceNestedPath.put(subNestedPartContainer1_2_1TargetView, nestedPath);
+ expectedTargetNestedPath.put(subNestedPartContainer1_2_1TargetView, nestedContainer2_1Path);
+
+
+
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromProperty.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromProperty.java
new file mode 100755
index 0000000..9943fd0
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromProperty.java
@@ -0,0 +1,109 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link creation test (via palette tools).
+ */
+public class TestLinkCreationConnectorFromProperty extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = propertySourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.connector";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, false);
+
+ isCreationAllowed.put(actorPartTargetView, true);
+ isCreationAllowed.put(nestedActorPartTargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(portOnPartTargetView, true);
+ isCreationAllowed.put(portOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowportOnPartTargetView, true);
+ isCreationAllowed.put(flowportOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPartTargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_1_1TargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_2_1TargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_1_2TargetView, true);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, false);
+ isCreationAllowed.put(constraintCNTargetView, false);
+
+ // Initialize nested property path for tests
+ Property part1 = (Property)partContainer1.getElement();
+ Property part2 = (Property)partContainer2.getElement();
+ Property nestedPartContainer1_1Property = (Property)nestedPartContainer1_1.getElement();
+ Property nestedPartContainer1_2Property = (Property)nestedPartContainer1_2.getElement();
+ Property nestedPartContainer2_1Property = (Property)nestedPartContainer2_1.getElement();
+ List<Property> subNestedPath1_1 = Arrays.asList(new Property[]{ part1, nestedPartContainer1_1Property });
+ List<Property> subNestedPath1_2 = Arrays.asList(new Property[]{ part2, nestedPartContainer1_2Property });
+ List<Property> subNestedPath2_1 = Arrays.asList(new Property[]{ part1, nestedPartContainer2_1Property });
+ List<Property> nestedPath = Arrays.asList(new Property[]{ part1 });
+ List<Property> emptyPath = Collections.emptyList();
+
+
+ for(View view : isCreationAllowed.keySet()) {
+ expectedSourceNestedPath.put(view, emptyPath);
+ expectedTargetNestedPath.put(view, emptyPath);
+ }
+
+ expectedTargetNestedPath.put(nestedActorPartTargetView, nestedPath);
+ expectedTargetNestedPath.put(portOnNestedPartTargetView, subNestedPath2_1);
+ expectedTargetNestedPath.put(flowportOnNestedPartTargetView, subNestedPath2_1);
+ expectedTargetNestedPath.put(nestedPartTargetView, nestedPath);
+ expectedTargetNestedPath.put(nestedPropertyTargetView, nestedPath);
+ expectedTargetNestedPath.put(nestedReferenceTargetView, nestedPath);
+ expectedTargetNestedPath.put(nestedValueTargetView, nestedPath);
+
+ expectedTargetNestedPath.put(subNestedPartContainer1_1_1TargetView, subNestedPath1_1);
+ expectedTargetNestedPath.put(subNestedPartContainer1_1_2TargetView, subNestedPath1_2);
+ expectedTargetNestedPath.put(subNestedPartContainer1_2_1TargetView, subNestedPath2_1);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromReference.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromReference.java
new file mode 100755
index 0000000..d74ed0e
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromReference.java
@@ -0,0 +1,109 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link creation test (via palette tools).
+ */
+public class TestLinkCreationConnectorFromReference extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = referenceSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.connector";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, false);
+
+ isCreationAllowed.put(actorPartTargetView, true);
+ isCreationAllowed.put(nestedActorPartTargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(portOnPartTargetView, true);
+ isCreationAllowed.put(portOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowportOnPartTargetView, true);
+ isCreationAllowed.put(flowportOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPartTargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_1_1TargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_2_1TargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_1_2TargetView, true);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, false);
+ isCreationAllowed.put(constraintCNTargetView, false);
+
+ // Initialize nested property path for tests
+ Property part1 = (Property)partContainer1.getElement();
+ Property part2 = (Property)partContainer2.getElement();
+ Property nestedPartContainer1_1Property = (Property)nestedPartContainer1_1.getElement();
+ Property nestedPartContainer1_2Property = (Property)nestedPartContainer1_2.getElement();
+ Property nestedPartContainer2_1Property = (Property)nestedPartContainer2_1.getElement();
+ List<Property> subNestedPath1_1 = Arrays.asList(new Property[]{ part1, nestedPartContainer1_1Property });
+ List<Property> subNestedPath1_2 = Arrays.asList(new Property[]{ part2, nestedPartContainer1_2Property });
+ List<Property> subNestedPath2_1 = Arrays.asList(new Property[]{ part1, nestedPartContainer2_1Property });
+ List<Property> nestedPath = Arrays.asList(new Property[]{ part1 });
+ List<Property> emptyPath = Collections.emptyList();
+
+
+ for(View view : isCreationAllowed.keySet()) {
+ expectedSourceNestedPath.put(view, emptyPath);
+ expectedTargetNestedPath.put(view, emptyPath);
+ }
+
+ expectedTargetNestedPath.put(nestedActorPartTargetView, nestedPath);
+ expectedTargetNestedPath.put(portOnNestedPartTargetView, subNestedPath2_1);
+ expectedTargetNestedPath.put(flowportOnNestedPartTargetView, subNestedPath2_1);
+ expectedTargetNestedPath.put(nestedPartTargetView, nestedPath);
+ expectedTargetNestedPath.put(nestedPropertyTargetView, nestedPath);
+ expectedTargetNestedPath.put(nestedReferenceTargetView, nestedPath);
+ expectedTargetNestedPath.put(nestedValueTargetView, nestedPath);
+
+ expectedTargetNestedPath.put(subNestedPartContainer1_1_1TargetView, subNestedPath1_1);
+ expectedTargetNestedPath.put(subNestedPartContainer1_1_2TargetView, subNestedPath1_2);
+ expectedTargetNestedPath.put(subNestedPartContainer1_2_1TargetView, subNestedPath2_1);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromSubNestedActorPart.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromSubNestedActorPart.java
new file mode 100755
index 0000000..af5336e
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromSubNestedActorPart.java
@@ -0,0 +1,122 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link creation test (via palette tools).
+ */
+public class TestLinkCreationConnectorFromSubNestedActorPart extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = subNestedActorPartContainer1_1_1SourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.connector";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, false);
+
+ isCreationAllowed.put(actorPartTargetView, true);
+ isCreationAllowed.put(nestedActorPartTargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(portOnPartTargetView, true);
+ isCreationAllowed.put(portOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowportOnPartTargetView, true);
+ isCreationAllowed.put(flowportOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPartTargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_1_1TargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_2_1TargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_1_2TargetView, true);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, false);
+ isCreationAllowed.put(constraintCNTargetView, false);
+
+ // Initialize nested property path for tests
+ Property part1 = (Property)partContainer1.getElement();
+ Property part2 = (Property)partContainer2.getElement();
+ Property nestedPartContainer1_1Property = (Property)nestedPartContainer1_1.getElement();
+ Property nestedPartContainer1_2Property = (Property)nestedPartContainer1_2.getElement();
+ Property nestedPartContainer2_1Property = (Property)nestedPartContainer2_1.getElement();
+ List<Property> subNestedPath1_1 = Arrays.asList(part1, nestedPartContainer1_1Property);
+ List<Property> subNestedPath2_1 = Arrays.asList(nestedPartContainer2_1Property);
+
+
+ List<Property> subNestedPath1_2 = Arrays.asList(new Property[]{ part2, nestedPartContainer1_2Property });
+ List<Property> emptyPath = Collections.emptyList();
+ List<Property> nestedPath = Arrays.asList(new Property[]{ nestedPartContainer1_1Property });
+
+
+ for(View view : isCreationAllowed.keySet()) {
+ expectedSourceNestedPath.put(view, emptyPath);
+ expectedTargetNestedPath.put(view, emptyPath);
+ }
+
+ expectedSourceNestedPath.put(blockTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(actorPartTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(portOnBlockTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(portOnPartTargetView, subNestedPath1_1);
+ expectedTargetNestedPath.put(subNestedPartContainer1_1_2TargetView, subNestedPath1_2);
+ expectedSourceNestedPath.put(subNestedPartContainer1_1_2TargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(subNestedPartContainer1_2_1TargetView, nestedPath);
+ expectedTargetNestedPath.put(subNestedPartContainer1_2_1TargetView, subNestedPath2_1);
+ expectedSourceNestedPath.put(flowportOnBlockTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(flowportOnPartTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(partTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(propertyTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(referenceTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(valueTargetView, subNestedPath1_1);
+
+ expectedSourceNestedPath.put(nestedActorPartTargetView, nestedPath);
+ expectedSourceNestedPath.put(nestedPartTargetView, nestedPath);
+ expectedSourceNestedPath.put(nestedPropertyTargetView, nestedPath);
+ expectedSourceNestedPath.put(nestedReferenceTargetView, nestedPath);
+ expectedSourceNestedPath.put(nestedValueTargetView, nestedPath);
+ expectedSourceNestedPath.put(portOnNestedPartTargetView, nestedPath);
+ expectedSourceNestedPath.put(flowportOnNestedPartTargetView, nestedPath);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromSubNestedPart.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromSubNestedPart.java
new file mode 100755
index 0000000..f9f078a
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromSubNestedPart.java
@@ -0,0 +1,124 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link creation test (via palette tools).
+ */
+public class TestLinkCreationConnectorFromSubNestedPart extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = subNestedPartContainer1_1_1SourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.connector";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, false);
+
+ isCreationAllowed.put(actorPartTargetView, true);
+ isCreationAllowed.put(nestedActorPartTargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(portOnPartTargetView, true);
+ isCreationAllowed.put(portOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowportOnPartTargetView, true);
+ isCreationAllowed.put(flowportOnNestedPartTargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_1_1TargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_2_1TargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_1_2TargetView, true);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPartTargetView, true);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, false);
+ isCreationAllowed.put(constraintCNTargetView, false);
+
+ // Initialize nested property path for tests
+ Property part1 = (Property)partContainer1.getElement();
+ Property part2 = (Property)partContainer2.getElement();
+ Property nestedPartContainer1_1Property = (Property)nestedPartContainer1_1.getElement();
+ Property nestedPartContainer1_2Property = (Property)nestedPartContainer1_2.getElement();
+ Property nestedPartContainer2_1Property = (Property)nestedPartContainer2_1.getElement();
+ List<Property> subNestedPath1_1 = Arrays.asList(part1, nestedPartContainer1_1Property);
+ List<Property> subNestedPath2_1 = Arrays.asList(nestedPartContainer2_1Property);
+
+
+ List<Property> subNestedPath1_2 = Arrays.asList(new Property[]{ part2, nestedPartContainer1_2Property });
+ List<Property> emptyPath = Collections.emptyList();
+ List<Property> nestedPath = Arrays.asList(new Property[]{ nestedPartContainer1_1Property });
+
+
+ for(View view : isCreationAllowed.keySet()) {
+ expectedSourceNestedPath.put(view, emptyPath);
+ expectedTargetNestedPath.put(view, emptyPath);
+ }
+
+ expectedSourceNestedPath.put(blockTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(actorPartTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(portOnBlockTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(portOnPartTargetView, subNestedPath1_1);
+ expectedTargetNestedPath.put(subNestedPartContainer1_1_2TargetView, subNestedPath1_2);
+ expectedSourceNestedPath.put(subNestedPartContainer1_1_2TargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(subNestedPartContainer1_2_1TargetView, nestedPath);
+ expectedTargetNestedPath.put(subNestedPartContainer1_2_1TargetView, subNestedPath2_1);
+ expectedSourceNestedPath.put(flowportOnBlockTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(flowportOnPartTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(partTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(propertyTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(referenceTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(valueTargetView, subNestedPath1_1);
+
+ expectedSourceNestedPath.put(nestedActorPartTargetView, nestedPath);
+ expectedSourceNestedPath.put(nestedPartTargetView, nestedPath);
+ expectedSourceNestedPath.put(nestedPropertyTargetView, nestedPath);
+ expectedSourceNestedPath.put(nestedReferenceTargetView, nestedPath);
+ expectedSourceNestedPath.put(nestedValueTargetView, nestedPath);
+ expectedSourceNestedPath.put(portOnNestedPartTargetView, nestedPath);
+ expectedSourceNestedPath.put(flowportOnNestedPartTargetView, nestedPath);
+
+
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromSubNestedProperty.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromSubNestedProperty.java
new file mode 100755
index 0000000..b845f57
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromSubNestedProperty.java
@@ -0,0 +1,122 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link creation test (via palette tools).
+ */
+public class TestLinkCreationConnectorFromSubNestedProperty extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = subNestedPropertyContainer1_1_1SourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.connector";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, false);
+
+ isCreationAllowed.put(actorPartTargetView, true);
+ isCreationAllowed.put(nestedActorPartTargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(portOnPartTargetView, true);
+ isCreationAllowed.put(portOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowportOnPartTargetView, true);
+ isCreationAllowed.put(flowportOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPartTargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_1_1TargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_2_1TargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_1_2TargetView, true);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, false);
+ isCreationAllowed.put(constraintCNTargetView, false);
+
+ // Initialize nested property path for tests
+ Property part1 = (Property)partContainer1.getElement();
+ Property part2 = (Property)partContainer2.getElement();
+ Property nestedPartContainer1_1Property = (Property)nestedPartContainer1_1.getElement();
+ Property nestedPartContainer1_2Property = (Property)nestedPartContainer1_2.getElement();
+ Property nestedPartContainer2_1Property = (Property)nestedPartContainer2_1.getElement();
+ List<Property> subNestedPath1_1 = Arrays.asList(part1, nestedPartContainer1_1Property);
+ List<Property> subNestedPath2_1 = Arrays.asList(nestedPartContainer2_1Property);
+
+
+ List<Property> subNestedPath1_2 = Arrays.asList(new Property[]{ part2, nestedPartContainer1_2Property });
+ List<Property> emptyPath = Collections.emptyList();
+ List<Property> nestedPath = Arrays.asList(new Property[]{ nestedPartContainer1_1Property });
+
+
+ for(View view : isCreationAllowed.keySet()) {
+ expectedSourceNestedPath.put(view, emptyPath);
+ expectedTargetNestedPath.put(view, emptyPath);
+ }
+
+ expectedSourceNestedPath.put(blockTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(actorPartTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(portOnBlockTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(portOnPartTargetView, subNestedPath1_1);
+ expectedTargetNestedPath.put(subNestedPartContainer1_1_2TargetView, subNestedPath1_2);
+ expectedSourceNestedPath.put(subNestedPartContainer1_1_2TargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(subNestedPartContainer1_2_1TargetView, nestedPath);
+ expectedTargetNestedPath.put(subNestedPartContainer1_2_1TargetView, subNestedPath2_1);
+ expectedSourceNestedPath.put(flowportOnBlockTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(flowportOnPartTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(partTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(propertyTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(referenceTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(valueTargetView, subNestedPath1_1);
+
+ expectedSourceNestedPath.put(nestedActorPartTargetView, nestedPath);
+ expectedSourceNestedPath.put(nestedPartTargetView, nestedPath);
+ expectedSourceNestedPath.put(nestedPropertyTargetView, nestedPath);
+ expectedSourceNestedPath.put(nestedReferenceTargetView, nestedPath);
+ expectedSourceNestedPath.put(nestedValueTargetView, nestedPath);
+ expectedSourceNestedPath.put(portOnNestedPartTargetView, nestedPath);
+ expectedSourceNestedPath.put(flowportOnNestedPartTargetView, nestedPath);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromSubNestedReference.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromSubNestedReference.java
new file mode 100755
index 0000000..9984f75
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromSubNestedReference.java
@@ -0,0 +1,122 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link creation test (via palette tools).
+ */
+public class TestLinkCreationConnectorFromSubNestedReference extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = subNestedReferenceContainer1_1_1SourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.connector";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, false);
+
+ isCreationAllowed.put(actorPartTargetView, true);
+ isCreationAllowed.put(nestedActorPartTargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(portOnPartTargetView, true);
+ isCreationAllowed.put(portOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowportOnPartTargetView, true);
+ isCreationAllowed.put(flowportOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPartTargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_1_1TargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_2_1TargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_1_2TargetView, true);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, false);
+ isCreationAllowed.put(constraintCNTargetView, false);
+
+ // Initialize nested property path for tests
+ Property part1 = (Property)partContainer1.getElement();
+ Property part2 = (Property)partContainer2.getElement();
+ Property nestedPartContainer1_1Property = (Property)nestedPartContainer1_1.getElement();
+ Property nestedPartContainer1_2Property = (Property)nestedPartContainer1_2.getElement();
+ Property nestedPartContainer2_1Property = (Property)nestedPartContainer2_1.getElement();
+ List<Property> subNestedPath1_1 = Arrays.asList(part1, nestedPartContainer1_1Property);
+ List<Property> subNestedPath2_1 = Arrays.asList(nestedPartContainer2_1Property);
+
+
+ List<Property> subNestedPath1_2 = Arrays.asList(new Property[]{ part2, nestedPartContainer1_2Property });
+ List<Property> emptyPath = Collections.emptyList();
+ List<Property> nestedPath = Arrays.asList(new Property[]{ nestedPartContainer1_1Property });
+
+
+ for(View view : isCreationAllowed.keySet()) {
+ expectedSourceNestedPath.put(view, emptyPath);
+ expectedTargetNestedPath.put(view, emptyPath);
+ }
+
+ expectedSourceNestedPath.put(blockTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(actorPartTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(portOnBlockTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(portOnPartTargetView, subNestedPath1_1);
+ expectedTargetNestedPath.put(subNestedPartContainer1_1_2TargetView, subNestedPath1_2);
+ expectedSourceNestedPath.put(subNestedPartContainer1_1_2TargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(subNestedPartContainer1_2_1TargetView, nestedPath);
+ expectedTargetNestedPath.put(subNestedPartContainer1_2_1TargetView, subNestedPath2_1);
+ expectedSourceNestedPath.put(flowportOnBlockTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(flowportOnPartTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(partTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(propertyTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(referenceTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(valueTargetView, subNestedPath1_1);
+
+ expectedSourceNestedPath.put(nestedActorPartTargetView, nestedPath);
+ expectedSourceNestedPath.put(nestedPartTargetView, nestedPath);
+ expectedSourceNestedPath.put(nestedPropertyTargetView, nestedPath);
+ expectedSourceNestedPath.put(nestedReferenceTargetView, nestedPath);
+ expectedSourceNestedPath.put(nestedValueTargetView, nestedPath);
+ expectedSourceNestedPath.put(portOnNestedPartTargetView, nestedPath);
+ expectedSourceNestedPath.put(flowportOnNestedPartTargetView, nestedPath);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromSubNestedValue.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromSubNestedValue.java
new file mode 100755
index 0000000..27b94c5
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromSubNestedValue.java
@@ -0,0 +1,122 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link creation test (via palette tools).
+ */
+public class TestLinkCreationConnectorFromSubNestedValue extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = subNestedValueContainer1_1_1SourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.connector";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, false);
+
+ isCreationAllowed.put(actorPartTargetView, true);
+ isCreationAllowed.put(nestedActorPartTargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(portOnPartTargetView, true);
+ isCreationAllowed.put(portOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowportOnPartTargetView, true);
+ isCreationAllowed.put(flowportOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPartTargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_1_1TargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_2_1TargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_1_2TargetView, true);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, false);
+ isCreationAllowed.put(constraintCNTargetView, false);
+
+ // Initialize nested property path for tests
+ Property part1 = (Property)partContainer1.getElement();
+ Property part2 = (Property)partContainer2.getElement();
+ Property nestedPartContainer1_1Property = (Property)nestedPartContainer1_1.getElement();
+ Property nestedPartContainer1_2Property = (Property)nestedPartContainer1_2.getElement();
+ Property nestedPartContainer2_1Property = (Property)nestedPartContainer2_1.getElement();
+ List<Property> subNestedPath1_1 = Arrays.asList(part1, nestedPartContainer1_1Property);
+ List<Property> subNestedPath2_1 = Arrays.asList(nestedPartContainer2_1Property);
+
+
+ List<Property> subNestedPath1_2 = Arrays.asList(new Property[]{ part2, nestedPartContainer1_2Property });
+ List<Property> emptyPath = Collections.emptyList();
+ List<Property> nestedPath = Arrays.asList(new Property[]{ nestedPartContainer1_1Property });
+
+
+ for(View view : isCreationAllowed.keySet()) {
+ expectedSourceNestedPath.put(view, emptyPath);
+ expectedTargetNestedPath.put(view, emptyPath);
+ }
+
+ expectedSourceNestedPath.put(blockTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(actorPartTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(portOnBlockTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(portOnPartTargetView, subNestedPath1_1);
+ expectedTargetNestedPath.put(subNestedPartContainer1_1_2TargetView, subNestedPath1_2);
+ expectedSourceNestedPath.put(subNestedPartContainer1_1_2TargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(subNestedPartContainer1_2_1TargetView, nestedPath);
+ expectedTargetNestedPath.put(subNestedPartContainer1_2_1TargetView, subNestedPath2_1);
+ expectedSourceNestedPath.put(flowportOnBlockTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(flowportOnPartTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(partTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(propertyTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(referenceTargetView, subNestedPath1_1);
+ expectedSourceNestedPath.put(valueTargetView, subNestedPath1_1);
+
+ expectedSourceNestedPath.put(nestedActorPartTargetView, nestedPath);
+ expectedSourceNestedPath.put(nestedPartTargetView, nestedPath);
+ expectedSourceNestedPath.put(nestedPropertyTargetView, nestedPath);
+ expectedSourceNestedPath.put(nestedReferenceTargetView, nestedPath);
+ expectedSourceNestedPath.put(nestedValueTargetView, nestedPath);
+ expectedSourceNestedPath.put(portOnNestedPartTargetView, nestedPath);
+ expectedSourceNestedPath.put(flowportOnNestedPartTargetView, nestedPath);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromValue.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromValue.java
new file mode 100755
index 0000000..23ecdd2
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/TestLinkCreationConnectorFromValue.java
@@ -0,0 +1,109 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link creation test (via palette tools).
+ */
+public class TestLinkCreationConnectorFromValue extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = valueSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.connector";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, false);
+
+ isCreationAllowed.put(actorPartTargetView, true);
+ isCreationAllowed.put(nestedActorPartTargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(portOnPartTargetView, true);
+ isCreationAllowed.put(portOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowportOnPartTargetView, true);
+ isCreationAllowed.put(flowportOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPartTargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_1_1TargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_2_1TargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_1_2TargetView, true);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, false);
+ isCreationAllowed.put(constraintCNTargetView, false);
+
+ // Initialize nested property path for tests
+ Property part1 = (Property)partContainer1.getElement();
+ Property part2 = (Property)partContainer2.getElement();
+ Property nestedPartContainer1_1Property = (Property)nestedPartContainer1_1.getElement();
+ Property nestedPartContainer1_2Property = (Property)nestedPartContainer1_2.getElement();
+ Property nestedPartContainer2_1Property = (Property)nestedPartContainer2_1.getElement();
+ List<Property> subNestedPath1_1 = Arrays.asList(new Property[]{ part1, nestedPartContainer1_1Property });
+ List<Property> subNestedPath1_2 = Arrays.asList(new Property[]{ part2, nestedPartContainer1_2Property });
+ List<Property> subNestedPath2_1 = Arrays.asList(new Property[]{ part1, nestedPartContainer2_1Property });
+ List<Property> nestedPath = Arrays.asList(new Property[]{ part1 });
+ List<Property> emptyPath = Collections.emptyList();
+
+
+ for(View view : isCreationAllowed.keySet()) {
+ expectedSourceNestedPath.put(view, emptyPath);
+ expectedTargetNestedPath.put(view, emptyPath);
+ }
+
+ expectedTargetNestedPath.put(nestedActorPartTargetView, nestedPath);
+ expectedTargetNestedPath.put(portOnNestedPartTargetView, subNestedPath2_1);
+ expectedTargetNestedPath.put(flowportOnNestedPartTargetView, subNestedPath2_1);
+ expectedTargetNestedPath.put(nestedPartTargetView, nestedPath);
+ expectedTargetNestedPath.put(nestedPropertyTargetView, nestedPath);
+ expectedTargetNestedPath.put(nestedReferenceTargetView, nestedPath);
+ expectedTargetNestedPath.put(nestedValueTargetView, nestedPath);
+
+ expectedTargetNestedPath.put(subNestedPartContainer1_1_1TargetView, subNestedPath1_1);
+ expectedTargetNestedPath.put(subNestedPartContainer1_1_2TargetView, subNestedPath1_2);
+ expectedTargetNestedPath.put(subNestedPartContainer1_2_1TargetView, subNestedPath2_1);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/delegation/AbstractConnectorCreationAndTestDelegateFromElementTest.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/delegation/AbstractConnectorCreationAndTestDelegateFromElementTest.java
new file mode 100755
index 0000000..1cb52af
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/delegation/AbstractConnectorCreationAndTestDelegateFromElementTest.java
@@ -0,0 +1,164 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.delegation;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.createEdgeConnectorAndTestDelegateFromPalette;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.uml2.uml.ConnectableElement;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit abstract tests for Link creation test (via palette tools).
+ */
+public abstract class AbstractConnectorCreationAndTestDelegateFromElementTest extends AbstractConnectorCreationAndTestDelegatePrepareTest {
+
+ public static String toolID;
+
+ public static View sourceView;
+
+ public static final Map<View, ConnectableElement> expectedSourcePartWithPort = new HashMap<View, ConnectableElement>();
+
+ public static final Map<View, ConnectableElement> expectedTargetPartWithPort = new HashMap<View, ConnectableElement>();
+
+ @BeforeClass
+ public static void initializeExpectedMaps() {
+ houseKeeper.cleanUpLater(expectedSourcePartWithPort);
+ houseKeeper.cleanUpLater(expectedTargetPartWithPort);
+ }
+
+ // FIXME : wrong name in all methods => replace Source by Target
+ // BMA : ne passe pas l�
+ @Test
+ public void createLinkWithSourceBlock() throws Exception {
+ View targetView = blockTargetView;
+ createEdgeConnectorAndTestDelegateFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourcePartWithPort.get(targetView), expectedTargetPartWithPort.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithSourceActorPart() throws Exception {
+ View targetView = actorPart2_BlockTargetView;
+ createEdgeConnectorAndTestDelegateFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourcePartWithPort.get(targetView), expectedTargetPartWithPort.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithSourceNestedActorPart() throws Exception {
+ View targetView = actorPart2_p1TargetView;
+ createEdgeConnectorAndTestDelegateFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourcePartWithPort.get(targetView), expectedTargetPartWithPort.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithSourcePortOnBlock() throws Exception {
+ View targetView = portOnBlockTargetView;
+ createEdgeConnectorAndTestDelegateFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourcePartWithPort.get(targetView), expectedTargetPartWithPort.get(targetView));
+ }
+
+ // BMA : ne passe pas l�
+ @Test
+ public void createLinkWithTargetPort2OnPart1() throws Exception {
+ View targetView = port2_Part1TargetView;
+ createEdgeConnectorAndTestDelegateFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourcePartWithPort.get(targetView), expectedTargetPartWithPort.get(targetView));
+ }
+
+ // BMA : ne passe pas l�
+ @Test
+ public void createLinkWithTargetPort1OnPart1() throws Exception {
+ View targetView = port1_Part1SourceView;
+ createEdgeConnectorAndTestDelegateFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourcePartWithPort.get(targetView), expectedTargetPartWithPort.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithSourcePortOnPart() throws Exception {
+ View targetView = port1_Part2TargetView;
+ createEdgeConnectorAndTestDelegateFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourcePartWithPort.get(targetView), expectedTargetPartWithPort.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithSourcePortOnNestedPart() throws Exception {
+ View targetView = port2OnNestedPart2_Part1TargetView;
+ createEdgeConnectorAndTestDelegateFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourcePartWithPort.get(targetView), expectedTargetPartWithPort.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithSourceFlowPortOnBlock() throws Exception {
+ View targetView = flowportOnBlockTargetView;
+ createEdgeConnectorAndTestDelegateFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourcePartWithPort.get(targetView), expectedTargetPartWithPort.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithSourceFlowPortOnPart() throws Exception {
+ View targetView = flowport1_Part2TargetView;
+ createEdgeConnectorAndTestDelegateFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourcePartWithPort.get(targetView), expectedTargetPartWithPort.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithSourceFlowPortOnNestedPart() throws Exception {
+ View targetView = flowport1_NestedPart2_Part1TargetView;
+ createEdgeConnectorAndTestDelegateFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourcePartWithPort.get(targetView), expectedTargetPartWithPort.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithSourcePart() throws Exception {
+ View targetView = partTargetView;
+ createEdgeConnectorAndTestDelegateFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourcePartWithPort.get(targetView), expectedTargetPartWithPort.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithSourceNestedPart() throws Exception {
+ View targetView = nestedPart2_Part1TargetView;
+ createEdgeConnectorAndTestDelegateFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourcePartWithPort.get(targetView), expectedTargetPartWithPort.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithSourceProperty() throws Exception {
+ View targetView = propertyTargetView;
+ createEdgeConnectorAndTestDelegateFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourcePartWithPort.get(targetView), expectedTargetPartWithPort.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithSourceNestedProperty() throws Exception {
+ View targetView = nestedPropertyTargetView;
+ createEdgeConnectorAndTestDelegateFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourcePartWithPort.get(targetView), expectedTargetPartWithPort.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithSourceReference() throws Exception {
+ View targetView = referenceTargetView;
+ createEdgeConnectorAndTestDelegateFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourcePartWithPort.get(targetView), expectedTargetPartWithPort.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithSourceNestedReference() throws Exception {
+ View targetView = nestedReferenceTargetView;
+ createEdgeConnectorAndTestDelegateFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourcePartWithPort.get(targetView), expectedTargetPartWithPort.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithSourceValue() throws Exception {
+ View targetView = valueTargetView;
+ createEdgeConnectorAndTestDelegateFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourcePartWithPort.get(targetView), expectedTargetPartWithPort.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithSourceNestedValue() throws Exception {
+ View targetView = nestedValueTargetView;
+ createEdgeConnectorAndTestDelegateFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourcePartWithPort.get(targetView), expectedTargetPartWithPort.get(targetView));
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/delegation/AbstractConnectorCreationAndTestDelegatePrepareTest.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/delegation/AbstractConnectorCreationAndTestDelegatePrepareTest.java
new file mode 100755
index 0000000..ef07586
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/delegation/AbstractConnectorCreationAndTestDelegatePrepareTest.java
@@ -0,0 +1,156 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.delegation;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createGraphicalNode;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for link creation test (via palette tools).
+ */
+public abstract class AbstractConnectorCreationAndTestDelegatePrepareTest extends AbstractTest {
+
+ public static String toolID;
+
+ // Custom nodes
+ public static View blockSourceView, blockTargetView;
+
+ // Custom child label nodes
+ public static View actorPart1_BlockSourceView, actorPart2_BlockTargetView;
+ public static View actorPart1_p1_SourceView, actorPart2_p1TargetView, actorPart1_p2TargetView, actorPart1_p1_p1SourceView, actorPart2_p1_p1TargetView, actorPart1_p2_p1TargetView, actorPart1_p1_p2TargetView;
+ public static View portOnBlockSourceView, portOnBlockTargetView;
+ public static View port1_Part1SourceView, port2_Part1TargetView, port1_Part2TargetView, port2_Part2TargetView;
+ public static View port1OnNestedPart1_Part1SourceView, port2OnNestedPart2_Part1TargetView, port1OnNestedPart1_Part2TargetView;
+ public static View flowportOnBlockSourceView, flowportOnBlockTargetView;
+ public static View flowport1_Part1SourceView, flowport1_Part2TargetView;
+ public static View flowport1_NestedPart1_Part1SourceView, flowport1_NestedPart2_Part1TargetView, flowport1_NestedPart1_Part2TargetView;
+ public static View partSourceView, partTargetView;
+ public static View nestedPart1_Part1SourceView, nestedPart2_Part1TargetView, nestedPart1_Part2TargetView;
+ public static View propertySourceView, propertyTargetView;
+ public static View nestedPropertySourceView, nestedPropertyTargetView;
+ public static View referenceSourceView, referenceTargetView;
+ public static View nestedReferenceSourceView, nestedReferenceTargetView;
+ public static View valueSourceView, valueTargetView;
+ public static View nestedValueSourceView, nestedValueTargetView;
+
+ public static View p1View; // Its type block may be set encapsulated for testing purpose.
+ public static View p2View; // Its type block may be set encapsulated for testing purpose.
+ public static View p1_p1View, p2_p1View;
+ public static View p1_p1StructureView, p2_p1StructureView;
+ public static View p1_p2View;
+ public static View p1_p2StructureView;
+
+
+ public static final Map<View, Boolean> isCreationAllowed = new HashMap<View, Boolean>();
+
+ @BeforeClass
+ public static void initializeCreationAllowedMap() {
+ houseKeeper.cleanUpLater(isCreationAllowed);
+ }
+
+ @BeforeClass
+ public static void prepareCustomNodes() throws Exception {
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockStructureView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+ p1View = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ View p1StructureView = ViewUtil.getChildBySemanticHint(p1View, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ p2View = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ View p2StructureView = ViewUtil.getChildBySemanticHint(p2View, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+
+ // nested part to contain elements to be tested on level 2
+ p1_p1View = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, p1StructureView);
+ p1_p1StructureView = ViewUtil.getChildBySemanticHint(p1View, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ p2_p1View = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, p1StructureView);
+ p2_p1StructureView = ViewUtil.getChildBySemanticHint(p1View, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ p1_p2View = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, p2StructureView);
+ p1_p2StructureView = ViewUtil.getChildBySemanticHint(p2View, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+
+ // Prepare elements for link creation tests
+
+ blockSourceView = blockView;
+ blockTargetView = blockView;
+
+ // Prepare child nodes
+ actorPart1_BlockSourceView = createGraphicalNode(SysMLElementTypes.ACTOR_PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ actorPart2_BlockTargetView = createGraphicalNode(SysMLElementTypes.ACTOR_PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ actorPart1_p1_SourceView = createGraphicalNode(SysMLElementTypes.ACTOR_PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, p1StructureView);
+ actorPart2_p1TargetView = createGraphicalNode(SysMLElementTypes.ACTOR_PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, p1StructureView);
+ actorPart1_p2TargetView = createGraphicalNode(SysMLElementTypes.ACTOR_PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, p2StructureView);
+ actorPart1_p1_p1SourceView = createGraphicalNode(SysMLElementTypes.ACTOR_PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, p1_p1StructureView);
+ actorPart2_p1_p1TargetView = createGraphicalNode(SysMLElementTypes.ACTOR_PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, p1_p1StructureView);
+ actorPart1_p2_p1TargetView = createGraphicalNode(SysMLElementTypes.ACTOR_PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, p2_p1StructureView);
+ actorPart1_p1_p2TargetView = createGraphicalNode(SysMLElementTypes.ACTOR_PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, p1_p2StructureView);
+
+
+ // Port & FlowPorts no distinction made on FlowPorts kind...
+ portOnBlockSourceView = createGraphicalNode(UMLElementTypes.PORT, UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID, blockView);
+ portOnBlockTargetView = createGraphicalNode(UMLElementTypes.PORT, UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID, blockView);
+ port1_Part1SourceView = createGraphicalNode(UMLElementTypes.PORT, (EObject)p1View.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()), UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID, p1View);
+ port2_Part1TargetView = createGraphicalNode(UMLElementTypes.PORT, (EObject)p1View.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()), UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID, p1View);
+ port1_Part2TargetView = createGraphicalNode(UMLElementTypes.PORT, (EObject)p2View.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()), UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID, p2View);
+
+ // BMA temp
+ port2_Part2TargetView = createGraphicalNode(UMLElementTypes.PORT, (EObject)p2View.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()), UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID, p2View);
+
+ // ?? kesako ?
+ port1OnNestedPart1_Part1SourceView = createGraphicalNode(UMLElementTypes.PORT, (EObject)p1_p1View.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()), UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID, p1_p1View);
+ port2OnNestedPart2_Part1TargetView = createGraphicalNode(UMLElementTypes.PORT, (EObject)p2_p1View.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()), UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID, p2_p1View);
+ port1OnNestedPart1_Part2TargetView = createGraphicalNode(UMLElementTypes.PORT, (EObject)p1_p2View.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()), UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID, p1_p2View);
+
+ flowportOnBlockSourceView = createGraphicalNode(SysMLElementTypes.FLOW_PORT, SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID, blockView);
+ flowportOnBlockTargetView = createGraphicalNode(SysMLElementTypes.FLOW_PORT, SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID, blockView);
+ flowport1_Part1SourceView = createGraphicalNode(SysMLElementTypes.FLOW_PORT, (EObject)p1View.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()), SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID, p1View);
+ flowport1_Part2TargetView = createGraphicalNode(SysMLElementTypes.FLOW_PORT, (EObject)p2View.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()), SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID, p2View);
+ flowport1_NestedPart1_Part1SourceView = createGraphicalNode(SysMLElementTypes.FLOW_PORT, (EObject)p1_p1View.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()), SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID, p1_p1View);
+ flowport1_NestedPart2_Part1TargetView = createGraphicalNode(SysMLElementTypes.FLOW_PORT, (EObject)p2_p1View.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()), SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID, p2_p1View);
+ flowport1_NestedPart1_Part2TargetView = createGraphicalNode(SysMLElementTypes.FLOW_PORT, (EObject)p1_p2View.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()), SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID, p1_p2View);
+
+ partSourceView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ partTargetView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ nestedPart1_Part1SourceView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, p1StructureView);
+ nestedPart2_Part1TargetView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, p1StructureView);
+ nestedPart1_Part2TargetView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, p2StructureView);
+
+ propertySourceView = createGraphicalNode(UMLElementTypes.PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ propertyTargetView = createGraphicalNode(UMLElementTypes.PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ nestedPropertySourceView = createGraphicalNode(UMLElementTypes.PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, p1StructureView);
+ nestedPropertyTargetView = createGraphicalNode(UMLElementTypes.PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, p1StructureView);
+
+ referenceSourceView = createGraphicalNode(SysMLElementTypes.REFERENCE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ referenceTargetView = createGraphicalNode(SysMLElementTypes.REFERENCE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ nestedReferenceSourceView = createGraphicalNode(SysMLElementTypes.REFERENCE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, p1StructureView);
+ nestedReferenceTargetView = createGraphicalNode(SysMLElementTypes.REFERENCE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, p1StructureView);
+
+ valueSourceView = createGraphicalNode(SysMLElementTypes.VALUE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ valueTargetView = createGraphicalNode(SysMLElementTypes.VALUE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ nestedValueSourceView = createGraphicalNode(SysMLElementTypes.VALUE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, p1StructureView);
+ nestedValueTargetView = createGraphicalNode(SysMLElementTypes.VALUE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, p1StructureView);
+
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/delegation/TestCreationAndTestDelegateFromActorPart.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/delegation/TestCreationAndTestDelegateFromActorPart.java
new file mode 100755
index 0000000..a2dbc1a
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/delegation/TestCreationAndTestDelegateFromActorPart.java
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.delegation;
+
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link creation test (via palette tools).
+ */
+public class TestCreationAndTestDelegateFromActorPart extends AbstractConnectorCreationAndTestDelegateFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = actorPart1_BlockSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.connector";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, false);
+
+ isCreationAllowed.put(actorPart2_BlockTargetView, true);
+ isCreationAllowed.put(actorPart2_p1TargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(port1_Part1SourceView, true);
+ isCreationAllowed.put(port2_Part1TargetView, true);
+ isCreationAllowed.put(port1_Part2TargetView, true);
+ isCreationAllowed.put(port2OnNestedPart2_Part1TargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowport1_Part2TargetView, true);
+ isCreationAllowed.put(flowport1_NestedPart2_Part1TargetView, true);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPart2_Part1TargetView, true);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ // Initialize partWithPort for tests
+ Property part1 = (Property)p1View.getElement();
+ Property part2 = (Property)p2View.getElement();
+ Property nestedpart2 = (Property)p2_p1View.getElement();
+
+
+ expectedTargetPartWithPort.put(port1_Part1SourceView, part1);
+ expectedTargetPartWithPort.put(port2_Part1TargetView, part1);
+ expectedTargetPartWithPort.put(port1_Part2TargetView, part2);
+ expectedTargetPartWithPort.put(port2OnNestedPart2_Part1TargetView, nestedpart2);
+ expectedTargetPartWithPort.put(flowport1_Part2TargetView, part2);
+ expectedTargetPartWithPort.put(flowport1_NestedPart2_Part1TargetView, nestedpart2);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/delegation/TestCreationAndTestDelegateFromFlowPortOnBlock.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/delegation/TestCreationAndTestDelegateFromFlowPortOnBlock.java
new file mode 100755
index 0000000..ee63f76
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/delegation/TestCreationAndTestDelegateFromFlowPortOnBlock.java
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.delegation;
+
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link creation test (via palette tools).
+ */
+public class TestCreationAndTestDelegateFromFlowPortOnBlock extends AbstractConnectorCreationAndTestDelegateFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = flowportOnBlockSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.connector";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, false);
+
+ isCreationAllowed.put(actorPart2_BlockTargetView, true);
+ isCreationAllowed.put(actorPart2_p1TargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(port1_Part1SourceView, true);
+ isCreationAllowed.put(port2_Part1TargetView, true);
+ isCreationAllowed.put(port1_Part2TargetView, true);
+ isCreationAllowed.put(port2OnNestedPart2_Part1TargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowport1_Part2TargetView, true);
+ isCreationAllowed.put(flowport1_NestedPart2_Part1TargetView, true);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPart2_Part1TargetView, true);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ // Initialize partWithPort for tests
+ Property part1 = (Property)p1View.getElement();
+ Property part2 = (Property)p2View.getElement();
+ Property nestedpart = (Property)p2_p1View.getElement();
+
+
+ expectedTargetPartWithPort.put(port1_Part1SourceView, part1);
+ expectedTargetPartWithPort.put(port2_Part1TargetView, part1);
+ expectedTargetPartWithPort.put(port1_Part2TargetView, part2);
+ expectedTargetPartWithPort.put(port2OnNestedPart2_Part1TargetView, nestedpart);
+ expectedTargetPartWithPort.put(flowport1_Part2TargetView, part2);
+ expectedTargetPartWithPort.put(flowport1_NestedPart2_Part1TargetView, nestedpart);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/delegation/TestCreationAndTestDelegateFromFlowPortOnNestedPart.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/delegation/TestCreationAndTestDelegateFromFlowPortOnNestedPart.java
new file mode 100755
index 0000000..2181212
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/delegation/TestCreationAndTestDelegateFromFlowPortOnNestedPart.java
@@ -0,0 +1,86 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.delegation;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link creation test (via palette tools).
+ */
+public class TestCreationAndTestDelegateFromFlowPortOnNestedPart extends AbstractConnectorCreationAndTestDelegateFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = flowport1_NestedPart1_Part1SourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.connector";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, false);
+
+ isCreationAllowed.put(actorPart2_BlockTargetView, true);
+ isCreationAllowed.put(actorPart2_p1TargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(port1_Part1SourceView, true);
+ isCreationAllowed.put(port2_Part1TargetView, true);
+ isCreationAllowed.put(port1_Part2TargetView, true);
+ isCreationAllowed.put(port2OnNestedPart2_Part1TargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowport1_Part2TargetView, true);
+ isCreationAllowed.put(flowport1_NestedPart2_Part1TargetView, true);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPart2_Part1TargetView, true);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ // Initialize partWithPort for tests
+ Property sourceNestedpart = (Property)p1_p1View.getElement();
+
+ Property targetpart = (Property)p2View.getElement();
+ Property targetNestedpart = (Property)p2_p1View.getElement();
+
+
+ for (View view : isCreationAllowed.keySet()) {
+ expectedSourcePartWithPort.put(view, sourceNestedpart);
+ }
+
+ expectedTargetPartWithPort.put(port1_Part2TargetView, targetpart);
+ expectedTargetPartWithPort.put(flowport1_Part2TargetView, targetpart);
+
+ expectedTargetPartWithPort.put(port2OnNestedPart2_Part1TargetView, targetNestedpart);
+ expectedTargetPartWithPort.put(flowport1_NestedPart2_Part1TargetView, targetNestedpart);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/delegation/TestCreationAndTestDelegateFromFlowPortOnPart.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/delegation/TestCreationAndTestDelegateFromFlowPortOnPart.java
new file mode 100755
index 0000000..35b9e4f
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/delegation/TestCreationAndTestDelegateFromFlowPortOnPart.java
@@ -0,0 +1,94 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.delegation;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link creation test (via palette tools).
+ */
+public class TestCreationAndTestDelegateFromFlowPortOnPart extends AbstractConnectorCreationAndTestDelegateFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = flowport1_Part1SourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.connector";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, false);
+
+ isCreationAllowed.put(actorPart2_BlockTargetView, true);
+ isCreationAllowed.put(actorPart2_p1TargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(port1_Part1SourceView, true);
+ isCreationAllowed.put(port2_Part1TargetView, true);
+ isCreationAllowed.put(port1_Part2TargetView, true);
+ isCreationAllowed.put(port2OnNestedPart2_Part1TargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowport1_Part2TargetView, true);
+ isCreationAllowed.put(flowport1_NestedPart2_Part1TargetView, true);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPart2_Part1TargetView, true);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ // Initialize partWithPort for tests
+ Property part1 = (Property)p1View.getElement();
+ Property part2 = (Property)p2View.getElement();
+ Property nestedPart2 = (Property)p2_p1View.getElement();
+
+
+ for (View view : isCreationAllowed.keySet()) {
+ expectedSourcePartWithPort.put(view, part1);
+ }
+ expectedSourcePartWithPort.remove(port1_Part1SourceView);
+ expectedSourcePartWithPort.remove(port2_Part1TargetView);
+ expectedSourcePartWithPort.remove(port2OnNestedPart2_Part1TargetView);
+ expectedSourcePartWithPort.remove(flowport1_NestedPart2_Part1TargetView);
+ expectedSourcePartWithPort.remove(actorPart2_p1TargetView);
+ expectedSourcePartWithPort.remove(nestedPart2_Part1TargetView);
+ expectedSourcePartWithPort.remove(nestedPropertyTargetView);
+ expectedSourcePartWithPort.remove(nestedReferenceTargetView);
+ expectedSourcePartWithPort.remove(nestedValueTargetView);
+
+ expectedTargetPartWithPort.put(port1_Part2TargetView, part2);
+ expectedTargetPartWithPort.put(flowport1_Part2TargetView, part2);
+
+ expectedTargetPartWithPort.put(port2OnNestedPart2_Part1TargetView, nestedPart2);
+ expectedTargetPartWithPort.put(flowport1_NestedPart2_Part1TargetView, nestedPart2);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/delegation/TestCreationAndTestDelegateFromNestedActorPart.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/delegation/TestCreationAndTestDelegateFromNestedActorPart.java
new file mode 100755
index 0000000..d0821d4
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/delegation/TestCreationAndTestDelegateFromNestedActorPart.java
@@ -0,0 +1,78 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.delegation;
+
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link creation test (via palette tools).
+ */
+public class TestCreationAndTestDelegateFromNestedActorPart extends AbstractConnectorCreationAndTestDelegateFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = actorPart1_p1_SourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.connector";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, false);
+
+ isCreationAllowed.put(actorPart2_BlockTargetView, true);
+ isCreationAllowed.put(actorPart2_p1TargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(port1_Part1SourceView, true);
+ isCreationAllowed.put(port2_Part1TargetView, true);
+ isCreationAllowed.put(port1_Part2TargetView, true);
+ isCreationAllowed.put(port2OnNestedPart2_Part1TargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowport1_Part2TargetView, true);
+ isCreationAllowed.put(flowport1_NestedPart2_Part1TargetView, true);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPart2_Part1TargetView, true);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ // Initialize partWithPort for tests
+ Property part = (Property)p2View.getElement();
+ Property nestedpart = (Property)p2_p1View.getElement();
+
+
+ expectedTargetPartWithPort.put(port1_Part2TargetView, part);
+ expectedTargetPartWithPort.put(port2OnNestedPart2_Part1TargetView, nestedpart);
+ expectedTargetPartWithPort.put(flowport1_Part2TargetView, part);
+ expectedTargetPartWithPort.put(flowport1_NestedPart2_Part1TargetView, nestedpart);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/delegation/TestCreationAndTestDelegateFromNestedPart.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/delegation/TestCreationAndTestDelegateFromNestedPart.java
new file mode 100755
index 0000000..4b59775
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/delegation/TestCreationAndTestDelegateFromNestedPart.java
@@ -0,0 +1,78 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.delegation;
+
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link creation test (via palette tools).
+ */
+public class TestCreationAndTestDelegateFromNestedPart extends AbstractConnectorCreationAndTestDelegateFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = nestedPart1_Part1SourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.connector";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, false);
+
+ isCreationAllowed.put(actorPart2_BlockTargetView, true);
+ isCreationAllowed.put(actorPart2_p1TargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(port1_Part1SourceView, true);
+ isCreationAllowed.put(port2_Part1TargetView, true);
+ isCreationAllowed.put(port1_Part2TargetView, true);
+ isCreationAllowed.put(port2OnNestedPart2_Part1TargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowport1_Part2TargetView, true);
+ isCreationAllowed.put(flowport1_NestedPart2_Part1TargetView, true);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPart2_Part1TargetView, true);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ // Initialize partWithPort for tests
+ Property part = (Property)p2View.getElement();
+ Property nestedpart = (Property)p2_p1View.getElement();
+
+
+ expectedTargetPartWithPort.put(port1_Part2TargetView, part);
+ expectedTargetPartWithPort.put(port2OnNestedPart2_Part1TargetView, nestedpart);
+ expectedTargetPartWithPort.put(flowport1_Part2TargetView, part);
+ expectedTargetPartWithPort.put(flowport1_NestedPart2_Part1TargetView, nestedpart);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/delegation/TestCreationAndTestDelegateFromNestedProperty.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/delegation/TestCreationAndTestDelegateFromNestedProperty.java
new file mode 100755
index 0000000..f4d789b
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/delegation/TestCreationAndTestDelegateFromNestedProperty.java
@@ -0,0 +1,78 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.delegation;
+
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link creation test (via palette tools).
+ */
+public class TestCreationAndTestDelegateFromNestedProperty extends AbstractConnectorCreationAndTestDelegateFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = nestedPropertySourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.connector";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, false);
+
+ isCreationAllowed.put(actorPart2_BlockTargetView, true);
+ isCreationAllowed.put(actorPart2_p1TargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(port1_Part1SourceView, true);
+ isCreationAllowed.put(port2_Part1TargetView, true);
+ isCreationAllowed.put(port1_Part2TargetView, true);
+ isCreationAllowed.put(port2OnNestedPart2_Part1TargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowport1_Part2TargetView, true);
+ isCreationAllowed.put(flowport1_NestedPart2_Part1TargetView, true);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPart2_Part1TargetView, true);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ // Initialize partWithPort for tests
+ Property part = (Property)p2View.getElement();
+ Property nestedpart = (Property)p2_p1View.getElement();
+
+
+ expectedTargetPartWithPort.put(port1_Part2TargetView, part);
+ expectedTargetPartWithPort.put(port2OnNestedPart2_Part1TargetView, nestedpart);
+ expectedTargetPartWithPort.put(flowport1_Part2TargetView, part);
+ expectedTargetPartWithPort.put(flowport1_NestedPart2_Part1TargetView, nestedpart);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/delegation/TestCreationAndTestDelegateFromNestedReference.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/delegation/TestCreationAndTestDelegateFromNestedReference.java
new file mode 100755
index 0000000..3b78b2d
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/delegation/TestCreationAndTestDelegateFromNestedReference.java
@@ -0,0 +1,78 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.delegation;
+
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link creation test (via palette tools).
+ */
+public class TestCreationAndTestDelegateFromNestedReference extends AbstractConnectorCreationAndTestDelegateFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = nestedReferenceSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.connector";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, false);
+
+ isCreationAllowed.put(actorPart2_BlockTargetView, true);
+ isCreationAllowed.put(actorPart2_p1TargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(port1_Part1SourceView, true);
+ isCreationAllowed.put(port2_Part1TargetView, true);
+ isCreationAllowed.put(port1_Part2TargetView, true);
+ isCreationAllowed.put(port2OnNestedPart2_Part1TargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowport1_Part2TargetView, true);
+ isCreationAllowed.put(flowport1_NestedPart2_Part1TargetView, true);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPart2_Part1TargetView, true);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ // Initialize partWithPort for tests
+ Property part = (Property)p2View.getElement();
+ Property nestedpart = (Property)p2_p1View.getElement();
+
+
+ expectedTargetPartWithPort.put(port1_Part2TargetView, part);
+ expectedTargetPartWithPort.put(port2OnNestedPart2_Part1TargetView, nestedpart);
+ expectedTargetPartWithPort.put(flowport1_Part2TargetView, part);
+ expectedTargetPartWithPort.put(flowport1_NestedPart2_Part1TargetView, nestedpart);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/delegation/TestCreationAndTestDelegateFromNestedValue.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/delegation/TestCreationAndTestDelegateFromNestedValue.java
new file mode 100755
index 0000000..03a139f
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/delegation/TestCreationAndTestDelegateFromNestedValue.java
@@ -0,0 +1,78 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.delegation;
+
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link creation test (via palette tools).
+ */
+public class TestCreationAndTestDelegateFromNestedValue extends AbstractConnectorCreationAndTestDelegateFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = nestedValueSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.connector";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, false);
+
+ isCreationAllowed.put(actorPart2_BlockTargetView, true);
+ isCreationAllowed.put(actorPart2_p1TargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(port1_Part1SourceView, true);
+ isCreationAllowed.put(port2_Part1TargetView, true);
+ isCreationAllowed.put(port1_Part2TargetView, true);
+ isCreationAllowed.put(port2OnNestedPart2_Part1TargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowport1_Part2TargetView, true);
+ isCreationAllowed.put(flowport1_NestedPart2_Part1TargetView, true);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPart2_Part1TargetView, true);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ // Initialize partWithPort for tests
+ Property part = (Property)p2View.getElement();
+ Property nestedpart = (Property)p2_p1View.getElement();
+
+
+ expectedTargetPartWithPort.put(port1_Part2TargetView, part);
+ expectedTargetPartWithPort.put(port2OnNestedPart2_Part1TargetView, nestedpart);
+ expectedTargetPartWithPort.put(flowport1_Part2TargetView, part);
+ expectedTargetPartWithPort.put(flowport1_NestedPart2_Part1TargetView, nestedpart);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/delegation/TestCreationAndTestDelegateFromPart.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/delegation/TestCreationAndTestDelegateFromPart.java
new file mode 100755
index 0000000..f55b15a
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/delegation/TestCreationAndTestDelegateFromPart.java
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.delegation;
+
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link creation test (via palette tools).
+ */
+public class TestCreationAndTestDelegateFromPart extends AbstractConnectorCreationAndTestDelegateFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = partSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.connector";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, false);
+
+ isCreationAllowed.put(actorPart2_BlockTargetView, true);
+ isCreationAllowed.put(actorPart2_p1TargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(port1_Part1SourceView, true);
+ isCreationAllowed.put(port2_Part1TargetView, true);
+ isCreationAllowed.put(port1_Part2TargetView, true);
+ isCreationAllowed.put(port2OnNestedPart2_Part1TargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowport1_Part2TargetView, true);
+ isCreationAllowed.put(flowport1_NestedPart2_Part1TargetView, true);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPart2_Part1TargetView, true);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ // Initialize partWithPort for tests
+ Property part1 = (Property)p1View.getElement();
+ Property part2 = (Property)p2View.getElement();
+ Property nestedpart = (Property)p2_p1View.getElement();
+
+
+ expectedTargetPartWithPort.put(port1_Part1SourceView, part1);
+ expectedTargetPartWithPort.put(port2_Part1TargetView, part1);
+ expectedTargetPartWithPort.put(port1_Part2TargetView, part2);
+ expectedTargetPartWithPort.put(port2OnNestedPart2_Part1TargetView, nestedpart);
+ expectedTargetPartWithPort.put(flowport1_Part2TargetView, part2);
+ expectedTargetPartWithPort.put(flowport1_NestedPart2_Part1TargetView, nestedpart);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/delegation/TestCreationAndTestDelegateFromPortOnBlock.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/delegation/TestCreationAndTestDelegateFromPortOnBlock.java
new file mode 100755
index 0000000..4fe0d56
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/delegation/TestCreationAndTestDelegateFromPortOnBlock.java
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.delegation;
+
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link creation test (via palette tools).
+ */
+public class TestCreationAndTestDelegateFromPortOnBlock extends AbstractConnectorCreationAndTestDelegateFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = portOnBlockSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.connector";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, false);
+
+ isCreationAllowed.put(actorPart2_BlockTargetView, true);
+ isCreationAllowed.put(actorPart2_p1TargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(port1_Part1SourceView, true);
+ isCreationAllowed.put(port2_Part1TargetView, true);
+ isCreationAllowed.put(port1_Part2TargetView, true);
+ isCreationAllowed.put(port2OnNestedPart2_Part1TargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowport1_Part2TargetView, true);
+ isCreationAllowed.put(flowport1_NestedPart2_Part1TargetView, true);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPart2_Part1TargetView, true);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ // Initialize partWithPort for tests
+ Property part1 = (Property)p1View.getElement();
+ Property part2 = (Property)p2View.getElement();
+ Property nestedpart = (Property)p2_p1View.getElement();
+
+
+ expectedTargetPartWithPort.put(port1_Part1SourceView, part1);
+ expectedTargetPartWithPort.put(port2_Part1TargetView, part1);
+ expectedTargetPartWithPort.put(port1_Part2TargetView, part2);
+ expectedTargetPartWithPort.put(port2OnNestedPart2_Part1TargetView, nestedpart);
+ expectedTargetPartWithPort.put(flowport1_Part2TargetView, part2);
+ expectedTargetPartWithPort.put(flowport1_NestedPart2_Part1TargetView, nestedpart);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/delegation/TestCreationAndTestDelegateFromPortOnNestedPart.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/delegation/TestCreationAndTestDelegateFromPortOnNestedPart.java
new file mode 100755
index 0000000..dc90d64
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/delegation/TestCreationAndTestDelegateFromPortOnNestedPart.java
@@ -0,0 +1,86 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.delegation;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link creation test (via palette tools).
+ */
+public class TestCreationAndTestDelegateFromPortOnNestedPart extends AbstractConnectorCreationAndTestDelegateFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = port1OnNestedPart1_Part1SourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.connector";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, false);
+
+ isCreationAllowed.put(actorPart2_BlockTargetView, true);
+ isCreationAllowed.put(actorPart2_p1TargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(port1_Part1SourceView, true);
+ isCreationAllowed.put(port2_Part1TargetView, true);
+ isCreationAllowed.put(port1_Part2TargetView, true);
+ isCreationAllowed.put(port2OnNestedPart2_Part1TargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowport1_Part2TargetView, true);
+ isCreationAllowed.put(flowport1_NestedPart2_Part1TargetView, true);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPart2_Part1TargetView, true);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ // Initialize partWithPort for tests
+ Property sourceNestedpart = (Property)p1_p1View.getElement();
+
+ Property targetpart = (Property)p2View.getElement();
+ Property targetNestedpart = (Property)p2_p1View.getElement();
+
+
+ for (View view : isCreationAllowed.keySet()) {
+ expectedSourcePartWithPort.put(view, sourceNestedpart);
+ }
+
+ expectedTargetPartWithPort.put(port1_Part2TargetView, targetpart);
+ expectedTargetPartWithPort.put(flowport1_Part2TargetView, targetpart);
+
+ expectedTargetPartWithPort.put(port2OnNestedPart2_Part1TargetView, targetNestedpart);
+ expectedTargetPartWithPort.put(flowport1_NestedPart2_Part1TargetView, targetNestedpart);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/delegation/TestCreationAndTestDelegateFromPortOnPart.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/delegation/TestCreationAndTestDelegateFromPortOnPart.java
new file mode 100755
index 0000000..5a87dce
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/delegation/TestCreationAndTestDelegateFromPortOnPart.java
@@ -0,0 +1,95 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.delegation;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link creation test (via palette tools).
+ */
+public class TestCreationAndTestDelegateFromPortOnPart extends AbstractConnectorCreationAndTestDelegateFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = port1_Part1SourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.connector";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, false);
+
+ isCreationAllowed.put(actorPart2_BlockTargetView, true);
+ isCreationAllowed.put(actorPart2_p1TargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(port1_Part1SourceView, true);
+ isCreationAllowed.put(port2_Part1TargetView, true);
+ isCreationAllowed.put(port1_Part2TargetView, true);
+ isCreationAllowed.put(port2OnNestedPart2_Part1TargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowport1_Part2TargetView, true);
+ isCreationAllowed.put(flowport1_NestedPart2_Part1TargetView, true);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPart2_Part1TargetView, true);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ // Initialize partWithPort for tests
+ Property part1 = (Property)p1View.getElement();
+ Property part2 = (Property)p2View.getElement();
+ Property nestedPart2 = (Property)p2_p1View.getElement();
+
+
+ for (View view : isCreationAllowed.keySet()) {
+ expectedSourcePartWithPort.put(view, part1);
+ }
+
+ expectedSourcePartWithPort.remove(port1_Part1SourceView);
+ expectedSourcePartWithPort.remove(port2_Part1TargetView);
+ expectedSourcePartWithPort.remove(port2OnNestedPart2_Part1TargetView);
+ expectedSourcePartWithPort.remove(flowport1_NestedPart2_Part1TargetView);
+ expectedSourcePartWithPort.remove(actorPart2_p1TargetView);
+ expectedSourcePartWithPort.remove(nestedPart2_Part1TargetView);
+ expectedSourcePartWithPort.remove(nestedPropertyTargetView);
+ expectedSourcePartWithPort.remove(nestedReferenceTargetView);
+ expectedSourcePartWithPort.remove(nestedValueTargetView);
+
+ expectedTargetPartWithPort.put(port1_Part2TargetView, part2);
+ expectedTargetPartWithPort.put(flowport1_Part2TargetView, part2);
+
+ expectedTargetPartWithPort.put(port2OnNestedPart2_Part1TargetView, nestedPart2);
+ expectedTargetPartWithPort.put(flowport1_NestedPart2_Part1TargetView, nestedPart2);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/delegation/TestCreationAndTestDelegateFromProperty.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/delegation/TestCreationAndTestDelegateFromProperty.java
new file mode 100755
index 0000000..c782bc9
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/delegation/TestCreationAndTestDelegateFromProperty.java
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.delegation;
+
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link creation test (via palette tools).
+ */
+public class TestCreationAndTestDelegateFromProperty extends AbstractConnectorCreationAndTestDelegateFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = propertySourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.connector";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, false);
+
+ isCreationAllowed.put(actorPart2_BlockTargetView, true);
+ isCreationAllowed.put(actorPart2_p1TargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(port1_Part1SourceView, true);
+ isCreationAllowed.put(port2_Part1TargetView, true);
+ isCreationAllowed.put(port1_Part2TargetView, true);
+ isCreationAllowed.put(port2OnNestedPart2_Part1TargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowport1_Part2TargetView, true);
+ isCreationAllowed.put(flowport1_NestedPart2_Part1TargetView, true);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPart2_Part1TargetView, true);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ // Initialize partWithPort for tests
+ Property part1 = (Property)p1View.getElement();
+ Property part2 = (Property)p2View.getElement();
+ Property nestedpart = (Property)p2_p1View.getElement();
+
+
+ expectedTargetPartWithPort.put(port1_Part1SourceView, part1);
+ expectedTargetPartWithPort.put(port2_Part1TargetView, part1);
+ expectedTargetPartWithPort.put(port1_Part2TargetView, part2);
+ expectedTargetPartWithPort.put(port2OnNestedPart2_Part1TargetView, nestedpart);
+ expectedTargetPartWithPort.put(flowport1_Part2TargetView, part2);
+ expectedTargetPartWithPort.put(flowport1_NestedPart2_Part1TargetView, nestedpart);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/delegation/TestCreationAndTestDelegateFromReference.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/delegation/TestCreationAndTestDelegateFromReference.java
new file mode 100755
index 0000000..bc1a2de
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/delegation/TestCreationAndTestDelegateFromReference.java
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.delegation;
+
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link creation test (via palette tools).
+ */
+public class TestCreationAndTestDelegateFromReference extends AbstractConnectorCreationAndTestDelegateFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = referenceSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.connector";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, false);
+
+ isCreationAllowed.put(actorPart2_BlockTargetView, true);
+ isCreationAllowed.put(actorPart2_p1TargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(port1_Part1SourceView, true);
+ isCreationAllowed.put(port2_Part1TargetView, true);
+ isCreationAllowed.put(port1_Part2TargetView, true);
+ isCreationAllowed.put(port2OnNestedPart2_Part1TargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowport1_Part2TargetView, true);
+ isCreationAllowed.put(flowport1_NestedPart2_Part1TargetView, true);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPart2_Part1TargetView, true);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ // Initialize partWithPort for tests
+ Property part1 = (Property)p1View.getElement();
+ Property part2 = (Property)p2View.getElement();
+ Property nestedpart = (Property)p2_p1View.getElement();
+
+
+ expectedTargetPartWithPort.put(port1_Part1SourceView, part1);
+ expectedTargetPartWithPort.put(port2_Part1TargetView, part1);
+ expectedTargetPartWithPort.put(port1_Part2TargetView, part2);
+ expectedTargetPartWithPort.put(port2OnNestedPart2_Part1TargetView, nestedpart);
+ expectedTargetPartWithPort.put(flowport1_Part2TargetView, part2);
+ expectedTargetPartWithPort.put(flowport1_NestedPart2_Part1TargetView, nestedpart);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/delegation/TestCreationAndTestDelegateFromValue.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/delegation/TestCreationAndTestDelegateFromValue.java
new file mode 100755
index 0000000..b0cde98
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/delegation/TestCreationAndTestDelegateFromValue.java
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.delegation;
+
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link creation test (via palette tools).
+ */
+public class TestCreationAndTestDelegateFromValue extends AbstractConnectorCreationAndTestDelegateFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = valueSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.connector";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, false);
+
+ isCreationAllowed.put(actorPart2_BlockTargetView, true);
+ isCreationAllowed.put(actorPart2_p1TargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(port1_Part1SourceView, true);
+ isCreationAllowed.put(port2_Part1TargetView, true);
+ isCreationAllowed.put(port1_Part2TargetView, true);
+ isCreationAllowed.put(port2OnNestedPart2_Part1TargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowport1_Part2TargetView, true);
+ isCreationAllowed.put(flowport1_NestedPart2_Part1TargetView, true);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPart2_Part1TargetView, true);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ // Initialize partWithPort for tests
+ Property part1 = (Property)p1View.getElement();
+ Property part2 = (Property)p2View.getElement();
+ Property nestedpart = (Property)p2_p1View.getElement();
+
+
+ expectedTargetPartWithPort.put(port1_Part1SourceView, part1);
+ expectedTargetPartWithPort.put(port2_Part1TargetView, part1);
+ expectedTargetPartWithPort.put(port1_Part2TargetView, part2);
+ expectedTargetPartWithPort.put(port2OnNestedPart2_Part1TargetView, nestedpart);
+ expectedTargetPartWithPort.put(flowport1_Part2TargetView, part2);
+ expectedTargetPartWithPort.put(flowport1_NestedPart2_Part1TargetView, nestedpart);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/encapsulated/AbstractLinkCreationForSourcesTest.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/encapsulated/AbstractLinkCreationForSourcesTest.java
new file mode 100755
index 0000000..4fffa3d
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/encapsulated/AbstractLinkCreationForSourcesTest.java
@@ -0,0 +1,31 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.encapsulated;
+
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit abstract tests for Link creation test (via palette tools).
+ */
+public abstract class AbstractLinkCreationForSourcesTest extends org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.AbstractLinkCreationForSourcesTest {
+
+ @BeforeClass
+ public static void setPartBlockEncapsulated() throws Exception {
+ TestPrepareUtils.setBlockIsEncapsulated((Element)(partContainer1.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type())), true);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/encapsulated/AbstractLinkCreationFromElementTest.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/encapsulated/AbstractLinkCreationFromElementTest.java
new file mode 100755
index 0000000..7371132
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/encapsulated/AbstractLinkCreationFromElementTest.java
@@ -0,0 +1,35 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.encapsulated;
+
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Link creation with specified source element (via palette tools).
+ */
+public abstract class AbstractLinkCreationFromElementTest extends org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void setPartBlockEncapsulated() throws Exception {
+ TestPrepareUtils.setBlockIsEncapsulated((Element)(partContainer1.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type())), true);
+ TestPrepareUtils.setBlockIsEncapsulated((Element)(partContainer2.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type())), true);
+ TestPrepareUtils.setBlockIsEncapsulated((Element)(nestedPartContainer1_1.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type())), true);
+ TestPrepareUtils.setBlockIsEncapsulated((Element)(nestedPartContainer2_1.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type())), true);
+ TestPrepareUtils.setBlockIsEncapsulated((Element)(nestedPartContainer1_2.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type())), true);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/encapsulated/TestLinkCreationConnectorForSources.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/encapsulated/TestLinkCreationConnectorForSources.java
new file mode 100755
index 0000000..c0ef04f
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/encapsulated/TestLinkCreationConnectorForSources.java
@@ -0,0 +1,72 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.encapsulated;
+
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Dependency link creation test (via palette tools).
+ */
+public class TestLinkCreationConnectorForSources extends AbstractLinkCreationForSourcesTest {
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.connector";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockSourceView, false);
+
+ isCreationAllowed.put(actorPartSourceView, true);
+ isCreationAllowed.put(nestedActorPartSourceView, true);
+ isCreationAllowed.put(subNestedActorPartContainer1_1_1SourceView, true);
+
+ isCreationAllowed.put(portOnBlockSourceView, true);
+ isCreationAllowed.put(portOnPartSourceView, true);
+ isCreationAllowed.put(portOnNestedPartSourceView, true);
+ isCreationAllowed.put(portOnSubNestedPartContainer1_1_1SourceView, true);
+
+ isCreationAllowed.put(flowportOnBlockSourceView, true);
+ isCreationAllowed.put(flowportOnPartSourceView, true);
+ isCreationAllowed.put(flowportOnNestedPartSourceView, true);
+ isCreationAllowed.put(flowportOnSubNestedPartContainer1_1_1SourceView, true);
+
+ isCreationAllowed.put(partSourceView, true);
+ isCreationAllowed.put(nestedPartSourceView, true);
+ isCreationAllowed.put(subNestedPartContainer1_1_1SourceView, true);
+
+ isCreationAllowed.put(propertySourceView, true);
+ isCreationAllowed.put(nestedPropertySourceView, true);
+ isCreationAllowed.put(subNestedPropertyContainer1_1_1SourceView, true);
+
+ isCreationAllowed.put(referenceSourceView, true);
+ isCreationAllowed.put(nestedReferenceSourceView, true);
+ isCreationAllowed.put(subNestedReferenceContainer1_1_1SourceView, true);
+
+ isCreationAllowed.put(valueSourceView, true);
+ isCreationAllowed.put(nestedValueSourceView, true);
+ isCreationAllowed.put(subNestedValueContainer1_1_1SourceView, true);
+
+ isCreationAllowed.put(commentSourceView, false);
+ isCreationAllowed.put(commentCNSourceView, false);
+ isCreationAllowed.put(constraintSourceView, false);
+ isCreationAllowed.put(constraintCNSourceView, false);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/encapsulated/TestLinkCreationConnectorFromActorPart.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/encapsulated/TestLinkCreationConnectorFromActorPart.java
new file mode 100755
index 0000000..7ecddd5
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/encapsulated/TestLinkCreationConnectorFromActorPart.java
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.encapsulated;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link creation test (via palette tools).
+ */
+public class TestLinkCreationConnectorFromActorPart extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = actorPartSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.connector";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, false);
+
+ isCreationAllowed.put(actorPartTargetView, true);
+ isCreationAllowed.put(nestedActorPartTargetView, false);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(portOnPartTargetView, true);
+ isCreationAllowed.put(portOnNestedPartTargetView, false);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowportOnPartTargetView, true);
+ isCreationAllowed.put(flowportOnNestedPartTargetView, false);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPartTargetView, false);
+ isCreationAllowed.put(subNestedPartContainer1_1_1TargetView, false);
+ isCreationAllowed.put(subNestedPartContainer1_2_1TargetView, false);
+ isCreationAllowed.put(subNestedPartContainer1_1_2TargetView, false);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, false);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, false);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, false);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, false);
+ isCreationAllowed.put(constraintCNTargetView, false);
+
+ // Initialize nested property path for tests
+ List<Property> emptyPath = Collections.emptyList();
+
+
+ for(View view : isCreationAllowed.keySet()) {
+ expectedSourceNestedPath.put(view, emptyPath);
+ expectedTargetNestedPath.put(view, emptyPath);
+ }
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/encapsulated/TestLinkCreationConnectorFromFlowPortOnBlock.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/encapsulated/TestLinkCreationConnectorFromFlowPortOnBlock.java
new file mode 100755
index 0000000..63159e5
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/encapsulated/TestLinkCreationConnectorFromFlowPortOnBlock.java
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.encapsulated;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link creation test (via palette tools).
+ */
+public class TestLinkCreationConnectorFromFlowPortOnBlock extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = flowportOnBlockSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.connector";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, false);
+
+ isCreationAllowed.put(actorPartTargetView, true);
+ isCreationAllowed.put(nestedActorPartTargetView, false);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(portOnPartTargetView, true);
+ isCreationAllowed.put(portOnNestedPartTargetView, false);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowportOnPartTargetView, true);
+ isCreationAllowed.put(flowportOnNestedPartTargetView, false);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPartTargetView, false);
+ isCreationAllowed.put(subNestedPartContainer1_1_1TargetView, false);
+ isCreationAllowed.put(subNestedPartContainer1_2_1TargetView, false);
+ isCreationAllowed.put(subNestedPartContainer1_1_2TargetView, false);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, false);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, false);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, false);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, false);
+ isCreationAllowed.put(constraintCNTargetView, false);
+
+ // Initialize nested property path for tests
+ List<Property> emptyPath = Collections.emptyList();
+
+
+ for(View view : isCreationAllowed.keySet()) {
+ expectedSourceNestedPath.put(view, emptyPath);
+ expectedTargetNestedPath.put(view, emptyPath);
+ }
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/encapsulated/TestLinkCreationConnectorFromFlowPortOnNestedPart.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/encapsulated/TestLinkCreationConnectorFromFlowPortOnNestedPart.java
new file mode 100755
index 0000000..6e1a288
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/encapsulated/TestLinkCreationConnectorFromFlowPortOnNestedPart.java
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.encapsulated;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link creation test (via palette tools).
+ */
+public class TestLinkCreationConnectorFromFlowPortOnNestedPart extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = flowportOnNestedPartSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.connector";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, false);
+
+ isCreationAllowed.put(actorPartTargetView, false);
+ isCreationAllowed.put(nestedActorPartTargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, false);
+ isCreationAllowed.put(portOnPartTargetView, false);
+ isCreationAllowed.put(portOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, false);
+ isCreationAllowed.put(flowportOnPartTargetView, false);
+ isCreationAllowed.put(flowportOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(partTargetView, false);
+ isCreationAllowed.put(nestedPartTargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_1_1TargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_2_1TargetView, false);
+ isCreationAllowed.put(subNestedPartContainer1_1_2TargetView, false);
+
+ isCreationAllowed.put(propertyTargetView, false);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, false);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, false);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, false);
+ isCreationAllowed.put(constraintCNTargetView, false);
+
+ // Initialize nested property path for tests
+ List<Property> emptyPath = Collections.emptyList();
+
+
+ for(View view : isCreationAllowed.keySet()) {
+ expectedSourceNestedPath.put(view, emptyPath);
+ expectedTargetNestedPath.put(view, emptyPath);
+ }
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/encapsulated/TestLinkCreationConnectorFromFlowPortOnPart.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/encapsulated/TestLinkCreationConnectorFromFlowPortOnPart.java
new file mode 100755
index 0000000..a72bf93
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/encapsulated/TestLinkCreationConnectorFromFlowPortOnPart.java
@@ -0,0 +1,88 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.encapsulated;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link creation test (via palette tools).
+ */
+public class TestLinkCreationConnectorFromFlowPortOnPart extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ // Nested element are in the part that holds the flowport.
+ sourceView = flowportOnPartSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.connector";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, false);
+
+ isCreationAllowed.put(actorPartTargetView, true);
+ isCreationAllowed.put(nestedActorPartTargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(portOnPartTargetView, true);
+ isCreationAllowed.put(portOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowportOnPartTargetView, true);
+ isCreationAllowed.put(flowportOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPartTargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_1_1TargetView, false);
+ isCreationAllowed.put(subNestedPartContainer1_2_1TargetView, false);
+ isCreationAllowed.put(subNestedPartContainer1_1_2TargetView, false);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, false);
+ isCreationAllowed.put(constraintCNTargetView, false);
+
+ // Initialize nested property path for tests
+ List<Property> emptyPath = Collections.emptyList();
+
+
+ for(View view : isCreationAllowed.keySet()) {
+ expectedSourceNestedPath.put(view, emptyPath);
+ expectedTargetNestedPath.put(view, emptyPath);
+ }
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/encapsulated/TestLinkCreationConnectorFromNestedActorPart.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/encapsulated/TestLinkCreationConnectorFromNestedActorPart.java
new file mode 100755
index 0000000..039d48d
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/encapsulated/TestLinkCreationConnectorFromNestedActorPart.java
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.encapsulated;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link creation test (via palette tools).
+ */
+public class TestLinkCreationConnectorFromNestedActorPart extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = nestedActorPartSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.connector";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, false);
+
+ isCreationAllowed.put(actorPartTargetView, false);
+ isCreationAllowed.put(nestedActorPartTargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, false);
+ isCreationAllowed.put(portOnPartTargetView, false);
+ isCreationAllowed.put(portOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, false);
+ isCreationAllowed.put(flowportOnPartTargetView, false);
+ isCreationAllowed.put(flowportOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(partTargetView, false);
+ isCreationAllowed.put(nestedPartTargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_1_1TargetView, false);
+ isCreationAllowed.put(subNestedPartContainer1_2_1TargetView, false);
+ isCreationAllowed.put(subNestedPartContainer1_1_2TargetView, false);
+
+ isCreationAllowed.put(propertyTargetView, false);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, false);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, false);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, false);
+ isCreationAllowed.put(constraintCNTargetView, false);
+
+ // Initialize nested property path for tests
+ List<Property> emptyPath = Collections.emptyList();
+
+
+ for(View view : isCreationAllowed.keySet()) {
+ expectedSourceNestedPath.put(view, emptyPath);
+ expectedTargetNestedPath.put(view, emptyPath);
+ }
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/encapsulated/TestLinkCreationConnectorFromNestedPart.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/encapsulated/TestLinkCreationConnectorFromNestedPart.java
new file mode 100755
index 0000000..1a9e35f
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/encapsulated/TestLinkCreationConnectorFromNestedPart.java
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.encapsulated;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link creation test (via palette tools).
+ */
+public class TestLinkCreationConnectorFromNestedPart extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = nestedPartSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.connector";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, false);
+
+ isCreationAllowed.put(actorPartTargetView, false);
+ isCreationAllowed.put(nestedActorPartTargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, false);
+ isCreationAllowed.put(portOnPartTargetView, false);
+ isCreationAllowed.put(portOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, false);
+ isCreationAllowed.put(flowportOnPartTargetView, false);
+ isCreationAllowed.put(flowportOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(partTargetView, false);
+ isCreationAllowed.put(nestedPartTargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_1_1TargetView, false);
+ isCreationAllowed.put(subNestedPartContainer1_2_1TargetView, false);
+ isCreationAllowed.put(subNestedPartContainer1_1_2TargetView, false);
+
+ isCreationAllowed.put(propertyTargetView, false);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, false);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, false);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, false);
+ isCreationAllowed.put(constraintCNTargetView, false);
+
+ // Initialize nested property path for tests
+ List<Property> emptyPath = Collections.emptyList();
+
+
+ for(View view : isCreationAllowed.keySet()) {
+ expectedSourceNestedPath.put(view, emptyPath);
+ expectedTargetNestedPath.put(view, emptyPath);
+ }
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/encapsulated/TestLinkCreationConnectorFromNestedProperty.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/encapsulated/TestLinkCreationConnectorFromNestedProperty.java
new file mode 100755
index 0000000..db8f718
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/encapsulated/TestLinkCreationConnectorFromNestedProperty.java
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.encapsulated;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link creation test (via palette tools).
+ */
+public class TestLinkCreationConnectorFromNestedProperty extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = nestedPropertySourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.connector";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, false);
+
+ isCreationAllowed.put(actorPartTargetView, false);
+ isCreationAllowed.put(nestedActorPartTargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, false);
+ isCreationAllowed.put(portOnPartTargetView, false);
+ isCreationAllowed.put(portOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, false);
+ isCreationAllowed.put(flowportOnPartTargetView, false);
+ isCreationAllowed.put(flowportOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(partTargetView, false);
+ isCreationAllowed.put(nestedPartTargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_1_1TargetView, false);
+ isCreationAllowed.put(subNestedPartContainer1_2_1TargetView, false);
+ isCreationAllowed.put(subNestedPartContainer1_1_2TargetView, false);
+
+ isCreationAllowed.put(propertyTargetView, false);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, false);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, false);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, false);
+ isCreationAllowed.put(constraintCNTargetView, false);
+
+ // Initialize nested property path for tests
+ List<Property> emptyPath = Collections.emptyList();
+
+
+ for(View view : isCreationAllowed.keySet()) {
+ expectedSourceNestedPath.put(view, emptyPath);
+ expectedTargetNestedPath.put(view, emptyPath);
+ }
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/encapsulated/TestLinkCreationConnectorFromNestedReference.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/encapsulated/TestLinkCreationConnectorFromNestedReference.java
new file mode 100755
index 0000000..b7d42b8
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/encapsulated/TestLinkCreationConnectorFromNestedReference.java
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.encapsulated;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link creation test (via palette tools).
+ */
+public class TestLinkCreationConnectorFromNestedReference extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = nestedReferenceSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.connector";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, false);
+
+ isCreationAllowed.put(actorPartTargetView, false);
+ isCreationAllowed.put(nestedActorPartTargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, false);
+ isCreationAllowed.put(portOnPartTargetView, false);
+ isCreationAllowed.put(portOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, false);
+ isCreationAllowed.put(flowportOnPartTargetView, false);
+ isCreationAllowed.put(flowportOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(partTargetView, false);
+ isCreationAllowed.put(nestedPartTargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_1_1TargetView, false);
+ isCreationAllowed.put(subNestedPartContainer1_2_1TargetView, false);
+ isCreationAllowed.put(subNestedPartContainer1_1_2TargetView, false);
+
+ isCreationAllowed.put(propertyTargetView, false);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, false);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, false);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, false);
+ isCreationAllowed.put(constraintCNTargetView, false);
+
+ // Initialize nested property path for tests
+ List<Property> emptyPath = Collections.emptyList();
+
+
+ for(View view : isCreationAllowed.keySet()) {
+ expectedSourceNestedPath.put(view, emptyPath);
+ expectedTargetNestedPath.put(view, emptyPath);
+ }
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/encapsulated/TestLinkCreationConnectorFromNestedValue.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/encapsulated/TestLinkCreationConnectorFromNestedValue.java
new file mode 100755
index 0000000..beaac74
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/encapsulated/TestLinkCreationConnectorFromNestedValue.java
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.encapsulated;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link creation test (via palette tools).
+ */
+public class TestLinkCreationConnectorFromNestedValue extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = nestedValueSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.connector";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, false);
+
+ isCreationAllowed.put(actorPartTargetView, false);
+ isCreationAllowed.put(nestedActorPartTargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, false);
+ isCreationAllowed.put(portOnPartTargetView, false);
+ isCreationAllowed.put(portOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, false);
+ isCreationAllowed.put(flowportOnPartTargetView, false);
+ isCreationAllowed.put(flowportOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(partTargetView, false);
+ isCreationAllowed.put(nestedPartTargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_1_1TargetView, false);
+ isCreationAllowed.put(subNestedPartContainer1_2_1TargetView, false);
+ isCreationAllowed.put(subNestedPartContainer1_1_2TargetView, false);
+
+ isCreationAllowed.put(propertyTargetView, false);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, false);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, false);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, false);
+ isCreationAllowed.put(constraintCNTargetView, false);
+
+ // Initialize nested property path for tests
+ List<Property> emptyPath = Collections.emptyList();
+
+
+ for(View view : isCreationAllowed.keySet()) {
+ expectedSourceNestedPath.put(view, emptyPath);
+ expectedTargetNestedPath.put(view, emptyPath);
+ }
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/encapsulated/TestLinkCreationConnectorFromPart.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/encapsulated/TestLinkCreationConnectorFromPart.java
new file mode 100755
index 0000000..cddb41d
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/encapsulated/TestLinkCreationConnectorFromPart.java
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.encapsulated;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link creation test (via palette tools).
+ */
+public class TestLinkCreationConnectorFromPart extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = partSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.connector";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, false);
+
+ isCreationAllowed.put(actorPartTargetView, true);
+ isCreationAllowed.put(nestedActorPartTargetView, false);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(portOnPartTargetView, true);
+ isCreationAllowed.put(portOnNestedPartTargetView, false);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowportOnPartTargetView, true);
+ isCreationAllowed.put(flowportOnNestedPartTargetView, false);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPartTargetView, false);
+ isCreationAllowed.put(subNestedPartContainer1_1_1TargetView, false);
+ isCreationAllowed.put(subNestedPartContainer1_2_1TargetView, false);
+ isCreationAllowed.put(subNestedPartContainer1_1_2TargetView, false);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, false);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, false);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, false);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, false);
+ isCreationAllowed.put(constraintCNTargetView, false);
+
+ // Initialize nested property path for tests
+ List<Property> emptyPath = Collections.emptyList();
+
+
+ for(View view : isCreationAllowed.keySet()) {
+ expectedSourceNestedPath.put(view, emptyPath);
+ expectedTargetNestedPath.put(view, emptyPath);
+ }
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/encapsulated/TestLinkCreationConnectorFromPortOnBlock.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/encapsulated/TestLinkCreationConnectorFromPortOnBlock.java
new file mode 100755
index 0000000..b32cf77
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/encapsulated/TestLinkCreationConnectorFromPortOnBlock.java
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.encapsulated;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link creation test (via palette tools).
+ */
+public class TestLinkCreationConnectorFromPortOnBlock extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = portOnBlockSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.connector";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, false);
+
+ isCreationAllowed.put(actorPartTargetView, true);
+ isCreationAllowed.put(nestedActorPartTargetView, false);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(portOnPartTargetView, true);
+ isCreationAllowed.put(portOnNestedPartTargetView, false);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowportOnPartTargetView, true);
+ isCreationAllowed.put(flowportOnNestedPartTargetView, false);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPartTargetView, false);
+ isCreationAllowed.put(subNestedPartContainer1_1_1TargetView, false);
+ isCreationAllowed.put(subNestedPartContainer1_2_1TargetView, false);
+ isCreationAllowed.put(subNestedPartContainer1_1_2TargetView, false);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, false);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, false);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, false);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, false);
+ isCreationAllowed.put(constraintCNTargetView, false);
+
+ // Initialize nested property path for tests
+ List<Property> emptyPath = Collections.emptyList();
+
+
+ for(View view : isCreationAllowed.keySet()) {
+ expectedSourceNestedPath.put(view, emptyPath);
+ expectedTargetNestedPath.put(view, emptyPath);
+ }
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/encapsulated/TestLinkCreationConnectorFromPortOnNestedPart.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/encapsulated/TestLinkCreationConnectorFromPortOnNestedPart.java
new file mode 100755
index 0000000..0935dd5
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/encapsulated/TestLinkCreationConnectorFromPortOnNestedPart.java
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.encapsulated;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link creation test (via palette tools).
+ */
+public class TestLinkCreationConnectorFromPortOnNestedPart extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = portOnNestedPartSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.connector";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, false);
+
+ isCreationAllowed.put(actorPartTargetView, false);
+ isCreationAllowed.put(nestedActorPartTargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, false);
+ isCreationAllowed.put(portOnPartTargetView, false);
+ isCreationAllowed.put(portOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, false);
+ isCreationAllowed.put(flowportOnPartTargetView, false);
+ isCreationAllowed.put(flowportOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(partTargetView, false);
+ isCreationAllowed.put(nestedPartTargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_1_1TargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_2_1TargetView, false);
+ isCreationAllowed.put(subNestedPartContainer1_1_2TargetView, false);
+
+ isCreationAllowed.put(propertyTargetView, false);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, false);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, false);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, false);
+ isCreationAllowed.put(constraintCNTargetView, false);
+
+ // Initialize nested property path for tests
+ List<Property> emptyPath = Collections.emptyList();
+
+
+ for(View view : isCreationAllowed.keySet()) {
+ expectedSourceNestedPath.put(view, emptyPath);
+ expectedTargetNestedPath.put(view, emptyPath);
+ }
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/encapsulated/TestLinkCreationConnectorFromPortOnPart.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/encapsulated/TestLinkCreationConnectorFromPortOnPart.java
new file mode 100755
index 0000000..0eeaf60
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/encapsulated/TestLinkCreationConnectorFromPortOnPart.java
@@ -0,0 +1,88 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.encapsulated;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link creation test (via palette tools).
+ */
+public class TestLinkCreationConnectorFromPortOnPart extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ // Nested element are in the part that holds the port.
+ sourceView = portOnPartSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.connector";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, false);
+
+ isCreationAllowed.put(actorPartTargetView, true);
+ isCreationAllowed.put(nestedActorPartTargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(portOnPartTargetView, true);
+ isCreationAllowed.put(portOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowportOnPartTargetView, true);
+ isCreationAllowed.put(flowportOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPartTargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_1_1TargetView, false);
+ isCreationAllowed.put(subNestedPartContainer1_2_1TargetView, false);
+ isCreationAllowed.put(subNestedPartContainer1_1_2TargetView, false);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, false);
+ isCreationAllowed.put(constraintCNTargetView, false);
+
+ // Initialize nested property path for tests
+ List<Property> emptyPath = Collections.emptyList();
+
+
+ for(View view : isCreationAllowed.keySet()) {
+ expectedSourceNestedPath.put(view, emptyPath);
+ expectedTargetNestedPath.put(view, emptyPath);
+ }
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/encapsulated/TestLinkCreationConnectorFromProperty.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/encapsulated/TestLinkCreationConnectorFromProperty.java
new file mode 100755
index 0000000..db0879c
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/encapsulated/TestLinkCreationConnectorFromProperty.java
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.encapsulated;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link creation test (via palette tools).
+ */
+public class TestLinkCreationConnectorFromProperty extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = propertySourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.connector";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, false);
+
+ isCreationAllowed.put(actorPartTargetView, true);
+ isCreationAllowed.put(nestedActorPartTargetView, false);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(portOnPartTargetView, true);
+ isCreationAllowed.put(portOnNestedPartTargetView, false);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowportOnPartTargetView, true);
+ isCreationAllowed.put(flowportOnNestedPartTargetView, false);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPartTargetView, false);
+ isCreationAllowed.put(subNestedPartContainer1_1_1TargetView, false);
+ isCreationAllowed.put(subNestedPartContainer1_2_1TargetView, false);
+ isCreationAllowed.put(subNestedPartContainer1_1_2TargetView, false);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, false);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, false);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, false);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, false);
+ isCreationAllowed.put(constraintCNTargetView, false);
+
+ // Initialize nested property path for tests
+ List<Property> emptyPath = Collections.emptyList();
+
+
+ for(View view : isCreationAllowed.keySet()) {
+ expectedSourceNestedPath.put(view, emptyPath);
+ expectedTargetNestedPath.put(view, emptyPath);
+ }
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/encapsulated/TestLinkCreationConnectorFromReference.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/encapsulated/TestLinkCreationConnectorFromReference.java
new file mode 100755
index 0000000..03ee89f
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/encapsulated/TestLinkCreationConnectorFromReference.java
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.encapsulated;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link creation test (via palette tools).
+ */
+public class TestLinkCreationConnectorFromReference extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = referenceSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.connector";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, false);
+
+ isCreationAllowed.put(actorPartTargetView, true);
+ isCreationAllowed.put(nestedActorPartTargetView, false);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(portOnPartTargetView, true);
+ isCreationAllowed.put(portOnNestedPartTargetView, false);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowportOnPartTargetView, true);
+ isCreationAllowed.put(flowportOnNestedPartTargetView, false);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPartTargetView, false);
+ isCreationAllowed.put(subNestedPartContainer1_1_1TargetView, false);
+ isCreationAllowed.put(subNestedPartContainer1_2_1TargetView, false);
+ isCreationAllowed.put(subNestedPartContainer1_1_2TargetView, false);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, false);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, false);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, false);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, false);
+ isCreationAllowed.put(constraintCNTargetView, false);
+
+ // Initialize nested property path for tests
+ List<Property> emptyPath = Collections.emptyList();
+
+
+ for(View view : isCreationAllowed.keySet()) {
+ expectedSourceNestedPath.put(view, emptyPath);
+ expectedTargetNestedPath.put(view, emptyPath);
+ }
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/encapsulated/TestLinkCreationConnectorFromValue.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/encapsulated/TestLinkCreationConnectorFromValue.java
new file mode 100755
index 0000000..012d2b0
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/connector/encapsulated/TestLinkCreationConnectorFromValue.java
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.encapsulated;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link creation test (via palette tools).
+ */
+public class TestLinkCreationConnectorFromValue extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = valueSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.connector";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, false);
+
+ isCreationAllowed.put(actorPartTargetView, true);
+ isCreationAllowed.put(nestedActorPartTargetView, false);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(portOnPartTargetView, true);
+ isCreationAllowed.put(portOnNestedPartTargetView, false);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowportOnPartTargetView, true);
+ isCreationAllowed.put(flowportOnNestedPartTargetView, false);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPartTargetView, false);
+ isCreationAllowed.put(subNestedPartContainer1_1_1TargetView, false);
+ isCreationAllowed.put(subNestedPartContainer1_2_1TargetView, false);
+ isCreationAllowed.put(subNestedPartContainer1_1_2TargetView, false);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, false);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, false);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, false);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, false);
+ isCreationAllowed.put(constraintCNTargetView, false);
+
+ // Initialize nested property path for tests
+ List<Property> emptyPath = Collections.emptyList();
+
+
+ for(View view : isCreationAllowed.keySet()) {
+ expectedSourceNestedPath.put(view, emptyPath);
+ expectedTargetNestedPath.put(view, emptyPath);
+ }
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/dependency/TestLinkCreationDependencyForSources.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/dependency/TestLinkCreationDependencyForSources.java
new file mode 100755
index 0000000..548dd6f
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/dependency/TestLinkCreationDependencyForSources.java
@@ -0,0 +1,74 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.dependency;
+
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.AbstractLinkCreationForSourcesTest;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Dependency link creation test (via palette tools).
+ */
+public class TestLinkCreationDependencyForSources extends AbstractLinkCreationForSourcesTest {
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.dependency";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockSourceView, true);
+
+ isCreationAllowed.put(actorPartSourceView, true);
+ isCreationAllowed.put(nestedActorPartSourceView, true);
+ isCreationAllowed.put(subNestedActorPartContainer1_1_1SourceView, true);
+
+ isCreationAllowed.put(portOnBlockSourceView, true);
+ isCreationAllowed.put(portOnPartSourceView, true);
+ isCreationAllowed.put(portOnNestedPartSourceView, true);
+ isCreationAllowed.put(subNestedPartContainer1_1_1SourceView, true);
+
+ isCreationAllowed.put(flowportOnBlockSourceView, true);
+ isCreationAllowed.put(flowportOnPartSourceView, true);
+ isCreationAllowed.put(flowportOnNestedPartSourceView, true);
+
+ isCreationAllowed.put(partSourceView, true);
+ isCreationAllowed.put(nestedPartSourceView, true);
+ isCreationAllowed.put(subNestedPartContainer1_1_1TargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_2_1TargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_1_2TargetView, true);
+
+ isCreationAllowed.put(propertySourceView, true);
+ isCreationAllowed.put(nestedPropertySourceView, true);
+ isCreationAllowed.put(subNestedPropertyContainer1_1_1SourceView, true);
+
+ isCreationAllowed.put(referenceSourceView, true);
+ isCreationAllowed.put(nestedReferenceSourceView, true);
+ isCreationAllowed.put(subNestedReferenceContainer1_1_1SourceView, true);
+
+ isCreationAllowed.put(valueSourceView, true);
+ isCreationAllowed.put(nestedValueSourceView, true);
+ isCreationAllowed.put(subNestedValueContainer1_1_1SourceView, true);
+
+ isCreationAllowed.put(commentSourceView, false);
+ isCreationAllowed.put(commentCNSourceView, false);
+ isCreationAllowed.put(constraintSourceView, true);
+ isCreationAllowed.put(constraintCNSourceView, true);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/dependency/TestLinkCreationDependencyFromActorPart.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/dependency/TestLinkCreationDependencyFromActorPart.java
new file mode 100755
index 0000000..ba73b02
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/dependency/TestLinkCreationDependencyFromActorPart.java
@@ -0,0 +1,71 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.dependency;
+
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.AbstractLinkCreationFromElementTest;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Dependency link creation test (via palette tools).
+ */
+public class TestLinkCreationDependencyFromActorPart extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = actorPartSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.dependency";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, true);
+
+ isCreationAllowed.put(actorPartTargetView, true);
+ isCreationAllowed.put(nestedActorPartTargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(portOnPartTargetView, true);
+ isCreationAllowed.put(portOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowportOnPartTargetView, true);
+ isCreationAllowed.put(flowportOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPartTargetView, true);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, true);
+ isCreationAllowed.put(constraintCNTargetView, true);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/dependency/TestLinkCreationDependencyFromBlock.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/dependency/TestLinkCreationDependencyFromBlock.java
new file mode 100755
index 0000000..95ea5f5
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/dependency/TestLinkCreationDependencyFromBlock.java
@@ -0,0 +1,71 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.dependency;
+
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.AbstractLinkCreationFromElementTest;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Dependency link creation test (via palette tools).
+ */
+public class TestLinkCreationDependencyFromBlock extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = blockSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.dependency";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, true);
+
+ isCreationAllowed.put(actorPartTargetView, true);
+ isCreationAllowed.put(nestedActorPartTargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(portOnPartTargetView, true);
+ isCreationAllowed.put(portOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowportOnPartTargetView, true);
+ isCreationAllowed.put(flowportOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPartTargetView, true);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, true);
+ isCreationAllowed.put(constraintCNTargetView, true);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/dependency/TestLinkCreationDependencyFromConstraint.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/dependency/TestLinkCreationDependencyFromConstraint.java
new file mode 100755
index 0000000..fcbe5c9
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/dependency/TestLinkCreationDependencyFromConstraint.java
@@ -0,0 +1,71 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.dependency;
+
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.AbstractLinkCreationFromElementTest;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Dependency link creation test (via palette tools).
+ */
+public class TestLinkCreationDependencyFromConstraint extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = constraintSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.dependency";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, true);
+
+ isCreationAllowed.put(actorPartTargetView, true);
+ isCreationAllowed.put(nestedActorPartTargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(portOnPartTargetView, true);
+ isCreationAllowed.put(portOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowportOnPartTargetView, true);
+ isCreationAllowed.put(flowportOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPartTargetView, true);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, true);
+ isCreationAllowed.put(constraintCNTargetView, true);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/dependency/TestLinkCreationDependencyFromConstraintCN.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/dependency/TestLinkCreationDependencyFromConstraintCN.java
new file mode 100755
index 0000000..dae1d2f
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/dependency/TestLinkCreationDependencyFromConstraintCN.java
@@ -0,0 +1,71 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.dependency;
+
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.AbstractLinkCreationFromElementTest;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Dependency link creation test (via palette tools).
+ */
+public class TestLinkCreationDependencyFromConstraintCN extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = constraintCNSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.dependency";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, true);
+
+ isCreationAllowed.put(actorPartTargetView, true);
+ isCreationAllowed.put(nestedActorPartTargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(portOnPartTargetView, true);
+ isCreationAllowed.put(portOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowportOnPartTargetView, true);
+ isCreationAllowed.put(flowportOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPartTargetView, true);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, true);
+ isCreationAllowed.put(constraintCNTargetView, true);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/dependency/TestLinkCreationDependencyFromFlowPortOnBlock.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/dependency/TestLinkCreationDependencyFromFlowPortOnBlock.java
new file mode 100755
index 0000000..c3220f1
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/dependency/TestLinkCreationDependencyFromFlowPortOnBlock.java
@@ -0,0 +1,71 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.dependency;
+
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.AbstractLinkCreationFromElementTest;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Dependency link creation test (via palette tools).
+ */
+public class TestLinkCreationDependencyFromFlowPortOnBlock extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = flowportOnBlockSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.dependency";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, true);
+
+ isCreationAllowed.put(actorPartTargetView, true);
+ isCreationAllowed.put(nestedActorPartTargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(portOnPartTargetView, true);
+ isCreationAllowed.put(portOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowportOnPartTargetView, true);
+ isCreationAllowed.put(flowportOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPartTargetView, true);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, true);
+ isCreationAllowed.put(constraintCNTargetView, true);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/dependency/TestLinkCreationDependencyFromFlowPortOnNestedPart.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/dependency/TestLinkCreationDependencyFromFlowPortOnNestedPart.java
new file mode 100755
index 0000000..4bda6b1
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/dependency/TestLinkCreationDependencyFromFlowPortOnNestedPart.java
@@ -0,0 +1,71 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.dependency;
+
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.AbstractLinkCreationFromElementTest;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Dependency link creation test (via palette tools).
+ */
+public class TestLinkCreationDependencyFromFlowPortOnNestedPart extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = flowportOnNestedPartSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.dependency";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, true);
+
+ isCreationAllowed.put(actorPartTargetView, true);
+ isCreationAllowed.put(nestedActorPartTargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(portOnPartTargetView, true);
+ isCreationAllowed.put(portOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowportOnPartTargetView, true);
+ isCreationAllowed.put(flowportOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPartTargetView, true);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, true);
+ isCreationAllowed.put(constraintCNTargetView, true);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/dependency/TestLinkCreationDependencyFromFlowPortOnPart.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/dependency/TestLinkCreationDependencyFromFlowPortOnPart.java
new file mode 100755
index 0000000..d462df6
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/dependency/TestLinkCreationDependencyFromFlowPortOnPart.java
@@ -0,0 +1,71 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.dependency;
+
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.AbstractLinkCreationFromElementTest;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Dependency link creation test (via palette tools).
+ */
+public class TestLinkCreationDependencyFromFlowPortOnPart extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = flowportOnPartSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.dependency";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, true);
+
+ isCreationAllowed.put(actorPartTargetView, true);
+ isCreationAllowed.put(nestedActorPartTargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(portOnPartTargetView, true);
+ isCreationAllowed.put(portOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowportOnPartTargetView, true);
+ isCreationAllowed.put(flowportOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPartTargetView, true);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, true);
+ isCreationAllowed.put(constraintCNTargetView, true);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/dependency/TestLinkCreationDependencyFromNestedActorPart.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/dependency/TestLinkCreationDependencyFromNestedActorPart.java
new file mode 100755
index 0000000..acbf850
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/dependency/TestLinkCreationDependencyFromNestedActorPart.java
@@ -0,0 +1,71 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.dependency;
+
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.AbstractLinkCreationFromElementTest;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Dependency link creation test (via palette tools).
+ */
+public class TestLinkCreationDependencyFromNestedActorPart extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = nestedActorPartSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.dependency";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, true);
+
+ isCreationAllowed.put(actorPartTargetView, true);
+ isCreationAllowed.put(nestedActorPartTargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(portOnPartTargetView, true);
+ isCreationAllowed.put(portOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowportOnPartTargetView, true);
+ isCreationAllowed.put(flowportOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPartTargetView, true);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, true);
+ isCreationAllowed.put(constraintCNTargetView, true);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/dependency/TestLinkCreationDependencyFromNestedPart.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/dependency/TestLinkCreationDependencyFromNestedPart.java
new file mode 100755
index 0000000..9e70963
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/dependency/TestLinkCreationDependencyFromNestedPart.java
@@ -0,0 +1,71 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.dependency;
+
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.AbstractLinkCreationFromElementTest;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Dependency link creation test (via palette tools).
+ */
+public class TestLinkCreationDependencyFromNestedPart extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = nestedPartSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.dependency";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, true);
+
+ isCreationAllowed.put(actorPartTargetView, true);
+ isCreationAllowed.put(nestedActorPartTargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(portOnPartTargetView, true);
+ isCreationAllowed.put(portOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowportOnPartTargetView, true);
+ isCreationAllowed.put(flowportOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPartTargetView, true);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, true);
+ isCreationAllowed.put(constraintCNTargetView, true);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/dependency/TestLinkCreationDependencyFromNestedProperty.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/dependency/TestLinkCreationDependencyFromNestedProperty.java
new file mode 100755
index 0000000..e606c57
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/dependency/TestLinkCreationDependencyFromNestedProperty.java
@@ -0,0 +1,71 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.dependency;
+
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.AbstractLinkCreationFromElementTest;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Dependency link creation test (via palette tools).
+ */
+public class TestLinkCreationDependencyFromNestedProperty extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = nestedPropertySourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.dependency";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, true);
+
+ isCreationAllowed.put(actorPartTargetView, true);
+ isCreationAllowed.put(nestedActorPartTargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(portOnPartTargetView, true);
+ isCreationAllowed.put(portOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowportOnPartTargetView, true);
+ isCreationAllowed.put(flowportOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPartTargetView, true);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, true);
+ isCreationAllowed.put(constraintCNTargetView, true);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/dependency/TestLinkCreationDependencyFromNestedReference.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/dependency/TestLinkCreationDependencyFromNestedReference.java
new file mode 100755
index 0000000..acf8698
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/dependency/TestLinkCreationDependencyFromNestedReference.java
@@ -0,0 +1,71 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.dependency;
+
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.AbstractLinkCreationFromElementTest;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Dependency link creation test (via palette tools).
+ */
+public class TestLinkCreationDependencyFromNestedReference extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = nestedPartSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.dependency";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, true);
+
+ isCreationAllowed.put(actorPartTargetView, true);
+ isCreationAllowed.put(nestedActorPartTargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(portOnPartTargetView, true);
+ isCreationAllowed.put(portOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowportOnPartTargetView, true);
+ isCreationAllowed.put(flowportOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPartTargetView, true);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, true);
+ isCreationAllowed.put(constraintCNTargetView, true);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/dependency/TestLinkCreationDependencyFromNestedValue.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/dependency/TestLinkCreationDependencyFromNestedValue.java
new file mode 100755
index 0000000..d98332a
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/dependency/TestLinkCreationDependencyFromNestedValue.java
@@ -0,0 +1,71 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.dependency;
+
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.AbstractLinkCreationFromElementTest;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Dependency link creation test (via palette tools).
+ */
+public class TestLinkCreationDependencyFromNestedValue extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = nestedValueSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.dependency";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, true);
+
+ isCreationAllowed.put(actorPartTargetView, true);
+ isCreationAllowed.put(nestedActorPartTargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(portOnPartTargetView, true);
+ isCreationAllowed.put(portOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowportOnPartTargetView, true);
+ isCreationAllowed.put(flowportOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPartTargetView, true);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, true);
+ isCreationAllowed.put(constraintCNTargetView, true);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/dependency/TestLinkCreationDependencyFromPart.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/dependency/TestLinkCreationDependencyFromPart.java
new file mode 100755
index 0000000..8b632d9
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/dependency/TestLinkCreationDependencyFromPart.java
@@ -0,0 +1,71 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.dependency;
+
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.AbstractLinkCreationFromElementTest;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Dependency link creation test (via palette tools).
+ */
+public class TestLinkCreationDependencyFromPart extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = partSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.dependency";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, true);
+
+ isCreationAllowed.put(actorPartTargetView, true);
+ isCreationAllowed.put(nestedActorPartTargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(portOnPartTargetView, true);
+ isCreationAllowed.put(portOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowportOnPartTargetView, true);
+ isCreationAllowed.put(flowportOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPartTargetView, true);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, true);
+ isCreationAllowed.put(constraintCNTargetView, true);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/dependency/TestLinkCreationDependencyFromPortOnBlock.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/dependency/TestLinkCreationDependencyFromPortOnBlock.java
new file mode 100755
index 0000000..04dde1d
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/dependency/TestLinkCreationDependencyFromPortOnBlock.java
@@ -0,0 +1,71 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.dependency;
+
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.AbstractLinkCreationFromElementTest;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Dependency link creation test (via palette tools).
+ */
+public class TestLinkCreationDependencyFromPortOnBlock extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = portOnBlockSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.dependency";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, true);
+
+ isCreationAllowed.put(actorPartTargetView, true);
+ isCreationAllowed.put(nestedActorPartTargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(portOnPartTargetView, true);
+ isCreationAllowed.put(portOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowportOnPartTargetView, true);
+ isCreationAllowed.put(flowportOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPartTargetView, true);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, true);
+ isCreationAllowed.put(constraintCNTargetView, true);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/dependency/TestLinkCreationDependencyFromPortOnNestedPart.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/dependency/TestLinkCreationDependencyFromPortOnNestedPart.java
new file mode 100755
index 0000000..8919631
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/dependency/TestLinkCreationDependencyFromPortOnNestedPart.java
@@ -0,0 +1,71 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.dependency;
+
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.AbstractLinkCreationFromElementTest;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Dependency link creation test (via palette tools).
+ */
+public class TestLinkCreationDependencyFromPortOnNestedPart extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = portOnNestedPartSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.dependency";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, true);
+
+ isCreationAllowed.put(actorPartTargetView, true);
+ isCreationAllowed.put(nestedActorPartTargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(portOnPartTargetView, true);
+ isCreationAllowed.put(portOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowportOnPartTargetView, true);
+ isCreationAllowed.put(flowportOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPartTargetView, true);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, true);
+ isCreationAllowed.put(constraintCNTargetView, true);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/dependency/TestLinkCreationDependencyFromPortOnPart.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/dependency/TestLinkCreationDependencyFromPortOnPart.java
new file mode 100755
index 0000000..facb578
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/dependency/TestLinkCreationDependencyFromPortOnPart.java
@@ -0,0 +1,71 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.dependency;
+
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.AbstractLinkCreationFromElementTest;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Dependency link creation test (via palette tools).
+ */
+public class TestLinkCreationDependencyFromPortOnPart extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = portOnPartSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.dependency";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, true);
+
+ isCreationAllowed.put(actorPartTargetView, true);
+ isCreationAllowed.put(nestedActorPartTargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(portOnPartTargetView, true);
+ isCreationAllowed.put(portOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowportOnPartTargetView, true);
+ isCreationAllowed.put(flowportOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPartTargetView, true);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, true);
+ isCreationAllowed.put(constraintCNTargetView, true);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/dependency/TestLinkCreationDependencyFromProperty.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/dependency/TestLinkCreationDependencyFromProperty.java
new file mode 100755
index 0000000..ae840d6
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/dependency/TestLinkCreationDependencyFromProperty.java
@@ -0,0 +1,71 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.dependency;
+
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.AbstractLinkCreationFromElementTest;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Dependency link creation test (via palette tools).
+ */
+public class TestLinkCreationDependencyFromProperty extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = propertySourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.dependency";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, true);
+
+ isCreationAllowed.put(actorPartTargetView, true);
+ isCreationAllowed.put(nestedActorPartTargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(portOnPartTargetView, true);
+ isCreationAllowed.put(portOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowportOnPartTargetView, true);
+ isCreationAllowed.put(flowportOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPartTargetView, true);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, true);
+ isCreationAllowed.put(constraintCNTargetView, true);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/dependency/TestLinkCreationDependencyFromReference.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/dependency/TestLinkCreationDependencyFromReference.java
new file mode 100755
index 0000000..3f49b5f
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/dependency/TestLinkCreationDependencyFromReference.java
@@ -0,0 +1,71 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.dependency;
+
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.AbstractLinkCreationFromElementTest;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Dependency link creation test (via palette tools).
+ */
+public class TestLinkCreationDependencyFromReference extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = referenceSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.dependency";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, true);
+
+ isCreationAllowed.put(actorPartTargetView, true);
+ isCreationAllowed.put(nestedActorPartTargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(portOnPartTargetView, true);
+ isCreationAllowed.put(portOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowportOnPartTargetView, true);
+ isCreationAllowed.put(flowportOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPartTargetView, true);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, true);
+ isCreationAllowed.put(constraintCNTargetView, true);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/dependency/TestLinkCreationDependencyFromValue.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/dependency/TestLinkCreationDependencyFromValue.java
new file mode 100755
index 0000000..c572d4f
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/dependency/TestLinkCreationDependencyFromValue.java
@@ -0,0 +1,71 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.dependency;
+
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.AbstractLinkCreationFromElementTest;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Dependency link creation test (via palette tools).
+ */
+public class TestLinkCreationDependencyFromValue extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = valueSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.dependency";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, true);
+
+ isCreationAllowed.put(actorPartTargetView, true);
+ isCreationAllowed.put(nestedActorPartTargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(portOnPartTargetView, true);
+ isCreationAllowed.put(portOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowportOnPartTargetView, true);
+ isCreationAllowed.put(flowportOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPartTargetView, true);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, true);
+ isCreationAllowed.put(constraintCNTargetView, true);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/inherited/TestLinkCreationCommentConstraintForSources.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/inherited/TestLinkCreationCommentConstraintForSources.java
new file mode 100755
index 0000000..776935a
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/inherited/TestLinkCreationCommentConstraintForSources.java
@@ -0,0 +1,74 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.inherited;
+
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.AbstractLinkCreationForSourcesTest;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Comment-Constraint link creation test (via palette tools).
+ */
+public class TestLinkCreationCommentConstraintForSources extends AbstractLinkCreationForSourcesTest {
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.comment_constraint_link";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockSourceView, false);
+
+ isCreationAllowed.put(actorPartSourceView, false);
+ isCreationAllowed.put(nestedActorPartSourceView, false);
+ isCreationAllowed.put(subNestedActorPartContainer1_1_1SourceView, false);
+
+ isCreationAllowed.put(portOnBlockSourceView, false);
+ isCreationAllowed.put(portOnPartSourceView, false);
+ isCreationAllowed.put(portOnNestedPartSourceView, false);
+
+ isCreationAllowed.put(flowportOnBlockSourceView, false);
+ isCreationAllowed.put(flowportOnPartSourceView, false);
+ isCreationAllowed.put(flowportOnNestedPartSourceView, false);
+
+ isCreationAllowed.put(partSourceView, false);
+ isCreationAllowed.put(nestedPartSourceView, false);
+ isCreationAllowed.put(subNestedPartContainer1_1_1SourceView, false);
+
+ isCreationAllowed.put(propertySourceView, false);
+ isCreationAllowed.put(nestedPropertySourceView, false);
+ isCreationAllowed.put(subNestedPropertyContainer1_1_1SourceView, false);
+ isCreationAllowed.put(subNestedPartContainer1_1_1TargetView, false);
+ isCreationAllowed.put(subNestedPartContainer1_2_1TargetView, false);
+ isCreationAllowed.put(subNestedPartContainer1_1_2TargetView, false);
+
+ isCreationAllowed.put(referenceSourceView, false);
+ isCreationAllowed.put(nestedReferenceSourceView, false);
+ isCreationAllowed.put(subNestedReferenceContainer1_1_1SourceView, false);
+
+ isCreationAllowed.put(valueSourceView, false);
+ isCreationAllowed.put(nestedValueSourceView, false);
+ isCreationAllowed.put(subNestedValueContainer1_1_1SourceView, false);
+
+ isCreationAllowed.put(commentSourceView, true);
+ isCreationAllowed.put(commentCNSourceView, true);
+ isCreationAllowed.put(constraintSourceView, true);
+ isCreationAllowed.put(constraintCNSourceView, true);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/inherited/TestLinkCreationCommentConstraintFromComment.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/inherited/TestLinkCreationCommentConstraintFromComment.java
new file mode 100755
index 0000000..8bec25f
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/inherited/TestLinkCreationCommentConstraintFromComment.java
@@ -0,0 +1,71 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.inherited;
+
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.AbstractLinkCreationFromElementTest;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Comment-Constraint link creation test (via palette tools).
+ */
+public class TestLinkCreationCommentConstraintFromComment extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = commentSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.comment_constraint_link";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, true);
+
+ isCreationAllowed.put(actorPartTargetView, true);
+ isCreationAllowed.put(nestedActorPartTargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(portOnPartTargetView, true);
+ isCreationAllowed.put(portOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowportOnPartTargetView, true);
+ isCreationAllowed.put(flowportOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPartTargetView, true);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ isCreationAllowed.put(commentTargetView, true);
+ isCreationAllowed.put(commentCNTargetView, true);
+ isCreationAllowed.put(constraintTargetView, true);
+ isCreationAllowed.put(constraintCNTargetView, true);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/inherited/TestLinkCreationCommentConstraintFromCommentCN.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/inherited/TestLinkCreationCommentConstraintFromCommentCN.java
new file mode 100755
index 0000000..9082d9b
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/inherited/TestLinkCreationCommentConstraintFromCommentCN.java
@@ -0,0 +1,71 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.inherited;
+
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.AbstractLinkCreationFromElementTest;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Comment-Constraint link creation test (via palette tools).
+ */
+public class TestLinkCreationCommentConstraintFromCommentCN extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = commentCNSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.comment_constraint_link";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, true);
+
+ isCreationAllowed.put(actorPartTargetView, true);
+ isCreationAllowed.put(nestedActorPartTargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(portOnPartTargetView, true);
+ isCreationAllowed.put(portOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowportOnPartTargetView, true);
+ isCreationAllowed.put(flowportOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPartTargetView, true);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ isCreationAllowed.put(commentTargetView, true);
+ isCreationAllowed.put(commentCNTargetView, true);
+ isCreationAllowed.put(constraintTargetView, true);
+ isCreationAllowed.put(constraintCNTargetView, true);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/inherited/TestLinkCreationCommentConstraintFromConstraint.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/inherited/TestLinkCreationCommentConstraintFromConstraint.java
new file mode 100755
index 0000000..31dcc76
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/inherited/TestLinkCreationCommentConstraintFromConstraint.java
@@ -0,0 +1,71 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.inherited;
+
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.AbstractLinkCreationFromElementTest;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Comment-Constraint link creation test (via palette tools).
+ */
+public class TestLinkCreationCommentConstraintFromConstraint extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = constraintSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.comment_constraint_link";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, true);
+
+ isCreationAllowed.put(actorPartTargetView, true);
+ isCreationAllowed.put(nestedActorPartTargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(portOnPartTargetView, true);
+ isCreationAllowed.put(portOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowportOnPartTargetView, true);
+ isCreationAllowed.put(flowportOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPartTargetView, true);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ isCreationAllowed.put(commentTargetView, true);
+ isCreationAllowed.put(commentCNTargetView, true);
+ isCreationAllowed.put(constraintTargetView, true);
+ isCreationAllowed.put(constraintCNTargetView, true);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/inherited/TestLinkCreationCommentConstraintFromConstraintCN.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/inherited/TestLinkCreationCommentConstraintFromConstraintCN.java
new file mode 100755
index 0000000..ad4e972
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/link/inherited/TestLinkCreationCommentConstraintFromConstraintCN.java
@@ -0,0 +1,71 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.inherited;
+
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.AbstractLinkCreationFromElementTest;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Comment-Constraint link creation test (via palette tools).
+ */
+public class TestLinkCreationCommentConstraintFromConstraintCN extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = constraintCNSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "internalblock.tool.comment_constraint_link";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(blockTargetView, true);
+
+ isCreationAllowed.put(actorPartTargetView, true);
+ isCreationAllowed.put(nestedActorPartTargetView, true);
+
+ isCreationAllowed.put(portOnBlockTargetView, true);
+ isCreationAllowed.put(portOnPartTargetView, true);
+ isCreationAllowed.put(portOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(flowportOnBlockTargetView, true);
+ isCreationAllowed.put(flowportOnPartTargetView, true);
+ isCreationAllowed.put(flowportOnNestedPartTargetView, true);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPartTargetView, true);
+
+ isCreationAllowed.put(propertyTargetView, true);
+ isCreationAllowed.put(nestedPropertyTargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ isCreationAllowed.put(commentTargetView, true);
+ isCreationAllowed.put(commentCNTargetView, true);
+ isCreationAllowed.put(constraintTargetView, true);
+ isCreationAllowed.put(constraintCNTargetView, true);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnActorPart.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnActorPart.java
new file mode 100755
index 0000000..def9a94
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnActorPart.java
@@ -0,0 +1,110 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.node;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in an ActorPart.
+ */
+public class TestNodeCreationOnActorPart extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockStructureView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+ containerView = createGraphicalNode(SysMLElementTypes.ACTOR_PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("internalblock.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("internalblock.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_IN() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_in", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_OUT() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_out", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_INOUT() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_inout", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_NA() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_na", containerView, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ createNodeFromPalette("internalblock.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("internalblock.tool.property", containerView, false);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ createNodeFromPalette("internalblock.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ createNodeFromPalette("internalblock.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("internalblock.tool.comment", containerView, false);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("internalblock.tool.constraint", containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnActorPartStructureCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnActorPartStructureCompartment.java
new file mode 100755
index 0000000..a45c01f
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnActorPartStructureCompartment.java
@@ -0,0 +1,117 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.node;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.changeVisibility;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in a ActorPart structure compartment (this compartment is meaningless for ActorPart).
+ */
+public class TestNodeCreationOnActorPartStructureCompartment extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockStructureView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+ View partView = createGraphicalNode(SysMLElementTypes.ACTOR_PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ containerView = ViewUtil.getChildBySemanticHint(partView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!containerView.isVisible()) {
+ changeVisibility(containerView);
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("internalblock.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("internalblock.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_IN() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_in", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_OUT() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_out", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_INOUT() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_inout", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_NA() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_na", containerView, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ createNodeFromPalette("internalblock.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("internalblock.tool.property", containerView, false);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ createNodeFromPalette("internalblock.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ createNodeFromPalette("internalblock.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("internalblock.tool.comment", containerView, true);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("internalblock.tool.constraint", containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnBlock.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnBlock.java
new file mode 100755
index 0000000..b995dae
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnBlock.java
@@ -0,0 +1,107 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.node;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.AbstractTest;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in a Block.
+ */
+public class TestNodeCreationOnBlock extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ // prepare container
+ containerView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("internalblock.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("internalblock.tool.port", containerView, true);
+ }
+
+ @Test
+ public void createFlowPort_IN() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_in", containerView, true);
+ }
+
+ @Test
+ public void createFlowPort_OUT() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_out", containerView, true);
+ }
+
+ @Test
+ public void createFlowPort_INOUT() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_inout", containerView, true);
+ }
+
+ @Test
+ public void createFlowPort_NA() throws Exception {
+ // Don't try to run command (requires user action).
+ createNodeFromPalette("internalblock.tool.flowport_na", containerView, true, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ createNodeFromPalette("internalblock.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("internalblock.tool.property", containerView, false);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ createNodeFromPalette("internalblock.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ createNodeFromPalette("internalblock.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("internalblock.tool.comment", containerView, false);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("internalblock.tool.constraint", containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnBlockStructureCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnBlockStructureCompartment.java
new file mode 100755
index 0000000..e692ca8
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnBlockStructureCompartment.java
@@ -0,0 +1,122 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.node;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.changeVisibility;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.AbstractTest;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in a Block "standard ports" compartment.
+ */
+public class TestNodeCreationOnBlockStructureCompartment extends AbstractTest {
+
+ public static View containerView;
+ public static View blockView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ // prepare container
+ blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ if(blockView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ containerView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!containerView.isVisible()) {
+ changeVisibility(containerView);
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ // Don't try to run command (requires user action).
+ createNodeFromPalette("internalblock.tool.actorpart", containerView, true, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("internalblock.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_IN() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_in", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_OUT() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_out", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_INOUT() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_inout", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_NA() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_na", containerView, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ // Don't try to run command (requires user action).
+ createNodeFromPalette("internalblock.tool.part", containerView, true, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("internalblock.tool.property", containerView, true);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ // Don't try to run command (requires user action).
+ createNodeFromPalette("internalblock.tool.reference", containerView, true, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ // Don't try to run command (requires user action).
+ createNodeFromPalette("internalblock.tool.value", containerView, true, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("internalblock.tool.comment", containerView, true);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("internalblock.tool.constraint", containerView, true);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnDiagram.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnDiagram.java
new file mode 100755
index 0000000..a57f17e
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnDiagram.java
@@ -0,0 +1,86 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.node;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.AbstractTest;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in diagram.
+ */
+public class TestNodeCreationOnDiagram extends AbstractTest {
+
+ @Test
+ public void testCreationActorPartInDiagram() throws Exception {
+ createNodeFromPalette("internalblock.tool.actorpart", getDiagramView(), false);
+ }
+
+ @Test
+ public void testCreationPortInDiagram() throws Exception {
+ createNodeFromPalette("internalblock.tool.port", getDiagramView(), false);
+ }
+
+ @Test
+ public void testCreationFlowPort_IN_InDiagram() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_in", getDiagramView(), false);
+ }
+
+ @Test
+ public void testCreationFlowPort_OUT_InDiagram() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_out", getDiagramView(), false);
+ }
+
+ @Test
+ public void testCreationFlowPort_INOUT_InDiagram() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_inout", getDiagramView(), false);
+ }
+
+ @Test
+ public void testCreationFlowPort_NA_InDiagram() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_na", getDiagramView(), false);
+ }
+
+ @Test
+ public void testCreationPartInDiagram() throws Exception {
+ createNodeFromPalette("internalblock.tool.part", getDiagramView(), false);
+ }
+
+ @Test
+ public void testCreationPropertyInDiagram() throws Exception {
+ createNodeFromPalette("internalblock.tool.property", getDiagramView(), false);
+ }
+
+ @Test
+ public void testCreationReferenceInDiagram() throws Exception {
+ createNodeFromPalette("internalblock.tool.reference", getDiagramView(), false);
+ }
+
+ @Test
+ public void testCreationValueInDiagram() throws Exception {
+ createNodeFromPalette("internalblock.tool.value", getDiagramView(), false);
+ }
+
+ @Test
+ public void testCreationCommentInDiagram() throws Exception {
+ createNodeFromPalette("internalblock.tool.comment", getDiagramView(), true);
+ }
+
+ @Test
+ public void testCreationConstraintInDiagram() throws Exception {
+ createNodeFromPalette("internalblock.tool.constraint", getDiagramView(), true);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnNestedActorPart.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnNestedActorPart.java
new file mode 100755
index 0000000..3cb1a86
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnNestedActorPart.java
@@ -0,0 +1,185 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.node;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in a "nested" ActorPart.
+ */
+public class TestNodeCreationOnNestedActorPart extends AbstractTest {
+
+ public static View containerView;
+
+ /** Actor part in a nested part */
+ public static View subContainerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockStructureView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+ View partView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ View partStructureView = ViewUtil.getChildBySemanticHint(partView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ containerView = createGraphicalNode(SysMLElementTypes.ACTOR_PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partStructureView);
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ View nestedPartView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partStructureView);
+ View nestedPartStructureView = ViewUtil.getChildBySemanticHint(nestedPartView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ subContainerView = createGraphicalNode(SysMLElementTypes.ACTOR_PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartStructureView);
+ if(subContainerView == null) {
+ throw new Exception("Unable to prepare sub-container for test.");
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("internalblock.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("internalblock.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_IN() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_in", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_OUT() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_out", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_INOUT() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_inout", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_NA() throws Exception {
+ // Don't try to run command (requires user action).
+ createNodeFromPalette("internalblock.tool.flowport_na", containerView, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ createNodeFromPalette("internalblock.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("internalblock.tool.property", containerView, false);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ createNodeFromPalette("internalblock.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ createNodeFromPalette("internalblock.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("internalblock.tool.comment", containerView, false);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("internalblock.tool.constraint", containerView, false);
+ }
+
+ // Test on a part which is 2 level nested
+
+ @Test
+ public void createActorPartOnDeepNestedActorPart() throws Exception {
+ createNodeFromPalette("internalblock.tool.actorpart", subContainerView, false);
+ }
+
+ @Test
+ public void createPortOnDeepNestedActorPart() throws Exception {
+ createNodeFromPalette("internalblock.tool.port", subContainerView, false);
+ }
+
+ @Test
+ public void createFlowPort_INOnDeepNestedActorPart() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_in", subContainerView, false);
+ }
+
+ @Test
+ public void createFlowPort_OUTOnDeepNestedActorPart() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_out", subContainerView, false);
+ }
+
+ @Test
+ public void createFlowPort_INOUTOnDeepNestedActorPart() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_inout", subContainerView, false);
+ }
+
+ @Test
+ public void createFlowPort_NAOnDeepNestedActorPart() throws Exception {
+ // Don't try to run command (requires user action).
+ createNodeFromPalette("internalblock.tool.flowport_na", subContainerView, false);
+ }
+
+ @Test
+ public void createPartOnDeepNestedActorPart() throws Exception {
+ createNodeFromPalette("internalblock.tool.part", subContainerView, false);
+ }
+
+ @Test
+ public void createPropertyOnDeepNestedActorPart() throws Exception {
+ createNodeFromPalette("internalblock.tool.property", subContainerView, false);
+ }
+
+ @Test
+ public void createReferencOnDeepNestedActorParte() throws Exception {
+ createNodeFromPalette("internalblock.tool.reference", subContainerView, false);
+ }
+
+ @Test
+ public void createValueOnDeepNestedActorPart() throws Exception {
+ createNodeFromPalette("internalblock.tool.value", subContainerView, false);
+ }
+
+ @Test
+ public void createCommentOnDeepNestedActorPart() throws Exception {
+ createNodeFromPalette("internalblock.tool.comment", subContainerView, false);
+ }
+
+ @Test
+ public void createConstraintOnDeepNestedActorPart() throws Exception {
+ createNodeFromPalette("internalblock.tool.constraint", subContainerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnNestedActorPartStructureCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnNestedActorPartStructureCompartment.java
new file mode 100755
index 0000000..6e687d2
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnNestedActorPartStructureCompartment.java
@@ -0,0 +1,198 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.node;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.changeVisibility;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in a ActorPart structure compartment (this compartment is meaningless for ActorPart).
+ */
+public class TestNodeCreationOnNestedActorPartStructureCompartment extends AbstractTest {
+
+ /** Structure Compartment of a nested Actor Part */
+ public static View containerView;
+
+ /** Structure Compartment of a deep nested Actor Part */
+ public static View subContainerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockStructureView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+ View partView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ View partStructureView = ViewUtil.getChildBySemanticHint(partView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ View actorPartView = createGraphicalNode(SysMLElementTypes.ACTOR_PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partStructureView);
+ containerView = ViewUtil.getChildBySemanticHint(actorPartView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!containerView.isVisible()) {
+ changeVisibility(containerView);
+ }
+
+ View nestedPartView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partStructureView);
+ View nestedPartStructureView = ViewUtil.getChildBySemanticHint(nestedPartView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ View subActorPartView = createGraphicalNode(SysMLElementTypes.ACTOR_PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartStructureView);
+ subContainerView = ViewUtil.getChildBySemanticHint(subActorPartView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ if(subContainerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!subContainerView.isVisible()) {
+ changeVisibility(subContainerView);
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("internalblock.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("internalblock.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_IN() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_in", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_OUT() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_out", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_INOUT() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_inout", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_NA() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_na", containerView, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ createNodeFromPalette("internalblock.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("internalblock.tool.property", containerView, false);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ createNodeFromPalette("internalblock.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ createNodeFromPalette("internalblock.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("internalblock.tool.comment", containerView, true);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("internalblock.tool.constraint", containerView, false);
+ }
+
+ //////////////////////////////////////////////////
+ // test on deep nested Actor Part compartment
+ //////////////////////////////////////////////////
+
+
+ @Test
+ public void createActorPartOnDeepNestedActorPartStructureCompartment() throws Exception {
+ createNodeFromPalette("internalblock.tool.actorpart", subContainerView, false);
+ }
+
+ @Test
+ public void createPortOnDeepNestedActorPartStructureCompartment() throws Exception {
+ createNodeFromPalette("internalblock.tool.port", subContainerView, false);
+ }
+
+ @Test
+ public void createFlowPort_INOnDeepNestedActorPartStructureCompartment() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_in", subContainerView, false);
+ }
+
+ @Test
+ public void createFlowPort_OUTOnDeepNestedActorPartStructureCompartment() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_out", subContainerView, false);
+ }
+
+ @Test
+ public void createFlowPort_INOUTOnDeepNestedActorPartStructureCompartment() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_inout", subContainerView, false);
+ }
+
+ @Test
+ public void createFlowPort_NAOnDeepNestedActorPartStructureCompartment() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_na", subContainerView, false);
+ }
+
+ @Test
+ public void createPartOnDeepNestedActorPartStructureCompartment() throws Exception {
+ createNodeFromPalette("internalblock.tool.part", subContainerView, false);
+ }
+
+ @Test
+ public void createPropertyOnDeepNestedActorPartStructureCompartment() throws Exception {
+ createNodeFromPalette("internalblock.tool.property", subContainerView, false);
+ }
+
+ @Test
+ public void createReferenceOnDeepNestedActorPartStructureCompartment() throws Exception {
+ createNodeFromPalette("internalblock.tool.reference", subContainerView, false);
+ }
+
+ @Test
+ public void createValueOnDeepNestedActorPartStructureCompartment() throws Exception {
+ createNodeFromPalette("internalblock.tool.value", subContainerView, false);
+ }
+
+ @Test
+ public void createCommentOnDeepNestedActorPartStructureCompartment() throws Exception {
+ createNodeFromPalette("internalblock.tool.comment", subContainerView, true);
+ }
+
+ @Test
+ public void createConstraintOnDeepNestedActorPartStructureCompartment() throws Exception {
+ createNodeFromPalette("internalblock.tool.constraint", subContainerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnNestedPart.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnNestedPart.java
new file mode 100755
index 0000000..860d6ec
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnNestedPart.java
@@ -0,0 +1,186 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.node;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in a "nested" Part.
+ */
+public class TestNodeCreationOnNestedPart extends AbstractTest {
+
+ public static View containerView;
+
+ /** part in a nested part */
+ public static View subContainerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockStructureView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+ View partView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ View partStructureView = ViewUtil.getChildBySemanticHint(partView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ containerView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partStructureView);
+
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+ View nestedPartView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partStructureView);
+ View nestedPartStructureView = ViewUtil.getChildBySemanticHint(nestedPartView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ subContainerView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartStructureView);
+ if(subContainerView == null) {
+ throw new Exception("Unable to prepare sub-container for test.");
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("internalblock.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("internalblock.tool.port", containerView, true);
+ }
+
+ @Test
+ public void createFlowPort_IN() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_in", containerView, true);
+ }
+
+ @Test
+ public void createFlowPort_OUT() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_out", containerView, true);
+ }
+
+ @Test
+ public void createFlowPort_INOUT() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_inout", containerView, true);
+ }
+
+ @Test
+ public void createFlowPort_NA() throws Exception {
+ // Don't try to run command (requires user action).
+ createNodeFromPalette("internalblock.tool.flowport_na", containerView, true, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ createNodeFromPalette("internalblock.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("internalblock.tool.property", containerView, false);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ createNodeFromPalette("internalblock.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ createNodeFromPalette("internalblock.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("internalblock.tool.comment", containerView, false);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("internalblock.tool.constraint", containerView, false);
+ }
+
+ /////////////////////////////////////////////////////////
+ // Test on 2 level nested part
+ /////////////////////////////////////////////////////////
+ @Test
+ public void createActorPartOnDeepNestedPart() throws Exception {
+ createNodeFromPalette("internalblock.tool.actorpart", subContainerView, false);
+ }
+
+ @Test
+ public void createPortOnDeepNestedPart() throws Exception {
+ createNodeFromPalette("internalblock.tool.port", subContainerView, true);
+ }
+
+ @Test
+ public void createFlowPort_INOnDeepNestedPart() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_in", subContainerView, true);
+ }
+
+ @Test
+ public void createFlowPort_OUTOnDeepNestedPart() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_out", subContainerView, true);
+ }
+
+ @Test
+ public void createFlowPort_INOUTOnDeepNestedPart() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_inout", subContainerView, true);
+ }
+
+ @Test
+ public void createFlowPort_NAOnDeepNestedPart() throws Exception {
+ // Don't try to run command (requires user action).
+ createNodeFromPalette("internalblock.tool.flowport_na", subContainerView, true, false);
+ }
+
+ @Test
+ public void createPartOnDeepNestedPart() throws Exception {
+ createNodeFromPalette("internalblock.tool.part", subContainerView, false);
+ }
+
+ @Test
+ public void createPropertyOnDeepNestedPart() throws Exception {
+ createNodeFromPalette("internalblock.tool.property", subContainerView, false);
+ }
+
+ @Test
+ public void createReferenceOnDeepNestedPart() throws Exception {
+ createNodeFromPalette("internalblock.tool.reference", subContainerView, false);
+ }
+
+ @Test
+ public void createValueOnDeepNestedPart() throws Exception {
+ createNodeFromPalette("internalblock.tool.value", subContainerView, false);
+ }
+
+ @Test
+ public void createCommentOnDeepNestedPart() throws Exception {
+ createNodeFromPalette("internalblock.tool.comment", subContainerView, false);
+ }
+
+ @Test
+ public void createConstraintOnDeepNestedPart() throws Exception {
+ createNodeFromPalette("internalblock.tool.constraint", subContainerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnNestedPartStructureCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnNestedPartStructureCompartment.java
new file mode 100755
index 0000000..779b53f
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnNestedPartStructureCompartment.java
@@ -0,0 +1,202 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.node;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.changeVisibility;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in a Part "structure" compartment.
+ */
+public class TestNodeCreationOnNestedPartStructureCompartment extends AbstractTest {
+
+ public static View containerView;
+
+ /** Actor part in a nested part */
+ public static View subContainerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockStructureView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+ View partView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ View partStructureView = ViewUtil.getChildBySemanticHint(partView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ containerView = partStructureView;
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!containerView.isVisible()) {
+ changeVisibility(containerView);
+ }
+
+ View nestedPartView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partStructureView);
+ View nestedPartStructureView = ViewUtil.getChildBySemanticHint(nestedPartView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ subContainerView = nestedPartStructureView;
+ if(subContainerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!subContainerView.isVisible()) {
+ changeVisibility(subContainerView);
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ // Don't try to run command (requires user action).
+ createNodeFromPalette("internalblock.tool.actorpart", containerView, true, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("internalblock.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_IN() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_in", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_OUT() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_out", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_INOUT() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_inout", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_NA() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_na", containerView, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ // Don't try to run command (requires user action).
+ createNodeFromPalette("internalblock.tool.part", containerView, true, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("internalblock.tool.property", containerView, true);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ // Don't try to run command (requires user action).
+ createNodeFromPalette("internalblock.tool.reference", containerView, true, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ // Don't try to run command (requires user action).
+ createNodeFromPalette("internalblock.tool.value", containerView, true, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("internalblock.tool.comment", containerView, true);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("internalblock.tool.constraint", containerView, false);
+ }
+
+ //////////////////////////////////////////////////
+ // test on deep nested Part compartment
+ //////////////////////////////////////////////////
+
+ @Test
+ public void createActorPartOnDeepNestedPartStructureCompartment() throws Exception {
+ // Don't try to run command (requires user action).
+ createNodeFromPalette("internalblock.tool.actorpart", subContainerView, true, false);
+ }
+
+ @Test
+ public void createPortOnDeepNestedPartStructureCompartment() throws Exception {
+ createNodeFromPalette("internalblock.tool.port", subContainerView, false);
+ }
+
+ @Test
+ public void createFlowPort_INOnDeepNestedPartStructureCompartment() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_in", subContainerView, false);
+ }
+
+ @Test
+ public void createFlowPort_OUTOnDeepNestedPartStructureCompartment() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_out", subContainerView, false);
+ }
+
+ @Test
+ public void createFlowPort_INOUTOnDeepNestedPartStructureCompartment() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_inout", subContainerView, false);
+ }
+
+ @Test
+ public void createFlowPort_NAOnDeepNestedPartStructureCompartment() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_na", subContainerView, false);
+ }
+
+ @Test
+ public void createPartOnDeepNestedPartStructureCompartment() throws Exception {
+ // Don't try to run command (requires user action).
+ createNodeFromPalette("internalblock.tool.part", subContainerView, true, false);
+ }
+
+ @Test
+ public void createPropertyOnDeepNestedPartStructureCompartment() throws Exception {
+ createNodeFromPalette("internalblock.tool.property", subContainerView, true);
+ }
+
+ @Test
+ public void createReferenceOnDeepNestedPartStructureCompartment() throws Exception {
+ // Don't try to run command (requires user action).
+ createNodeFromPalette("internalblock.tool.reference", subContainerView, true, false);
+ }
+
+ @Test
+ public void createValueOnDeepNestedPartStructureCompartment() throws Exception {
+ // Don't try to run command (requires user action).
+ createNodeFromPalette("internalblock.tool.value", subContainerView, true, false);
+ }
+
+ @Test
+ public void createCommentOnDeepNestedPartStructureCompartment() throws Exception {
+ createNodeFromPalette("internalblock.tool.comment", subContainerView, true);
+ }
+
+ @Test
+ public void createConstraintOnDeepNestedPartStructureCompartment() throws Exception {
+ createNodeFromPalette("internalblock.tool.constraint", subContainerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnNestedProperty.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnNestedProperty.java
new file mode 100755
index 0000000..160659c
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnNestedProperty.java
@@ -0,0 +1,188 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.node;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in a "nested" Property.
+ */
+public class TestNodeCreationOnNestedProperty extends AbstractTest {
+
+ public static View containerView;
+
+ /** property in a nested part */
+ public static View subContainerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockStructureView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+ View partView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ View partStructureView = ViewUtil.getChildBySemanticHint(partView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ containerView = createGraphicalNode(UMLElementTypes.PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partStructureView);
+
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+ View nestedPartView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partStructureView);
+ View nestedPartStructureView = ViewUtil.getChildBySemanticHint(nestedPartView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ subContainerView = createGraphicalNode(UMLElementTypes.PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartStructureView);
+ if(subContainerView == null) {
+ throw new Exception("Unable to prepare sub-container for test.");
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("internalblock.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("internalblock.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_IN() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_in", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_OUT() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_out", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_INOUT() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_inout", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_NA() throws Exception {
+ // Don't try to run command (requires user action).
+ createNodeFromPalette("internalblock.tool.flowport_na", containerView, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ createNodeFromPalette("internalblock.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("internalblock.tool.property", containerView, false);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ createNodeFromPalette("internalblock.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ createNodeFromPalette("internalblock.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("internalblock.tool.comment", containerView, false);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("internalblock.tool.constraint", containerView, false);
+ }
+
+ /////////////////////////////////////////////////////////
+ // Test on 2 level nested property
+ /////////////////////////////////////////////////////////
+
+ @Test
+ public void createActorPartOnDeepNestedProperty() throws Exception {
+ createNodeFromPalette("internalblock.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createPortOnDeepNestedProperty() throws Exception {
+ createNodeFromPalette("internalblock.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_INOnDeepNestedProperty() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_in", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_OUTOnDeepNestedProperty() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_out", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_INOUTOnDeepNestedProperty() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_inout", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_NAOnDeepNestedProperty() throws Exception {
+ // Don't try to run command (requires user action).
+ createNodeFromPalette("internalblock.tool.flowport_na", containerView, false);
+ }
+
+ @Test
+ public void createPartOnDeepNestedProperty() throws Exception {
+ createNodeFromPalette("internalblock.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createPropertyOnDeepNestedProperty() throws Exception {
+ createNodeFromPalette("internalblock.tool.property", containerView, false);
+ }
+
+ @Test
+ public void createReferenceOnDeepNestedProperty() throws Exception {
+ createNodeFromPalette("internalblock.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createValueOnDeepNestedProperty() throws Exception {
+ createNodeFromPalette("internalblock.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createCommentOnDeepNestedProperty() throws Exception {
+ createNodeFromPalette("internalblock.tool.comment", containerView, false);
+ }
+
+ @Test
+ public void createConstraintOnDeepNestedProperty() throws Exception {
+ createNodeFromPalette("internalblock.tool.constraint", containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnNestedPropertyStructureCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnNestedPropertyStructureCompartment.java
new file mode 100755
index 0000000..92fecb8
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnNestedPropertyStructureCompartment.java
@@ -0,0 +1,198 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.node;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.changeVisibility;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in a Property "structure" compartment (meaningless compartment).
+ */
+public class TestNodeCreationOnNestedPropertyStructureCompartment extends AbstractTest {
+
+ /** Compartment of a nested Property */
+ public static View containerView;
+
+ /** Compartment of a deep nested Property */
+ public static View subContainerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockStructureView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+ View partView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ View partStructureView = ViewUtil.getChildBySemanticHint(partView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ View propertyPartView = createGraphicalNode(UMLElementTypes.PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partStructureView);
+ containerView = ViewUtil.getChildBySemanticHint(propertyPartView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!containerView.isVisible()) {
+ changeVisibility(containerView);
+ }
+
+ View nestedPartView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partStructureView);
+ View nestedPartStructureView = ViewUtil.getChildBySemanticHint(nestedPartView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ View subPropertyPartView = createGraphicalNode(UMLElementTypes.PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartStructureView);
+ subContainerView = ViewUtil.getChildBySemanticHint(subPropertyPartView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ if(subContainerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!subContainerView.isVisible()) {
+ changeVisibility(subContainerView);
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("internalblock.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("internalblock.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_IN() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_in", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_OUT() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_out", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_INOUT() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_inout", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_NA() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_na", containerView, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ createNodeFromPalette("internalblock.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("internalblock.tool.property", containerView, false);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ createNodeFromPalette("internalblock.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ createNodeFromPalette("internalblock.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("internalblock.tool.comment", containerView, true);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("internalblock.tool.constraint", containerView, false);
+ }
+
+ //////////////////////////////////////////////////
+ // test on deep nested Property compartment
+ //////////////////////////////////////////////////
+
+ @Test
+ public void createActorPartOnDeepNestedPropertyStructureCompartment() throws Exception {
+ createNodeFromPalette("internalblock.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createPortOnDeepNestedPropertyStructureCompartment() throws Exception {
+ createNodeFromPalette("internalblock.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_INOnDeepNestedPropertyStructureCompartment() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_in", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_OUTOnDeepNestedPropertyStructureCompartment() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_out", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_INOUTOnDeepNestedPropertyStructureCompartment() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_inout", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_NAOnDeepNestedPropertyStructureCompartment() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_na", containerView, false);
+ }
+
+ @Test
+ public void createPartOnDeepNestedPropertyStructureCompartment() throws Exception {
+ createNodeFromPalette("internalblock.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createPropertyOnDeepNestedPropertyStructureCompartment() throws Exception {
+ createNodeFromPalette("internalblock.tool.property", containerView, false);
+ }
+
+ @Test
+ public void createReferenceOnDeepNestedPropertyStructureCompartment() throws Exception {
+ createNodeFromPalette("internalblock.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createValueOnDeepNestedPropertyStructureCompartment() throws Exception {
+ createNodeFromPalette("internalblock.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createCommentOnDeepNestedPropertyStructureCompartment() throws Exception {
+ createNodeFromPalette("internalblock.tool.comment", containerView, true);
+ }
+
+ @Test
+ public void createConstraintOnDeepNestedPropertyStructureCompartment() throws Exception {
+ createNodeFromPalette("internalblock.tool.constraint", containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnNestedReference.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnNestedReference.java
new file mode 100755
index 0000000..cec355e
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnNestedReference.java
@@ -0,0 +1,187 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.node;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in a "nested" Reference.
+ */
+public class TestNodeCreationOnNestedReference extends AbstractTest {
+
+ public static View containerView;
+
+ /** reference in a nested part */
+ public static View subContainerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockStructureView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+ View partView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ View partStructureView = ViewUtil.getChildBySemanticHint(partView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ containerView = createGraphicalNode(SysMLElementTypes.REFERENCE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partStructureView);
+
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+ View nestedPartView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partStructureView);
+ View nestedPartStructureView = ViewUtil.getChildBySemanticHint(nestedPartView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ subContainerView = createGraphicalNode(SysMLElementTypes.REFERENCE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartStructureView);
+ if(subContainerView == null) {
+ throw new Exception("Unable to prepare sub-container for test.");
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("internalblock.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("internalblock.tool.port", containerView, true);
+ }
+
+ @Test
+ public void createFlowPort_IN() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_in", containerView, true);
+ }
+
+ @Test
+ public void createFlowPort_OUT() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_out", containerView, true);
+ }
+
+ @Test
+ public void createFlowPort_INOUT() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_inout", containerView, true);
+ }
+
+ @Test
+ public void createFlowPort_NA() throws Exception {
+ // Don't try to run command (requires user action).
+ createNodeFromPalette("internalblock.tool.flowport_na", containerView, true, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ createNodeFromPalette("internalblock.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("internalblock.tool.property", containerView, false);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ createNodeFromPalette("internalblock.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ createNodeFromPalette("internalblock.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("internalblock.tool.comment", containerView, false);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("internalblock.tool.constraint", containerView, false);
+ }
+
+ /////////////////////////////////////////////////////////
+ // Test on 2 level nested reference
+ /////////////////////////////////////////////////////////
+
+ @Test
+ public void createActorPartOnDeepNestedReference() throws Exception {
+ createNodeFromPalette("internalblock.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createPortOnDeepNestedReference() throws Exception {
+ createNodeFromPalette("internalblock.tool.port", containerView, true);
+ }
+
+ @Test
+ public void createFlowPort_INOnDeepNestedReference() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_in", containerView, true);
+ }
+
+ @Test
+ public void createFlowPort_OUTOnDeepNestedReference() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_out", containerView, true);
+ }
+
+ @Test
+ public void createFlowPort_INOUTOnDeepNestedReference() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_inout", containerView, true);
+ }
+
+ @Test
+ public void createFlowPort_NAOnDeepNestedReference() throws Exception {
+ // Don't try to run command (requires user action).
+ createNodeFromPalette("internalblock.tool.flowport_na", containerView, true, false);
+ }
+
+ @Test
+ public void createPartOnDeepNestedReference() throws Exception {
+ createNodeFromPalette("internalblock.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createPropertyOnDeepNestedReference() throws Exception {
+ createNodeFromPalette("internalblock.tool.property", containerView, false);
+ }
+
+ @Test
+ public void createReferenceOnDeepNestedReference() throws Exception {
+ createNodeFromPalette("internalblock.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createValueOnDeepNestedReference() throws Exception {
+ createNodeFromPalette("internalblock.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createCommentOnDeepNestedReference() throws Exception {
+ createNodeFromPalette("internalblock.tool.comment", containerView, false);
+ }
+
+ @Test
+ public void createConstraintOnDeepNestedReference() throws Exception {
+ createNodeFromPalette("internalblock.tool.constraint", containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnNestedReferenceStructureCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnNestedReferenceStructureCompartment.java
new file mode 100755
index 0000000..75d629e
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnNestedReferenceStructureCompartment.java
@@ -0,0 +1,205 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.node;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.changeVisibility;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in a Reference "structure" compartment (meaningless compartment).
+ */
+public class TestNodeCreationOnNestedReferenceStructureCompartment extends AbstractTest {
+
+ /** Structure Compartment of a nested Reference */
+ public static View containerView;
+
+ /** Structure Compartment of a deep nested Reference */
+ public static View subContainerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockStructureView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+ View partView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ View partStructureView = ViewUtil.getChildBySemanticHint(partView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ View referencePropertyView = createGraphicalNode(SysMLElementTypes.REFERENCE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partStructureView);
+ containerView = ViewUtil.getChildBySemanticHint(referencePropertyView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!containerView.isVisible()) {
+ changeVisibility(containerView);
+ }
+
+ View nestedPartView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partStructureView);
+ View nestedPartStructureView = ViewUtil.getChildBySemanticHint(nestedPartView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ View subReferencePropertyView = createGraphicalNode(SysMLElementTypes.REFERENCE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartStructureView);
+ subContainerView = ViewUtil.getChildBySemanticHint(subReferencePropertyView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ if(subContainerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!subContainerView.isVisible()) {
+ changeVisibility(subContainerView);
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ // Don't try to run command (requires user action).
+ createNodeFromPalette("internalblock.tool.actorpart", containerView, true, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("internalblock.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_IN() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_in", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_OUT() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_out", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_INOUT() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_inout", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_NA() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_na", containerView, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ // Don't try to run command (requires user action).
+ createNodeFromPalette("internalblock.tool.part", containerView, true, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("internalblock.tool.property", containerView, true);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ // Don't try to run command (requires user action).
+ createNodeFromPalette("internalblock.tool.reference", containerView, true, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ // Don't try to run command (requires user action).
+ createNodeFromPalette("internalblock.tool.value", containerView, true, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("internalblock.tool.comment", containerView, true);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("internalblock.tool.constraint", containerView, false);
+ }
+
+ //////////////////////////////////////////////////
+ // test on deep nested Reference compartment
+ //////////////////////////////////////////////////
+
+ @Test
+ public void createActorPartOnDeepNestedReferenceStructureCompartment() throws Exception {
+ // Don't try to run command (requires user action).
+ createNodeFromPalette("internalblock.tool.actorpart", containerView, true, false);
+ }
+
+ @Test
+ public void createPortOnDeepNestedReferenceStructureCompartment() throws Exception {
+ createNodeFromPalette("internalblock.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_INOnDeepNestedReferenceStructureCompartment() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_in", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_OUTOnDeepNestedReferenceStructureCompartment() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_out", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_INOUTOnDeepNestedReferenceStructureCompartment() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_inout", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_NAOnDeepNestedReferenceStructureCompartment() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_na", containerView, false);
+ }
+
+ @Test
+ public void createPartOnDeepNestedReferenceStructureCompartment() throws Exception {
+ // Don't try to run command (requires user action).
+ createNodeFromPalette("internalblock.tool.part", containerView, true, false);
+ }
+
+ @Test
+ public void createPropertyOnDeepNestedReferenceStructureCompartment() throws Exception {
+ createNodeFromPalette("internalblock.tool.property", containerView, true);
+ }
+
+ @Test
+ public void createReferenceOnDeepNestedReferenceStructureCompartment() throws Exception {
+ // Don't try to run command (requires user action).
+ createNodeFromPalette("internalblock.tool.reference", containerView, true, false);
+ }
+
+ @Test
+ public void createValueOnDeepNestedReferenceStructureCompartment() throws Exception {
+ // Don't try to run command (requires user action).
+ createNodeFromPalette("internalblock.tool.value", containerView, true, false);
+ }
+
+ @Test
+ public void createCommentOnDeepNestedReferenceStructureCompartment() throws Exception {
+ createNodeFromPalette("internalblock.tool.comment", containerView, true);
+ }
+
+ @Test
+ public void createConstraintOnDeepNestedReferenceStructureCompartment() throws Exception {
+ createNodeFromPalette("internalblock.tool.constraint", containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnNestedValue.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnNestedValue.java
new file mode 100755
index 0000000..80bd269
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnNestedValue.java
@@ -0,0 +1,187 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.node;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in a "nested" Value.
+ */
+public class TestNodeCreationOnNestedValue extends AbstractTest {
+
+ public static View containerView;
+
+ /** value in a nested part */
+ public static View subContainerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockStructureView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+ View partView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ View partStructureView = ViewUtil.getChildBySemanticHint(partView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ containerView = createGraphicalNode(SysMLElementTypes.VALUE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partStructureView);
+
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+ View nestedPartView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partStructureView);
+ View nestedPartStructureView = ViewUtil.getChildBySemanticHint(nestedPartView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ subContainerView = createGraphicalNode(SysMLElementTypes.VALUE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartStructureView);
+ if(subContainerView == null) {
+ throw new Exception("Unable to prepare sub-container for test.");
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("internalblock.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("internalblock.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_IN() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_in", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_OUT() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_out", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_INOUT() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_inout", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_NA() throws Exception {
+ // Don't try to run command (requires user action).
+ createNodeFromPalette("internalblock.tool.flowport_na", containerView, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ createNodeFromPalette("internalblock.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("internalblock.tool.property", containerView, false);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ createNodeFromPalette("internalblock.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ createNodeFromPalette("internalblock.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("internalblock.tool.comment", containerView, false);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("internalblock.tool.constraint", containerView, false);
+ }
+
+ /////////////////////////////////////////////////////////
+ // Test on 2 level nested value
+ /////////////////////////////////////////////////////////
+
+ @Test
+ public void createActorPartOnDeepNestedValue() throws Exception {
+ createNodeFromPalette("internalblock.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createPortOnDeepNestedValue() throws Exception {
+ createNodeFromPalette("internalblock.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_INOnDeepNestedValue() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_in", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_OUTOnDeepNestedValue() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_out", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_INOUTOnDeepNestedValue() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_inout", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_NAOnDeepNestedValue() throws Exception {
+ // Don't try to run command (requires user action).
+ createNodeFromPalette("internalblock.tool.flowport_na", containerView, false);
+ }
+
+ @Test
+ public void createPartOnDeepNestedValue() throws Exception {
+ createNodeFromPalette("internalblock.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createPropertyOnDeepNestedValue() throws Exception {
+ createNodeFromPalette("internalblock.tool.property", containerView, false);
+ }
+
+ @Test
+ public void createReferenceOnDeepNestedValue() throws Exception {
+ createNodeFromPalette("internalblock.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createValueOnDeepNestedValue() throws Exception {
+ createNodeFromPalette("internalblock.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createCommentOnDeepNestedValue() throws Exception {
+ createNodeFromPalette("internalblock.tool.comment", containerView, false);
+ }
+
+ @Test
+ public void createConstraintOnDeepNestedValue() throws Exception {
+ createNodeFromPalette("internalblock.tool.constraint", containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnNestedValueStructureCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnNestedValueStructureCompartment.java
new file mode 100755
index 0000000..a6f6d1d
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnNestedValueStructureCompartment.java
@@ -0,0 +1,197 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.node;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.changeVisibility;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in a Value "structure" compartment (meaningless compartment).
+ */
+public class TestNodeCreationOnNestedValueStructureCompartment extends AbstractTest {
+
+ /** Structure Compartment of a nested Value */
+ public static View containerView;
+
+ /** Structure Compartment of a deep nested Value */
+ public static View subContainerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockStructureView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+ View partView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ View partStructureView = ViewUtil.getChildBySemanticHint(partView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ View valuePropertyView = createGraphicalNode(SysMLElementTypes.VALUE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partStructureView);
+ containerView = ViewUtil.getChildBySemanticHint(valuePropertyView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!containerView.isVisible()) {
+ changeVisibility(containerView);
+ }
+
+ View nestedPartView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partStructureView);
+ View nestedPartStructureView = ViewUtil.getChildBySemanticHint(nestedPartView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ View subValuePropertyView = createGraphicalNode(SysMLElementTypes.VALUE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartStructureView);
+ subContainerView = ViewUtil.getChildBySemanticHint(subValuePropertyView , SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ if(subContainerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!subContainerView.isVisible()) {
+ changeVisibility(subContainerView);
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("internalblock.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("internalblock.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_IN() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_in", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_OUT() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_out", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_INOUT() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_inout", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_NA() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_na", containerView, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ createNodeFromPalette("internalblock.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("internalblock.tool.property", containerView, false);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ createNodeFromPalette("internalblock.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ createNodeFromPalette("internalblock.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("internalblock.tool.comment", containerView, true);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("internalblock.tool.constraint", containerView, false);
+ }
+
+ //////////////////////////////////////////////////
+ // test on deep nested Value compartment
+ //////////////////////////////////////////////////
+
+ @Test
+ public void createActorPartOnDeepNestedValueCompartment() throws Exception {
+ createNodeFromPalette("internalblock.tool.actorpart", subContainerView, false);
+ }
+
+ @Test
+ public void createPortOnDeepNestedValueCompartment() throws Exception {
+ createNodeFromPalette("internalblock.tool.port", subContainerView, false);
+ }
+
+ @Test
+ public void createFlowPort_INOnDeepNestedValueCompartment() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_in", subContainerView, false);
+ }
+
+ @Test
+ public void createFlowPort_OUTOnDeepNestedValueCompartment() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_out", subContainerView, false);
+ }
+
+ @Test
+ public void createFlowPort_INOUTOnDeepNestedValueCompartment() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_inout", subContainerView, false);
+ }
+
+ @Test
+ public void createFlowPort_NAOnDeepNestedValueCompartment() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_na", subContainerView, false);
+ }
+
+ @Test
+ public void createPartOnDeepNestedValueCompartment() throws Exception {
+ createNodeFromPalette("internalblock.tool.part", subContainerView, false);
+ }
+
+ @Test
+ public void createPropertyOnDeepNestedValueCompartment() throws Exception {
+ createNodeFromPalette("internalblock.tool.property", subContainerView, false);
+ }
+
+ @Test
+ public void createReferenceOnDeepNestedValueCompartment() throws Exception {
+ createNodeFromPalette("internalblock.tool.reference", subContainerView, false);
+ }
+
+ @Test
+ public void createValueOnDeepNestedValueCompartment() throws Exception {
+ createNodeFromPalette("internalblock.tool.value", subContainerView, false);
+ }
+
+ @Test
+ public void createCommentOnDeepNestedValueCompartment() throws Exception {
+ createNodeFromPalette("internalblock.tool.comment", subContainerView, true);
+ }
+
+ @Test
+ public void createConstraintOnDeepNestedValueCompartment() throws Exception {
+ createNodeFromPalette("internalblock.tool.constraint", subContainerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnPart.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnPart.java
new file mode 100755
index 0000000..5574cfa
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnPart.java
@@ -0,0 +1,111 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.node;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in a Part.
+ */
+public class TestNodeCreationOnPart extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockStructureView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+ containerView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("internalblock.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("internalblock.tool.port", containerView, true);
+ }
+
+ @Test
+ public void createFlowPort_IN() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_in", containerView, true);
+ }
+
+ @Test
+ public void createFlowPort_OUT() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_out", containerView, true);
+ }
+
+ @Test
+ public void createFlowPort_INOUT() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_inout", containerView, true);
+ }
+
+ @Test
+ public void createFlowPort_NA() throws Exception {
+ // Don't try to run command (requires user action).
+ createNodeFromPalette("internalblock.tool.flowport_na", containerView, true, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ createNodeFromPalette("internalblock.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("internalblock.tool.property", containerView, false);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ createNodeFromPalette("internalblock.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ createNodeFromPalette("internalblock.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("internalblock.tool.comment", containerView, false);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("internalblock.tool.constraint", containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnPartStructureCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnPartStructureCompartment.java
new file mode 100755
index 0000000..5338d70
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnPartStructureCompartment.java
@@ -0,0 +1,121 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.node;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.changeVisibility;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in a Part "structure" compartment.
+ */
+public class TestNodeCreationOnPartStructureCompartment extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockStructureView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+ View partView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ containerView = ViewUtil.getChildBySemanticHint(partView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!containerView.isVisible()) {
+ changeVisibility(containerView);
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ // Don't try to run command (requires user action).
+ createNodeFromPalette("internalblock.tool.actorpart", containerView, true, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("internalblock.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_IN() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_in", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_OUT() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_out", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_INOUT() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_inout", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_NA() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_na", containerView, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ // Don't try to run command (requires user action).
+ createNodeFromPalette("internalblock.tool.part", containerView, true, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("internalblock.tool.property", containerView, true);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ // Don't try to run command (requires user action).
+ createNodeFromPalette("internalblock.tool.reference", containerView, true, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ // Don't try to run command (requires user action).
+ createNodeFromPalette("internalblock.tool.value", containerView, true, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("internalblock.tool.comment", containerView, true);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("internalblock.tool.constraint", containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnProperty.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnProperty.java
new file mode 100755
index 0000000..3501f92
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnProperty.java
@@ -0,0 +1,110 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.node;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.AbstractTest;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in a Property.
+ */
+public class TestNodeCreationOnProperty extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockStructureView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+ containerView = createGraphicalNode(UMLElementTypes.PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("internalblock.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("internalblock.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_IN() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_in", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_OUT() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_out", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_INOUT() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_inout", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_NA() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_na", containerView, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ createNodeFromPalette("internalblock.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("internalblock.tool.property", containerView, false);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ createNodeFromPalette("internalblock.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ createNodeFromPalette("internalblock.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("internalblock.tool.comment", containerView, false);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("internalblock.tool.constraint", containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnPropertyStructureCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnPropertyStructureCompartment.java
new file mode 100755
index 0000000..45556e3
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnPropertyStructureCompartment.java
@@ -0,0 +1,117 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.node;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.changeVisibility;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.AbstractTest;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in a Property "structure" compartment (meaningless compartment).
+ */
+public class TestNodeCreationOnPropertyStructureCompartment extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockStructureView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+ View partView = createGraphicalNode(UMLElementTypes.PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ containerView = ViewUtil.getChildBySemanticHint(partView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!containerView.isVisible()) {
+ changeVisibility(containerView);
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("internalblock.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("internalblock.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_IN() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_in", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_OUT() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_out", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_INOUT() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_inout", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_NA() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_na", containerView, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ createNodeFromPalette("internalblock.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("internalblock.tool.property", containerView, false);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ createNodeFromPalette("internalblock.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ createNodeFromPalette("internalblock.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("internalblock.tool.comment", containerView, true);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("internalblock.tool.constraint", containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnReference.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnReference.java
new file mode 100755
index 0000000..2ef3fff
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnReference.java
@@ -0,0 +1,111 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.node;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in a Reference.
+ */
+public class TestNodeCreationOnReference extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockStructureView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+ containerView = createGraphicalNode(SysMLElementTypes.REFERENCE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("internalblock.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("internalblock.tool.port", containerView, true);
+ }
+
+ @Test
+ public void createFlowPort_IN() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_in", containerView, true);
+ }
+
+ @Test
+ public void createFlowPort_OUT() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_out", containerView, true);
+ }
+
+ @Test
+ public void createFlowPort_INOUT() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_inout", containerView, true);
+ }
+
+ @Test
+ public void createFlowPort_NA() throws Exception {
+ // Don't try to run command (requires user action).
+ createNodeFromPalette("internalblock.tool.flowport_na", containerView, true, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ createNodeFromPalette("internalblock.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("internalblock.tool.property", containerView, false);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ createNodeFromPalette("internalblock.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ createNodeFromPalette("internalblock.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("internalblock.tool.comment", containerView, false);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("internalblock.tool.constraint", containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnReferenceStructureCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnReferenceStructureCompartment.java
new file mode 100755
index 0000000..83d063e
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnReferenceStructureCompartment.java
@@ -0,0 +1,121 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.node;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.changeVisibility;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in a Reference "structure" compartment (meaningless compartment).
+ */
+public class TestNodeCreationOnReferenceStructureCompartment extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockStructureView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+ View partView = createGraphicalNode(SysMLElementTypes.REFERENCE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ containerView = ViewUtil.getChildBySemanticHint(partView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!containerView.isVisible()) {
+ changeVisibility(containerView);
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ // Don't try to run command (requires user action).
+ createNodeFromPalette("internalblock.tool.actorpart", containerView, true, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("internalblock.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_IN() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_in", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_OUT() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_out", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_INOUT() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_inout", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_NA() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_na", containerView, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ // Don't try to run command (requires user action).
+ createNodeFromPalette("internalblock.tool.part", containerView, true, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("internalblock.tool.property", containerView, true);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ // Don't try to run command (requires user action).
+ createNodeFromPalette("internalblock.tool.reference", containerView, true, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ // Don't try to run command (requires user action).
+ createNodeFromPalette("internalblock.tool.value", containerView, true, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("internalblock.tool.comment", containerView, true);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("internalblock.tool.constraint", containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnValue.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnValue.java
new file mode 100755
index 0000000..551df45
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnValue.java
@@ -0,0 +1,110 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.node;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in a Value.
+ */
+public class TestNodeCreationOnValue extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockStructureView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+ containerView = createGraphicalNode(SysMLElementTypes.VALUE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("internalblock.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("internalblock.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_IN() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_in", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_OUT() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_out", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_INOUT() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_inout", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_NA() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_na", containerView, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ createNodeFromPalette("internalblock.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("internalblock.tool.property", containerView, false);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ createNodeFromPalette("internalblock.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ createNodeFromPalette("internalblock.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("internalblock.tool.comment", containerView, false);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("internalblock.tool.constraint", containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnValueStructureCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnValueStructureCompartment.java
new file mode 100755
index 0000000..90c90b1
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/TestNodeCreationOnValueStructureCompartment.java
@@ -0,0 +1,117 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.node;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.changeVisibility;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in a Value "structure" compartment (meaningless compartment).
+ */
+public class TestNodeCreationOnValueStructureCompartment extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockStructureView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+ View partView = createGraphicalNode(SysMLElementTypes.VALUE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ containerView = ViewUtil.getChildBySemanticHint(partView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // Ensure the compartment is visible (required for EditPart to be found)
+ if(!containerView.isVisible()) {
+ changeVisibility(containerView);
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("internalblock.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("internalblock.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_IN() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_in", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_OUT() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_out", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_INOUT() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_inout", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_NA() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_na", containerView, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ createNodeFromPalette("internalblock.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("internalblock.tool.property", containerView, false);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ createNodeFromPalette("internalblock.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ createNodeFromPalette("internalblock.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("internalblock.tool.comment", containerView, true);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("internalblock.tool.constraint", containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/inherited/TestNodeCreationOnComment.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/inherited/TestNodeCreationOnComment.java
new file mode 100755
index 0000000..a86add1
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/inherited/TestNodeCreationOnComment.java
@@ -0,0 +1,106 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.node.inherited;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.internalblock.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.AbstractTest;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in a Comment (TopNode - still inherited from class diagram).
+ */
+public class TestNodeCreationOnComment extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ containerView = createGraphicalNode(UMLElementTypes.COMMENT, ElementTypes.COMMENT.getSemanticHint(), getDiagramView());
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("internalblock.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("internalblock.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_IN() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_in", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_OUT() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_out", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_INOUT() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_inout", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_NA() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_na", containerView, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ createNodeFromPalette("internalblock.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("internalblock.tool.property", containerView, false);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ createNodeFromPalette("internalblock.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ createNodeFromPalette("internalblock.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("internalblock.tool.comment", containerView, false);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("internalblock.tool.constraint", containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/inherited/TestNodeCreationOnCommentCN.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/inherited/TestNodeCreationOnCommentCN.java
new file mode 100755
index 0000000..fbf3f22
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/inherited/TestNodeCreationOnCommentCN.java
@@ -0,0 +1,111 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.node.inherited;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.AbstractTest;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in a Comment (ChildNode - still inherited from class diagram).
+ */
+public class TestNodeCreationOnCommentCN extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockCptView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+
+ containerView = createGraphicalNode(UMLElementTypes.COMMENT, ElementTypes.COMMENT_CN.getSemanticHint(), blockCptView);
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("internalblock.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("internalblock.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_IN() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_in", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_OUT() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_out", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_INOUT() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_inout", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_NA() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_na", containerView, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ createNodeFromPalette("internalblock.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("internalblock.tool.property", containerView, false);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ createNodeFromPalette("internalblock.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ createNodeFromPalette("internalblock.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("internalblock.tool.comment", containerView, false);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("internalblock.tool.constraint", containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/inherited/TestNodeCreationOnConstraint.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/inherited/TestNodeCreationOnConstraint.java
new file mode 100755
index 0000000..341d13f
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/inherited/TestNodeCreationOnConstraint.java
@@ -0,0 +1,106 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.node.inherited;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.internalblock.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.AbstractTest;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in a Constraint (TopNode - still inherited from class diagram).
+ */
+public class TestNodeCreationOnConstraint extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ containerView = createGraphicalNode(UMLElementTypes.CONSTRAINT, ElementTypes.CONSTRAINT.getSemanticHint(), getDiagramView());
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("internalblock.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("internalblock.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_IN() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_in", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_OUT() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_out", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_INOUT() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_inout", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_NA() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_na", containerView, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ createNodeFromPalette("internalblock.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("internalblock.tool.property", containerView, false);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ createNodeFromPalette("internalblock.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ createNodeFromPalette("internalblock.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("internalblock.tool.comment", containerView, false);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("internalblock.tool.constraint", containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/inherited/TestNodeCreationOnConstraintCN.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/inherited/TestNodeCreationOnConstraintCN.java
new file mode 100755
index 0000000..b89a88d
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/creation/node/inherited/TestNodeCreationOnConstraintCN.java
@@ -0,0 +1,111 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.node.inherited;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.AbstractTest;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in a Constraint (ChildNode - still inherited from class diagram).
+ */
+public class TestNodeCreationOnConstraintCN extends AbstractTest {
+
+ public static View containerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockCptView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+
+ containerView = createGraphicalNode(UMLElementTypes.CONSTRAINT, ElementTypes.CONSTRAINT_CN.getSemanticHint(), blockCptView);
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void createActorPart() throws Exception {
+ createNodeFromPalette("internalblock.tool.actorpart", containerView, false);
+ }
+
+ @Test
+ public void createPort() throws Exception {
+ createNodeFromPalette("internalblock.tool.port", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_IN() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_in", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_OUT() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_out", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_INOUT() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_inout", containerView, false);
+ }
+
+ @Test
+ public void createFlowPort_NA() throws Exception {
+ createNodeFromPalette("internalblock.tool.flowport_na", containerView, false);
+ }
+
+ @Test
+ public void createPart() throws Exception {
+ createNodeFromPalette("internalblock.tool.part", containerView, false);
+ }
+
+ @Test
+ public void createProperty() throws Exception {
+ createNodeFromPalette("internalblock.tool.property", containerView, false);
+ }
+
+ @Test
+ public void createReference() throws Exception {
+ createNodeFromPalette("internalblock.tool.reference", containerView, false);
+ }
+
+ @Test
+ public void createValue() throws Exception {
+ createNodeFromPalette("internalblock.tool.value", containerView, false);
+ }
+
+ @Test
+ public void createComment() throws Exception {
+ createNodeFromPalette("internalblock.tool.comment", containerView, false);
+ }
+
+ @Test
+ public void createConstraint() throws Exception {
+ createNodeFromPalette("internalblock.tool.constraint", containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/altdrop/DropNestedPartOnPartTest.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/altdrop/DropNestedPartOnPartTest.java
new file mode 100755
index 0000000..12baead
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/altdrop/DropNestedPartOnPartTest.java
@@ -0,0 +1,176 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation - Bug 488557
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.altdrop;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createGraphicalNode;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.requests.ChangeBoundsRequest;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.commands.wrappers.GEFtoEMFCommandWrapper;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.BlockCompositeEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.BlockPropertyStructureCompartmentEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.edit.part.StructureCompartmentEditPart;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * This allows to test the drag and drop of a nested part of part into another part.
+ * The edit parts have to stay same.
+ *
+ */
+public class DropNestedPartOnPartTest extends AbstractTest {
+
+ /**
+ * The dropped element.
+ */
+ public static EObject droppedElement;
+
+ /**
+ * The graphical edit part of the part1.
+ */
+ public static IGraphicalEditPart part1Compartment;
+
+ /**
+ * The graphical edit part of the part2.
+ */
+ public static IGraphicalEditPart part2Compartment;
+
+ /**
+ * The graphical edit part of nested part (object to drop).
+ */
+ public static IGraphicalEditPart compartmentToDrop;
+
+ /**
+ * This allows to prepare the test.
+ *
+ * @throws Exception
+ * The exception.
+ */
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ // prepare container
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockStructureView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+
+ if ((null == blockView) || (null == blockStructureView)) {
+ throw new Exception("Unable to prepare container for test."); //$NON-NLS-1$
+ }
+
+ // prepare the model
+ // Create 2 part views
+ View partView1 = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ View partStructureView1 = ViewUtil.getChildBySemanticHint(partView1, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+
+ View partView2 = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+
+ // Create the nested part
+ View nestedPartView1 = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partStructureView1);
+ if (null == nestedPartView1) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+ droppedElement = nestedPartView1.getElement();
+
+ // Try to get the correct edit parts of part1, part2 and the nested part
+ final IGraphicalEditPart diagram = EditorUtils.getDiagramEditPart();
+
+ Assert.assertTrue("The diagram edit part children must not be empty", !diagram.getChildren().isEmpty()); //$NON-NLS-1$
+ Assert.assertTrue("The first diagram edit part child must be a block composite edit part", diagram.getChildren().get(0) instanceof BlockCompositeEditPart); //$NON-NLS-1$
+ Assert.assertTrue("The block composite edit part children must not be empty", !((IGraphicalEditPart) diagram.getChildren().get(0)).getChildren().isEmpty()); //$NON-NLS-1$
+
+ for (final Object blockChild : ((IGraphicalEditPart) diagram.getChildren().get(0)).getChildren()) {
+ final IGraphicalEditPart blockChildEP = (IGraphicalEditPart) blockChild;
+ if (blockChildEP instanceof StructureCompartmentEditPart) {
+ for (final Object child : ((IGraphicalEditPart) ((IGraphicalEditPart) diagram.getChildren().get(0)).getChildren().get(1)).getChildren()) {
+ final IGraphicalEditPart childEP = (IGraphicalEditPart) child;
+ if (childEP.resolveSemanticElement().equals(partView1.getElement())) {
+ for (final Object part1Child : childEP.getChildren()) {
+ final IGraphicalEditPart part1ChildEP = (IGraphicalEditPart) part1Child;
+ if (part1ChildEP instanceof BlockPropertyStructureCompartmentEditPart) {
+ part1Compartment = part1ChildEP;
+ compartmentToDrop = (IGraphicalEditPart) part1ChildEP.getChildren().get(0);
+ }
+ }
+ } else if (childEP.resolveSemanticElement().equals(partView2.getElement())) {
+ for (final Object part2Child : childEP.getChildren()) {
+ final IGraphicalEditPart part2ChildEP = (IGraphicalEditPart) part2Child;
+ if (part2ChildEP instanceof BlockPropertyStructureCompartmentEditPart) {
+ part2Compartment = part2ChildEP;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e); //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * This allows to test the drag and drop of a nested part contained in a part into another part.
+ *
+ * @throws Exception
+ * The exception.
+ */
+ @Test
+ public void testDragAndDropNestedPartIntoPart() throws Exception {
+
+ // Check initial nested part composite edit part
+ Assert.assertNotNull("The first part compartment edit part must not be null", part1Compartment); //$NON-NLS-1$
+ Assert.assertNotNull("The second part compartment edit part must not be null", part2Compartment); //$NON-NLS-1$
+ Assert.assertNotNull("The nest part to drop must not be null", compartmentToDrop); //$NON-NLS-1$
+ Assert.assertTrue("The nested part composite edit part must have children edit part", !compartmentToDrop.getChildren().isEmpty()); //$NON-NLS-1$
+
+ // Manage a drag and drop for nestedPart from part1 to part2
+ final Request req = createDragDropRequest(compartmentToDrop);
+ final Command command = part2Compartment.getCommand(req);
+ Assert.assertNotNull("ComponentEditPart must be dropable from diagram to self semantically parent", command); //$NON-NLS-1$
+ EditorUtils.getCommandStack().execute(GEFtoEMFCommandWrapper.wrap(command));
+
+ Assert.assertTrue("The part1 structure compartement edit part must be empty", part1Compartment.getChildren().isEmpty()); //$NON-NLS-1$
+ Assert.assertTrue("The part2 structure compartement edit part must not be empty", !part2Compartment.getChildren().isEmpty()); //$NON-NLS-1$
+ // Bug 488557: The nested part have to keep its domposite edit part children after a drop into another part
+ Assert.assertTrue("The nested part composite edit part must have children edit part", !compartmentToDrop.getChildren().isEmpty()); //$NON-NLS-1$
+ }
+
+ /**
+ * This allows to create the drag and drop request to execute.
+ *
+ * @param editPart
+ * The edit part to move.
+ * @return The created request.
+ */
+ protected Request createDragDropRequest(final IGraphicalEditPart editPart) {
+ ChangeBoundsRequest result = new ChangeBoundsRequest();
+ result.setEditParts(editPart);
+ result.setLocation(new Point(1, 1));
+ result.setType(org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants.REQ_DROP);
+ return result;
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/altdrop/TestTypeDropOnBlock.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/altdrop/TestTypeDropOnBlock.java
new file mode 100755
index 0000000..d796849
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/altdrop/TestTypeDropOnBlock.java
@@ -0,0 +1,132 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.altdrop;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.altDropFromModelExplorer;
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on ActorPart.
+ */
+public class TestTypeDropOnBlock extends AbstractTest {
+
+ public static EObject containerPackage;
+
+ public static EObject droppedDataType;
+ public static EObject droppedFlowSpec;
+ public static EObject droppedActor;
+ public static EObject droppedBlock;
+
+ public static View blockView;
+ public static View blockStructureView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ // prepare container
+ blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ blockStructureView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+
+ if ((blockView == null) || (blockStructureView == null)) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // prepare container package (getDiagramView references the shown Block).
+ containerPackage = EMFCoreUtil.getContainer(getDiagramView().getElement(), UMLPackage.eINSTANCE.getPackage());
+
+ // prepare dropped element
+ droppedDataType = createElement(UMLElementTypes.DATA_TYPE, containerPackage);
+ droppedFlowSpec = createElement(SysMLElementTypes.FLOW_SPECIFICATION, containerPackage);
+ droppedActor = createElement(UMLElementTypes.ACTOR, containerPackage);
+ droppedBlock = createElement(SysMLElementTypes.BLOCK, containerPackage);
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActorOnBlock() throws Exception {
+ List<String> expectedDropNames = Arrays.asList(new String[]{"Create a new Port"});
+ altDropFromModelExplorer(droppedActor, blockView, expectedDropNames, true);
+ }
+
+ @Test
+ public void testDropActorOnBlockCpt() throws Exception {
+ List<String> expectedDropNames = Arrays.asList(new String[]{"Create a new ActorPart"});
+ altDropFromModelExplorer(droppedActor, blockStructureView, expectedDropNames, true);
+ }
+
+ @Test
+ public void testDropBlockOnBlock() throws Exception {
+ List<String> expectedDropNames = Arrays.asList(new String[]{
+ "Create a new Port",
+ "Create a new FlowPort (SysML::FlowPort)",
+ "Create a new FlowPort (SysML::FlowPort_In)",
+ "Create a new FlowPort (SysML::FlowPort_Out)"});
+ altDropFromModelExplorer(droppedBlock, blockView, expectedDropNames, true);
+ }
+
+ @Test
+ public void testDropBlockOnBlockCpt() throws Exception {
+ List<String> expectedDropNames = Arrays.asList(new String[]{"Create a new Part", "Create a new Reference"});
+ altDropFromModelExplorer(droppedBlock, blockStructureView, expectedDropNames, true);
+ }
+
+ @Test
+ public void testDropDataTypeOnBlock() throws Exception {
+ List<String> expectedDropNames = Arrays.asList(new String[]{
+ "Create a new Port",
+ "Create a new FlowPort (SysML::FlowPort)",
+ "Create a new FlowPort (SysML::FlowPort_In)",
+ "Create a new FlowPort (SysML::FlowPort_Out)"});
+ altDropFromModelExplorer(droppedDataType, blockView, expectedDropNames, true);
+ }
+
+ @Test
+ public void testDropDataTypeOnBlockCpt() throws Exception {
+ List<String> expectedDropNames = Arrays.asList(new String[]{"Create a new Value"});
+ altDropFromModelExplorer(droppedDataType, blockStructureView, expectedDropNames, true);
+ }
+
+ @Test
+ public void testDropFlowSpecOnBlock() throws Exception {
+ List<String> expectedDropNames = Arrays.asList(new String[]{
+ "Create a new Port",
+ "Create a new FlowPort (SysML::FlowPort)"});
+ altDropFromModelExplorer(droppedFlowSpec, blockView, expectedDropNames, true);
+ }
+
+ @Test
+ public void testDropFlowSpecOnBlockCpt() throws Exception {
+ List<String> expectedDropNames = Arrays.asList(new String[]{"Create a new Property"});
+ altDropFromModelExplorer(droppedFlowSpec, blockStructureView, expectedDropNames, true);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/altdrop/TestTypeDropOnTypedElement.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/altdrop/TestTypeDropOnTypedElement.java
new file mode 100755
index 0000000..1f59b18
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/altdrop/TestTypeDropOnTypedElement.java
@@ -0,0 +1,374 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.altdrop;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.altDropFromModelExplorer;
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on ActorPart.
+ */
+public class TestTypeDropOnTypedElement extends AbstractTest {
+
+ public static EObject containerPackage;
+
+ public static EObject droppedDataType;
+ public static EObject droppedFlowSpec;
+ public static EObject droppedActor;
+ public static EObject droppedBlock;
+
+ public static View actorPartView;
+ public static View partView;
+ public static View propertyView;
+ public static View referenceView;
+ public static View valueView;
+ public static View deepNestedActorPartView;
+ public static View deepNestedPartView;
+ public static View deepNestedPropertyView;
+ public static View deepNestedReferenceView;
+ public static View deepNestedValueView;
+ public static View portView;
+ public static View flowportView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ // prepare container
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockStructureView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+
+ actorPartView = createGraphicalNode(SysMLElementTypes.ACTOR_PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ partView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ propertyView = createGraphicalNode(UMLElementTypes.PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ referenceView = createGraphicalNode(SysMLElementTypes.REFERENCE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ valueView = createGraphicalNode(SysMLElementTypes.VALUE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+
+ View partViewContainer = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ View partStructureViewContainer = ViewUtil.getChildBySemanticHint(partViewContainer, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+
+ nestedActorPartView = createGraphicalNode(SysMLElementTypes.ACTOR_PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partStructureViewContainer);
+ nestedPartView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partStructureViewContainer);
+ nestedPropertyView = createGraphicalNode(UMLElementTypes.PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partStructureViewContainer);
+ nestedReferenceView = createGraphicalNode(SysMLElementTypes.REFERENCE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partStructureViewContainer);
+ nestedValueView = createGraphicalNode(SysMLElementTypes.VALUE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partStructureViewContainer);
+
+ View nestedPartStructureViewContainer = ViewUtil.getChildBySemanticHint(nestedPartView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ Assert.assertNotNull("Impossible to find the view container for deep nested parts", nestedPartStructureViewContainer);
+
+ deepNestedActorPartView = createGraphicalNode(SysMLElementTypes.ACTOR_PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartStructureViewContainer);
+ deepNestedPartView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartStructureViewContainer);
+ deepNestedPropertyView = createGraphicalNode(UMLElementTypes.PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartStructureViewContainer);
+ deepNestedReferenceView = createGraphicalNode(SysMLElementTypes.REFERENCE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartStructureViewContainer);
+ deepNestedValueView = createGraphicalNode(SysMLElementTypes.VALUE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartStructureViewContainer);
+
+ portView = createGraphicalNode(UMLElementTypes.PORT, UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID, blockView);
+ flowportView = createGraphicalNode(SysMLElementTypes.FLOW_PORT, SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID, blockView);
+
+ if ((actorPartView == null) || (partView == null) || (propertyView == null) || (referenceView == null) || (valueView == null)
+ || (nestedActorPartView == null) || (nestedPartView == null) || (nestedPropertyView == null) || (nestedReferenceView == null) || (nestedValueView == null)
+ || (portView == null) || (flowportView == null)
+ || (deepNestedActorPartView == null) || (deepNestedPartView == null) || (deepNestedPropertyView == null) || (deepNestedReferenceView == null) || (deepNestedValueView == null)) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // prepare container package (getDiagramView references the shown Block).
+ containerPackage = EMFCoreUtil.getContainer(getDiagramView().getElement(), UMLPackage.eINSTANCE.getPackage());
+ // prepare dropped element
+ droppedDataType = createElement(UMLElementTypes.DATA_TYPE, containerPackage);
+ droppedFlowSpec = createElement(SysMLElementTypes.FLOW_SPECIFICATION, containerPackage);
+ droppedActor = createElement(UMLElementTypes.ACTOR, containerPackage);
+ droppedBlock = createElement(SysMLElementTypes.BLOCK, containerPackage);
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ public static View nestedActorPartView;
+
+ public static View nestedPartView;
+
+ public static View nestedPropertyView;
+
+ public static View nestedReferenceView;
+
+ public static View nestedValueView;
+
+ @Test
+ public void testDropTypeOnActorPart() throws Exception {
+ List<String> expectedDropNames = Arrays.asList(new String[]{"Set a new Type"});
+ altDropFromModelExplorer(droppedDataType, actorPartView, expectedDropNames, true);
+ }
+
+ @Test
+ public void testDropTypeOnPart() throws Exception {
+ List<String> expectedDropNames = Arrays.asList(new String[]{
+ "Set a new Type",
+ "Create a new Port",
+ "Create a new FlowPort (SysML::FlowPort)",
+ "Create a new FlowPort (SysML::FlowPort_In)",
+ "Create a new FlowPort (SysML::FlowPort_Out)"});
+ altDropFromModelExplorer(droppedDataType, partView, expectedDropNames, true);
+ }
+
+ @Test
+ public void testDropTypeOnProperty() throws Exception {
+ List<String> expectedDropNames = Arrays.asList(new String[]{"Set a new Type"});
+ altDropFromModelExplorer(droppedDataType, propertyView, expectedDropNames, true);
+ }
+
+ @Test
+ public void testDropTypeOnReference() throws Exception {
+ List<String> expectedDropNames = Arrays.asList(new String[]{
+ "Set a new Type",
+ "Create a new Port",
+ "Create a new FlowPort (SysML::FlowPort)",
+ "Create a new FlowPort (SysML::FlowPort_In)",
+ "Create a new FlowPort (SysML::FlowPort_Out)"});
+ altDropFromModelExplorer(droppedDataType, referenceView, expectedDropNames, true);
+ }
+
+ @Test
+ public void testDropTypeOnValue() throws Exception {
+ List<String> expectedDropNames = Arrays.asList(new String[]{"Set a new Type"});
+ altDropFromModelExplorer(droppedDataType, valueView, expectedDropNames, true);
+ }
+
+ @Test
+ public void testDropTypeOnNestedActorPart() throws Exception {
+ List<String> expectedDropNames = Arrays.asList(new String[]{"Set a new Type"});
+ altDropFromModelExplorer(droppedDataType, nestedActorPartView, expectedDropNames, true);
+ }
+
+ @Test
+ public void testDropTypeOnNestedPart() throws Exception {
+ List<String> expectedDropNames = Arrays.asList(new String[]{
+ "Set a new Type",
+ "Create a new Port",
+ "Create a new FlowPort (SysML::FlowPort)",
+ "Create a new FlowPort (SysML::FlowPort_In)",
+ "Create a new FlowPort (SysML::FlowPort_Out)"});
+ altDropFromModelExplorer(droppedDataType, nestedPartView, expectedDropNames, true);
+ }
+
+ @Test
+ public void testDropTypeOnNestedProperty() throws Exception {
+ List<String> expectedDropNames = Arrays.asList(new String[]{"Set a new Type"});
+ altDropFromModelExplorer(droppedDataType, nestedPropertyView, expectedDropNames, true);
+ }
+
+ @Test
+ public void testDropTypeOnNestedReference() throws Exception {
+ List<String> expectedDropNames = Arrays.asList(new String[]{
+ "Set a new Type",
+ "Create a new Port",
+ "Create a new FlowPort (SysML::FlowPort)",
+ "Create a new FlowPort (SysML::FlowPort_In)",
+ "Create a new FlowPort (SysML::FlowPort_Out)"});
+ altDropFromModelExplorer(droppedDataType, nestedReferenceView, expectedDropNames, true);
+ }
+
+ @Test
+ public void testDropTypeOnNestedValue() throws Exception {
+ List<String> expectedDropNames = Arrays.asList(new String[]{"Set a new Type"});
+ altDropFromModelExplorer(droppedDataType, nestedValueView, expectedDropNames, true);
+ }
+
+ @Test
+ public void testDropFlowSpecOnPart() throws Exception {
+ List<String> expectedDropNames = Arrays.asList(new String[]{
+ "Set a new Type",
+ "Create a new Port",
+ "Create a new FlowPort (SysML::FlowPort)"});
+ altDropFromModelExplorer(droppedFlowSpec, partView, expectedDropNames, true);
+ }
+
+ @Test
+ public void testDropFlowSpecOnReference() throws Exception {
+ List<String> expectedDropNames = Arrays.asList(new String[]{
+ "Set a new Type",
+ "Create a new Port",
+ "Create a new FlowPort (SysML::FlowPort)"});
+ altDropFromModelExplorer(droppedFlowSpec, referenceView, expectedDropNames, true);
+ }
+
+ @Test
+ public void testDropFlowSpecOnNestedPart() throws Exception {
+ List<String> expectedDropNames = Arrays.asList(new String[]{
+ "Set a new Type",
+ "Create a new Port",
+ "Create a new FlowPort (SysML::FlowPort)"});
+ altDropFromModelExplorer(droppedFlowSpec, nestedPartView, expectedDropNames, true);
+ }
+
+ @Test
+ public void testDropFlowSpecOnNestedReference() throws Exception {
+ List<String> expectedDropNames = Arrays.asList(new String[]{
+ "Set a new Type",
+ "Create a new Port",
+ "Create a new FlowPort (SysML::FlowPort)"});
+ altDropFromModelExplorer(droppedFlowSpec, nestedReferenceView, expectedDropNames, true);
+ }
+
+ @Test
+ public void testDropActorOnPart() throws Exception {
+ List<String> expectedDropNames = Arrays.asList(new String[]{
+ "Set a new Type",
+ "Create a new Port"});
+ altDropFromModelExplorer(droppedActor, partView, expectedDropNames, true);
+ }
+
+ @Test
+ public void testDropActorOnReference() throws Exception {
+ List<String> expectedDropNames = Arrays.asList(new String[]{
+ "Set a new Type",
+ "Create a new Port"});
+ altDropFromModelExplorer(droppedActor, referenceView, expectedDropNames, true);
+ }
+
+ @Test
+ public void testDropActorOnNestedPart() throws Exception {
+ List<String> expectedDropNames = Arrays.asList(new String[]{
+ "Set a new Type",
+ "Create a new Port"});
+ altDropFromModelExplorer(droppedActor, nestedPartView, expectedDropNames, true);
+ }
+
+ @Test
+ public void testDropActorOnNestedReference() throws Exception {
+ List<String> expectedDropNames = Arrays.asList(new String[]{
+ "Set a new Type",
+ "Create a new Port"});
+ altDropFromModelExplorer(droppedActor, nestedReferenceView, expectedDropNames, true);
+ }
+
+ @Test
+ public void testDropBlockOnProperty() throws Exception {
+ // Specific test for Block drop because it is supposed to create the related Association
+ List<String> expectedDropNames = Arrays.asList(new String[]{"Set a new Type"});
+ altDropFromModelExplorer(droppedBlock, propertyView, expectedDropNames, true);
+ }
+
+ @Test
+ public void testDropBlockOnNestedProperty() throws Exception {
+ // Specific test for Block drop because it is supposed to create the related Association
+ List<String> expectedDropNames = Arrays.asList(new String[]{"Set a new Type"});
+ altDropFromModelExplorer(droppedBlock, nestedPropertyView, expectedDropNames, true);
+ }
+
+ @Test
+ public void testDropTypeOnPort() throws Exception {
+ List<String> expectedDropNames = Arrays.asList(new String[]{"Set a new Type"});
+ altDropFromModelExplorer(droppedDataType, portView, expectedDropNames, true);
+ }
+
+ @Test
+ public void testDropTypeOnFlowPort() throws Exception {
+ List<String> expectedDropNames = Arrays.asList(new String[]{"Set a new Type"});
+ altDropFromModelExplorer(droppedDataType, flowportView, expectedDropNames, true);
+ }
+
+ @Test
+ public void testDropActorOnDeepNestedPart() throws Exception {
+ List<String> expectedDropNames = Arrays.asList(new String[]{
+ "Set a new Type",
+ "Create a new Port"});
+ altDropFromModelExplorer(droppedActor, deepNestedPartView, expectedDropNames, true);
+ }
+
+ @Test
+ public void testDropActorOnDeepNestedReference() throws Exception {
+ List<String> expectedDropNames = Arrays.asList(new String[]{
+ "Set a new Type",
+ "Create a new Port"});
+ altDropFromModelExplorer(droppedActor, deepNestedReferenceView, expectedDropNames, true);
+ }
+
+ @Test
+ public void testDropBlockOnDeepNestedProperty() throws Exception {
+ // Specific test for Block drop because it is supposed to create the related Association
+ List<String> expectedDropNames = Arrays.asList(new String[]{"Set a new Type"});
+ altDropFromModelExplorer(droppedBlock, deepNestedPropertyView, expectedDropNames, true);
+ EditorUtils.getDiagramCommandStack().undo();
+ }
+
+ @Test
+ public void testDropFlowSpecOnDeepNestedReference() throws Exception {
+ List<String> expectedDropNames = Arrays.asList(new String[]{
+ "Set a new Type",
+ "Create a new Port",
+ "Create a new FlowPort (SysML::FlowPort)"});
+ altDropFromModelExplorer(droppedFlowSpec, deepNestedReferenceView, expectedDropNames, true);
+ }
+
+ @Test
+ public void testDropTypeOnDeepNestedActorPart() throws Exception {
+ List<String> expectedDropNames = Arrays.asList(new String[]{"Set a new Type"});
+ altDropFromModelExplorer(droppedDataType, deepNestedActorPartView, expectedDropNames, true);
+ }
+
+ @Test
+ public void testDropTypeOnDeepNestedPart() throws Exception {
+ List<String> expectedDropNames = Arrays.asList(new String[]{
+ "Set a new Type",
+ "Create a new Port",
+ "Create a new FlowPort (SysML::FlowPort)",
+ "Create a new FlowPort (SysML::FlowPort_In)",
+ "Create a new FlowPort (SysML::FlowPort_Out)"});
+ altDropFromModelExplorer(droppedDataType, deepNestedPartView, expectedDropNames, true);
+ }
+
+ @Test
+ public void testDropTypeOnDeepNestedProperty() throws Exception {
+ List<String> expectedDropNames = Arrays.asList(new String[]{"Set a new Type"});
+ altDropFromModelExplorer(droppedDataType, deepNestedPropertyView, expectedDropNames, true);
+ }
+
+ @Test
+ public void testDropTypeOnDeepNestedReference() throws Exception {
+ List<String> expectedDropNames = Arrays.asList(new String[]{
+ "Set a new Type",
+ "Create a new Port",
+ "Create a new FlowPort (SysML::FlowPort)",
+ "Create a new FlowPort (SysML::FlowPort_In)",
+ "Create a new FlowPort (SysML::FlowPort_Out)"});
+ altDropFromModelExplorer(droppedDataType, deepNestedReferenceView, expectedDropNames, true);
+ }
+
+ @Test
+ public void testDropTypeOnDeepNestedValue() throws Exception {
+ List<String> expectedDropNames = Arrays.asList(new String[]{"Set a new Type"});
+ altDropFromModelExplorer(droppedDataType, deepNestedValueView, expectedDropNames, true);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/altdrop/TestTypeDropOnTypedElementCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/altdrop/TestTypeDropOnTypedElementCompartment.java
new file mode 100755
index 0000000..d221104
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/altdrop/TestTypeDropOnTypedElementCompartment.java
@@ -0,0 +1,288 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.altdrop;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.altDropFromModelExplorer;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on ActorPart.
+ */
+public class TestTypeDropOnTypedElementCompartment extends AbstractTest {
+
+ public static EObject containerPackage;
+
+ public static EObject droppedDataType;
+ public static EObject droppedActor;
+ public static EObject droppedBlock;
+
+ public static View actorPartCptView;
+ public static View partCptView;
+ public static View propertyCptView;
+ public static View referenceCptView;
+ public static View valueCptView;
+
+ public static View nestedActorPartCptView;
+ public static View nestedPartCptView;
+ public static View nestedPropertyCptView;
+ public static View nestedReferenceCptView;
+ public static View nestedValueCptView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ // prepare container
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockStructureView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+
+ View actorPartView = createGraphicalNode(SysMLElementTypes.ACTOR_PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ actorPartCptView = ViewUtil.getChildBySemanticHint(actorPartView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ View partView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ partCptView = ViewUtil.getChildBySemanticHint(partView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ View propertyView = createGraphicalNode(UMLElementTypes.PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ propertyCptView = ViewUtil.getChildBySemanticHint(propertyView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ View referenceView = createGraphicalNode(SysMLElementTypes.REFERENCE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ referenceCptView = ViewUtil.getChildBySemanticHint(referenceView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ View valueView = createGraphicalNode(SysMLElementTypes.VALUE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ valueCptView = ViewUtil.getChildBySemanticHint(valueView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+
+ if ((actorPartCptView == null) || (partCptView == null) || (propertyCptView == null) || (referenceCptView == null) || (valueCptView == null)) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ View nestedActorPartView = createGraphicalNode(SysMLElementTypes.ACTOR_PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partCptView);
+ nestedActorPartCptView = ViewUtil.getChildBySemanticHint(nestedActorPartView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ View nestedPartView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partCptView);
+ nestedPartCptView = ViewUtil.getChildBySemanticHint(nestedPartView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ View nestedPropertyView = createGraphicalNode(UMLElementTypes.PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partCptView);
+ nestedPropertyCptView = ViewUtil.getChildBySemanticHint(nestedPropertyView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ View nestedReferenceView = createGraphicalNode(SysMLElementTypes.REFERENCE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partCptView);
+ nestedReferenceCptView = ViewUtil.getChildBySemanticHint(nestedReferenceView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ View nestedValueView = createGraphicalNode(SysMLElementTypes.VALUE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partCptView);
+ nestedValueCptView = ViewUtil.getChildBySemanticHint(nestedValueView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+
+ if ((nestedActorPartCptView == null) || (nestedPartCptView == null) || (nestedPropertyCptView == null) || (nestedReferenceCptView == null) || (nestedValueCptView == null)) {
+ throw new Exception("Unable to prepare nested container for test.");
+ }
+
+ // prepare container package (getDiagramView references the shown Block).
+ containerPackage = EMFCoreUtil.getContainer(getDiagramView().getElement(), UMLPackage.eINSTANCE.getPackage());
+ // prepare dropped element
+ droppedDataType = createElement(UMLElementTypes.DATA_TYPE, containerPackage);
+ droppedActor = createElement(UMLElementTypes.ACTOR, containerPackage);
+ droppedBlock = createElement(SysMLElementTypes.BLOCK, containerPackage);
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropTypeOnActorPartCpt() throws Exception {
+ List<String> expectedDropNames = Collections.emptyList();
+ altDropFromModelExplorer(droppedDataType, actorPartCptView, expectedDropNames, false);
+ }
+
+ @Test
+ public void testDropTypeOnPartCpt() throws Exception {
+ List<String> expectedDropNames = Arrays.asList(new String[]{"Create a new Value"});
+ altDropFromModelExplorer(droppedDataType, partCptView, expectedDropNames, true);
+ }
+
+ @Test
+ public void testDropTypeOnPropertyCpt() throws Exception {
+ List<String> expectedDropNames = Collections.emptyList();
+ altDropFromModelExplorer(droppedDataType, propertyCptView, expectedDropNames, false);
+ }
+
+ @Test
+ public void testDropTypeOnReferenceCpt() throws Exception {
+ List<String> expectedDropNames = Arrays.asList(new String[]{"Create a new Value"});
+ altDropFromModelExplorer(droppedDataType, referenceCptView, expectedDropNames, true);
+ }
+
+ @Test
+ public void testDropTypeOnValueCpt() throws Exception {
+ List<String> expectedDropNames = Collections.emptyList();
+ altDropFromModelExplorer(droppedDataType, valueCptView, expectedDropNames, false);
+ }
+
+ @Test
+ public void testDropActorOnActorPartCpt() throws Exception {
+ List<String> expectedDropNames = Collections.emptyList();
+ altDropFromModelExplorer(droppedActor, actorPartCptView, expectedDropNames, false);
+ }
+
+ @Test
+ public void testDropActorOnPartCpt() throws Exception {
+ List<String> expectedDropNames = Arrays.asList(new String[]{"Create a new ActorPart"});
+ altDropFromModelExplorer(droppedActor, partCptView, expectedDropNames, true);
+ }
+
+ @Test
+ public void testDropActorOnPropertyCpt() throws Exception {
+ List<String> expectedDropNames = Collections.emptyList();
+ altDropFromModelExplorer(droppedActor, propertyCptView, expectedDropNames, false);
+ }
+
+ @Test
+ public void testDropActorOnReferenceCpt() throws Exception {
+ List<String> expectedDropNames = Arrays.asList(new String[]{"Create a new ActorPart"});
+ altDropFromModelExplorer(droppedActor, referenceCptView, expectedDropNames, true);
+ }
+
+ @Test
+ public void testDropActorOnValueCpt() throws Exception {
+ List<String> expectedDropNames = Collections.emptyList();
+ altDropFromModelExplorer(droppedActor, valueCptView, expectedDropNames, false);
+ }
+
+ @Test
+ public void testDropBlockOnActorPartCpt() throws Exception {
+ List<String> expectedDropNames = Collections.emptyList();
+ altDropFromModelExplorer(droppedBlock, actorPartCptView, expectedDropNames, false);
+ }
+
+ @Test
+ public void testDropBlockOnPartCpt() throws Exception {
+ List<String> expectedDropNames = Arrays.asList(new String[]{"Create a new Part", "Create a new Reference"});
+ altDropFromModelExplorer(droppedBlock, partCptView, expectedDropNames, true);
+ }
+
+ @Test
+ public void testDropBlockOnPropertyCpt() throws Exception {
+ List<String> expectedDropNames = Collections.emptyList();
+ altDropFromModelExplorer(droppedBlock, propertyCptView, expectedDropNames, false);
+ }
+
+ @Test
+ public void testDropBlockOnReferenceCpt() throws Exception {
+ List<String> expectedDropNames = Arrays.asList(new String[]{"Create a new Part", "Create a new Reference"});
+ altDropFromModelExplorer(droppedBlock, referenceCptView, expectedDropNames, true);
+ }
+
+ @Test
+ public void testDropBlockOnValueCpt() throws Exception {
+ List<String> expectedDropNames = Collections.emptyList();
+ altDropFromModelExplorer(droppedBlock, valueCptView, expectedDropNames, false);
+ }
+
+ @Test
+ public void testDropActorOnNestedActorPartCpt() throws Exception {
+ List<String> expectedDropNames = Collections.emptyList();
+ altDropFromModelExplorer(droppedActor, actorPartCptView, expectedDropNames, false);
+ }
+
+ @Test
+ public void testDropActorOnNestedPartCpt() throws Exception {
+ List<String> expectedDropNames = Arrays.asList(new String[]{"Create a new ActorPart"});
+ altDropFromModelExplorer(droppedActor, partCptView, expectedDropNames, true);
+ }
+
+ @Test
+ public void testDropActorOnNestedPropertyCpt() throws Exception {
+ List<String> expectedDropNames = Collections.emptyList();
+ altDropFromModelExplorer(droppedActor, propertyCptView, expectedDropNames, false);
+ }
+
+ @Test
+ public void testDropActorOnNestedReferenceCpt() throws Exception {
+ List<String> expectedDropNames = Arrays.asList(new String[]{"Create a new ActorPart"});
+ altDropFromModelExplorer(droppedActor, referenceCptView, expectedDropNames, true);
+ }
+
+ @Test
+ public void testDropActorOnNestedValueCpt() throws Exception {
+ List<String> expectedDropNames = Collections.emptyList();
+ altDropFromModelExplorer(droppedActor, valueCptView, expectedDropNames, false);
+ }
+
+ @Test
+ public void testDropBlockOnNestedActorPartCpt() throws Exception {
+ List<String> expectedDropNames = Collections.emptyList();
+ altDropFromModelExplorer(droppedBlock, actorPartCptView, expectedDropNames, false);
+ }
+
+ @Test
+ public void testDropBlockOnNestedPartCpt() throws Exception {
+ List<String> expectedDropNames = Arrays.asList(new String[]{"Create a new Part", "Create a new Reference"});
+ altDropFromModelExplorer(droppedBlock, partCptView, expectedDropNames, true);
+ }
+
+ @Test
+ public void testDropBlockOnNestedPropertyCpt() throws Exception {
+ List<String> expectedDropNames = Collections.emptyList();
+ altDropFromModelExplorer(droppedBlock, propertyCptView, expectedDropNames, false);
+ }
+
+ @Test
+ public void testDropBlockOnNestedReferenceCpt() throws Exception {
+ List<String> expectedDropNames = Arrays.asList(new String[]{"Create a new Part", "Create a new Reference"});
+ altDropFromModelExplorer(droppedBlock, referenceCptView, expectedDropNames, true);
+ }
+
+ @Test
+ public void testDropBlockOnNestedValueCpt() throws Exception {
+ List<String> expectedDropNames = Collections.emptyList();
+ altDropFromModelExplorer(droppedBlock, valueCptView, expectedDropNames, false);
+ }
+
+ @Test
+ public void testDropTypeOnNestedActorPartCpt() throws Exception {
+ List<String> expectedDropNames = Collections.emptyList();
+ altDropFromModelExplorer(droppedDataType, actorPartCptView, expectedDropNames, false);
+ }
+
+ @Test
+ public void testDropTypeOnNestedPartCpt() throws Exception {
+ List<String> expectedDropNames = Arrays.asList(new String[]{"Create a new Value"});
+ altDropFromModelExplorer(droppedDataType, partCptView, expectedDropNames, true);
+ }
+
+ @Test
+ public void testDropTypeOnNestedPropertyCpt() throws Exception {
+ List<String> expectedDropNames = Collections.emptyList();
+ altDropFromModelExplorer(droppedDataType, propertyCptView, expectedDropNames, false);
+ }
+
+ @Test
+ public void testDropTypeOnNestedReferenceCpt() throws Exception {
+ List<String> expectedDropNames = Arrays.asList(new String[]{"Create a new Value"});
+ altDropFromModelExplorer(droppedDataType, referenceCptView, expectedDropNames, true);
+ }
+
+ @Test
+ public void testDropTypeOnNestedValueCpt() throws Exception {
+ List<String> expectedDropNames = Collections.emptyList();
+ altDropFromModelExplorer(droppedDataType, valueCptView, expectedDropNames, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/inherited/TestNodeDropOnComment.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/inherited/TestNodeDropOnComment.java
new file mode 100755
index 0000000..165a71c
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/inherited/TestNodeDropOnComment.java
@@ -0,0 +1,138 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.inherited;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.internalblock.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on Comment.
+ */
+public class TestNodeDropOnComment extends AbstractTest {
+
+ public static View containerView;
+
+ public static EObject containerPackage;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ containerView = createGraphicalNode(UMLElementTypes.COMMENT, ElementTypes.COMMENT.getSemanticHint(), getDiagramView());
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // prepare container package (getDiagramView references the shown Block).
+ containerPackage = EMFCoreUtil.getContainer(getDiagramView().getElement(), UMLPackage.eINSTANCE.getPackage());
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_IN() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_OUT() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_OUT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_INOUT() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN_OUT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_NA() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_NA, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, containerPackage);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, containerPackage);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/inherited/TestNodeDropOnCommentCN.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/inherited/TestNodeDropOnCommentCN.java
new file mode 100755
index 0000000..e433ef4
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/inherited/TestNodeDropOnCommentCN.java
@@ -0,0 +1,143 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.inherited;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on Comment Child node.
+ */
+public class TestNodeDropOnCommentCN extends AbstractTest {
+
+ public static View containerView;
+
+ public static EObject containerPackage;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockCptView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+
+ containerView = createGraphicalNode(UMLElementTypes.COMMENT, ElementTypes.COMMENT_CN.getSemanticHint(), blockCptView);
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // prepare container package (getDiagramView references the shown Block).
+ containerPackage = EMFCoreUtil.getContainer(getDiagramView().getElement(), UMLPackage.eINSTANCE.getPackage());
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_IN() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_OUT() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_OUT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_INOUT() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN_OUT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_NA() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_NA, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, containerPackage);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, containerPackage);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/inherited/TestNodeDropOnConstraint.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/inherited/TestNodeDropOnConstraint.java
new file mode 100755
index 0000000..efc23dc
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/inherited/TestNodeDropOnConstraint.java
@@ -0,0 +1,138 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.inherited;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.internalblock.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on Constraint.
+ */
+public class TestNodeDropOnConstraint extends AbstractTest {
+
+ public static View containerView;
+
+ public static EObject containerPackage;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ containerView = createGraphicalNode(UMLElementTypes.CONSTRAINT, ElementTypes.CONSTRAINT.getSemanticHint(), getDiagramView());
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // prepare container package (getDiagramView references the shown Block).
+ containerPackage = EMFCoreUtil.getContainer(getDiagramView().getElement(), UMLPackage.eINSTANCE.getPackage());
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_IN() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_OUT() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_OUT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_INOUT() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN_OUT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_NA() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_NA, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, containerPackage);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, containerPackage);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/inherited/TestNodeDropOnConstraintCN.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/inherited/TestNodeDropOnConstraintCN.java
new file mode 100755
index 0000000..6521be2
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/inherited/TestNodeDropOnConstraintCN.java
@@ -0,0 +1,143 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.inherited;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on Constraint Child node.
+ */
+public class TestNodeDropOnConstraintCN extends AbstractTest {
+
+ public static View containerView;
+
+ public static EObject containerPackage;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockCptView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+
+ containerView = createGraphicalNode(UMLElementTypes.CONSTRAINT, ElementTypes.CONSTRAINT_CN.getSemanticHint(), blockCptView);
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // prepare container package (getDiagramView references the shown Block).
+ containerPackage = EMFCoreUtil.getContainer(getDiagramView().getElement(), UMLPackage.eINSTANCE.getPackage());
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_IN() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_OUT() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_OUT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_INOUT() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN_OUT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_NA() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_NA, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, containerPackage);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, containerPackage);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/link/TestLinkDropOnBlockPropertyStructureCpt.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/link/TestLinkDropOnBlockPropertyStructureCpt.java
new file mode 100755
index 0000000..276bbf5
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/link/TestLinkDropOnBlockPropertyStructureCpt.java
@@ -0,0 +1,121 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.link;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createConnectorLink;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createLink;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.dropFromModelExplorer;
+import junit.framework.Assert;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.uml2.uml.ConnectableElement;
+import org.eclipse.uml2.uml.Connector;
+import org.eclipse.uml2.uml.ConnectorKind;
+import org.eclipse.uml2.uml.EncapsulatedClassifier;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for Link DnD tests (via palette tools).
+ */
+public class TestLinkDropOnBlockPropertyStructureCpt extends AbstractTest {
+
+ public static EObject dependency;
+ public static EObject connector;
+
+
+ public static EObject nestedDependency;
+ public static EObject nestedConnector;
+ public static EObject delegationNestedConnector;
+ public static EObject crossNestedConnector;
+
+ public static View blockStructureView;
+ public static View partStructureView;
+ public static View sourcePartStructureView;
+
+
+
+
+ @BeforeClass
+ public static void prepare() throws Exception {
+
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ blockStructureView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+
+ View partView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ partStructureView = ViewUtil.getChildBySemanticHint(partView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+
+ View partSourceView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partStructureView);
+ View portOnPartSourceView = createGraphicalNode(UMLElementTypes.PORT, (EObject)partSourceView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()), UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID, partSourceView);
+ View partTargetView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partStructureView);
+
+ sourcePartStructureView = ViewUtil.getChildBySemanticHint(partView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ View nestedPartSourceView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, sourcePartStructureView);
+
+ View nestedPartTargetViewInPartSourceView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, sourcePartStructureView);
+
+ dependency = createLink(UMLElementTypes.DEPENDENCY, partSourceView.getElement(), partTargetView.getElement());
+ connector = createConnectorLink((EncapsulatedClassifier) blockView.getElement(), (ConnectableElement)partSourceView.getElement(), (Property)null, (ConnectableElement)partTargetView.getElement(), (Property)null);
+
+ nestedDependency = createLink(UMLElementTypes.DEPENDENCY, nestedPartSourceView.getElement(), nestedPartTargetViewInPartSourceView.getElement());
+ nestedConnector = createConnectorLink((EncapsulatedClassifier) ((Property)partSourceView.getElement()).getType(), (ConnectableElement)nestedPartSourceView.getElement(), (Property)null, (ConnectableElement)nestedPartTargetViewInPartSourceView.getElement(), (Property)null);
+ delegationNestedConnector = createConnectorLink((EncapsulatedClassifier) blockView.getElement(), (ConnectableElement)portOnPartSourceView.getElement(), (Property)null, (ConnectableElement)nestedPartTargetViewInPartSourceView.getElement(), (Property)null);
+ Assert.assertEquals("Connector should be a delegation connector", ConnectorKind.DELEGATION_LITERAL, ((Connector)delegationNestedConnector).getKind()); // be sure that we really test drop of a delegation connector
+
+ crossNestedConnector = createConnectorLink((EncapsulatedClassifier) blockView.getElement(), (ConnectableElement)nestedPartSourceView.getElement(), (Property)null, (ConnectableElement)partTargetView.getElement(), (Property)null);
+ Assert.assertEquals("Connector should be a assembly connector", ConnectorKind.ASSEMBLY_LITERAL, ((Connector)crossNestedConnector).getKind()); // be sure that we really test drop of an assembly connector
+
+ }
+
+ @Test
+ public void dropDependencyInBlock() throws Exception {
+ dropFromModelExplorer(dependency, partStructureView, true);
+ }
+
+ @Test
+ public void dropConnectorInBlock() throws Exception {
+ dropFromModelExplorer(connector, partStructureView, true);
+ }
+
+ @Test
+ public void dropNestedDependencyInPart() throws Exception {
+ dropFromModelExplorer(nestedDependency, sourcePartStructureView, true);
+ }
+
+ @Test
+ public void dropNestedConnectorInPart() throws Exception {
+ dropFromModelExplorer(nestedConnector, sourcePartStructureView, true);
+ }
+
+ @Test
+ public void dropDelegationNestedConnectorInBlock() throws Exception {
+ dropFromModelExplorer(delegationNestedConnector, partStructureView, true);
+ }
+
+ @Test
+ public void dropAssemblyNestedConnectorInBlock() throws Exception {
+ dropFromModelExplorer(crossNestedConnector, partStructureView, true);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/link/TestLinkDropOnBlockStructureCpt.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/link/TestLinkDropOnBlockStructureCpt.java
new file mode 100755
index 0000000..bcab975
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/link/TestLinkDropOnBlockStructureCpt.java
@@ -0,0 +1,111 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2015 CEA LIST, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus - bug 470296
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.link;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getTransactionalEditingDomain;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createConnectorLink;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createLink;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.dropFromModelExplorer;
+
+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.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.emf.gmf.command.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.infra.services.edit.utils.GMFCommandUtils;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.uml2.uml.AggregationKind;
+import org.eclipse.uml2.uml.Association;
+import org.eclipse.uml2.uml.ConnectableElement;
+import org.eclipse.uml2.uml.EncapsulatedClassifier;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Type;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for Link DnD tests (via palette tools).
+ */
+public class TestLinkDropOnBlockStructureCpt extends AbstractTest {
+
+ public static EObject dependency;
+ public static EObject connector;
+ public static EObject association;
+
+ public static View blockStructureView;
+
+ @BeforeClass
+ public static void prepare() throws Exception {
+
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ blockStructureView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+
+ View partSourceView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ View partTargetView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+
+ dependency = createLink(UMLElementTypes.DEPENDENCY, partSourceView.getElement(), partTargetView.getElement());
+ connector = createConnectorLink((EncapsulatedClassifier) blockView.getElement(), (ConnectableElement) partSourceView.getElement(), (Property) null, (ConnectableElement) partTargetView.getElement(), (Property) null);
+
+ org.eclipse.uml2.uml.Class block = (org.eclipse.uml2.uml.Class) blockView.getElement();
+ association = createAssociation(block, block);
+ }
+
+ @Test
+ public void dropDependencyInBlock() throws Exception {
+ dropFromModelExplorer(dependency, blockStructureView, true);
+ }
+
+ @Test
+ public void dropConnectorInBlock() throws Exception {
+ dropFromModelExplorer(connector, blockStructureView, true);
+ }
+
+ @Test
+ public void dropAssociationInBlock() throws Exception {
+ dropFromModelExplorer(association, blockStructureView, false);
+ }
+
+ //
+ // Test framework
+ //
+
+ static EObject createAssociation(final Type end1, final Type end2) throws Exception {
+
+ AbstractTransactionalCommand createConnectorCommand = new AbstractTransactionalCommand(getTransactionalEditingDomain(), "Create association", null) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ Association result = end1.createAssociation(true, AggregationKind.NONE_LITERAL, null, 0, 1, end2,
+ true, AggregationKind.NONE_LITERAL, null, 0, 1);
+
+ return CommandResult.newOKCommandResult(result);
+ }
+
+ };
+
+ getTransactionalEditingDomain().getCommandStack().execute(new GMFtoEMFCommandWrapper(createConnectorCommand));
+
+ return GMFCommandUtils.getCommandEObjectResult(createConnectorCommand);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/link/TestLinkDropOnDiagram.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/link/TestLinkDropOnDiagram.java
new file mode 100755
index 0000000..7f04f44
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/link/TestLinkDropOnDiagram.java
@@ -0,0 +1,49 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.link;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createLink;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.AbstractTest;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for Link DnD tests (via palette tools).
+ */
+public class TestLinkDropOnDiagram extends AbstractTest {
+
+ public static EObject constraintTarget;
+ public static EObject dependency;
+
+ @BeforeClass
+ public static void prepare() throws Exception {
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ constraintTarget = createElement(UMLElementTypes.CONSTRAINT, getDiagramView());
+ dependency = createLink(UMLElementTypes.DEPENDENCY, blockView.getElement(), constraintTarget);
+ }
+
+ @Test
+ public void dropDependencyInDiagram() throws Exception {
+ dropFromModelExplorer(dependency, getDiagramView(), true);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnActorPart.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnActorPart.java
new file mode 100755
index 0000000..0694b54
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnActorPart.java
@@ -0,0 +1,147 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.node;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on ActorPart.
+ */
+public class TestNodeDropOnActorPart extends AbstractTest {
+
+ public static View containerView;
+
+ public static EObject containerPackage;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ // prepare container
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockStructureView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+ containerView = createGraphicalNode(SysMLElementTypes.ACTOR_PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // prepare container package (getDiagramView references the shown Block).
+ containerPackage = EMFCoreUtil.getContainer(getDiagramView().getElement(), UMLPackage.eINSTANCE.getPackage());
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_IN() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK,containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_OUT() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_OUT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_INOUT() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN_OUT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_NA() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_NA, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, containerPackage);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropCommentContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.COMMENT, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, containerPackage);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnActorPartStructureCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnActorPartStructureCompartment.java
new file mode 100755
index 0000000..1f2b075
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnActorPartStructureCompartment.java
@@ -0,0 +1,148 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.node;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on Block structure compartment.
+ */
+public class TestNodeDropOnActorPartStructureCompartment extends AbstractTest {
+
+ public static View containerView;
+
+ public static EObject containerPackage;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ // prepare container
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockStructureView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+ View partView = createGraphicalNode(SysMLElementTypes.ACTOR_PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ containerView = ViewUtil.getChildBySemanticHint(partView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // prepare container package (getDiagramView references the shown Block).
+ containerPackage = EMFCoreUtil.getContainer(getDiagramView().getElement(), UMLPackage.eINSTANCE.getPackage());
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_IN() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_OUT() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_OUT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_INOUT() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN_OUT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_NA() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_NA, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, containerPackage);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropCommentContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.COMMENT, containerView, true);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, containerPackage);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnBlock.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnBlock.java
new file mode 100755
index 0000000..5f29012
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnBlock.java
@@ -0,0 +1,199 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.node;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on Block.
+ */
+public class TestNodeDropOnBlock extends AbstractTest {
+
+ public static View containerView;
+
+ public static EObject containerPackage;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ // prepare container
+ containerView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // prepare container package (getDiagramView references the shown Block).
+ containerPackage = EMFCoreUtil.getContainer(getDiagramView().getElement(), UMLPackage.eINSTANCE.getPackage());
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropActorPartContained() throws Exception {
+ dropFromModelExplorer(SysMLElementTypes.ACTOR_PART_PROPERTY, containerView, false);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPortContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.PORT, containerView, true);
+ }
+
+ @Test
+ public void testDropFlowPort_IN() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK,containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_INContained() throws Exception {
+ dropFromModelExplorer(SysMLElementTypes.FLOW_PORT_IN, containerView, true);
+ }
+
+ @Test
+ public void testDropFlowPort_OUT() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_OUT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_OUTContained() throws Exception {
+ dropFromModelExplorer(SysMLElementTypes.FLOW_PORT_OUT, containerView, true);
+ }
+
+ @Test
+ public void testDropFlowPort_INOUT() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN_OUT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_INOUTContained() throws Exception {
+ dropFromModelExplorer(SysMLElementTypes.FLOW_PORT_IN_OUT, containerView, true);
+ }
+
+ @Test
+ public void testDropFlowPort_NA() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_NA, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_NAContained() throws Exception {
+ dropFromModelExplorer(SysMLElementTypes.FLOW_PORT_NA, containerView, true);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPartContained() throws Exception {
+ dropFromModelExplorer(SysMLElementTypes.PART_PROPERTY, containerView, false);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPropertyContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.PROPERTY, containerView, false);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReferenceContained() throws Exception {
+ dropFromModelExplorer(SysMLElementTypes.REFERENCE_PROPERTY, containerView, false);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueContained() throws Exception {
+ dropFromModelExplorer(SysMLElementTypes.VALUE_PROPERTY, containerView, false);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, containerPackage);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropCommentContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.COMMENT, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, containerPackage);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.CONSTRAINT, containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnBlockStructureCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnBlockStructureCompartment.java
new file mode 100755
index 0000000..f62607f
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnBlockStructureCompartment.java
@@ -0,0 +1,200 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.node;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on Block structure compartment.
+ */
+public class TestNodeDropOnBlockStructureCompartment extends AbstractTest {
+
+ public static View containerView;
+
+ public static EObject containerPackage;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ // prepare container
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ containerView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // prepare container package (getDiagramView references the shown Block).
+ containerPackage = EMFCoreUtil.getContainer(getDiagramView().getElement(), UMLPackage.eINSTANCE.getPackage());
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropActorPartContained() throws Exception {
+ dropFromModelExplorer(SysMLElementTypes.ACTOR_PART_PROPERTY, containerView, true);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPortContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.PORT, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_IN() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_INContained() throws Exception {
+ dropFromModelExplorer(SysMLElementTypes.FLOW_PORT_IN, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_OUT() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_OUT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_OUTContained() throws Exception {
+ dropFromModelExplorer(SysMLElementTypes.FLOW_PORT_OUT, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_INOUT() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN_OUT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_INOUTContained() throws Exception {
+ dropFromModelExplorer(SysMLElementTypes.FLOW_PORT_IN_OUT, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_NA() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_NA, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_NAContained() throws Exception {
+ dropFromModelExplorer(SysMLElementTypes.FLOW_PORT_NA, containerView, false);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPartContained() throws Exception {
+ dropFromModelExplorer(SysMLElementTypes.PART_PROPERTY, containerView, true);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPropertyContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.PROPERTY, containerView, true);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReferenceContained() throws Exception {
+ dropFromModelExplorer(SysMLElementTypes.REFERENCE_PROPERTY, containerView, true);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueContained() throws Exception {
+ dropFromModelExplorer(SysMLElementTypes.VALUE_PROPERTY, containerView, true);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, containerPackage);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropCommentContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.COMMENT, containerView, true);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, containerPackage);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraintContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.CONSTRAINT, containerView, true);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnDiagram.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnDiagram.java
new file mode 100755
index 0000000..df7bd6c
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnDiagram.java
@@ -0,0 +1,115 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.node;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) in diagram.
+ */
+public class TestNodeDropOnDiagram extends AbstractTest {
+
+ @Test
+ public void testDropBlockInDiagram() throws Exception {
+ dropFromModelExplorer(SysMLElementTypes.BLOCK, getDiagramView(), false);
+ }
+
+ @Test
+ public void testDropActorPartInDiagram() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, getDiagramView(), false);
+ }
+
+ @Test
+ public void testDropPortInDiagram() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, getDiagramView(), false);
+ }
+
+ @Test
+ public void testDropFlowPort_IN_InDiagram() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN, intermediateContainer);
+ dropFromModelExplorer(droppedElement, getDiagramView(), false);
+ }
+
+ @Test
+ public void testDropFlowPort_OUT_InDiagram() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_OUT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, getDiagramView(), false);
+ }
+
+ @Test
+ public void testDropFlowPort_INOUT_InDiagram() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN_OUT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, getDiagramView(), false);
+ }
+
+ @Test
+ public void testDropFlowPort_NA_InDiagram() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_NA, intermediateContainer);
+ dropFromModelExplorer(droppedElement, getDiagramView(), false);
+ }
+
+ @Test
+ public void testDropPartInDiagram() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, getDiagramView(), false);
+ }
+
+ @Test
+ public void testDropPropertyInDiagram() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, getDiagramView(), false);
+ }
+
+ @Test
+ public void testDropReferenceInDiagram() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, getDiagramView(), false);
+ }
+
+ @Test
+ public void testDropValueInDiagram() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, getDiagramView());
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, getDiagramView(), false);
+ }
+
+ @Test
+ public void testDropCommentInDiagram() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.COMMENT, getDiagramView(), true);
+ }
+
+ @Test
+ public void testDropConstraintInDiagram() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.CONSTRAINT, getDiagramView(), true);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnNestedActorPart.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnNestedActorPart.java
new file mode 100755
index 0000000..5256bc5
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnNestedActorPart.java
@@ -0,0 +1,149 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.node;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on "nested" ActorPart.
+ */
+public class TestNodeDropOnNestedActorPart extends AbstractTest {
+
+ public static View containerView;
+
+ public static EObject containerPackage;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ // prepare container
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockStructureView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+ View partView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ View partStructureView = ViewUtil.getChildBySemanticHint(partView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ containerView = createGraphicalNode(SysMLElementTypes.ACTOR_PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partStructureView);
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // prepare container package (getDiagramView references the shown Block).
+ containerPackage = EMFCoreUtil.getContainer(getDiagramView().getElement(), UMLPackage.eINSTANCE.getPackage());
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_IN() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK,containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_OUT() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_OUT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_INOUT() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN_OUT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_NA() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_NA, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, containerPackage);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropCommentContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.COMMENT, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, containerPackage);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnNestedActorPartStructureCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnNestedActorPartStructureCompartment.java
new file mode 100755
index 0000000..647f11e
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnNestedActorPartStructureCompartment.java
@@ -0,0 +1,154 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.node;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on Block structure compartment.
+ */
+public class TestNodeDropOnNestedActorPartStructureCompartment extends AbstractTest {
+
+ public static View containerView;
+
+ public static EObject containerPackage;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ // prepare container
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockStructureView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+ View partView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ View partContainerView = ViewUtil.getChildBySemanticHint(partView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ if(partContainerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ View nestedPartView = createGraphicalNode(SysMLElementTypes.ACTOR_PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partContainerView);
+ containerView = ViewUtil.getChildBySemanticHint(nestedPartView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ if(containerView == null) {
+ throw new Exception("Unable to prepare nested container for test.");
+ }
+
+ // prepare container package (getDiagramView references the shown Block).
+ containerPackage = EMFCoreUtil.getContainer(getDiagramView().getElement(), UMLPackage.eINSTANCE.getPackage());
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_IN() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_OUT() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_OUT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_INOUT() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN_OUT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_NA() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_NA, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, containerPackage);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropCommentContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.COMMENT, containerView, true);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, containerPackage);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnNestedPart.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnNestedPart.java
new file mode 100755
index 0000000..6e1e8b2
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnNestedPart.java
@@ -0,0 +1,209 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.node;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on "nested" Part.
+ */
+public class TestNodeDropOnNestedPart extends AbstractTest {
+
+ public static View containerView;
+
+ public static EObject containerPackage;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ // prepare container
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockStructureView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+ View partView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ View partStructureView = ViewUtil.getChildBySemanticHint(partView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ containerView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partStructureView);
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // prepare container package (getDiagramView references the shown Block).
+ containerPackage = EMFCoreUtil.getContainer(getDiagramView().getElement(), UMLPackage.eINSTANCE.getPackage());
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropActorPartContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPortContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PORT, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropFlowPort_IN() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK,containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_INContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropFlowPort_OUT() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_OUT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_OUTContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_OUT, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropFlowPort_INOUT() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN_OUT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_INOUTContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN_OUT, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropFlowPort_NA() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_NA, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_NAContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_NA, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPartContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPropertyContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReferenceContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, containerPackage);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropCommentContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.COMMENT, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, containerPackage);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnNestedPartStructureCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnNestedPartStructureCompartment.java
new file mode 100755
index 0000000..74f9c8c
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnNestedPartStructureCompartment.java
@@ -0,0 +1,213 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.node;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on Part structure compartment.
+ */
+public class TestNodeDropOnNestedPartStructureCompartment extends AbstractTest {
+
+ public static View containerView;
+
+ public static EObject containerPackage;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockStructureView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+ View partView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ View partContainerView = ViewUtil.getChildBySemanticHint(partView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ if(partContainerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ View nestedPartView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partContainerView);
+ containerView = ViewUtil.getChildBySemanticHint(nestedPartView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ if(containerView == null) {
+ throw new Exception("Unable to prepare nested container for test.");
+ }
+
+ // prepare container package (getDiagramView references the shown Block).
+ containerPackage = EMFCoreUtil.getContainer(getDiagramView().getElement(), UMLPackage.eINSTANCE.getPackage());
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropActorPartContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPortContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PORT, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_IN() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_INContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_OUT() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_OUT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_OUTContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_OUT, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_INOUT() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN_OUT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_INOUTContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN_OUT, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_NA() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_NA, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_NAContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_NA, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPartContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPropertyContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReferenceContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, containerPackage);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropCommentContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.COMMENT, containerView, true);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, containerPackage);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnNestedProperty.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnNestedProperty.java
new file mode 100755
index 0000000..1246028
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnNestedProperty.java
@@ -0,0 +1,149 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.node;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on "nested" Property.
+ */
+public class TestNodeDropOnNestedProperty extends AbstractTest {
+
+ public static View containerView;
+
+ public static EObject containerPackage;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ // prepare container
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockStructureView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+ View partView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ View partStructureView = ViewUtil.getChildBySemanticHint(partView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ containerView = createGraphicalNode(UMLElementTypes.PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partStructureView);
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // prepare container package (getDiagramView references the shown Block).
+ containerPackage = EMFCoreUtil.getContainer(getDiagramView().getElement(), UMLPackage.eINSTANCE.getPackage());
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_IN() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK,containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_OUT() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_OUT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_INOUT() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN_OUT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_NA() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_NA, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, containerPackage);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropCommentContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.COMMENT, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, containerPackage);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnNestedPropertyStructureCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnNestedPropertyStructureCompartment.java
new file mode 100755
index 0000000..b6263de
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnNestedPropertyStructureCompartment.java
@@ -0,0 +1,153 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.node;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on Property structure compartment.
+ */
+public class TestNodeDropOnNestedPropertyStructureCompartment extends AbstractTest {
+
+ public static View containerView;
+
+ public static EObject containerPackage;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockStructureView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+ View partView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ View partContainerView = ViewUtil.getChildBySemanticHint(partView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ if(partContainerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ View nestedPartView = createGraphicalNode(UMLElementTypes.PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partContainerView);
+ containerView = ViewUtil.getChildBySemanticHint(nestedPartView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ if(containerView == null) {
+ throw new Exception("Unable to prepare nested container for test.");
+ }
+
+ // prepare container package (getDiagramView references the shown Block).
+ containerPackage = EMFCoreUtil.getContainer(getDiagramView().getElement(), UMLPackage.eINSTANCE.getPackage());
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_IN() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_OUT() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_OUT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_INOUT() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN_OUT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_NA() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_NA, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, containerPackage);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropCommentContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.COMMENT, containerView, true);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, containerPackage);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnNestedReference.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnNestedReference.java
new file mode 100755
index 0000000..3c6081f
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnNestedReference.java
@@ -0,0 +1,209 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.node;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on "nested" Reference.
+ */
+public class TestNodeDropOnNestedReference extends AbstractTest {
+
+ public static View containerView;
+
+ public static EObject containerPackage;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ // prepare container
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockStructureView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+ View partView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ View partStructureView = ViewUtil.getChildBySemanticHint(partView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ containerView = createGraphicalNode(SysMLElementTypes.REFERENCE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partStructureView);
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // prepare container package (getDiagramView references the shown Block).
+ containerPackage = EMFCoreUtil.getContainer(getDiagramView().getElement(), UMLPackage.eINSTANCE.getPackage());
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropActorPartContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPortContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PORT, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropFlowPort_IN() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK,containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_INContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropFlowPort_OUT() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_OUT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_OUTContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_OUT, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropFlowPort_INOUT() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN_OUT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_INOUTContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN_OUT, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropFlowPort_NA() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_NA, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_NAContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_NA, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPartContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPropertyContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReferenceContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, containerPackage);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropCommentContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.COMMENT, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, containerPackage);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnNestedReferenceStructureCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnNestedReferenceStructureCompartment.java
new file mode 100755
index 0000000..8980004
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnNestedReferenceStructureCompartment.java
@@ -0,0 +1,213 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.node;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on Reference structure compartment.
+ */
+public class TestNodeDropOnNestedReferenceStructureCompartment extends AbstractTest {
+
+ public static View containerView;
+
+ public static EObject containerPackage;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockStructureView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+ View partView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ View partContainerView = ViewUtil.getChildBySemanticHint(partView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ if(partContainerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ View nestedPartView = createGraphicalNode(SysMLElementTypes.REFERENCE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partContainerView);
+ containerView = ViewUtil.getChildBySemanticHint(nestedPartView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ if(containerView == null) {
+ throw new Exception("Unable to prepare nested container for test.");
+ }
+
+ // prepare container package (getDiagramView references the shown Block).
+ containerPackage = EMFCoreUtil.getContainer(getDiagramView().getElement(), UMLPackage.eINSTANCE.getPackage());
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropActorPartContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPortContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PORT, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_IN() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_INContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_OUT() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_OUT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_OUTContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_OUT, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_INOUT() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN_OUT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_INOUTContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN_OUT, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_NA() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_NA, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_NAContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_NA, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPartContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPropertyContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReferenceContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, containerPackage);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropCommentContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.COMMENT, containerView, true);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, containerPackage);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnNestedValue.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnNestedValue.java
new file mode 100755
index 0000000..a33fed7
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnNestedValue.java
@@ -0,0 +1,149 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.node;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on "nested" Value.
+ */
+public class TestNodeDropOnNestedValue extends AbstractTest {
+
+ public static View containerView;
+
+ public static EObject containerPackage;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ // prepare container
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockStructureView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+ View partView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ View partStructureView = ViewUtil.getChildBySemanticHint(partView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ containerView = createGraphicalNode(SysMLElementTypes.VALUE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partStructureView);
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // prepare container package (getDiagramView references the shown Block).
+ containerPackage = EMFCoreUtil.getContainer(getDiagramView().getElement(), UMLPackage.eINSTANCE.getPackage());
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_IN() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK,containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_OUT() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_OUT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_INOUT() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN_OUT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_NA() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_NA, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, containerPackage);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropCommentContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.COMMENT, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, containerPackage);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnNestedValueStructureCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnNestedValueStructureCompartment.java
new file mode 100755
index 0000000..5f5b359
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnNestedValueStructureCompartment.java
@@ -0,0 +1,153 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.node;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on Value structure compartment.
+ */
+public class TestNodeDropOnNestedValueStructureCompartment extends AbstractTest {
+
+ public static View containerView;
+
+ public static EObject containerPackage;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockStructureView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+ View partView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ View partContainerView = ViewUtil.getChildBySemanticHint(partView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ if(partContainerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ View nestedPartView = createGraphicalNode(SysMLElementTypes.VALUE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partContainerView);
+ containerView = ViewUtil.getChildBySemanticHint(nestedPartView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ if(containerView == null) {
+ throw new Exception("Unable to prepare nested container for test.");
+ }
+
+ // prepare container package (getDiagramView references the shown Block).
+ containerPackage = EMFCoreUtil.getContainer(getDiagramView().getElement(), UMLPackage.eINSTANCE.getPackage());
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_IN() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_OUT() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_OUT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_INOUT() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN_OUT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_NA() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_NA, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, containerPackage);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropCommentContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.COMMENT, containerView, true);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, containerPackage);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnPart.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnPart.java
new file mode 100755
index 0000000..02f43bf
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnPart.java
@@ -0,0 +1,207 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.node;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on Part.
+ */
+public class TestNodeDropOnPart extends AbstractTest {
+
+ public static View containerView;
+
+ public static EObject containerPackage;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ // prepare container
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockStructureView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+ containerView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // prepare container package (getDiagramView references the shown Block).
+ containerPackage = EMFCoreUtil.getContainer(getDiagramView().getElement(), UMLPackage.eINSTANCE.getPackage());
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropActorPartContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPortContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PORT, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropFlowPort_IN() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK,containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_INContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropFlowPort_OUT() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_OUT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_OUTContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_OUT, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropFlowPort_INOUT() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN_OUT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_INOUTContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN_OUT, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropFlowPort_NA() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_NA, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_NAContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_NA, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPartContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPropertyContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReferenceContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, containerPackage);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropCommentContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.COMMENT, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, containerPackage);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnPartStructureCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnPartStructureCompartment.java
new file mode 100755
index 0000000..adda350
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnPartStructureCompartment.java
@@ -0,0 +1,208 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.node;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on Part structure compartment.
+ */
+public class TestNodeDropOnPartStructureCompartment extends AbstractTest {
+
+ public static View containerView;
+
+ public static EObject containerPackage;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ // prepare container
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockStructureView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+ View partView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ containerView = ViewUtil.getChildBySemanticHint(partView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // prepare container package (getDiagramView references the shown Block).
+ containerPackage = EMFCoreUtil.getContainer(getDiagramView().getElement(), UMLPackage.eINSTANCE.getPackage());
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropActorPartContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPortContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PORT, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_IN() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_INContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_OUT() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_OUT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_OUTContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_OUT, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_INOUT() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN_OUT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_INOUTContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN_OUT, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_NA() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_NA, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_NAContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_NA, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPartContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPropertyContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReferenceContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, containerPackage);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropCommentContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.COMMENT, containerView, true);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, containerPackage);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnProperty.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnProperty.java
new file mode 100755
index 0000000..a916e78
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnProperty.java
@@ -0,0 +1,147 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.node;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on Property.
+ */
+public class TestNodeDropOnProperty extends AbstractTest {
+
+ public static View containerView;
+
+ public static EObject containerPackage;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ // prepare container
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockStructureView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+ containerView = createGraphicalNode(UMLElementTypes.PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // prepare container package (getDiagramView references the shown Block).
+ containerPackage = EMFCoreUtil.getContainer(getDiagramView().getElement(), UMLPackage.eINSTANCE.getPackage());
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_IN() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK,containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_OUT() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_OUT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_INOUT() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN_OUT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_NA() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_NA, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, containerPackage);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropCommentContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.COMMENT, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, containerPackage);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnPropertyStructureCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnPropertyStructureCompartment.java
new file mode 100755
index 0000000..c2b322a
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnPropertyStructureCompartment.java
@@ -0,0 +1,148 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.node;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on Property structure compartment.
+ */
+public class TestNodeDropOnPropertyStructureCompartment extends AbstractTest {
+
+ public static View containerView;
+
+ public static EObject containerPackage;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ // prepare container
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockStructureView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+ View partView = createGraphicalNode(UMLElementTypes.PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ containerView = ViewUtil.getChildBySemanticHint(partView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // prepare container package (getDiagramView references the shown Block).
+ containerPackage = EMFCoreUtil.getContainer(getDiagramView().getElement(), UMLPackage.eINSTANCE.getPackage());
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_IN() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_OUT() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_OUT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_INOUT() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN_OUT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_NA() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_NA, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, containerPackage);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropCommentContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.COMMENT, containerView, true);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, containerPackage);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnReference.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnReference.java
new file mode 100755
index 0000000..4dcf16e
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnReference.java
@@ -0,0 +1,207 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.node;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on Reference.
+ */
+public class TestNodeDropOnReference extends AbstractTest {
+
+ public static View containerView;
+
+ public static EObject containerPackage;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ // prepare container
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockStructureView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+ containerView = createGraphicalNode(SysMLElementTypes.REFERENCE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // prepare container package (getDiagramView references the shown Block).
+ containerPackage = EMFCoreUtil.getContainer(getDiagramView().getElement(), UMLPackage.eINSTANCE.getPackage());
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropActorPartContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPortContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PORT, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropFlowPort_IN() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK,containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_INContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropFlowPort_OUT() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_OUT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_OUTContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_OUT, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropFlowPort_INOUT() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN_OUT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_INOUTContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN_OUT, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropFlowPort_NA() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_NA, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_NAContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_NA, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPartContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPropertyContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReferenceContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, containerPackage);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropCommentContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.COMMENT, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, containerPackage);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnReferenceStructureCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnReferenceStructureCompartment.java
new file mode 100755
index 0000000..c412c8a
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnReferenceStructureCompartment.java
@@ -0,0 +1,208 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.node;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on Reference structure compartment.
+ */
+public class TestNodeDropOnReferenceStructureCompartment extends AbstractTest {
+
+ public static View containerView;
+
+ public static EObject containerPackage;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ // prepare container
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockStructureView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+ View partView = createGraphicalNode(SysMLElementTypes.REFERENCE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ containerView = ViewUtil.getChildBySemanticHint(partView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // prepare container package (getDiagramView references the shown Block).
+ containerPackage = EMFCoreUtil.getContainer(getDiagramView().getElement(), UMLPackage.eINSTANCE.getPackage());
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropActorPartContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPortContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PORT, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_IN() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_INContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_OUT() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_OUT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_OUTContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_OUT, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_INOUT() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN_OUT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_INOUTContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN_OUT, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_NA() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_NA, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_NAContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_NA, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPartContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPropertyContained() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReferenceContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValueContained() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, (EObject)containerView.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ dropFromModelExplorer(droppedElement, containerView, true);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, containerPackage);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropCommentContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.COMMENT, containerView, true);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, containerPackage);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnValue.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnValue.java
new file mode 100755
index 0000000..a257b61
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnValue.java
@@ -0,0 +1,147 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.node;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on Value.
+ */
+public class TestNodeDropOnValue extends AbstractTest {
+
+ public static View containerView;
+
+ public static EObject containerPackage;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ // prepare container
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockStructureView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+ containerView = createGraphicalNode(SysMLElementTypes.VALUE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // prepare container package (getDiagramView references the shown Block).
+ containerPackage = EMFCoreUtil.getContainer(getDiagramView().getElement(), UMLPackage.eINSTANCE.getPackage());
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_IN() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK,containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_OUT() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_OUT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_INOUT() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN_OUT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_NA() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_NA, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, containerPackage);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropCommentContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.COMMENT, containerView, false);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, containerPackage);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnValueStructureCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnValueStructureCompartment.java
new file mode 100755
index 0000000..b8dbf55
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/dnd/node/TestNodeDropOnValueStructureCompartment.java
@@ -0,0 +1,148 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.node;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on Value structure compartment.
+ */
+public class TestNodeDropOnValueStructureCompartment extends AbstractTest {
+
+ public static View containerView;
+
+ public static EObject containerPackage;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ // prepare container
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockStructureView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+ View partView = createGraphicalNode(SysMLElementTypes.VALUE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ containerView = ViewUtil.getChildBySemanticHint(partView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // prepare container package (getDiagramView references the shown Block).
+ containerPackage = EMFCoreUtil.getContainer(getDiagramView().getElement(), UMLPackage.eINSTANCE.getPackage());
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropActorPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.ACTOR_PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPort() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(UMLElementTypes.PORT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_IN() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_OUT() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_OUT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_INOUT() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_IN_OUT, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropFlowPort_NA() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.FLOW_PORT_NA, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropPart() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.PART_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropProperty() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(UMLElementTypes.PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropReference() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.REFERENCE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropValue() throws Exception {
+ EObject intermediateContainer = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ EObject droppedElement = createElement(SysMLElementTypes.VALUE_PROPERTY, intermediateContainer);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropComment() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.COMMENT, containerPackage);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+
+ @Test
+ public void testDropCommentContained() throws Exception {
+ dropFromModelExplorer(UMLElementTypes.COMMENT, containerView, true);
+ }
+
+ @Test
+ public void testDropConstraint() throws Exception {
+ EObject droppedElement = createElement(UMLElementTypes.CONSTRAINT, containerPackage);
+ dropFromModelExplorer(droppedElement, containerView, false);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/reorient/AbstractLinkPrepareTest.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/reorient/AbstractLinkPrepareTest.java
new file mode 100755
index 0000000..b13566a
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/reorient/AbstractLinkPrepareTest.java
@@ -0,0 +1,157 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.reorient;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createGraphicalNode;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.AbstractTest;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for link re-orient test.
+ */
+public abstract class AbstractLinkPrepareTest extends AbstractTest {
+
+ // Custom nodes
+ public static View blockSourceView, blockTargetView;
+
+ // Custom child label nodes
+ public static View actorPartSourceView, actorPartTargetView;
+ public static View nestedActorPartSourceView, nestedActorPartTargetView;
+ public static View portOnBlockSourceView, portOnBlockTargetView;
+ public static View portOnPartSourceView, portOnPartTargetView;
+ public static View portOnNestedPartSourceView, portOnNestedPartTargetView;
+ public static View flowportOnBlockSourceView, flowportOnBlockTargetView;
+ public static View flowportOnPartSourceView, flowportOnPartTargetView;
+ public static View flowportOnNestedPartSourceView, flowportOnNestedPartTargetView;
+ public static View partSourceView, partTargetView;
+ public static View nestedPartSourceView, nestedPartTargetView;
+ public static View propertySourceView, propertyTargetView;
+ public static View nestedPropertySourceView, nestedPropertyTargetView;
+ public static View referenceSourceView, referenceTargetView;
+ public static View nestedReferenceSourceView, nestedReferenceTargetView;
+ public static View valueSourceView, valueTargetView;
+ public static View nestedValueSourceView, nestedValueTargetView;
+ public static View subNestedPartContainer1SourceView, subNestedPartContainer1TargetView, subNestedPartContainer2SourceView, subNestedPartContainer2TargetView;
+
+ // Inherited nodes
+ public static View commentSourceView, commentTargetView, commentCNSourceView, commentCNTargetView;
+ public static View constraintSourceView, constraintTargetView, constraintCNSourceView, constraintCNTargetView;
+
+ public static View partContainer1, partContainer2; // Its type block may be set encapsulated for testing purpose.
+ public static View nestedPartContainer1, nestedPartContainer2;
+
+ public static final Map<View, Boolean> isReorientAllowed = new HashMap<View, Boolean>();
+
+
+ @BeforeClass
+ public static void initializeReorientAllowedMap() {
+ houseKeeper.cleanUpLater(isReorientAllowed);
+ }
+
+ @BeforeClass
+ public static void prepareInheritedNodes() throws Exception {
+ View container = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View containerCpt = ViewUtil.getChildBySemanticHint(container, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+
+ // Prepare elements for link creation tests
+ commentSourceView = createGraphicalNode(UMLElementTypes.COMMENT, ElementTypes.COMMENT.getSemanticHint(), getDiagramView());
+ commentTargetView = createGraphicalNode(UMLElementTypes.COMMENT, ElementTypes.COMMENT.getSemanticHint(), getDiagramView());
+ commentCNSourceView = createGraphicalNode(UMLElementTypes.COMMENT, ElementTypes.COMMENT_CN.getSemanticHint(), containerCpt);
+ commentCNTargetView = createGraphicalNode(UMLElementTypes.COMMENT, ElementTypes.COMMENT_CN.getSemanticHint(), containerCpt);
+
+ constraintSourceView = createGraphicalNode(UMLElementTypes.CONSTRAINT, ElementTypes.CONSTRAINT.getSemanticHint(), getDiagramView());
+ constraintTargetView = createGraphicalNode(UMLElementTypes.CONSTRAINT, ElementTypes.CONSTRAINT.getSemanticHint(), getDiagramView());
+ constraintCNSourceView = createGraphicalNode(UMLElementTypes.CONSTRAINT, ElementTypes.CONSTRAINT_CN.getSemanticHint(), containerCpt);
+ constraintCNTargetView = createGraphicalNode(UMLElementTypes.CONSTRAINT, ElementTypes.CONSTRAINT_CN.getSemanticHint(), containerCpt);
+ }
+
+ @BeforeClass
+ public static void prepareCustomNodes() throws Exception {
+ View container = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockStructureView = ViewUtil.getChildBySemanticHint(container, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+ partContainer1 = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ View partStructureView = ViewUtil.getChildBySemanticHint(partContainer1, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ partContainer2 = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ nestedPartContainer1 = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partStructureView);
+ View nestedPartContainer1StructureView = ViewUtil.getChildBySemanticHint(nestedPartContainer1, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ nestedPartContainer2 = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partStructureView);
+ View nestedPartContainer2StructureView = ViewUtil.getChildBySemanticHint(nestedPartContainer1, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+
+ // Prepare elements for link creation tests
+
+ blockSourceView = container;
+ blockTargetView = container;
+
+ // Prepare child nodes
+
+ actorPartSourceView = createGraphicalNode(SysMLElementTypes.ACTOR_PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ actorPartTargetView = createGraphicalNode(SysMLElementTypes.ACTOR_PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ nestedActorPartSourceView = createGraphicalNode(SysMLElementTypes.ACTOR_PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partStructureView);
+ nestedActorPartTargetView = createGraphicalNode(SysMLElementTypes.ACTOR_PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partStructureView);
+
+ // Port & FlowPorts no distinction made on FlowPorts kind...
+ portOnBlockSourceView = createGraphicalNode(UMLElementTypes.PORT, UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID, container);
+ portOnBlockTargetView = createGraphicalNode(UMLElementTypes.PORT, UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID, container);
+ portOnPartSourceView = createGraphicalNode(UMLElementTypes.PORT, (EObject)partContainer1.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()), UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID, partContainer1);
+ portOnPartTargetView = createGraphicalNode(UMLElementTypes.PORT, (EObject)partContainer2.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()), UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID, partContainer2);
+ portOnNestedPartSourceView = createGraphicalNode(UMLElementTypes.PORT, (EObject)nestedPartContainer1.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()), UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID, nestedPartContainer1);
+ portOnNestedPartTargetView = createGraphicalNode(UMLElementTypes.PORT, (EObject)nestedPartContainer2.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()), UMLGraphicalTypes.SHAPE_UML_PORT_AS_AFFIXED_ID, nestedPartContainer2);
+
+ flowportOnBlockSourceView = createGraphicalNode(SysMLElementTypes.FLOW_PORT, SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID, container);
+ flowportOnBlockTargetView = createGraphicalNode(SysMLElementTypes.FLOW_PORT, SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID, container);
+ flowportOnPartSourceView = createGraphicalNode(SysMLElementTypes.FLOW_PORT, (EObject)partContainer1.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()), SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID, partContainer1);
+ flowportOnPartTargetView = createGraphicalNode(SysMLElementTypes.FLOW_PORT, (EObject)partContainer2.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()), SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID, partContainer2);
+ flowportOnNestedPartSourceView = createGraphicalNode(SysMLElementTypes.FLOW_PORT, (EObject)nestedPartContainer1.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()), SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID, nestedPartContainer1);
+ flowportOnNestedPartTargetView = createGraphicalNode(SysMLElementTypes.FLOW_PORT, (EObject)nestedPartContainer2.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()), SysMLGraphicalTypes.SHAPE_SYSML_FLOWPORT_AS_AFFIXED_ID, nestedPartContainer2);
+
+ partSourceView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ partTargetView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ nestedPartSourceView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partStructureView);
+ nestedPartTargetView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partStructureView);
+ subNestedPartContainer1SourceView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartContainer1StructureView);
+ subNestedPartContainer1TargetView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartContainer1StructureView);
+ subNestedPartContainer2SourceView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartContainer2StructureView);
+ subNestedPartContainer2TargetView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartContainer2StructureView);
+
+ propertySourceView = createGraphicalNode(UMLElementTypes.PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ propertyTargetView = createGraphicalNode(UMLElementTypes.PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ nestedPropertySourceView = createGraphicalNode(UMLElementTypes.PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partStructureView);
+ nestedPropertyTargetView = createGraphicalNode(UMLElementTypes.PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partStructureView);
+
+ referenceSourceView = createGraphicalNode(SysMLElementTypes.REFERENCE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ referenceTargetView = createGraphicalNode(SysMLElementTypes.REFERENCE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ nestedReferenceSourceView = createGraphicalNode(SysMLElementTypes.REFERENCE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partStructureView);
+ nestedReferenceTargetView = createGraphicalNode(SysMLElementTypes.REFERENCE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partStructureView);
+
+ valueSourceView = createGraphicalNode(SysMLElementTypes.VALUE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ valueTargetView = createGraphicalNode(SysMLElementTypes.VALUE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ nestedValueSourceView = createGraphicalNode(SysMLElementTypes.VALUE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partStructureView);
+ nestedValueTargetView = createGraphicalNode(SysMLElementTypes.VALUE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partStructureView);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/reorient/AbstractLinkReorientSourceTest.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/reorient/AbstractLinkReorientSourceTest.java
new file mode 100755
index 0000000..c20796e
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/reorient/AbstractLinkReorientSourceTest.java
@@ -0,0 +1,160 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.reorient;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.reorientRelationshipSource;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils;
+import org.junit.Test;
+
+/**
+ * JUnit tests for Link re-orient.
+ */
+public abstract class AbstractLinkReorientSourceTest extends AbstractLinkPrepareTest {
+
+ public static View relationshipView;
+
+ @Test
+ public void reorientLinkTargetToDiagram() throws Exception {
+ View newSourceView = EditorUtils.getDiagramView();
+ reorientRelationshipSource(relationshipView, newSourceView, isReorientAllowed.get(newSourceView));
+ }
+
+ @Test
+ public void reorientLinkSourceToBlock() throws Exception {
+ View newSourceView = blockSourceView;
+ reorientRelationshipSource(relationshipView, newSourceView, isReorientAllowed.get(newSourceView));
+ }
+
+ @Test
+ public void reorientLinkSourceToActorPart() throws Exception {
+ View newSourceView = actorPartSourceView;
+ reorientRelationshipSource(relationshipView, newSourceView, isReorientAllowed.get(newSourceView));
+ }
+
+ @Test
+ public void reorientLinkSourceToNestedActorPart() throws Exception {
+ View newSourceView = nestedActorPartSourceView;
+ reorientRelationshipSource(relationshipView, newSourceView, isReorientAllowed.get(newSourceView));
+ }
+
+ @Test
+ public void reorientLinkSourceToPortOnBlock() throws Exception {
+ View newSourceView = portOnBlockSourceView;
+ reorientRelationshipSource(relationshipView, newSourceView, isReorientAllowed.get(newSourceView));
+ }
+
+ @Test
+ public void reorientLinkSourceToPortOnPart() throws Exception {
+ View newSourceView = portOnPartSourceView;
+ reorientRelationshipSource(relationshipView, newSourceView, isReorientAllowed.get(newSourceView));
+ }
+
+ @Test
+ public void reorientLinkSourceToPortOnNestedPart() throws Exception {
+ View newSourceView = portOnNestedPartSourceView;
+ reorientRelationshipSource(relationshipView, newSourceView, isReorientAllowed.get(newSourceView));
+ }
+
+ @Test
+ public void reorientLinkSourceToFlowPortOnBlock() throws Exception {
+ View newSourceView = flowportOnBlockSourceView;
+ reorientRelationshipSource(relationshipView, newSourceView, isReorientAllowed.get(newSourceView));
+ }
+
+ @Test
+ public void reorientLinkSourceToFlowPortOnPart() throws Exception {
+ View newSourceView = flowportOnPartSourceView;
+ reorientRelationshipSource(relationshipView, newSourceView, isReorientAllowed.get(newSourceView));
+ }
+
+ @Test
+ public void reorientLinkSourceToFlowPortOnNestedPart() throws Exception {
+ View newSourceView = flowportOnNestedPartSourceView;
+ reorientRelationshipSource(relationshipView, newSourceView, isReorientAllowed.get(newSourceView));
+ }
+
+ @Test
+ public void reorientLinkSourceToPart() throws Exception {
+ View newSourceView = partSourceView;
+ reorientRelationshipSource(relationshipView, newSourceView, isReorientAllowed.get(newSourceView));
+ }
+
+ @Test
+ public void reorientLinkSourceToNestedPart() throws Exception {
+ View newSourceView = nestedPartSourceView;
+ reorientRelationshipSource(relationshipView, newSourceView, isReorientAllowed.get(newSourceView));
+ }
+
+ @Test
+ public void reorientLinkSourceToProperty() throws Exception {
+ View newSourceView = propertySourceView;
+ reorientRelationshipSource(relationshipView, newSourceView, isReorientAllowed.get(newSourceView));
+ }
+
+ @Test
+ public void reorientLinkSourceToNestedProperty() throws Exception {
+ View newSourceView = nestedPropertySourceView;
+ reorientRelationshipSource(relationshipView, newSourceView, isReorientAllowed.get(newSourceView));
+ }
+
+ @Test
+ public void reorientLinkSourceToReference() throws Exception {
+ View newSourceView = referenceSourceView;
+ reorientRelationshipSource(relationshipView, newSourceView, isReorientAllowed.get(newSourceView));
+ }
+
+ @Test
+ public void reorientLinkSourceToNestedReference() throws Exception {
+ View newSourceView = nestedReferenceSourceView;
+ reorientRelationshipSource(relationshipView, newSourceView, isReorientAllowed.get(newSourceView));
+ }
+
+ @Test
+ public void reorientLinkSourceToValue() throws Exception {
+ View newSourceView = valueSourceView;
+ reorientRelationshipSource(relationshipView, newSourceView, isReorientAllowed.get(newSourceView));
+ }
+
+ @Test
+ public void reorientLinkSourceToNestedValue() throws Exception {
+ View newSourceView = nestedValueSourceView;
+ reorientRelationshipSource(relationshipView, newSourceView, isReorientAllowed.get(newSourceView));
+ }
+
+ @Test
+ public void reorientLinkSourceToComment() throws Exception {
+ View newSourceView = commentSourceView;
+ reorientRelationshipSource(relationshipView, newSourceView, isReorientAllowed.get(newSourceView));
+ }
+
+ @Test
+ public void reorientLinkSourceToCommentCN() throws Exception {
+ View newSourceView = commentCNSourceView;
+ reorientRelationshipSource(relationshipView, newSourceView, isReorientAllowed.get(newSourceView));
+ }
+
+ @Test
+ public void reorientLinkSourceToConstraint() throws Exception {
+ View newSourceView = constraintSourceView;
+ reorientRelationshipSource(relationshipView, newSourceView, isReorientAllowed.get(newSourceView));
+ }
+
+ @Test
+ public void reorientLinkSourceToConstraintCN() throws Exception {
+ View newSourceView = constraintCNSourceView;
+ reorientRelationshipSource(relationshipView, newSourceView, isReorientAllowed.get(newSourceView));
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/reorient/AbstractLinkReorientTargetTest.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/reorient/AbstractLinkReorientTargetTest.java
new file mode 100755
index 0000000..8677de3
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/reorient/AbstractLinkReorientTargetTest.java
@@ -0,0 +1,160 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.reorient;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.reorientRelationshipTarget;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils;
+import org.junit.Test;
+
+/**
+ * JUnit tests for Link re-orient.
+ */
+public abstract class AbstractLinkReorientTargetTest extends AbstractLinkPrepareTest {
+
+ public static View relationshipView;
+
+ @Test
+ public void reorientLinkTargetToDiagram() throws Exception {
+ View newTargetView = EditorUtils.getDiagramView();
+ reorientRelationshipTarget(relationshipView, newTargetView, isReorientAllowed.get(newTargetView));
+ }
+
+ @Test
+ public void reorientLinkTargetToBlock() throws Exception {
+ View newTargetView = blockTargetView;
+ reorientRelationshipTarget(relationshipView, newTargetView, isReorientAllowed.get(newTargetView));
+ }
+
+ @Test
+ public void reorientLinkTargetToActorPart() throws Exception {
+ View newTargetView = actorPartTargetView;
+ reorientRelationshipTarget(relationshipView, newTargetView, isReorientAllowed.get(newTargetView));
+ }
+
+ @Test
+ public void reorientLinkTargetToNestedActorPart() throws Exception {
+ View newTargetView = nestedActorPartTargetView;
+ reorientRelationshipTarget(relationshipView, newTargetView, isReorientAllowed.get(newTargetView));
+ }
+
+ @Test
+ public void reorientLinkTargetToPortOnBlock() throws Exception {
+ View newTargetView = portOnBlockTargetView;
+ reorientRelationshipTarget(relationshipView, newTargetView, isReorientAllowed.get(newTargetView));
+ }
+
+ @Test
+ public void reorientLinkTargetToPortOnPart() throws Exception {
+ View newTargetView = portOnPartTargetView;
+ reorientRelationshipTarget(relationshipView, newTargetView, isReorientAllowed.get(newTargetView));
+ }
+
+ @Test
+ public void reorientLinkTargetToPortOnNestedPart() throws Exception {
+ View newTargetView = portOnNestedPartTargetView;
+ reorientRelationshipTarget(relationshipView, newTargetView, isReorientAllowed.get(newTargetView));
+ }
+
+ @Test
+ public void reorientLinkTargetToFlowPortOnBlock() throws Exception {
+ View newTargetView = flowportOnBlockTargetView;
+ reorientRelationshipTarget(relationshipView, newTargetView, isReorientAllowed.get(newTargetView));
+ }
+
+ @Test
+ public void reorientLinkTargetToFlowPortOnPart() throws Exception {
+ View newTargetView = flowportOnPartTargetView;
+ reorientRelationshipTarget(relationshipView, newTargetView, isReorientAllowed.get(newTargetView));
+ }
+
+ @Test
+ public void reorientLinkTargetToFlowPortOnNestedPart() throws Exception {
+ View newTargetView = flowportOnNestedPartTargetView;
+ reorientRelationshipTarget(relationshipView, newTargetView, isReorientAllowed.get(newTargetView));
+ }
+
+ @Test
+ public void reorientLinkTargetToPart() throws Exception {
+ View newTargetView = partTargetView;
+ reorientRelationshipTarget(relationshipView, newTargetView, isReorientAllowed.get(newTargetView));
+ }
+
+ @Test
+ public void reorientLinkTargetToNestedPart() throws Exception {
+ View newTargetView = nestedPartTargetView;
+ reorientRelationshipTarget(relationshipView, newTargetView, isReorientAllowed.get(newTargetView));
+ }
+
+ @Test
+ public void reorientLinkTargetToProperty() throws Exception {
+ View newTargetView = propertyTargetView;
+ reorientRelationshipTarget(relationshipView, newTargetView, isReorientAllowed.get(newTargetView));
+ }
+
+ @Test
+ public void reorientLinkTargetToNestedProperty() throws Exception {
+ View newTargetView = nestedPropertyTargetView;
+ reorientRelationshipTarget(relationshipView, newTargetView, isReorientAllowed.get(newTargetView));
+ }
+
+ @Test
+ public void reorientLinkTargetToReference() throws Exception {
+ View newTargetView = referenceTargetView;
+ reorientRelationshipTarget(relationshipView, newTargetView, isReorientAllowed.get(newTargetView));
+ }
+
+ @Test
+ public void reorientLinkTargetToNestedReference() throws Exception {
+ View newTargetView = nestedReferenceTargetView;
+ reorientRelationshipTarget(relationshipView, newTargetView, isReorientAllowed.get(newTargetView));
+ }
+
+ @Test
+ public void reorientLinkTargetToValue() throws Exception {
+ View newTargetView = valueTargetView;
+ reorientRelationshipTarget(relationshipView, newTargetView, isReorientAllowed.get(newTargetView));
+ }
+
+ @Test
+ public void reorientLinkTargetToNestedValue() throws Exception {
+ View newTargetView = nestedValueTargetView;
+ reorientRelationshipTarget(relationshipView, newTargetView, isReorientAllowed.get(newTargetView));
+ }
+
+ @Test
+ public void reorientLinkTargetToComment() throws Exception {
+ View newTargetView = commentTargetView;
+ reorientRelationshipTarget(relationshipView, newTargetView, isReorientAllowed.get(newTargetView));
+ }
+
+ @Test
+ public void reorientLinkTargetToCommentCN() throws Exception {
+ View newTargetView = commentCNTargetView;
+ reorientRelationshipTarget(relationshipView, newTargetView, isReorientAllowed.get(newTargetView));
+ }
+
+ @Test
+ public void reorientLinkTargetToConstraint() throws Exception {
+ View newTargetView = constraintTargetView;
+ reorientRelationshipTarget(relationshipView, newTargetView, isReorientAllowed.get(newTargetView));
+ }
+
+ @Test
+ public void reorientLinkTargetToConstraintCN() throws Exception {
+ View newTargetView = constraintCNTargetView;
+ reorientRelationshipTarget(relationshipView, newTargetView, isReorientAllowed.get(newTargetView));
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/reorient/connector/AbstractLinkReorientSourceConnectorTest.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/reorient/connector/AbstractLinkReorientSourceConnectorTest.java
new file mode 100755
index 0000000..bfcedfa
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/reorient/connector/AbstractLinkReorientSourceConnectorTest.java
@@ -0,0 +1,176 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.reorient.connector;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.reorientConnectorSource;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.reorient.AbstractLinkPrepareTest;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils;
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit abstract tests for Connector re-orient.
+ */
+public abstract class AbstractLinkReorientSourceConnectorTest extends AbstractLinkPrepareTest {
+
+ public static View relationshipView;
+
+ public static final Map<View, List<Property>> expectedNestedPath = new HashMap<View, List<Property>>();
+
+ @BeforeClass
+ public static void initializeExpectedMaps() {
+ houseKeeper.cleanUpLater(expectedNestedPath);
+ }
+
+ @Test
+ public void reorientLinkTargetToDiagram() throws Exception {
+ View newSourceView = EditorUtils.getDiagramView();
+ reorientConnectorSource(relationshipView, newSourceView, isReorientAllowed.get(newSourceView), expectedNestedPath.get(newSourceView));
+ }
+
+ @Test
+ public void reorientLinkSourceToBlock() throws Exception {
+ View newSourceView = blockSourceView;
+ reorientConnectorSource(relationshipView, newSourceView, isReorientAllowed.get(newSourceView), expectedNestedPath.get(newSourceView));
+ }
+
+ @Test
+ public void reorientLinkSourceToActorPart() throws Exception {
+ View newSourceView = actorPartSourceView;
+ reorientConnectorSource(relationshipView, newSourceView, isReorientAllowed.get(newSourceView), expectedNestedPath.get(newSourceView));
+ }
+
+ @Test
+ public void reorientLinkSourceToNestedActorPart() throws Exception {
+ View newSourceView = nestedActorPartSourceView;
+ reorientConnectorSource(relationshipView, newSourceView, isReorientAllowed.get(newSourceView), expectedNestedPath.get(newSourceView));
+ }
+
+ @Test
+ public void reorientLinkSourceToPortOnBlock() throws Exception {
+ View newSourceView = portOnBlockSourceView;
+ reorientConnectorSource(relationshipView, newSourceView, isReorientAllowed.get(newSourceView), expectedNestedPath.get(newSourceView));
+ }
+
+ @Test
+ public void reorientLinkSourceToPortOnPart() throws Exception {
+ View newSourceView = portOnPartSourceView;
+ reorientConnectorSource(relationshipView, newSourceView, isReorientAllowed.get(newSourceView), expectedNestedPath.get(newSourceView));
+ }
+
+ @Test
+ public void reorientLinkSourceToPortOnNestedPart() throws Exception {
+ View newSourceView = portOnNestedPartSourceView;
+ reorientConnectorSource(relationshipView, newSourceView, isReorientAllowed.get(newSourceView), expectedNestedPath.get(newSourceView));
+ }
+
+ @Test
+ public void reorientLinkSourceToFlowPortOnBlock() throws Exception {
+ View newSourceView = flowportOnBlockSourceView;
+ reorientConnectorSource(relationshipView, newSourceView, isReorientAllowed.get(newSourceView), expectedNestedPath.get(newSourceView));
+ }
+
+ @Test
+ public void reorientLinkSourceToFlowPortOnPart() throws Exception {
+ View newSourceView = flowportOnPartSourceView;
+ reorientConnectorSource(relationshipView, newSourceView, isReorientAllowed.get(newSourceView), expectedNestedPath.get(newSourceView));
+ }
+
+ @Test
+ public void reorientLinkSourceToFlowPortOnNestedPart() throws Exception {
+ View newSourceView = flowportOnNestedPartSourceView;
+ reorientConnectorSource(relationshipView, newSourceView, isReorientAllowed.get(newSourceView), expectedNestedPath.get(newSourceView));
+ }
+
+ @Test
+ public void reorientLinkSourceToPart() throws Exception {
+ View newSourceView = partSourceView;
+ reorientConnectorSource(relationshipView, newSourceView, isReorientAllowed.get(newSourceView), expectedNestedPath.get(newSourceView));
+ }
+
+ @Test
+ public void reorientLinkSourceToNestedPart() throws Exception {
+ View newSourceView = nestedPartSourceView;
+ reorientConnectorSource(relationshipView, newSourceView, isReorientAllowed.get(newSourceView), expectedNestedPath.get(newSourceView));
+ }
+
+ @Test
+ public void reorientLinkSourceToProperty() throws Exception {
+ View newSourceView = propertySourceView;
+ reorientConnectorSource(relationshipView, newSourceView, isReorientAllowed.get(newSourceView), expectedNestedPath.get(newSourceView));
+ }
+
+ @Test
+ public void reorientLinkSourceToNestedProperty() throws Exception {
+ View newSourceView = nestedPropertySourceView;
+ reorientConnectorSource(relationshipView, newSourceView, isReorientAllowed.get(newSourceView), expectedNestedPath.get(newSourceView));
+ }
+
+ @Test
+ public void reorientLinkSourceToReference() throws Exception {
+ View newSourceView = referenceSourceView;
+ reorientConnectorSource(relationshipView, newSourceView, isReorientAllowed.get(newSourceView), expectedNestedPath.get(newSourceView));
+ }
+
+ @Test
+ public void reorientLinkSourceToNestedReference() throws Exception {
+ View newSourceView = nestedReferenceSourceView;
+ reorientConnectorSource(relationshipView, newSourceView, isReorientAllowed.get(newSourceView), expectedNestedPath.get(newSourceView));
+ }
+
+ @Test
+ public void reorientLinkSourceToValue() throws Exception {
+ View newSourceView = valueSourceView;
+ reorientConnectorSource(relationshipView, newSourceView, isReorientAllowed.get(newSourceView), expectedNestedPath.get(newSourceView));
+ }
+
+ @Test
+ public void reorientLinkSourceToNestedValue() throws Exception {
+ View newSourceView = nestedValueSourceView;
+ reorientConnectorSource(relationshipView, newSourceView, isReorientAllowed.get(newSourceView), expectedNestedPath.get(newSourceView));
+ }
+
+ @Test
+ public void reorientLinkSourceToComment() throws Exception {
+ View newSourceView = commentSourceView;
+ reorientConnectorSource(relationshipView, newSourceView, isReorientAllowed.get(newSourceView), expectedNestedPath.get(newSourceView));
+ }
+
+ @Test
+ public void reorientLinkSourceToCommentCN() throws Exception {
+ View newSourceView = commentCNSourceView;
+ reorientConnectorSource(relationshipView, newSourceView, isReorientAllowed.get(newSourceView), expectedNestedPath.get(newSourceView));
+ }
+
+ @Test
+ public void reorientLinkSourceToConstraint() throws Exception {
+ View newSourceView = constraintSourceView;
+ reorientConnectorSource(relationshipView, newSourceView, isReorientAllowed.get(newSourceView), expectedNestedPath.get(newSourceView));
+ }
+
+ @Test
+ public void reorientLinkSourceToConstraintCN() throws Exception {
+ View newSourceView = constraintCNSourceView;
+ reorientConnectorSource(relationshipView, newSourceView, isReorientAllowed.get(newSourceView), expectedNestedPath.get(newSourceView));
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/reorient/connector/AbstractLinkReorientTargetConnectorTest.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/reorient/connector/AbstractLinkReorientTargetConnectorTest.java
new file mode 100755
index 0000000..5acc250
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/reorient/connector/AbstractLinkReorientTargetConnectorTest.java
@@ -0,0 +1,175 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.reorient.connector;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.reorientConnectorTarget;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.reorient.AbstractLinkPrepareTest;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils;
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit abstract tests for Connector re-orient.
+ */
+public abstract class AbstractLinkReorientTargetConnectorTest extends AbstractLinkPrepareTest {
+
+ public static View relationshipView;
+
+ public static final Map<View, List<Property>> expectedNestedPath = new HashMap<View, List<Property>>();
+
+ @BeforeClass
+ public static void initializeExpectedMaps() {
+ houseKeeper.cleanUpLater(expectedNestedPath);
+ }
+
+ @Test
+ public void reorientLinkTargetToDiagram() throws Exception {
+ View newTargetView = EditorUtils.getDiagramView();
+ reorientConnectorTarget(relationshipView, newTargetView, isReorientAllowed.get(newTargetView), expectedNestedPath.get(newTargetView));
+ }
+
+ @Test
+ public void reorientLinkTargetToBlock() throws Exception {
+ View newTargetView = blockTargetView;
+ reorientConnectorTarget(relationshipView, newTargetView, isReorientAllowed.get(newTargetView), expectedNestedPath.get(newTargetView));
+ }
+
+ @Test
+ public void reorientLinkTargetToActorPart() throws Exception {
+ View newTargetView = actorPartTargetView;
+ reorientConnectorTarget(relationshipView, newTargetView, isReorientAllowed.get(newTargetView), expectedNestedPath.get(newTargetView));
+ }
+
+ @Test
+ public void reorientLinkTargetToNestedActorPart() throws Exception {
+ View newTargetView = nestedActorPartTargetView;
+ reorientConnectorTarget(relationshipView, newTargetView, isReorientAllowed.get(newTargetView), expectedNestedPath.get(newTargetView));
+ }
+
+ @Test
+ public void reorientLinkTargetToPortOnBlock() throws Exception {
+ View newTargetView = portOnBlockTargetView;
+ reorientConnectorTarget(relationshipView, newTargetView, isReorientAllowed.get(newTargetView), expectedNestedPath.get(newTargetView));
+ }
+
+ @Test
+ public void reorientLinkTargetToPortOnPart() throws Exception {
+ View newTargetView = portOnPartTargetView;
+ reorientConnectorTarget(relationshipView, newTargetView, isReorientAllowed.get(newTargetView), expectedNestedPath.get(newTargetView));
+ }
+
+ @Test
+ public void reorientLinkTargetToPortOnNestedPart() throws Exception {
+ View newTargetView = portOnNestedPartTargetView;
+ reorientConnectorTarget(relationshipView, newTargetView, isReorientAllowed.get(newTargetView), expectedNestedPath.get(newTargetView));
+ }
+
+ @Test
+ public void reorientLinkTargetToFlowPortOnBlock() throws Exception {
+ View newTargetView = flowportOnBlockTargetView;
+ reorientConnectorTarget(relationshipView, newTargetView, isReorientAllowed.get(newTargetView), expectedNestedPath.get(newTargetView));
+ }
+
+ @Test
+ public void reorientLinkTargetToFlowPortOnPart() throws Exception {
+ View newTargetView = flowportOnPartTargetView;
+ reorientConnectorTarget(relationshipView, newTargetView, isReorientAllowed.get(newTargetView), expectedNestedPath.get(newTargetView));
+ }
+
+ @Test
+ public void reorientLinkTargetToFlowPortOnNestedPart() throws Exception {
+ View newTargetView = flowportOnNestedPartTargetView;
+ reorientConnectorTarget(relationshipView, newTargetView, isReorientAllowed.get(newTargetView), expectedNestedPath.get(newTargetView));
+ }
+
+ @Test
+ public void reorientLinkTargetToPart() throws Exception {
+ View newTargetView = partTargetView;
+ reorientConnectorTarget(relationshipView, newTargetView, isReorientAllowed.get(newTargetView), expectedNestedPath.get(newTargetView));
+ }
+
+ @Test
+ public void reorientLinkTargetToNestedPart() throws Exception {
+ View newTargetView = nestedPartTargetView;
+ reorientConnectorTarget(relationshipView, newTargetView, isReorientAllowed.get(newTargetView), expectedNestedPath.get(newTargetView));
+ }
+
+ @Test
+ public void reorientLinkTargetToProperty() throws Exception {
+ View newTargetView = propertyTargetView;
+ reorientConnectorTarget(relationshipView, newTargetView, isReorientAllowed.get(newTargetView), expectedNestedPath.get(newTargetView));
+ }
+
+ @Test
+ public void reorientLinkTargetToNestedProperty() throws Exception {
+ View newTargetView = nestedPropertyTargetView;
+ reorientConnectorTarget(relationshipView, newTargetView, isReorientAllowed.get(newTargetView), expectedNestedPath.get(newTargetView));
+ }
+
+ @Test
+ public void reorientLinkTargetToReference() throws Exception {
+ View newTargetView = referenceTargetView;
+ reorientConnectorTarget(relationshipView, newTargetView, isReorientAllowed.get(newTargetView), expectedNestedPath.get(newTargetView));
+ }
+
+ @Test
+ public void reorientLinkTargetToNestedReference() throws Exception {
+ View newTargetView = nestedReferenceTargetView;
+ reorientConnectorTarget(relationshipView, newTargetView, isReorientAllowed.get(newTargetView), expectedNestedPath.get(newTargetView));
+ }
+
+ @Test
+ public void reorientLinkTargetToValue() throws Exception {
+ View newTargetView = valueTargetView;
+ reorientConnectorTarget(relationshipView, newTargetView, isReorientAllowed.get(newTargetView), expectedNestedPath.get(newTargetView));
+ }
+
+ @Test
+ public void reorientLinkTargetToNestedValue() throws Exception {
+ View newTargetView = nestedValueTargetView;
+ reorientConnectorTarget(relationshipView, newTargetView, isReorientAllowed.get(newTargetView), expectedNestedPath.get(newTargetView));
+ }
+
+ @Test
+ public void reorientLinkTargetToComment() throws Exception {
+ View newTargetView = commentTargetView;
+ reorientConnectorTarget(relationshipView, newTargetView, isReorientAllowed.get(newTargetView), expectedNestedPath.get(newTargetView));
+ }
+
+ @Test
+ public void reorientLinkTargetToCommentCN() throws Exception {
+ View newTargetView = commentCNTargetView;
+ reorientConnectorTarget(relationshipView, newTargetView, isReorientAllowed.get(newTargetView), expectedNestedPath.get(newTargetView));
+ }
+
+ @Test
+ public void reorientLinkTargetToConstraint() throws Exception {
+ View newTargetView = constraintTargetView;
+ reorientConnectorTarget(relationshipView, newTargetView, isReorientAllowed.get(newTargetView), expectedNestedPath.get(newTargetView));
+ }
+
+ @Test
+ public void reorientLinkTargetToConstraintCN() throws Exception {
+ View newTargetView = constraintCNTargetView;
+ reorientConnectorTarget(relationshipView, newTargetView, isReorientAllowed.get(newTargetView), expectedNestedPath.get(newTargetView));
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/reorient/connector/TestLinkReorientSourceConnector.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/reorient/connector/TestLinkReorientSourceConnector.java
new file mode 100755
index 0000000..5766544
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/reorient/connector/TestLinkReorientSourceConnector.java
@@ -0,0 +1,118 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.reorient.connector;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createGraphicalNode;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector re-orient.
+ */
+public class TestLinkReorientSourceConnector extends AbstractLinkReorientSourceConnectorTest {
+
+ @BeforeClass
+ public static void initRelationship() throws Exception {
+
+ // Prepare source and target
+ View container = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockStructureView = ViewUtil.getChildBySemanticHint(container, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+ View actorPartSourceView = createGraphicalNode(SysMLElementTypes.ACTOR_PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ View actorPartTargetView = createGraphicalNode(SysMLElementTypes.ACTOR_PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+
+ // Prepare relationship
+ relationshipView = TestPrepareUtils.createGraphicalLink(
+ UMLElementTypes.CONNECTOR,
+ UMLGraphicalTypes.LINK_UML_CONNECTOR_ID,
+ container,
+ EditorUtils.getEditPart(actorPartSourceView),
+ EditorUtils.getEditPart(actorPartTargetView));
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ Property part = (Property) partContainer1.getElement();
+ List<Property> nestedPath = new ArrayList<Property>();
+ nestedPath.add(part);
+
+ Property nestedPart = (Property)nestedPartContainer1.getElement();
+ List<Property> deepNestedPath = Arrays.asList(part, nestedPart);
+
+ // Initialize source creation results
+
+ isReorientAllowed.put(getDiagramView(), false);
+
+ isReorientAllowed.put(blockSourceView, false);
+
+ isReorientAllowed.put(actorPartSourceView, true);
+ isReorientAllowed.put(nestedActorPartSourceView, true);
+
+ isReorientAllowed.put(portOnBlockSourceView, true);
+ isReorientAllowed.put(portOnPartSourceView, true);
+ isReorientAllowed.put(portOnNestedPartSourceView, true);
+
+ isReorientAllowed.put(flowportOnBlockSourceView, true);
+ isReorientAllowed.put(flowportOnPartSourceView, true);
+ isReorientAllowed.put(flowportOnNestedPartSourceView, true);
+
+ isReorientAllowed.put(partSourceView, true);
+ isReorientAllowed.put(nestedPartSourceView, true);
+
+ isReorientAllowed.put(propertySourceView, true);
+ isReorientAllowed.put(nestedPropertySourceView, true);
+
+ isReorientAllowed.put(referenceSourceView, true);
+ isReorientAllowed.put(nestedReferenceSourceView, true);
+
+ isReorientAllowed.put(valueSourceView, true);
+ isReorientAllowed.put(nestedValueSourceView, true);
+
+ isReorientAllowed.put(commentSourceView, false);
+ isReorientAllowed.put(commentCNSourceView, false);
+ isReorientAllowed.put(constraintSourceView, false);
+ isReorientAllowed.put(constraintCNSourceView, false);
+
+ // Initialize nested property path for tests
+ List<Property> emptyPath = Collections.emptyList();
+ for (View view : isReorientAllowed.keySet()) {
+ expectedNestedPath.put(view, emptyPath);
+ }
+
+ expectedNestedPath.put(nestedActorPartSourceView, nestedPath);
+ expectedNestedPath.put(portOnNestedPartSourceView, deepNestedPath);
+ expectedNestedPath.put(flowportOnNestedPartSourceView, deepNestedPath);
+ expectedNestedPath.put(nestedPartSourceView, nestedPath);
+ expectedNestedPath.put(nestedPropertySourceView, nestedPath);
+ expectedNestedPath.put(nestedReferenceSourceView, nestedPath);
+ expectedNestedPath.put(nestedValueSourceView, nestedPath);
+
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/reorient/connector/TestLinkReorientTargetConnector.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/reorient/connector/TestLinkReorientTargetConnector.java
new file mode 100755
index 0000000..47c2bc1
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/reorient/connector/TestLinkReorientTargetConnector.java
@@ -0,0 +1,118 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.reorient.connector;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createGraphicalNode;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector re-orient.
+ */
+public class TestLinkReorientTargetConnector extends AbstractLinkReorientTargetConnectorTest {
+
+ @BeforeClass
+ public static void initRelationship() throws Exception {
+
+ // Prepare source and target
+ View container = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockStructureView = ViewUtil.getChildBySemanticHint(container, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+ View actorPartSourceView = createGraphicalNode(SysMLElementTypes.ACTOR_PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ View actorPartTargetView = createGraphicalNode(SysMLElementTypes.ACTOR_PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+
+ // Prepare relationship
+ relationshipView = TestPrepareUtils.createGraphicalLink(
+ UMLElementTypes.CONNECTOR,
+ UMLGraphicalTypes.LINK_UML_CONNECTOR_ID,
+ container,
+ EditorUtils.getEditPart(actorPartSourceView),
+ EditorUtils.getEditPart(actorPartTargetView));
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ Property part = (Property) partContainer1.getElement();
+ List<Property> nestedPath = new ArrayList<Property>();
+ nestedPath.add(part);
+
+ Property nestedPart = (Property)nestedPartContainer2.getElement();
+ List<Property> deepNestedPath = Arrays.asList(part, nestedPart);
+
+ // Initialize source creation results
+
+ isReorientAllowed.put(getDiagramView(), false);
+
+ isReorientAllowed.put(blockTargetView, false);
+
+ isReorientAllowed.put(actorPartTargetView, true);
+ isReorientAllowed.put(nestedActorPartTargetView, true);
+
+ isReorientAllowed.put(portOnBlockTargetView, true);
+ isReorientAllowed.put(portOnPartTargetView, true);
+ isReorientAllowed.put(portOnNestedPartTargetView, true);
+
+ isReorientAllowed.put(flowportOnBlockTargetView, true);
+ isReorientAllowed.put(flowportOnPartTargetView, true);
+ isReorientAllowed.put(flowportOnNestedPartTargetView, true);
+
+ isReorientAllowed.put(partTargetView, true);
+ isReorientAllowed.put(nestedPartTargetView, true);
+
+ isReorientAllowed.put(propertyTargetView, true);
+ isReorientAllowed.put(nestedPropertyTargetView, true);
+
+ isReorientAllowed.put(referenceTargetView, true);
+ isReorientAllowed.put(nestedReferenceTargetView, true);
+
+ isReorientAllowed.put(valueTargetView, true);
+ isReorientAllowed.put(nestedValueTargetView, true);
+
+ isReorientAllowed.put(commentTargetView, false);
+ isReorientAllowed.put(commentCNTargetView, false);
+ isReorientAllowed.put(constraintTargetView, false);
+ isReorientAllowed.put(constraintCNTargetView, false);
+
+ // Initialize nested property path for tests
+ List<Property> emptyPath = Collections.emptyList();
+ for (View view : isReorientAllowed.keySet()) {
+ expectedNestedPath.put(view, emptyPath);
+ }
+
+ expectedNestedPath.put(nestedActorPartTargetView, nestedPath);
+ expectedNestedPath.put(portOnNestedPartTargetView, deepNestedPath);
+ expectedNestedPath.put(flowportOnNestedPartTargetView, deepNestedPath);
+ expectedNestedPath.put(nestedPartTargetView, nestedPath);
+ expectedNestedPath.put(nestedPropertyTargetView, nestedPath);
+ expectedNestedPath.put(nestedReferenceTargetView, nestedPath);
+ expectedNestedPath.put(nestedValueTargetView, nestedPath);
+
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/reorient/connector/delegation/AbstractLinkReorientSourceConnectorTest.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/reorient/connector/delegation/AbstractLinkReorientSourceConnectorTest.java
new file mode 100755
index 0000000..fa3d5c9
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/reorient/connector/delegation/AbstractLinkReorientSourceConnectorTest.java
@@ -0,0 +1,152 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.reorient.connector.delegation;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.reorientConnectorSourceAndTestDelegate;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.reorient.AbstractLinkPrepareTest;
+import org.eclipse.uml2.uml.ConnectableElement;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit abstract tests for Connector re-orient and delegation test.
+ */
+public abstract class AbstractLinkReorientSourceConnectorTest extends AbstractLinkPrepareTest {
+
+ public static View relationshipView;
+
+ public static final Map<View, ConnectableElement> expectedSourcePartWithPort = new HashMap<View, ConnectableElement>();
+
+ public static final Map<View, ConnectableElement> expectedTargetPartWithPort = new HashMap<View, ConnectableElement>();
+
+ @BeforeClass
+ public static void initializeExpectedMaps() {
+ houseKeeper.cleanUpLater(expectedSourcePartWithPort);
+ houseKeeper.cleanUpLater(expectedTargetPartWithPort);
+ }
+
+ @Test
+ public void reorientLinkSourceToActorPart() throws Exception {
+ View newSourceView = actorPartSourceView;
+ reorientConnectorSourceAndTestDelegate(relationshipView, newSourceView, isReorientAllowed.get(newSourceView), expectedSourcePartWithPort.get(newSourceView), expectedTargetPartWithPort.get(newSourceView));
+ }
+
+ @Test
+ public void reorientLinkSourceToNestedActorPart() throws Exception {
+ View newSourceView = nestedActorPartSourceView;
+ reorientConnectorSourceAndTestDelegate(relationshipView, newSourceView, isReorientAllowed.get(newSourceView), expectedSourcePartWithPort.get(newSourceView), expectedTargetPartWithPort.get(newSourceView));
+ }
+
+ @Test
+ public void reorientLinkSourceToPortOnBlock() throws Exception {
+ View newSourceView = portOnBlockSourceView;
+ reorientConnectorSourceAndTestDelegate(relationshipView, newSourceView, isReorientAllowed.get(newSourceView), expectedSourcePartWithPort.get(newSourceView), expectedTargetPartWithPort.get(newSourceView));
+ }
+
+ @Test
+ public void reorientLinkSourceToPortOnPart() throws Exception {
+ View newSourceView = portOnPartSourceView;
+ reorientConnectorSourceAndTestDelegate(relationshipView, newSourceView, isReorientAllowed.get(newSourceView), expectedSourcePartWithPort.get(newSourceView), expectedTargetPartWithPort.get(newSourceView));
+ }
+
+ @Test
+ public void reorientLinkSourceToPortOnNestedPart() throws Exception {
+ View newSourceView = portOnNestedPartSourceView;
+ reorientConnectorSourceAndTestDelegate(relationshipView, newSourceView, isReorientAllowed.get(newSourceView), expectedSourcePartWithPort.get(newSourceView), expectedTargetPartWithPort.get(newSourceView));
+ }
+
+ @Test
+ public void reorientLinkSourceToFlowPortOnBlock() throws Exception {
+ View newSourceView = flowportOnBlockSourceView;
+ reorientConnectorSourceAndTestDelegate(relationshipView, newSourceView, isReorientAllowed.get(newSourceView), expectedSourcePartWithPort.get(newSourceView), expectedTargetPartWithPort.get(newSourceView));
+ }
+
+ @Test
+ public void reorientLinkSourceToFlowPortOnPart() throws Exception {
+ View newSourceView = flowportOnPartSourceView;
+ reorientConnectorSourceAndTestDelegate(relationshipView, newSourceView, isReorientAllowed.get(newSourceView), expectedSourcePartWithPort.get(newSourceView), expectedTargetPartWithPort.get(newSourceView));
+ }
+
+ @Test
+ public void reorientLinkSourceToFlowPortOnNestedPart() throws Exception {
+ View newSourceView = flowportOnNestedPartSourceView;
+ reorientConnectorSourceAndTestDelegate(relationshipView, newSourceView, isReorientAllowed.get(newSourceView), expectedSourcePartWithPort.get(newSourceView), expectedTargetPartWithPort.get(newSourceView));
+ }
+
+ @Test
+ public void reorientLinkSourceToPart() throws Exception {
+ View newSourceView = partSourceView;
+ reorientConnectorSourceAndTestDelegate(relationshipView, newSourceView, isReorientAllowed.get(newSourceView), expectedSourcePartWithPort.get(newSourceView), expectedTargetPartWithPort.get(newSourceView));
+ }
+
+ @Test
+ public void reorientLinkSourceToNestedPart() throws Exception {
+ View newSourceView = nestedPartSourceView;
+ reorientConnectorSourceAndTestDelegate(relationshipView, newSourceView, isReorientAllowed.get(newSourceView), expectedSourcePartWithPort.get(newSourceView), expectedTargetPartWithPort.get(newSourceView));
+ }
+
+ @Test
+ public void reorientLinkSourceToProperty() throws Exception {
+ View newSourceView = propertySourceView;
+ reorientConnectorSourceAndTestDelegate(relationshipView, newSourceView, isReorientAllowed.get(newSourceView), expectedSourcePartWithPort.get(newSourceView), expectedTargetPartWithPort.get(newSourceView));
+ }
+
+ @Test
+ public void reorientLinkSourceToNestedProperty() throws Exception {
+ View newSourceView = nestedPropertySourceView;
+ reorientConnectorSourceAndTestDelegate(relationshipView, newSourceView, isReorientAllowed.get(newSourceView), expectedSourcePartWithPort.get(newSourceView), expectedTargetPartWithPort.get(newSourceView));
+ }
+
+ @Test
+ public void reorientLinkSourceToReference() throws Exception {
+ View newSourceView = referenceSourceView;
+ reorientConnectorSourceAndTestDelegate(relationshipView, newSourceView, isReorientAllowed.get(newSourceView), expectedSourcePartWithPort.get(newSourceView), expectedTargetPartWithPort.get(newSourceView));
+ }
+
+ @Test
+ public void reorientLinkSourceToNestedReference() throws Exception {
+ View newSourceView = nestedReferenceSourceView;
+ reorientConnectorSourceAndTestDelegate(relationshipView, newSourceView, isReorientAllowed.get(newSourceView), expectedSourcePartWithPort.get(newSourceView), expectedTargetPartWithPort.get(newSourceView));
+ }
+
+ @Test
+ public void reorientLinkSourceToValue() throws Exception {
+ View newSourceView = valueSourceView;
+ reorientConnectorSourceAndTestDelegate(relationshipView, newSourceView, isReorientAllowed.get(newSourceView), expectedSourcePartWithPort.get(newSourceView), expectedTargetPartWithPort.get(newSourceView));
+ }
+
+ @Test
+ public void reorientLinkSourceToNestedValue() throws Exception {
+ View newSourceView = nestedValueSourceView;
+ reorientConnectorSourceAndTestDelegate(relationshipView, newSourceView, isReorientAllowed.get(newSourceView), expectedSourcePartWithPort.get(newSourceView), expectedTargetPartWithPort.get(newSourceView));
+ }
+
+ @Test
+ public void reorientLinkSourceToDeepNestedPartContainer1() throws Exception {
+ View newSourceView = subNestedPartContainer1SourceView;
+ reorientConnectorSourceAndTestDelegate(relationshipView, newSourceView, isReorientAllowed.get(newSourceView), expectedSourcePartWithPort.get(newSourceView), expectedTargetPartWithPort.get(newSourceView));
+ }
+
+ @Test
+ public void reorientLinkSourceToDeepNestedPartContainer2() throws Exception {
+ View newSourceView = subNestedPartContainer2SourceView;
+ reorientConnectorSourceAndTestDelegate(relationshipView, newSourceView, isReorientAllowed.get(newSourceView), expectedSourcePartWithPort.get(newSourceView), expectedTargetPartWithPort.get(newSourceView));
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/reorient/connector/delegation/AbstractLinkReorientTargetConnectorTest.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/reorient/connector/delegation/AbstractLinkReorientTargetConnectorTest.java
new file mode 100755
index 0000000..4e295b8
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/reorient/connector/delegation/AbstractLinkReorientTargetConnectorTest.java
@@ -0,0 +1,152 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.reorient.connector.delegation;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.reorientConnectorTargetAndTestDelegate;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.reorient.AbstractLinkPrepareTest;
+import org.eclipse.uml2.uml.ConnectableElement;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit abstract tests for Connector re-orient and delegation test.
+ */
+public abstract class AbstractLinkReorientTargetConnectorTest extends AbstractLinkPrepareTest {
+
+ public static View relationshipView;
+
+ public static final Map<View, ConnectableElement> expectedSourcePartWithPort = new HashMap<View, ConnectableElement>();
+
+ public static final Map<View, ConnectableElement> expectedTargetPartWithPort = new HashMap<View, ConnectableElement>();
+
+ @BeforeClass
+ public static void initializeExpectedMaps() {
+ houseKeeper.cleanUpLater(expectedSourcePartWithPort);
+ houseKeeper.cleanUpLater(expectedTargetPartWithPort);
+ }
+
+ @Test
+ public void reorientLinkTargetToActorPart() throws Exception {
+ View newTargetView = actorPartTargetView;
+ reorientConnectorTargetAndTestDelegate(relationshipView, newTargetView, isReorientAllowed.get(newTargetView), expectedSourcePartWithPort.get(newTargetView), expectedTargetPartWithPort.get(newTargetView));
+ }
+
+ @Test
+ public void reorientLinkTargetToNestedActorPart() throws Exception {
+ View newTargetView = nestedActorPartTargetView;
+ reorientConnectorTargetAndTestDelegate(relationshipView, newTargetView, isReorientAllowed.get(newTargetView), expectedSourcePartWithPort.get(newTargetView), expectedTargetPartWithPort.get(newTargetView));
+ }
+
+ @Test
+ public void reorientLinkTargetToPortOnBlock() throws Exception {
+ View newTargetView = portOnBlockTargetView;
+ reorientConnectorTargetAndTestDelegate(relationshipView, newTargetView, isReorientAllowed.get(newTargetView), expectedSourcePartWithPort.get(newTargetView), expectedTargetPartWithPort.get(newTargetView));
+ }
+
+ @Test
+ public void reorientLinkTargetToPortOnPart() throws Exception {
+ View newTargetView = portOnPartTargetView;
+ reorientConnectorTargetAndTestDelegate(relationshipView, newTargetView, isReorientAllowed.get(newTargetView), expectedSourcePartWithPort.get(newTargetView), expectedTargetPartWithPort.get(newTargetView));
+ }
+
+ @Test
+ public void reorientLinkTargetToPortOnNestedPart() throws Exception {
+ View newTargetView = portOnNestedPartTargetView;
+ reorientConnectorTargetAndTestDelegate(relationshipView, newTargetView, isReorientAllowed.get(newTargetView), expectedSourcePartWithPort.get(newTargetView), expectedTargetPartWithPort.get(newTargetView));
+ }
+
+ @Test
+ public void reorientLinkTargetToFlowPortOnBlock() throws Exception {
+ View newTargetView = flowportOnBlockTargetView;
+ reorientConnectorTargetAndTestDelegate(relationshipView, newTargetView, isReorientAllowed.get(newTargetView), expectedSourcePartWithPort.get(newTargetView), expectedTargetPartWithPort.get(newTargetView));
+ }
+
+ @Test
+ public void reorientLinkTargetToFlowPortOnPart() throws Exception {
+ View newTargetView = flowportOnPartTargetView;
+ reorientConnectorTargetAndTestDelegate(relationshipView, newTargetView, isReorientAllowed.get(newTargetView), expectedSourcePartWithPort.get(newTargetView), expectedTargetPartWithPort.get(newTargetView));
+ }
+
+ @Test
+ public void reorientLinkTargetToFlowPortOnNestedPart() throws Exception {
+ View newTargetView = flowportOnNestedPartTargetView;
+ reorientConnectorTargetAndTestDelegate(relationshipView, newTargetView, isReorientAllowed.get(newTargetView), expectedSourcePartWithPort.get(newTargetView), expectedTargetPartWithPort.get(newTargetView));
+ }
+
+ @Test
+ public void reorientLinkTargetToPart() throws Exception {
+ View newTargetView = partTargetView;
+ reorientConnectorTargetAndTestDelegate(relationshipView, newTargetView, isReorientAllowed.get(newTargetView), expectedSourcePartWithPort.get(newTargetView), expectedTargetPartWithPort.get(newTargetView));
+ }
+
+ @Test
+ public void reorientLinkTargetToNestedPart() throws Exception {
+ View newTargetView = nestedPartTargetView;
+ reorientConnectorTargetAndTestDelegate(relationshipView, newTargetView, isReorientAllowed.get(newTargetView), expectedSourcePartWithPort.get(newTargetView), expectedTargetPartWithPort.get(newTargetView));
+ }
+
+ @Test
+ public void reorientLinkTargetToProperty() throws Exception {
+ View newTargetView = propertyTargetView;
+ reorientConnectorTargetAndTestDelegate(relationshipView, newTargetView, isReorientAllowed.get(newTargetView), expectedSourcePartWithPort.get(newTargetView), expectedTargetPartWithPort.get(newTargetView));
+ }
+
+ @Test
+ public void reorientLinkTargetToNestedProperty() throws Exception {
+ View newTargetView = nestedPropertyTargetView;
+ reorientConnectorTargetAndTestDelegate(relationshipView, newTargetView, isReorientAllowed.get(newTargetView), expectedSourcePartWithPort.get(newTargetView), expectedTargetPartWithPort.get(newTargetView));
+ }
+
+ @Test
+ public void reorientLinkTargetToReference() throws Exception {
+ View newTargetView = referenceTargetView;
+ reorientConnectorTargetAndTestDelegate(relationshipView, newTargetView, isReorientAllowed.get(newTargetView), expectedSourcePartWithPort.get(newTargetView), expectedTargetPartWithPort.get(newTargetView));
+ }
+
+ @Test
+ public void reorientLinkTargetToNestedReference() throws Exception {
+ View newTargetView = nestedReferenceTargetView;
+ reorientConnectorTargetAndTestDelegate(relationshipView, newTargetView, isReorientAllowed.get(newTargetView), expectedSourcePartWithPort.get(newTargetView), expectedTargetPartWithPort.get(newTargetView));
+ }
+
+ @Test
+ public void reorientLinkTargetToValue() throws Exception {
+ View newTargetView = valueTargetView;
+ reorientConnectorTargetAndTestDelegate(relationshipView, newTargetView, isReorientAllowed.get(newTargetView), expectedSourcePartWithPort.get(newTargetView), expectedTargetPartWithPort.get(newTargetView));
+ }
+
+ @Test
+ public void reorientLinkTargetToNestedValue() throws Exception {
+ View newTargetView = nestedValueTargetView;
+ reorientConnectorTargetAndTestDelegate(relationshipView, newTargetView, isReorientAllowed.get(newTargetView), expectedSourcePartWithPort.get(newTargetView), expectedTargetPartWithPort.get(newTargetView));
+ }
+
+ @Test
+ public void reorientLinkSourceToDeepNestedPartContainer1() throws Exception {
+ View newSourceView = subNestedPartContainer1TargetView;
+ reorientConnectorTargetAndTestDelegate(relationshipView, newSourceView, isReorientAllowed.get(newSourceView), expectedSourcePartWithPort.get(newSourceView), expectedTargetPartWithPort.get(newSourceView));
+ }
+
+ @Test
+ public void reorientLinkSourceToDeepNestedPartContainer2() throws Exception {
+ View newSourceView = subNestedPartContainer2TargetView;
+ reorientConnectorTargetAndTestDelegate(relationshipView, newSourceView, isReorientAllowed.get(newSourceView), expectedSourcePartWithPort.get(newSourceView), expectedTargetPartWithPort.get(newSourceView));
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/reorient/connector/delegation/TestLinkReorientSourceConnector.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/reorient/connector/delegation/TestLinkReorientSourceConnector.java
new file mode 100755
index 0000000..ba97f96
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/reorient/connector/delegation/TestLinkReorientSourceConnector.java
@@ -0,0 +1,99 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.reorient.connector.delegation;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.uml2.uml.Property;
+import org.junit.Before;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector re-orient.
+ */
+public class TestLinkReorientSourceConnector extends AbstractLinkReorientSourceConnectorTest {
+
+ @Before
+ public void initRelationship() throws Exception {
+
+ // Prepare source and target
+ View container = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+
+ // Prepare relationship
+ relationshipView = TestPrepareUtils.createGraphicalLink(
+ UMLElementTypes.CONNECTOR,
+ UMLGraphicalTypes.LINK_UML_CONNECTOR_ID,
+ container,
+ EditorUtils.getEditPart(portOnPartSourceView),
+ EditorUtils.getEditPart(portOnNestedPartTargetView));
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ Property part = (Property) partContainer1.getElement();
+ List<Property> nestedPath = new ArrayList<Property>();
+ nestedPath.add(part);
+
+ // Initialize source creation results
+
+ isReorientAllowed.put(actorPartSourceView, true);
+ isReorientAllowed.put(nestedActorPartSourceView, true);
+
+ isReorientAllowed.put(portOnBlockSourceView, true);
+ isReorientAllowed.put(portOnPartSourceView, true);
+ isReorientAllowed.put(portOnNestedPartSourceView, true);
+
+ isReorientAllowed.put(flowportOnBlockSourceView, true);
+ isReorientAllowed.put(flowportOnPartSourceView, true);
+ isReorientAllowed.put(flowportOnNestedPartSourceView, true);
+
+ isReorientAllowed.put(partSourceView, true);
+ isReorientAllowed.put(nestedPartSourceView, true);
+ isReorientAllowed.put(subNestedPartContainer1SourceView, true);
+ isReorientAllowed.put(subNestedPartContainer2SourceView, true);
+
+ isReorientAllowed.put(propertySourceView, true);
+ isReorientAllowed.put(nestedPropertySourceView, true);
+
+ isReorientAllowed.put(referenceSourceView, true);
+ isReorientAllowed.put(nestedReferenceSourceView, true);
+
+ isReorientAllowed.put(valueSourceView, true);
+ isReorientAllowed.put(nestedValueSourceView, true);
+
+ // Initialize partWithPort for tests
+ Property sourceNestedpart = (Property)nestedPartContainer1.getElement();
+
+ Property targetNestedpart = (Property)nestedPartContainer2.getElement();
+
+ for (View view : isReorientAllowed.keySet()) {
+ expectedTargetPartWithPort.put(view, targetNestedpart);
+ }
+
+ expectedSourcePartWithPort.put(portOnNestedPartSourceView, sourceNestedpart);
+ expectedSourcePartWithPort.put(flowportOnNestedPartSourceView, sourceNestedpart);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/reorient/connector/delegation/TestLinkReorientTargetConnector.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/reorient/connector/delegation/TestLinkReorientTargetConnector.java
new file mode 100755
index 0000000..3c46186
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/reorient/connector/delegation/TestLinkReorientTargetConnector.java
@@ -0,0 +1,121 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.reorient.connector.delegation;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.uml2.uml.Property;
+import org.junit.Before;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector re-orient.
+ */
+public class TestLinkReorientTargetConnector extends AbstractLinkReorientTargetConnectorTest {
+
+ @Before
+ public void initRelationship() throws Exception {
+
+ // Prepare source and target
+ View container = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+
+ // Prepare relationship
+ relationshipView = TestPrepareUtils.createGraphicalLink(
+ UMLElementTypes.CONNECTOR,
+ UMLGraphicalTypes.LINK_UML_CONNECTOR_ID,
+ container,
+ EditorUtils.getEditPart(portOnPartSourceView),
+ EditorUtils.getEditPart(portOnNestedPartTargetView));
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ Property part = (Property) partContainer1.getElement();
+ List<Property> nestedPath = new ArrayList<Property>();
+ nestedPath.add(part);
+
+ // Initialize source creation results
+
+ isReorientAllowed.put(actorPartTargetView, true);
+ isReorientAllowed.put(nestedActorPartTargetView, true);
+
+ isReorientAllowed.put(portOnBlockTargetView, true);
+ isReorientAllowed.put(portOnPartTargetView, true);
+ isReorientAllowed.put(portOnNestedPartTargetView, true);
+
+ isReorientAllowed.put(flowportOnBlockTargetView, true);
+ isReorientAllowed.put(flowportOnPartTargetView, true);
+ isReorientAllowed.put(flowportOnNestedPartTargetView, true);
+
+ isReorientAllowed.put(partTargetView, true);
+ isReorientAllowed.put(nestedPartTargetView, true);
+ isReorientAllowed.put(partTargetView, true);
+ isReorientAllowed.put(subNestedPartContainer1TargetView, true);
+ isReorientAllowed.put(subNestedPartContainer2TargetView, true);
+
+ isReorientAllowed.put(propertyTargetView, true);
+ isReorientAllowed.put(nestedPropertyTargetView, true);
+
+ isReorientAllowed.put(referenceTargetView, true);
+ isReorientAllowed.put(nestedReferenceTargetView, true);
+
+ isReorientAllowed.put(valueTargetView, true);
+ isReorientAllowed.put(nestedValueTargetView, true);
+
+ // Initialize partWithPort for tests
+ Property sourcepart = (Property)partContainer1.getElement();
+ Property targetpart = (Property)partContainer2.getElement();
+
+ Property targetNestedpart = (Property)nestedPartContainer2.getElement();
+
+ Property targetsubNestedPartContainer1 = (Property)subNestedPartContainer1TargetView.getElement();
+ Property targetsubNestedPartContainer2 = (Property)subNestedPartContainer2TargetView.getElement();
+
+ for (View view : isReorientAllowed.keySet()) {
+ expectedSourcePartWithPort.put(view, sourcepart);
+ }
+
+ expectedSourcePartWithPort.remove(nestedActorPartTargetView);
+ expectedSourcePartWithPort.remove(nestedPartTargetView);
+ expectedSourcePartWithPort.remove(nestedPropertyTargetView);
+ expectedSourcePartWithPort.remove(nestedReferenceTargetView);
+ expectedSourcePartWithPort.remove(nestedValueTargetView);
+ expectedSourcePartWithPort.remove(portOnNestedPartTargetView);
+ expectedSourcePartWithPort.remove(flowportOnNestedPartTargetView);
+ expectedSourcePartWithPort.remove(subNestedPartContainer1TargetView);
+ expectedSourcePartWithPort.remove(subNestedPartContainer2TargetView);
+
+ expectedTargetPartWithPort.put(portOnPartTargetView, targetpart);
+ expectedTargetPartWithPort.put(flowportOnPartTargetView, targetpart);
+
+ expectedTargetPartWithPort.put(portOnNestedPartTargetView, targetNestedpart);
+ expectedTargetPartWithPort.put(flowportOnNestedPartTargetView, targetNestedpart);
+
+ //expectedTargetPartWithPort.put(subNestedPartContainer1TargetView, targetsubNestedPartContainer1);
+ //expectedTargetPartWithPort.put(subNestedPartContainer2TargetView, targetsubNestedPartContainer2);
+
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/reorient/connector/encapsulated/AbstractLinkReorientSourceConnectorTest.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/reorient/connector/encapsulated/AbstractLinkReorientSourceConnectorTest.java
new file mode 100755
index 0000000..8b0bcd3
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/reorient/connector/encapsulated/AbstractLinkReorientSourceConnectorTest.java
@@ -0,0 +1,30 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.reorient.connector.encapsulated;
+
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit abstract tests for Connector re-orient.
+ */
+public abstract class AbstractLinkReorientSourceConnectorTest extends org.eclipse.papyrus.sysml.diagram.internalblock.tests.reorient.connector.AbstractLinkReorientSourceConnectorTest {
+
+ @BeforeClass
+ public static void setPartBlockEncapsulated() throws Exception {
+ TestPrepareUtils.setBlockIsEncapsulated((Element) (partContainer1.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type())), true);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/reorient/connector/encapsulated/AbstractLinkReorientTargetConnectorTest.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/reorient/connector/encapsulated/AbstractLinkReorientTargetConnectorTest.java
new file mode 100755
index 0000000..2b2407a
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/reorient/connector/encapsulated/AbstractLinkReorientTargetConnectorTest.java
@@ -0,0 +1,31 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.reorient.connector.encapsulated;
+
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit abstract tests for Connector re-orient.
+ */
+public abstract class AbstractLinkReorientTargetConnectorTest extends org.eclipse.papyrus.sysml.diagram.internalblock.tests.reorient.connector.AbstractLinkReorientTargetConnectorTest {
+
+ @BeforeClass
+ public static void setPartBlockEncapsulated() throws Exception {
+ TestPrepareUtils.setBlockIsEncapsulated((Element) (partContainer1.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type())), true);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/reorient/connector/encapsulated/TestLinkReorientSourceConnector.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/reorient/connector/encapsulated/TestLinkReorientSourceConnector.java
new file mode 100755
index 0000000..9b1789d
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/reorient/connector/encapsulated/TestLinkReorientSourceConnector.java
@@ -0,0 +1,101 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.reorient.connector.encapsulated;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createGraphicalNode;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector re-orient.
+ */
+public class TestLinkReorientSourceConnector extends AbstractLinkReorientSourceConnectorTest {
+
+ @BeforeClass
+ public static void initRelationship() throws Exception {
+
+ // Prepare source and target
+ View container = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockStructureView = ViewUtil.getChildBySemanticHint(container, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+ View actorPartSourceView = createGraphicalNode(SysMLElementTypes.ACTOR_PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ View actorPartTargetView = createGraphicalNode(SysMLElementTypes.ACTOR_PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+
+ // Prepare relationship
+ relationshipView = TestPrepareUtils.createGraphicalLink(
+ UMLElementTypes.CONNECTOR,
+ UMLGraphicalTypes.LINK_UML_CONNECTOR_ID,
+ container,
+ EditorUtils.getEditPart(actorPartSourceView),
+ EditorUtils.getEditPart(actorPartTargetView));
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isReorientAllowed.put(getDiagramView(), false);
+
+ isReorientAllowed.put(blockSourceView, false);
+
+ isReorientAllowed.put(actorPartSourceView, true);
+ isReorientAllowed.put(nestedActorPartSourceView, false);
+
+ isReorientAllowed.put(portOnBlockSourceView, true);
+ isReorientAllowed.put(portOnPartSourceView, true);
+ isReorientAllowed.put(portOnNestedPartSourceView, false);
+
+ isReorientAllowed.put(flowportOnBlockSourceView, true);
+ isReorientAllowed.put(flowportOnPartSourceView, true);
+ isReorientAllowed.put(flowportOnNestedPartSourceView, false);
+
+ isReorientAllowed.put(partSourceView, true);
+ isReorientAllowed.put(nestedPartSourceView, false);
+
+ isReorientAllowed.put(propertySourceView, true);
+ isReorientAllowed.put(nestedPropertySourceView, false);
+
+ isReorientAllowed.put(referenceSourceView, true);
+ isReorientAllowed.put(nestedReferenceSourceView, false);
+
+ isReorientAllowed.put(valueSourceView, true);
+ isReorientAllowed.put(nestedValueSourceView, false);
+
+ isReorientAllowed.put(commentSourceView, false);
+ isReorientAllowed.put(commentCNSourceView, false);
+ isReorientAllowed.put(constraintSourceView, false);
+ isReorientAllowed.put(constraintCNSourceView, false);
+
+ // Initialize nested property path for tests
+ List<Property> emptyPath = Collections.emptyList();
+ for (View view : isReorientAllowed.keySet()) {
+ expectedNestedPath.put(view, emptyPath);
+ }
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/reorient/connector/encapsulated/TestLinkReorientTargetConnector.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/reorient/connector/encapsulated/TestLinkReorientTargetConnector.java
new file mode 100755
index 0000000..ef0a71d
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/reorient/connector/encapsulated/TestLinkReorientTargetConnector.java
@@ -0,0 +1,101 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.reorient.connector.encapsulated;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createGraphicalNode;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector re-orient.
+ */
+public class TestLinkReorientTargetConnector extends AbstractLinkReorientTargetConnectorTest {
+
+ @BeforeClass
+ public static void initRelationship() throws Exception {
+
+ // Prepare source and target
+ View container = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockStructureView = ViewUtil.getChildBySemanticHint(container, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+ View actorPartSourceView = createGraphicalNode(SysMLElementTypes.ACTOR_PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ View actorPartTargetView = createGraphicalNode(SysMLElementTypes.ACTOR_PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+
+ // Prepare relationship
+ relationshipView = TestPrepareUtils.createGraphicalLink(
+ UMLElementTypes.CONNECTOR,
+ UMLGraphicalTypes.LINK_UML_CONNECTOR_ID,
+ container,
+ EditorUtils.getEditPart(actorPartSourceView),
+ EditorUtils.getEditPart(actorPartTargetView));
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isReorientAllowed.put(getDiagramView(), false);
+
+ isReorientAllowed.put(blockTargetView, false);
+
+ isReorientAllowed.put(actorPartTargetView, true);
+ isReorientAllowed.put(nestedActorPartTargetView, false);
+
+ isReorientAllowed.put(portOnBlockTargetView, true);
+ isReorientAllowed.put(portOnPartTargetView, true);
+ isReorientAllowed.put(portOnNestedPartTargetView, false);
+
+ isReorientAllowed.put(flowportOnBlockTargetView, true);
+ isReorientAllowed.put(flowportOnPartTargetView, true);
+ isReorientAllowed.put(flowportOnNestedPartTargetView, false);
+
+ isReorientAllowed.put(partTargetView, true);
+ isReorientAllowed.put(nestedPartTargetView, false);
+
+ isReorientAllowed.put(propertyTargetView, true);
+ isReorientAllowed.put(nestedPropertyTargetView, false);
+
+ isReorientAllowed.put(referenceTargetView, true);
+ isReorientAllowed.put(nestedReferenceTargetView, false);
+
+ isReorientAllowed.put(valueTargetView, true);
+ isReorientAllowed.put(nestedValueTargetView, false);
+
+ isReorientAllowed.put(commentTargetView, false);
+ isReorientAllowed.put(commentCNTargetView, false);
+ isReorientAllowed.put(constraintTargetView, false);
+ isReorientAllowed.put(constraintCNTargetView, false);
+
+ // Initialize nested property path for tests
+ List<Property> emptyPath = Collections.emptyList();
+ for (View view : isReorientAllowed.keySet()) {
+ expectedNestedPath.put(view, emptyPath);
+ }
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/reorient/dependency/TestLinkReorientSourceDependency.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/reorient/dependency/TestLinkReorientSourceDependency.java
new file mode 100755
index 0000000..4ec3293
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/reorient/dependency/TestLinkReorientSourceDependency.java
@@ -0,0 +1,94 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.reorient.dependency;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createGraphicalNode;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.reorient.AbstractLinkReorientSourceTest;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Dependency re-orient.
+ */
+public class TestLinkReorientSourceDependency extends AbstractLinkReorientSourceTest {
+
+ @BeforeClass
+ public static void initRelationship() throws Exception {
+
+ // Prepare source and target
+ View container = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockStructureView = ViewUtil.getChildBySemanticHint(container, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+ View actorPartSourceView = createGraphicalNode(SysMLElementTypes.ACTOR_PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ View actorPartTargetView = createGraphicalNode(SysMLElementTypes.ACTOR_PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+
+ // Prepare relationship
+ relationshipView = TestPrepareUtils.createGraphicalLink(
+ UMLElementTypes.DEPENDENCY,
+ UMLGraphicalTypes.LINK_UML_DEPENDENCY_ID,
+ container,
+ EditorUtils.getEditPart(actorPartSourceView),
+ EditorUtils.getEditPart(actorPartTargetView));
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isReorientAllowed.put(getDiagramView(), false);
+
+ isReorientAllowed.put(blockSourceView, true);
+
+ isReorientAllowed.put(actorPartSourceView, true);
+ isReorientAllowed.put(nestedActorPartSourceView, true);
+
+ isReorientAllowed.put(portOnBlockSourceView, true);
+ isReorientAllowed.put(portOnPartSourceView, true);
+ isReorientAllowed.put(portOnNestedPartSourceView, true);
+
+ isReorientAllowed.put(flowportOnBlockSourceView, true);
+ isReorientAllowed.put(flowportOnPartSourceView, true);
+ isReorientAllowed.put(flowportOnNestedPartSourceView, true);
+
+ isReorientAllowed.put(partSourceView, true);
+ isReorientAllowed.put(nestedPartSourceView, true);
+ isReorientAllowed.put(subNestedPartContainer1SourceView, true);
+ isReorientAllowed.put(subNestedPartContainer2SourceView, true);
+
+ isReorientAllowed.put(propertySourceView, true);
+ isReorientAllowed.put(nestedPropertySourceView, true);
+
+ isReorientAllowed.put(referenceSourceView, true);
+ isReorientAllowed.put(nestedReferenceSourceView, true);
+
+ isReorientAllowed.put(valueSourceView, true);
+ isReorientAllowed.put(nestedValueSourceView, true);
+
+ isReorientAllowed.put(commentSourceView, false);
+ isReorientAllowed.put(commentCNSourceView, false);
+ isReorientAllowed.put(constraintSourceView, true);
+ isReorientAllowed.put(constraintCNSourceView, true);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/reorient/dependency/TestLinkReorientTargetDependency.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/reorient/dependency/TestLinkReorientTargetDependency.java
new file mode 100755
index 0000000..8f38427
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/reorient/dependency/TestLinkReorientTargetDependency.java
@@ -0,0 +1,92 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.reorient.dependency;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createGraphicalNode;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.reorient.AbstractLinkReorientTargetTest;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Dependency re-orient.
+ */
+public class TestLinkReorientTargetDependency extends AbstractLinkReorientTargetTest {
+
+ @BeforeClass
+ public static void initRelationship() throws Exception {
+
+ // Prepare source and target
+ View container = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockStructureView = ViewUtil.getChildBySemanticHint(container, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+ View actorPartSourceView = createGraphicalNode(SysMLElementTypes.ACTOR_PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ View actorPartTargetView = createGraphicalNode(SysMLElementTypes.ACTOR_PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+
+ // Prepare relationship
+ relationshipView = TestPrepareUtils.createGraphicalLink(
+ UMLElementTypes.DEPENDENCY,
+ UMLGraphicalTypes.LINK_UML_DEPENDENCY_ID,
+ container,
+ EditorUtils.getEditPart(actorPartSourceView),
+ EditorUtils.getEditPart(actorPartTargetView));
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isReorientAllowed.put(getDiagramView(), false);
+
+ isReorientAllowed.put(blockTargetView, true);
+
+ isReorientAllowed.put(actorPartTargetView, true);
+ isReorientAllowed.put(nestedActorPartTargetView, true);
+
+ isReorientAllowed.put(portOnBlockTargetView, true);
+ isReorientAllowed.put(portOnPartTargetView, true);
+ isReorientAllowed.put(portOnNestedPartTargetView, true);
+
+ isReorientAllowed.put(flowportOnBlockTargetView, true);
+ isReorientAllowed.put(flowportOnPartTargetView, true);
+ isReorientAllowed.put(flowportOnNestedPartTargetView, true);
+
+ isReorientAllowed.put(partTargetView, true);
+ isReorientAllowed.put(nestedPartTargetView, true);
+
+ isReorientAllowed.put(propertyTargetView, true);
+ isReorientAllowed.put(nestedPropertyTargetView, true);
+
+ isReorientAllowed.put(referenceTargetView, true);
+ isReorientAllowed.put(nestedReferenceTargetView, true);
+
+ isReorientAllowed.put(valueTargetView, true);
+ isReorientAllowed.put(nestedValueTargetView, true);
+
+ isReorientAllowed.put(commentTargetView, false);
+ isReorientAllowed.put(commentCNTargetView, false);
+ isReorientAllowed.put(constraintTargetView, true);
+ isReorientAllowed.put(constraintCNTargetView, true);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/set/encapsulation/AbstractSetEncapsulationDeleteConnectorTest.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/set/encapsulation/AbstractSetEncapsulationDeleteConnectorTest.java
new file mode 100755
index 0000000..1d33f49
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/set/encapsulation/AbstractSetEncapsulationDeleteConnectorTest.java
@@ -0,0 +1,236 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.set.encapsulation;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestUtils.setEncapsulationDeleteConnectorTest;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.AbstractLinkPrepareTest;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit abstract tests for encapsulation modification effect on Connector test (via palette tools).
+ */
+public abstract class AbstractSetEncapsulationDeleteConnectorTest extends AbstractLinkPrepareTest {
+
+ public static View sourceView;
+
+ public static final Map<View, Boolean> isConnectorDestroyed = new HashMap<View, Boolean>();
+
+ public Element block;
+
+ @BeforeClass
+ public static void initializeConnectorDestroyedMap() {
+ houseKeeper.cleanUpLater(isConnectorDestroyed);
+ }
+
+ @Before
+ public void initBlock() {
+ block = (Element)(partContainer1.getElement().eGet(UMLPackage.eINSTANCE.getTypedElement_Type()));
+ }
+
+ @Test
+ public void setEncapsulationDeleteConnectorWithTargetActorPart() throws Exception {
+ View targetView = actorPartTargetView;
+ setEncapsulationDeleteConnectorTest(block, sourceView, targetView, isCreationAllowed.get(targetView), isConnectorDestroyed.get(targetView));
+ }
+
+ @Test
+ public void setEncapsulationDeleteConnectorWithTargetNestedActorPart() throws Exception {
+ View targetView = nestedActorPartTargetView;
+ setEncapsulationDeleteConnectorTest(block, sourceView, targetView, isCreationAllowed.get(targetView), isConnectorDestroyed.get(targetView));
+ }
+
+ @Test
+ public void setEncapsulationDeleteConnectorWithTargetPortOnBlock() throws Exception {
+ View targetView = portOnBlockTargetView;
+ setEncapsulationDeleteConnectorTest(block, sourceView, targetView, isCreationAllowed.get(targetView), isConnectorDestroyed.get(targetView));
+ }
+
+ @Test
+ public void setEncapsulationDeleteConnectorWithTargetPortOnPart() throws Exception {
+ View targetView = portOnPartTargetView;
+ setEncapsulationDeleteConnectorTest(block, sourceView, targetView, isCreationAllowed.get(targetView), isConnectorDestroyed.get(targetView));
+ }
+
+ @Test
+ public void setEncapsulationDeleteConnectorWithTargetPortOnNestedPart() throws Exception {
+ View targetView = portOnNestedPartTargetView;
+ setEncapsulationDeleteConnectorTest(block, sourceView, targetView, isCreationAllowed.get(targetView), isConnectorDestroyed.get(targetView));
+ }
+
+ @Test
+ public void setEncapsulationDeleteConnectorWithTargetFlowPortOnBlock() throws Exception {
+ View targetView = flowportOnBlockTargetView;
+ setEncapsulationDeleteConnectorTest(block, sourceView, targetView, isCreationAllowed.get(targetView), isConnectorDestroyed.get(targetView));
+ }
+
+ @Test
+ public void setEncapsulationDeleteConnectorWithTargetFlowPortOnPart() throws Exception {
+ View targetView = flowportOnPartTargetView;
+ setEncapsulationDeleteConnectorTest(block, sourceView, targetView, isCreationAllowed.get(targetView), isConnectorDestroyed.get(targetView));
+ }
+
+ @Test
+ public void setEncapsulationDeleteConnectorWithTargetFlowPortOnNestedPart() throws Exception {
+ View targetView = flowportOnNestedPartTargetView;
+ setEncapsulationDeleteConnectorTest(block, sourceView, targetView, isCreationAllowed.get(targetView), isConnectorDestroyed.get(targetView));
+ }
+
+ @Test
+ public void setEncapsulationDeleteConnectorWithTargetPart() throws Exception {
+ View targetView = partTargetView;
+ setEncapsulationDeleteConnectorTest(block, sourceView, targetView, isCreationAllowed.get(targetView), isConnectorDestroyed.get(targetView));
+ }
+
+ @Test
+ public void setEncapsulationDeleteConnectorWithTargetNestedPart() throws Exception {
+ View targetView = nestedPartTargetView;
+ setEncapsulationDeleteConnectorTest(block, sourceView, targetView, isCreationAllowed.get(targetView), isConnectorDestroyed.get(targetView));
+ }
+
+ @Test
+ public void setEncapsulationDeleteConnectorWithTargetProperty() throws Exception {
+ View targetView = propertyTargetView;
+ setEncapsulationDeleteConnectorTest(block, sourceView, targetView, isCreationAllowed.get(targetView), isConnectorDestroyed.get(targetView));
+ }
+
+ @Test
+ public void setEncapsulationDeleteConnectorWithTargetNestedProperty() throws Exception {
+ View targetView = nestedPropertyTargetView;
+ setEncapsulationDeleteConnectorTest(block, sourceView, targetView, isCreationAllowed.get(targetView), isConnectorDestroyed.get(targetView));
+ }
+
+ @Test
+ public void setEncapsulationDeleteConnectorWithTargetReference() throws Exception {
+ View targetView = referenceTargetView;
+ setEncapsulationDeleteConnectorTest(block, sourceView, targetView, isCreationAllowed.get(targetView), isConnectorDestroyed.get(targetView));
+ }
+
+ @Test
+ public void setEncapsulationDeleteConnectorWithTargetNestedReference() throws Exception {
+ View targetView = nestedReferenceTargetView;
+ setEncapsulationDeleteConnectorTest(block, sourceView, targetView, isCreationAllowed.get(targetView), isConnectorDestroyed.get(targetView));
+ }
+
+ @Test
+ public void setEncapsulationDeleteConnectorWithTargetValue() throws Exception {
+ View targetView = valueTargetView;
+ setEncapsulationDeleteConnectorTest(block, sourceView, targetView, isCreationAllowed.get(targetView), isConnectorDestroyed.get(targetView));
+ }
+
+ @Test
+ public void setEncapsulationDeleteConnectorWithTargetNestedValue() throws Exception {
+ View targetView = nestedValueTargetView;
+ setEncapsulationDeleteConnectorTest(block, sourceView, targetView, isCreationAllowed.get(targetView), isConnectorDestroyed.get(targetView));
+ }
+
+ @Test
+ public void setEncapsulationDeleteConnectorWithTargetDeepNestedActorPart1_1_1() throws Exception {
+ View targetView = subNestedActorPartContainer1_1_1TargetView;
+ setEncapsulationDeleteConnectorTest(block, sourceView, targetView, isCreationAllowed.get(targetView), isConnectorDestroyed.get(targetView));
+ }
+
+ @Test
+ public void setEncapsulationDeleteConnectorWithTargetDeepNestedActorPart1_2_1() throws Exception {
+ View targetView = subNestedActorPartContainer1_2_1TargetView;
+ setEncapsulationDeleteConnectorTest(block, sourceView, targetView, isCreationAllowed.get(targetView), isConnectorDestroyed.get(targetView));
+ }
+
+ @Test
+ public void setEncapsulationDeleteConnectorWithTargetDeepNestedActorPart1_1_2() throws Exception {
+ View targetView = subNestedActorPartContainer1_1_2TargetView;
+ setEncapsulationDeleteConnectorTest(block, sourceView, targetView, isCreationAllowed.get(targetView), isConnectorDestroyed.get(targetView));
+ }
+
+ @Test
+ public void setEncapsulationDeleteConnectorWithTargetDeepNestedPart1_1_1() throws Exception {
+ View targetView = subNestedPartContainer1_1_1TargetView;
+ setEncapsulationDeleteConnectorTest(block, sourceView, targetView, isCreationAllowed.get(targetView), isConnectorDestroyed.get(targetView));
+ }
+
+ @Test
+ public void setEncapsulationDeleteConnectorWithTargetDeepNestedPart1_2_1() throws Exception {
+ View targetView = subNestedPartContainer1_2_1TargetView;
+ setEncapsulationDeleteConnectorTest(block, sourceView, targetView, isCreationAllowed.get(targetView), isConnectorDestroyed.get(targetView));
+ }
+
+ @Test
+ public void setEncapsulationDeleteConnectorWithTargetDeepNestedPart1_1_2() throws Exception {
+ View targetView = subNestedPartContainer1_1_2TargetView;
+ setEncapsulationDeleteConnectorTest(block, sourceView, targetView, isCreationAllowed.get(targetView), isConnectorDestroyed.get(targetView));
+ }
+
+ @Test
+ public void setEncapsulationDeleteConnectorWithTargetDeepNestedProperty1_1_1() throws Exception {
+ View targetView = subNestedPropertyContainer1_1_1TargetView;
+ setEncapsulationDeleteConnectorTest(block, sourceView, targetView, isCreationAllowed.get(targetView), isConnectorDestroyed.get(targetView));
+ }
+
+ @Test
+ public void setEncapsulationDeleteConnectorWithTargetDeepNestedProperty1_2_1() throws Exception {
+ View targetView = subNestedPropertyContainer1_2_1TargetView;
+ setEncapsulationDeleteConnectorTest(block, sourceView, targetView, isCreationAllowed.get(targetView), isConnectorDestroyed.get(targetView));
+ }
+
+ @Test
+ public void setEncapsulationDeleteConnectorWithTargetDeepNestedProperty1_1_2() throws Exception {
+ View targetView = subNestedPropertyContainer1_1_2TargetView;
+ setEncapsulationDeleteConnectorTest(block, sourceView, targetView, isCreationAllowed.get(targetView), isConnectorDestroyed.get(targetView));
+ }
+
+ @Test
+ public void setEncapsulationDeleteConnectorWithTargetDeepNestedReference1_1_1() throws Exception {
+ View targetView = subNestedReferenceContainer1_1_1TargetView;
+ setEncapsulationDeleteConnectorTest(block, sourceView, targetView, isCreationAllowed.get(targetView), isConnectorDestroyed.get(targetView));
+ }
+
+ @Test
+ public void setEncapsulationDeleteConnectorWithTargetDeepNestedReference1_2_1() throws Exception {
+ View targetView = subNestedReferenceContainer1_2_1TargetView;
+ setEncapsulationDeleteConnectorTest(block, sourceView, targetView, isCreationAllowed.get(targetView), isConnectorDestroyed.get(targetView));
+ }
+
+ @Test
+ public void setEncapsulationDeleteConnectorWithTargetDeepNestedReference1_1_2() throws Exception {
+ View targetView = subNestedReferenceContainer1_1_2TargetView;
+ setEncapsulationDeleteConnectorTest(block, sourceView, targetView, isCreationAllowed.get(targetView), isConnectorDestroyed.get(targetView));
+ }
+
+ @Test
+ public void setEncapsulationDeleteConnectorWithTargetDeepNestedValue1_1_1() throws Exception {
+ View targetView = subNestedValueContainer1_1_1TargetView;
+ setEncapsulationDeleteConnectorTest(block, sourceView, targetView, isCreationAllowed.get(targetView), isConnectorDestroyed.get(targetView));
+ }
+
+ @Test
+ public void setEncapsulationDeleteConnectorWithTargetDeepNestedValue1_2_1() throws Exception {
+ View targetView = subNestedValueContainer1_2_1TargetView;
+ setEncapsulationDeleteConnectorTest(block, sourceView, targetView, isCreationAllowed.get(targetView), isConnectorDestroyed.get(targetView));
+ }
+
+ @Test
+ public void setEncapsulationDeleteConnectorWithTargetDeepNestedValue1_1_2() throws Exception {
+ View targetView = subNestedValueContainer1_1_2TargetView;
+ setEncapsulationDeleteConnectorTest(block, sourceView, targetView, isCreationAllowed.get(targetView), isConnectorDestroyed.get(targetView));
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/set/encapsulation/TestSetEncapsulationDeleteConnectorFromActorPart.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/set/encapsulation/TestSetEncapsulationDeleteConnectorFromActorPart.java
new file mode 100755
index 0000000..570fd00
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/set/encapsulation/TestSetEncapsulationDeleteConnectorFromActorPart.java
@@ -0,0 +1,79 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.set.encapsulation;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link removal during Block#setIsEncapsulated() test (via palette tools).
+ */
+public class TestSetEncapsulationDeleteConnectorFromActorPart extends AbstractSetEncapsulationDeleteConnectorTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = actorPartSourceView;
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isConnectorDestroyed.put(actorPartTargetView, false);
+ isConnectorDestroyed.put(nestedActorPartTargetView, true);
+ isConnectorDestroyed.put(subNestedActorPartContainer1_1_1TargetView, true);
+ isConnectorDestroyed.put(subNestedActorPartContainer1_2_1TargetView, true);
+ isConnectorDestroyed.put(subNestedActorPartContainer1_1_2TargetView, false); // block which is changed is in the other hierarchy of part
+
+ isConnectorDestroyed.put(portOnBlockTargetView, false);
+ isConnectorDestroyed.put(portOnPartTargetView, false);
+ isConnectorDestroyed.put(portOnNestedPartTargetView, true);
+
+ isConnectorDestroyed.put(flowportOnBlockTargetView, false);
+ isConnectorDestroyed.put(flowportOnPartTargetView, false);
+ isConnectorDestroyed.put(flowportOnNestedPartTargetView, true);
+
+ isConnectorDestroyed.put(partTargetView, false);
+ isConnectorDestroyed.put(nestedPartTargetView, true);
+ isConnectorDestroyed.put(subNestedPartContainer1_1_1TargetView, true);
+ isConnectorDestroyed.put(subNestedPartContainer1_2_1TargetView, true);
+ isConnectorDestroyed.put(subNestedPartContainer1_1_2TargetView, false); // block which is changed is in the other hierarchy of part
+
+ isConnectorDestroyed.put(propertyTargetView, false);
+ isConnectorDestroyed.put(nestedPropertyTargetView, true);
+ isConnectorDestroyed.put(subNestedPropertyContainer1_1_1TargetView, true);
+ isConnectorDestroyed.put(subNestedPropertyContainer1_2_1TargetView, true);
+ isConnectorDestroyed.put(subNestedPropertyContainer1_1_2TargetView, false); // block which is changed is in the other hierarchy of part
+
+ isConnectorDestroyed.put(referenceTargetView, false);
+ isConnectorDestroyed.put(nestedReferenceTargetView, true);
+ isConnectorDestroyed.put(subNestedReferenceContainer1_1_1TargetView, true);
+ isConnectorDestroyed.put(subNestedReferenceContainer1_2_1TargetView, true);
+ isConnectorDestroyed.put(subNestedReferenceContainer1_1_2TargetView, false); // block which is changed is in the other hierarchy of part
+
+ isConnectorDestroyed.put(valueTargetView, false);
+ isConnectorDestroyed.put(nestedValueTargetView, true);
+ isConnectorDestroyed.put(subNestedValueContainer1_1_1TargetView, true);
+ isConnectorDestroyed.put(subNestedValueContainer1_2_1TargetView, true);
+ isConnectorDestroyed.put(subNestedValueContainer1_1_2TargetView, false); // block which is changed is in the other hierarchy of part
+
+ // Initialize connector creation possibility
+ for(View view : isConnectorDestroyed.keySet()) {
+ isCreationAllowed.put(view, true);
+ }
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/set/encapsulation/TestSetEncapsulationDeleteConnectorFromFlowPortOnBlock.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/set/encapsulation/TestSetEncapsulationDeleteConnectorFromFlowPortOnBlock.java
new file mode 100755
index 0000000..568e327
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/set/encapsulation/TestSetEncapsulationDeleteConnectorFromFlowPortOnBlock.java
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.set.encapsulation;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link removal during Block#setIsEncapsulated() test (via palette tools).
+ */
+public class TestSetEncapsulationDeleteConnectorFromFlowPortOnBlock extends AbstractSetEncapsulationDeleteConnectorTest {
+
+ @BeforeClass
+ public static void init() throws Exception {
+ sourceView = flowportOnBlockSourceView;
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isConnectorDestroyed.put(actorPartTargetView, false);
+ isConnectorDestroyed.put(nestedActorPartTargetView, true);
+ isConnectorDestroyed.put(subNestedActorPartContainer1_1_1TargetView, true);
+ isConnectorDestroyed.put(subNestedActorPartContainer1_2_1TargetView, true);
+ isConnectorDestroyed.put(subNestedActorPartContainer1_1_2TargetView, false); // block which is changed is the type block of the other container.
+
+ isConnectorDestroyed.put(portOnBlockTargetView, false);
+ isConnectorDestroyed.put(portOnPartTargetView, false);
+ isConnectorDestroyed.put(portOnNestedPartTargetView, true);
+
+ isConnectorDestroyed.put(flowportOnBlockTargetView, false);
+ isConnectorDestroyed.put(flowportOnPartTargetView, false);
+ isConnectorDestroyed.put(flowportOnNestedPartTargetView, true);
+
+ isConnectorDestroyed.put(partTargetView, false);
+ isConnectorDestroyed.put(nestedPartTargetView, true);
+ isConnectorDestroyed.put(subNestedPartContainer1_1_1TargetView, true);
+ isConnectorDestroyed.put(subNestedPartContainer1_2_1TargetView, true);
+ isConnectorDestroyed.put(subNestedPartContainer1_1_2TargetView, false); // block which is changed is the type block of the other container.
+
+ isConnectorDestroyed.put(propertyTargetView, false);
+ isConnectorDestroyed.put(nestedPropertyTargetView, true);
+ isConnectorDestroyed.put(subNestedPropertyContainer1_1_1TargetView, true);
+ isConnectorDestroyed.put(subNestedPropertyContainer1_2_1TargetView, true);
+ isConnectorDestroyed.put(subNestedPropertyContainer1_1_2TargetView, false); // block which is changed is the type block of the other container.
+
+ isConnectorDestroyed.put(referenceTargetView, false);
+ isConnectorDestroyed.put(nestedReferenceTargetView, true);
+ isConnectorDestroyed.put(subNestedReferenceContainer1_1_1TargetView, true);
+ isConnectorDestroyed.put(subNestedReferenceContainer1_2_1TargetView, true);
+ isConnectorDestroyed.put(subNestedReferenceContainer1_1_2TargetView, false); // block which is changed is the type block of the other container.
+
+ isConnectorDestroyed.put(valueTargetView, false);
+ isConnectorDestroyed.put(nestedValueTargetView, true);
+ isConnectorDestroyed.put(subNestedValueContainer1_1_1TargetView, true);
+ isConnectorDestroyed.put(subNestedValueContainer1_2_1TargetView, true);
+ isConnectorDestroyed.put(subNestedValueContainer1_1_2TargetView, false); // block which is changed is the type block of the other container.
+
+ // Initialize connector creation possibility
+ for(View view : isConnectorDestroyed.keySet()) {
+ isCreationAllowed.put(view, true);
+ }
+ isCreationAllowed.put(portOnBlockTargetView, false);
+ isCreationAllowed.put(flowportOnBlockTargetView, false);
+
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/set/encapsulation/TestSetEncapsulationDeleteConnectorFromFlowPortOnNestedPart.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/set/encapsulation/TestSetEncapsulationDeleteConnectorFromFlowPortOnNestedPart.java
new file mode 100755
index 0000000..05aa79c
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/set/encapsulation/TestSetEncapsulationDeleteConnectorFromFlowPortOnNestedPart.java
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.set.encapsulation;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link removal during Block#setIsEncapsulated() test (via palette tools).
+ */
+public class TestSetEncapsulationDeleteConnectorFromFlowPortOnNestedPart extends AbstractSetEncapsulationDeleteConnectorTest {
+
+ @BeforeClass
+ public static void init() throws Exception {
+ sourceView = flowportOnNestedPartSourceView;
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isConnectorDestroyed.put(actorPartTargetView, true);
+ isConnectorDestroyed.put(nestedActorPartTargetView, false);
+ isConnectorDestroyed.put(subNestedActorPartContainer1_1_1TargetView, false);
+ isConnectorDestroyed.put(subNestedActorPartContainer1_2_1TargetView, false);
+ isConnectorDestroyed.put(subNestedActorPartContainer1_1_2TargetView, true); // goes outside, to partContainer2
+
+ isConnectorDestroyed.put(portOnBlockTargetView, true);
+ isConnectorDestroyed.put(portOnPartTargetView, true);
+ isConnectorDestroyed.put(portOnNestedPartTargetView, false);
+
+ isConnectorDestroyed.put(flowportOnBlockTargetView, true);
+ isConnectorDestroyed.put(flowportOnPartTargetView, true);
+ isConnectorDestroyed.put(flowportOnNestedPartTargetView, false);
+
+ isConnectorDestroyed.put(partTargetView, true);
+ isConnectorDestroyed.put(nestedPartTargetView, false);
+ isConnectorDestroyed.put(subNestedPartContainer1_1_1TargetView, false);
+ isConnectorDestroyed.put(subNestedPartContainer1_2_1TargetView, false);
+ isConnectorDestroyed.put(subNestedPartContainer1_1_2TargetView, true); // goes outside, to partContainer2
+
+ isConnectorDestroyed.put(propertyTargetView, true);
+ isConnectorDestroyed.put(nestedPropertyTargetView, false);
+ isConnectorDestroyed.put(subNestedPropertyContainer1_1_1TargetView, false);
+ isConnectorDestroyed.put(subNestedPropertyContainer1_2_1TargetView, false);
+ isConnectorDestroyed.put(subNestedPropertyContainer1_1_2TargetView, true); // goes outside, to partContainer2
+
+ isConnectorDestroyed.put(referenceTargetView, true);
+ isConnectorDestroyed.put(nestedReferenceTargetView, false);
+ isConnectorDestroyed.put(subNestedReferenceContainer1_1_1TargetView, false);
+ isConnectorDestroyed.put(subNestedReferenceContainer1_2_1TargetView, false);
+ isConnectorDestroyed.put(subNestedReferenceContainer1_1_2TargetView, true); // goes outside, to partContainer2
+
+ isConnectorDestroyed.put(valueTargetView, true);
+ isConnectorDestroyed.put(nestedValueTargetView, false);
+ isConnectorDestroyed.put(subNestedValueContainer1_1_1TargetView, false);
+ isConnectorDestroyed.put(subNestedValueContainer1_2_1TargetView, false);
+ isConnectorDestroyed.put(subNestedValueContainer1_1_2TargetView, true); // goes outside, to partContainer2
+
+ // Initialize connector creation possibility
+ for(View view : isConnectorDestroyed.keySet()) {
+ isCreationAllowed.put(view, true);
+ }
+
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/set/encapsulation/TestSetEncapsulationDeleteConnectorFromFlowPortOnPart.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/set/encapsulation/TestSetEncapsulationDeleteConnectorFromFlowPortOnPart.java
new file mode 100755
index 0000000..e4dc514
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/set/encapsulation/TestSetEncapsulationDeleteConnectorFromFlowPortOnPart.java
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.set.encapsulation;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link removal during Block#setIsEncapsulated() test (via palette tools).
+ */
+public class TestSetEncapsulationDeleteConnectorFromFlowPortOnPart extends AbstractSetEncapsulationDeleteConnectorTest {
+
+ @BeforeClass
+ public static void init() throws Exception {
+ sourceView = flowportOnPartSourceView;
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isConnectorDestroyed.put(actorPartTargetView, false);
+ isConnectorDestroyed.put(nestedActorPartTargetView, false);
+ isConnectorDestroyed.put(subNestedActorPartContainer1_1_1TargetView, false);
+ isConnectorDestroyed.put(subNestedActorPartContainer1_2_1TargetView, false);
+ isConnectorDestroyed.put(subNestedActorPartContainer1_1_2TargetView, false);
+
+ isConnectorDestroyed.put(portOnBlockTargetView, false);
+ isConnectorDestroyed.put(portOnPartTargetView, false);
+ isConnectorDestroyed.put(portOnNestedPartTargetView, false);
+
+ isConnectorDestroyed.put(flowportOnBlockTargetView, false);
+ isConnectorDestroyed.put(flowportOnPartTargetView, false);
+ isConnectorDestroyed.put(flowportOnNestedPartTargetView, false);
+
+ isConnectorDestroyed.put(partTargetView, false);
+ isConnectorDestroyed.put(nestedPartTargetView, false);
+ isConnectorDestroyed.put(subNestedPartContainer1_1_1TargetView, false);
+ isConnectorDestroyed.put(subNestedPartContainer1_2_1TargetView, false);
+ isConnectorDestroyed.put(subNestedPartContainer1_1_2TargetView, false);
+
+ isConnectorDestroyed.put(propertyTargetView, false);
+ isConnectorDestroyed.put(nestedPropertyTargetView, false);
+ isConnectorDestroyed.put(subNestedPropertyContainer1_1_1TargetView, false);
+ isConnectorDestroyed.put(subNestedPropertyContainer1_2_1TargetView, false);
+ isConnectorDestroyed.put(subNestedPropertyContainer1_1_2TargetView, false);
+
+ isConnectorDestroyed.put(referenceTargetView, false);
+ isConnectorDestroyed.put(nestedReferenceTargetView, false);
+ isConnectorDestroyed.put(subNestedReferenceContainer1_1_1TargetView, false);
+ isConnectorDestroyed.put(subNestedReferenceContainer1_2_1TargetView, false);
+ isConnectorDestroyed.put(subNestedReferenceContainer1_1_2TargetView, false);
+
+ isConnectorDestroyed.put(valueTargetView, false);
+ isConnectorDestroyed.put(nestedValueTargetView, false);
+ isConnectorDestroyed.put(subNestedValueContainer1_1_1TargetView, false);
+ isConnectorDestroyed.put(subNestedValueContainer1_2_1TargetView, false);
+ isConnectorDestroyed.put(subNestedValueContainer1_1_2TargetView, false);
+
+ // Initialize connector creation possibility
+ for(View view : isConnectorDestroyed.keySet()) {
+ isCreationAllowed.put(view, true);
+ }
+
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/set/encapsulation/TestSetEncapsulationDeleteConnectorFromNestedActorPart.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/set/encapsulation/TestSetEncapsulationDeleteConnectorFromNestedActorPart.java
new file mode 100755
index 0000000..5790c38
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/set/encapsulation/TestSetEncapsulationDeleteConnectorFromNestedActorPart.java
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.set.encapsulation;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link removal during Block#setIsEncapsulated() test (via palette tools).
+ */
+public class TestSetEncapsulationDeleteConnectorFromNestedActorPart extends AbstractSetEncapsulationDeleteConnectorTest {
+
+ @BeforeClass
+ public static void init() throws Exception {
+ sourceView = nestedActorPartSourceView;
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isConnectorDestroyed.put(actorPartTargetView, true);
+ isConnectorDestroyed.put(nestedActorPartTargetView, false);
+ isConnectorDestroyed.put(subNestedActorPartContainer1_1_1TargetView, false);
+ isConnectorDestroyed.put(subNestedActorPartContainer1_2_1TargetView, false);
+ isConnectorDestroyed.put(subNestedActorPartContainer1_1_2TargetView, true); // goes outside, to partContainer2
+
+ isConnectorDestroyed.put(portOnBlockTargetView, true);
+ isConnectorDestroyed.put(portOnPartTargetView, true);
+ isConnectorDestroyed.put(portOnNestedPartTargetView, false);
+
+ isConnectorDestroyed.put(flowportOnBlockTargetView, true);
+ isConnectorDestroyed.put(flowportOnPartTargetView, true);
+ isConnectorDestroyed.put(flowportOnNestedPartTargetView, false);
+
+ isConnectorDestroyed.put(partTargetView, true);
+ isConnectorDestroyed.put(nestedPartTargetView, false);
+ isConnectorDestroyed.put(subNestedPartContainer1_1_1TargetView, false);
+ isConnectorDestroyed.put(subNestedPartContainer1_2_1TargetView, false);
+ isConnectorDestroyed.put(subNestedPartContainer1_1_2TargetView, true); // goes outside, to partContainer2
+
+ isConnectorDestroyed.put(propertyTargetView, true);
+ isConnectorDestroyed.put(nestedPropertyTargetView, false);
+ isConnectorDestroyed.put(subNestedPropertyContainer1_1_1TargetView, false);
+ isConnectorDestroyed.put(subNestedPropertyContainer1_2_1TargetView, false);
+ isConnectorDestroyed.put(subNestedPropertyContainer1_1_2TargetView, true); // goes outside, to partContainer2
+
+ isConnectorDestroyed.put(referenceTargetView, true);
+ isConnectorDestroyed.put(nestedReferenceTargetView, false);
+ isConnectorDestroyed.put(subNestedReferenceContainer1_1_1TargetView, false);
+ isConnectorDestroyed.put(subNestedReferenceContainer1_2_1TargetView, false);
+ isConnectorDestroyed.put(subNestedReferenceContainer1_1_2TargetView, true); // goes outside, to partContainer2
+
+ isConnectorDestroyed.put(valueTargetView, true);
+ isConnectorDestroyed.put(nestedValueTargetView, false);
+ isConnectorDestroyed.put(subNestedValueContainer1_1_1TargetView, false);
+ isConnectorDestroyed.put(subNestedValueContainer1_2_1TargetView, false);
+ isConnectorDestroyed.put(subNestedValueContainer1_1_2TargetView, true); // goes outside, to partContainer2
+
+ // Initialize connector creation possibility
+ for(View view : isConnectorDestroyed.keySet()) {
+ isCreationAllowed.put(view, true);
+ }
+
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/set/encapsulation/TestSetEncapsulationDeleteConnectorFromNestedPart.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/set/encapsulation/TestSetEncapsulationDeleteConnectorFromNestedPart.java
new file mode 100755
index 0000000..ea31184
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/set/encapsulation/TestSetEncapsulationDeleteConnectorFromNestedPart.java
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.set.encapsulation;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link removal during Block#setIsEncapsulated() test (via palette tools).
+ */
+public class TestSetEncapsulationDeleteConnectorFromNestedPart extends AbstractSetEncapsulationDeleteConnectorTest {
+
+ @BeforeClass
+ public static void init() throws Exception {
+ sourceView = nestedPartSourceView;
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isConnectorDestroyed.put(actorPartTargetView, true);
+ isConnectorDestroyed.put(nestedActorPartTargetView, false);
+ isConnectorDestroyed.put(subNestedActorPartContainer1_1_1TargetView, false);
+ isConnectorDestroyed.put(subNestedActorPartContainer1_2_1TargetView, false);
+ isConnectorDestroyed.put(subNestedActorPartContainer1_1_2TargetView, true); // goes outside, to partContainer2
+
+ isConnectorDestroyed.put(portOnBlockTargetView, true);
+ isConnectorDestroyed.put(portOnPartTargetView, true);
+ isConnectorDestroyed.put(portOnNestedPartTargetView, false);
+
+ isConnectorDestroyed.put(flowportOnBlockTargetView, true);
+ isConnectorDestroyed.put(flowportOnPartTargetView, true);
+ isConnectorDestroyed.put(flowportOnNestedPartTargetView, false);
+
+ isConnectorDestroyed.put(partTargetView, true);
+ isConnectorDestroyed.put(nestedPartTargetView, false);
+ isConnectorDestroyed.put(subNestedPartContainer1_1_1TargetView, false);
+ isConnectorDestroyed.put(subNestedPartContainer1_2_1TargetView, false);
+ isConnectorDestroyed.put(subNestedPartContainer1_1_2TargetView, true); // goes outside, to partContainer2
+
+ isConnectorDestroyed.put(propertyTargetView, true);
+ isConnectorDestroyed.put(nestedPropertyTargetView, false);
+ isConnectorDestroyed.put(subNestedPropertyContainer1_1_1TargetView, false);
+ isConnectorDestroyed.put(subNestedPropertyContainer1_2_1TargetView, false);
+ isConnectorDestroyed.put(subNestedPropertyContainer1_1_2TargetView, true); // goes outside, to partContainer2
+
+ isConnectorDestroyed.put(referenceTargetView, true);
+ isConnectorDestroyed.put(nestedReferenceTargetView, false);
+ isConnectorDestroyed.put(subNestedReferenceContainer1_1_1TargetView, false);
+ isConnectorDestroyed.put(subNestedReferenceContainer1_2_1TargetView, false);
+ isConnectorDestroyed.put(subNestedReferenceContainer1_1_2TargetView, true); // goes outside, to partContainer2
+
+ isConnectorDestroyed.put(valueTargetView, true);
+ isConnectorDestroyed.put(nestedValueTargetView, false);
+ isConnectorDestroyed.put(subNestedValueContainer1_1_1TargetView, false);
+ isConnectorDestroyed.put(subNestedValueContainer1_2_1TargetView, false);
+ isConnectorDestroyed.put(subNestedValueContainer1_1_2TargetView, true); // goes outside, to partContainer2
+
+ // Initialize connector creation possibility
+ for(View view : isConnectorDestroyed.keySet()) {
+ isCreationAllowed.put(view, true);
+ }
+
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/set/encapsulation/TestSetEncapsulationDeleteConnectorFromNestedProperty.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/set/encapsulation/TestSetEncapsulationDeleteConnectorFromNestedProperty.java
new file mode 100755
index 0000000..9ad2d50
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/set/encapsulation/TestSetEncapsulationDeleteConnectorFromNestedProperty.java
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.set.encapsulation;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link removal during Block#setIsEncapsulated() test (via palette tools).
+ */
+public class TestSetEncapsulationDeleteConnectorFromNestedProperty extends AbstractSetEncapsulationDeleteConnectorTest {
+
+ @BeforeClass
+ public static void init() throws Exception {
+ sourceView = nestedPropertySourceView;
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isConnectorDestroyed.put(actorPartTargetView, true);
+ isConnectorDestroyed.put(nestedActorPartTargetView, false);
+ isConnectorDestroyed.put(subNestedActorPartContainer1_1_1TargetView, false);
+ isConnectorDestroyed.put(subNestedActorPartContainer1_2_1TargetView, false);
+ isConnectorDestroyed.put(subNestedActorPartContainer1_1_2TargetView, true); // goes outside, to partContainer2
+
+ isConnectorDestroyed.put(portOnBlockTargetView, true);
+ isConnectorDestroyed.put(portOnPartTargetView, true);
+ isConnectorDestroyed.put(portOnNestedPartTargetView, false);
+
+ isConnectorDestroyed.put(flowportOnBlockTargetView, true);
+ isConnectorDestroyed.put(flowportOnPartTargetView, true);
+ isConnectorDestroyed.put(flowportOnNestedPartTargetView, false);
+
+ isConnectorDestroyed.put(partTargetView, true);
+ isConnectorDestroyed.put(nestedPartTargetView, false);
+ isConnectorDestroyed.put(subNestedPartContainer1_1_1TargetView, false);
+ isConnectorDestroyed.put(subNestedPartContainer1_2_1TargetView, false);
+ isConnectorDestroyed.put(subNestedPartContainer1_1_2TargetView, true); // goes outside, to partContainer2
+
+ isConnectorDestroyed.put(propertyTargetView, true);
+ isConnectorDestroyed.put(nestedPropertyTargetView, false);
+ isConnectorDestroyed.put(subNestedPropertyContainer1_1_1TargetView, false);
+ isConnectorDestroyed.put(subNestedPropertyContainer1_2_1TargetView, false);
+ isConnectorDestroyed.put(subNestedPropertyContainer1_1_2TargetView, true); // goes outside, to partContainer2
+
+ isConnectorDestroyed.put(referenceTargetView, true);
+ isConnectorDestroyed.put(nestedReferenceTargetView, false);
+ isConnectorDestroyed.put(subNestedReferenceContainer1_1_1TargetView, false);
+ isConnectorDestroyed.put(subNestedReferenceContainer1_2_1TargetView, false);
+ isConnectorDestroyed.put(subNestedReferenceContainer1_1_2TargetView, true); // goes outside, to partContainer2
+
+ isConnectorDestroyed.put(valueTargetView, true);
+ isConnectorDestroyed.put(nestedValueTargetView, false);
+ isConnectorDestroyed.put(subNestedValueContainer1_1_1TargetView, false);
+ isConnectorDestroyed.put(subNestedValueContainer1_2_1TargetView, false);
+ isConnectorDestroyed.put(subNestedValueContainer1_1_2TargetView, true); // goes outside, to partContainer2
+
+ // Initialize connector creation possibility
+ for(View view : isConnectorDestroyed.keySet()) {
+ isCreationAllowed.put(view, true);
+ }
+
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/set/encapsulation/TestSetEncapsulationDeleteConnectorFromNestedReference.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/set/encapsulation/TestSetEncapsulationDeleteConnectorFromNestedReference.java
new file mode 100755
index 0000000..14d3f52
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/set/encapsulation/TestSetEncapsulationDeleteConnectorFromNestedReference.java
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.set.encapsulation;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link removal during Block#setIsEncapsulated() test (via palette tools).
+ */
+public class TestSetEncapsulationDeleteConnectorFromNestedReference extends AbstractSetEncapsulationDeleteConnectorTest {
+
+ @BeforeClass
+ public static void init() throws Exception {
+ sourceView = nestedReferenceSourceView;
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isConnectorDestroyed.put(actorPartTargetView, true);
+ isConnectorDestroyed.put(nestedActorPartTargetView, false);
+ isConnectorDestroyed.put(subNestedActorPartContainer1_1_1TargetView, false);
+ isConnectorDestroyed.put(subNestedActorPartContainer1_2_1TargetView, false);
+ isConnectorDestroyed.put(subNestedActorPartContainer1_1_2TargetView, true); // goes outside, to partContainer2
+
+ isConnectorDestroyed.put(portOnBlockTargetView, true);
+ isConnectorDestroyed.put(portOnPartTargetView, true);
+ isConnectorDestroyed.put(portOnNestedPartTargetView, false);
+
+ isConnectorDestroyed.put(flowportOnBlockTargetView, true);
+ isConnectorDestroyed.put(flowportOnPartTargetView, true);
+ isConnectorDestroyed.put(flowportOnNestedPartTargetView, false);
+
+ isConnectorDestroyed.put(partTargetView, true);
+ isConnectorDestroyed.put(nestedPartTargetView, false);
+ isConnectorDestroyed.put(subNestedPartContainer1_1_1TargetView, false);
+ isConnectorDestroyed.put(subNestedPartContainer1_2_1TargetView, false);
+ isConnectorDestroyed.put(subNestedPartContainer1_1_2TargetView, true); // goes outside, to partContainer2
+
+ isConnectorDestroyed.put(propertyTargetView, true);
+ isConnectorDestroyed.put(nestedPropertyTargetView, false);
+ isConnectorDestroyed.put(subNestedPropertyContainer1_1_1TargetView, false);
+ isConnectorDestroyed.put(subNestedPropertyContainer1_2_1TargetView, false);
+ isConnectorDestroyed.put(subNestedPropertyContainer1_1_2TargetView, true); // goes outside, to partContainer2
+
+ isConnectorDestroyed.put(referenceTargetView, true);
+ isConnectorDestroyed.put(nestedReferenceTargetView, false);
+ isConnectorDestroyed.put(subNestedReferenceContainer1_1_1TargetView, false);
+ isConnectorDestroyed.put(subNestedReferenceContainer1_2_1TargetView, false);
+ isConnectorDestroyed.put(subNestedReferenceContainer1_1_2TargetView, true); // goes outside, to partContainer2
+
+ isConnectorDestroyed.put(valueTargetView, true);
+ isConnectorDestroyed.put(nestedValueTargetView, false);
+ isConnectorDestroyed.put(subNestedValueContainer1_1_1TargetView, false);
+ isConnectorDestroyed.put(subNestedValueContainer1_2_1TargetView, false);
+ isConnectorDestroyed.put(subNestedValueContainer1_1_2TargetView, true); // goes outside, to partContainer2
+
+ // Initialize connector creation possibility
+ for(View view : isConnectorDestroyed.keySet()) {
+ isCreationAllowed.put(view, true);
+ }
+
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/set/encapsulation/TestSetEncapsulationDeleteConnectorFromNestedValue.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/set/encapsulation/TestSetEncapsulationDeleteConnectorFromNestedValue.java
new file mode 100755
index 0000000..4eb5249
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/set/encapsulation/TestSetEncapsulationDeleteConnectorFromNestedValue.java
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.set.encapsulation;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link removal during Block#setIsEncapsulated() test (via palette tools).
+ */
+public class TestSetEncapsulationDeleteConnectorFromNestedValue extends AbstractSetEncapsulationDeleteConnectorTest {
+
+ @BeforeClass
+ public static void init() throws Exception {
+ sourceView = nestedValueSourceView;
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isConnectorDestroyed.put(actorPartTargetView, true);
+ isConnectorDestroyed.put(nestedActorPartTargetView, false);
+ isConnectorDestroyed.put(subNestedActorPartContainer1_1_1TargetView, false);
+ isConnectorDestroyed.put(subNestedActorPartContainer1_2_1TargetView, false);
+ isConnectorDestroyed.put(subNestedActorPartContainer1_1_2TargetView, true); // goes outside, to partContainer2
+
+ isConnectorDestroyed.put(portOnBlockTargetView, true);
+ isConnectorDestroyed.put(portOnPartTargetView, true);
+ isConnectorDestroyed.put(portOnNestedPartTargetView, false);
+
+ isConnectorDestroyed.put(flowportOnBlockTargetView, true);
+ isConnectorDestroyed.put(flowportOnPartTargetView, true);
+ isConnectorDestroyed.put(flowportOnNestedPartTargetView, false);
+
+ isConnectorDestroyed.put(partTargetView, true);
+ isConnectorDestroyed.put(nestedPartTargetView, false);
+ isConnectorDestroyed.put(subNestedPartContainer1_1_1TargetView, false);
+ isConnectorDestroyed.put(subNestedPartContainer1_2_1TargetView, false);
+ isConnectorDestroyed.put(subNestedPartContainer1_1_2TargetView, true); // goes outside, to partContainer2
+
+ isConnectorDestroyed.put(propertyTargetView, true);
+ isConnectorDestroyed.put(nestedPropertyTargetView, false);
+ isConnectorDestroyed.put(subNestedPropertyContainer1_1_1TargetView, false);
+ isConnectorDestroyed.put(subNestedPropertyContainer1_2_1TargetView, false);
+ isConnectorDestroyed.put(subNestedPropertyContainer1_1_2TargetView, true); // goes outside, to partContainer2
+
+ isConnectorDestroyed.put(referenceTargetView, true);
+ isConnectorDestroyed.put(nestedReferenceTargetView, false);
+ isConnectorDestroyed.put(subNestedReferenceContainer1_1_1TargetView, false);
+ isConnectorDestroyed.put(subNestedReferenceContainer1_2_1TargetView, false);
+ isConnectorDestroyed.put(subNestedReferenceContainer1_1_2TargetView, true); // goes outside, to partContainer2
+
+ isConnectorDestroyed.put(valueTargetView, true);
+ isConnectorDestroyed.put(nestedValueTargetView, false);
+ isConnectorDestroyed.put(subNestedValueContainer1_1_1TargetView, false);
+ isConnectorDestroyed.put(subNestedValueContainer1_2_1TargetView, false);
+ isConnectorDestroyed.put(subNestedValueContainer1_1_2TargetView, true); // goes outside, to partContainer2
+
+ // Initialize connector creation possibility
+ for(View view : isConnectorDestroyed.keySet()) {
+ isCreationAllowed.put(view, true);
+ }
+
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/set/encapsulation/TestSetEncapsulationDeleteConnectorFromPart.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/set/encapsulation/TestSetEncapsulationDeleteConnectorFromPart.java
new file mode 100755
index 0000000..e32a283
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/set/encapsulation/TestSetEncapsulationDeleteConnectorFromPart.java
@@ -0,0 +1,79 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.set.encapsulation;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link removal during Block#setIsEncapsulated() test (via palette tools).
+ */
+public class TestSetEncapsulationDeleteConnectorFromPart extends AbstractSetEncapsulationDeleteConnectorTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = partSourceView;
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isConnectorDestroyed.put(actorPartTargetView, false);
+ isConnectorDestroyed.put(nestedActorPartTargetView, true);
+ isConnectorDestroyed.put(subNestedActorPartContainer1_1_1TargetView, true);
+ isConnectorDestroyed.put(subNestedActorPartContainer1_2_1TargetView, true);
+ isConnectorDestroyed.put(subNestedActorPartContainer1_1_2TargetView, false); // block which is changed is in the other hierarchy of part
+
+ isConnectorDestroyed.put(portOnBlockTargetView, false);
+ isConnectorDestroyed.put(portOnPartTargetView, false);
+ isConnectorDestroyed.put(portOnNestedPartTargetView, true);
+
+ isConnectorDestroyed.put(flowportOnBlockTargetView, false);
+ isConnectorDestroyed.put(flowportOnPartTargetView, false);
+ isConnectorDestroyed.put(flowportOnNestedPartTargetView, true);
+
+ isConnectorDestroyed.put(partTargetView, false);
+ isConnectorDestroyed.put(nestedPartTargetView, true);
+ isConnectorDestroyed.put(subNestedPartContainer1_1_1TargetView, true);
+ isConnectorDestroyed.put(subNestedPartContainer1_2_1TargetView, true);
+ isConnectorDestroyed.put(subNestedPartContainer1_1_2TargetView, false); // block which is changed is in the other hierarchy of part
+
+ isConnectorDestroyed.put(propertyTargetView, false);
+ isConnectorDestroyed.put(nestedPropertyTargetView, true);
+ isConnectorDestroyed.put(subNestedPropertyContainer1_1_1TargetView, true);
+ isConnectorDestroyed.put(subNestedPropertyContainer1_2_1TargetView, true);
+ isConnectorDestroyed.put(subNestedPropertyContainer1_1_2TargetView, false); // block which is changed is in the other hierarchy of part
+
+ isConnectorDestroyed.put(referenceTargetView, false);
+ isConnectorDestroyed.put(nestedReferenceTargetView, true);
+ isConnectorDestroyed.put(subNestedReferenceContainer1_1_1TargetView, true);
+ isConnectorDestroyed.put(subNestedReferenceContainer1_2_1TargetView, true);
+ isConnectorDestroyed.put(subNestedReferenceContainer1_1_2TargetView, false); // block which is changed is in the other hierarchy of part
+
+ isConnectorDestroyed.put(valueTargetView, false);
+ isConnectorDestroyed.put(nestedValueTargetView, true);
+ isConnectorDestroyed.put(subNestedValueContainer1_1_1TargetView, true);
+ isConnectorDestroyed.put(subNestedValueContainer1_2_1TargetView, true);
+ isConnectorDestroyed.put(subNestedValueContainer1_1_2TargetView, false); // block which is changed is in the other hierarchy of part
+
+ // Initialize connector creation possibility
+ for(View view : isConnectorDestroyed.keySet()) {
+ isCreationAllowed.put(view, true);
+ }
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/set/encapsulation/TestSetEncapsulationDeleteConnectorFromPortOnBlock.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/set/encapsulation/TestSetEncapsulationDeleteConnectorFromPortOnBlock.java
new file mode 100755
index 0000000..7439396
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/set/encapsulation/TestSetEncapsulationDeleteConnectorFromPortOnBlock.java
@@ -0,0 +1,86 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.set.encapsulation;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link removal during Block#setIsEncapsulated() test (via palette tools).
+ */
+public class TestSetEncapsulationDeleteConnectorFromPortOnBlock extends AbstractSetEncapsulationDeleteConnectorTest {
+
+ @BeforeClass
+ public static void init() throws Exception {
+ sourceView = portOnBlockSourceView;
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isConnectorDestroyed.put(actorPartTargetView, false);
+ isConnectorDestroyed.put(nestedActorPartTargetView, true);
+ isConnectorDestroyed.put(subNestedActorPartContainer1_1_1TargetView, true);
+ isConnectorDestroyed.put(subNestedActorPartContainer1_2_1TargetView, true);
+ isConnectorDestroyed.put(subNestedActorPartContainer1_1_2TargetView, false);
+
+
+ isConnectorDestroyed.put(portOnBlockTargetView, false);
+ isConnectorDestroyed.put(portOnPartTargetView, false);
+ isConnectorDestroyed.put(portOnNestedPartTargetView, true);
+
+ isConnectorDestroyed.put(flowportOnBlockTargetView, false);
+ isConnectorDestroyed.put(flowportOnPartTargetView, false);
+ isConnectorDestroyed.put(flowportOnNestedPartTargetView, true);
+
+ isConnectorDestroyed.put(partTargetView, false);
+ isConnectorDestroyed.put(nestedPartTargetView, true);
+ isConnectorDestroyed.put(subNestedPartContainer1_1_1TargetView, true);
+ isConnectorDestroyed.put(subNestedPartContainer1_2_1TargetView, true);
+ isConnectorDestroyed.put(subNestedPartContainer1_1_2TargetView, false);
+
+ isConnectorDestroyed.put(propertyTargetView, false);
+ isConnectorDestroyed.put(nestedPropertyTargetView, true);
+ isConnectorDestroyed.put(subNestedPropertyContainer1_1_1TargetView, true);
+ isConnectorDestroyed.put(subNestedPropertyContainer1_2_1TargetView, true);
+ isConnectorDestroyed.put(subNestedPropertyContainer1_1_2TargetView, false);
+
+
+ isConnectorDestroyed.put(referenceTargetView, false);
+ isConnectorDestroyed.put(nestedReferenceTargetView, true);
+ isConnectorDestroyed.put(subNestedReferenceContainer1_1_1TargetView, true);
+ isConnectorDestroyed.put(subNestedReferenceContainer1_2_1TargetView, true);
+ isConnectorDestroyed.put(subNestedReferenceContainer1_1_2TargetView, false);
+
+
+ isConnectorDestroyed.put(valueTargetView, false);
+ isConnectorDestroyed.put(nestedValueTargetView, true);
+ isConnectorDestroyed.put(subNestedValueContainer1_1_1TargetView, true);
+ isConnectorDestroyed.put(subNestedValueContainer1_2_1TargetView, true);
+ isConnectorDestroyed.put(subNestedValueContainer1_1_2TargetView, false);
+
+
+ // Initialize connector creation possibility
+ for(View view : isConnectorDestroyed.keySet()) {
+ isCreationAllowed.put(view, true);
+ }
+ isCreationAllowed.put(portOnBlockTargetView, false);
+ isCreationAllowed.put(flowportOnBlockTargetView, false);
+
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/set/encapsulation/TestSetEncapsulationDeleteConnectorFromPortOnNestedPart.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/set/encapsulation/TestSetEncapsulationDeleteConnectorFromPortOnNestedPart.java
new file mode 100755
index 0000000..c81bf33
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/set/encapsulation/TestSetEncapsulationDeleteConnectorFromPortOnNestedPart.java
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.set.encapsulation;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link removal during Block#setIsEncapsulated() test (via palette tools).
+ */
+public class TestSetEncapsulationDeleteConnectorFromPortOnNestedPart extends AbstractSetEncapsulationDeleteConnectorTest {
+
+ @BeforeClass
+ public static void init() throws Exception {
+ sourceView = portOnNestedPartSourceView;
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isConnectorDestroyed.put(actorPartTargetView, true);
+ isConnectorDestroyed.put(nestedActorPartTargetView, false);
+ isConnectorDestroyed.put(subNestedActorPartContainer1_1_1TargetView, false);
+ isConnectorDestroyed.put(subNestedActorPartContainer1_2_1TargetView, false);
+ isConnectorDestroyed.put(subNestedActorPartContainer1_1_2TargetView, true);
+
+ isConnectorDestroyed.put(portOnBlockTargetView, true);
+ isConnectorDestroyed.put(portOnPartTargetView, true);
+ isConnectorDestroyed.put(portOnNestedPartTargetView, false);
+
+ isConnectorDestroyed.put(flowportOnBlockTargetView, true);
+ isConnectorDestroyed.put(flowportOnPartTargetView, true);
+ isConnectorDestroyed.put(flowportOnNestedPartTargetView, false);
+
+ isConnectorDestroyed.put(partTargetView, true);
+ isConnectorDestroyed.put(nestedPartTargetView, false);
+ isConnectorDestroyed.put(subNestedPartContainer1_1_1TargetView, false);
+ isConnectorDestroyed.put(subNestedPartContainer1_2_1TargetView, false);
+ isConnectorDestroyed.put(subNestedPartContainer1_1_2TargetView, true);
+
+
+ isConnectorDestroyed.put(propertyTargetView, true);
+ isConnectorDestroyed.put(nestedPropertyTargetView, false);
+ isConnectorDestroyed.put(subNestedPropertyContainer1_1_1TargetView, false);
+ isConnectorDestroyed.put(subNestedPropertyContainer1_2_1TargetView, false);
+ isConnectorDestroyed.put(subNestedPropertyContainer1_1_2TargetView, true);
+
+ isConnectorDestroyed.put(referenceTargetView, true);
+ isConnectorDestroyed.put(nestedReferenceTargetView, false);
+ isConnectorDestroyed.put(subNestedReferenceContainer1_1_1TargetView, false);
+ isConnectorDestroyed.put(subNestedReferenceContainer1_2_1TargetView, false);
+ isConnectorDestroyed.put(subNestedReferenceContainer1_1_2TargetView, true);
+
+ isConnectorDestroyed.put(valueTargetView, true);
+ isConnectorDestroyed.put(nestedValueTargetView, false);
+ isConnectorDestroyed.put(subNestedValueContainer1_1_1TargetView, false);
+ isConnectorDestroyed.put(subNestedValueContainer1_2_1TargetView, false);
+ isConnectorDestroyed.put(subNestedValueContainer1_1_2TargetView, true);
+
+ // Initialize connector creation possibility
+ for(View view : isConnectorDestroyed.keySet()) {
+ isCreationAllowed.put(view, true);
+ }
+
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/set/encapsulation/TestSetEncapsulationDeleteConnectorFromPortOnPart.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/set/encapsulation/TestSetEncapsulationDeleteConnectorFromPortOnPart.java
new file mode 100755
index 0000000..9c55cfb
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/set/encapsulation/TestSetEncapsulationDeleteConnectorFromPortOnPart.java
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.set.encapsulation;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link removal during Block#setIsEncapsulated() test (via palette tools).
+ */
+public class TestSetEncapsulationDeleteConnectorFromPortOnPart extends AbstractSetEncapsulationDeleteConnectorTest {
+
+ @BeforeClass
+ public static void init() throws Exception {
+ sourceView = portOnPartSourceView;
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isConnectorDestroyed.put(actorPartTargetView, false);
+ isConnectorDestroyed.put(nestedActorPartTargetView, false);
+ isConnectorDestroyed.put(subNestedActorPartContainer1_1_1TargetView, false);
+ isConnectorDestroyed.put(subNestedActorPartContainer1_2_1TargetView, false);
+ isConnectorDestroyed.put(subNestedActorPartContainer1_1_2TargetView, false);
+
+ isConnectorDestroyed.put(portOnBlockTargetView, false);
+ isConnectorDestroyed.put(portOnPartTargetView, false);
+ isConnectorDestroyed.put(portOnNestedPartTargetView, false);
+
+ isConnectorDestroyed.put(flowportOnBlockTargetView, false);
+ isConnectorDestroyed.put(flowportOnPartTargetView, false);
+ isConnectorDestroyed.put(flowportOnNestedPartTargetView, false);
+
+ isConnectorDestroyed.put(partTargetView, false);
+ isConnectorDestroyed.put(nestedPartTargetView, false);
+ isConnectorDestroyed.put(subNestedPartContainer1_1_1TargetView, false);
+ isConnectorDestroyed.put(subNestedPartContainer1_2_1TargetView, false);
+ isConnectorDestroyed.put(subNestedPartContainer1_1_2TargetView, false);
+
+ isConnectorDestroyed.put(propertyTargetView, false);
+ isConnectorDestroyed.put(nestedPropertyTargetView, false);
+ isConnectorDestroyed.put(subNestedPropertyContainer1_1_1TargetView, false);
+ isConnectorDestroyed.put(subNestedPropertyContainer1_2_1TargetView, false);
+ isConnectorDestroyed.put(subNestedPropertyContainer1_1_2TargetView, false);
+
+ isConnectorDestroyed.put(referenceTargetView, false);
+ isConnectorDestroyed.put(nestedReferenceTargetView, false);
+ isConnectorDestroyed.put(subNestedReferenceContainer1_1_1TargetView, false);
+ isConnectorDestroyed.put(subNestedReferenceContainer1_2_1TargetView, false);
+ isConnectorDestroyed.put(subNestedReferenceContainer1_1_2TargetView, false);
+
+ isConnectorDestroyed.put(valueTargetView, false);
+ isConnectorDestroyed.put(nestedValueTargetView, false);
+ isConnectorDestroyed.put(subNestedValueContainer1_1_1TargetView, false);
+ isConnectorDestroyed.put(subNestedValueContainer1_2_1TargetView, false);
+ isConnectorDestroyed.put(subNestedValueContainer1_1_2TargetView, false);
+
+ // Initialize connector creation possibility
+ for(View view : isConnectorDestroyed.keySet()) {
+ isCreationAllowed.put(view, true);
+ }
+
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/set/encapsulation/TestSetEncapsulationDeleteConnectorFromProperty.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/set/encapsulation/TestSetEncapsulationDeleteConnectorFromProperty.java
new file mode 100755
index 0000000..a5de3bf
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/set/encapsulation/TestSetEncapsulationDeleteConnectorFromProperty.java
@@ -0,0 +1,79 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.set.encapsulation;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link removal during Block#setIsEncapsulated() test (via palette tools).
+ */
+public class TestSetEncapsulationDeleteConnectorFromProperty extends AbstractSetEncapsulationDeleteConnectorTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = propertySourceView;
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isConnectorDestroyed.put(actorPartTargetView, false);
+ isConnectorDestroyed.put(nestedActorPartTargetView, true);
+ isConnectorDestroyed.put(subNestedActorPartContainer1_1_1TargetView, true);
+ isConnectorDestroyed.put(subNestedActorPartContainer1_2_1TargetView, true);
+ isConnectorDestroyed.put(subNestedActorPartContainer1_1_2TargetView, false); // block which is changed is in the other hierarchy of part
+
+ isConnectorDestroyed.put(portOnBlockTargetView, false);
+ isConnectorDestroyed.put(portOnPartTargetView, false);
+ isConnectorDestroyed.put(portOnNestedPartTargetView, true);
+
+ isConnectorDestroyed.put(flowportOnBlockTargetView, false);
+ isConnectorDestroyed.put(flowportOnPartTargetView, false);
+ isConnectorDestroyed.put(flowportOnNestedPartTargetView, true);
+
+ isConnectorDestroyed.put(partTargetView, false);
+ isConnectorDestroyed.put(nestedPartTargetView, true);
+ isConnectorDestroyed.put(subNestedPartContainer1_1_1TargetView, true);
+ isConnectorDestroyed.put(subNestedPartContainer1_2_1TargetView, true);
+ isConnectorDestroyed.put(subNestedPartContainer1_1_2TargetView, false); // block which is changed is in the other hierarchy of part
+
+ isConnectorDestroyed.put(propertyTargetView, false);
+ isConnectorDestroyed.put(nestedPropertyTargetView, true);
+ isConnectorDestroyed.put(subNestedPropertyContainer1_1_1TargetView, true);
+ isConnectorDestroyed.put(subNestedPropertyContainer1_2_1TargetView, true);
+ isConnectorDestroyed.put(subNestedPropertyContainer1_1_2TargetView, false); // block which is changed is in the other hierarchy of part
+
+ isConnectorDestroyed.put(referenceTargetView, false);
+ isConnectorDestroyed.put(nestedReferenceTargetView, true);
+ isConnectorDestroyed.put(subNestedReferenceContainer1_1_1TargetView, true);
+ isConnectorDestroyed.put(subNestedReferenceContainer1_2_1TargetView, true);
+ isConnectorDestroyed.put(subNestedReferenceContainer1_1_2TargetView, false); // block which is changed is in the other hierarchy of part
+
+ isConnectorDestroyed.put(valueTargetView, false);
+ isConnectorDestroyed.put(nestedValueTargetView, true);
+ isConnectorDestroyed.put(subNestedValueContainer1_1_1TargetView, true);
+ isConnectorDestroyed.put(subNestedValueContainer1_2_1TargetView, true);
+ isConnectorDestroyed.put(subNestedValueContainer1_1_2TargetView, false); // block which is changed is in the other hierarchy of part
+
+ // Initialize connector creation possibility
+ for(View view : isConnectorDestroyed.keySet()) {
+ isCreationAllowed.put(view, true);
+ }
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/set/encapsulation/TestSetEncapsulationDeleteConnectorFromReference.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/set/encapsulation/TestSetEncapsulationDeleteConnectorFromReference.java
new file mode 100755
index 0000000..82aded4
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/set/encapsulation/TestSetEncapsulationDeleteConnectorFromReference.java
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.set.encapsulation;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link removal during Block#setIsEncapsulated() test (via palette tools).
+ */
+public class TestSetEncapsulationDeleteConnectorFromReference extends AbstractSetEncapsulationDeleteConnectorTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = referenceSourceView;
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isConnectorDestroyed.put(actorPartTargetView, false);
+ isConnectorDestroyed.put(nestedActorPartTargetView, true);
+ isConnectorDestroyed.put(subNestedActorPartContainer1_1_1TargetView, true);
+ isConnectorDestroyed.put(subNestedActorPartContainer1_2_1TargetView, true);
+ isConnectorDestroyed.put(subNestedActorPartContainer1_1_2TargetView, false); // block which is changed is in the other hierarchy of part
+
+ isConnectorDestroyed.put(portOnBlockTargetView, false);
+ isConnectorDestroyed.put(portOnPartTargetView, false);
+ isConnectorDestroyed.put(portOnNestedPartTargetView, true);
+
+ isConnectorDestroyed.put(flowportOnBlockTargetView, false);
+ isConnectorDestroyed.put(flowportOnPartTargetView, false);
+ isConnectorDestroyed.put(flowportOnNestedPartTargetView, true);
+
+ isConnectorDestroyed.put(partTargetView, false);
+ isConnectorDestroyed.put(nestedPartTargetView, true);
+ isConnectorDestroyed.put(subNestedPartContainer1_1_1TargetView, true);
+ isConnectorDestroyed.put(subNestedPartContainer1_2_1TargetView, true);
+ isConnectorDestroyed.put(subNestedPartContainer1_1_2TargetView, false); // block which is changed is in the other hierarchy of part
+
+ isConnectorDestroyed.put(propertyTargetView, false);
+ isConnectorDestroyed.put(nestedPropertyTargetView, true);
+ isConnectorDestroyed.put(subNestedPropertyContainer1_1_1TargetView, true);
+ isConnectorDestroyed.put(subNestedPropertyContainer1_2_1TargetView, true);
+ isConnectorDestroyed.put(subNestedPropertyContainer1_1_2TargetView, false); // block which is changed is in the other hierarchy of part
+
+ isConnectorDestroyed.put(referenceTargetView, false);
+ isConnectorDestroyed.put(nestedReferenceTargetView, true);
+ isConnectorDestroyed.put(subNestedReferenceContainer1_1_1TargetView, true);
+ isConnectorDestroyed.put(subNestedReferenceContainer1_2_1TargetView, true);
+ isConnectorDestroyed.put(subNestedReferenceContainer1_1_2TargetView, false); // block which is changed is in the other hierarchy of part
+
+ isConnectorDestroyed.put(valueTargetView, false);
+ isConnectorDestroyed.put(nestedValueTargetView, true);
+ isConnectorDestroyed.put(subNestedValueContainer1_1_1TargetView, true);
+ isConnectorDestroyed.put(subNestedValueContainer1_2_1TargetView, true);
+ isConnectorDestroyed.put(subNestedValueContainer1_1_2TargetView, false); // block which is changed is in the other hierarchy of part
+
+ // Initialize connector creation possibility
+ for(View view : isConnectorDestroyed.keySet()) {
+ isCreationAllowed.put(view, true);
+ }
+ }
+
+}
+
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/set/encapsulation/TestSetEncapsulationDeleteConnectorFromValue.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/set/encapsulation/TestSetEncapsulationDeleteConnectorFromValue.java
new file mode 100755
index 0000000..7ae2c24
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/set/encapsulation/TestSetEncapsulationDeleteConnectorFromValue.java
@@ -0,0 +1,79 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.set.encapsulation;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link removal during Block#setIsEncapsulated() test (via palette tools).
+ */
+public class TestSetEncapsulationDeleteConnectorFromValue extends AbstractSetEncapsulationDeleteConnectorTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = valueSourceView;
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isConnectorDestroyed.put(actorPartTargetView, false);
+ isConnectorDestroyed.put(nestedActorPartTargetView, true);
+ isConnectorDestroyed.put(subNestedActorPartContainer1_1_1TargetView, true);
+ isConnectorDestroyed.put(subNestedActorPartContainer1_2_1TargetView, true);
+ isConnectorDestroyed.put(subNestedActorPartContainer1_1_2TargetView, false); // block which is changed is in the other hierarchy of part
+
+ isConnectorDestroyed.put(portOnBlockTargetView, false);
+ isConnectorDestroyed.put(portOnPartTargetView, false);
+ isConnectorDestroyed.put(portOnNestedPartTargetView, true);
+
+ isConnectorDestroyed.put(flowportOnBlockTargetView, false);
+ isConnectorDestroyed.put(flowportOnPartTargetView, false);
+ isConnectorDestroyed.put(flowportOnNestedPartTargetView, true);
+
+ isConnectorDestroyed.put(partTargetView, false);
+ isConnectorDestroyed.put(nestedPartTargetView, true);
+ isConnectorDestroyed.put(subNestedPartContainer1_1_1TargetView, true);
+ isConnectorDestroyed.put(subNestedPartContainer1_2_1TargetView, true);
+ isConnectorDestroyed.put(subNestedPartContainer1_1_2TargetView, false); // block which is changed is in the other hierarchy of part
+
+ isConnectorDestroyed.put(propertyTargetView, false);
+ isConnectorDestroyed.put(nestedPropertyTargetView, true);
+ isConnectorDestroyed.put(subNestedPropertyContainer1_1_1TargetView, true);
+ isConnectorDestroyed.put(subNestedPropertyContainer1_2_1TargetView, true);
+ isConnectorDestroyed.put(subNestedPropertyContainer1_1_2TargetView, false); // block which is changed is in the other hierarchy of part
+
+ isConnectorDestroyed.put(referenceTargetView, false);
+ isConnectorDestroyed.put(nestedReferenceTargetView, true);
+ isConnectorDestroyed.put(subNestedReferenceContainer1_1_1TargetView, true);
+ isConnectorDestroyed.put(subNestedReferenceContainer1_2_1TargetView, true);
+ isConnectorDestroyed.put(subNestedReferenceContainer1_1_2TargetView, false); // block which is changed is in the other hierarchy of part
+
+ isConnectorDestroyed.put(valueTargetView, false);
+ isConnectorDestroyed.put(nestedValueTargetView, true);
+ isConnectorDestroyed.put(subNestedValueContainer1_1_1TargetView, true);
+ isConnectorDestroyed.put(subNestedValueContainer1_2_1TargetView, true);
+ isConnectorDestroyed.put(subNestedValueContainer1_1_2TargetView, false); // block which is changed is in the other hierarchy of part
+
+ // Initialize connector creation possibility
+ for(View view : isConnectorDestroyed.keySet()) {
+ isCreationAllowed.put(view, true);
+ }
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/suites/AllAlternateDropTests.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/suites/AllAlternateDropTests.java
new file mode 100755
index 0000000..5de8976
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/suites/AllAlternateDropTests.java
@@ -0,0 +1,33 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.suites;
+
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.altdrop.DropNestedPartOnPartTest;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.altdrop.TestTypeDropOnBlock;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.altdrop.TestTypeDropOnTypedElement;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.altdrop.TestTypeDropOnTypedElementCompartment;
+import org.junit.runner.RunWith;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.junit.runners.Suite.SuiteClasses;
+
+
+@RunWith(ClassificationSuite.class)
+@SuiteClasses({
+ TestTypeDropOnBlock.class,
+ TestTypeDropOnTypedElement.class,
+ TestTypeDropOnTypedElementCompartment.class,
+ DropNestedPartOnPartTest.class
+})
+public class AllAlternateDropTests {
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/suites/AllCreationConnectorTests.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/suites/AllCreationConnectorTests.java
new file mode 100755
index 0000000..1556872
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/suites/AllCreationConnectorTests.java
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.suites;
+
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.TestLinkCreationConnectorForSources;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.TestLinkCreationConnectorFromActorPart;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.TestLinkCreationConnectorFromFlowPortOnBlock;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.TestLinkCreationConnectorFromFlowPortOnNestedPart;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.TestLinkCreationConnectorFromFlowPortOnPart;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.TestLinkCreationConnectorFromFlowPortOnSubNestedPart;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.TestLinkCreationConnectorFromNestedActorPart;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.TestLinkCreationConnectorFromNestedPart;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.TestLinkCreationConnectorFromNestedProperty;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.TestLinkCreationConnectorFromNestedReference;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.TestLinkCreationConnectorFromNestedValue;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.TestLinkCreationConnectorFromPart;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.TestLinkCreationConnectorFromPortOnBlock;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.TestLinkCreationConnectorFromPortOnNestedPart;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.TestLinkCreationConnectorFromPortOnPart;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.TestLinkCreationConnectorFromPortOnSubNestedPart;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.TestLinkCreationConnectorFromProperty;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.TestLinkCreationConnectorFromReference;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.TestLinkCreationConnectorFromSubNestedActorPart;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.TestLinkCreationConnectorFromSubNestedPart;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.TestLinkCreationConnectorFromSubNestedProperty;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.TestLinkCreationConnectorFromSubNestedReference;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.TestLinkCreationConnectorFromSubNestedValue;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.TestLinkCreationConnectorFromValue;
+import org.junit.runner.RunWith;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.junit.runners.Suite.SuiteClasses;
+
+@RunWith(ClassificationSuite.class)
+@SuiteClasses({
+
+ TestLinkCreationConnectorForSources.class,
+
+ // test from port
+ TestLinkCreationConnectorFromPortOnBlock.class,
+ TestLinkCreationConnectorFromPortOnPart.class,
+ TestLinkCreationConnectorFromPortOnNestedPart.class,
+ TestLinkCreationConnectorFromPortOnSubNestedPart.class,
+
+ // test from flowport
+ TestLinkCreationConnectorFromFlowPortOnBlock.class,
+ TestLinkCreationConnectorFromFlowPortOnPart.class,
+ TestLinkCreationConnectorFromFlowPortOnNestedPart.class,
+ TestLinkCreationConnectorFromFlowPortOnSubNestedPart.class,
+
+ // test from actor part
+ TestLinkCreationConnectorFromActorPart.class,
+ TestLinkCreationConnectorFromNestedActorPart.class,
+ TestLinkCreationConnectorFromSubNestedActorPart.class,
+
+ // test from part
+ TestLinkCreationConnectorFromPart.class,
+ TestLinkCreationConnectorFromNestedPart.class,
+ TestLinkCreationConnectorFromSubNestedPart.class,
+
+ // test from property
+ TestLinkCreationConnectorFromProperty.class,
+ TestLinkCreationConnectorFromNestedProperty.class,
+ TestLinkCreationConnectorFromSubNestedProperty.class,
+
+ // test from reference
+ TestLinkCreationConnectorFromReference.class,
+ TestLinkCreationConnectorFromNestedReference.class,
+ TestLinkCreationConnectorFromSubNestedReference.class,
+
+ // test from value
+ TestLinkCreationConnectorFromValue.class,
+ TestLinkCreationConnectorFromNestedValue.class,
+ TestLinkCreationConnectorFromSubNestedValue.class,
+
+})
+public class AllCreationConnectorTests {
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/suites/AllCreationConnectorWithDelegateTests.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/suites/AllCreationConnectorWithDelegateTests.java
new file mode 100755
index 0000000..84cfcd0
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/suites/AllCreationConnectorWithDelegateTests.java
@@ -0,0 +1,59 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.suites;
+
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.delegation.TestCreationAndTestDelegateFromActorPart;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.delegation.TestCreationAndTestDelegateFromFlowPortOnBlock;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.delegation.TestCreationAndTestDelegateFromFlowPortOnNestedPart;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.delegation.TestCreationAndTestDelegateFromFlowPortOnPart;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.delegation.TestCreationAndTestDelegateFromNestedActorPart;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.delegation.TestCreationAndTestDelegateFromNestedPart;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.delegation.TestCreationAndTestDelegateFromNestedProperty;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.delegation.TestCreationAndTestDelegateFromNestedReference;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.delegation.TestCreationAndTestDelegateFromNestedValue;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.delegation.TestCreationAndTestDelegateFromPart;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.delegation.TestCreationAndTestDelegateFromPortOnBlock;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.delegation.TestCreationAndTestDelegateFromPortOnNestedPart;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.delegation.TestCreationAndTestDelegateFromPortOnPart;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.delegation.TestCreationAndTestDelegateFromProperty;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.delegation.TestCreationAndTestDelegateFromReference;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.delegation.TestCreationAndTestDelegateFromValue;
+import org.junit.runner.RunWith;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.junit.runners.Suite.SuiteClasses;
+
+@RunWith(ClassificationSuite.class)
+@SuiteClasses({
+
+ TestCreationAndTestDelegateFromActorPart.class,
+ TestCreationAndTestDelegateFromFlowPortOnBlock.class,
+ TestCreationAndTestDelegateFromFlowPortOnNestedPart.class,
+ TestCreationAndTestDelegateFromFlowPortOnPart.class,
+ TestCreationAndTestDelegateFromNestedActorPart.class,
+ TestCreationAndTestDelegateFromNestedPart.class,
+ TestCreationAndTestDelegateFromNestedProperty.class,
+ TestCreationAndTestDelegateFromNestedReference.class,
+ TestCreationAndTestDelegateFromNestedValue.class,
+ TestCreationAndTestDelegateFromPortOnBlock.class,
+ TestCreationAndTestDelegateFromPortOnNestedPart.class,
+ TestCreationAndTestDelegateFromPortOnPart.class,
+ TestCreationAndTestDelegateFromPart.class,
+ TestCreationAndTestDelegateFromProperty.class,
+ TestCreationAndTestDelegateFromReference.class,
+ TestCreationAndTestDelegateFromValue.class
+
+ })
+public class AllCreationConnectorWithDelegateTests {
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/suites/AllCreationConnectorWithEncapsulatedPartTests.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/suites/AllCreationConnectorWithEncapsulatedPartTests.java
new file mode 100755
index 0000000..13ab0e3
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/suites/AllCreationConnectorWithEncapsulatedPartTests.java
@@ -0,0 +1,61 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.suites;
+
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.encapsulated.TestLinkCreationConnectorForSources;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.encapsulated.TestLinkCreationConnectorFromActorPart;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.encapsulated.TestLinkCreationConnectorFromFlowPortOnBlock;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.encapsulated.TestLinkCreationConnectorFromFlowPortOnNestedPart;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.encapsulated.TestLinkCreationConnectorFromFlowPortOnPart;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.encapsulated.TestLinkCreationConnectorFromNestedActorPart;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.encapsulated.TestLinkCreationConnectorFromNestedPart;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.encapsulated.TestLinkCreationConnectorFromNestedProperty;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.encapsulated.TestLinkCreationConnectorFromNestedReference;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.encapsulated.TestLinkCreationConnectorFromNestedValue;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.encapsulated.TestLinkCreationConnectorFromPart;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.encapsulated.TestLinkCreationConnectorFromPortOnBlock;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.encapsulated.TestLinkCreationConnectorFromPortOnNestedPart;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.encapsulated.TestLinkCreationConnectorFromPortOnPart;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.encapsulated.TestLinkCreationConnectorFromProperty;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.encapsulated.TestLinkCreationConnectorFromReference;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.connector.encapsulated.TestLinkCreationConnectorFromValue;
+import org.junit.runner.RunWith;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.junit.runners.Suite.SuiteClasses;
+
+@RunWith(ClassificationSuite.class)
+@SuiteClasses({
+
+ TestLinkCreationConnectorForSources.class,
+ TestLinkCreationConnectorFromActorPart.class,
+ TestLinkCreationConnectorFromFlowPortOnBlock.class,
+ TestLinkCreationConnectorFromFlowPortOnNestedPart.class,
+ TestLinkCreationConnectorFromFlowPortOnPart.class,
+ TestLinkCreationConnectorFromNestedActorPart.class,
+ TestLinkCreationConnectorFromNestedPart.class,
+ TestLinkCreationConnectorFromNestedProperty.class,
+ TestLinkCreationConnectorFromNestedReference.class,
+ TestLinkCreationConnectorFromNestedValue.class,
+ TestLinkCreationConnectorFromPortOnBlock.class,
+ TestLinkCreationConnectorFromPortOnNestedPart.class,
+ TestLinkCreationConnectorFromPortOnPart.class,
+ TestLinkCreationConnectorFromPart.class,
+ TestLinkCreationConnectorFromProperty.class,
+ TestLinkCreationConnectorFromReference.class,
+ TestLinkCreationConnectorFromValue.class
+
+ })
+public class AllCreationConnectorWithEncapsulatedPartTests {
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/suites/AllCreationCustomNodeTests.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/suites/AllCreationCustomNodeTests.java
new file mode 100755
index 0000000..5a0c553
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/suites/AllCreationCustomNodeTests.java
@@ -0,0 +1,70 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.suites;
+
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.node.TestNodeCreationOnActorPart;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.node.TestNodeCreationOnActorPartStructureCompartment;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.node.TestNodeCreationOnBlock;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.node.TestNodeCreationOnBlockStructureCompartment;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.node.TestNodeCreationOnNestedActorPart;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.node.TestNodeCreationOnNestedActorPartStructureCompartment;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.node.TestNodeCreationOnNestedPart;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.node.TestNodeCreationOnNestedPartStructureCompartment;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.node.TestNodeCreationOnNestedProperty;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.node.TestNodeCreationOnNestedPropertyStructureCompartment;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.node.TestNodeCreationOnNestedReference;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.node.TestNodeCreationOnNestedReferenceStructureCompartment;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.node.TestNodeCreationOnNestedValue;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.node.TestNodeCreationOnNestedValueStructureCompartment;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.node.TestNodeCreationOnPart;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.node.TestNodeCreationOnPartStructureCompartment;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.node.TestNodeCreationOnProperty;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.node.TestNodeCreationOnPropertyStructureCompartment;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.node.TestNodeCreationOnReference;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.node.TestNodeCreationOnReferenceStructureCompartment;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.node.TestNodeCreationOnValue;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.node.TestNodeCreationOnValueStructureCompartment;
+import org.junit.runner.RunWith;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.junit.runners.Suite.SuiteClasses;
+
+
+@RunWith(ClassificationSuite.class)
+@SuiteClasses({
+ TestNodeCreationOnActorPart.class,
+ TestNodeCreationOnActorPartStructureCompartment.class,
+ TestNodeCreationOnBlock.class,
+ TestNodeCreationOnBlockStructureCompartment.class,
+ TestNodeCreationOnPart.class,
+ TestNodeCreationOnPartStructureCompartment.class,
+ TestNodeCreationOnProperty.class,
+ TestNodeCreationOnPropertyStructureCompartment.class,
+ TestNodeCreationOnReference.class,
+ TestNodeCreationOnReferenceStructureCompartment.class,
+ TestNodeCreationOnValue.class,
+ TestNodeCreationOnValueStructureCompartment.class,
+ TestNodeCreationOnNestedActorPart.class,
+ TestNodeCreationOnNestedActorPartStructureCompartment.class,
+ TestNodeCreationOnNestedPart.class,
+ TestNodeCreationOnNestedPartStructureCompartment.class,
+ TestNodeCreationOnNestedProperty.class,
+ TestNodeCreationOnNestedPropertyStructureCompartment.class,
+ TestNodeCreationOnNestedReference.class,
+ TestNodeCreationOnNestedReferenceStructureCompartment.class,
+ TestNodeCreationOnNestedValue.class,
+ TestNodeCreationOnNestedValueStructureCompartment.class
+})
+public class AllCreationCustomNodeTests {
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/suites/AllCreationDependencyTests.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/suites/AllCreationDependencyTests.java
new file mode 100755
index 0000000..2c8b5a2
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/suites/AllCreationDependencyTests.java
@@ -0,0 +1,67 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.suites;
+
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.dependency.TestLinkCreationDependencyForSources;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.dependency.TestLinkCreationDependencyFromActorPart;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.dependency.TestLinkCreationDependencyFromBlock;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.dependency.TestLinkCreationDependencyFromConstraint;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.dependency.TestLinkCreationDependencyFromConstraintCN;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.dependency.TestLinkCreationDependencyFromFlowPortOnBlock;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.dependency.TestLinkCreationDependencyFromFlowPortOnNestedPart;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.dependency.TestLinkCreationDependencyFromFlowPortOnPart;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.dependency.TestLinkCreationDependencyFromNestedActorPart;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.dependency.TestLinkCreationDependencyFromNestedPart;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.dependency.TestLinkCreationDependencyFromNestedProperty;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.dependency.TestLinkCreationDependencyFromNestedReference;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.dependency.TestLinkCreationDependencyFromNestedValue;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.dependency.TestLinkCreationDependencyFromPart;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.dependency.TestLinkCreationDependencyFromPortOnBlock;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.dependency.TestLinkCreationDependencyFromPortOnNestedPart;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.dependency.TestLinkCreationDependencyFromPortOnPart;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.dependency.TestLinkCreationDependencyFromProperty;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.dependency.TestLinkCreationDependencyFromReference;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.dependency.TestLinkCreationDependencyFromValue;
+import org.junit.runner.RunWith;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.junit.runners.Suite.SuiteClasses;
+
+@RunWith(ClassificationSuite.class)
+@SuiteClasses({
+
+ TestLinkCreationDependencyForSources.class,
+ TestLinkCreationDependencyFromActorPart.class,
+ TestLinkCreationDependencyFromBlock.class,
+ TestLinkCreationDependencyFromConstraint.class,
+ TestLinkCreationDependencyFromConstraintCN.class,
+ TestLinkCreationDependencyFromFlowPortOnBlock.class,
+ TestLinkCreationDependencyFromFlowPortOnNestedPart.class,
+ TestLinkCreationDependencyFromFlowPortOnPart.class,
+ TestLinkCreationDependencyFromNestedActorPart.class,
+ TestLinkCreationDependencyFromNestedPart.class,
+ TestLinkCreationDependencyFromNestedProperty.class,
+ TestLinkCreationDependencyFromNestedReference.class,
+ TestLinkCreationDependencyFromNestedValue.class,
+ TestLinkCreationDependencyFromPart.class,
+ TestLinkCreationDependencyFromPortOnBlock.class,
+ TestLinkCreationDependencyFromPortOnNestedPart.class,
+ TestLinkCreationDependencyFromPortOnPart.class,
+ TestLinkCreationDependencyFromProperty.class,
+ TestLinkCreationDependencyFromReference.class,
+ TestLinkCreationDependencyFromValue.class
+
+ })
+public class AllCreationDependencyTests {
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/suites/AllCreationInheritedLinkTests.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/suites/AllCreationInheritedLinkTests.java
new file mode 100755
index 0000000..b8ac5e1
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/suites/AllCreationInheritedLinkTests.java
@@ -0,0 +1,37 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.suites;
+
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.inherited.TestLinkCreationCommentConstraintForSources;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.inherited.TestLinkCreationCommentConstraintFromComment;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.inherited.TestLinkCreationCommentConstraintFromCommentCN;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.inherited.TestLinkCreationCommentConstraintFromConstraint;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.link.inherited.TestLinkCreationCommentConstraintFromConstraintCN;
+import org.junit.runner.RunWith;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.junit.runners.Suite.SuiteClasses;
+
+@RunWith(ClassificationSuite.class)
+@SuiteClasses({
+
+ TestLinkCreationCommentConstraintForSources.class,
+ TestLinkCreationCommentConstraintFromComment.class,
+ TestLinkCreationCommentConstraintFromCommentCN.class,
+ TestLinkCreationCommentConstraintFromConstraint.class,
+ TestLinkCreationCommentConstraintFromConstraintCN.class
+
+ })
+public class AllCreationInheritedLinkTests {
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/suites/AllCreationInheritedNodeTests.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/suites/AllCreationInheritedNodeTests.java
new file mode 100755
index 0000000..00988b1
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/suites/AllCreationInheritedNodeTests.java
@@ -0,0 +1,33 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.suites;
+
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.node.inherited.TestNodeCreationOnComment;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.node.inherited.TestNodeCreationOnCommentCN;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.node.inherited.TestNodeCreationOnConstraint;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.node.inherited.TestNodeCreationOnConstraintCN;
+import org.junit.runner.RunWith;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.junit.runners.Suite.SuiteClasses;
+
+@RunWith(ClassificationSuite.class)
+@SuiteClasses({
+ TestNodeCreationOnComment.class,
+ TestNodeCreationOnCommentCN.class,
+ TestNodeCreationOnConstraint.class,
+ TestNodeCreationOnConstraintCN.class
+})
+public class AllCreationInheritedNodeTests {
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/suites/AllCreationLinkTests.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/suites/AllCreationLinkTests.java
new file mode 100755
index 0000000..52415be
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/suites/AllCreationLinkTests.java
@@ -0,0 +1,32 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.suites;
+
+import org.junit.runner.RunWith;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.junit.runners.Suite.SuiteClasses;
+
+@RunWith(ClassificationSuite.class)
+@SuiteClasses({
+
+ AllCreationConnectorTests.class,
+ AllCreationConnectorWithDelegateTests.class,
+ AllCreationConnectorWithEncapsulatedPartTests.class,
+ AllCreationDependencyTests.class,
+ AllCreationInheritedLinkTests.class,
+
+ })
+public class AllCreationLinkTests {
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/suites/AllDiagramTests.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/suites/AllDiagramTests.java
new file mode 100755
index 0000000..4e2bc87
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/suites/AllDiagramTests.java
@@ -0,0 +1,32 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.suites;
+
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.TestDiagramCreation;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.creation.node.TestNodeCreationOnDiagram;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.node.TestNodeDropOnDiagram;
+import org.junit.runner.RunWith;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.junit.runners.Suite.SuiteClasses;
+
+
+@RunWith(ClassificationSuite.class)
+@SuiteClasses({
+ TestDiagramCreation.class,
+ TestNodeCreationOnDiagram.class,
+ TestNodeDropOnDiagram.class,
+})
+public class AllDiagramTests {
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/suites/AllDropInheritedTests.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/suites/AllDropInheritedTests.java
new file mode 100755
index 0000000..21a4d67
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/suites/AllDropInheritedTests.java
@@ -0,0 +1,33 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.suites;
+
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.inherited.TestNodeDropOnComment;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.inherited.TestNodeDropOnCommentCN;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.inherited.TestNodeDropOnConstraint;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.inherited.TestNodeDropOnConstraintCN;
+import org.junit.runner.RunWith;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.junit.runners.Suite.SuiteClasses;
+
+@RunWith(ClassificationSuite.class)
+@SuiteClasses({
+ TestNodeDropOnComment.class,
+ TestNodeDropOnCommentCN.class,
+ TestNodeDropOnConstraint.class,
+ TestNodeDropOnConstraintCN.class
+})
+public class AllDropInheritedTests {
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/suites/AllDropLinkTests.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/suites/AllDropLinkTests.java
new file mode 100755
index 0000000..27fe063
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/suites/AllDropLinkTests.java
@@ -0,0 +1,31 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.suites;
+
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.link.TestLinkDropOnBlockPropertyStructureCpt;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.link.TestLinkDropOnBlockStructureCpt;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.link.TestLinkDropOnDiagram;
+import org.junit.runner.RunWith;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.junit.runners.Suite.SuiteClasses;
+
+@RunWith(ClassificationSuite.class)
+@SuiteClasses({
+ TestLinkDropOnDiagram.class,
+ TestLinkDropOnBlockStructureCpt.class,
+ TestLinkDropOnBlockPropertyStructureCpt.class
+})
+public class AllDropLinkTests {
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/suites/AllDropNodeTests.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/suites/AllDropNodeTests.java
new file mode 100755
index 0000000..65529dd
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/suites/AllDropNodeTests.java
@@ -0,0 +1,70 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.suites;
+
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.node.TestNodeDropOnActorPart;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.node.TestNodeDropOnActorPartStructureCompartment;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.node.TestNodeDropOnBlock;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.node.TestNodeDropOnBlockStructureCompartment;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.node.TestNodeDropOnNestedActorPart;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.node.TestNodeDropOnNestedActorPartStructureCompartment;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.node.TestNodeDropOnNestedPart;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.node.TestNodeDropOnNestedPartStructureCompartment;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.node.TestNodeDropOnNestedProperty;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.node.TestNodeDropOnNestedPropertyStructureCompartment;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.node.TestNodeDropOnNestedReference;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.node.TestNodeDropOnNestedReferenceStructureCompartment;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.node.TestNodeDropOnNestedValue;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.node.TestNodeDropOnNestedValueStructureCompartment;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.node.TestNodeDropOnPart;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.node.TestNodeDropOnPartStructureCompartment;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.node.TestNodeDropOnProperty;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.node.TestNodeDropOnPropertyStructureCompartment;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.node.TestNodeDropOnReference;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.node.TestNodeDropOnReferenceStructureCompartment;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.node.TestNodeDropOnValue;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.dnd.node.TestNodeDropOnValueStructureCompartment;
+import org.junit.runner.RunWith;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.junit.runners.Suite.SuiteClasses;
+
+
+@RunWith(ClassificationSuite.class)
+@SuiteClasses({
+ TestNodeDropOnActorPart.class,
+ TestNodeDropOnActorPartStructureCompartment.class,
+ TestNodeDropOnBlock.class,
+ TestNodeDropOnBlockStructureCompartment.class,
+ TestNodeDropOnPart.class,
+ TestNodeDropOnPartStructureCompartment.class,
+ TestNodeDropOnProperty.class,
+ TestNodeDropOnPropertyStructureCompartment.class,
+ TestNodeDropOnReference.class,
+ TestNodeDropOnReferenceStructureCompartment.class,
+ TestNodeDropOnValue.class,
+ TestNodeDropOnValueStructureCompartment.class,
+ TestNodeDropOnNestedActorPart.class,
+ TestNodeDropOnNestedActorPartStructureCompartment.class,
+ TestNodeDropOnNestedPart.class,
+ TestNodeDropOnNestedPartStructureCompartment.class,
+ TestNodeDropOnNestedProperty.class,
+ TestNodeDropOnNestedPropertyStructureCompartment.class,
+ TestNodeDropOnNestedReference.class,
+ TestNodeDropOnNestedReferenceStructureCompartment.class,
+ TestNodeDropOnNestedValue.class,
+ TestNodeDropOnNestedValueStructureCompartment.class,
+})
+public class AllDropNodeTests {
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/suites/AllReorientLinkTests.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/suites/AllReorientLinkTests.java
new file mode 100755
index 0000000..d9de5fb
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/suites/AllReorientLinkTests.java
@@ -0,0 +1,36 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.suites;
+
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.reorient.dependency.TestLinkReorientSourceDependency;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.reorient.dependency.TestLinkReorientTargetDependency;
+import org.junit.runner.RunWith;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.junit.runners.Suite.SuiteClasses;
+
+@RunWith(ClassificationSuite.class)
+@SuiteClasses({
+
+ TestLinkReorientSourceDependency.class,
+ TestLinkReorientTargetDependency.class,
+ org.eclipse.papyrus.sysml.diagram.internalblock.tests.reorient.connector.TestLinkReorientSourceConnector.class,
+ org.eclipse.papyrus.sysml.diagram.internalblock.tests.reorient.connector.TestLinkReorientTargetConnector.class,
+ org.eclipse.papyrus.sysml.diagram.internalblock.tests.reorient.connector.delegation.TestLinkReorientSourceConnector.class,
+ org.eclipse.papyrus.sysml.diagram.internalblock.tests.reorient.connector.delegation.TestLinkReorientTargetConnector.class,
+ org.eclipse.papyrus.sysml.diagram.internalblock.tests.reorient.connector.encapsulated.TestLinkReorientSourceConnector.class,
+ org.eclipse.papyrus.sysml.diagram.internalblock.tests.reorient.connector.encapsulated.TestLinkReorientTargetConnector.class,
+ })
+public class AllReorientLinkTests {
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/suites/AllSetEncapsulationTests.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/suites/AllSetEncapsulationTests.java
new file mode 100755
index 0000000..fc45cce
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/suites/AllSetEncapsulationTests.java
@@ -0,0 +1,63 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.suites;
+
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.set.encapsulation.TestSetEncapsulationDeleteConnectorFromActorPart;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.set.encapsulation.TestSetEncapsulationDeleteConnectorFromFlowPortOnBlock;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.set.encapsulation.TestSetEncapsulationDeleteConnectorFromFlowPortOnNestedPart;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.set.encapsulation.TestSetEncapsulationDeleteConnectorFromFlowPortOnPart;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.set.encapsulation.TestSetEncapsulationDeleteConnectorFromNestedActorPart;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.set.encapsulation.TestSetEncapsulationDeleteConnectorFromNestedPart;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.set.encapsulation.TestSetEncapsulationDeleteConnectorFromNestedProperty;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.set.encapsulation.TestSetEncapsulationDeleteConnectorFromNestedReference;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.set.encapsulation.TestSetEncapsulationDeleteConnectorFromNestedValue;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.set.encapsulation.TestSetEncapsulationDeleteConnectorFromPart;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.set.encapsulation.TestSetEncapsulationDeleteConnectorFromPortOnBlock;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.set.encapsulation.TestSetEncapsulationDeleteConnectorFromPortOnNestedPart;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.set.encapsulation.TestSetEncapsulationDeleteConnectorFromPortOnPart;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.set.encapsulation.TestSetEncapsulationDeleteConnectorFromProperty;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.set.encapsulation.TestSetEncapsulationDeleteConnectorFromReference;
+import org.eclipse.papyrus.sysml.diagram.internalblock.tests.set.encapsulation.TestSetEncapsulationDeleteConnectorFromValue;
+import org.junit.runner.RunWith;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.junit.runners.Suite.SuiteClasses;
+
+@RunWith(ClassificationSuite.class)
+@SuiteClasses({
+
+ // Lot of duplicate tests, more subtle situation should be tested.
+ // These test should most probably be done in SysML service type tests, but
+ // the connector creation still require to use the end views.
+
+ TestSetEncapsulationDeleteConnectorFromActorPart.class,
+ TestSetEncapsulationDeleteConnectorFromFlowPortOnBlock.class,
+ TestSetEncapsulationDeleteConnectorFromFlowPortOnNestedPart.class,
+ TestSetEncapsulationDeleteConnectorFromFlowPortOnPart.class,
+ TestSetEncapsulationDeleteConnectorFromNestedActorPart.class,
+ TestSetEncapsulationDeleteConnectorFromNestedPart.class,
+ TestSetEncapsulationDeleteConnectorFromNestedProperty.class,
+ TestSetEncapsulationDeleteConnectorFromNestedReference.class,
+ TestSetEncapsulationDeleteConnectorFromNestedValue.class,
+ TestSetEncapsulationDeleteConnectorFromPart.class,
+ TestSetEncapsulationDeleteConnectorFromPortOnBlock.class,
+ TestSetEncapsulationDeleteConnectorFromPortOnNestedPart.class,
+ TestSetEncapsulationDeleteConnectorFromPortOnPart.class,
+ TestSetEncapsulationDeleteConnectorFromProperty.class,
+ TestSetEncapsulationDeleteConnectorFromReference.class,
+ TestSetEncapsulationDeleteConnectorFromValue.class,
+
+})
+public class AllSetEncapsulationTests {
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/suites/AllTests.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/suites/AllTests.java
new file mode 100755
index 0000000..0fbb65d
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/suites/AllTests.java
@@ -0,0 +1,35 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.suites;
+
+import org.junit.runner.RunWith;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.junit.runners.Suite.SuiteClasses;
+
+@RunWith(ClassificationSuite.class)
+@SuiteClasses({
+ AllDiagramTests.class,
+ AllCreationLinkTests.class,
+ AllAlternateDropTests.class,
+ AllDropInheritedTests.class,
+ AllCreationCustomNodeTests.class,
+ AllCreationInheritedNodeTests.class,
+ AllDropLinkTests.class,
+ AllDropNodeTests.class,
+ AllReorientLinkTests.class,
+ AllSetEncapsulationTests.class
+})
+public class AllTests {
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/utils/EditorUtils.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/utils/EditorUtils.java
new file mode 100755
index 0000000..74db1d3
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/utils/EditorUtils.java
@@ -0,0 +1,146 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2016 CEA LIST, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus - bug 485220
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils;
+
+import java.util.Iterator;
+
+import org.eclipse.emf.common.command.CommandStack;
+import org.eclipse.emf.transaction.RunnableWithResult;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.Tool;
+import org.eclipse.gef.util.EditPartUtilities;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramCommandStack;
+import org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramEditDomain;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.core.utils.ServiceUtils;
+import org.eclipse.papyrus.sysml.diagram.internalblock.InternalBlockDiagramForMultiEditor;
+import org.eclipse.papyrus.sysml.diagram.internalblock.factory.DiagramPaletteFactory;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PlatformUI;
+
+
+public class EditorUtils {
+
+ public static InternalBlockDiagramForMultiEditor getDiagramEditor() throws Exception {
+
+ ServicesRegistry serviceRegistry = getEditor().getAdapter(ServicesRegistry.class);
+ try {
+ IEditorPart activeEditor = ServiceUtils.getInstance().getService(ISashWindowsContainer.class, serviceRegistry).getActiveEditor();
+ return (InternalBlockDiagramForMultiEditor) activeEditor;
+
+ } catch (ServiceException e) {
+ throw new Exception("Unable to retrieve service.", e);
+ } catch (ClassCastException e) {
+ throw new Exception("Active diagram is not an IBD.", e);
+ }
+ }
+
+ public static DiagramEditPart getDiagramEditPart() throws Exception {
+
+ try {
+ return getDiagramEditor().getDiagramEditPart();
+
+ } catch (NullPointerException e) {
+ throw new Exception("Could not find diagram edit part.", e);
+ }
+ }
+
+ public static Diagram getDiagramView() throws Exception {
+
+ try {
+ return getDiagramEditor().getDiagram();
+
+ } catch (NullPointerException e) {
+ throw new Exception("Could not find diagram view.", e);
+ }
+ }
+
+ public static EditPart getEditPart(View view) throws Exception {
+
+ // Test if the container is the diagram itself first
+ if (getDiagramEditPart().getModel() == view) {
+ return getDiagramEditPart();
+ }
+
+ // Test diagram children and look for the view
+ @SuppressWarnings("unchecked")
+ Iterator<EditPart> it = EditPartUtilities.getAllChildren(getDiagramEditPart()).iterator();
+ while (it.hasNext()) {
+ EditPart editPart = it.next();
+ if (editPart.getModel() == view) {
+ return editPart;
+ }
+ }
+
+ // Test diagram nested connections and look for the view
+ @SuppressWarnings("unchecked")
+ Iterator<EditPart> itLinks = EditPartUtilities.getAllNestedConnectionEditParts(getDiagramEditPart()).iterator();
+ while (itLinks.hasNext()) {
+ EditPart editPart = itLinks.next();
+ if (editPart.getModel() == view) {
+ return editPart;
+ }
+ }
+
+ throw new Exception("Unable to find edit part for the given view.");
+ }
+
+ public static Tool getPaletteTool(String toolId) throws Exception {
+ DiagramPaletteFactory factory = new DiagramPaletteFactory();
+ return factory.createTool(toolId);
+ }
+
+ public static IDiagramEditDomain getDiagramEditingDomain() throws Exception {
+ return getDiagramEditor().getDiagramEditDomain();
+ }
+
+ public static DiagramCommandStack getDiagramCommandStack() throws Exception {
+ return getDiagramEditingDomain().getDiagramCommandStack();
+ }
+
+ public static CommandStack getCommandStack() throws Exception {
+ return getTransactionalEditingDomain().getCommandStack();
+ }
+
+ public static TransactionalEditingDomain getTransactionalEditingDomain() throws Exception {
+
+ ServicesRegistry serviceRegistry = getEditor().getAdapter(ServicesRegistry.class);
+ try {
+ return ServiceUtils.getInstance().getTransactionalEditingDomain(serviceRegistry);
+
+ } catch (ServiceException e) {
+ throw new Exception("Unable to retrieve service.", e);
+ }
+ }
+
+ public static IEditorPart getEditor() throws Exception {
+ RunnableWithResult<IEditorPart> getEditorRunnable = new RunnableWithResult.Impl<IEditorPart>() {
+
+ public void run() {
+ setResult(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor());
+ }
+ };
+ Display.getDefault().syncExec(getEditorRunnable);
+ return getEditorRunnable.getResult();
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/utils/TestPrepareUtils.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/utils/TestPrepareUtils.java
new file mode 100755
index 0000000..72790b1
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/utils/TestPrepareUtils.java
@@ -0,0 +1,318 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getEditPart;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getTransactionalEditingDomain;
+
+import java.util.ArrayList;
+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.draw2d.geometry.Point;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.edit.command.SetCommand;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.diagram.ui.commands.CreateCommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest.ViewDescriptor;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
+import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
+import org.eclipse.gmf.runtime.emf.type.core.IClientContext;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.emf.gmf.command.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.infra.services.edit.commands.ConfigureFeatureCommandFactory;
+import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory;
+import org.eclipse.papyrus.infra.services.edit.context.TypeContext;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.utils.GMFCommandUtils;
+import org.eclipse.papyrus.sysml.blocks.Block;
+import org.eclipse.papyrus.sysml.diagram.internalblock.Activator;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.commands.SemanticAdapter;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.uml2.uml.ConnectableElement;
+import org.eclipse.uml2.uml.Connector;
+import org.eclipse.uml2.uml.ConnectorEnd;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.EncapsulatedClassifier;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.eclipse.uml2.uml.util.UMLUtil;
+import org.junit.Assert;
+
+
+public class TestPrepareUtils {
+
+ public static void changeVisibility(View view) throws Exception {
+ SetCommand changeVisibilityCommand = new SetCommand(getTransactionalEditingDomain(), view, NotationPackage.eINSTANCE.getView_Visible(), !view.isVisible());
+ getTransactionalEditingDomain().getCommandStack().execute(changeVisibilityCommand);
+ }
+
+ public static EObject createElement(IElementType elementType, View containerView) throws Exception {
+ return createElement(elementType, containerView.getElement());
+ }
+
+ @SuppressWarnings("unchecked")
+ public static EObject createElement(IElementType elementType, EObject container) throws Exception {
+ CreateElementRequest createElementRequest = new CreateElementRequest(getTransactionalEditingDomain(), container, elementType);
+
+ EObject typeOwner = EMFCoreUtil.getContainer(container, UMLPackage.eINSTANCE.getPackage());
+
+ if(elementType == SysMLElementTypes.ACTOR_PART_PROPERTY) {
+ // Create type
+ CreateElementRequest createTypeRequest = new CreateElementRequest(getTransactionalEditingDomain(), typeOwner, UMLElementTypes.ACTOR);
+ ICommand createTypeCommand = ElementEditServiceUtils.getCommandProvider(typeOwner).getEditCommand(createTypeRequest);
+ getTransactionalEditingDomain().getCommandStack().execute(new GMFtoEMFCommandWrapper(createTypeCommand));
+
+ // If container is a Property, substitute container by the Property type
+ if(container instanceof Property) {
+ container = ((Property)container).getType();
+ createElementRequest.setContainer(container);
+ }
+ createElementRequest.getParameters().put(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new ConfigureFeatureCommandFactory(UMLPackage.eINSTANCE.getTypedElement_Type(), GMFCommandUtils.getCommandEObjectResult(createTypeCommand)));
+
+ } else if(elementType == SysMLElementTypes.PART_PROPERTY) {
+ // Create type
+ CreateElementRequest createTypeRequest = new CreateElementRequest(getTransactionalEditingDomain(), typeOwner, SysMLElementTypes.BLOCK);
+ ICommand createTypeCommand = ElementEditServiceUtils.getCommandProvider(typeOwner).getEditCommand(createTypeRequest);
+ getTransactionalEditingDomain().getCommandStack().execute(new GMFtoEMFCommandWrapper(createTypeCommand));
+
+ // If container is a Property, substitute container by the Property type
+ if(container instanceof Property) {
+ container = ((Property)container).getType();
+ createElementRequest.setContainer(container);
+ }
+ createElementRequest.getParameters().put(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new ConfigureFeatureCommandFactory(UMLPackage.eINSTANCE.getTypedElement_Type(), GMFCommandUtils.getCommandEObjectResult(createTypeCommand)));
+
+ } else if(elementType == SysMLElementTypes.REFERENCE_PROPERTY) {
+ // Create type
+ CreateElementRequest createTypeRequest = new CreateElementRequest(getTransactionalEditingDomain(), typeOwner, SysMLElementTypes.BLOCK);
+ ICommand createTypeCommand = ElementEditServiceUtils.getCommandProvider(typeOwner).getEditCommand(createTypeRequest);
+ getTransactionalEditingDomain().getCommandStack().execute(new GMFtoEMFCommandWrapper(createTypeCommand));
+
+ // If container is a Property, substitute container by the Property type
+ if(container instanceof Property) {
+ container = ((Property)container).getType();
+ createElementRequest.setContainer(container);
+ }
+ createElementRequest.getParameters().put(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new ConfigureFeatureCommandFactory(UMLPackage.eINSTANCE.getTypedElement_Type(), GMFCommandUtils.getCommandEObjectResult(createTypeCommand)));
+
+ } else if(elementType == SysMLElementTypes.VALUE_PROPERTY) {
+ // Create type
+ CreateElementRequest createTypeRequest = new CreateElementRequest(getTransactionalEditingDomain(), typeOwner, UMLElementTypes.DATA_TYPE);
+ ICommand createTypeCommand = ElementEditServiceUtils.getCommandProvider(typeOwner).getEditCommand(createTypeRequest);
+ getTransactionalEditingDomain().getCommandStack().execute(new GMFtoEMFCommandWrapper(createTypeCommand));
+
+ // If container is a Property, substitute container by the Property type
+ if(container instanceof Property) {
+ container = ((Property)container).getType();
+ createElementRequest.setContainer(container);
+ }
+ createElementRequest.getParameters().put(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new ConfigureFeatureCommandFactory(UMLPackage.eINSTANCE.getTypedElement_Type(), GMFCommandUtils.getCommandEObjectResult(createTypeCommand)));
+
+ } else if(elementType == SysMLElementTypes.FLOW_PORT_NA) {
+ // Create type
+ CreateElementRequest createTypeRequest = new CreateElementRequest(getTransactionalEditingDomain(), typeOwner, SysMLElementTypes.FLOW_SPECIFICATION);
+ ICommand createTypeCommand = ElementEditServiceUtils.getCommandProvider(typeOwner).getEditCommand(createTypeRequest);
+ getTransactionalEditingDomain().getCommandStack().execute(new GMFtoEMFCommandWrapper(createTypeCommand));
+
+ // If container is a Property, substitute container by the Property type
+ if(container instanceof Property) {
+ container = ((Property)container).getType();
+ createElementRequest.setContainer(container);
+ }
+ createElementRequest.getParameters().put(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new ConfigureFeatureCommandFactory(UMLPackage.eINSTANCE.getTypedElement_Type(), GMFCommandUtils.getCommandEObjectResult(createTypeCommand)));
+
+ } else if(elementType == UMLElementTypes.PROPERTY) {
+
+ // If container is a Property, substitute container by the Property type
+ if(container instanceof Property) {
+ container = ((Property)container).getType();
+ createElementRequest.setContainer(container);
+ }
+ }
+
+ ICommand createElementCommand = ElementEditServiceUtils.getCommandProvider(container).getEditCommand(createElementRequest);
+ getTransactionalEditingDomain().getCommandStack().execute(new GMFtoEMFCommandWrapper(createElementCommand));
+
+ return GMFCommandUtils.getCommandEObjectResult(createElementCommand);
+ }
+
+ public static void setBlockIsEncapsulated(final Element block, final boolean isEncapsulated) throws Exception {
+ AbstractTransactionalCommand setCommand = new AbstractTransactionalCommand(getTransactionalEditingDomain(), "Set Block isEncapsulated", null) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ Block blockApp = UMLUtil.getStereotypeApplication(block, Block.class);
+ blockApp.setIsEncapsulated(isEncapsulated);
+ return CommandResult.newOKCommandResult(block);
+ }
+ };
+ getTransactionalEditingDomain().getCommandStack().execute(new GMFtoEMFCommandWrapper(setCommand));
+ }
+
+ public static EObject createLink(IElementType elementType, EObject source, EObject target) throws Exception {
+ CreateRelationshipRequest createRelationshipRequest = new CreateRelationshipRequest(getTransactionalEditingDomain(), source, target, elementType);
+
+ IClientContext context;
+ try {
+ context = TypeContext.getContext(getTransactionalEditingDomain());
+ } catch (ServiceException e) {
+ return null;
+ }
+
+ ICommand createRelationshipCommand = ElementEditServiceUtils.getCommandProvider(elementType, context).getEditCommand(createRelationshipRequest);
+ getTransactionalEditingDomain().getCommandStack().execute(new GMFtoEMFCommandWrapper(createRelationshipCommand));
+
+ return GMFCommandUtils.getCommandEObjectResult(createRelationshipCommand);
+ }
+
+ public static EObject createConnectorLink(final EncapsulatedClassifier container, final ConnectableElement sourceRole, final Property sourcePartWithPort, final ConnectableElement targetRole, final Property targetPartWithPort) throws Exception {
+
+ AbstractTransactionalCommand createConnectorCommand = new AbstractTransactionalCommand(getTransactionalEditingDomain(), "Create connector", null) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ Connector connector = container.createOwnedConnector("ConnectorTest");
+
+ ConnectorEnd connectorEndSrc = connector.createEnd();
+ connectorEndSrc.setRole(sourceRole);
+ connectorEndSrc.setPartWithPort(sourcePartWithPort);
+
+ ConnectorEnd connectorEndTgt = connector.createEnd();
+ connectorEndTgt.setRole(targetRole);
+ connectorEndTgt.setPartWithPort(targetPartWithPort);
+
+ return CommandResult.newOKCommandResult(connector);
+ }
+
+ };
+
+ getTransactionalEditingDomain().getCommandStack().execute(new GMFtoEMFCommandWrapper(createConnectorCommand));
+
+ return GMFCommandUtils.getCommandEObjectResult(createConnectorCommand);
+ }
+
+ public static View createGraphicalNode(IElementType elementType, String graphicalType, View containerView) throws Exception {
+ EObject newObject = createElement(elementType, containerView);
+
+ // Add view
+ ViewDescriptor viewDescriptor = new ViewDescriptor(new SemanticAdapter(newObject, null), Node.class, graphicalType, ViewUtil.APPEND, true, Activator.DIAGRAM_PREFERENCES_HINT);
+ CreateCommand createViewCommand = new CreateCommand(getTransactionalEditingDomain(), viewDescriptor, containerView);
+ Assert.assertTrue("Command should be executable", createViewCommand.canExecute());
+ EditorUtils.getDiagramCommandStack().execute(new ICommandProxy(createViewCommand));
+
+ EReference[] erefs = new EReference[]{ NotationPackage.eINSTANCE.getView_Element() };
+ @SuppressWarnings("unchecked")
+ Collection<View> views = EMFCoreUtil.getReferencers(newObject, erefs);
+
+ return (View)views.toArray()[0];
+ }
+
+ public static View createGraphicalNode(IElementType elementType, EObject semanticContainer, String graphicalType, View containerView) throws Exception {
+
+ EObject newObject = createElement(elementType, semanticContainer);
+
+ // Add view
+ ViewDescriptor viewDescriptor = new ViewDescriptor(new SemanticAdapter(newObject, null), Node.class, graphicalType, ViewUtil.APPEND, true, Activator.DIAGRAM_PREFERENCES_HINT);
+ CreateCommand createViewCommand = new CreateCommand(getTransactionalEditingDomain(), viewDescriptor, containerView);
+ EditorUtils.getDiagramCommandStack().execute(new ICommandProxy(createViewCommand));
+
+ EReference[] erefs = new EReference[]{ NotationPackage.eINSTANCE.getView_Element() };
+ @SuppressWarnings("unchecked")
+ Collection<View> views = EMFCoreUtil.getReferencers(newObject, erefs);
+
+ return (View)views.toArray()[0];
+ }
+
+ public static View createGraphicalLink(IElementType elementType, String graphicalType, View containerView, EditPart sourceEP, EditPart targetEP) throws Exception {
+ CreateConnectionViewRequest request = createConnectionRequest(elementType, sourceEP, targetEP);
+
+ Command command = targetEP.getCommand(request);
+ Assert.assertNotNull("Command to create graphical link should not be null", command);
+ Assert.assertTrue("Command should be executable", command.canExecute());
+
+ EditorUtils.getDiagramCommandStack().execute(command);
+
+ IAdaptable viewAdapter = (IAdaptable)request.getNewObject();
+ View newView = (View)viewAdapter.getAdapter(View.class);
+ Assert.assertNotNull("View should not be null", newView);
+
+ return newView;
+ }
+
+ public static CreateConnectionViewRequest createConnectionRequest(IElementType type, EditPart source, EditPart target) {
+ CreateConnectionViewRequest connectionRequest = CreateViewRequestFactory.getCreateConnectionRequest(type, Activator.DIAGRAM_PREFERENCES_HINT);
+
+ connectionRequest.setSourceEditPart(null);
+ connectionRequest.setTargetEditPart(source);
+ connectionRequest.setType(RequestConstants.REQ_CONNECTION_START);
+ source.getCommand(connectionRequest);
+
+ // Now, setup the request in preparation to get the
+ // connection end
+ // command.
+ connectionRequest.setSourceEditPart(source);
+ connectionRequest.setTargetEditPart(target);
+ connectionRequest.setType(RequestConstants.REQ_CONNECTION_END);
+ return connectionRequest;
+ }
+
+
+ public static View dropFromModelExplorer(IElementType elementType, View containerView) throws Exception {
+ EObject newObject = createElement(elementType, containerView);
+ return dropFromModelExplorer(newObject, containerView);
+ }
+
+ public static View dropFromModelExplorer(EObject eObject, View containerView) throws Exception {
+
+ // Find container EditPart (for command creation)
+ EditPart containerEditPart = getEditPart(containerView);
+
+ // Prepare drop request
+ DropObjectsRequest dropRequest = new DropObjectsRequest();
+ ArrayList<EObject> list = new ArrayList<EObject>();
+ list.add(eObject);
+ dropRequest.setObjects(list);
+ dropRequest.setLocation(new Point(20, 20));
+
+ // Get drop command
+ Command command = containerEditPart.getCommand(dropRequest);
+ EditorUtils.getDiagramCommandStack().execute(command);
+
+ EReference[] erefs = new EReference[]{ NotationPackage.eINSTANCE.getView_Element() };
+ @SuppressWarnings("unchecked")
+ Collection<View> views = EMFCoreUtil.getReferencers(eObject, erefs);
+
+ return (View)views.toArray()[0];
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/utils/TestUtils.java b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/utils/TestUtils.java
new file mode 100755
index 0000000..611d3ce
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/utils/TestUtils.java
@@ -0,0 +1,730 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2015 CEA LIST, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 436047
+ * Christian W. Damus - bug 433206
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils;
+
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramEditor;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getEditPart;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getPaletteTool;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getTransactionalEditingDomain;
+import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createElement;
+import static org.junit.Assert.fail;
+
+import java.lang.reflect.Field;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.commands.ParameterizedCommand;
+import org.eclipse.core.commands.operations.IOperationHistory;
+import org.eclipse.core.commands.operations.IOperationHistoryListener;
+import org.eclipse.core.commands.operations.OperationHistoryEvent;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.ConnectionEditPart;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.RequestConstants;
+import org.eclipse.gef.Tool;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.CompoundCommand;
+import org.eclipse.gef.requests.GroupRequest;
+import org.eclipse.gef.requests.ReconnectRequest;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.common.ui.action.global.GlobalAction;
+import org.eclipse.gmf.runtime.common.ui.action.internal.actions.global.GlobalCopyAction;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.commands.PopupMenuCommand;
+import org.eclipse.gmf.runtime.diagram.ui.menus.PopupMenu;
+import org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramGraphicalViewer;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewAndElementRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.EditCommandRequestWrapper;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
+import org.eclipse.gmf.runtime.notation.Connector;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.commands.ActionHandler;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.papyrus.infra.gmfdiag.common.commands.SelectAndExecuteCommand;
+import org.eclipse.papyrus.infra.gmfdiag.common.service.palette.AspectUnspecifiedTypeConnectionTool;
+import org.eclipse.papyrus.infra.gmfdiag.common.service.palette.AspectUnspecifiedTypeConnectionTool.CreateAspectUnspecifiedTypeConnectionRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.service.palette.AspectUnspecifiedTypeCreationTool;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.sysml.blocks.Block;
+import org.eclipse.papyrus.sysml.blocks.BlocksPackage;
+import org.eclipse.papyrus.sysml.blocks.NestedConnectorEnd;
+import org.eclipse.papyrus.sysml.diagram.internalblock.Activator;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IWorkbenchCommandConstants;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.commands.ICommandService;
+import org.eclipse.ui.handlers.IHandlerService;
+import org.eclipse.uml2.uml.ConnectableElement;
+import org.eclipse.uml2.uml.ConnectorEnd;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.util.UMLUtil;
+import org.junit.Assert;
+
+import com.google.common.collect.Iterables;
+
+public class TestUtils {
+
+ public static void deleteView(IElementType elementType, View containerView, boolean isAllowed) throws Exception {
+ View view = TestPrepareUtils.dropFromModelExplorer(elementType, getDiagramView());
+ deleteView(view, isAllowed);
+ }
+
+ public static void deleteView(View view, boolean isAllowed) throws Exception {
+ // Find container EditPart (for command creation)
+ EditPart containerEditPart = getEditPart(view);
+ // Get delete view command
+ Command command = containerEditPart.getCommand(new GroupRequest(RequestConstants.REQ_DELETE));
+ // if the view deletion is not allowed the command should not be executable
+ if (!isAllowed) {
+ if ((command == null) || (!command.canExecute())) {
+ // Ok the command cannot be executed.
+ } else {
+ fail("The command should not be executable.");
+ }
+ } else {
+ if ((command == null) || (!command.canExecute())) {
+ fail("The command should be executable.");
+ } else {
+ // Ok the command can be executed.
+ defaultExecutionTest(command);
+ }
+ }
+ }
+
+ public static void deleteElement(IElementType elementType, View containerView, boolean isAllowed) throws Exception {
+ View view = TestPrepareUtils.dropFromModelExplorer(elementType, getDiagramView());
+ deleteElement(view, isAllowed);
+ }
+
+ public static void deleteElement(View view, boolean isAllowed) throws Exception {
+ // Find container EditPart (for command creation)
+ EditPart containerEditPart = getEditPart(view);
+ // Prepare request
+ DestroyElementRequest destroyRequest = new DestroyElementRequest(getTransactionalEditingDomain(), false);
+ // Get delete command
+ Command command = containerEditPart.getCommand(new EditCommandRequestWrapper(destroyRequest));
+ // if the deletion is not allowed the command should not be executable
+ if (!isAllowed) {
+ if ((command == null) || (!command.canExecute())) {
+ // Ok the command cannot be executed.
+ } else {
+ fail("The command should not be executable.");
+ }
+ } else {
+ if ((command == null) || (!command.canExecute())) {
+ fail("The command should be executable.");
+ } else {
+ // Ok the command can be executed.
+ defaultExecutionTest(command);
+ }
+ }
+ }
+
+ public static void dropFromModelExplorer(IElementType elementType, View containerView, boolean isAllowed) throws Exception {
+ EObject newObject = createElement(elementType, containerView);
+ dropFromModelExplorer(newObject, containerView, isAllowed);
+ }
+
+ public static void dropFromModelExplorer(EObject eObject, View containerView, boolean isAllowed) throws Exception {
+ // Find container EditPart (for command creation)
+ EditPart containerEditPart = getEditPart(containerView);
+ // Prepare drop request
+ DropObjectsRequest dropRequest = new DropObjectsRequest();
+ ArrayList<EObject> list = new ArrayList<EObject>();
+ list.add(eObject);
+ dropRequest.setObjects(list);
+ dropRequest.setLocation(new Point(200, 200));
+ // Get drop command
+ Command command = containerEditPart.getCommand(dropRequest);
+ // if the drop is not allowed the command should not be executable
+ if (!isAllowed) {
+ if ((command == null) || (!command.canExecute())) {
+ // Ok the command cannot be executed.
+ } else {
+ fail("The command should not be executable.");
+ }
+ } else {
+ if ((command == null) || (!command.canExecute())) {
+ fail("The command should be executable.");
+ } else {
+ // Ok the command can be executed.
+ defaultExecutionTest(command);
+ }
+ }
+ }
+
+ public static void altDropFromModelExplorer(EObject eObject, View containerView, List<String> expectedCommandNames, boolean isAllowed) throws Exception {
+ // Find container EditPart (for command creation)
+ EditPart containerEditPart = getEditPart(containerView);
+ // Prepare drop request
+ DropObjectsRequest dropRequest = new DropObjectsRequest();
+ ArrayList<EObject> list = new ArrayList<EObject>();
+ list.add(eObject);
+ dropRequest.setObjects(list);
+ dropRequest.setLocation(new Point(200, 200));
+ // Get drop command
+ Command command = containerEditPart.getCommand(dropRequest);
+ // if the drop is not allowed the command should not be executable
+ if (!isAllowed) {
+ if ((command == null) || (!command.canExecute())) {
+ // Ok the command cannot be executed.
+ } else {
+ fail("The command should not be executable.");
+ }
+ } else {
+ if ((command == null) || (!command.canExecute())) {
+ fail("The command should be executable.");
+ } else {
+ // Simple command
+ if (expectedCommandNames.size() == 1) {
+ if (expectedCommandNames.get(0).equals(command.getLabel())) {
+ // Ok the command can be executed.
+ defaultExecutionTest(command);
+ EditorUtils.getCommandStack().undo();
+ } else {
+ fail("The expected kind of command was {" + expectedCommandNames.get(0) + "}, but was {" + command.getLabel() + "}");
+ }
+ } else if (expectedCommandNames.size() > 1) {
+ ICommandProxy proxy = null;
+ if (command instanceof ICommandProxy) {
+ proxy = (ICommandProxy) command;
+ } else if (command instanceof CompoundCommand) {
+ // Search for the nested ICommandProxy (there could be ToggleCanonicalModeCommands bracketing it)
+ proxy = Iterables.getFirst(Iterables.filter(((CompoundCommand) command).getCommands(), ICommandProxy.class), null);
+ }
+ ICommand tmpCommand = (proxy != null) ? proxy.getICommand() : null;
+ if ((tmpCommand == null) || !(tmpCommand instanceof SelectAndExecuteCommand)) {
+ fail("The drop command is not a selact and execute command.");
+ }
+ // Field accessibility modification to review elementary drop command available as
+ // SelectAndExecuteCommand choices.
+ SelectAndExecuteCommand selectCommand = (SelectAndExecuteCommand) tmpCommand;
+ Field popupField = PopupMenuCommand.class.getDeclaredField("popupMenu");
+ popupField.setAccessible(true);
+ PopupMenu menu = (PopupMenu) popupField.get(selectCommand);
+ Field content = PopupMenu.class.getDeclaredField("content");
+ content.setAccessible(true);
+ @SuppressWarnings("unchecked")
+ List<CompoundCommand> commandList = (List<CompoundCommand>) content.get(menu);
+ if (commandList.size() != expectedCommandNames.size()) {
+ fail("Unexpected number of possible alternate drop command.");
+ }
+ for (int i = 0; i < commandList.size(); i++) {
+ CompoundCommand subCommand = commandList.get(i);
+ if (expectedCommandNames.get(i).equals(subCommand.getLabel())) {
+ // Ok the command can be executed.
+ defaultExecutionTest(subCommand);
+ // Add one more undo to go back in initial state before testing next command
+ EditorUtils.getCommandStack().undo();
+ } else {
+ fail("The expected kind of command was {" + expectedCommandNames.get(i) + "}.");
+ }
+ }
+ }
+ }
+ }
+ }
+
+ public static void createNodeFromPalette(String toolId, View containerView, boolean isAllowed) throws Exception {
+ if (isAllowed) {
+ createNodeFromPalette(toolId, containerView, isAllowed, true);
+ } else {
+ createNodeFromPalette(toolId, containerView, isAllowed, false);
+ }
+ }
+
+ public static void createNodeFromPalette(String toolId, View containerView, boolean isAllowed, boolean execute) throws Exception {
+ // Find container EditPart (for command creation)
+ EditPart containerEditPart = getEditPart(containerView);
+ // Find palette tool to simulate element creation
+ Tool tool = getPaletteTool(toolId);
+ Request createRequest = getCreateRequest(tool);
+ // Get creation command for request
+ Command command = containerEditPart.getCommand(createRequest);
+ // if the creation is not allowed the command should not be executable
+ if (!isAllowed) {
+ if ((command == null) || (!command.canExecute())) {
+ // Ok the command cannot be executed.
+ } else {
+ fail("The command should not be executable.");
+ }
+ } else {
+ if ((command == null) || (!command.canExecute())) {
+ fail("The command should be executable.");
+ } else {
+ // Ok the command can be executed.
+ if (execute) {
+ defaultExecutionTest(command);
+ }
+ }
+ }
+ }
+
+ public static Request getCreateRequest(final Tool tool) throws Exception {
+
+ // Don't forget to set the diagram viewer (required for preferenceHints to mimic manual creation)
+ final IDiagramGraphicalViewer viewer = getDiagramEditor().getDiagramGraphicalViewer();
+
+ Display.getDefault().syncExec(new Runnable() {
+
+ public void run() {
+ try {
+ tool.setViewer(viewer);
+ } catch (Exception ex) {
+ ex.printStackTrace(System.out);
+ }
+ }
+ });
+
+ if (tool instanceof AspectUnspecifiedTypeCreationTool) {
+ AspectUnspecifiedTypeCreationTool creationTool = (AspectUnspecifiedTypeCreationTool) tool;
+ return creationTool.createCreateRequest();
+ } else if (tool instanceof AspectUnspecifiedTypeConnectionTool) {
+ AspectUnspecifiedTypeConnectionTool connectionTool = (AspectUnspecifiedTypeConnectionTool) tool;
+ return connectionTool.new CreateAspectUnspecifiedTypeConnectionRequest(connectionTool.getElementTypes(), false, Activator.DIAGRAM_PREFERENCES_HINT);
+ }
+
+ throw new Exception("Unexpected kind of creation tool.");
+ }
+
+ public static void createEdgeFromPalette(String toolId, View sourceView, View targetView, boolean isAllowed) throws Exception {
+ // Execute command only when the command is expected to be executable
+ createEdgeFromPalette(toolId, sourceView, targetView, isAllowed, isAllowed);
+ }
+
+ public static EObject createEdgeFromPalette(String toolId, View sourceView, View targetView, boolean isAllowed, boolean execute) throws Exception {
+ // Find palette tool to simulate element creation and prepare request
+ Tool tool = getPaletteTool(toolId);
+ CreateAspectUnspecifiedTypeConnectionRequest createRequest = (CreateAspectUnspecifiedTypeConnectionRequest) getCreateRequest(tool);
+ // Test source creation command
+ createRequest.setSourceEditPart(getEditPart(sourceView));
+ createRequest.setType(RequestConstants.REQ_CONNECTION_START);
+ Command srcCommand = getEditPart(sourceView).getCommand(createRequest);
+ // Test source command
+ if ((srcCommand == null) || !(srcCommand.canExecute())) { // Non-executable command
+ if (targetView == null) { // Only test behavior on source
+ if (!isAllowed) {
+ // Current behavior matches the expected results
+ return null;
+ } else {
+ fail("The command should be executable.");
+ }
+ } else { // Test complete creation, the command should necessary be executable
+ fail("The command should be executable.");
+ }
+ } else { // Executable command
+ if (targetView == null) { // Only test behavior on source
+ if (!isAllowed) {
+ fail("The command should not be executable.");
+ } else {
+ // Current behavior matches the expected results - no execution test.
+ return null;
+ }
+ } else { // The command is executable and a target is provided - continue the test
+ // Get target command (complete link creation)
+ createRequest.setSourceEditPart(getEditPart(sourceView));
+ createRequest.setTargetEditPart(getEditPart(targetView));
+ createRequest.setType(RequestConstants.REQ_CONNECTION_END);
+ Command tgtCommand = getEditPart(targetView).getCommand(createRequest);
+ // Test the target command
+ if ((tgtCommand == null) || !(tgtCommand.canExecute())) { // Non-executable command
+ if (!isAllowed) {
+ // Current behavior matches the expected results
+ return null;
+ } else {
+ fail("The command should be executable.");
+ }
+ } else { // Executable command
+ if (!isAllowed) {
+ fail("The command should not be executable.");
+ } else {
+ // Current behavior matches the expected results
+ if (execute) { // Test command execution
+ defaultExecutionTest(tgtCommand);
+ // Retrieve created object via nested ElementAndViewCreationRequest.
+ View newView = null;
+ Iterator<?> it = createRequest.getAllRequests().iterator();
+ while (it.hasNext() && newView == null) {
+ CreateConnectionViewAndElementRequest subRequest = (CreateConnectionViewAndElementRequest) it.next();
+ newView = (View) subRequest.getConnectionViewDescriptor().getAdapter(View.class);
+ }
+ if (newView != null) {
+ return newView.getElement();
+ } else {
+ fail("No edge seem to have been created.");
+ }
+ }
+ }
+ }
+ }
+ }
+ return null;
+ }
+
+ public static void createEdgeConnectorFromPalette(String toolId, View sourceView, View targetView, boolean isAllowed, List<Property> nestedSourcePath, List<Property> nestedTargetPath) throws Exception {
+ createEdgeConnectorFromPalette(toolId, sourceView, targetView, isAllowed, isAllowed, nestedSourcePath, nestedTargetPath);
+ }
+
+ public static void createEdgeConnectorFromPalette(String toolId, View sourceView, View targetView, boolean isAllowed, boolean execute, List<Property> nestedSourcePath, List<Property> nestedTargetPath) throws Exception {
+ EObject newLink = createEdgeFromPalette(toolId, sourceView, targetView, isAllowed, execute);
+ // Abort if the command is not supposed to be executable
+ if (!isAllowed) {
+ return;
+ }
+ if ((newLink == null) || (!(newLink instanceof org.eclipse.uml2.uml.Connector))) {
+ fail("No edge or unexpected kind of edge created.");
+ }
+ // If previous test have not failed the execution / undo / re-do has been done
+ org.eclipse.uml2.uml.Connector connector = (org.eclipse.uml2.uml.Connector) newLink;
+ // Test source connector end
+ NestedConnectorEnd sourceNestedConnectorEnd = UMLUtil.getStereotypeApplication(connector.getEnds().get(0), NestedConnectorEnd.class);
+ if (nestedSourcePath.isEmpty()) {
+ Assert.assertNull("No nested connector end stereotype should be applied on source.", sourceNestedConnectorEnd);
+ } else {
+ Assert.assertNotNull("Nested connector end stereotype should be applied on source.", sourceNestedConnectorEnd);
+ Assert.assertEquals("Nested property path is incorrect for source", nestedSourcePath, sourceNestedConnectorEnd.getPropertyPath());
+ }
+ // Test target connector end
+ NestedConnectorEnd targetNestedConnectorEnd = UMLUtil.getStereotypeApplication(connector.getEnds().get(1), NestedConnectorEnd.class);
+ if (nestedTargetPath.isEmpty()) {
+ Assert.assertNull("No nested connector end stereotype should be applied on target.", targetNestedConnectorEnd);
+ } else {
+ Assert.assertNotNull("Nested connector end stereotype should be applied on target.", targetNestedConnectorEnd);
+ Assert.assertEquals("Nested property path is incorrect for target", nestedTargetPath, targetNestedConnectorEnd.getPropertyPath());
+ }
+ }
+
+ public static void createEdgeConnectorAndTestDelegateFromPalette(String toolId, View sourceView, View targetView, boolean isAllowed, ConnectableElement expectedSourcePartWithPort, ConnectableElement expectedTargetPartWithPort) throws Exception {
+ createEdgeConnectorAndTestDelegateFromPalette(toolId, sourceView, targetView, isAllowed, isAllowed, expectedSourcePartWithPort, expectedTargetPartWithPort);
+ }
+
+ public static void createEdgeConnectorAndTestDelegateFromPalette(String toolId, View sourceView, View targetView, boolean isAllowed, boolean execute, ConnectableElement expectedSourcePartWithPort, ConnectableElement expectedTargetPartWithPort)
+ throws Exception {
+ EObject newLink = createEdgeFromPalette(toolId, sourceView, targetView, isAllowed, execute);
+ // Abort if the command is not supposed to be executable
+ if (!isAllowed) {
+ return;
+ }
+ if ((newLink == null) || (!(newLink instanceof org.eclipse.uml2.uml.Connector))) {
+ fail("No edge or unexpected kind of edge created.");
+ }
+ // If previous test have not failed the execution / undo / re-do has been done
+ org.eclipse.uml2.uml.Connector connector = (org.eclipse.uml2.uml.Connector) newLink;
+ // Test source connector end
+ ConnectorEnd sourceConnectorEnd = connector.getEnds().get(0);
+ if (sourceConnectorEnd.getPartWithPort() != expectedSourcePartWithPort) {
+ fail("The partWithPort is incorrect for source.");
+ }
+ // Test target connector end
+ ConnectorEnd targetConnectorEnd = connector.getEnds().get(1);
+ if (targetConnectorEnd.getPartWithPort() != expectedTargetPartWithPort) {
+ fail("The partWithPort is incorrect for target.");
+ }
+ }
+
+ public static void reorientRelationshipSource(View relationshipView, View newSourceView, boolean isAllowed) throws Exception {
+ reorientRelationship((Connector) relationshipView, newSourceView, ReorientRelationshipRequest.REORIENT_SOURCE, isAllowed);
+ }
+
+ public static void reorientRelationshipTarget(View relationshipView, View newTargetView, boolean isAllowed) throws Exception {
+ reorientRelationship((Connector) relationshipView, newTargetView, ReorientRelationshipRequest.REORIENT_TARGET, isAllowed);
+ }
+
+ public static void reorientRelationship(Connector relationshipView, View newEndView, int reorientDirection, boolean isAllowed) throws Exception {
+ // Prepare request and add
+ String reconnectDirection = (ReorientRelationshipRequest.REORIENT_SOURCE == reorientDirection) ? RequestConstants.REQ_RECONNECT_SOURCE : RequestConstants.REQ_RECONNECT_TARGET;
+ ReconnectRequest reconnectRequest = new ReconnectRequest(relationshipView);
+ reconnectRequest.setTargetEditPart(getEditPart(newEndView));
+ reconnectRequest.setConnectionEditPart((ConnectionEditPart) getEditPart(relationshipView));
+ reconnectRequest.setType(reconnectDirection);
+ // Get command
+ Command reorientCommand = getEditPart(newEndView).getCommand(reconnectRequest);
+ // Test the target command
+ if ((reorientCommand == null) || !(reorientCommand.canExecute())) { // Non-executable command
+ if (!isAllowed) {
+ // Current behavior matches the expected results
+ return;
+ } else {
+ fail("The command should be executable.");
+ }
+ } else { // Executable command
+ if (!isAllowed) {
+ fail("The command should not be executable.");
+ } else {
+ defaultExecutionTest(reorientCommand);
+ // Test the results then
+ }
+ }
+ }
+
+ public static void reorientConnectorSource(View relationshipView, View newSourceView, boolean isAllowed) throws Exception {
+ List<Property> nestedPath = Collections.emptyList();
+ reorientConnectorSource(relationshipView, newSourceView, isAllowed, nestedPath);
+ }
+
+ public static void reorientConnectorTarget(View relationshipView, View newTargetView, boolean isAllowed) throws Exception {
+ List<Property> nestedPath = Collections.emptyList();
+ reorientConnectorTarget(relationshipView, newTargetView, isAllowed, nestedPath);
+ }
+
+ public static void reorientConnectorSource(View relationshipView, View newSourceView, boolean isAllowed, List<Property> nestedPath) throws Exception {
+ reorientConnector((Connector) relationshipView, newSourceView, ReorientRelationshipRequest.REORIENT_SOURCE, isAllowed, nestedPath);
+ }
+
+ public static void reorientConnectorTarget(View relationshipView, View newTargetView, boolean isAllowed, List<Property> nestedPath) throws Exception {
+ reorientConnector((Connector) relationshipView, newTargetView, ReorientRelationshipRequest.REORIENT_TARGET, isAllowed, nestedPath);
+ }
+
+ public static void reorientConnector(Connector relationshipView, View newEndView, int reorientDirection, boolean isAllowed, List<Property> nestedPath) throws Exception {
+ reorientRelationship(relationshipView, newEndView, reorientDirection, isAllowed);
+ // Abort if the command is not supposed to be executable
+ if (!isAllowed) {
+ return;
+ }
+ // If previous test have not failed the execution / undo / re-do has been done
+ org.eclipse.uml2.uml.Connector connector = (org.eclipse.uml2.uml.Connector) relationshipView.getElement();
+ ConnectorEnd modifiedConnectorEnd = (reorientDirection == ReorientRelationshipRequest.REORIENT_SOURCE) ? connector.getEnds().get(0) : connector.getEnds().get(1);
+ NestedConnectorEnd nestedConnectorEnd = UMLUtil.getStereotypeApplication(modifiedConnectorEnd, NestedConnectorEnd.class);
+ if (nestedPath.isEmpty()) {
+ // if the expected path is empty then no stereotypes should be applied (nestedConnectorEnd with empty property path is forbidden)
+ Assert.assertNull("No nested connector end stereotype should be applied.", nestedConnectorEnd);
+ } else {
+ Assert.assertNotNull("Nested connector end stereotype should be applied.", nestedConnectorEnd);
+ Assert.assertEquals("Invalid nested path", nestedPath, nestedConnectorEnd.getPropertyPath());
+ }
+ }
+
+ public static void reorientConnectorSourceAndTestDelegate(View relationshipView, View newSourceView, boolean isAllowed, ConnectableElement expectedSourcePartWithPort, ConnectableElement expectedTargetPartWithPort) throws Exception {
+ reorientConnectorAndTestDelegate((Connector) relationshipView, newSourceView, ReorientRelationshipRequest.REORIENT_SOURCE, isAllowed, expectedSourcePartWithPort, expectedTargetPartWithPort);
+ }
+
+ public static void reorientConnectorTargetAndTestDelegate(View relationshipView, View newTargetView, boolean isAllowed, ConnectableElement expectedSourcePartWithPort, ConnectableElement expectedTargetPartWithPort) throws Exception {
+ reorientConnectorAndTestDelegate((Connector) relationshipView, newTargetView, ReorientRelationshipRequest.REORIENT_TARGET, isAllowed, expectedSourcePartWithPort, expectedTargetPartWithPort);
+ }
+
+ public static void reorientConnectorAndTestDelegate(Connector relationshipView, View newEndView, int reorientDirection, boolean isAllowed, ConnectableElement expectedSourcePartWithPort, ConnectableElement expectedTargetPartWithPort) throws Exception {
+ reorientRelationship(relationshipView, newEndView, reorientDirection, isAllowed);
+ // Abort if the command is not supposed to be executable
+ if (!isAllowed) {
+ return;
+ }
+ // If previous test have not failed the execution / undo / re-do has been done
+ org.eclipse.uml2.uml.Connector connector = (org.eclipse.uml2.uml.Connector) relationshipView.getElement();
+ ConnectorEnd modifiedConnectorEnd = (reorientDirection == ReorientRelationshipRequest.REORIENT_SOURCE) ? connector.getEnds().get(0) : connector.getEnds().get(1);
+ ConnectorEnd oppositeConnectorEnd = (reorientDirection == ReorientRelationshipRequest.REORIENT_SOURCE) ? connector.getEnds().get(1) : connector.getEnds().get(0);
+ if (reorientDirection == ReorientRelationshipRequest.REORIENT_SOURCE) { // re-orient source
+ // Test source connector end
+ Assert.assertEquals("The partWithPort is incorrect for source (re-oriented).", expectedSourcePartWithPort, modifiedConnectorEnd.getPartWithPort());
+ // Test target connector end
+ Assert.assertEquals("The partWithPort is incorrect for target (opposite end).", expectedTargetPartWithPort, oppositeConnectorEnd.getPartWithPort());
+ } else { // re-orient target
+ // Test source connector end
+ Assert.assertEquals("The partWithPort is incorrect for target (re-oriented).", expectedTargetPartWithPort, modifiedConnectorEnd.getPartWithPort());
+ // Test target connector end
+ Assert.assertEquals("The partWithPort is incorrect for source (opposite end).", expectedSourcePartWithPort, oppositeConnectorEnd.getPartWithPort());
+ }
+ }
+
+ public static void setEncapsulationDeleteConnectorTest(Element block, View sourceView, View targetView, boolean canCreateConnector, boolean isConnectorDestroyExpected) throws Exception {
+ if (!canCreateConnector) {
+ return; // abort
+ }
+ // Make sure the block is not encapsulated before Connector creation.
+ TestPrepareUtils.setBlockIsEncapsulated(block, false);
+ // Create connector
+ org.eclipse.uml2.uml.Connector connector = (org.eclipse.uml2.uml.Connector) createEdgeFromPalette("internalblock.tool.connector", sourceView, targetView, true, true);
+ // Prepare set encapsulated command and execute (with undo, re-do).
+ Block blockApp = UMLUtil.getStereotypeApplication(block, Block.class);
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(blockApp);
+ if (provider == null) {
+ fail("Could not get IElementEditService for Block stereotype application.");
+ }
+ IEditCommandRequest setEncapsulationRequest = new SetRequest(getTransactionalEditingDomain(), blockApp, BlocksPackage.eINSTANCE.getBlock_IsEncapsulated(), true);
+ ICommand setEncapsulationCommand = provider.getEditCommand(setEncapsulationRequest);
+ defaultExecutionTest(new ICommandProxy(setEncapsulationCommand));
+ // Test if the Connector have been destroyed
+ if (isConnectorDestroyExpected) {
+ if (connector.eResource() != null) { // connector destroyed has no container
+ fail("Connector was expected to be destroyed.");
+ }
+ } else {
+ if (connector.eResource() == null) { // connector destroyed has no container
+ fail("Connector was not expected to be destroyed.");
+ }
+ }
+ }
+
+ /**
+ * Copy the list of objects into the Clipboard
+ *
+ * @param objectsToCopy
+ * the list of objects to copy. should not be <code>null</code>, at least an empty list
+ * @throws Exception
+ * exception thrown in case of problems
+ */
+ public static void copyEditParts(List<Object> objectsToCopy) throws Exception {
+ // select elements to copy
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().activate(EditorUtils.getEditor());
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().bringToTop(EditorUtils.getEditor());
+ EditorUtils.getDiagramEditor().getEditorSite().getSelectionProvider().setSelection(new StructuredSelection(objectsToCopy));
+ ISelection selection = EditorUtils.getEditor().getSite().getSelectionProvider().getSelection();
+ Assert.assertEquals("Selection size should be " + objectsToCopy.size(), objectsToCopy.size(), ((IStructuredSelection) selection).size());
+ // retrieve the command for copy
+ ICommandService commandService = PlatformUI.getWorkbench().getService(ICommandService.class);
+ commandService.refreshElements(IWorkbenchCommandConstants.EDIT_COPY, null);
+ org.eclipse.core.commands.Command copyCommand = commandService.getCommand(IWorkbenchCommandConstants.EDIT_COPY);
+ ((GlobalCopyAction) ((ActionHandler) copyCommand.getHandler()).getAction()).setEnabled(true);
+ Assert.assertNotNull("Impossible to find copy command", copyCommand);
+ // EditorUtils.getDiagramEditor().getEditingDomain().setClipboard(objectsToCopy);
+ // retrieve handler service for the copy command
+ IHandlerService handlerService = PlatformUI.getWorkbench().getService(IHandlerService.class);
+ Assert.assertNotNull("Impossible to find handler service", handlerService);
+ final ParameterizedCommand parameterizedCommand = new ParameterizedCommand(copyCommand, null);
+ // retrieve the command and set some parameters on it
+ copyCommand.setEnabled(handlerService.getCurrentState());
+ final boolean commandEnabled = copyCommand.isEnabled();
+ Assert.assertTrue("Command should be enabled", commandEnabled);
+ // execute the copy command
+ handlerService.executeCommand(parameterizedCommand, null);
+ }
+
+ /**
+ * paste the list of objects into the Clipboard into the current diagram
+ *
+ * @param target
+ * object on which content of the clipboard should be added
+ * @param executable
+ * indicates if the paste command should be executable.
+ *
+ * @throws Exception
+ * exception thrown in case of problems
+ */
+ public static void pasteEditParts(Object target, boolean executable) throws Exception {
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().activate(EditorUtils.getEditor());
+ EditorUtils.getDiagramEditor().getEditorSite().getSelectionProvider().setSelection(new StructuredSelection(target));
+ // retrieve the command for copy
+ ICommandService commandService = PlatformUI.getWorkbench().getService(ICommandService.class);
+ commandService.refreshElements(IWorkbenchCommandConstants.EDIT_PASTE, null);
+ org.eclipse.core.commands.Command pasteCommand = commandService.getCommand(IWorkbenchCommandConstants.EDIT_PASTE);
+ Assert.assertNotNull("Impossible to find paste command", pasteCommand);
+ ((GlobalAction) ((ActionHandler) pasteCommand.getHandler()).getAction()).refresh();
+ IHandlerService handlerService = PlatformUI.getWorkbench().getService(IHandlerService.class);
+ Assert.assertNotNull("Impossible to find handler service", handlerService);
+ final ParameterizedCommand parameterizedCommand = new ParameterizedCommand(pasteCommand, null);
+ Assert.assertEquals("Command is not executable as expected", pasteCommand.isEnabled(), executable);
+ if (executable) {
+ // execute the copy command
+ handlerService.executeCommand(parameterizedCommand, null);
+ }
+ }
+
+ /**
+ * paste with model element the list of objects into the Clipboard into the current diagram
+ *
+ * @param target
+ * object on which content of the clipboard should be added
+ * @param executable
+ * indicates if the paste command should be executable.
+ *
+ * @throws Exception
+ * exception thrown in case of problems
+ */
+ public static void pasteWithModelEditParts(Object target, boolean executable) throws Exception {
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().activate(EditorUtils.getEditor());
+ EditorUtils.getDiagramEditor().getEditorSite().getSelectionProvider().setSelection(new StructuredSelection(target));
+ // retrieve the command for copy
+ ICommandService commandService = PlatformUI.getWorkbench().getService(ICommandService.class);
+ commandService.refreshElements(IWorkbenchCommandConstants.EDIT_PASTE, null);
+ org.eclipse.core.commands.Command pasteWithModelCommand = commandService.getCommand("org.eclipse.papyrus.uml.diagram.common.commands.PasteWithModelCommand");
+ Assert.assertNotNull("Impossible to find paste command", pasteWithModelCommand);
+ // ((GlobalAction)((AbstractHandlerWithState)pasteWithModelCommand.getHandler()).getAction()).refresh();
+ IHandlerService handlerService = PlatformUI.getWorkbench().getService(IHandlerService.class);
+ Assert.assertNotNull("Impossible to find handler service", handlerService);
+ final ParameterizedCommand parameterizedCommand = new ParameterizedCommand(pasteWithModelCommand, null);
+ Assert.assertEquals("Command is not executable as expected", pasteWithModelCommand.isEnabled(), executable);
+ if (executable) {
+ // execute the copy command
+ handlerService.executeCommand(parameterizedCommand, null);
+ }
+ }
+
+ // History event type variable to store history error events.
+ public static int historyEventType = OperationHistoryEvent.DONE;
+
+ /**
+ * Test execution, undo, redo of the given command.
+ *
+ * @param command
+ * the command to test.
+ * @throws Exception
+ */
+ public static void defaultExecutionTest(Command command) throws Exception {
+ // Execution in the diagram command stack (like Papyrus usual execution for GEF commands). This is important especially for
+ // composed command like Drop links which create intermediate view during execution. With EMF command stack, the whole command
+ // tries to execute and the edit part of the intermediate created views are not created before the command ends.
+ // The diagram command stack let edit part being created after each view creation.
+ // The problem in using the DiagramCommandStack (vs EMF CommandStack) is that it hides any exception that can possibly occur during
+ // command execution. This would let the test finish without error (the command result is not tested currently) while the execution failed.
+ // For this matter the DiagramCommandStack history is observed to detect execution issues.
+ // Add diagram command stack operation history listener
+ IOperationHistory history = EditorUtils.getDiagramEditingDomain().getActionManager().getOperationHistory();
+ IOperationHistoryListener historyChange = new IOperationHistoryListener() {
+
+ public void historyNotification(OperationHistoryEvent event) {
+ // Store history events
+ historyEventType = event.getEventType();
+ }
+ };
+ history.addOperationHistoryListener(historyChange);
+
+ try {
+ // Test execution
+ historyEventType = OperationHistoryEvent.DONE;
+ EditorUtils.getDiagramCommandStack().execute(command);
+ if (historyEventType == OperationHistoryEvent.OPERATION_NOT_OK) {
+ fail("Command execution failed ()");
+ }
+ // Test undo
+ historyEventType = OperationHistoryEvent.DONE;
+ EditorUtils.getDiagramCommandStack().undo();
+ if (historyEventType == OperationHistoryEvent.OPERATION_NOT_OK) {
+ fail("Command undo failed ()");
+ }
+ // Test redo
+ historyEventType = OperationHistoryEvent.DONE;
+ EditorUtils.getDiagramCommandStack().redo();
+ if (historyEventType == OperationHistoryEvent.OPERATION_NOT_OK) {
+ fail("Command redo failed ()");
+ }
+ } finally {
+ // Remove listener.
+ history.removeOperationHistoryListener(historyChange);
+ }
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/.classpath b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/.classpath
new file mode 100755
index 0000000..64c5e31
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/.project b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/.project
new file mode 100755
index 0000000..5279dd7
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.sysml.diagram.parametric.tests</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/.settings/org.eclipse.jdt.core.prefs b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 0000000..c585cc4
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,291 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/.settings/org.eclipse.jdt.ui.prefs b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/.settings/org.eclipse.jdt.ui.prefs
new file mode 100755
index 0000000..954281d
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,68 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+formatter_profile=_Papyrus
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/META-INF/MANIFEST.MF
new file mode 100755
index 0000000..9fa7a62
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,108 @@
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="[3.0.0,4.0.0)",
+ org.junit;bundle-version="4.10.0",
+ org.eclipse.papyrus.junit.framework;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.papyrus.junit.utils;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.infra.core.sashwindows.di;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.papyrus.sysml.diagram.parametric;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.sysml;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.uml.diagram.common;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.sysml.service.types;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.sysml.diagram.internalblock;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.sysml.architecture;bundle-version="1.0.0",
+ org.eclipse.papyrus.sysml.edit;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.core.sashwindows.di;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.papyrus.uml.diagram.clazz,
+ org.eclipse.papyrus.uml.diagram.menu;bundle-version="2.0.0",
+ org.eclipse.papyrus.uml.internationalization;bundle-version="1.0.0",
+ org.eclipse.papyrus.uml.diagram.stereotype.edition;bundle-version="2.0.0",
+ org.eclipse.papyrus.uml.nattable.stereotype.display;bundle-version="2.0.0",
+ org.eclipse.papyrus.infra.gmfdiag.dnd,
+ org.eclipse.papyrus.uml.diagram.dnd,
+ org.eclipse.papyrus.uml.types.core,
+ org.eclipse.papyrus.infra.types.core,
+ org.eclipse.papyrus.sysml.architecture;bundle-version="1.0.0",
+ org.eclipse.papyrus.sysml.edit;bundle-version="1.2.0",
+ org.eclipse.papyrus.sysml.diagram.ui;bundle-version="2.0.0",
+ org.eclipse.papyrus.sysml.diagram.common,
+ org.eclipse.papyrus.sysml.modelexplorer;bundle-version="1.2.0",
+ org.eclipse.papyrus.sysml.properties;bundle-version="1.2.0",
+ org.eclipse.papyrus.sysml.tests;bundle-version="1.2.0",
+ org.eclipse.papyrus.sysml.diagram.blockdefinition;bundle-version="3.0.0",
+ org.eclipse.papyrus.sysml.diagram.css;bundle-version="1.2.0",
+ org.eclipse.papyrus.sysml.diagram.requirement;bundle-version="3.0.0",
+ org.eclipse.papyrus.sysml.nattable;bundle-version="2.0.0",
+ org.eclipse.papyrus.sysml.nattable.allocation;bundle-version="1.2.0",
+ org.eclipse.papyrus.sysml.nattable.allocation.config;bundle-version="1.2.0",
+ org.eclipse.papyrus.sysml.nattable.menu;bundle-version="1.2.0",
+ org.eclipse.papyrus.sysml.nattable.requirement;bundle-version="1.2.0",
+ org.eclipse.papyrus.sysml.nattable.requirement.config;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.emf.diagram.common;bundle-version="2.0.0",
+ org.eclipse.papyrus.infra.gmfdiag.assistant;bundle-version="1.3.0",
+ org.eclipse.papyrus.infra.gmfdiag.css;bundle-version="2.1.0",
+ org.eclipse.papyrus.infra.nattable.gmfdiag;bundle-version="1.2.0",
+ org.eclipse.papyrus.sysml.diagram.internalblock.tests;bundle-version="1.2.0",
+ org.eclipse.papyrus.uml.nattable.clazz.config;bundle-version="3.0.0",
+ org.eclipse.papyrus.sysml.service.types.tests;bundle-version="1.2.0",
+ com.google.guava;bundle-version="21.0.0",
+ org.eclipse.papyrus.infra.gmfdiag.hyperlink;bundle-version="3.0.0",
+ org.eclipse.papyrus.infra.gmfdiag.modelexplorer;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.gmfdiag.navigation;bundle-version="2.0.0",
+ org.eclipse.papyrus.infra.gmfdiag.outline;bundle-version="2.0.0",
+ org.eclipse.papyrus.infra.gmfdiag.properties;bundle-version="3.0.0",
+ org.eclipse.papyrus.infra.gmfdiag.welcome;bundle-version="1.2.0",
+ org.eclipse.papyrus.sdk;bundle-version="2.0.0",
+ org.eclipse.papyrus.bundles.tests;bundle-version="1.2.0",
+ org.eclipse.papyrus.emf.facet.custom.sdk.core;bundle-version="1.2.0",
+ org.eclipse.papyrus.emf.facet.custom.sdk.ui;bundle-version="1.2.0",
+ org.eclipse.papyrus.emf.facet.query.java;bundle-version="1.2.0",
+ org.eclipse.papyrus.emf.facet.util.emf.ui;bundle-version="2.0.0",
+ org.eclipse.papyrus.infra.discovery;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.discovery.ui;bundle-version="3.0.0",
+ org.eclipse.papyrus.infra.editor.welcome;bundle-version="2.0.0",
+ org.eclipse.papyrus.infra.editor.welcome.nattable;bundle-version="2.0.0",
+ org.eclipse.papyrus.infra.emf.expressions;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.emf.types;bundle-version="3.0.0",
+ org.eclipse.papyrus.infra.internationalization;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.newchild;bundle-version="3.0.0",
+ org.eclipse.papyrus.uml.alf;bundle-version="3.0.0",
+ org.eclipse.papyrus.uml.alf.common;bundle-version="2.0.0",
+ org.eclipse.papyrus.uml.alf.common.source;bundle-version="2.0.0",
+ org.eclipse.papyrus.uml.alf.to.fuml;bundle-version="1.2.0",
+ org.eclipse.papyrus.uml.architecture;bundle-version="1.0.0",
+ org.eclipse.papyrus.uml.commands;bundle-version="1.3.0",
+ org.eclipse.papyrus.uml.internationalization.utils;bundle-version="1.0.0",
+ org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils;bundle-version="1.3.0",
+ org.eclipse.papyrus.uml.alf.libraries;bundle-version="2.0.0",
+ org.eclipse.papyrus.uml.alf.ui;bundle-version="3.0.0",
+ org.eclipse.papyrus.uml.controlmode.profile;bundle-version="2.0.0",
+ org.eclipse.papyrus.uml.decoratormodel;bundle-version="2.0.0",
+ org.eclipse.papyrus.uml.diagram.common.groups;bundle-version="2.0.0",
+ org.eclipse.papyrus.uml.diagram.component;bundle-version="3.0.0",
+ org.eclipse.papyrus.uml.diagram.css;bundle-version="2.0.0",
+ org.eclipse.papyrus.uml.diagram.icons;bundle-version="1.2.0",
+ org.eclipse.papyrus.uml.diagram.linklf;bundle-version="2.0.0",
+ org.eclipse.papyrus.uml.diagram.modelexplorer;bundle-version="1.2.0",
+ org.eclipse.papyrus.uml.diagram.navigation;bundle-version="2.0.0",
+ org.eclipse.papyrus.uml.diagram.profile;bundle-version="3.0.0",
+ org.eclipse.papyrus.uml.diagram.symbols;bundle-version="1.2.0",
+ org.eclipse.papyrus.uml.expressions;bundle-version="1.0.0",
+ org.eclipse.papyrus.uml.filters;bundle-version="1.2.0",
+ org.eclipse.papyrus.uml.icons;bundle-version="1.2.0",
+ org.eclipse.papyrus.uml.internationalization.edit;bundle-version="1.0.0",
+ org.eclipse.papyrus.uml.modelexplorer;bundle-version="2.0.0",
+ org.eclipse.papyrus.uml.modelrepair;bundle-version="2.0.0",
+ org.eclipse.papyrus.uml.nattable.generic;bundle-version="1.2.0",
+ org.eclipse.papyrus.uml.profile;bundle-version="3.0.0",
+ org.eclipse.papyrus.uml.properties;bundle-version="3.0.0",
+ org.eclipse.papyrus.uml.search.ui;bundle-version="2.0.0",
+ org.eclipse.papyrus.uml.service.validation;bundle-version="2.1.0"
+Export-Package: org.eclipse.papyrus.sysml.diagram.parametric.tests.suites
+Bundle-Vendor: %providerName
+Bundle-Version: 1.2.0.qualifier
+Bundle-Name: %pluginName
+Bundle-Localization: plugin
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.papyrus.sysml.diagram.parametric.tests;singleton:=true
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/about.html b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/about.html
new file mode 100755
index 0000000..d35d5ae
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/build.properties b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/build.properties
new file mode 100755
index 0000000..981edb9
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/build.properties
@@ -0,0 +1,8 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ model/,\
+ plugin.properties,\
+ about.html
+src.includes = about.html
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/model/Copy of ModelWithPD.di b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/model/Copy of ModelWithPD.di
new file mode 100755
index 0000000..278d6ec
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/model/Copy of ModelWithPD.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.sysml.architecture.SysML"/>
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/model/ModelWithPD.di b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/model/ModelWithPD.di
new file mode 100755
index 0000000..a9a1f4f
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/model/ModelWithPD.di
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi">
+ <di:SashWindowsMngr>
+ <pageList>
+ <availablePage>
+ <emfPageIdentifier href="ModelWithPD.notation#_Fi2LwApyEeOc89pTvmF9Gw"/>
+ </availablePage>
+ <availablePage>
+ <emfPageIdentifier href="ModelWithPD.notation#_VpI8wA5KEeO7JIqowJboVA"/>
+ </availablePage>
+ </pageList>
+ <sashModel currentSelection="//@sashModel/@windows.0/@children.0">
+ <windows>
+ <children xsi:type="di:TabFolder">
+ <children>
+ <emfPageIdentifier href="ModelWithPD.notation#_Fi2LwApyEeOc89pTvmF9Gw"/>
+ </children>
+ <children>
+ <emfPageIdentifier href="ModelWithPD.notation#_VpI8wA5KEeO7JIqowJboVA"/>
+ </children>
+ </children>
+ </windows>
+ </sashModel>
+ </di:SashWindowsMngr>
+ <architecture:ArchitectureDescription contextId="org.eclipse.papyrus.sysml.architecture.SysML"/>
+ <architecture:ArchitectureDescriptionPreferences>
+ <viewpointIds>org.eclipse.papyrus.sysml.analysis</viewpointIds>
+ <viewpointIds>org.eclipse.papyrus.sysml.design</viewpointIds>
+ </architecture:ArchitectureDescriptionPreferences>
+</xmi:XMI>
+
\ No newline at end of file
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/model/ModelWithPD.notation b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/model/ModelWithPD.notation
new file mode 100755
index 0000000..cab75f1
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/model/ModelWithPD.notation
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML">
+ <notation:Diagram xmi:id="_Fi2LwApyEeOc89pTvmF9Gw" type="Parametric" name="BlockParametricDiagram" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_Fi2LwQpyEeOc89pTvmF9Gw" type="shape_sysml_block_as_composite">
+ <children xmi:type="notation:DecorationNode" xmi:id="_Fi2LwgpyEeOc89pTvmF9Gw" type="label_sysml_block_name"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_Fi2LwwpyEeOc89pTvmF9Gw" type="compartment_sysml_structure">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_Fi2LxApyEeOc89pTvmF9Gw" showTitle="true"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_FjS3sApyEeOc89pTvmF9Gw" visible="false" type="compartment_shape_display">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_FjS3swpyEeOc89pTvmF9Gw" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_FjS3tApyEeOc89pTvmF9Gw" key="mutable" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_FjS3sQpyEeOc89pTvmF9Gw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_FjS3sgpyEeOc89pTvmF9Gw"/>
+ </children>
+ <element xmi:type="uml:Class" href="ModelWithPD.uml#_gLmaIGbVEeGgmux_Cozgdg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Fi2LxQpyEeOc89pTvmF9Gw" x="20" y="20" width="1000" height="600"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_Fi2LxgpyEeOc89pTvmF9Gw"/>
+ <element xmi:type="uml:Class" href="ModelWithPD.uml#_gLmaIGbVEeGgmux_Cozgdg"/>
+ </notation:Diagram>
+ <notation:Diagram xmi:id="_VpI8wA5KEeO7JIqowJboVA" type="Parametric" name="ConstrainBlockParametricDiagram" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_VpI8wQ5KEeO7JIqowJboVA" type="shape_sysml_block_as_composite">
+ <children xmi:type="notation:DecorationNode" xmi:id="_VpI8wg5KEeO7JIqowJboVA" type="label_sysml_block_name"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_VpI8ww5KEeO7JIqowJboVA" type="compartment_sysml_structure">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_VpI8xA5KEeO7JIqowJboVA" showTitle="true"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_Vpm20A5KEeO7JIqowJboVA" visible="false" type="compartment_shape_display">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_Vpnd4A5KEeO7JIqowJboVA" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_Vpnd4Q5KEeO7JIqowJboVA" key="mutable" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_Vpm20Q5KEeO7JIqowJboVA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Vpm20g5KEeO7JIqowJboVA"/>
+ </children>
+ <element xmi:type="uml:Class" href="ModelWithPD.uml#_R89l8A5KEeO7JIqowJboVA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_VpJj0A5KEeO7JIqowJboVA" x="20" y="20" width="1000" height="600"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_VpJj0Q5KEeO7JIqowJboVA"/>
+ <element xmi:type="uml:Class" href="ModelWithPD.uml#_R89l8A5KEeO7JIqowJboVA"/>
+ </notation:Diagram>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/model/ModelWithPD.uml b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/model/ModelWithPD.uml
new file mode 100755
index 0000000..82aaa35
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/model/ModelWithPD.uml
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20110701" xmlns:xmi="http://www.omg.org/spec/XMI/20110701" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Blocks="http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks" xmlns:Constraints="http://www.eclipse.org/papyrus/0.7.0/SysML/Constraints" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks http://www.eclipse.org/papyrus/0.7.0/SysML/Constraints http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints">
+ <uml:Model xmi:id="_fMOAwGbVEeGgmux_Cozgdg" name="SysMLmodel">
+ <packagedElement xmi:type="uml:Class" xmi:id="_gLmaIGbVEeGgmux_Cozgdg" name="Block1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_R89l8A5KEeO7JIqowJboVA" name="ConstraintBlock1"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_fM0dsGbVEeGgmux_Cozgdg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_fM0dsWbVEeGgmux_Cozgdg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_TZ_nULU5EduiKqCzJMWbGw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_fPWNQGbVEeGgmux_Cozgdg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_fPWNQWbVEeGgmux_Cozgdg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_fPWNQmbVEeGgmux_Cozgdg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_fPWNQ2bVEeGgmux_Cozgdg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_fPWNRGbVEeGgmux_Cozgdg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_fPWNRWbVEeGgmux_Cozgdg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_fPWNRmbVEeGgmux_Cozgdg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_fPWNR2bVEeGgmux_Cozgdg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_5WYJ0LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_fPWNSGbVEeGgmux_Cozgdg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_fPWNSWbVEeGgmux_Cozgdg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//activities"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_C2zXMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_fPWNSmbVEeGgmux_Cozgdg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_fPWNS2bVEeGgmux_Cozgdg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_fPWNTGbVEeGgmux_Cozgdg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_fPf-QGbVEeGgmux_Cozgdg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_fPf-QWbVEeGgmux_Cozgdg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_fPf-QmbVEeGgmux_Cozgdg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//interactions"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_meOioLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_fPf-Q2bVEeGgmux_Cozgdg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_fPf-RGbVEeGgmux_Cozgdg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//statemachines"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_nAF5kLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_fPf-RWbVEeGgmux_Cozgdg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_fPf-RmbVEeGgmux_Cozgdg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//usecases"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_neZmMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Blocks:Block xmi:id="_gLmaIWbVEeGgmux_Cozgdg" base_Class="_gLmaIGbVEeGgmux_Cozgdg"/>
+ <Constraints:ConstraintBlock xmi:id="_R-HcgA5KEeO7JIqowJboVA" base_Class="_R89l8A5KEeO7JIqowJboVA"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/plugin.properties b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/plugin.properties
new file mode 100755
index 0000000..677dc29
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/plugin.properties
@@ -0,0 +1,14 @@
+#################################################################################
+# 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:
+#
+# Régis CHEVREL (chevrel.regis@gmail.com) CEA LIST - Initial API and Implementation.
+#
+##################################################################################
+pluginName=Papyrus SysML Parametric Diagram Tests
+providerName=Eclipse Modeling Project
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/pom.xml b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/pom.xml
new file mode 100755
index 0000000..9b42dd2
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/pom.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.papyrus.sysml</groupId>
+ <artifactId>org.eclipse.papyrus.sysml.test</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.papyrus.sysml.diagram.parametric.tests</artifactId>
+ <packaging>eclipse-test-plugin</packaging>
+</project>
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/AbstractTest4B.java b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/AbstractTest4B.java
new file mode 100755
index 0000000..e06038c
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/AbstractTest4B.java
@@ -0,0 +1,85 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2016 CEA LIST, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ * Christian W. Damus - bugs 485220, 488791
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.tests;
+
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.papyrus.infra.core.sashwindows.di.service.IPageManager;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.core.utils.ServiceUtils;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.HouseKeeper;
+import org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.Constants;
+import org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.EditorUtils;
+import org.eclipse.ui.IEditorPart;
+import org.junit.BeforeClass;
+import org.junit.ClassRule;
+import org.osgi.framework.Bundle;
+
+/**
+ * Abstract Papyrus initialization class (required to get Service activation).
+ */
+public abstract class AbstractTest4B extends AbstractPapyrusTest {
+
+ @ClassRule
+ public static final HouseKeeper.Static houseKeeper = new HouseKeeper.Static();
+
+ public static IEditorPart editor = null;
+
+ @BeforeClass
+ public static void openPapyrusWithAParametricDiagramOwnedByBlock() throws Exception {
+ // Prepare new project for tests
+ IProject testProject = houseKeeper.createProject("TestProject");
+
+ // Copy EmptyModel from bundle to the test project
+ final IFile emptyModel_di = testProject.getFile("ModelWithPD.di");
+ IFile emptyModel_no = testProject.getFile("ModelWithPD.notation");
+ IFile emptyModel_uml = testProject.getFile("ModelWithPD.uml");
+
+ Bundle bundle = Platform.getBundle("org.eclipse.papyrus.sysml.diagram.parametric.tests");
+ emptyModel_di.create(bundle.getResource("/model/ModelWithPD.di").openStream(), true, new NullProgressMonitor());
+ emptyModel_no.create(bundle.getResource("/model/ModelWithPD.notation").openStream(), true, new NullProgressMonitor());
+ emptyModel_uml.create(bundle.getResource("/model/ModelWithPD.uml").openStream(), true, new NullProgressMonitor());
+
+ // Open the EmptyModel.di file with Papyrus (assumed to be the default editor for "di" files here).
+ editor = houseKeeper.openPapyrusEditor(emptyModel_di);
+
+ setActiveDiagramViewByName(Constants.PARAMETRIC_OWNED_BY_BLOCK_DIAGRAM_NAME);
+ }
+
+ public static boolean setActiveDiagramViewByName(String diagramName) throws Exception {
+ if (diagramName == null) {
+ return false;
+ }
+ ServicesRegistry serviceRegistry = EditorUtils.getEditor().getAdapter(ServicesRegistry.class);
+ IPageManager iPageManager = ServiceUtils.getInstance().getService(IPageManager.class, serviceRegistry);
+ List<Object> allPages = iPageManager.allPages();
+ for (Object object : allPages) {
+ if (object instanceof Diagram) {
+ if (diagramName.equals(((Diagram) object).getName())) {
+ iPageManager.selectPage(object);
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/AbstractTest4CB.java b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/AbstractTest4CB.java
new file mode 100755
index 0000000..1dd77f0
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/AbstractTest4CB.java
@@ -0,0 +1,31 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.tests;
+
+import org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.Constants;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+
+/**
+ * Abstract Papyrus initialization class (required to get Service activation).
+ */
+public abstract class AbstractTest4CB extends AbstractTest4B {
+
+ @BeforeClass
+ public static void openPapyrusWithAParametricDiagramOwnedByConstraintBlock() throws Exception {
+ setActiveDiagramViewByName(Constants.PARAMETRIC_OWNED_BY_CONSTRAINTBLOCK_DIAGRAM_NAME);
+
+ Assert.assertNotNull("Failed to open the editor", editor);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/link/AbstractLinkCreationForSourcesTest.java b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/link/AbstractLinkCreationForSourcesTest.java
new file mode 100755
index 0000000..66cd723
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/link/AbstractLinkCreationForSourcesTest.java
@@ -0,0 +1,117 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.tests.creation.link;
+
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.TestUtils.createEdgeFromPalette;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.junit.Test;
+
+/**
+ * JUnit abstract tests for Link creation test (via palette tools).
+ */
+public abstract class AbstractLinkCreationForSourcesTest extends AbstractLinkPrepareTest {
+
+ public static String toolID;
+
+ @Test
+ public void createLinkWithSourceBlock() throws Exception {
+ View sourceView = diagramContainerSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourcePart() throws Exception {
+ View sourceView = partSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceNestedPart() throws Exception {
+ View sourceView = nestedPartSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceReference() throws Exception {
+ View sourceView = referenceSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceNestedReference() throws Exception {
+ View sourceView = nestedReferenceSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceValue() throws Exception {
+ View sourceView = valueSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceNestedValue() throws Exception {
+ View sourceView = nestedValueSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceComment() throws Exception {
+ View sourceView = commentSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceCommentCN() throws Exception {
+ View sourceView = commentCNSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceConstraint() throws Exception {
+ View sourceView = constraintSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceConstraintCN() throws Exception {
+ View sourceView = constraintCNSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceDeepNestedPart() throws Exception {
+ View sourceView = subNestedPartContainer1_1_1SourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceDeepNestedProperty() throws Exception {
+ View sourceView = subNestedPropertyContainer1_1_1SourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceDeepNestedReference() throws Exception {
+ View sourceView = subNestedReferenceContainer1_1_1SourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceDeepNestedValue() throws Exception {
+ View sourceView = subNestedValueContainer1_1_1SourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/link/AbstractLinkCreationForSourcesTest4CB.java b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/link/AbstractLinkCreationForSourcesTest4CB.java
new file mode 100755
index 0000000..503769c
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/link/AbstractLinkCreationForSourcesTest4CB.java
@@ -0,0 +1,117 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.tests.creation.link;
+
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.TestUtils.createEdgeFromPalette;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.junit.Test;
+
+/**
+ * JUnit abstract tests for Link creation test (via palette tools).
+ */
+public abstract class AbstractLinkCreationForSourcesTest4CB extends AbstractLinkPrepareTest4CB {
+
+ public static String toolID;
+
+ @Test
+ public void createLinkWithSourceBlock() throws Exception {
+ View sourceView = diagramContainerSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourcePart() throws Exception {
+ View sourceView = partSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceNestedPart() throws Exception {
+ View sourceView = nestedPartSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceReference() throws Exception {
+ View sourceView = referenceSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceNestedReference() throws Exception {
+ View sourceView = nestedReferenceSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceValue() throws Exception {
+ View sourceView = valueSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceNestedValue() throws Exception {
+ View sourceView = nestedValueSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceComment() throws Exception {
+ View sourceView = commentSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceCommentCN() throws Exception {
+ View sourceView = commentCNSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceConstraint() throws Exception {
+ View sourceView = constraintSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceConstraintCN() throws Exception {
+ View sourceView = constraintCNSourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceDeepNestedPart() throws Exception {
+ View sourceView = subNestedPartContainer1_1_1SourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceDeepNestedProperty() throws Exception {
+ View sourceView = subNestedPropertyContainer1_1_1SourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceDeepNestedReference() throws Exception {
+ View sourceView = subNestedReferenceContainer1_1_1SourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+
+ @Test
+ public void createLinkWithSourceDeepNestedValue() throws Exception {
+ View sourceView = subNestedValueContainer1_1_1SourceView;
+ createEdgeFromPalette(toolID, sourceView, null, isCreationAllowed.get(sourceView));
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/link/AbstractLinkCreationFromElementTest.java b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/link/AbstractLinkCreationFromElementTest.java
new file mode 100755
index 0000000..05f64b8
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/link/AbstractLinkCreationFromElementTest.java
@@ -0,0 +1,156 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.tests.creation.link;
+
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.TestUtils.createEdgeConnectorFromPalette;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit abstract tests for Link creation test (via palette tools).
+ */
+public abstract class AbstractLinkCreationFromElementTest extends AbstractLinkPrepareTest {
+
+ public static String toolID;
+
+ public static View sourceView;
+
+ public static final Map<View, List<Property>> expectedSourceNestedPath = new HashMap<View, List<Property>>();
+
+ public static final Map<View, List<Property>> expectedTargetNestedPath = new HashMap<View, List<Property>>();
+
+ @BeforeClass
+ public static void initExpectedPathMaps() {
+ houseKeeper.cleanUpLater(expectedSourceNestedPath);
+ houseKeeper.cleanUpLater(expectedTargetNestedPath);
+ }
+
+ @Test
+ public void createLinkWithTargetBlock() throws Exception {
+ View targetView = diagramContainerTargetView;
+ createEdgeConnectorFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourceNestedPath.get(targetView), expectedTargetNestedPath.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetConstraintProperty() throws Exception {
+ View targetView = constraintPropertyTargetView;
+ createEdgeConnectorFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourceNestedPath.get(targetView), expectedTargetNestedPath.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetConstraintParameter() throws Exception {
+ View targetView = constraintParameterTargetView;
+ createEdgeConnectorFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourceNestedPath.get(targetView), expectedTargetNestedPath.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetNestedConstraintProperty() throws Exception {
+ View targetView = nestedConstraintPropertyTargetView;
+ createEdgeConnectorFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourceNestedPath.get(targetView), expectedTargetNestedPath.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetNestedConstraintParameter() throws Exception {
+ View targetView = nestedConstraintParameterTargetView;
+ createEdgeConnectorFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourceNestedPath.get(targetView), expectedTargetNestedPath.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetPart() throws Exception {
+ View targetView = partTargetView;
+ createEdgeConnectorFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourceNestedPath.get(targetView), expectedTargetNestedPath.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetNestedPart() throws Exception {
+ View targetView = nestedPartTargetView;
+ createEdgeConnectorFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourceNestedPath.get(targetView), expectedTargetNestedPath.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetReference() throws Exception {
+ View targetView = referenceTargetView;
+ createEdgeConnectorFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourceNestedPath.get(targetView), expectedTargetNestedPath.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetNestedReference() throws Exception {
+ View targetView = nestedReferenceTargetView;
+ createEdgeConnectorFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourceNestedPath.get(targetView), expectedTargetNestedPath.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetValue() throws Exception {
+ View targetView = valueTargetView;
+ createEdgeConnectorFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourceNestedPath.get(targetView), expectedTargetNestedPath.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetNestedValue() throws Exception {
+ View targetView = nestedValueTargetView;
+ createEdgeConnectorFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourceNestedPath.get(targetView), expectedTargetNestedPath.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetComment() throws Exception {
+ View targetView = commentTargetView;
+ createEdgeConnectorFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourceNestedPath.get(targetView), expectedTargetNestedPath.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetCommentCN() throws Exception {
+ View targetView = commentCNTargetView;
+ createEdgeConnectorFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourceNestedPath.get(targetView), expectedTargetNestedPath.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetConstraint() throws Exception {
+ View targetView = constraintTargetView;
+ createEdgeConnectorFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourceNestedPath.get(targetView), expectedTargetNestedPath.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetConstraintCN() throws Exception {
+ View targetView = constraintCNTargetView;
+ createEdgeConnectorFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourceNestedPath.get(targetView), expectedTargetNestedPath.get(targetView));
+ }
+
+ // deep nested tests
+ @Test
+ public void createLinkWithTargetSubNestedPartContainer_1_1_1() throws Exception {
+ View targetView = subNestedPartContainer1_1_1TargetView;
+ createEdgeConnectorFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourceNestedPath.get(targetView), expectedTargetNestedPath.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetSubNestedPartContainer_1_2_1() throws Exception {
+ View targetView = subNestedPartContainer1_2_1TargetView;
+ createEdgeConnectorFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourceNestedPath.get(targetView), expectedTargetNestedPath.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetSubNestedPartContainer_1_1_2() throws Exception {
+ View targetView = subNestedPartContainer1_1_2TargetView;
+ createEdgeConnectorFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourceNestedPath.get(targetView), expectedTargetNestedPath.get(targetView));
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/link/AbstractLinkCreationFromElementTest4CB.java b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/link/AbstractLinkCreationFromElementTest4CB.java
new file mode 100755
index 0000000..2eb146a
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/link/AbstractLinkCreationFromElementTest4CB.java
@@ -0,0 +1,156 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.tests.creation.link;
+
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.TestUtils.createEdgeConnectorFromPalette;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit abstract tests for Link creation test (via palette tools).
+ */
+public abstract class AbstractLinkCreationFromElementTest4CB extends AbstractLinkPrepareTest4CB {
+
+ public static String toolID;
+
+ public static View sourceView;
+
+ public static final Map<View, List<Property>> expectedSourceNestedPath = new HashMap<View, List<Property>>();
+
+ public static final Map<View, List<Property>> expectedTargetNestedPath = new HashMap<View, List<Property>>();
+
+ @BeforeClass
+ public static void initExpectedPathMaps() {
+ houseKeeper.cleanUpLater(expectedSourceNestedPath);
+ houseKeeper.cleanUpLater(expectedTargetNestedPath);
+ }
+
+ @Test
+ public void createLinkWithTargetBlock() throws Exception {
+ View targetView = diagramContainerTargetView;
+ createEdgeConnectorFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourceNestedPath.get(targetView), expectedTargetNestedPath.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetConstraintProperty() throws Exception {
+ View targetView = constraintPropertyTargetView;
+ createEdgeConnectorFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourceNestedPath.get(targetView), expectedTargetNestedPath.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetNestedConstraintProperty() throws Exception {
+ View targetView = nestedConstraintPropertyTargetView;
+ createEdgeConnectorFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourceNestedPath.get(targetView), expectedTargetNestedPath.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetConstraintParameter() throws Exception {
+ View targetView = constraintParameterTargetView;
+ createEdgeConnectorFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourceNestedPath.get(targetView), expectedTargetNestedPath.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetNestedConstraintParameter() throws Exception {
+ View targetView = nestedConstraintParameterTargetView;
+ createEdgeConnectorFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourceNestedPath.get(targetView), expectedTargetNestedPath.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetPart() throws Exception {
+ View targetView = partTargetView;
+ createEdgeConnectorFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourceNestedPath.get(targetView), expectedTargetNestedPath.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetNestedPart() throws Exception {
+ View targetView = nestedPartTargetView;
+ createEdgeConnectorFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourceNestedPath.get(targetView), expectedTargetNestedPath.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetReference() throws Exception {
+ View targetView = referenceTargetView;
+ createEdgeConnectorFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourceNestedPath.get(targetView), expectedTargetNestedPath.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetNestedReference() throws Exception {
+ View targetView = nestedReferenceTargetView;
+ createEdgeConnectorFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourceNestedPath.get(targetView), expectedTargetNestedPath.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetValue() throws Exception {
+ View targetView = valueTargetView;
+ createEdgeConnectorFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourceNestedPath.get(targetView), expectedTargetNestedPath.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetNestedValue() throws Exception {
+ View targetView = nestedValueTargetView;
+ createEdgeConnectorFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourceNestedPath.get(targetView), expectedTargetNestedPath.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetComment() throws Exception {
+ View targetView = commentTargetView;
+ createEdgeConnectorFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourceNestedPath.get(targetView), expectedTargetNestedPath.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetCommentCN() throws Exception {
+ View targetView = commentCNTargetView;
+ createEdgeConnectorFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourceNestedPath.get(targetView), expectedTargetNestedPath.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetConstraint() throws Exception {
+ View targetView = constraintTargetView;
+ createEdgeConnectorFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourceNestedPath.get(targetView), expectedTargetNestedPath.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetConstraintCN() throws Exception {
+ View targetView = constraintCNTargetView;
+ createEdgeConnectorFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourceNestedPath.get(targetView), expectedTargetNestedPath.get(targetView));
+ }
+
+ // deep nested tests
+ @Test
+ public void createLinkWithTargetSubNestedPartContainer_1_1_1() throws Exception {
+ View targetView = subNestedPartContainer1_1_1TargetView;
+ createEdgeConnectorFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourceNestedPath.get(targetView), expectedTargetNestedPath.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetSubNestedPartContainer_1_2_1() throws Exception {
+ View targetView = subNestedPartContainer1_2_1TargetView;
+ createEdgeConnectorFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourceNestedPath.get(targetView), expectedTargetNestedPath.get(targetView));
+ }
+
+ @Test
+ public void createLinkWithTargetSubNestedPartContainer_1_1_2() throws Exception {
+ View targetView = subNestedPartContainer1_1_2TargetView;
+ createEdgeConnectorFromPalette(toolID, sourceView, targetView, isCreationAllowed.get(targetView), expectedSourceNestedPath.get(targetView), expectedTargetNestedPath.get(targetView));
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/link/AbstractLinkPrepareTest.java b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/link/AbstractLinkPrepareTest.java
new file mode 100755
index 0000000..a7a2175
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/link/AbstractLinkPrepareTest.java
@@ -0,0 +1,179 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.tests.creation.link;
+
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.TestPrepareUtils.createGraphicalNode;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.parametric.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.parametric.tests.AbstractTest4B;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for link creation test (via palette tools).
+ */
+public abstract class AbstractLinkPrepareTest extends AbstractTest4B {
+
+ public static String toolID;
+
+ // Custom nodes
+ public static View diagramContainerSourceView, diagramContainerTargetView;
+
+ // Custom child label nodes
+ public static View constraintPropertySourceView, constraintPropertyTargetView;
+ public static View constraintParameterSourceView, constraintParameterTargetView;
+ public static View nestedConstraintPropertySourceView, nestedConstraintPropertyTargetView;
+ public static View nestedConstraintParameterSourceView, nestedConstraintParameterTargetView;
+ public static View partSourceView, partTargetView;
+ public static View nestedPartSourceView, nestedPartTargetView;
+ public static View referenceSourceView, referenceTargetView;
+ public static View nestedReferenceSourceView, nestedReferenceTargetView;
+ public static View valueSourceView, valueTargetView;
+ public static View nestedValueSourceView, nestedValueTargetView;
+
+ // Inherited nodes
+ public static View commentSourceView, commentTargetView, commentCNSourceView, commentCNTargetView;
+ public static View constraintSourceView, constraintTargetView, constraintCNSourceView, constraintCNTargetView;
+
+ public static View partContainer1; // Its type block may be set encapsulated for testing purpose.
+ public static View partContainer2; // Its type block may be set encapsulated for testing purpose.
+
+ public final static Map<View, Boolean> isCreationAllowed = new HashMap<View, Boolean>();
+
+ public static View subNestedPartContainer1_1_1SourceView;
+
+ public static View subNestedPartContainer1_2_1TargetView;
+
+ public static View subNestedPartContainer1_1_1TargetView;
+
+ public static View subNestedPartContainer1_1_2TargetView;
+
+ public static View subNestedPropertyContainer1_1_1SourceView;
+
+ public static View subNestedPropertyContainer1_1_1TargetView;
+
+ public static View subNestedPropertyContainer1_2_1TargetView;
+
+ public static View subNestedPropertyContainer1_1_2TargetView;
+
+ public static View subNestedReferenceContainer1_1_1SourceView;
+
+ public static View subNestedReferenceContainer1_1_1TargetView;
+
+ public static View subNestedReferenceContainer1_2_1TargetView;
+
+ public static View subNestedReferenceContainer1_1_2TargetView;
+
+ public static View subNestedValueContainer1_1_1SourceView;
+
+ public static View subNestedValueContainer1_1_1TargetView, subNestedValueContainer1_2_1TargetView, subNestedValueContainer1_1_2TargetView;
+
+ public static View nestedPartContainer1_1;
+
+ public static View nestedPartContainer2_1;
+
+ public static View nestedPartContainer1_2;
+
+ @BeforeClass
+ public static void initializeCreationAllowedMap() {
+ houseKeeper.cleanUpLater(isCreationAllowed);
+ }
+
+ @BeforeClass
+ public static void prepareInheritedNodes() throws Exception {
+ View container = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View containerCpt = ViewUtil.getChildBySemanticHint(container, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+
+ // Prepare elements for link creation tests
+ commentSourceView = createGraphicalNode(UMLElementTypes.COMMENT, ElementTypes.COMMENT.getSemanticHint(), getDiagramView());
+ commentTargetView = createGraphicalNode(UMLElementTypes.COMMENT, ElementTypes.COMMENT.getSemanticHint(), getDiagramView());
+ commentCNSourceView = createGraphicalNode(UMLElementTypes.COMMENT, ElementTypes.COMMENT_CN.getSemanticHint(), containerCpt);
+ commentCNTargetView = createGraphicalNode(UMLElementTypes.COMMENT, ElementTypes.COMMENT_CN.getSemanticHint(), containerCpt);
+
+ constraintSourceView = createGraphicalNode(UMLElementTypes.CONSTRAINT, ElementTypes.CONSTRAINT.getSemanticHint(), getDiagramView());
+ constraintTargetView = createGraphicalNode(UMLElementTypes.CONSTRAINT, ElementTypes.CONSTRAINT.getSemanticHint(), getDiagramView());
+ constraintCNSourceView = createGraphicalNode(UMLElementTypes.CONSTRAINT, ElementTypes.CONSTRAINT_CN.getSemanticHint(), containerCpt);
+ constraintCNTargetView = createGraphicalNode(UMLElementTypes.CONSTRAINT, ElementTypes.CONSTRAINT_CN.getSemanticHint(), containerCpt);
+ }
+
+ @BeforeClass
+ public static void prepareCustomNodes() throws Exception {
+ View container = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View constainerStructureView = ViewUtil.getChildBySemanticHint(container, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+ // part in block (level = 1)
+ partContainer1 = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, constainerStructureView);
+ View partContainer1StructureView = ViewUtil.getChildBySemanticHint(partContainer1, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ partContainer2 = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, constainerStructureView);
+ View partContainer2StructureView = ViewUtil.getChildBySemanticHint(partContainer2, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+
+
+ nestedPartContainer1_1 = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partContainer1StructureView);
+ nestedPartContainer2_1 = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partContainer1StructureView);
+ nestedPartContainer1_2 = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partContainer2StructureView);
+
+ // Prepare elements for link creation tests
+ diagramContainerSourceView = container;
+ diagramContainerTargetView = container;
+
+ // Prepare child nodes
+
+ constraintPropertySourceView = createGraphicalNode(SysMLElementTypes.CONSTRAINT_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_CONSTRAINTBLOCKPROPERTY_AS_COMPOSITE_ID, constainerStructureView);
+ constraintParameterSourceView = createGraphicalNode(UMLElementTypes.PROPERTY, UMLGraphicalTypes.SHAPE_UML_PROPERTY_AS_AFFIXED_ID, constraintPropertySourceView);
+
+ constraintPropertyTargetView = createGraphicalNode(SysMLElementTypes.CONSTRAINT_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_CONSTRAINTBLOCKPROPERTY_AS_COMPOSITE_ID, constainerStructureView);
+ constraintParameterTargetView = createGraphicalNode(UMLElementTypes.PROPERTY, UMLGraphicalTypes.SHAPE_UML_PROPERTY_AS_AFFIXED_ID, constraintPropertyTargetView);
+
+ partSourceView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, constainerStructureView);
+ partTargetView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, constainerStructureView);
+ nestedPartSourceView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partContainer1StructureView);
+ nestedPartTargetView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partContainer1StructureView);
+ subNestedPartContainer1_1_1SourceView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartContainer1_1);
+ subNestedPartContainer1_1_1TargetView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartContainer1_1);
+ subNestedPartContainer1_2_1TargetView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartContainer2_1);
+ subNestedPartContainer1_1_2TargetView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartContainer1_2);
+
+ nestedConstraintPropertySourceView = createGraphicalNode(SysMLElementTypes.CONSTRAINT_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_CONSTRAINTBLOCKPROPERTY_AS_COMPOSITE_ID, partContainer1StructureView);
+ nestedConstraintParameterSourceView = createGraphicalNode(UMLElementTypes.PROPERTY, UMLGraphicalTypes.SHAPE_UML_PROPERTY_AS_AFFIXED_ID, nestedConstraintPropertySourceView);
+ nestedConstraintPropertyTargetView = createGraphicalNode(SysMLElementTypes.CONSTRAINT_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_CONSTRAINTBLOCKPROPERTY_AS_COMPOSITE_ID, partContainer2StructureView);
+ nestedConstraintParameterTargetView = createGraphicalNode(UMLElementTypes.PROPERTY, UMLGraphicalTypes.SHAPE_UML_PROPERTY_AS_AFFIXED_ID, nestedConstraintPropertyTargetView);
+
+ referenceSourceView = createGraphicalNode(SysMLElementTypes.REFERENCE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, constainerStructureView);
+ referenceTargetView = createGraphicalNode(SysMLElementTypes.REFERENCE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, constainerStructureView);
+ nestedReferenceSourceView = createGraphicalNode(SysMLElementTypes.REFERENCE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partContainer1StructureView);
+ nestedReferenceTargetView = createGraphicalNode(SysMLElementTypes.REFERENCE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partContainer1StructureView);
+ subNestedReferenceContainer1_1_1SourceView = createGraphicalNode(SysMLElementTypes.REFERENCE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartContainer1_1);
+ subNestedReferenceContainer1_1_1TargetView = createGraphicalNode(SysMLElementTypes.REFERENCE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartContainer1_1);
+ subNestedReferenceContainer1_2_1TargetView = createGraphicalNode(SysMLElementTypes.REFERENCE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartContainer2_1);
+ subNestedReferenceContainer1_1_2TargetView = createGraphicalNode(SysMLElementTypes.REFERENCE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartContainer1_2);
+
+ valueSourceView = createGraphicalNode(SysMLElementTypes.VALUE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, constainerStructureView);
+ valueTargetView = createGraphicalNode(SysMLElementTypes.VALUE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, constainerStructureView);
+ nestedValueSourceView = createGraphicalNode(SysMLElementTypes.VALUE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partContainer1StructureView);
+ nestedValueTargetView = createGraphicalNode(SysMLElementTypes.VALUE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partContainer1StructureView);
+ subNestedValueContainer1_1_1SourceView = createGraphicalNode(SysMLElementTypes.VALUE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartContainer1_1);
+ subNestedValueContainer1_1_1TargetView = createGraphicalNode(SysMLElementTypes.VALUE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartContainer1_1);
+ subNestedValueContainer1_2_1TargetView = createGraphicalNode(SysMLElementTypes.VALUE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartContainer2_1);
+ subNestedValueContainer1_1_2TargetView = createGraphicalNode(SysMLElementTypes.VALUE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartContainer1_2);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/link/AbstractLinkPrepareTest4CB.java b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/link/AbstractLinkPrepareTest4CB.java
new file mode 100755
index 0000000..b148981
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/link/AbstractLinkPrepareTest4CB.java
@@ -0,0 +1,180 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.tests.creation.link;
+
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.TestPrepareUtils.createGraphicalNode;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.parametric.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.parametric.tests.AbstractTest4CB;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for link creation test (via palette tools).
+ */
+public abstract class AbstractLinkPrepareTest4CB extends AbstractTest4CB {
+
+ public static String toolID;
+
+ // Custom nodes
+ public static View diagramContainerSourceView, diagramContainerTargetView;
+
+ // Custom child label nodes
+ public static View constraintPropertySourceView, constraintPropertyTargetView;
+ public static View constraintParameterSourceView, constraintParameterTargetView;
+ public static View nestedConstraintPropertySourceView, nestedConstraintPropertyTargetView;
+ public static View nestedConstraintParameterSourceView, nestedConstraintParameterTargetView;
+ public static View partSourceView, partTargetView;
+ public static View nestedPartSourceView, nestedPartTargetView;
+ public static View referenceSourceView, referenceTargetView;
+ public static View nestedReferenceSourceView, nestedReferenceTargetView;
+ public static View valueSourceView, valueTargetView;
+ public static View nestedValueSourceView, nestedValueTargetView;
+
+ // Inherited nodes
+ public static View commentSourceView, commentTargetView, commentCNSourceView, commentCNTargetView;
+ public static View constraintSourceView, constraintTargetView, constraintCNSourceView, constraintCNTargetView;
+
+ public static View partContainer1; // Its type block may be set encapsulated for testing purpose.
+ public static View partContainer2; // Its type block may be set encapsulated for testing purpose.
+
+ public static final Map<View, Boolean> isCreationAllowed = new HashMap<View, Boolean>();
+
+ public static View subNestedPartContainer1_1_1SourceView;
+
+ public static View subNestedPartContainer1_2_1TargetView;
+
+ public static View subNestedPartContainer1_1_1TargetView;
+
+ public static View subNestedPartContainer1_1_2TargetView;
+
+ public static View subNestedPropertyContainer1_1_1SourceView;
+
+ public static View subNestedPropertyContainer1_1_1TargetView;
+
+ public static View subNestedPropertyContainer1_2_1TargetView;
+
+ public static View subNestedPropertyContainer1_1_2TargetView;
+
+ public static View subNestedReferenceContainer1_1_1SourceView;
+
+ public static View subNestedReferenceContainer1_1_1TargetView;
+
+ public static View subNestedReferenceContainer1_2_1TargetView;
+
+ public static View subNestedReferenceContainer1_1_2TargetView;
+
+ public static View subNestedValueContainer1_1_1SourceView;
+
+ public static View subNestedValueContainer1_1_1TargetView, subNestedValueContainer1_2_1TargetView, subNestedValueContainer1_1_2TargetView;
+
+ public static View nestedPartContainer1_1;
+
+ public static View nestedPartContainer2_1;
+
+ public static View nestedPartContainer1_2;
+
+ @BeforeClass
+ public static void initializeCreationAllowedMap() {
+ houseKeeper.cleanUpLater(isCreationAllowed);
+ }
+
+ @BeforeClass
+ public static void prepareInheritedNodes() throws Exception {
+ View container = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View containerCpt = ViewUtil.getChildBySemanticHint(container, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+
+ // Prepare elements for link creation tests
+ commentSourceView = createGraphicalNode(UMLElementTypes.COMMENT, ElementTypes.COMMENT.getSemanticHint(), getDiagramView());
+ commentTargetView = createGraphicalNode(UMLElementTypes.COMMENT, ElementTypes.COMMENT.getSemanticHint(), getDiagramView());
+ commentCNSourceView = createGraphicalNode(UMLElementTypes.COMMENT, ElementTypes.COMMENT_CN.getSemanticHint(), containerCpt);
+ commentCNTargetView = createGraphicalNode(UMLElementTypes.COMMENT, ElementTypes.COMMENT_CN.getSemanticHint(), containerCpt);
+
+ constraintSourceView = createGraphicalNode(UMLElementTypes.CONSTRAINT, ElementTypes.CONSTRAINT.getSemanticHint(), getDiagramView());
+ constraintTargetView = createGraphicalNode(UMLElementTypes.CONSTRAINT, ElementTypes.CONSTRAINT.getSemanticHint(), getDiagramView());
+ constraintCNSourceView = createGraphicalNode(UMLElementTypes.CONSTRAINT, ElementTypes.CONSTRAINT_CN.getSemanticHint(), containerCpt);
+ constraintCNTargetView = createGraphicalNode(UMLElementTypes.CONSTRAINT, ElementTypes.CONSTRAINT_CN.getSemanticHint(), containerCpt);
+ }
+
+ @BeforeClass
+ public static void prepareCustomNodes() throws Exception {
+ View container = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View constainerStructureView = ViewUtil.getChildBySemanticHint(container, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+ // part in block (level = 1)
+ partContainer1 = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, constainerStructureView);
+ View partContainer1StructureView = ViewUtil.getChildBySemanticHint(partContainer1, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ partContainer2 = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, constainerStructureView);
+ View partContainer2StructureView = ViewUtil.getChildBySemanticHint(partContainer2, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+
+
+ nestedPartContainer1_1 = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partContainer1StructureView);
+ nestedPartContainer2_1 = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partContainer1StructureView);
+ nestedPartContainer1_2 = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partContainer2StructureView);
+
+ // Prepare elements for link creation tests
+ diagramContainerSourceView = container;
+ diagramContainerTargetView = container;
+
+ // Prepare child nodes
+
+ constraintPropertySourceView = createGraphicalNode(SysMLElementTypes.CONSTRAINT_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_CONSTRAINTBLOCKPROPERTY_AS_COMPOSITE_ID, constainerStructureView);
+ constraintParameterSourceView = createGraphicalNode(UMLElementTypes.PROPERTY, UMLGraphicalTypes.SHAPE_UML_PROPERTY_AS_AFFIXED_ID, constraintPropertySourceView);
+
+ constraintPropertyTargetView = createGraphicalNode(SysMLElementTypes.CONSTRAINT_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_CONSTRAINTBLOCKPROPERTY_AS_COMPOSITE_ID, constainerStructureView);
+ constraintParameterTargetView = createGraphicalNode(UMLElementTypes.PROPERTY, UMLGraphicalTypes.SHAPE_UML_PROPERTY_AS_AFFIXED_ID, constraintPropertyTargetView);
+
+
+ partSourceView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, constainerStructureView);
+ partTargetView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, constainerStructureView);
+ nestedPartSourceView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partContainer1StructureView);
+ nestedPartTargetView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partContainer1StructureView);
+ subNestedPartContainer1_1_1SourceView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartContainer1_1);
+ subNestedPartContainer1_1_1TargetView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartContainer1_1);
+ subNestedPartContainer1_2_1TargetView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartContainer2_1);
+ subNestedPartContainer1_1_2TargetView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartContainer1_2);
+
+ nestedConstraintPropertySourceView = createGraphicalNode(SysMLElementTypes.CONSTRAINT_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_CONSTRAINTBLOCKPROPERTY_AS_COMPOSITE_ID, partContainer1StructureView);
+ nestedConstraintParameterSourceView = createGraphicalNode(UMLElementTypes.PROPERTY, UMLGraphicalTypes.SHAPE_UML_PROPERTY_AS_AFFIXED_ID, nestedConstraintPropertySourceView);
+ nestedConstraintPropertyTargetView = createGraphicalNode(SysMLElementTypes.CONSTRAINT_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_CONSTRAINTBLOCKPROPERTY_AS_COMPOSITE_ID, partContainer2StructureView);
+ nestedConstraintParameterTargetView = createGraphicalNode(UMLElementTypes.PROPERTY, UMLGraphicalTypes.SHAPE_UML_PROPERTY_AS_AFFIXED_ID, nestedConstraintPropertyTargetView);
+
+ referenceSourceView = createGraphicalNode(SysMLElementTypes.REFERENCE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, constainerStructureView);
+ referenceTargetView = createGraphicalNode(SysMLElementTypes.REFERENCE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, constainerStructureView);
+ nestedReferenceSourceView = createGraphicalNode(SysMLElementTypes.REFERENCE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partContainer1StructureView);
+ nestedReferenceTargetView = createGraphicalNode(SysMLElementTypes.REFERENCE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partContainer1StructureView);
+ subNestedReferenceContainer1_1_1SourceView = createGraphicalNode(SysMLElementTypes.REFERENCE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartContainer1_1);
+ subNestedReferenceContainer1_1_1TargetView = createGraphicalNode(SysMLElementTypes.REFERENCE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartContainer1_1);
+ subNestedReferenceContainer1_2_1TargetView = createGraphicalNode(SysMLElementTypes.REFERENCE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartContainer2_1);
+ subNestedReferenceContainer1_1_2TargetView = createGraphicalNode(SysMLElementTypes.REFERENCE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartContainer1_2);
+
+ valueSourceView = createGraphicalNode(SysMLElementTypes.VALUE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, constainerStructureView);
+ valueTargetView = createGraphicalNode(SysMLElementTypes.VALUE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, constainerStructureView);
+ nestedValueSourceView = createGraphicalNode(SysMLElementTypes.VALUE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partContainer1StructureView);
+ nestedValueTargetView = createGraphicalNode(SysMLElementTypes.VALUE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, partContainer1StructureView);
+ subNestedValueContainer1_1_1SourceView = createGraphicalNode(SysMLElementTypes.VALUE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartContainer1_1);
+ subNestedValueContainer1_1_1TargetView = createGraphicalNode(SysMLElementTypes.VALUE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartContainer1_1);
+ subNestedValueContainer1_2_1TargetView = createGraphicalNode(SysMLElementTypes.VALUE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartContainer2_1);
+ subNestedValueContainer1_1_2TargetView = createGraphicalNode(SysMLElementTypes.VALUE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, nestedPartContainer1_2);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/link/connector/TestLinkCreationConnectorFromConstraintParameter.java b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/link/connector/TestLinkCreationConnectorFromConstraintParameter.java
new file mode 100755
index 0000000..13343d9
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/link/connector/TestLinkCreationConnectorFromConstraintParameter.java
@@ -0,0 +1,106 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.tests.creation.link.connector;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.parametric.tests.creation.link.AbstractLinkCreationFromElementTest;
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link creation test (via palette tools).
+ */
+public class TestLinkCreationConnectorFromConstraintParameter extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = constraintParameterSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "parametric.tool.connector";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(diagramContainerTargetView, false);
+
+ isCreationAllowed.put(constraintPropertyTargetView, false);
+ isCreationAllowed.put(constraintParameterTargetView, true);
+ isCreationAllowed.put(nestedConstraintPropertyTargetView, false);
+ isCreationAllowed.put(nestedConstraintParameterTargetView, true);
+
+ isCreationAllowed.put(partTargetView, true);
+ isCreationAllowed.put(nestedPartTargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_1_1TargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_2_1TargetView, true);
+ isCreationAllowed.put(subNestedPartContainer1_1_2TargetView, true);
+
+ isCreationAllowed.put(referenceTargetView, true);
+ isCreationAllowed.put(nestedReferenceTargetView, true);
+
+ isCreationAllowed.put(valueTargetView, true);
+ isCreationAllowed.put(nestedValueTargetView, true);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, false);
+ isCreationAllowed.put(constraintCNTargetView, false);
+
+ // Initialize nested property path for tests
+
+
+ List<Property> nestedPath = Arrays.asList(new Property[]{ (Property)constraintPropertySourceView.getElement() });
+ List<Property> emptyPath = Collections.emptyList();
+ for(View view : isCreationAllowed.keySet()) {
+ expectedSourceNestedPath.put(view, nestedPath);
+ expectedTargetNestedPath.put(view, emptyPath);
+ }
+
+ nestedPath = Arrays.asList(new Property[]{ (Property)constraintPropertyTargetView.getElement() });
+ expectedTargetNestedPath.put(constraintParameterTargetView, nestedPath);
+
+ nestedPath = Arrays.asList(new Property[]{ (Property)partContainer2.getElement(), (Property)nestedConstraintPropertyTargetView.getElement()});
+ expectedTargetNestedPath.put(nestedConstraintParameterTargetView, nestedPath);
+
+ nestedPath = Arrays.asList(new Property[]{ (Property)partContainer1.getElement()});
+ expectedTargetNestedPath.put(nestedPartTargetView, nestedPath);
+
+ nestedPath = Arrays.asList(new Property[]{ (Property)partContainer1.getElement()});
+ expectedTargetNestedPath.put(nestedValueTargetView, nestedPath);
+
+ nestedPath = Arrays.asList(new Property[]{ (Property)partContainer1.getElement()});
+ expectedTargetNestedPath.put(nestedReferenceTargetView, nestedPath);
+
+ nestedPath = Arrays.asList(new Property[]{ (Property)partContainer1.getElement(), (Property)nestedPartContainer1_1.getElement()});
+ expectedTargetNestedPath.put(subNestedPartContainer1_1_1TargetView, nestedPath);
+
+ nestedPath = Arrays.asList(new Property[]{ (Property)partContainer1.getElement(), (Property)nestedPartContainer2_1.getElement()});
+ expectedTargetNestedPath.put(subNestedPartContainer1_2_1TargetView, nestedPath);
+
+ nestedPath = Arrays.asList(new Property[]{ (Property)partContainer2.getElement(), (Property)nestedPartContainer1_2.getElement()});
+ expectedTargetNestedPath.put(subNestedPartContainer1_1_2TargetView, nestedPath);
+
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/link/connector/TestLinkCreationConnectorFromPart.java b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/link/connector/TestLinkCreationConnectorFromPart.java
new file mode 100755
index 0000000..c9561c6
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/link/connector/TestLinkCreationConnectorFromPart.java
@@ -0,0 +1,85 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.tests.creation.link.connector;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.parametric.tests.creation.link.AbstractLinkCreationFromElementTest;
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link creation test (via palette tools).
+ */
+public class TestLinkCreationConnectorFromPart extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = partSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "parametric.tool.connector";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(diagramContainerTargetView, false);
+
+ isCreationAllowed.put(constraintPropertyTargetView, false);
+ isCreationAllowed.put(constraintParameterTargetView, true);
+ isCreationAllowed.put(nestedConstraintPropertyTargetView, false);
+ isCreationAllowed.put(nestedConstraintParameterTargetView, true);
+
+ isCreationAllowed.put(partTargetView, false);
+ isCreationAllowed.put(nestedPartTargetView, false);
+ isCreationAllowed.put(subNestedPartContainer1_1_1TargetView, false);
+ isCreationAllowed.put(subNestedPartContainer1_2_1TargetView, false);
+ isCreationAllowed.put(subNestedPartContainer1_1_2TargetView, false);
+
+ isCreationAllowed.put(referenceTargetView, false);
+ isCreationAllowed.put(nestedReferenceTargetView, false);
+
+ isCreationAllowed.put(valueTargetView, false);
+ isCreationAllowed.put(nestedValueTargetView, false);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, false);
+ isCreationAllowed.put(constraintCNTargetView, false);
+
+ // Initialize nested property path for tests
+
+
+ List<Property> emptyPath = Collections.emptyList();
+ for(View view : isCreationAllowed.keySet()) {
+ expectedSourceNestedPath.put(view, emptyPath);
+ expectedTargetNestedPath.put(view, emptyPath);
+ }
+
+ List<Property> nestedPath = Arrays.asList(new Property[]{ (Property)constraintPropertyTargetView.getElement() });
+ expectedTargetNestedPath.put(constraintParameterTargetView, nestedPath);
+ nestedPath = Arrays.asList(new Property[]{ (Property)partContainer2.getElement(), (Property)nestedConstraintPropertyTargetView.getElement()});
+ expectedTargetNestedPath.put(nestedConstraintParameterTargetView, nestedPath);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/link/connector/TestLinkCreationConnectorFromPart4CB.java b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/link/connector/TestLinkCreationConnectorFromPart4CB.java
new file mode 100755
index 0000000..938ca23
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/link/connector/TestLinkCreationConnectorFromPart4CB.java
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.tests.creation.link.connector;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.parametric.tests.creation.link.AbstractLinkCreationFromElementTest4CB;
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+import org.junit.Ignore;
+
+/**
+ * JUnit tests for Connector link creation test (via palette tools).
+ */
+@Ignore
+public class TestLinkCreationConnectorFromPart4CB extends AbstractLinkCreationFromElementTest4CB {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = partSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "parametric.tool.connector";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(diagramContainerTargetView, false);
+
+ isCreationAllowed.put(constraintPropertyTargetView, false);
+ isCreationAllowed.put(constraintParameterTargetView, true);
+ isCreationAllowed.put(nestedConstraintPropertyTargetView, false);
+ isCreationAllowed.put(nestedConstraintParameterTargetView, true);
+
+ isCreationAllowed.put(partTargetView, false);
+ isCreationAllowed.put(nestedPartTargetView, false);
+ isCreationAllowed.put(subNestedPartContainer1_1_1TargetView, false);
+ isCreationAllowed.put(subNestedPartContainer1_2_1TargetView, false);
+ isCreationAllowed.put(subNestedPartContainer1_1_2TargetView, false);
+
+ isCreationAllowed.put(referenceTargetView, false);
+ isCreationAllowed.put(nestedReferenceTargetView, false);
+
+ isCreationAllowed.put(valueTargetView, false);
+ isCreationAllowed.put(nestedValueTargetView, false);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, false);
+ isCreationAllowed.put(constraintCNTargetView, false);
+
+ // Initialize nested property path for tests
+
+
+ List<Property> emptyPath = Collections.emptyList();
+ for(View view : isCreationAllowed.keySet()) {
+ expectedSourceNestedPath.put(view, emptyPath);
+ expectedTargetNestedPath.put(view, emptyPath);
+ }
+
+ List<Property> nestedPath = Arrays.asList(new Property[]{ (Property)constraintPropertyTargetView.getElement() });
+ expectedTargetNestedPath.put(constraintParameterTargetView, nestedPath);
+ nestedPath = Arrays.asList(new Property[]{ (Property)partContainer2.getElement(), (Property)nestedConstraintPropertyTargetView.getElement()});
+ expectedTargetNestedPath.put(nestedConstraintParameterTargetView, nestedPath);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/link/connector/TestLinkCreationConnectorFromReference.java b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/link/connector/TestLinkCreationConnectorFromReference.java
new file mode 100755
index 0000000..48572c6
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/link/connector/TestLinkCreationConnectorFromReference.java
@@ -0,0 +1,85 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.tests.creation.link.connector;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.parametric.tests.creation.link.AbstractLinkCreationFromElementTest;
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link creation test (via palette tools).
+ */
+public class TestLinkCreationConnectorFromReference extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = referenceSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "parametric.tool.connector";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(diagramContainerTargetView, false);
+
+ isCreationAllowed.put(constraintPropertyTargetView, false);
+ isCreationAllowed.put(constraintParameterTargetView, true);
+ isCreationAllowed.put(nestedConstraintPropertyTargetView, false);
+ isCreationAllowed.put(nestedConstraintParameterTargetView, true);
+
+ isCreationAllowed.put(partTargetView, false);
+ isCreationAllowed.put(nestedPartTargetView, false);
+ isCreationAllowed.put(subNestedPartContainer1_1_1TargetView, false);
+ isCreationAllowed.put(subNestedPartContainer1_2_1TargetView, false);
+ isCreationAllowed.put(subNestedPartContainer1_1_2TargetView, false);
+
+ isCreationAllowed.put(referenceTargetView, false);
+ isCreationAllowed.put(nestedReferenceTargetView, false);
+
+ isCreationAllowed.put(valueTargetView, false);
+ isCreationAllowed.put(nestedValueTargetView, false);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, false);
+ isCreationAllowed.put(constraintCNTargetView, false);
+
+ // Initialize nested property path for tests
+
+
+ List<Property> emptyPath = Collections.emptyList();
+ for(View view : isCreationAllowed.keySet()) {
+ expectedSourceNestedPath.put(view, emptyPath);
+ expectedTargetNestedPath.put(view, emptyPath);
+ }
+
+ List<Property> nestedPath = Arrays.asList(new Property[]{ (Property)constraintPropertyTargetView.getElement() });
+ expectedTargetNestedPath.put(constraintParameterTargetView, nestedPath);
+ nestedPath = Arrays.asList(new Property[]{ (Property)partContainer2.getElement(), (Property)nestedConstraintPropertyTargetView.getElement()});
+ expectedTargetNestedPath.put(nestedConstraintParameterTargetView, nestedPath);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/link/connector/TestLinkCreationConnectorFromReference4CB.java b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/link/connector/TestLinkCreationConnectorFromReference4CB.java
new file mode 100755
index 0000000..9827811
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/link/connector/TestLinkCreationConnectorFromReference4CB.java
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.tests.creation.link.connector;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.parametric.tests.creation.link.AbstractLinkCreationFromElementTest4CB;
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+import org.junit.Ignore;
+
+/**
+ * JUnit tests for Connector link creation test (via palette tools).
+ */
+@Ignore // not executed by master extra HIPP
+public class TestLinkCreationConnectorFromReference4CB extends AbstractLinkCreationFromElementTest4CB {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = referenceSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "parametric.tool.connector";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(diagramContainerTargetView, false);
+
+ isCreationAllowed.put(constraintPropertyTargetView, false);
+ isCreationAllowed.put(constraintParameterTargetView, true);
+ isCreationAllowed.put(nestedConstraintPropertyTargetView, false);
+ isCreationAllowed.put(nestedConstraintParameterTargetView, true);
+
+ isCreationAllowed.put(partTargetView, false);
+ isCreationAllowed.put(nestedPartTargetView, false);
+ isCreationAllowed.put(subNestedPartContainer1_1_1TargetView, false);
+ isCreationAllowed.put(subNestedPartContainer1_2_1TargetView, false);
+ isCreationAllowed.put(subNestedPartContainer1_1_2TargetView, false);
+
+ isCreationAllowed.put(referenceTargetView, false);
+ isCreationAllowed.put(nestedReferenceTargetView, false);
+
+ isCreationAllowed.put(valueTargetView, false);
+ isCreationAllowed.put(nestedValueTargetView, false);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, false);
+ isCreationAllowed.put(constraintCNTargetView, false);
+
+ // Initialize nested property path for tests
+
+
+ List<Property> emptyPath = Collections.emptyList();
+ for(View view : isCreationAllowed.keySet()) {
+ expectedSourceNestedPath.put(view, emptyPath);
+ expectedTargetNestedPath.put(view, emptyPath);
+ }
+
+ List<Property> nestedPath = Arrays.asList(new Property[]{ (Property)constraintPropertyTargetView.getElement() });
+ expectedTargetNestedPath.put(constraintParameterTargetView, nestedPath);
+ nestedPath = Arrays.asList(new Property[]{ (Property)partContainer2.getElement(), (Property)nestedConstraintPropertyTargetView.getElement()});
+ expectedTargetNestedPath.put(nestedConstraintParameterTargetView, nestedPath);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/link/connector/TestLinkCreationConnectorFromValue.java b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/link/connector/TestLinkCreationConnectorFromValue.java
new file mode 100755
index 0000000..2688351
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/link/connector/TestLinkCreationConnectorFromValue.java
@@ -0,0 +1,85 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.tests.creation.link.connector;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.parametric.tests.creation.link.AbstractLinkCreationFromElementTest;
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+
+/**
+ * JUnit tests for Connector link creation test (via palette tools).
+ */
+public class TestLinkCreationConnectorFromValue extends AbstractLinkCreationFromElementTest {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = valueSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "parametric.tool.connector";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(diagramContainerTargetView, false);
+
+ isCreationAllowed.put(constraintPropertyTargetView, false);
+ isCreationAllowed.put(constraintParameterTargetView, true);
+ isCreationAllowed.put(nestedConstraintPropertyTargetView, false);
+ isCreationAllowed.put(nestedConstraintParameterTargetView, true);
+
+ isCreationAllowed.put(partTargetView, false);
+ isCreationAllowed.put(nestedPartTargetView, false);
+ isCreationAllowed.put(subNestedPartContainer1_1_1TargetView, false);
+ isCreationAllowed.put(subNestedPartContainer1_2_1TargetView, false);
+ isCreationAllowed.put(subNestedPartContainer1_1_2TargetView, false);
+
+ isCreationAllowed.put(referenceTargetView, false);
+ isCreationAllowed.put(nestedReferenceTargetView, false);
+
+ isCreationAllowed.put(valueTargetView, false);
+ isCreationAllowed.put(nestedValueTargetView, false);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, false);
+ isCreationAllowed.put(constraintCNTargetView, false);
+
+ // Initialize nested property path for tests
+
+
+ List<Property> emptyPath = Collections.emptyList();
+ for(View view : isCreationAllowed.keySet()) {
+ expectedSourceNestedPath.put(view, emptyPath);
+ expectedTargetNestedPath.put(view, emptyPath);
+ }
+
+ List<Property> nestedPath = Arrays.asList(new Property[]{ (Property)constraintPropertyTargetView.getElement() });
+ expectedTargetNestedPath.put(constraintParameterTargetView, nestedPath);
+ nestedPath = Arrays.asList(new Property[]{ (Property)partContainer2.getElement(), (Property)nestedConstraintPropertyTargetView.getElement()});
+ expectedTargetNestedPath.put(nestedConstraintParameterTargetView, nestedPath);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/link/connector/TestLinkCreationConnectorFromValue4CB.java b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/link/connector/TestLinkCreationConnectorFromValue4CB.java
new file mode 100755
index 0000000..e059531
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/link/connector/TestLinkCreationConnectorFromValue4CB.java
@@ -0,0 +1,88 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.tests.creation.link.connector;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.parametric.tests.creation.link.AbstractLinkCreationFromElementTest4CB;
+import org.eclipse.uml2.uml.Property;
+import org.junit.BeforeClass;
+import org.junit.Ignore;
+
+/**
+ *
+ * JUnit tests for Connector link creation test (via palette tools).
+ */
+@Ignore // not executed by master extra HIPP
+public class TestLinkCreationConnectorFromValue4CB extends AbstractLinkCreationFromElementTest4CB {
+
+ @BeforeClass
+ public static void initSource() throws Exception {
+ sourceView = valueSourceView;
+ }
+
+ @BeforeClass
+ public static void initToolID() throws Exception {
+ toolID = "parametric.tool.connector";
+ }
+
+ @BeforeClass
+ public static void initExpectedResults() throws Exception {
+
+ // Initialize source creation results
+
+ isCreationAllowed.put(diagramContainerTargetView, false);
+
+ isCreationAllowed.put(constraintPropertyTargetView, false);
+ isCreationAllowed.put(constraintParameterTargetView, true);
+ isCreationAllowed.put(nestedConstraintPropertyTargetView, false);
+ isCreationAllowed.put(nestedConstraintParameterTargetView, true);
+
+ isCreationAllowed.put(partTargetView, false);
+ isCreationAllowed.put(nestedPartTargetView, false);
+ isCreationAllowed.put(subNestedPartContainer1_1_1TargetView, false);
+ isCreationAllowed.put(subNestedPartContainer1_2_1TargetView, false);
+ isCreationAllowed.put(subNestedPartContainer1_1_2TargetView, false);
+
+ isCreationAllowed.put(referenceTargetView, false);
+ isCreationAllowed.put(nestedReferenceTargetView, false);
+
+ isCreationAllowed.put(valueTargetView, false);
+ isCreationAllowed.put(nestedValueTargetView, false);
+
+ isCreationAllowed.put(commentTargetView, false);
+ isCreationAllowed.put(commentCNTargetView, false);
+ isCreationAllowed.put(constraintTargetView, false);
+ isCreationAllowed.put(constraintCNTargetView, false);
+
+ // Initialize nested property path for tests
+
+
+ List<Property> emptyPath = Collections.emptyList();
+ for(View view : isCreationAllowed.keySet()) {
+ expectedSourceNestedPath.put(view, emptyPath);
+ expectedTargetNestedPath.put(view, emptyPath);
+ }
+
+ List<Property> nestedPath = Arrays.asList(new Property[]{ (Property)constraintPropertyTargetView.getElement() });
+ expectedTargetNestedPath.put(constraintParameterTargetView, nestedPath);
+ nestedPath = Arrays.asList(new Property[]{ (Property)partContainer2.getElement(), (Property)nestedConstraintPropertyTargetView.getElement()});
+ expectedTargetNestedPath.put(nestedConstraintParameterTargetView, nestedPath);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/node/TestNodeCreationOnBlock.java b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/node/TestNodeCreationOnBlock.java
new file mode 100755
index 0000000..a1ee606
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/node/TestNodeCreationOnBlock.java
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.tests.creation.node;
+
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.parametric.tests.AbstractTest4B;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in diagram.
+ */
+public class TestNodeCreationOnBlock extends AbstractTest4B {
+
+ public static View blockView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+
+ if(blockView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testCreationConstraintProperty() throws Exception {
+ createNodeFromPalette("parametric.tool.constraintblockpropertycomposite", blockView, false);
+ }
+
+ @Test
+ public void testCreationConstraintParameter() throws Exception {
+ createNodeFromPalette("parametric.tool.parameter", blockView, false);
+ }
+
+ @Test
+ public void testCreationPart() throws Exception {
+ createNodeFromPalette("parametric.tool.blockpropertycomposite", blockView, false);
+ }
+
+ @Test
+ public void testCreationReference() throws Exception {
+ createNodeFromPalette("parametric.tool.reference", blockView, false);
+ }
+
+ @Test
+ public void testCreationValue() throws Exception {
+ createNodeFromPalette("parametric.tool.value", blockView, false);
+ }
+
+ @Test
+ public void testCreationComment() throws Exception {
+ createNodeFromPalette("parametric.tool.comment", blockView, false);
+ }
+
+ @Test
+ public void testCreationConstraint() throws Exception {
+ createNodeFromPalette("parametric.tool.constraint", blockView, false);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/node/TestNodeCreationOnBlockStructureCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/node/TestNodeCreationOnBlockStructureCompartment.java
new file mode 100755
index 0000000..53ca868
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/node/TestNodeCreationOnBlockStructureCompartment.java
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.tests.creation.node;
+
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.parametric.tests.AbstractTest4B;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in diagram.
+ */
+public class TestNodeCreationOnBlockStructureCompartment extends AbstractTest4B {
+
+ public static View blockContainerView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ blockContainerView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+
+ if(blockContainerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testCreationConstraintProperty() throws Exception {
+ createNodeFromPalette("parametric.tool.constraintblockpropertycomposite", blockContainerView, true, false);
+ }
+
+ @Test
+ public void testCreationConstraintParameter() throws Exception {
+ createNodeFromPalette("parametric.tool.parameter", blockContainerView, false);
+ }
+
+ @Test
+ public void testCreationPart() throws Exception {
+ createNodeFromPalette("parametric.tool.blockpropertycomposite", blockContainerView, true, false);
+ }
+
+ @Test
+ public void testCreationReference() throws Exception {
+ createNodeFromPalette("parametric.tool.reference", blockContainerView, true, false);
+ }
+
+ @Test
+ public void testCreationValue() throws Exception {
+ createNodeFromPalette("parametric.tool.value", blockContainerView, true, false);
+ }
+
+ @Test
+ public void testCreationComment() throws Exception {
+ createNodeFromPalette("parametric.tool.comment", blockContainerView, true);
+ }
+
+ @Test
+ public void testCreationConstraint() throws Exception {
+ createNodeFromPalette("parametric.tool.constraint", blockContainerView, true);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/node/TestNodeCreationOnComment.java b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/node/TestNodeCreationOnComment.java
new file mode 100755
index 0000000..e720178
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/node/TestNodeCreationOnComment.java
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.tests.creation.node;
+
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.parametric.tests.AbstractTest4B;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in diagram.
+ */
+public class TestNodeCreationOnComment extends AbstractTest4B {
+
+ public static View commentView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockStructureView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+
+ commentView = createGraphicalNode(UMLElementTypes.COMMENT, ElementTypes.COMMENT.getSemanticHint(), blockStructureView);
+
+ if(commentView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testCreationConstraintProperty() throws Exception {
+ createNodeFromPalette("parametric.tool.constraintblockpropertycomposite", commentView, false);
+ }
+
+ @Test
+ public void testCreationConstraintParameter() throws Exception {
+ createNodeFromPalette("parametric.tool.parameter", commentView, false);
+ }
+
+ @Test
+ public void testCreationPart() throws Exception {
+ createNodeFromPalette("parametric.tool.blockpropertycomposite", commentView, false);
+ }
+
+ @Test
+ public void testCreationReference() throws Exception {
+ createNodeFromPalette("parametric.tool.reference", commentView, false);
+ }
+
+ @Test
+ public void testCreationValue() throws Exception {
+ createNodeFromPalette("parametric.tool.value", commentView, false);
+ }
+
+ @Test
+ public void testCreationComment() throws Exception {
+ createNodeFromPalette("parametric.tool.comment", commentView, false);
+ }
+
+ @Test
+ public void testCreationConstraint() throws Exception {
+ createNodeFromPalette("parametric.tool.constraint", commentView, false);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/node/TestNodeCreationOnComment4CB.java b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/node/TestNodeCreationOnComment4CB.java
new file mode 100755
index 0000000..fad7516
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/node/TestNodeCreationOnComment4CB.java
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.tests.creation.node;
+
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.parametric.tests.AbstractTest4B;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in diagram.
+ */
+public class TestNodeCreationOnComment4CB extends AbstractTest4B {
+
+ public static View commentView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockStructureView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+
+ commentView = createGraphicalNode(UMLElementTypes.COMMENT, ElementTypes.COMMENT.getSemanticHint(), blockStructureView);
+
+ if(commentView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testCreationConstraintProperty() throws Exception {
+ createNodeFromPalette("parametric.tool.constraintblockpropertycomposite", commentView, false);
+ }
+
+ @Test
+ public void testCreationConstraintParameter() throws Exception {
+ createNodeFromPalette("parametric.tool.parameter", commentView, false);
+ }
+
+ @Test
+ public void testCreationPart() throws Exception {
+ createNodeFromPalette("parametric.tool.blockpropertycomposite", commentView, false);
+ }
+
+ @Test
+ public void testCreationReference() throws Exception {
+ createNodeFromPalette("parametric.tool.reference", commentView, false);
+ }
+
+ @Test
+ public void testCreationValue() throws Exception {
+ createNodeFromPalette("parametric.tool.value", commentView, false);
+ }
+
+ @Test
+ public void testCreationComment() throws Exception {
+ createNodeFromPalette("parametric.tool.comment", commentView, false);
+ }
+
+ @Test
+ public void testCreationConstraint() throws Exception {
+ createNodeFromPalette("parametric.tool.constraint", commentView, false);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/node/TestNodeCreationOnConstraint.java b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/node/TestNodeCreationOnConstraint.java
new file mode 100755
index 0000000..f1a35b6
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/node/TestNodeCreationOnConstraint.java
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.tests.creation.node;
+
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.parametric.tests.AbstractTest4B;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in diagram.
+ */
+public class TestNodeCreationOnConstraint extends AbstractTest4B {
+
+ public static View commentView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockStructureView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+
+ commentView = createGraphicalNode(UMLElementTypes.CONSTRAINT, ElementTypes.CONSTRAINT.getSemanticHint(), blockStructureView);
+
+ if(commentView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testCreationConstraintProperty() throws Exception {
+ createNodeFromPalette("parametric.tool.constraintblockpropertycomposite", commentView, false);
+ }
+
+ @Test
+ public void testCreationConstraintParameter() throws Exception {
+ createNodeFromPalette("parametric.tool.parameter", commentView, false);
+ }
+
+ @Test
+ public void testCreationPart() throws Exception {
+ createNodeFromPalette("parametric.tool.blockpropertycomposite", commentView, false);
+ }
+
+ @Test
+ public void testCreationReference() throws Exception {
+ createNodeFromPalette("parametric.tool.reference", commentView, false);
+ }
+
+ @Test
+ public void testCreationValue() throws Exception {
+ createNodeFromPalette("parametric.tool.value", commentView, false);
+ }
+
+ @Test
+ public void testCreationComment() throws Exception {
+ createNodeFromPalette("parametric.tool.comment", commentView, false);
+ }
+
+ @Test
+ public void testCreationConstraint() throws Exception {
+ createNodeFromPalette("parametric.tool.constraint", commentView, false);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/node/TestNodeCreationOnConstraint4CB.java b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/node/TestNodeCreationOnConstraint4CB.java
new file mode 100755
index 0000000..7b5993a
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/node/TestNodeCreationOnConstraint4CB.java
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.tests.creation.node;
+
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.internalblock.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.parametric.tests.AbstractTest4B;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in diagram.
+ */
+public class TestNodeCreationOnConstraint4CB extends AbstractTest4B {
+
+ public static View commentView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockStructureView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+
+ commentView = createGraphicalNode(UMLElementTypes.CONSTRAINT, ElementTypes.CONSTRAINT.getSemanticHint(), blockStructureView);
+
+ if(commentView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testCreationConstraintProperty() throws Exception {
+ createNodeFromPalette("parametric.tool.constraintblockpropertycomposite", commentView, false);
+ }
+
+ @Test
+ public void testCreationConstraintParameter() throws Exception {
+ createNodeFromPalette("parametric.tool.parameter", commentView, false);
+ }
+
+ @Test
+ public void testCreationPart() throws Exception {
+ createNodeFromPalette("parametric.tool.blockpropertycomposite", commentView, false);
+ }
+
+ @Test
+ public void testCreationReference() throws Exception {
+ createNodeFromPalette("parametric.tool.reference", commentView, false);
+ }
+
+ @Test
+ public void testCreationValue() throws Exception {
+ createNodeFromPalette("parametric.tool.value", commentView, false);
+ }
+
+ @Test
+ public void testCreationComment() throws Exception {
+ createNodeFromPalette("parametric.tool.comment", commentView, false);
+ }
+
+ @Test
+ public void testCreationConstraint() throws Exception {
+ createNodeFromPalette("parametric.tool.constraint", commentView, false);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/node/TestNodeCreationOnConstraintBlock4CB.java b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/node/TestNodeCreationOnConstraintBlock4CB.java
new file mode 100755
index 0000000..e594d3a
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/node/TestNodeCreationOnConstraintBlock4CB.java
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.tests.creation.node;
+
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.parametric.tests.AbstractTest4CB;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in diagram.
+ */
+public class TestNodeCreationOnConstraintBlock4CB extends AbstractTest4CB {
+
+ public static View constraintBlockView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ constraintBlockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ if(constraintBlockView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testCreationConstraintProperty() throws Exception {
+ createNodeFromPalette("parametric.tool.constraintblockpropertycomposite", constraintBlockView, false);
+ }
+
+ @Test
+ public void testCreationConstraintParameter() throws Exception {
+ createNodeFromPalette("parametric.tool.parameter", constraintBlockView, true);
+ }
+
+ @Test
+ public void testCreationPart() throws Exception {
+ createNodeFromPalette("parametric.tool.blockpropertycomposite", constraintBlockView, false);
+ }
+
+ @Test
+ public void testCreationReference() throws Exception {
+ createNodeFromPalette("parametric.tool.reference", constraintBlockView, false);
+ }
+
+ @Test
+ public void testCreationValue() throws Exception {
+ createNodeFromPalette("parametric.tool.value", constraintBlockView, false);
+ }
+
+ @Test
+ public void testCreationComment() throws Exception {
+ createNodeFromPalette("parametric.tool.comment", constraintBlockView, false);
+ }
+
+ @Test
+ public void testCreationConstraint() throws Exception {
+ createNodeFromPalette("parametric.tool.constraint", constraintBlockView, false);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/node/TestNodeCreationOnConstraintBlockStructureCompartment4CB.java b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/node/TestNodeCreationOnConstraintBlockStructureCompartment4CB.java
new file mode 100755
index 0000000..202a9f1
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/node/TestNodeCreationOnConstraintBlockStructureCompartment4CB.java
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.tests.creation.node;
+
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.parametric.tests.AbstractTest4CB;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in diagram.
+ */
+public class TestNodeCreationOnConstraintBlockStructureCompartment4CB extends AbstractTest4CB {
+
+ public static View constraintBlockStructureView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View constraintBlockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ constraintBlockStructureView = ViewUtil.getChildBySemanticHint(constraintBlockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+ if(constraintBlockStructureView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testCreationConstraintProperty() throws Exception {
+ createNodeFromPalette("parametric.tool.constraintblockpropertycomposite", constraintBlockStructureView, true, false);
+ }
+
+ @Test
+ public void testCreationConstraintParameter() throws Exception {
+ createNodeFromPalette("parametric.tool.parameter", constraintBlockStructureView, false);
+ }
+
+ @Test
+ public void testCreationPart() throws Exception {
+ createNodeFromPalette("parametric.tool.blockpropertycomposite", constraintBlockStructureView, false);
+ }
+
+ @Test
+ public void testCreationReference() throws Exception {
+ createNodeFromPalette("parametric.tool.reference", constraintBlockStructureView, false);
+ }
+
+ @Test
+ public void testCreationValue() throws Exception {
+ createNodeFromPalette("parametric.tool.value", constraintBlockStructureView, false);
+ }
+
+ @Test
+ public void testCreationComment() throws Exception {
+ createNodeFromPalette("parametric.tool.comment", constraintBlockStructureView, true);
+ }
+
+ @Test
+ public void testCreationConstraint() throws Exception {
+ createNodeFromPalette("parametric.tool.constraint", constraintBlockStructureView, true);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/node/TestNodeCreationOnConstraintProperty.java b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/node/TestNodeCreationOnConstraintProperty.java
new file mode 100755
index 0000000..3adb195
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/node/TestNodeCreationOnConstraintProperty.java
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.tests.creation.node;
+
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.parametric.tests.AbstractTest4B;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in diagram.
+ */
+public class TestNodeCreationOnConstraintProperty extends AbstractTest4B {
+
+ public static View constraintPropertyView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockStructureView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+ if(blockStructureView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+ constraintPropertyView = createGraphicalNode(SysMLElementTypes.CONSTRAINT_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_CONSTRAINTBLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testCreationConstraintProperty() throws Exception {
+ createNodeFromPalette("parametric.tool.constraintblockpropertycomposite", constraintPropertyView, false);
+ }
+
+ @Test
+ public void testCreationConstraintParameter() throws Exception {
+ createNodeFromPalette("parametric.tool.parameter", constraintPropertyView, true);
+ }
+
+ @Test
+ public void testCreationPart() throws Exception {
+ createNodeFromPalette("parametric.tool.blockpropertycomposite", constraintPropertyView, false);
+ }
+
+ @Test
+ public void testCreationReference() throws Exception {
+ createNodeFromPalette("parametric.tool.reference", constraintPropertyView, false);
+ }
+
+ @Test
+ public void testCreationValue() throws Exception {
+ createNodeFromPalette("parametric.tool.value", constraintPropertyView, false);
+ }
+
+ @Test
+ public void testCreationComment() throws Exception {
+ createNodeFromPalette("parametric.tool.comment", constraintPropertyView, false);
+ }
+
+ @Test
+ public void testCreationConstraint() throws Exception {
+ createNodeFromPalette("parametric.tool.constraint", constraintPropertyView, false);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/node/TestNodeCreationOnConstraintProperty4CB.java b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/node/TestNodeCreationOnConstraintProperty4CB.java
new file mode 100755
index 0000000..f18dbb6
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/node/TestNodeCreationOnConstraintProperty4CB.java
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.tests.creation.node;
+
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.parametric.tests.AbstractTest4CB;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in diagram.
+ */
+public class TestNodeCreationOnConstraintProperty4CB extends AbstractTest4CB {
+
+ public static View constraintPropertyView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockStructureView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+ if(blockStructureView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+ constraintPropertyView = createGraphicalNode(SysMLElementTypes.CONSTRAINT_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_CONSTRAINTBLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testCreationConstraintProperty() throws Exception {
+ createNodeFromPalette("parametric.tool.constraintblockpropertycomposite", constraintPropertyView, false);
+ }
+
+ @Test
+ public void testCreationConstraintParameter() throws Exception {
+ createNodeFromPalette("parametric.tool.parameter", constraintPropertyView, true);
+ }
+
+ @Test
+ public void testCreationPart() throws Exception {
+ createNodeFromPalette("parametric.tool.blockpropertycomposite", constraintPropertyView, false);
+ }
+
+ @Test
+ public void testCreationReference() throws Exception {
+ createNodeFromPalette("parametric.tool.reference", constraintPropertyView, false);
+ }
+
+ @Test
+ public void testCreationValue() throws Exception {
+ createNodeFromPalette("parametric.tool.value", constraintPropertyView, false);
+ }
+
+ @Test
+ public void testCreationComment() throws Exception {
+ createNodeFromPalette("parametric.tool.comment", constraintPropertyView, false);
+ }
+
+ @Test
+ public void testCreationConstraint() throws Exception {
+ createNodeFromPalette("parametric.tool.constraint", constraintPropertyView, false);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/node/TestNodeCreationOnDiagram.java b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/node/TestNodeCreationOnDiagram.java
new file mode 100755
index 0000000..3bac143
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/node/TestNodeCreationOnDiagram.java
@@ -0,0 +1,62 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.tests.creation.node;
+
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.papyrus.sysml.diagram.parametric.tests.AbstractTest4B;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in diagram.
+ */
+public class TestNodeCreationOnDiagram extends AbstractTest4B {
+
+ @Test
+ public void testCreationConstraintProperty() throws Exception {
+ createNodeFromPalette("parametric.tool.constraintblockpropertycomposite", getDiagramView(), false);
+ }
+
+ @Test
+ public void testCreationConstraintParameter() throws Exception {
+ createNodeFromPalette("parametric.tool.parameter", getDiagramView(), false);
+ }
+
+ @Test
+ public void testCreationPart() throws Exception {
+ createNodeFromPalette("parametric.tool.blockpropertycomposite", getDiagramView(), false);
+ }
+
+ @Test
+ public void testCreationReference() throws Exception {
+ createNodeFromPalette("parametric.tool.reference", getDiagramView(), false);
+ }
+
+ @Test
+ public void testCreationValue() throws Exception {
+ createNodeFromPalette("parametric.tool.value", getDiagramView(), false);
+ }
+
+ @Test
+ public void testCreationComment() throws Exception {
+ createNodeFromPalette("parametric.tool.comment", getDiagramView(), true);
+ }
+
+ @Test
+ public void testCreationConstraint() throws Exception {
+ createNodeFromPalette("parametric.tool.constraint", getDiagramView(), true);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/node/TestNodeCreationOnDiagram4CB.java b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/node/TestNodeCreationOnDiagram4CB.java
new file mode 100755
index 0000000..dee784b
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/node/TestNodeCreationOnDiagram4CB.java
@@ -0,0 +1,62 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.tests.creation.node;
+
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.papyrus.sysml.diagram.parametric.tests.AbstractTest4CB;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in diagram.
+ */
+public class TestNodeCreationOnDiagram4CB extends AbstractTest4CB {
+
+ @Test
+ public void testCreationConstraintProperty() throws Exception {
+ createNodeFromPalette("parametric.tool.constraintblockpropertycomposite", getDiagramView(), false);
+ }
+
+ @Test
+ public void testCreationConstraintParameter() throws Exception {
+ createNodeFromPalette("parametric.tool.parameter", getDiagramView(), false);
+ }
+
+ @Test
+ public void testCreationPart() throws Exception {
+ createNodeFromPalette("parametric.tool.blockpropertycomposite", getDiagramView(), false);
+ }
+
+ @Test
+ public void testCreationReference() throws Exception {
+ createNodeFromPalette("parametric.tool.reference", getDiagramView(), false);
+ }
+
+ @Test
+ public void testCreationValue() throws Exception {
+ createNodeFromPalette("parametric.tool.value", getDiagramView(), false);
+ }
+
+ @Test
+ public void testCreationComment() throws Exception {
+ createNodeFromPalette("parametric.tool.comment", getDiagramView(), true);
+ }
+
+ @Test
+ public void testCreationConstraint() throws Exception {
+ createNodeFromPalette("parametric.tool.constraint", getDiagramView(), true);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/node/TestNodeCreationOnPart.java b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/node/TestNodeCreationOnPart.java
new file mode 100755
index 0000000..b3131ec
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/node/TestNodeCreationOnPart.java
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.tests.creation.node;
+
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.parametric.tests.AbstractTest4B;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in diagram.
+ */
+public class TestNodeCreationOnPart extends AbstractTest4B {
+
+ public static View partView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockStructureView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+ if(blockStructureView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+ partView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testCreationConstraintProperty() throws Exception {
+ createNodeFromPalette("parametric.tool.constraintblockpropertycomposite", partView, false);
+ }
+
+ @Test
+ public void testCreationConstraintParameter() throws Exception {
+ createNodeFromPalette("parametric.tool.parameter", partView, false);
+ }
+
+ @Test
+ public void testCreationPart() throws Exception {
+ createNodeFromPalette("parametric.tool.blockpropertycomposite", partView, false);
+ }
+
+ @Test
+ public void testCreationReference() throws Exception {
+ createNodeFromPalette("parametric.tool.reference", partView, false);
+ }
+
+ @Test
+ public void testCreationValue() throws Exception {
+ createNodeFromPalette("parametric.tool.value", partView, false);
+ }
+
+ @Test
+ public void testCreationComment() throws Exception {
+ createNodeFromPalette("parametric.tool.comment", partView, false);
+ }
+
+ @Test
+ public void testCreationConstraint() throws Exception {
+ createNodeFromPalette("parametric.tool.constraint", partView, false);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/node/TestNodeCreationOnPartStructureCompartement.java b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/node/TestNodeCreationOnPartStructureCompartement.java
new file mode 100755
index 0000000..9647e6b
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/node/TestNodeCreationOnPartStructureCompartement.java
@@ -0,0 +1,85 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.tests.creation.node;
+
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.parametric.tests.AbstractTest4B;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in diagram.
+ */
+public class TestNodeCreationOnPartStructureCompartement extends AbstractTest4B {
+
+ public static View partViewStructureView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockStructureView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+ if(blockStructureView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+ View partView = createGraphicalNode(SysMLElementTypes.PART_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ partViewStructureView = ViewUtil.getChildBySemanticHint(partView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testCreationConstraintProperty() throws Exception {
+ createNodeFromPalette("parametric.tool.constraintblockpropertycomposite", partViewStructureView, true, false);
+ }
+
+ @Test
+ public void testCreationConstraintParameter() throws Exception {
+ createNodeFromPalette("parametric.tool.parameter", partViewStructureView, false);
+ }
+
+ @Test
+ public void testCreationPart() throws Exception {
+ createNodeFromPalette("parametric.tool.blockpropertycomposite", partViewStructureView, true, false);
+ }
+
+ @Test
+ public void testCreationReference() throws Exception {
+ createNodeFromPalette("parametric.tool.reference", partViewStructureView, true, false);
+ }
+
+ @Test
+ public void testCreationValue() throws Exception {
+ createNodeFromPalette("parametric.tool.value", partViewStructureView, true, false);
+ }
+
+ @Test
+ public void testCreationComment() throws Exception {
+ createNodeFromPalette("parametric.tool.comment", partViewStructureView, true);
+ }
+
+ @Test
+ public void testCreationConstraint() throws Exception {
+ createNodeFromPalette("parametric.tool.constraint", partViewStructureView, false);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/node/TestNodeCreationOnReference.java b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/node/TestNodeCreationOnReference.java
new file mode 100755
index 0000000..569f56a
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/node/TestNodeCreationOnReference.java
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.tests.creation.node;
+
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.parametric.tests.AbstractTest4B;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in diagram.
+ */
+public class TestNodeCreationOnReference extends AbstractTest4B {
+
+ public static View constraintPropertyView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockStructureView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+ if(blockStructureView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+ constraintPropertyView = createGraphicalNode(SysMLElementTypes.REFERENCE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testCreationConstraintProperty() throws Exception {
+ createNodeFromPalette("parametric.tool.constraintblockpropertycomposite", constraintPropertyView, false);
+ }
+
+ @Test
+ public void testCreationConstraintParameter() throws Exception {
+ createNodeFromPalette("parametric.tool.parameter", constraintPropertyView, false);
+ }
+
+ @Test
+ public void testCreationPart() throws Exception {
+ createNodeFromPalette("parametric.tool.blockpropertycomposite", constraintPropertyView, false);
+ }
+
+ @Test
+ public void testCreationReference() throws Exception {
+ createNodeFromPalette("parametric.tool.reference", constraintPropertyView, false);
+ }
+
+ @Test
+ public void testCreationValue() throws Exception {
+ createNodeFromPalette("parametric.tool.value", constraintPropertyView, false);
+ }
+
+ @Test
+ public void testCreationComment() throws Exception {
+ createNodeFromPalette("parametric.tool.comment", constraintPropertyView, false);
+ }
+
+ @Test
+ public void testCreationConstraint() throws Exception {
+ createNodeFromPalette("parametric.tool.constraint", constraintPropertyView, false);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/node/TestNodeCreationOnReferenceStructureCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/node/TestNodeCreationOnReferenceStructureCompartment.java
new file mode 100755
index 0000000..cd23314
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/node/TestNodeCreationOnReferenceStructureCompartment.java
@@ -0,0 +1,85 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.tests.creation.node;
+
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.parametric.tests.AbstractTest4B;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in diagram.
+ */
+public class TestNodeCreationOnReferenceStructureCompartment extends AbstractTest4B {
+
+ public static View constraintPropertyStructureView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockStructureView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+ if(blockStructureView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+ View constraintPropertyView = createGraphicalNode(SysMLElementTypes.REFERENCE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ constraintPropertyStructureView = ViewUtil.getChildBySemanticHint(constraintPropertyView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testCreationConstraintProperty() throws Exception {
+ createNodeFromPalette("parametric.tool.constraintblockpropertycomposite", constraintPropertyStructureView, true, false);
+ }
+
+ @Test
+ public void testCreationConstraintParameter() throws Exception {
+ createNodeFromPalette("parametric.tool.parameter", constraintPropertyStructureView, false);
+ }
+
+ @Test
+ public void testCreationPart() throws Exception {
+ createNodeFromPalette("parametric.tool.blockpropertycomposite", constraintPropertyStructureView, true, false);
+ }
+
+ @Test
+ public void testCreationReference() throws Exception {
+ createNodeFromPalette("parametric.tool.reference", constraintPropertyStructureView, true, false);
+ }
+
+ @Test
+ public void testCreationValue() throws Exception {
+ createNodeFromPalette("parametric.tool.value", constraintPropertyStructureView, true, false);
+ }
+
+ @Test
+ public void testCreationComment() throws Exception {
+ createNodeFromPalette("parametric.tool.comment", constraintPropertyStructureView, true);
+ }
+
+ @Test
+ public void testCreationConstraint() throws Exception {
+ createNodeFromPalette("parametric.tool.constraint", constraintPropertyStructureView, false);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/node/TestNodeCreationOnValue.java b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/node/TestNodeCreationOnValue.java
new file mode 100755
index 0000000..e48f0db
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/node/TestNodeCreationOnValue.java
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.tests.creation.node;
+
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.parametric.tests.AbstractTest4B;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in diagram.
+ */
+public class TestNodeCreationOnValue extends AbstractTest4B {
+
+ public static View valueView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockStructureView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+ if(blockStructureView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+ valueView = createGraphicalNode(SysMLElementTypes.VALUE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testCreationConstraintProperty() throws Exception {
+ createNodeFromPalette("parametric.tool.constraintblockpropertycomposite", valueView, false);
+ }
+
+ @Test
+ public void testCreationConstraintParameter() throws Exception {
+ createNodeFromPalette("parametric.tool.parameter", valueView, false);
+ }
+
+ @Test
+ public void testCreationPart() throws Exception {
+ createNodeFromPalette("parametric.tool.blockpropertycomposite", valueView, false);
+ }
+
+ @Test
+ public void testCreationReference() throws Exception {
+ createNodeFromPalette("parametric.tool.reference", valueView, false);
+ }
+
+ @Test
+ public void testCreationValue() throws Exception {
+ createNodeFromPalette("parametric.tool.value", valueView, false);
+ }
+
+ @Test
+ public void testCreationComment() throws Exception {
+ createNodeFromPalette("parametric.tool.comment", valueView, false);
+ }
+
+ @Test
+ public void testCreationConstraint() throws Exception {
+ createNodeFromPalette("parametric.tool.constraint", valueView, false);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/node/TestNodeCreationOnValueStructureCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/node/TestNodeCreationOnValueStructureCompartment.java
new file mode 100755
index 0000000..befc0f7
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/creation/node/TestNodeCreationOnValueStructureCompartment.java
@@ -0,0 +1,85 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.tests.creation.node;
+
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.TestPrepareUtils.createGraphicalNode;
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.TestUtils.createNodeFromPalette;
+
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.parametric.tests.AbstractTest4B;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element creation test (via palette tools) in diagram.
+ */
+public class TestNodeCreationOnValueStructureCompartment extends AbstractTest4B {
+
+ public static View valueStructureView;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ View blockStructureView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+ if(blockStructureView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+ View valueView = createGraphicalNode(SysMLElementTypes.VALUE_PROPERTY, SysMLGraphicalTypes.SHAPE_SYSML_BLOCKPROPERTY_AS_COMPOSITE_ID, blockStructureView);
+ valueStructureView = ViewUtil.getChildBySemanticHint(valueView, SysMLGraphicalTypes.COMPARTMENT_SYSML_BLOCKPROPERTY_STRUCTURE_ID);
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testCreationConstraintProperty() throws Exception {
+ createNodeFromPalette("parametric.tool.constraintblockpropertycomposite", valueStructureView, false);
+ }
+
+ @Test
+ public void testCreationConstraintParameter() throws Exception {
+ createNodeFromPalette("parametric.tool.parameter", valueStructureView, false);
+ }
+
+ @Test
+ public void testCreationPart() throws Exception {
+ createNodeFromPalette("parametric.tool.blockpropertycomposite", valueStructureView, false);
+ }
+
+ @Test
+ public void testCreationReference() throws Exception {
+ createNodeFromPalette("parametric.tool.reference", valueStructureView, false);
+ }
+
+ @Test
+ public void testCreationValue() throws Exception {
+ createNodeFromPalette("parametric.tool.value", valueStructureView, false);
+ }
+
+ @Test
+ public void testCreationComment() throws Exception {
+ createNodeFromPalette("parametric.tool.comment", valueStructureView, true);
+ }
+
+ @Test
+ public void testCreationConstraint() throws Exception {
+ createNodeFromPalette("parametric.tool.constraint", valueStructureView, false);
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/dnd/node/TestNodeDropOnBlockStructureCompartment.java b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/dnd/node/TestNodeDropOnBlockStructureCompartment.java
new file mode 100755
index 0000000..87bdcb2
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/dnd/node/TestNodeDropOnBlockStructureCompartment.java
@@ -0,0 +1,72 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.tests.dnd.node;
+
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.parametric.tests.AbstractTest4B;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.BeforeClass;
+import org.junit.Ignore;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on Block structure compartment.
+ */
+public class TestNodeDropOnBlockStructureCompartment extends AbstractTest4B {
+
+ public static View containerView;
+
+ public static EObject containerPackage;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ // prepare container
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ containerView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // prepare container package (getDiagramView references the shown Block).
+ containerPackage = EMFCoreUtil.getContainer(getDiagramView().getElement(), UMLPackage.eINSTANCE.getPackage());
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Ignore
+ @Test
+ public void testDropBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ dropFromModelExplorer(droppedElement, containerView, true, false, 2); // 2 = Part / Reference
+ }
+
+ @Ignore
+ @Test
+ public void testDropConstraintBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, containerPackage);
+ dropFromModelExplorer(droppedElement, containerView, true, false, 1); // 1 = ConstraintProperty
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/dnd/node/TestNodeDropOnBlockStructureCompartment4CB.java b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/dnd/node/TestNodeDropOnBlockStructureCompartment4CB.java
new file mode 100755
index 0000000..cee3a11
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/dnd/node/TestNodeDropOnBlockStructureCompartment4CB.java
@@ -0,0 +1,71 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.tests.dnd.node;
+
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.TestPrepareUtils.createElement;
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.TestUtils.dropFromModelExplorer;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
+import org.eclipse.papyrus.sysml.diagram.parametric.tests.AbstractTest4CB;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.BeforeClass;
+import org.junit.Ignore;
+import org.junit.Test;
+
+/**
+ * JUnit tests for element Drop test (via palette tools) on Block structure compartment.
+ */
+public class TestNodeDropOnBlockStructureCompartment4CB extends AbstractTest4CB {
+
+ public static View containerView;
+
+ public static EObject containerPackage;
+
+ @BeforeClass
+ public static void prepareContainerForTest() throws Exception {
+ try {
+ // prepare container
+ View blockView = ViewUtil.getChildBySemanticHint(getDiagramView(), SysMLGraphicalTypes.SHAPE_SYSML_BLOCK_AS_COMPOSITE_ID);
+ containerView = ViewUtil.getChildBySemanticHint(blockView, SysMLGraphicalTypes.COMPARTMENT_SYSML_STRUCTURE_ID);
+ if(containerView == null) {
+ throw new Exception("Unable to prepare container for test.");
+ }
+
+ // prepare container package (getDiagramView references the shown Block).
+ containerPackage = EMFCoreUtil.getContainer(getDiagramView().getElement(), UMLPackage.eINSTANCE.getPackage());
+
+ } catch (Exception e) {
+ throw new Exception("Unable to prepare container for test.", e);
+ }
+ }
+
+ @Test
+ public void testDropBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.BLOCK, containerPackage);
+ dropFromModelExplorer(droppedElement, containerView, false, false, 2); // 2 = Part / Reference
+ }
+
+ @Ignore
+ @Test
+ public void testDropConstraintBlock() throws Exception {
+ EObject droppedElement = createElement(SysMLElementTypes.CONSTRAINT_BLOCK, containerPackage);
+ dropFromModelExplorer(droppedElement, containerView, true, false, 1); // 1 = ConstraintProperty
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/suites/AllCreationLinkTestsOnParametricOwnedByBlock.java b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/suites/AllCreationLinkTestsOnParametricOwnedByBlock.java
new file mode 100755
index 0000000..afca065
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/suites/AllCreationLinkTestsOnParametricOwnedByBlock.java
@@ -0,0 +1,22 @@
+package org.eclipse.papyrus.sysml.diagram.parametric.tests.suites;
+
+import org.eclipse.papyrus.sysml.diagram.parametric.tests.creation.link.connector.TestLinkCreationConnectorFromConstraintParameter;
+import org.eclipse.papyrus.sysml.diagram.parametric.tests.creation.link.connector.TestLinkCreationConnectorFromPart;
+import org.eclipse.papyrus.sysml.diagram.parametric.tests.creation.link.connector.TestLinkCreationConnectorFromReference;
+import org.eclipse.papyrus.sysml.diagram.parametric.tests.creation.link.connector.TestLinkCreationConnectorFromValue;
+import org.junit.runner.RunWith;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.junit.runners.Suite.SuiteClasses;
+
+@RunWith(ClassificationSuite.class)
+@SuiteClasses({
+ TestLinkCreationConnectorFromPart.class,
+ TestLinkCreationConnectorFromReference.class,
+ TestLinkCreationConnectorFromValue.class,
+ TestLinkCreationConnectorFromConstraintParameter.class,
+
+})
+
+public class AllCreationLinkTestsOnParametricOwnedByBlock {
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/suites/AllCreationLinkTestsOnParametricOwnedByConstraintBlock.java b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/suites/AllCreationLinkTestsOnParametricOwnedByConstraintBlock.java
new file mode 100755
index 0000000..5341bf3
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/suites/AllCreationLinkTestsOnParametricOwnedByConstraintBlock.java
@@ -0,0 +1,19 @@
+package org.eclipse.papyrus.sysml.diagram.parametric.tests.suites;
+
+import org.eclipse.papyrus.sysml.diagram.parametric.tests.creation.link.connector.TestLinkCreationConnectorFromPart4CB;
+import org.eclipse.papyrus.sysml.diagram.parametric.tests.creation.link.connector.TestLinkCreationConnectorFromReference4CB;
+import org.eclipse.papyrus.sysml.diagram.parametric.tests.creation.link.connector.TestLinkCreationConnectorFromValue4CB;
+import org.junit.runner.RunWith;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.junit.runners.Suite.SuiteClasses;
+
+@RunWith(ClassificationSuite.class)
+@SuiteClasses({
+ TestLinkCreationConnectorFromPart4CB.class,
+ TestLinkCreationConnectorFromReference4CB.class,
+ TestLinkCreationConnectorFromValue4CB.class,
+})
+
+public class AllCreationLinkTestsOnParametricOwnedByConstraintBlock {
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/suites/AllCreationNodeTestsOnParametricOwnedByBlock.java b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/suites/AllCreationNodeTestsOnParametricOwnedByBlock.java
new file mode 100755
index 0000000..5192066
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/suites/AllCreationNodeTestsOnParametricOwnedByBlock.java
@@ -0,0 +1,53 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.tests.suites;
+
+
+import junit.framework.TestSuite;
+
+import org.eclipse.papyrus.sysml.diagram.parametric.tests.creation.node.TestNodeCreationOnBlock;
+import org.eclipse.papyrus.sysml.diagram.parametric.tests.creation.node.TestNodeCreationOnBlockStructureCompartment;
+import org.eclipse.papyrus.sysml.diagram.parametric.tests.creation.node.TestNodeCreationOnComment;
+import org.eclipse.papyrus.sysml.diagram.parametric.tests.creation.node.TestNodeCreationOnConstraint;
+import org.eclipse.papyrus.sysml.diagram.parametric.tests.creation.node.TestNodeCreationOnConstraintProperty;
+import org.eclipse.papyrus.sysml.diagram.parametric.tests.creation.node.TestNodeCreationOnDiagram;
+import org.eclipse.papyrus.sysml.diagram.parametric.tests.creation.node.TestNodeCreationOnPart;
+import org.eclipse.papyrus.sysml.diagram.parametric.tests.creation.node.TestNodeCreationOnPartStructureCompartement;
+import org.eclipse.papyrus.sysml.diagram.parametric.tests.creation.node.TestNodeCreationOnReference;
+import org.eclipse.papyrus.sysml.diagram.parametric.tests.creation.node.TestNodeCreationOnReferenceStructureCompartment;
+import org.eclipse.papyrus.sysml.diagram.parametric.tests.creation.node.TestNodeCreationOnValue;
+import org.eclipse.papyrus.sysml.diagram.parametric.tests.creation.node.TestNodeCreationOnValueStructureCompartment;
+import org.junit.runner.RunWith;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.junit.runners.Suite.SuiteClasses;
+
+
+@RunWith(ClassificationSuite.class)
+@SuiteClasses({
+ TestNodeCreationOnBlock.class,
+ TestNodeCreationOnBlockStructureCompartment.class,
+ TestNodeCreationOnComment.class,
+ TestNodeCreationOnConstraint.class,
+ TestNodeCreationOnConstraintProperty.class,
+ TestNodeCreationOnDiagram.class,
+ TestNodeCreationOnPart.class,
+ TestNodeCreationOnPartStructureCompartement.class,
+ TestNodeCreationOnReference.class,
+ TestNodeCreationOnReferenceStructureCompartment.class,
+ TestNodeCreationOnValue.class,
+ TestNodeCreationOnValueStructureCompartment.class
+})
+
+public class AllCreationNodeTestsOnParametricOwnedByBlock extends TestSuite {
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/suites/AllCreationNodeTestsOnParametricOwnedByConstraintBlock.java b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/suites/AllCreationNodeTestsOnParametricOwnedByConstraintBlock.java
new file mode 100755
index 0000000..293187e
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/suites/AllCreationNodeTestsOnParametricOwnedByConstraintBlock.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.tests.suites;
+
+
+import junit.framework.TestCase;
+
+import org.eclipse.papyrus.sysml.diagram.parametric.tests.creation.node.TestNodeCreationOnComment4CB;
+import org.eclipse.papyrus.sysml.diagram.parametric.tests.creation.node.TestNodeCreationOnConstraint4CB;
+import org.eclipse.papyrus.sysml.diagram.parametric.tests.creation.node.TestNodeCreationOnConstraintBlock4CB;
+import org.eclipse.papyrus.sysml.diagram.parametric.tests.creation.node.TestNodeCreationOnConstraintBlockStructureCompartment4CB;
+import org.eclipse.papyrus.sysml.diagram.parametric.tests.creation.node.TestNodeCreationOnConstraintProperty4CB;
+import org.eclipse.papyrus.sysml.diagram.parametric.tests.creation.node.TestNodeCreationOnDiagram4CB;
+import org.junit.runner.RunWith;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.junit.runners.Suite.SuiteClasses;
+
+
+@RunWith(ClassificationSuite.class)
+@SuiteClasses({
+ TestNodeCreationOnComment4CB.class,
+ TestNodeCreationOnConstraint4CB.class,
+ TestNodeCreationOnConstraintBlock4CB.class,
+ TestNodeCreationOnConstraintBlockStructureCompartment4CB.class,
+ TestNodeCreationOnConstraintProperty4CB.class,
+ TestNodeCreationOnDiagram4CB.class
+})
+
+public class AllCreationNodeTestsOnParametricOwnedByConstraintBlock extends TestCase {
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/suites/AllNodeDndTestsOnParametricOwnedByBlock.java b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/suites/AllNodeDndTestsOnParametricOwnedByBlock.java
new file mode 100755
index 0000000..a4caac8
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/suites/AllNodeDndTestsOnParametricOwnedByBlock.java
@@ -0,0 +1,15 @@
+package org.eclipse.papyrus.sysml.diagram.parametric.tests.suites;
+
+import org.eclipse.papyrus.sysml.diagram.parametric.tests.dnd.node.TestNodeDropOnBlockStructureCompartment;
+import org.junit.runner.RunWith;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.junit.runners.Suite.SuiteClasses;
+
+@RunWith(ClassificationSuite.class)
+@SuiteClasses({
+ TestNodeDropOnBlockStructureCompartment.class,
+})
+
+public class AllNodeDndTestsOnParametricOwnedByBlock {
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/suites/AllNodeDndTestsOnParametricOwnedByConstraintBlock.java b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/suites/AllNodeDndTestsOnParametricOwnedByConstraintBlock.java
new file mode 100755
index 0000000..5d602d5
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/suites/AllNodeDndTestsOnParametricOwnedByConstraintBlock.java
@@ -0,0 +1,15 @@
+package org.eclipse.papyrus.sysml.diagram.parametric.tests.suites;
+
+import org.eclipse.papyrus.sysml.diagram.parametric.tests.dnd.node.TestNodeDropOnBlockStructureCompartment4CB;
+import org.junit.runner.RunWith;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.junit.runners.Suite.SuiteClasses;
+
+@RunWith(ClassificationSuite.class)
+@SuiteClasses({
+ TestNodeDropOnBlockStructureCompartment4CB.class,
+})
+
+public class AllNodeDndTestsOnParametricOwnedByConstraintBlock {
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/suites/AllTests.java b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/suites/AllTests.java
new file mode 100755
index 0000000..9e959f6
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/suites/AllTests.java
@@ -0,0 +1,30 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.tests.suites;
+
+import org.junit.runner.RunWith;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.junit.runners.Suite.SuiteClasses;
+
+@RunWith(ClassificationSuite.class)
+@SuiteClasses({
+ AllCreationNodeTestsOnParametricOwnedByBlock.class,
+ AllCreationNodeTestsOnParametricOwnedByConstraintBlock.class,
+ AllCreationLinkTestsOnParametricOwnedByBlock.class,
+ AllNodeDndTestsOnParametricOwnedByBlock.class,
+ AllNodeDndTestsOnParametricOwnedByConstraintBlock.class,
+})
+
+public class AllTests {
+}
\ No newline at end of file
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/utils/Constants.java b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/utils/Constants.java
new file mode 100755
index 0000000..86b33eb
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/utils/Constants.java
@@ -0,0 +1,7 @@
+package org.eclipse.papyrus.sysml.diagram.parametric.tests.utils;
+
+public class Constants {
+
+ public static final String PARAMETRIC_OWNED_BY_BLOCK_DIAGRAM_NAME = "BlockParametricDiagram";
+ public static final String PARAMETRIC_OWNED_BY_CONSTRAINTBLOCK_DIAGRAM_NAME = "ConstrainBlockParametricDiagram";
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/utils/EditorUtils.java b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/utils/EditorUtils.java
new file mode 100755
index 0000000..a3a629e
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/utils/EditorUtils.java
@@ -0,0 +1,146 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2016 CEA LIST, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus - bug 485220
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.tests.utils;
+
+import java.util.Iterator;
+
+import org.eclipse.emf.common.command.CommandStack;
+import org.eclipse.emf.transaction.RunnableWithResult;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.Tool;
+import org.eclipse.gef.util.EditPartUtilities;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramCommandStack;
+import org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramEditDomain;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.core.utils.ServiceUtils;
+import org.eclipse.papyrus.sysml.diagram.parametric.ParametricDiagramForMultiEditor;
+import org.eclipse.papyrus.sysml.diagram.parametric.factory.DiagramPaletteFactory;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PlatformUI;
+
+
+public class EditorUtils {
+
+ public static ParametricDiagramForMultiEditor getDiagramEditor() throws Exception {
+
+ ServicesRegistry serviceRegistry = getEditor().getAdapter(ServicesRegistry.class);
+ try {
+ return (ParametricDiagramForMultiEditor) ServiceUtils.getInstance().getService(ISashWindowsContainer.class, serviceRegistry).getActiveEditor();
+
+ } catch (ServiceException e) {
+ throw new Exception("Unable to retrieve service.", e);
+ } catch (ClassCastException e) {
+ throw new Exception("Active diagram is not an parametric.", e);
+ }
+ }
+
+ public static DiagramEditPart getDiagramEditPart() throws Exception {
+
+ try {
+ return getDiagramEditor().getDiagramEditPart();
+
+ } catch (NullPointerException e) {
+ throw new Exception("Could not find diagram edit part.", e);
+ }
+ }
+
+ public static Diagram getDiagramView() throws Exception {
+
+ try {
+ return getDiagramEditor().getDiagram();
+
+ } catch (NullPointerException e) {
+ throw new Exception("Could not find diagram view.", e);
+ }
+ }
+
+ public static EditPart getEditPart(View view) throws Exception {
+
+ // Test if the container is the diagram itself first
+ DiagramEditPart diagramEditPart = getDiagramEditPart();
+ if (diagramEditPart.getModel() == view) {
+ return diagramEditPart;
+ }
+
+ // Test diagram children and look for the view
+ @SuppressWarnings("unchecked")
+ Iterator<EditPart> it = EditPartUtilities.getAllChildren(diagramEditPart).iterator();
+ while (it.hasNext()) {
+ EditPart editPart = it.next();
+ if (editPart.getModel() == view) {
+ return editPart;
+ }
+ }
+
+ // Test diagram nested connections and look for the view
+ @SuppressWarnings("unchecked")
+ Iterator<EditPart> itLinks = EditPartUtilities.getAllNestedConnectionEditParts(diagramEditPart).iterator();
+ while (itLinks.hasNext()) {
+ EditPart editPart = itLinks.next();
+ if (editPart.getModel() == view) {
+ return editPart;
+ }
+ }
+
+ throw new Exception("Unable to find edit part for the given view.( type: "+view.getType()+") in diagramEditPart :"+ diagramEditPart.toString());
+ }
+
+ public static Tool getPaletteTool(String toolId) throws Exception {
+ DiagramPaletteFactory factory = new DiagramPaletteFactory();
+ return factory.createTool(toolId);
+ }
+
+ public static IDiagramEditDomain getDiagramEditingDomain() throws Exception {
+ return getDiagramEditor().getDiagramEditDomain();
+ }
+
+ public static DiagramCommandStack getDiagramCommandStack() throws Exception {
+ return getDiagramEditingDomain().getDiagramCommandStack();
+ }
+
+ public static CommandStack getCommandStack() throws Exception {
+ return getTransactionalEditingDomain().getCommandStack();
+ }
+
+ public static TransactionalEditingDomain getTransactionalEditingDomain() throws Exception {
+
+ ServicesRegistry serviceRegistry = getEditor().getAdapter(ServicesRegistry.class);
+ try {
+ return ServiceUtils.getInstance().getTransactionalEditingDomain(serviceRegistry);
+
+ } catch (ServiceException e) {
+ throw new Exception("Unable to retrieve service.", e);
+ }
+ }
+
+ public static IEditorPart getEditor() throws Exception {
+ RunnableWithResult<IEditorPart> getEditorRunnable = new RunnableWithResult.Impl<IEditorPart>() {
+
+ public void run() {
+ setResult(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor());
+ }
+ };
+ Display.getDefault().syncExec(getEditorRunnable);
+ return getEditorRunnable.getResult();
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/utils/TestPrepareUtils.java b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/utils/TestPrepareUtils.java
new file mode 100755
index 0000000..8e941c8
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/utils/TestPrepareUtils.java
@@ -0,0 +1,306 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.tests.utils;
+
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.EditorUtils.getEditPart;
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.EditorUtils.getTransactionalEditingDomain;
+
+import java.util.ArrayList;
+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.draw2d.geometry.Point;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.edit.command.SetCommand;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.diagram.ui.commands.CreateCommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest.ViewDescriptor;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
+import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
+import org.eclipse.gmf.runtime.emf.type.core.IClientContext;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.emf.gmf.command.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.infra.services.edit.commands.ConfigureFeatureCommandFactory;
+import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory;
+import org.eclipse.papyrus.infra.services.edit.context.TypeContext;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.utils.GMFCommandUtils;
+import org.eclipse.papyrus.sysml.blocks.Block;
+import org.eclipse.papyrus.sysml.diagram.parametric.Activator;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.commands.SemanticAdapter;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.uml2.uml.ConnectableElement;
+import org.eclipse.uml2.uml.Connector;
+import org.eclipse.uml2.uml.ConnectorEnd;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.EncapsulatedClassifier;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.eclipse.uml2.uml.util.UMLUtil;
+import org.junit.Assert;
+
+
+public class TestPrepareUtils {
+
+ public static void changeVisibility(View view) throws Exception {
+ SetCommand changeVisibilityCommand = new SetCommand(getTransactionalEditingDomain(), view, NotationPackage.eINSTANCE.getView_Visible(), !view.isVisible());
+ getTransactionalEditingDomain().getCommandStack().execute(changeVisibilityCommand);
+ }
+
+ public static EObject createElement(IElementType elementType, View containerView) throws Exception {
+ return createElement(elementType, containerView.getElement());
+ }
+
+ @SuppressWarnings("unchecked")
+ public static EObject createElement(IElementType elementType, EObject container) throws Exception {
+ CreateElementRequest createElementRequest = new CreateElementRequest(getTransactionalEditingDomain(), container, elementType);
+
+ EObject typeOwner = EMFCoreUtil.getContainer(container, UMLPackage.eINSTANCE.getPackage());
+
+ if(elementType == SysMLElementTypes.CONSTRAINT_PROPERTY) {
+ // Create type
+ CreateElementRequest createTypeRequest = new CreateElementRequest(getTransactionalEditingDomain(), typeOwner, SysMLElementTypes.CONSTRAINT_BLOCK);
+ ICommand createTypeCommand = ElementEditServiceUtils.getCommandProvider(typeOwner).getEditCommand(createTypeRequest);
+ getTransactionalEditingDomain().getCommandStack().execute(new GMFtoEMFCommandWrapper(createTypeCommand));
+
+ // If container is a Property, substitute container by the Property type
+ if(container instanceof Property) {
+ container = ((Property)container).getType();
+ createElementRequest.setContainer(container);
+ }
+ createElementRequest.getParameters().put(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new ConfigureFeatureCommandFactory(UMLPackage.eINSTANCE.getTypedElement_Type(), GMFCommandUtils.getCommandEObjectResult(createTypeCommand)));
+
+ } else if(elementType == SysMLElementTypes.PART_PROPERTY) {
+ // Create type
+ CreateElementRequest createTypeRequest = new CreateElementRequest(getTransactionalEditingDomain(), typeOwner, SysMLElementTypes.BLOCK);
+ ICommand createTypeCommand = ElementEditServiceUtils.getCommandProvider(typeOwner).getEditCommand(createTypeRequest);
+ getTransactionalEditingDomain().getCommandStack().execute(new GMFtoEMFCommandWrapper(createTypeCommand));
+
+ // If container is a Property, substitute container by the Property type
+ if(container instanceof Property) {
+ container = ((Property)container).getType();
+ createElementRequest.setContainer(container);
+ }
+ createElementRequest.getParameters().put(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new ConfigureFeatureCommandFactory(UMLPackage.eINSTANCE.getTypedElement_Type(), GMFCommandUtils.getCommandEObjectResult(createTypeCommand)));
+
+ } else if(elementType == SysMLElementTypes.REFERENCE_PROPERTY) {
+ // Create type
+ CreateElementRequest createTypeRequest = new CreateElementRequest(getTransactionalEditingDomain(), typeOwner, SysMLElementTypes.BLOCK);
+ ICommand createTypeCommand = ElementEditServiceUtils.getCommandProvider(typeOwner).getEditCommand(createTypeRequest);
+ getTransactionalEditingDomain().getCommandStack().execute(new GMFtoEMFCommandWrapper(createTypeCommand));
+
+ // If container is a Property, substitute container by the Property type
+ if(container instanceof Property) {
+ container = ((Property)container).getType();
+ createElementRequest.setContainer(container);
+ }
+ createElementRequest.getParameters().put(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new ConfigureFeatureCommandFactory(UMLPackage.eINSTANCE.getTypedElement_Type(), GMFCommandUtils.getCommandEObjectResult(createTypeCommand)));
+
+ } else if(elementType == SysMLElementTypes.VALUE_PROPERTY) {
+ // Create type
+ CreateElementRequest createTypeRequest = new CreateElementRequest(getTransactionalEditingDomain(), typeOwner, UMLElementTypes.DATA_TYPE);
+ ICommand createTypeCommand = ElementEditServiceUtils.getCommandProvider(typeOwner).getEditCommand(createTypeRequest);
+ getTransactionalEditingDomain().getCommandStack().execute(new GMFtoEMFCommandWrapper(createTypeCommand));
+
+ // If container is a Property, substitute container by the Property type
+ if(container instanceof Property) {
+ container = ((Property)container).getType();
+ createElementRequest.setContainer(container);
+ }
+ createElementRequest.getParameters().put(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new ConfigureFeatureCommandFactory(UMLPackage.eINSTANCE.getTypedElement_Type(), GMFCommandUtils.getCommandEObjectResult(createTypeCommand)));
+
+ } else if(elementType == UMLElementTypes.PROPERTY) {
+
+ // If container is a Property, substitute container by the Property type
+ if(container instanceof Property) {
+ container = ((Property)container).getType();
+ createElementRequest.setContainer(container);
+ }
+ }
+
+ ICommand createElementCommand = ElementEditServiceUtils.getCommandProvider(container).getEditCommand(createElementRequest);
+ getTransactionalEditingDomain().getCommandStack().execute(new GMFtoEMFCommandWrapper(createElementCommand));
+
+ return GMFCommandUtils.getCommandEObjectResult(createElementCommand);
+ }
+
+ public static void setBlockIsEncapsulated(final Element block, final boolean isEncapsulated) throws Exception {
+ AbstractTransactionalCommand setCommand = new AbstractTransactionalCommand(getTransactionalEditingDomain(), "Set Block isEncapsulated", null) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ Block blockApp = UMLUtil.getStereotypeApplication(block, Block.class);
+ blockApp.setIsEncapsulated(isEncapsulated);
+ return CommandResult.newOKCommandResult(block);
+ }
+ };
+ getTransactionalEditingDomain().getCommandStack().execute(new GMFtoEMFCommandWrapper(setCommand));
+ }
+
+ public static EObject createLink(IElementType elementType, EObject source, EObject target) throws Exception {
+ CreateRelationshipRequest createRelationshipRequest = new CreateRelationshipRequest(getTransactionalEditingDomain(), source, target, elementType);
+
+ IClientContext context;
+ try {
+ context = TypeContext.getContext(getTransactionalEditingDomain());
+ } catch (ServiceException e) {
+ Activator.log.error(e);
+ return null;
+ }
+
+ ICommand createRelationshipCommand = ElementEditServiceUtils.getCommandProvider(elementType, context).getEditCommand(createRelationshipRequest);
+ getTransactionalEditingDomain().getCommandStack().execute(new GMFtoEMFCommandWrapper(createRelationshipCommand));
+
+ return GMFCommandUtils.getCommandEObjectResult(createRelationshipCommand);
+ }
+
+ public static EObject createConnectorLink(final EncapsulatedClassifier container, final ConnectableElement sourceRole, final Property sourcePartWithPort, final ConnectableElement targetRole, final Property targetPartWithPort) throws Exception {
+
+ AbstractTransactionalCommand createConnectorCommand = new AbstractTransactionalCommand(getTransactionalEditingDomain(), "Create connector", null) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ Connector connector = container.createOwnedConnector("ConnectorTest");
+
+ ConnectorEnd connectorEndSrc = connector.createEnd();
+ connectorEndSrc.setRole(sourceRole);
+ connectorEndSrc.setPartWithPort(sourcePartWithPort);
+
+ ConnectorEnd connectorEndTgt = connector.createEnd();
+ connectorEndTgt.setRole(targetRole);
+ connectorEndTgt.setPartWithPort(targetPartWithPort);
+
+ return CommandResult.newOKCommandResult(connector);
+ }
+
+ };
+
+ getTransactionalEditingDomain().getCommandStack().execute(new GMFtoEMFCommandWrapper(createConnectorCommand));
+
+ return GMFCommandUtils.getCommandEObjectResult(createConnectorCommand);
+ }
+
+ public static View createGraphicalNode(IElementType elementType, String graphicalType, View containerView) throws Exception {
+ EObject newObject = createElement(elementType, containerView);
+
+ // Add view
+ ViewDescriptor viewDescriptor = new ViewDescriptor(new SemanticAdapter(newObject, null), Node.class, graphicalType, ViewUtil.APPEND, true, Activator.DIAGRAM_PREFERENCES_HINT);
+ CreateCommand createViewCommand = new CreateCommand(getTransactionalEditingDomain(), viewDescriptor, containerView);
+ Assert.assertTrue("Command should be executable", createViewCommand.canExecute());
+ EditorUtils.getDiagramCommandStack().execute(new ICommandProxy(createViewCommand));
+
+ EReference[] erefs = new EReference[]{ NotationPackage.eINSTANCE.getView_Element() };
+ @SuppressWarnings("unchecked")
+ Collection<View> views = EMFCoreUtil.getReferencers(newObject, erefs);
+
+ return (View)views.toArray()[0];
+ }
+
+ public static View createGraphicalNode(IElementType elementType, EObject semanticContainer, String graphicalType, View containerView) throws Exception {
+
+ EObject newObject = createElement(elementType, semanticContainer);
+
+ // Add view
+ ViewDescriptor viewDescriptor = new ViewDescriptor(new SemanticAdapter(newObject, null), Node.class, graphicalType, ViewUtil.APPEND, true, Activator.DIAGRAM_PREFERENCES_HINT);
+ CreateCommand createViewCommand = new CreateCommand(getTransactionalEditingDomain(), viewDescriptor, containerView);
+ EditorUtils.getDiagramCommandStack().execute(new ICommandProxy(createViewCommand));
+
+ EReference[] erefs = new EReference[]{ NotationPackage.eINSTANCE.getView_Element() };
+ @SuppressWarnings("unchecked")
+ Collection<View> views = EMFCoreUtil.getReferencers(newObject, erefs);
+
+ return (View)views.toArray()[0];
+ }
+
+ public static View createGraphicalLink(IElementType elementType, String graphicalType, View containerView, EditPart sourceEP, EditPart targetEP) throws Exception {
+ CreateConnectionViewRequest request = createConnectionRequest(elementType, sourceEP, targetEP);
+
+ Command command = targetEP.getCommand(request);
+ Assert.assertNotNull("Command to create graphical link should not be null", command);
+ Assert.assertTrue("Command should be executable", command.canExecute());
+
+ EditorUtils.getDiagramCommandStack().execute(command);
+
+ IAdaptable viewAdapter = (IAdaptable)request.getNewObject();
+ View newView = (View)viewAdapter.getAdapter(View.class);
+ Assert.assertNotNull("View should not be null", newView);
+
+ return newView;
+ }
+
+ public static CreateConnectionViewRequest createConnectionRequest(IElementType type, EditPart source, EditPart target) {
+ CreateConnectionViewRequest connectionRequest = CreateViewRequestFactory.getCreateConnectionRequest(type, Activator.DIAGRAM_PREFERENCES_HINT);
+
+ connectionRequest.setSourceEditPart(null);
+ connectionRequest.setTargetEditPart(source);
+ connectionRequest.setType(RequestConstants.REQ_CONNECTION_START);
+ source.getCommand(connectionRequest);
+
+ // Now, setup the request in preparation to get the
+ // connection end
+ // command.
+ connectionRequest.setSourceEditPart(source);
+ connectionRequest.setTargetEditPart(target);
+ connectionRequest.setType(RequestConstants.REQ_CONNECTION_END);
+ return connectionRequest;
+ }
+
+
+ public static View dropFromModelExplorer(IElementType elementType, View containerView) throws Exception {
+ EObject newObject = createElement(elementType, containerView);
+ return dropFromModelExplorer(newObject, containerView);
+ }
+
+ public static View dropFromModelExplorer(EObject eObject, View containerView) throws Exception {
+
+ // Find container EditPart (for command creation)
+ EditPart containerEditPart = getEditPart(containerView);
+
+ // Prepare drop request
+ DropObjectsRequest dropRequest = new DropObjectsRequest();
+ ArrayList<EObject> list = new ArrayList<EObject>();
+ list.add(eObject);
+ dropRequest.setObjects(list);
+ dropRequest.setLocation(new Point(20, 20));
+
+ // Get drop command
+ Command command = containerEditPart.getCommand(dropRequest);
+ EditorUtils.getDiagramCommandStack().execute(command);
+
+ EReference[] erefs = new EReference[]{ NotationPackage.eINSTANCE.getView_Element() };
+ @SuppressWarnings("unchecked")
+ Collection<View> views = EMFCoreUtil.getReferencers(eObject, erefs);
+
+ return (View)views.toArray()[0];
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/utils/TestUtils.java b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/utils/TestUtils.java
new file mode 100755
index 0000000..218a2f2
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/utils/TestUtils.java
@@ -0,0 +1,778 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 436047
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.parametric.tests.utils;
+
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.EditorUtils.getDiagramEditor;
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.EditorUtils.getDiagramView;
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.EditorUtils.getEditPart;
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.EditorUtils.getPaletteTool;
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.EditorUtils.getTransactionalEditingDomain;
+import static org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.TestPrepareUtils.createElement;
+import static org.junit.Assert.fail;
+
+import java.lang.reflect.Field;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.commands.ParameterizedCommand;
+import org.eclipse.core.commands.operations.IOperationHistory;
+import org.eclipse.core.commands.operations.IOperationHistoryListener;
+import org.eclipse.core.commands.operations.OperationHistoryEvent;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.ConnectionEditPart;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.RequestConstants;
+import org.eclipse.gef.Tool;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.CompoundCommand;
+import org.eclipse.gef.requests.GroupRequest;
+import org.eclipse.gef.requests.ReconnectRequest;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.common.ui.action.global.GlobalAction;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.commands.PopupMenuCommand;
+import org.eclipse.gmf.runtime.diagram.ui.menus.PopupMenu;
+import org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramGraphicalViewer;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewAndElementRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.EditCommandRequestWrapper;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
+import org.eclipse.gmf.runtime.notation.Connector;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.commands.ActionHandler;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.papyrus.commands.wrappers.GEFtoEMFCommandWrapper;
+import org.eclipse.papyrus.infra.gmfdiag.common.commands.SelectAndExecuteCommand;
+import org.eclipse.papyrus.infra.gmfdiag.common.service.palette.AspectUnspecifiedTypeConnectionTool;
+import org.eclipse.papyrus.infra.gmfdiag.common.service.palette.AspectUnspecifiedTypeConnectionTool.CreateAspectUnspecifiedTypeConnectionRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.service.palette.AspectUnspecifiedTypeCreationTool;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.sysml.blocks.Block;
+import org.eclipse.papyrus.sysml.blocks.BlocksPackage;
+import org.eclipse.papyrus.sysml.blocks.NestedConnectorEnd;
+import org.eclipse.papyrus.sysml.diagram.parametric.Activator;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IWorkbenchCommandConstants;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.commands.ICommandService;
+import org.eclipse.ui.handlers.IHandlerService;
+import org.eclipse.uml2.uml.ConnectableElement;
+import org.eclipse.uml2.uml.ConnectorEnd;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.util.UMLUtil;
+import org.junit.Assert;
+
+public class TestUtils {
+
+ public static void deleteView(IElementType elementType, View containerView, boolean isAllowed) throws Exception {
+ View view = TestPrepareUtils.dropFromModelExplorer(elementType, getDiagramView());
+ deleteView(view, isAllowed);
+ }
+
+ public static void deleteView(View view, boolean isAllowed) throws Exception {
+ // Find container EditPart (for command creation)
+ EditPart containerEditPart = getEditPart(view);
+ // Get delete view command
+ Command command = containerEditPart.getCommand(new GroupRequest(RequestConstants.REQ_DELETE));
+ // if the view deletion is not allowed the command should not be executable
+ if(!isAllowed) {
+ if((command == null) || (!command.canExecute())) {
+ // Ok the command cannot be executed.
+ } else {
+ fail("The command should not be executable.");
+ }
+ } else {
+ if((command == null) || (!command.canExecute())) {
+ fail("The command should be executable.");
+ } else {
+ // Ok the command can be executed.
+ defaultExecutionTest(command);
+ // Test the results then
+ // fail("Result tests not implemented.");
+ }
+ }
+ }
+
+ public static void deleteElement(IElementType elementType, View containerView, boolean isAllowed) throws Exception {
+ View view = TestPrepareUtils.dropFromModelExplorer(elementType, getDiagramView());
+ deleteElement(view, isAllowed);
+ }
+
+ public static void deleteElement(View view, boolean isAllowed) throws Exception {
+ // Find container EditPart (for command creation)
+ EditPart containerEditPart = getEditPart(view);
+ // Prepare request
+ DestroyElementRequest destroyRequest = new DestroyElementRequest(getTransactionalEditingDomain(), false);
+ // Get delete command
+ Command command = containerEditPart.getCommand(new EditCommandRequestWrapper(destroyRequest));
+ // if the deletion is not allowed the command should not be executable
+ if(!isAllowed) {
+ if((command == null) || (!command.canExecute())) {
+ // Ok the command cannot be executed.
+ } else {
+ fail("The command should not be executable.");
+ }
+ } else {
+ if((command == null) || (!command.canExecute())) {
+ fail("The command should be executable.");
+ } else {
+ // Ok the command can be executed.
+ defaultExecutionTest(command);
+ // Test the results then
+ // fail("Result tests not implemented.");
+ }
+ }
+ }
+
+ public static void dropFromModelExplorer(IElementType elementType, View containerView, boolean isAllowed) throws Exception {
+ EObject newObject = createElement(elementType, containerView);
+ dropFromModelExplorer(newObject, containerView, isAllowed);
+ }
+
+ public static void dropFromModelExplorer(EObject eObject, View containerView, boolean isAllowed) throws Exception {
+ dropFromModelExplorer(eObject, containerView, isAllowed, true);
+ }
+
+ public static void dropFromModelExplorer(EObject eObject, View containerView, boolean isAllowed, boolean execute) throws Exception {
+ dropFromModelExplorer(eObject, containerView, isAllowed, execute, 0);
+ }
+
+ public static void dropFromModelExplorer(EObject eObject, View containerView, boolean isAllowed, boolean execute, int expectedNumberOfCommand) throws Exception {
+ // Find container EditPart (for command creation)
+ EditPart containerEditPart = getEditPart(containerView);
+ // Prepare drop request
+ DropObjectsRequest dropRequest = new DropObjectsRequest();
+ ArrayList<EObject> list = new ArrayList<EObject>();
+ list.add(eObject);
+ dropRequest.setObjects(list);
+ dropRequest.setLocation(new Point(200, 200));
+ // Get drop command
+ Command command = containerEditPart.getCommand(dropRequest);
+ // if the drop is not allowed the command should not be executable
+ if(!isAllowed) {
+ if((command == null) || (!command.canExecute())) {
+ // Ok the command cannot be executed.
+ } else {
+ fail("The command should not be executable.");
+ }
+ } else {
+ if((command == null) || (!command.canExecute())) {
+ fail("The command should be executable.");
+ } else {
+ if (expectedNumberOfCommand > 0) {
+ if (command instanceof ICommandProxy) {
+ ICommand iCommand = ((ICommandProxy) command).getICommand();
+ if (iCommand instanceof SelectAndExecuteCommand) {
+ SelectAndExecuteCommand selectCommand = (SelectAndExecuteCommand)iCommand;
+ Field popupField = PopupMenuCommand.class.getDeclaredField("popupMenu");
+ popupField.setAccessible(true);
+ PopupMenu menu = (PopupMenu)popupField.get(selectCommand);
+ Field content = PopupMenu.class.getDeclaredField("content");
+ content.setAccessible(true);
+ @SuppressWarnings("unchecked")
+ List<CompoundCommand> commandList = (List<CompoundCommand>)content.get(menu);
+ Assert.assertEquals(commandList.size(), expectedNumberOfCommand);
+ }
+ }
+ }
+ if (execute) {
+ // Ok the command can be executed.
+ defaultExecutionTest(command);
+ }
+ // Test the results then
+ // fail("Result tests not implemented.");
+ }
+ }
+ }
+
+ public static void altDropFromModelExplorer(EObject eObject, View containerView, List<String> expectedCommandNames, boolean isAllowed) throws Exception {
+ // Find container EditPart (for command creation)
+ EditPart containerEditPart = getEditPart(containerView);
+ // Prepare drop request
+ DropObjectsRequest dropRequest = new DropObjectsRequest();
+ ArrayList<EObject> list = new ArrayList<EObject>();
+ list.add(eObject);
+ dropRequest.setObjects(list);
+ dropRequest.setLocation(new Point(200, 200));
+ // Get drop command
+ Command command = containerEditPart.getCommand(dropRequest);
+ // if the drop is not allowed the command should not be executable
+ if(!isAllowed) {
+ if((command == null) || (!command.canExecute())) {
+ // Ok the command cannot be executed.
+ } else {
+ fail("The command should not be executable.");
+ }
+ } else {
+ if((command == null) || (!command.canExecute())) {
+ fail("The command should be executable.");
+ } else {
+ // Simple command
+ if(expectedCommandNames.size() == 1) {
+ if(expectedCommandNames.get(0).equals(command.getLabel())) {
+ // Ok the command can be executed.
+ defaultExecutionTest(command);
+ // Test the results then
+ // fail("Result tests not implemented.");
+ EditorUtils.getCommandStack().undo();
+ } else {
+ fail("The expected kind of command was {" + expectedCommandNames.get(0) + "}, but was {" + command.getLabel() + "}");
+ }
+ } else if(expectedCommandNames.size() > 1) {
+ ICommand tmpCommand = (command instanceof ICommandProxy) ? ((ICommandProxy)command).getICommand() : null;
+ if((tmpCommand == null) || !(tmpCommand instanceof SelectAndExecuteCommand)) {
+ fail("The drop command is not a selact and execute command.");
+ }
+ // Field accessibility modification to review elementary drop command available as
+ // SelectAndExecuteCommand choices.
+ SelectAndExecuteCommand selectCommand = (SelectAndExecuteCommand)tmpCommand;
+ Field popupField = PopupMenuCommand.class.getDeclaredField("popupMenu");
+ popupField.setAccessible(true);
+ PopupMenu menu = (PopupMenu)popupField.get(selectCommand);
+ Field content = PopupMenu.class.getDeclaredField("content");
+ content.setAccessible(true);
+ @SuppressWarnings("unchecked")
+ List<CompoundCommand> commandList = (List<CompoundCommand>)content.get(menu);
+ if(commandList.size() != expectedCommandNames.size()) {
+ fail("Unexpected number of possible alternate drop command.");
+ }
+ for(int i = 0; i < commandList.size(); i++) {
+ CompoundCommand subCommand = commandList.get(i);
+ if(expectedCommandNames.get(i).equals(subCommand.getLabel())) {
+ // Ok the command can be executed.
+ defaultExecutionTest(subCommand);
+ // Add one more undo to go back in initial state before testing next command
+ EditorUtils.getCommandStack().undo();;
+ // Test the results then
+ // fail("Result tests not implemented.");
+ } else {
+ fail("The expected kind of command was {" + expectedCommandNames.get(i) + "}.");
+ }
+ }
+ }
+ }
+ }
+ }
+
+ public static void createNodeFromPalette(String toolId, View containerView, boolean isAllowed) throws Exception {
+ if(isAllowed) {
+ createNodeFromPalette(toolId, containerView, isAllowed, true);
+ } else {
+ createNodeFromPalette(toolId, containerView, isAllowed, false);
+ }
+ }
+
+ public static void createNodeFromPalette(String toolId, View containerView, boolean isAllowed, boolean execute) throws Exception {
+ // Find container EditPart (for command creation)
+ EditPart containerEditPart = getEditPart(containerView);
+ // Find palette tool to simulate element creation
+ Tool tool = getPaletteTool(toolId);
+ Request createRequest = getCreateRequest(tool);
+ // Get creation command for request
+ Command command = containerEditPart.getCommand(createRequest);
+ // if the creation is not allowed the command should not be executable
+ if(!isAllowed) {
+ if((command == null) || (!command.canExecute())) {
+ // Ok the command cannot be executed.
+ } else {
+ fail("The command should not be executable.");
+ }
+ } else {
+ if((command == null) || (!command.canExecute())) {
+ fail("The command should be executable.");
+ } else {
+ // Ok the command can be executed.
+ if(execute) {
+ defaultExecutionTest(command);
+ }
+ // Test the results then
+ // fail("Result tests not implemented.");
+ }
+ }
+ }
+
+ public static Request getCreateRequest(final Tool tool) throws Exception {
+
+ // Don't forget to set the diagram viewer (required for preferenceHints to mimic manual creation)
+ final IDiagramGraphicalViewer viewer = getDiagramEditor().getDiagramGraphicalViewer();
+
+ Display.getDefault().syncExec(new Runnable() {
+
+ public void run() {
+ try {
+ tool.setViewer(viewer);
+ } catch (Exception ex) {
+ ex.printStackTrace(System.out);
+ }
+ }
+ });
+
+ if(tool instanceof AspectUnspecifiedTypeCreationTool) {
+ AspectUnspecifiedTypeCreationTool creationTool = (AspectUnspecifiedTypeCreationTool)tool;
+ return creationTool.createCreateRequest();
+ } else if(tool instanceof AspectUnspecifiedTypeConnectionTool) {
+ AspectUnspecifiedTypeConnectionTool connectionTool = (AspectUnspecifiedTypeConnectionTool)tool;
+ return connectionTool.new CreateAspectUnspecifiedTypeConnectionRequest(connectionTool.getElementTypes(), false, Activator.DIAGRAM_PREFERENCES_HINT);
+ }
+
+ throw new Exception("Unexpected kind of creation tool.");
+ }
+
+ public static void createEdgeFromPalette(String toolId, View sourceView, View targetView, boolean isAllowed) throws Exception {
+ // Execute command only when the command is expected to be executable
+ createEdgeFromPalette(toolId, sourceView, targetView, isAllowed, isAllowed);
+ }
+
+ public static EObject createEdgeFromPalette(String toolId, View sourceView, View targetView, boolean isAllowed, boolean execute) throws Exception {
+ // Find palette tool to simulate element creation and prepare request
+ Tool tool = getPaletteTool(toolId);
+ CreateAspectUnspecifiedTypeConnectionRequest createRequest = (CreateAspectUnspecifiedTypeConnectionRequest)getCreateRequest(tool);
+ // Test source creation command
+ createRequest.setSourceEditPart(getEditPart(sourceView));
+ createRequest.setType(RequestConstants.REQ_CONNECTION_START);
+ Command srcCommand = getEditPart(sourceView).getCommand(createRequest);
+ // Test source command
+ if((srcCommand == null) || !(srcCommand.canExecute())) { // Non-executable command
+ if(targetView == null) { // Only test behavior on source
+ if(!isAllowed) {
+ // Current behavior matches the expected results
+ return null;
+ } else {
+ fail("The command should be executable.");
+ }
+ } else { // Test complete creation, the command should necessary be executable
+ fail("The command should be executable.");
+ }
+ } else { // Executable command
+ if(targetView == null) { // Only test behavior on source
+ if(!isAllowed) {
+ fail("The command should not be executable.");
+ } else {
+ // Current behavior matches the expected results - no execution test.
+ return null;
+ }
+ } else { // The command is executable and a target is provided - continue the test
+ // Get target command (complete link creation)
+ createRequest.setSourceEditPart(getEditPart(sourceView));
+ createRequest.setTargetEditPart(getEditPart(targetView));
+ createRequest.setType(RequestConstants.REQ_CONNECTION_END);
+ Command tgtCommand = getEditPart(targetView).getCommand(createRequest);
+ // Test the target command
+ if((tgtCommand == null) || !(tgtCommand.canExecute())) { // Non-executable command
+ if(!isAllowed) {
+ // Current behavior matches the expected results
+ return null;
+ } else {
+ fail("The command "+tgtCommand.getLabel()+" should be executable.");
+ }
+ } else { // Executable command
+ if(!isAllowed) {
+ fail("The command "+tgtCommand.getLabel()+" should not be executable.");
+ } else {
+ // Current behavior matches the expected results
+ if(execute) { // Test command execution
+ defaultExecutionTest(tgtCommand);
+ // Retrieve created object via nested ElementAndViewCreationRequest.
+ View newView = null;
+ Iterator<?> it = createRequest.getAllRequests().iterator();
+ while(it.hasNext() && newView == null) {
+ CreateConnectionViewAndElementRequest subRequest = (CreateConnectionViewAndElementRequest)it.next();
+ newView = (View)subRequest.getConnectionViewDescriptor().getAdapter(View.class);
+ }
+ if(newView != null) {
+ return newView.getElement();
+ } else {
+ fail("No edge seem to have been created.");
+ }
+ }
+ // Test the results then
+ // fail("Result tests not implemented.");
+ }
+ }
+ }
+ }
+ return null;
+ }
+
+ public static void createEdgeConnectorFromPalette(String toolId, View sourceView, View targetView, boolean isAllowed, List<Property> nestedSourcePath, List<Property> nestedTargetPath) throws Exception {
+ createEdgeConnectorFromPalette(toolId, sourceView, targetView, isAllowed, isAllowed, nestedSourcePath, nestedTargetPath);
+ }
+
+ public static void createEdgeConnectorFromPalette(String toolId, View sourceView, View targetView, boolean isAllowed, boolean execute, List<Property> nestedSourcePath, List<Property> nestedTargetPath) throws Exception {
+ EObject newLink = createEdgeFromPalette(toolId, sourceView, targetView, isAllowed, execute);
+ // Abort if the command is not supposed to be executable
+ if(!isAllowed) {
+ return;
+ }
+ if((newLink == null) || (!(newLink instanceof org.eclipse.uml2.uml.Connector))) {
+ fail("No edge or unexpected kind of edge created.");
+ }
+ // If previous test have not failed the execution / undo / re-do has been done
+ org.eclipse.uml2.uml.Connector connector = (org.eclipse.uml2.uml.Connector)newLink;
+ // Test source connector end
+ NestedConnectorEnd sourceNestedConnectorEnd = UMLUtil.getStereotypeApplication(connector.getEnds().get(0), NestedConnectorEnd.class);
+ if(nestedSourcePath.isEmpty()) {
+ Assert.assertNull("No nested connector end stereotype should be applied on source.", sourceNestedConnectorEnd);
+ } else {
+ Assert.assertNotNull("Nested connector end stereotype should be applied on source.", sourceNestedConnectorEnd);
+ Assert.assertEquals("Nested property path is incorrect for source", nestedSourcePath, sourceNestedConnectorEnd.getPropertyPath());
+ // if(!sourceNestedConnectorEnd.getPropertyPath().equals(nestedSourcePath)) {
+ // fail("The nested property path is incorrect for source.");
+ // }
+ }
+ // Test target connector end
+ NestedConnectorEnd targetNestedConnectorEnd = UMLUtil.getStereotypeApplication(connector.getEnds().get(1), NestedConnectorEnd.class);
+ if(nestedTargetPath.isEmpty()) {
+ Assert.assertNull("No nested connector end stereotype should be applied on target.", targetNestedConnectorEnd);
+ } else {
+ Assert.assertNotNull("Nested connector end stereotype should be applied on target.", targetNestedConnectorEnd);
+ Assert.assertEquals("Nested property path is incorrect for target", nestedTargetPath, targetNestedConnectorEnd.getPropertyPath());
+ // if(!targetNestedConnectorEnd.getPropertyPath().equals(nestedTargetPath)) {
+ // fail("The nested property path is incorrect for target.");
+ // }
+ }
+ }
+
+ public static void createEdgeConnectorAndTestDelegateFromPalette(String toolId, View sourceView, View targetView, boolean isAllowed, ConnectableElement expectedSourcePartWithPort, ConnectableElement expectedTargetPartWithPort) throws Exception {
+ createEdgeConnectorAndTestDelegateFromPalette(toolId, sourceView, targetView, isAllowed, isAllowed, expectedSourcePartWithPort, expectedTargetPartWithPort);
+ }
+
+ public static void createEdgeConnectorAndTestDelegateFromPalette(String toolId, View sourceView, View targetView, boolean isAllowed, boolean execute, ConnectableElement expectedSourcePartWithPort, ConnectableElement expectedTargetPartWithPort) throws Exception {
+ EObject newLink = createEdgeFromPalette(toolId, sourceView, targetView, isAllowed, execute);
+ // Abort if the command is not supposed to be executable
+ if(!isAllowed) {
+ return;
+ }
+ if((newLink == null) || (!(newLink instanceof org.eclipse.uml2.uml.Connector))) {
+ fail("No edge or unexpected kind of edge created.");
+ }
+ // If previous test have not failed the execution / undo / re-do has been done
+ org.eclipse.uml2.uml.Connector connector = (org.eclipse.uml2.uml.Connector)newLink;
+ // Test source connector end
+ ConnectorEnd sourceConnectorEnd = connector.getEnds().get(0);
+ if(sourceConnectorEnd.getPartWithPort() != expectedSourcePartWithPort) {
+ fail("The partWithPort is incorrect for source.");
+ }
+ // Test target connector end
+ ConnectorEnd targetConnectorEnd = connector.getEnds().get(1);
+ if(targetConnectorEnd.getPartWithPort() != expectedTargetPartWithPort) {
+ fail("The partWithPort is incorrect for target.");
+ }
+ }
+
+ public static void reorientRelationshipSource(View relationshipView, View newSourceView, boolean isAllowed) throws Exception {
+ reorientRelationship((Connector)relationshipView, newSourceView, ReorientRelationshipRequest.REORIENT_SOURCE, isAllowed);
+ }
+
+ public static void reorientRelationshipTarget(View relationshipView, View newTargetView, boolean isAllowed) throws Exception {
+ reorientRelationship((Connector)relationshipView, newTargetView, ReorientRelationshipRequest.REORIENT_TARGET, isAllowed);
+ }
+
+ public static void reorientRelationship(Connector relationshipView, View newEndView, int reorientDirection, boolean isAllowed) throws Exception {
+ // Prepare request and add
+ String reconnectDirection = (ReorientRelationshipRequest.REORIENT_SOURCE == reorientDirection) ? RequestConstants.REQ_RECONNECT_SOURCE : RequestConstants.REQ_RECONNECT_TARGET;
+ ReconnectRequest reconnectRequest = new ReconnectRequest(relationshipView);
+ reconnectRequest.setTargetEditPart(getEditPart(newEndView));
+ reconnectRequest.setConnectionEditPart((ConnectionEditPart)getEditPart(relationshipView));
+ reconnectRequest.setType(reconnectDirection);
+ // Get command
+ Command reorientCommand = getEditPart(newEndView).getCommand(reconnectRequest);
+ // Test the target command
+ if((reorientCommand == null) || !(reorientCommand.canExecute())) { // Non-executable command
+ if(!isAllowed) {
+ // Current behavior matches the expected results
+ return;
+ } else {
+ fail("The command should be executable.");
+ }
+ } else { // Executable command
+ if(!isAllowed) {
+ fail("The command should not be executable.");
+ } else {
+ defaultExecutionTest(reorientCommand);
+ // Test the results then
+ // fail("Result tests not implemented.");
+ }
+ }
+ }
+
+ public static void reorientConnectorSource(View relationshipView, View newSourceView, boolean isAllowed) throws Exception {
+ List<Property> nestedPath = Collections.emptyList();
+ reorientConnectorSource(relationshipView, newSourceView, isAllowed, nestedPath);
+ }
+
+ public static void reorientConnectorTarget(View relationshipView, View newTargetView, boolean isAllowed) throws Exception {
+ List<Property> nestedPath = Collections.emptyList();
+ reorientConnectorTarget(relationshipView, newTargetView, isAllowed, nestedPath);
+ }
+
+ public static void reorientConnectorSource(View relationshipView, View newSourceView, boolean isAllowed, List<Property> nestedPath) throws Exception {
+ reorientConnector((Connector)relationshipView, newSourceView, ReorientRelationshipRequest.REORIENT_SOURCE, isAllowed, nestedPath);
+ }
+
+ public static void reorientConnectorTarget(View relationshipView, View newTargetView, boolean isAllowed, List<Property> nestedPath) throws Exception {
+ reorientConnector((Connector)relationshipView, newTargetView, ReorientRelationshipRequest.REORIENT_TARGET, isAllowed, nestedPath);
+ }
+
+ public static void reorientConnector(Connector relationshipView, View newEndView, int reorientDirection, boolean isAllowed, List<Property> nestedPath) throws Exception {
+ reorientRelationship(relationshipView, newEndView, reorientDirection, isAllowed);
+ // Abort if the command is not supposed to be executable
+ if(!isAllowed) {
+ return;
+ }
+ // If previous test have not failed the execution / undo / re-do has been done
+ org.eclipse.uml2.uml.Connector connector = (org.eclipse.uml2.uml.Connector)relationshipView.getElement();
+ ConnectorEnd modifiedConnectorEnd = (reorientDirection == ReorientRelationshipRequest.REORIENT_SOURCE) ? connector.getEnds().get(0) : connector.getEnds().get(1);
+ NestedConnectorEnd nestedConnectorEnd = UMLUtil.getStereotypeApplication(modifiedConnectorEnd, NestedConnectorEnd.class);
+ if(nestedPath.isEmpty()) {
+ Assert.assertNull("No nested connector end stereotype should be applied.", nestedConnectorEnd);
+ } else {
+ Assert.assertNotNull("Nested connector end stereotype should be applied.", nestedConnectorEnd);
+ Assert.assertEquals("Invalid nested path", nestedPath, nestedConnectorEnd.getPropertyPath());
+ }
+ }
+
+ public static void reorientConnectorSourceAndTestDelegate(View relationshipView, View newSourceView, boolean isAllowed, ConnectableElement expectedSourcePartWithPort, ConnectableElement expectedTargetPartWithPort) throws Exception {
+ reorientConnectorAndTestDelegate((Connector)relationshipView, newSourceView, ReorientRelationshipRequest.REORIENT_SOURCE, isAllowed, expectedSourcePartWithPort, expectedTargetPartWithPort);
+ }
+
+ public static void reorientConnectorTargetAndTestDelegate(View relationshipView, View newTargetView, boolean isAllowed, ConnectableElement expectedSourcePartWithPort, ConnectableElement expectedTargetPartWithPort) throws Exception {
+ reorientConnectorAndTestDelegate((Connector)relationshipView, newTargetView, ReorientRelationshipRequest.REORIENT_TARGET, isAllowed, expectedSourcePartWithPort, expectedTargetPartWithPort);
+ }
+
+ public static void reorientConnectorAndTestDelegate(Connector relationshipView, View newEndView, int reorientDirection, boolean isAllowed, ConnectableElement expectedSourcePartWithPort, ConnectableElement expectedTargetPartWithPort) throws Exception {
+ reorientRelationship(relationshipView, newEndView, reorientDirection, isAllowed);
+ // Abort if the command is not supposed to be executable
+ if(!isAllowed) {
+ return;
+ }
+ // If previous test have not failed the execution / undo / re-do has been done
+ org.eclipse.uml2.uml.Connector connector = (org.eclipse.uml2.uml.Connector)relationshipView.getElement();
+ ConnectorEnd modifiedConnectorEnd = (reorientDirection == ReorientRelationshipRequest.REORIENT_SOURCE) ? connector.getEnds().get(0) : connector.getEnds().get(1);
+ ConnectorEnd oppositeConnectorEnd = (reorientDirection == ReorientRelationshipRequest.REORIENT_SOURCE) ? connector.getEnds().get(1) : connector.getEnds().get(0);
+ if(reorientDirection == ReorientRelationshipRequest.REORIENT_SOURCE) { // re-orient source
+ // Test source connector end
+ Assert.assertEquals("The partWithPort is incorrect for source (re-oriented).", expectedSourcePartWithPort, modifiedConnectorEnd.getPartWithPort());
+ // if(modifiedConnectorEnd.getPartWithPort() != expectedSourcePartWithPort) {
+ // fail("The partWithPort is incorrect for source (re-oriented).");
+ // }
+ // Test target connector end
+ Assert.assertEquals("The partWithPort is incorrect for target (opposite end).", expectedTargetPartWithPort, oppositeConnectorEnd.getPartWithPort());
+ // if(oppositeConnectorEnd.getPartWithPort() != expectedTargetPartWithPort) {
+ // fail("The partWithPort is incorrect for target (opposite end).");
+ // }
+ } else { // re-orient target
+ // Test source connector end
+ Assert.assertEquals("The partWithPort is incorrect for target (re-oriented).", expectedTargetPartWithPort, modifiedConnectorEnd.getPartWithPort());
+ // if(modifiedConnectorEnd.getPartWithPort() != expectedTargetPartWithPort) {
+ // fail("The partWithPort is incorrect for target .");
+ // }
+ // Test target connector end
+ Assert.assertEquals("The partWithPort is incorrect for source (opposite end).", expectedSourcePartWithPort, oppositeConnectorEnd.getPartWithPort());
+ // if(oppositeConnectorEnd.getPartWithPort() != expectedSourcePartWithPort) {
+ // fail("The partWithPort is incorrect for source (opposite end).");
+ // }
+ }
+ }
+
+ public static void setEncapsulationDeleteConnectorTest(Element block, View sourceView, View targetView, boolean canCreateConnector, boolean isConnectorDestroyExpected) throws Exception {
+ if(!canCreateConnector) {
+ return; // abort
+ }
+ // Make sure the block is not encapsulated before Connector creation.
+ TestPrepareUtils.setBlockIsEncapsulated(block, false);
+ // Create connector
+ org.eclipse.uml2.uml.Connector connector = (org.eclipse.uml2.uml.Connector)createEdgeFromPalette("internalblock.tool.connector", sourceView, targetView, true, true);
+ // Prepare set encapsulated command and execute (with undo, re-do).
+ Block blockApp = UMLUtil.getStereotypeApplication(block, Block.class);
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(blockApp);
+ if(provider == null) {
+ fail("Could not get IElementEditService for Block stereotype application.");
+ }
+ IEditCommandRequest setEncapsulationRequest = new SetRequest(getTransactionalEditingDomain(), blockApp, BlocksPackage.eINSTANCE.getBlock_IsEncapsulated(), true);
+ ICommand setEncapsulationCommand = provider.getEditCommand(setEncapsulationRequest);
+ defaultExecutionTest(new ICommandProxy(setEncapsulationCommand));
+ // Test if the Connector have been destroyed
+ if(isConnectorDestroyExpected) {
+ if(connector.eResource() != null) { // connector destroyed has no container
+ fail("Connector was expected to be destroyed.");
+ }
+ } else {
+ if(connector.eResource() == null) { // connector destroyed has no container
+ fail("Connector was not expected to be destroyed.");
+ }
+ }
+ }
+
+ /**
+ * Copy the list of objects into the Clipboard
+ *
+ * @param objectsToCopy
+ * the list of objects to copy. should not be <code>null</code>, at least an empty list
+ * @throws Exception
+ * exception thrown in case of problems
+ */
+ public static void copyEditParts(List<Object> objectsToCopy) throws Exception {
+ // select elements to copy
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().activate(EditorUtils.getEditor());
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().bringToTop(EditorUtils.getEditor());
+ EditorUtils.getDiagramEditor().getEditorSite().getSelectionProvider().setSelection(new StructuredSelection(objectsToCopy));
+ ISelection selection = EditorUtils.getEditor().getSite().getSelectionProvider().getSelection();
+ Assert.assertEquals("Selection size should be " + objectsToCopy.size(), objectsToCopy.size(), ((IStructuredSelection)selection).size());
+ // retrieve the command for copy
+ ICommandService commandService = (ICommandService)PlatformUI.getWorkbench().getService(ICommandService.class);
+ commandService.refreshElements(IWorkbenchCommandConstants.EDIT_COPY, null);
+ org.eclipse.core.commands.Command copyCommand = commandService.getCommand(IWorkbenchCommandConstants.EDIT_COPY);
+ ((GlobalAction)((ActionHandler)copyCommand.getHandler()).getAction()).setEnabled(true);
+ Assert.assertNotNull("Impossible to find copy command", copyCommand);
+ //EditorUtils.getDiagramEditor().getEditingDomain().setClipboard(objectsToCopy);
+ // retrieve handler service for the copy command
+ IHandlerService handlerService = (IHandlerService)PlatformUI.getWorkbench().getService(IHandlerService.class);
+ Assert.assertNotNull("Impossible to find handler service", handlerService);
+ final ParameterizedCommand parameterizedCommand = new ParameterizedCommand(copyCommand, null);
+ // retrieve the command and set some parameters on it
+ copyCommand.setEnabled(handlerService.getCurrentState());
+ final boolean commandEnabled = copyCommand.isEnabled();
+ Assert.assertTrue("Command should be enabled", commandEnabled);
+ // execute the copy command
+ handlerService.executeCommand(parameterizedCommand, null);
+ }
+
+ /**
+ * paste the list of objects into the Clipboard into the current diagram
+ *
+ * @param target
+ * object on which content of the clipboard should be added
+ * @param executable
+ * indicates if the paste command should be executable.
+ *
+ * @throws Exception
+ * exception thrown in case of problems
+ */
+ public static void pasteEditParts(Object target, boolean executable) throws Exception {
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().activate(EditorUtils.getEditor());
+ EditorUtils.getDiagramEditor().getEditorSite().getSelectionProvider().setSelection(new StructuredSelection(target));
+ // retrieve the command for copy
+ ICommandService commandService = (ICommandService)PlatformUI.getWorkbench().getService(ICommandService.class);
+ commandService.refreshElements(IWorkbenchCommandConstants.EDIT_PASTE, null);
+ org.eclipse.core.commands.Command pasteCommand = commandService.getCommand(IWorkbenchCommandConstants.EDIT_PASTE);
+ Assert.assertNotNull("Impossible to find paste command", pasteCommand);
+ ((GlobalAction)((ActionHandler)pasteCommand.getHandler()).getAction()).refresh();
+ IHandlerService handlerService = (IHandlerService)PlatformUI.getWorkbench().getService(IHandlerService.class);
+ Assert.assertNotNull("Impossible to find handler service", handlerService);
+ final ParameterizedCommand parameterizedCommand = new ParameterizedCommand(pasteCommand, null);
+ Assert.assertEquals("Command is not executable as expected", pasteCommand.isEnabled(), executable);
+ if(executable) {
+ // execute the copy command
+ handlerService.executeCommand(parameterizedCommand, null);
+ }
+ }
+
+ /**
+ * paste with model element the list of objects into the Clipboard into the current diagram
+ *
+ * @param target
+ * object on which content of the clipboard should be added
+ * @param executable
+ * indicates if the paste command should be executable.
+ *
+ * @throws Exception
+ * exception thrown in case of problems
+ */
+ public static void pasteWithModelEditParts(Object target, boolean executable) throws Exception {
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().activate(EditorUtils.getEditor());
+ EditorUtils.getDiagramEditor().getEditorSite().getSelectionProvider().setSelection(new StructuredSelection(target));
+ // retrieve the command for copy
+ ICommandService commandService = (ICommandService)PlatformUI.getWorkbench().getService(ICommandService.class);
+ commandService.refreshElements(IWorkbenchCommandConstants.EDIT_PASTE, null);
+ org.eclipse.core.commands.Command pasteWithModelCommand = commandService.getCommand("org.eclipse.papyrus.uml.diagram.common.commands.PasteWithModelCommand");
+ Assert.assertNotNull("Impossible to find paste command", pasteWithModelCommand);
+ // ((GlobalAction)((AbstractHandlerWithState)pasteWithModelCommand.getHandler()).getAction()).refresh();
+ IHandlerService handlerService = (IHandlerService)PlatformUI.getWorkbench().getService(IHandlerService.class);
+ Assert.assertNotNull("Impossible to find handler service", handlerService);
+ final ParameterizedCommand parameterizedCommand = new ParameterizedCommand(pasteWithModelCommand, null);
+ Assert.assertEquals("Command is not executable as expected", pasteWithModelCommand.isEnabled(), executable);
+ if(executable) {
+ // execute the copy command
+ handlerService.executeCommand(parameterizedCommand, null);
+ }
+ }
+
+ // History event type variable to store history error events.
+ public static int historyEventType = OperationHistoryEvent.DONE;
+
+ /**
+ * Test execution, undo, redo of the given command.
+ *
+ * @param command
+ * the command to test.
+ * @throws Exception
+ */
+ public static void defaultExecutionTest(Command command) throws Exception {
+ // Execution in the diagram command stack (like Papyrus usual execution for GEF commands). This is important especially for
+ // composed command like Drop links which create intermediate view during execution. With EMF command stack, the whole command
+ // tries to execute and the edit part of the intermediate created views are not created before the command ends.
+ // The diagram command stack let edit part being created after each view creation.
+ // The problem in using the DiagramCommandStack (vs EMF CommandStack) is that it hides any exception that can possibly occur during
+ // command execution. This would let the test finish without error (the command result is not tested currently) while the execution failed.
+ // For this matter the DiagramCommandStack history is observed to detect execution issues.
+ // Add diagram command stack operation history listener
+ IOperationHistory history = EditorUtils.getDiagramEditingDomain().getActionManager().getOperationHistory();
+ IOperationHistoryListener historyChange = new IOperationHistoryListener() {
+
+ public void historyNotification(OperationHistoryEvent event) {
+ // Store history events
+ historyEventType = event.getEventType();
+ }
+ };
+ history.addOperationHistoryListener(historyChange);
+
+ try {
+ // Test execution
+ historyEventType = OperationHistoryEvent.DONE;
+ EditorUtils.getCommandStack().execute(new GEFtoEMFCommandWrapper(command));
+ if(historyEventType == OperationHistoryEvent.OPERATION_NOT_OK) {
+ fail("Command execution failed ()");
+ }
+ // Test undo
+ historyEventType = OperationHistoryEvent.DONE;
+ EditorUtils.getCommandStack().undo();
+ if(historyEventType == OperationHistoryEvent.OPERATION_NOT_OK) {
+ fail("Command undo failed ()");
+ }
+ // Test redo
+ historyEventType = OperationHistoryEvent.DONE;
+ EditorUtils.getCommandStack().redo();
+ if(historyEventType == OperationHistoryEvent.OPERATION_NOT_OK) {
+ fail("Command redo failed ()");
+ }
+ } finally {
+ // Remove listener.
+ history.removeOperationHistoryListener(historyChange);
+ }
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/.classpath b/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/.classpath
new file mode 100755
index 0000000..5e4c1fe
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/.project b/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/.project
new file mode 100755
index 0000000..a8e99f3
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.sysml.diagram.requirement.tests</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/.settings/org.eclipse.jdt.core.prefs b/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 0000000..0de02b3
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,295 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/.settings/org.eclipse.jdt.ui.prefs b/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/.settings/org.eclipse.jdt.ui.prefs
new file mode 100755
index 0000000..954281d
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,68 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+formatter_profile=_Papyrus
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/META-INF/MANIFEST.MF
new file mode 100755
index 0000000..00235b0
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,107 @@
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.papyrus.infra.core;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.editor;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.gmf.runtime.diagram.ui.resources.editor;bundle-version="1.2.0",
+ org.eclipse.papyrus.uml.diagram.common;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.5.0",
+ org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.uml2.uml;bundle-version="4.0.0",
+ org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.infra.core.sasheditor;bundle-version="[2.0.0,3.0.0)",
+ org.junit;bundle-version="4.10.0",
+ org.eclipse.papyrus.sysml.diagram.requirement;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.sysml;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.papyrus.junit.framework;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.papyrus.uml.diagram.clazz;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.junit.utils;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.uml.diagram.tests,
+ org.eclipse.papyrus.sysml.architecture;bundle-version="1.0.0",
+ org.eclipse.papyrus.sysml.edit;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.gmfdiag.dnd,
+ org.eclipse.papyrus.uml.diagram.dnd,
+ org.eclipse.papyrus.uml.types.core,
+ org.eclipse.papyrus.infra.types.core,
+ org.eclipse.papyrus.sysml.diagram.ui;bundle-version="2.0.0",
+ org.eclipse.papyrus.sysml.diagram.common,
+ org.eclipse.papyrus.sysml.modelexplorer;bundle-version="1.2.0",
+ org.eclipse.papyrus.sysml.properties;bundle-version="1.2.0",
+ org.eclipse.papyrus.sysml.diagram.blockdefinition;bundle-version="3.0.0",
+ org.eclipse.papyrus.sysml.diagram.css;bundle-version="1.2.0",
+ org.eclipse.papyrus.sysml.nattable;bundle-version="2.0.0",
+ org.eclipse.papyrus.sysml.service.types;bundle-version="2.0.0",
+ org.eclipse.papyrus.sysml.tests;bundle-version="1.2.0",
+ org.eclipse.papyrus.sysml.diagram.internalblock;bundle-version="3.0.0",
+ org.eclipse.papyrus.sysml.diagram.parametric;bundle-version="2.0.0",
+ org.eclipse.papyrus.sysml.nattable.allocation;bundle-version="1.2.0",
+ org.eclipse.papyrus.sysml.nattable.allocation.config;bundle-version="1.2.0",
+ org.eclipse.papyrus.sysml.nattable.menu;bundle-version="1.2.0",
+ org.eclipse.papyrus.sysml.nattable.requirement;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.editor.welcome;bundle-version="2.0.0",
+ org.eclipse.papyrus.infra.types.editor;bundle-version="3.0.0",
+ org.eclipse.papyrus.infra.internationalization;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.newchild;bundle-version="3.0.0",
+ org.eclipse.papyrus.infra.properties;bundle-version="2.0.0",
+ org.eclipse.papyrus.infra.emf.diagram.common;bundle-version="2.0.0",
+ org.eclipse.papyrus.uml.diagram.component;bundle-version="3.0.0",
+ org.eclipse.papyrus.uml.diagram.css;bundle-version="2.0.0",
+ org.eclipse.papyrus.uml.diagram.linklf;bundle-version="2.0.0",
+ org.eclipse.papyrus.uml.diagram.menu;bundle-version="2.0.0",
+ org.eclipse.papyrus.uml.architecture;bundle-version="1.0.0",
+ org.eclipse.papyrus.uml.commands;bundle-version="1.3.0",
+ org.eclipse.papyrus.uml.diagram.modelexplorer;bundle-version="1.2.0",
+ org.eclipse.papyrus.uml.diagram.profile;bundle-version="3.0.0",
+ org.eclipse.papyrus.uml.diagram.symbols;bundle-version="1.2.0",
+ org.eclipse.papyrus.uml.filters;bundle-version="1.2.0",
+ org.eclipse.papyrus.uml.internationalization;bundle-version="1.0.0",
+ org.eclipse.papyrus.emf.facet.common.core;bundle-version="1.2.0",
+ org.eclipse.papyrus.emf.facet.common.sdk.core;bundle-version="1.2.0",
+ org.eclipse.papyrus.emf.facet.common.ui;bundle-version="1.2.0",
+ org.eclipse.papyrus.emf.facet.custom.metamodel.edit;bundle-version="1.3.0",
+ org.eclipse.papyrus.emf.facet.custom.sdk.core;bundle-version="1.2.0",
+ org.eclipse.papyrus.emf.facet.custom.sdk.ui;bundle-version="1.2.0",
+ org.eclipse.papyrus.emf.facet.query.java;bundle-version="1.2.0",
+ org.eclipse.papyrus.emf.facet.query.ocl.core;bundle-version="1.2.0",
+ org.eclipse.papyrus.emf.facet.util.core;bundle-version="1.2.0",
+ org.eclipse.papyrus.emf.facet.util.jface.ui;bundle-version="2.0.0",
+ org.eclipse.papyrus.emf.facet.widgets;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.editor.welcome.internationalization;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.editor.welcome.nattable;bundle-version="2.0.0",
+ org.eclipse.papyrus.infra.emf.readonly;bundle-version="3.0.0",
+ org.eclipse.papyrus.infra.emf.types;bundle-version="3.0.0",
+ org.eclipse.papyrus.infra.gmfdiag.assistant;bundle-version="1.3.0",
+ org.eclipse.papyrus.infra.gmfdiag.controlmode;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.gmfdiag.css.configuration;bundle-version="2.0.0",
+ org.eclipse.papyrus.infra.gmfdiag.css.theme;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.gmfdiag.expansion;bundle-version="2.0.0",
+ org.eclipse.papyrus.infra.gmfdiag.hyperlink;bundle-version="3.0.0",
+ org.eclipse.papyrus.infra.gmfdiag.navigation;bundle-version="2.0.0",
+ org.eclipse.papyrus.infra.gmfdiag.properties;bundle-version="3.0.0",
+ org.eclipse.papyrus.infra.gmfdiag.welcome;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.hyperlink;bundle-version="3.0.0",
+ org.eclipse.papyrus.infra.internationalization.ui;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.nattable.gmfdiag;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.nattable.modelexplorer;bundle-version="3.0.0",
+ org.eclipse.papyrus.infra.nattable.properties;bundle-version="2.2.0",
+ org.eclipse.papyrus.infra.newchild.edit;bundle-version="3.0.0",
+ org.eclipse.papyrus.infra.properties.ui;bundle-version="2.0.0",
+ org.eclipse.papyrus.infra.services.architecture;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.services.localizer;bundle-version="2.0.0",
+ org.eclipse.papyrus.infra.services.navigation;bundle-version="3.0.0",
+ org.eclipse.papyrus.infra.services.openelement;bundle-version="3.0.0",
+ org.eclipse.papyrus.infra.services.validation;bundle-version="3.0.0",
+ org.eclipse.papyrus.infra.types.ui;bundle-version="3.0.0",
+ org.eclipse.papyrus.sdk;bundle-version="2.0.0",
+ com.google.guava;bundle-version="21.0.0"
+Export-Package: org.eclipse.papyrus.sysml.diagram.requirement.test,
+ org.eclipse.papyrus.sysml.diagram.requirement.test.canonical,
+ org.eclipse.papyrus.sysml.diagram.requirement.test.load
+Bundle-Vendor: Eclipse Modeling Project
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 1.2.0.qualifier
+Bundle-Name: SysML Requirements Diagram Tests
+Bundle-ManifestVersion: 2
+Bundle-Activator: org.eclipse.papyrus.sysml.diagram.requirement.test.Activator
+Bundle-SymbolicName: org.eclipse.papyrus.sysml.diagram.requirement.tests;singleton:=true
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/about.html b/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/about.html
new file mode 100755
index 0000000..d35d5ae
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/build.properties b/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/build.properties
new file mode 100755
index 0000000..9cbab3c
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/build.properties
@@ -0,0 +1,6 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ about.html
+src.includes = about.html
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/pom.xml b/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/pom.xml
new file mode 100755
index 0000000..0bd2284
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/pom.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.papyrus.sysml</groupId>
+ <artifactId>org.eclipse.papyrus.sysml.test</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.papyrus.sysml.diagram.requirement.tests</artifactId>
+ <packaging>eclipse-test-plugin</packaging>
+</project>
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/Activator.java b/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/Activator.java
new file mode 100755
index 0000000..52049bf
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/Activator.java
@@ -0,0 +1,63 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * (CEA LIST) - Initial API and implementation
+ /*****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.test;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.sysml.diagram.requirement.tests"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/AllTests.java b/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/AllTests.java
new file mode 100755
index 0000000..9dc06eb
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/AllTests.java
@@ -0,0 +1,31 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * (CEA LIST) - Initial API and implementation
+ /*****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.test;
+
+import org.eclipse.papyrus.sysml.diagram.requirement.test.canonical.AllCanonicalTests;
+import org.junit.runner.RunWith;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.junit.runners.Suite.SuiteClasses;
+
+/**
+ * All tests together.
+ */
+@RunWith(ClassificationSuite.class)
+@SuiteClasses({
+// canonical
+AllCanonicalTests.class,
+// load
+//LoadTests.class
+})
+public class AllTests {
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/IRequirementDiagramTestsConstants.java b/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/IRequirementDiagramTestsConstants.java
new file mode 100755
index 0000000..8c2d23e
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/IRequirementDiagramTestsConstants.java
@@ -0,0 +1,37 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nizar GUEDIDI (CEA LIST) - Initial API and implementation
+ /*****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.test;
+
+import org.eclipse.papyrus.sysml.SysmlPackage;
+import org.eclipse.papyrus.sysml.constraints.ConstraintsPackage;
+import org.eclipse.papyrus.sysml.portandflows.PortandflowsPackage;
+import org.eclipse.papyrus.sysml.requirements.RequirementsPackage;
+
+public interface IRequirementDiagramTestsConstants {
+
+ /** name of the test project */
+ public final String PROJECT_NAME = "RequirementDiagramTestProject";
+
+ /** name of the test model */
+ public final String FILE_NAME = "RequirmentDiagramTest.di";
+
+ public final String PROFILE_SYSML = SysmlPackage.eNS_URI;
+
+ public final String PROFILE_SYSML_PORTS = PortandflowsPackage.eNS_URI;
+
+ public final String PROFILE_SYSML_CONSTRAINTS = ConstraintsPackage.eNS_URI;
+
+ public final String PROFILE_SYSML_REQUIREMENTS = RequirementsPackage.eNS_URI;
+
+ public final String[] PROFILES = new String[]{ PROFILE_SYSML, PROFILE_SYSML_PORTS, PROFILE_SYSML_CONSTRAINTS, PROFILE_SYSML_REQUIREMENTS };
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/AbstractPapyrusTestCase.java b/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/AbstractPapyrusTestCase.java
new file mode 100755
index 0000000..266a92b
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/AbstractPapyrusTestCase.java
@@ -0,0 +1,33 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nizar GUEDIDI (CEA LIST) - Initial API and implementation
+ /*****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.test.canonical;
+
+import org.eclipse.papyrus.commands.ICreationCommand;
+import org.eclipse.papyrus.sysml.diagram.requirement.RequirementDiagramCreateCommand;
+import org.eclipse.papyrus.sysml.diagram.requirement.test.IRequirementDiagramTestsConstants;
+
+/**
+ * The Class AbstractPapyrusTestCase.
+ */
+public abstract class AbstractPapyrusTestCase extends org.eclipse.papyrus.uml.diagram.tests.canonical.AbstractPapyrusTestCase {
+
+ @Override
+ protected ICreationCommand getDiagramCommandCreation() {
+ return new RequirementDiagramCreateCommand();
+ }
+
+ @Override
+ protected String[] getRequiredProfiles() {
+ return IRequirementDiagramTestsConstants.PROFILES;
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/AllCanonicalTests.java b/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/AllCanonicalTests.java
new file mode 100755
index 0000000..70f2aa1
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/AllCanonicalTests.java
@@ -0,0 +1,39 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nizar GUEDIDI (CEA LIST) - Initial API and implementation
+ /*****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.test.canonical;
+
+import org.junit.runner.RunWith;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.junit.runners.Suite.SuiteClasses;
+
+/**
+ * All test in canonical package
+ */
+@RunWith(ClassificationSuite.class)
+@SuiteClasses({
+// Top Node
+TestRequirementDiagramTopNode.class,
+// Child Node
+TestRequirementDiagramChildNode.class,
+// Links
+TestRequirementDiagramLink.class,
+// Comment Link
+TestRequirementDiagramCommentLink.class,
+// Constraint Link
+TestRequirementDiagramConstraintLink.class,
+// Containment Link
+TestRequirementDiagramContainment.class,
+// Link Owned By source
+TestRequirementDiagramLinkOwnedBySource.class })
+public class AllCanonicalTests {
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/TestRequirementDiagramChildNode.java b/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/TestRequirementDiagramChildNode.java
new file mode 100755
index 0000000..b0b130c
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/TestRequirementDiagramChildNode.java
@@ -0,0 +1,95 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nizar GUEDIDI (CEA LIST) - Initial API and implementation
+ /*****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.test.canonical;
+
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.papyrus.commands.ICreationCommand;
+import org.eclipse.papyrus.infra.gmfdiag.common.updater.DiagramUpdater;
+import org.eclipse.papyrus.junit.framework.classification.InvalidTest;
+import org.eclipse.papyrus.sysml.diagram.requirement.RequirementDiagramCreateCommand;
+import org.eclipse.papyrus.sysml.diagram.requirement.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.requirement.test.IRequirementDiagramTestsConstants;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.CustomUMLDiagramUpdater;
+import org.eclipse.papyrus.uml.diagram.tests.canonical.TestChildNode;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.Test;
+
+/**
+ * The Class TestClassDiagramChildNode.
+ */
+@InvalidTest("UML Diagram Canonical Tests are not compatible with profiled models")
+public class TestRequirementDiagramChildNode extends TestChildNode {
+
+ @Override
+ protected ICreationCommand getDiagramCommandCreation() {
+ return new RequirementDiagramCreateCommand();
+ }
+
+ @Override
+ protected CreateViewRequest createViewRequestShapeContainer() {
+ return CreateViewRequestFactory.getCreateShapeRequest(ElementTypes.PACKAGE, getDiagramEditPart().getDiagramPreferencesHint());
+ }
+
+ @Override
+ protected String getProjectName() {
+ return IRequirementDiagramTestsConstants.PROJECT_NAME;
+ }
+
+ @Override
+ protected String getFileName() {
+ return IRequirementDiagramTestsConstants.FILE_NAME;
+ }
+
+ @Override
+ protected String[] getRequiredProfiles() {
+ return IRequirementDiagramTestsConstants.PROFILES;
+ }
+
+ /**
+ * Test to manage i package.
+ */
+ @Test
+ public void testToManageIPackage() {
+ testToManageNode(ElementTypes.PACKAGE_CN, UMLPackage.eINSTANCE.getPackage(), ElementTypes.PACKAGE_CN, true);
+ }
+
+ /**
+ * Test to manage <<Requirement>> (stereotype class).
+ */
+ @Test
+ public void testToManageRequirement() {
+ testToManageNode(ElementTypes.CLASS_CN, UMLPackage.eINSTANCE.getClass_(), ElementTypes.PACKAGE_CN, true);
+ }
+
+ /**
+ * Test to manage Comment.
+ */
+ @Test
+ public void testToManageComment() {
+ testToManageNode(ElementTypes.COMMENT_CN, UMLPackage.eINSTANCE.getComment(), ElementTypes.PACKAGE_CN, true);
+ }
+
+ /**
+ * Test to manage Constraint.
+ */
+ @Test
+ public void testToManageConstraint() {
+ testToManageNode(ElementTypes.CONSTRAINT_CN, UMLPackage.eINSTANCE.getConstraint(), ElementTypes.PACKAGE_CN, true);
+ }
+
+ @Override
+ public DiagramUpdater getDiagramUpdater() {
+ return CustomUMLDiagramUpdater.INSTANCE;
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/TestRequirementDiagramCommentLink.java b/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/TestRequirementDiagramCommentLink.java
new file mode 100755
index 0000000..df48d52
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/TestRequirementDiagramCommentLink.java
@@ -0,0 +1,59 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nizar GUEDIDI (CEA LIST) - Initial API and implementation
+ /*****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.test.canonical;
+
+import org.eclipse.papyrus.commands.ICreationCommand;
+import org.eclipse.papyrus.infra.gmfdiag.common.updater.DiagramUpdater;
+import org.eclipse.papyrus.junit.framework.classification.InvalidTest;
+import org.eclipse.papyrus.sysml.diagram.requirement.RequirementDiagramCreateCommand;
+import org.eclipse.papyrus.sysml.diagram.requirement.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.requirement.test.IRequirementDiagramTestsConstants;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.CustomUMLDiagramUpdater;
+import org.eclipse.papyrus.uml.diagram.tests.canonical.TestCommentLink;
+import org.junit.Test;
+
+@InvalidTest("UML Diagram Canonical Tests are not compatible with profiled models")
+public class TestRequirementDiagramCommentLink extends TestCommentLink {
+
+ @Override
+ protected ICreationCommand getDiagramCommandCreation() {
+ return new RequirementDiagramCreateCommand();
+ }
+
+ @Override
+ protected String getProjectName() {
+ return IRequirementDiagramTestsConstants.PROJECT_NAME;
+ }
+
+ @Override
+ protected String getFileName() {
+ return IRequirementDiagramTestsConstants.FILE_NAME;
+ }
+
+ @Override
+ protected String[] getRequiredProfiles() {
+ return IRequirementDiagramTestsConstants.PROFILES;
+ }
+
+ /**
+ * Test to manage Comment
+ */
+ @Test
+ public void testToManageComment() {
+ testToManageLink(ElementTypes.COMMENT, ElementTypes.CLASS, ElementTypes.COMMENT_ANNOTATED_ELEMENT, ElementTypes.PACKAGE, true);
+ }
+ @Override
+ public DiagramUpdater getDiagramUpdater() {
+ return CustomUMLDiagramUpdater.INSTANCE;
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/TestRequirementDiagramConstraintLink.java b/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/TestRequirementDiagramConstraintLink.java
new file mode 100755
index 0000000..3fd2ea0
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/TestRequirementDiagramConstraintLink.java
@@ -0,0 +1,59 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nizar GUEDIDI (CEA LIST) - Initial API and implementation
+ /*****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.test.canonical;
+
+import org.eclipse.papyrus.commands.ICreationCommand;
+import org.eclipse.papyrus.infra.gmfdiag.common.updater.DiagramUpdater;
+import org.eclipse.papyrus.junit.framework.classification.InvalidTest;
+import org.eclipse.papyrus.sysml.diagram.requirement.RequirementDiagramCreateCommand;
+import org.eclipse.papyrus.sysml.diagram.requirement.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.requirement.test.IRequirementDiagramTestsConstants;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.CustomUMLDiagramUpdater;
+import org.eclipse.papyrus.uml.diagram.tests.canonical.TestConstraintLink;
+import org.junit.Test;
+
+@InvalidTest("UML Diagram Canonical Tests are not compatible with profiled models")
+public class TestRequirementDiagramConstraintLink extends TestConstraintLink {
+
+ @Override
+ protected ICreationCommand getDiagramCommandCreation() {
+ return new RequirementDiagramCreateCommand();
+ }
+
+ @Override
+ protected String getProjectName() {
+ return IRequirementDiagramTestsConstants.PROJECT_NAME;
+ }
+
+ @Override
+ protected String getFileName() {
+ return IRequirementDiagramTestsConstants.FILE_NAME;
+ }
+
+ @Override
+ protected String[] getRequiredProfiles() {
+ return IRequirementDiagramTestsConstants.PROFILES;
+ }
+
+ /**
+ * Test to manage Constraint
+ */
+ @Test
+ public void testToManageConstraint() {
+ testToManageLink(ElementTypes.CONSTRAINT, ElementTypes.CLASS, ElementTypes.CONSTRAINT_CONSTRAINED_ELEMENT, ElementTypes.PACKAGE, true);
+ }
+ @Override
+ public DiagramUpdater getDiagramUpdater() {
+ return CustomUMLDiagramUpdater.INSTANCE;
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/TestRequirementDiagramContainment.java b/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/TestRequirementDiagramContainment.java
new file mode 100755
index 0000000..e081295
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/TestRequirementDiagramContainment.java
@@ -0,0 +1,59 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nizar GUEDIDI (CEA LIST) - Initial API and implementation
+ /*****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.test.canonical;
+
+import org.eclipse.papyrus.commands.ICreationCommand;
+import org.eclipse.papyrus.infra.gmfdiag.common.updater.DiagramUpdater;
+import org.eclipse.papyrus.junit.framework.classification.InvalidTest;
+import org.eclipse.papyrus.sysml.diagram.requirement.RequirementDiagramCreateCommand;
+import org.eclipse.papyrus.sysml.diagram.requirement.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.requirement.test.IRequirementDiagramTestsConstants;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.CustomUMLDiagramUpdater;
+import org.eclipse.papyrus.uml.diagram.tests.canonical.TestContainmentLink;
+import org.junit.Test;
+
+@InvalidTest("UML Diagram Canonical Tests are not compatible with profiled models")
+public class TestRequirementDiagramContainment extends TestContainmentLink {
+
+ @Override
+ protected ICreationCommand getDiagramCommandCreation() {
+ return new RequirementDiagramCreateCommand();
+ }
+
+ @Override
+ protected String getProjectName() {
+ return IRequirementDiagramTestsConstants.PROJECT_NAME;
+ }
+
+ @Override
+ protected String getFileName() {
+ return IRequirementDiagramTestsConstants.FILE_NAME;
+ }
+
+ @Override
+ protected String[] getRequiredProfiles() {
+ return IRequirementDiagramTestsConstants.PROFILES;
+ }
+
+ /**
+ * Test to manage containmentLink.
+ */
+ @Test
+ public void testToManageContainment() {
+ testToManageLink(ElementTypes.CLASS, ElementTypes.CLASS, ElementTypes.CONTAINMENT_LINK, ElementTypes.PACKAGE);
+ }
+ @Override
+ public DiagramUpdater getDiagramUpdater() {
+ return CustomUMLDiagramUpdater.INSTANCE;
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/TestRequirementDiagramLink.java b/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/TestRequirementDiagramLink.java
new file mode 100755
index 0000000..e2d1bc7
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/TestRequirementDiagramLink.java
@@ -0,0 +1,78 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nizar GUEDIDI (CEA LIST) - Initial API and implementation
+ /*****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.test.canonical;
+
+import org.eclipse.papyrus.commands.ICreationCommand;
+import org.eclipse.papyrus.infra.gmfdiag.common.updater.DiagramUpdater;
+import org.eclipse.papyrus.junit.framework.classification.InvalidTest;
+import org.eclipse.papyrus.sysml.diagram.requirement.RequirementDiagramCreateCommand;
+import org.eclipse.papyrus.sysml.diagram.requirement.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.requirement.test.IRequirementDiagramTestsConstants;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.CustomUMLDiagramUpdater;
+import org.eclipse.papyrus.uml.diagram.tests.canonical.TestLink;
+import org.junit.Test;
+
+/**
+ * The Class TestClassDiagramLink.
+ */
+@InvalidTest("UML Diagram Canonical Tests are not compatible with profiled models")
+public class TestRequirementDiagramLink extends TestLink {
+
+ @Override
+ protected ICreationCommand getDiagramCommandCreation() {
+ return new RequirementDiagramCreateCommand();
+ }
+
+ @Override
+ protected String getProjectName() {
+ return IRequirementDiagramTestsConstants.PROJECT_NAME;
+ }
+
+ @Override
+ protected String getFileName() {
+ return IRequirementDiagramTestsConstants.FILE_NAME;
+ }
+
+ @Override
+ protected String[] getRequiredProfiles() {
+ return IRequirementDiagramTestsConstants.PROFILES;
+ }
+
+ /**
+ * Test to manage Abstraction
+ */
+ @Test
+ public void testToManageAbstraction() {
+ testToManageLink(ElementTypes.CLASS, ElementTypes.CLASS, ElementTypes.ABSTRACTION, ElementTypes.PACKAGE, true);
+ }
+
+ /**
+ * Test to manage Dependency
+ */
+ @Test
+ public void testToManageDependency() {
+ testToManageLink(ElementTypes.CLASS, ElementTypes.CLASS, ElementTypes.DEPENDENCY, ElementTypes.PACKAGE, true);
+ }
+
+ /**
+ * Test to manage Realization
+ */
+ @Test
+ public void testToManageRealization() {
+ testToManageLink(ElementTypes.CLASS, ElementTypes.CLASS, ElementTypes.REALIZATION, ElementTypes.PACKAGE, true);
+ }
+ @Override
+ public DiagramUpdater getDiagramUpdater() {
+ return CustomUMLDiagramUpdater.INSTANCE;
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/TestRequirementDiagramLinkOwnedBySource.java b/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/TestRequirementDiagramLinkOwnedBySource.java
new file mode 100755
index 0000000..ab9f8f4
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/TestRequirementDiagramLinkOwnedBySource.java
@@ -0,0 +1,59 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nizar GUEDIDI (CEA LIST) - Initial API and implementation
+ /*****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.test.canonical;
+
+import org.eclipse.papyrus.commands.ICreationCommand;
+import org.eclipse.papyrus.infra.gmfdiag.common.updater.DiagramUpdater;
+import org.eclipse.papyrus.junit.framework.classification.InvalidTest;
+import org.eclipse.papyrus.sysml.diagram.requirement.RequirementDiagramCreateCommand;
+import org.eclipse.papyrus.sysml.diagram.requirement.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.requirement.test.IRequirementDiagramTestsConstants;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.CustomUMLDiagramUpdater;
+import org.eclipse.papyrus.uml.diagram.tests.canonical.TestLinkOwnedBySource;
+import org.junit.Test;
+
+@InvalidTest("UML Diagram Canonical Tests are not compatible with profiled models")
+public class TestRequirementDiagramLinkOwnedBySource extends TestLinkOwnedBySource {
+
+ @Override
+ protected ICreationCommand getDiagramCommandCreation() {
+ return new RequirementDiagramCreateCommand();
+ }
+
+ @Override
+ protected String getProjectName() {
+ return IRequirementDiagramTestsConstants.PROJECT_NAME;
+ }
+
+ @Override
+ protected String getFileName() {
+ return IRequirementDiagramTestsConstants.FILE_NAME;
+ }
+
+ @Override
+ protected String[] getRequiredProfiles() {
+ return IRequirementDiagramTestsConstants.PROFILES;
+ }
+
+ /**
+ * Test to manage Package import
+ */
+ @Test
+ public void testToManagePackageImport() {
+ testToManageLink(ElementTypes.PACKAGE, ElementTypes.PACKAGE, ElementTypes.PACKAGE_IMPORT, ElementTypes.PACKAGE, true);
+ }
+ @Override
+ public DiagramUpdater getDiagramUpdater() {
+ return CustomUMLDiagramUpdater.INSTANCE;
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/TestRequirementDiagramTopNode.java b/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/TestRequirementDiagramTopNode.java
new file mode 100755
index 0000000..e568e2c
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/TestRequirementDiagramTopNode.java
@@ -0,0 +1,94 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nizar GUEDIDI (CEA LIST) - Initial API and implementation
+ /*****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.test.canonical;
+
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.papyrus.commands.ICreationCommand;
+import org.eclipse.papyrus.infra.gmfdiag.common.updater.DiagramUpdater;
+import org.eclipse.papyrus.junit.framework.classification.InvalidTest;
+import org.eclipse.papyrus.sysml.diagram.requirement.RequirementDiagramCreateCommand;
+import org.eclipse.papyrus.sysml.diagram.requirement.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.requirement.test.IRequirementDiagramTestsConstants;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.CustomUMLDiagramUpdater;
+import org.eclipse.papyrus.uml.diagram.tests.canonical.TestTopNode;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.Test;
+
+/**
+ * The Class TestClassDiagramTopNode.
+ */
+@InvalidTest("UML Diagram Canonical Tests are not compatible with profiled models")
+public class TestRequirementDiagramTopNode extends TestTopNode {
+
+ @Override
+ protected ICreationCommand getDiagramCommandCreation() {
+ return new RequirementDiagramCreateCommand();
+ }
+
+ @Override
+ protected CreateViewRequest createViewRequestShapeContainer() {
+ return CreateViewRequestFactory.getCreateShapeRequest(ElementTypes.PACKAGE, getDiagramEditPart().getDiagramPreferencesHint());
+ }
+
+ @Override
+ protected String getProjectName() {
+ return IRequirementDiagramTestsConstants.PROJECT_NAME;
+ }
+
+ @Override
+ protected String getFileName() {
+ return IRequirementDiagramTestsConstants.FILE_NAME;
+ }
+
+ @Override
+ protected String[] getRequiredProfiles() {
+ return IRequirementDiagramTestsConstants.PROFILES;
+ }
+
+ /**
+ * Test to manage i package.
+ */
+ @Test
+ public void testToManageIPackage() {
+ testToManageNode(ElementTypes.PACKAGE, UMLPackage.eINSTANCE.getPackage(), ElementTypes.PACKAGE, true);
+ }
+
+ /**
+ * Test to manage Requirement (inherite class).
+ */
+ @Test
+ public void testToManageRequirement() {
+ testToManageNode(ElementTypes.CLASS, UMLPackage.eINSTANCE.getClass_(), ElementTypes.PACKAGE, true);
+ }
+
+ /**
+ * Test to manage Comment.
+ */
+ @Test
+ public void testToManageComment() {
+ testToManageNode(ElementTypes.COMMENT, UMLPackage.eINSTANCE.getComment(), ElementTypes.PACKAGE, true);
+ }
+
+ /**
+ * Test to manage Constraint.
+ */
+ @Test
+ public void testToManageConstraint() {
+ testToManageNode(ElementTypes.CONSTRAINT, UMLPackage.eINSTANCE.getConstraint(), ElementTypes.PACKAGE, true);
+ }
+ @Override
+ public DiagramUpdater getDiagramUpdater() {
+ return CustomUMLDiagramUpdater.INSTANCE;
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/load/Load100RequirementTest.java b/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/load/Load100RequirementTest.java
new file mode 100755
index 0000000..435b8e3
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/load/Load100RequirementTest.java
@@ -0,0 +1,74 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nizar GUEDIDI (CEA LIST) - Initial API and implementation
+ /*****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.test.load;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.diagram.requirement.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.requirement.test.IRequirementDiagramTestsConstants;
+import org.eclipse.papyrus.sysml.diagram.requirement.test.canonical.AbstractPapyrusTestCase;
+import org.junit.Ignore;
+import org.junit.Test;
+
+/**
+ * The Class Load100RequirementTest.
+ */
+@Ignore // not executed by Papyrus-Master-Extra-Tests
+public class Load100RequirementTest extends AbstractPapyrusTestCase {
+
+ @Override
+ protected String getProjectName() {
+ return IRequirementDiagramTestsConstants.PROJECT_NAME;
+ }
+
+ @Override
+ protected String getFileName() {
+ return IRequirementDiagramTestsConstants.FILE_NAME;
+ }
+
+ @Override
+ protected String[] getRequiredProfiles() {
+ return IRequirementDiagramTestsConstants.PROFILES;
+ }
+
+ /**
+ * Test to create a node.
+ *
+ * @param type
+ * the type
+ */
+ public void testToCreateANode(IElementType type) {
+ CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getDiagramEditPart().getDiagramPreferencesHint());
+ Command command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull("CREATION: creation command null", command);
+ assertTrue("CREATION: test if the command is created", command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: test if the command can be executed", command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ }
+
+ /**
+ * Test load100 requirement.
+ */
+ @Test
+ public void testLoad100Req() {
+ for(int i = 0; i < 100; i++) {
+ testToCreateANode(ElementTypes.CLASS);
+ }
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/load/Load10RequirementTest.java b/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/load/Load10RequirementTest.java
new file mode 100755
index 0000000..70609fa
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/load/Load10RequirementTest.java
@@ -0,0 +1,74 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nizar GUEDIDI (CEA LIST) - Initial API and implementation
+ /*****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.test.load;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.diagram.requirement.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.requirement.test.IRequirementDiagramTestsConstants;
+import org.eclipse.papyrus.sysml.diagram.requirement.test.canonical.AbstractPapyrusTestCase;
+import org.junit.Ignore;
+import org.junit.Test;
+
+/**
+ * The Class Load10RequirementTest.
+ */
+@Ignore // not executed by Papyrus-Master-Extra-Tests
+public class Load10RequirementTest extends AbstractPapyrusTestCase {
+
+ @Override
+ protected String getProjectName() {
+ return IRequirementDiagramTestsConstants.PROJECT_NAME;
+ }
+
+ @Override
+ protected String getFileName() {
+ return IRequirementDiagramTestsConstants.FILE_NAME;
+ }
+
+ @Override
+ protected String[] getRequiredProfiles() {
+ return IRequirementDiagramTestsConstants.PROFILES;
+ }
+
+ /**
+ * Test to create a node.
+ *
+ * @param type
+ * the type
+ */
+ public void testToCreateANode(IElementType type) {
+ CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getDiagramEditPart().getDiagramPreferencesHint());
+ Command command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull("CREATION: creation command null", command);
+ assertTrue("CREATION: test if the command is created", command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: test if the command can be executed", command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ }
+
+ /**
+ * Test load10 requirement.
+ */
+ @Test
+ public void testLoad10Req() {
+ for(int i = 0; i < 10; i++) {
+ testToCreateANode(ElementTypes.CLASS);
+ }
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/load/Load200RequirementTest.java b/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/load/Load200RequirementTest.java
new file mode 100755
index 0000000..fd1b52b
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/load/Load200RequirementTest.java
@@ -0,0 +1,74 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nizar GUEDIDI (CEA LIST) - Initial API and implementation
+ /*****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.test.load;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.diagram.requirement.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.requirement.test.IRequirementDiagramTestsConstants;
+import org.eclipse.papyrus.sysml.diagram.requirement.test.canonical.AbstractPapyrusTestCase;
+import org.junit.Ignore;
+import org.junit.Test;
+
+/**
+ * The Class Load200RequirementTest.
+ */
+@Ignore // not executed by Papyrus-Master-Extra-Tests
+public class Load200RequirementTest extends AbstractPapyrusTestCase {
+
+ @Override
+ protected String getProjectName() {
+ return IRequirementDiagramTestsConstants.PROJECT_NAME;
+ }
+
+ @Override
+ protected String getFileName() {
+ return IRequirementDiagramTestsConstants.FILE_NAME;
+ }
+
+ @Override
+ protected String[] getRequiredProfiles() {
+ return IRequirementDiagramTestsConstants.PROFILES;
+ }
+
+ /**
+ * Test to create a node.
+ *
+ * @param type
+ * the type
+ */
+ public void testToCreateANode(IElementType type) {
+ CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getDiagramEditPart().getDiagramPreferencesHint());
+ Command command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull("CREATION: creation command null", command);
+ assertTrue("CREATION: test if the command is created", command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: test if the command can be executed", command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ }
+
+ /**
+ * Test load200 requirement.
+ */
+ @Test
+ public void testLoad200Req() {
+ for(int i = 0; i < 200; i++) {
+ testToCreateANode(ElementTypes.CLASS);
+ }
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/load/Load300RequirementTest.java b/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/load/Load300RequirementTest.java
new file mode 100755
index 0000000..6701ae4
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/load/Load300RequirementTest.java
@@ -0,0 +1,74 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nizar GUEDIDI (CEA LIST) - Initial API and implementation
+ /*****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.test.load;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.diagram.requirement.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.requirement.test.IRequirementDiagramTestsConstants;
+import org.eclipse.papyrus.sysml.diagram.requirement.test.canonical.AbstractPapyrusTestCase;
+import org.junit.Ignore;
+import org.junit.Test;
+
+/**
+ * The Class Load300RequirementTest.
+ */
+@Ignore // not executed by Papyrus-Master-Extra-Tests
+public class Load300RequirementTest extends AbstractPapyrusTestCase {
+
+ @Override
+ protected String getProjectName() {
+ return IRequirementDiagramTestsConstants.PROJECT_NAME;
+ }
+
+ @Override
+ protected String getFileName() {
+ return IRequirementDiagramTestsConstants.FILE_NAME;
+ }
+
+ @Override
+ protected String[] getRequiredProfiles() {
+ return IRequirementDiagramTestsConstants.PROFILES;
+ }
+
+ /**
+ * Test to create a node.
+ *
+ * @param type
+ * the type
+ */
+ public void testToCreateANode(IElementType type) {
+ CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getDiagramEditPart().getDiagramPreferencesHint());
+ Command command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull("CREATION: creation command null", command);
+ assertTrue("CREATION: test if the command is created", command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: test if the command can be executed", command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ }
+
+ /**
+ * Test load300 requirement.
+ */
+ @Test
+ public void testLoad300Req() {
+ for(int i = 0; i < 300; i++) {
+ testToCreateANode(ElementTypes.CLASS);
+ }
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/load/Load400RequirementTest.java b/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/load/Load400RequirementTest.java
new file mode 100755
index 0000000..a74b645
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/load/Load400RequirementTest.java
@@ -0,0 +1,74 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nizar GUEDIDI (CEA LIST) - Initial API and implementation
+ /*****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.test.load;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.diagram.requirement.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.requirement.test.IRequirementDiagramTestsConstants;
+import org.eclipse.papyrus.sysml.diagram.requirement.test.canonical.AbstractPapyrusTestCase;
+import org.junit.Ignore;
+import org.junit.Test;
+
+/**
+ * The Class Load400RequirementTest.
+ */
+@Ignore // not executed by Papyrus-Master-Extra-Tests
+public class Load400RequirementTest extends AbstractPapyrusTestCase {
+
+ @Override
+ protected String getProjectName() {
+ return IRequirementDiagramTestsConstants.PROJECT_NAME;
+ }
+
+ @Override
+ protected String getFileName() {
+ return IRequirementDiagramTestsConstants.FILE_NAME;
+ }
+
+ @Override
+ protected String[] getRequiredProfiles() {
+ return IRequirementDiagramTestsConstants.PROFILES;
+ }
+
+ /**
+ * Test to create a node.
+ *
+ * @param type
+ * the type
+ */
+ public void testToCreateANode(IElementType type) {
+ CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getDiagramEditPart().getDiagramPreferencesHint());
+ Command command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull("CREATION: creation command null", command);
+ assertTrue("CREATION: test if the command is created", command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: test if the command can be executed", command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ }
+
+ /**
+ * Test load400 requirement.
+ */
+ @Test
+ public void testLoad400Req() {
+ for(int i = 0; i < 400; i++) {
+ testToCreateANode(ElementTypes.CLASS);
+ }
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/load/Load500RequirementTest.java b/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/load/Load500RequirementTest.java
new file mode 100755
index 0000000..0d7d518
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/load/Load500RequirementTest.java
@@ -0,0 +1,74 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nizar GUEDIDI (CEA LIST) - Initial API and implementation
+ /*****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.test.load;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.sysml.diagram.requirement.provider.ElementTypes;
+import org.eclipse.papyrus.sysml.diagram.requirement.test.IRequirementDiagramTestsConstants;
+import org.eclipse.papyrus.sysml.diagram.requirement.test.canonical.AbstractPapyrusTestCase;
+import org.junit.Ignore;
+import org.junit.Test;
+
+/**
+ * The Class Load500RequirementTest.
+ */
+@Ignore // not executed by Papyrus-Master-Extra-Tests
+public class Load500RequirementTest extends AbstractPapyrusTestCase {
+
+ @Override
+ protected String getProjectName() {
+ return IRequirementDiagramTestsConstants.PROJECT_NAME;
+ }
+
+ @Override
+ protected String getFileName() {
+ return IRequirementDiagramTestsConstants.FILE_NAME;
+ }
+
+ @Override
+ protected String[] getRequiredProfiles() {
+ return IRequirementDiagramTestsConstants.PROFILES;
+ }
+
+ /**
+ * Test to create a node.
+ *
+ * @param type
+ * the type
+ */
+ public void testToCreateANode(IElementType type) {
+ CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getDiagramEditPart().getDiagramPreferencesHint());
+ Command command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull("CREATION: creation command null", command);
+ assertTrue("CREATION: test if the command is created", command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: test if the command can be executed", command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ }
+
+ /**
+ * Test load500 requirement.
+ */
+ @Test
+ public void testLoad500Req() {
+ for(int i = 0; i < 500; i++) {
+ testToCreateANode(ElementTypes.CLASS);
+ }
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/load/LoadTests.java b/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/load/LoadTests.java
new file mode 100755
index 0000000..3696fe4
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/load/LoadTests.java
@@ -0,0 +1,39 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nizar GUEDIDI (CEA LIST) - Initial API and implementation
+ /*****************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.test.load;
+
+import org.junit.Ignore;
+import org.junit.runner.RunWith;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.junit.runners.Suite.SuiteClasses;
+
+/**
+ * All tests together.
+ */
+@Ignore // not executed by Papyrus-Master-Extra-Tests
+@RunWith(ClassificationSuite.class)
+@SuiteClasses({
+// 10 classes
+Load10RequirementTest.class,
+// 100 classes
+Load100RequirementTest.class,
+// 200 classes
+Load200RequirementTest.class,
+// 300 classes
+Load300RequirementTest.class,
+// 400 classes
+Load400RequirementTest.class,
+// 500 classes
+Load500RequirementTest.class, })
+public class LoadTests {
+}
diff --git a/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/.classpath b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/.classpath
new file mode 100755
index 0000000..969b403
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="test"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/.project b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/.project
new file mode 100755
index 0000000..fe35c90
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.sysml.modelexplorer.tests</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/.settings/org.eclipse.jdt.core.prefs b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 0000000..c585cc4
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,291 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/.settings/org.eclipse.jdt.ui.prefs b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/.settings/org.eclipse.jdt.ui.prefs
new file mode 100755
index 0000000..954281d
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,68 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+formatter_profile=_Papyrus
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/META-INF/MANIFEST.MF
new file mode 100755
index 0000000..79fa47e
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,44 @@
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.ui.navigator,
+ org.eclipse.ui.views.properties.tabbed;bundle-version="3.5.200",
+ org.eclipse.ui.ide;bundle-version="3.8.0",
+ org.eclipse.core.expressions;bundle-version="3.4.300",
+ org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.5.0",
+ org.eclipse.papyrus.infra.widgets;bundle-version="[3.0.0,4.0.0)",
+ org.junit;bundle-version="4.10.0",
+ org.eclipse.papyrus.infra.core.log;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.papyrus.infra.core;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.emf.facet.custom.core,
+ org.eclipse.papyrus.junit.framework;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.papyrus.infra.core;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.uml2.uml;bundle-version="5.0.0",
+ org.eclipse.papyrus.uml.tools.utils;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.views.modelexplorer;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.sysml.modelexplorer;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.papyrus.sysml.service.types;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.sysml.diagram.common;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.junit.utils;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.infra.core.sasheditor;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.infra.ui;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.sysml.architecture;bundle-version="1.0.0",
+ org.eclipse.papyrus.sysml.edit;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.gmfdiag.modelexplorer;bundle-version="1.2.0",
+ org.eclipse.papyrus.uml.diagram.modelexplorer;bundle-version="1.2.0",
+ org.eclipse.papyrus.uml.modelexplorer;bundle-version="2.0.0"
+Export-Package: org.eclipse.papyrus.sysml.modelexplorer.tests,
+ org.eclipse.papyrus.sysml.modelexplorer.tests.common,
+ org.eclipse.papyrus.sysml.modelexplorer.tests.copypaste,
+ org.eclipse.papyrus.sysml.modelexplorer.tests.dragdrop,
+ org.eclipse.papyrus.sysml.modelexplorer.tests.suites,
+ org.eclipse.papyrus.sysml.modelexplorer.tests.utils
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 1.2.0.qualifier
+Bundle-Name: %pluginName
+Bundle-Localization: plugin
+Bundle-ManifestVersion: 2
+Bundle-Activator: org.eclipse.papyrus.sysml.modelexplorer.tests.Activator
+Bundle-SymbolicName: org.eclipse.papyrus.sysml.modelexplorer.tests
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/about.html b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/about.html
new file mode 100755
index 0000000..d35d5ae
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/build.properties b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/build.properties
new file mode 100755
index 0000000..7600b77
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/build.properties
@@ -0,0 +1,8 @@
+source.. = test/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.properties,\
+ about.html,\
+ model/
+src.includes = about.html
diff --git a/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/model/Bug435197.di b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/model/Bug435197.di
new file mode 100755
index 0000000..abcec13
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/model/Bug435197.di
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi">
+ <di:SashWindowsMngr>
+ <pageList>
+ <availablePage/>
+ <availablePage/>
+ <availablePage/>
+ <availablePage/>
+ <availablePage/>
+ <availablePage/>
+ <availablePage/>
+ <availablePage/>
+ <availablePage/>
+ <availablePage/>
+ <availablePage/>
+ <availablePage/>
+ <availablePage/>
+ <availablePage/>
+ <availablePage/>
+ <availablePage/>
+ <availablePage/>
+ <availablePage/>
+ <availablePage/>
+ <availablePage/>
+ <availablePage/>
+ <availablePage/>
+ <availablePage/>
+ <availablePage/>
+ <availablePage/>
+ <availablePage/>
+ <availablePage/>
+ <availablePage/>
+ <availablePage/>
+ <availablePage/>
+ <availablePage/>
+ <availablePage/>
+ <availablePage/>
+ <availablePage/>
+ <availablePage/>
+ <availablePage/>
+ <availablePage/>
+ </pageList>
+ <sashModel currentSelection="//@sashModel/@windows.0/@children.0">
+ <windows>
+ <children xsi:type="di:TabFolder"/>
+ </windows>
+ </sashModel>
+ </di:SashWindowsMngr>
+ <architecture:ArchitectureDescription contextId="org.eclipse.papyrus.sysml.architecture.SysML"/>
+ <architecture:ArchitectureDescriptionPreferences>
+ <viewpointIds>org.eclipse.papyrus.sysml.analysis</viewpointIds>
+ <viewpointIds>org.eclipse.papyrus.sysml.design</viewpointIds>
+ </architecture:ArchitectureDescriptionPreferences>
+</xmi:XMI>
+
\ No newline at end of file
diff --git a/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/model/Bug435197.notation b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/model/Bug435197.notation
new file mode 100755
index 0000000..5869028
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/model/Bug435197.notation
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:css="http://www.eclipse.org/papyrus/infra/gmfdiag/css">
+ <css:EmbeddedStyleSheet xmi:id="_oZYSEK6PEeO7JJKOvdwNLQ" label="test" content="xxxx"/>
+ <css:ModelStyleSheets xmi:id="_BkLLwN9SEeOb46XX2JdpvQ"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/model/Bug435197.uml b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/model/Bug435197.uml
new file mode 100755
index 0000000..7c1d80f
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/model/Bug435197.uml
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Blocks="http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks">
+ <uml:Model xmi:id="_c4o7YMPbEeOaYLh7OU4N6w" name="Testv1.0">
+ <packagedElement xmi:type="uml:Class" xmi:id="_nwa50N9REeOb46XX2JdpvQ" name="Block">
+ <ownedAttribute xmi:type="uml:Port" xmi:id="_pJ1j0N9REeOb46XX2JdpvQ" name="port" aggregation="composite"/>
+ </packagedElement>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_c5blkMPbEeOaYLh7OU4N6w">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_c5eo4MPbEeOaYLh7OU4N6w" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_TZ_nULU5EduiKqCzJMWbGw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_c_rXgMPbEeOaYLh7OU4N6w">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_c_r-kMPbEeOaYLh7OU4N6w" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_c_ua0MPbEeOaYLh7OU4N6w">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_c_vB4MPbEeOaYLh7OU4N6w" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_c_vo8MPbEeOaYLh7OU4N6w">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_c_wQAMPbEeOaYLh7OU4N6w" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_c_w3EMPbEeOaYLh7OU4N6w">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_c_w3EcPbEeOaYLh7OU4N6w" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_5WYJ0LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_c_xeIMPbEeOaYLh7OU4N6w">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_c_yFMMPbEeOaYLh7OU4N6w" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//activities"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_C2zXMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_c_ysQMPbEeOaYLh7OU4N6w">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_c_ysQcPbEeOaYLh7OU4N6w" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_c_zTUMPbEeOaYLh7OU4N6w">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_c_z6YMPbEeOaYLh7OU4N6w" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_c_0hcMPbEeOaYLh7OU4N6w">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_c_0hccPbEeOaYLh7OU4N6w" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//interactions"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_meOioLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_c_1IgMPbEeOaYLh7OU4N6w">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_c_1vkMPbEeOaYLh7OU4N6w" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//statemachines"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_nAF5kLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_c_2WoMPbEeOaYLh7OU4N6w">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_c_29sMPbEeOaYLh7OU4N6w" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//usecases"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_neZmMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Blocks:Block xmi:id="_nwiOkN9REeOb46XX2JdpvQ" base_Class="_nwa50N9REeOb46XX2JdpvQ"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/model/ModelWithBDD.di b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/model/ModelWithBDD.di
new file mode 100755
index 0000000..ce0a01b
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/model/ModelWithBDD.di
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="ASCII"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi">
+ <di:SashWindowsMngr>
+ <pageList>
+ <availablePage>
+ <emfPageIdentifier href="ModelWithBDD.notation#_LXISYJdgEeCIWccnqNjPug"/>
+ </availablePage>
+ <availablePage>
+ <emfPageIdentifier href="ModelWithBDD.notation#_D85CYKWDEeG49_vdcs7Y7g"/>
+ </availablePage>
+ <availablePage>
+ <emfPageIdentifier href="ModelWithBDD.notation#_flho4LnoEeG1Fot6xcIh4g"/>
+ </availablePage>
+ </pageList>
+ <sashModel currentSelection="//@sashModel/@windows.0/@children.0">
+ <windows>
+ <children xsi:type="di:TabFolder">
+ <children>
+ <emfPageIdentifier href="ModelWithBDD.notation#_LXISYJdgEeCIWccnqNjPug"/>
+ </children>
+ <children>
+ <emfPageIdentifier href="ModelWithBDD.notation#_D85CYKWDEeG49_vdcs7Y7g"/>
+ </children>
+ <children>
+ <emfPageIdentifier href="ModelWithBDD.notation#_flho4LnoEeG1Fot6xcIh4g"/>
+ </children>
+ </children>
+ </windows>
+ </sashModel>
+ </di:SashWindowsMngr>
+ <architecture:ArchitectureDescription contextId="org.eclipse.papyrus.sysml.architecture.SysML"/>
+ <architecture:ArchitectureDescriptionPreferences>
+ <viewpointIds>org.eclipse.papyrus.sysml.analysis</viewpointIds>
+ <viewpointIds>org.eclipse.papyrus.sysml.design</viewpointIds>
+ </architecture:ArchitectureDescriptionPreferences>
+</xmi:XMI>
+
\ No newline at end of file
diff --git a/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/model/ModelWithBDD.notation b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/model/ModelWithBDD.notation
new file mode 100755
index 0000000..0198bc5
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/model/ModelWithBDD.notation
@@ -0,0 +1,323 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML">
+ <notation:Diagram xmi:id="_LXISYJdgEeCIWccnqNjPug" type="BlockDefinition" name="BDD_Main" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_EAXk4HRGEeGbA9TcuN7qCA" type="shape_sysml_block_as_classifier" fontName="Segoe UI" lineColor="0">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_EAdEcHRGEeGbA9TcuN7qCA" source="ShadowFigure">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_EAdEcXRGEeGbA9TcuN7qCA" key="ShadowFigure_Value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_EAdEcnRGEeGbA9TcuN7qCA" source="displayNameLabelIcon">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_EAdrgHRGEeGbA9TcuN7qCA" key="displayNameLabelIcon_value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_EAdrgXRGEeGbA9TcuN7qCA" source="QualifiedName">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_EAdrgnRGEeGbA9TcuN7qCA" key="QualifiedNameDepth" value="1000"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_EAYzAHRGEeGbA9TcuN7qCA" type="label_sysml_block_name"/>
+ <children xmi:type="notation:ListCompartment" xmi:id="_EAZaEHRGEeGbA9TcuN7qCA" type="compartment_sysml_property_as_list" showTitle="true">
+ <children xmi:type="notation:Node" xmi:id="_Qr9GsHRGEeGbA9TcuN7qCA" type="shape_sysml_part_as_label">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_Qr9GsXRGEeGbA9TcuN7qCA" fontName="Segoe UI" fillColor="0" lineColor="0"/>
+ <element xmi:type="uml:Property" href="ModelWithBDD.uml#_OsGu0HRGEeGbA9TcuN7qCA"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_Qr9GsnRGEeGbA9TcuN7qCA"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_VwR8MHRGEeGbA9TcuN7qCA" type="shape_sysml_part_as_label">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_VwR8MXRGEeGbA9TcuN7qCA" fontName="Segoe UI" fillColor="0" lineColor="0"/>
+ <element xmi:type="uml:Property" href="ModelWithBDD.uml#_UirgoHRGEeGbA9TcuN7qCA"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_VwR8MnRGEeGbA9TcuN7qCA"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_UVVwppqEEeGgRvetq2P46A" type="shape_sysml_reference_as_label">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_UVVwp5qEEeGgRvetq2P46A" fontName="Segoe UI" fillColor="0" lineColor="0"/>
+ <element xmi:type="uml:Property" href="ModelWithBDD.uml#_R5uCwJqEEeGgRvetq2P46A"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_UVVwqJqEEeGgRvetq2P46A"/>
+ </children>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_EAZaEXRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_EAZaEnRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_EAZaE3RGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_EAZaFHRGEeGbA9TcuN7qCA"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_EAZaFXRGEeGbA9TcuN7qCA" visible="false" type="compartment_sysml_part_as_list" showTitle="true">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_EAZaFnRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_EAZaF3RGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_EAZaGHRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_EAZaGXRGEeGbA9TcuN7qCA"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_EAaBIHRGEeGbA9TcuN7qCA" visible="false" type="compartment_sysml_reference_as_list" showTitle="true">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_EAaBIXRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_EAaBInRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_EAaBI3RGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_EAaBJHRGEeGbA9TcuN7qCA"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_EAaBJXRGEeGbA9TcuN7qCA" visible="false" type="compartment_uml_port_as_list" showTitle="true">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_EAaBJnRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_EAaBJ3RGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_EAaBKHRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_EAaBKXRGEeGbA9TcuN7qCA"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_EAaBKnRGEeGbA9TcuN7qCA" visible="false" type="compartment_sysml_flowport_as_list" showTitle="true">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_EAaBK3RGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_EAaBLHRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_EAaBLXRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_EAaBLnRGEeGbA9TcuN7qCA"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_EAaoMHRGEeGbA9TcuN7qCA" type="compartment_uml_operation_as_list" showTitle="true">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_EAaoMXRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_EAaoMnRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_EAaoM3RGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_EAaoNHRGEeGbA9TcuN7qCA"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_EAaoNXRGEeGbA9TcuN7qCA" type="compartment_sysml_constraint_as_list" showTitle="true">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_EAaoNnRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_EAaoN3RGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_EAaoOHRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_EAaoOXRGEeGbA9TcuN7qCA"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_EAaoOnRGEeGbA9TcuN7qCA" visible="false" type="compartment_sysml_value_as_list" showTitle="true">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_EAaoO3RGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_EAaoPHRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_EAaoPXRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_EAaoPnRGEeGbA9TcuN7qCA"/>
+ </children>
+ <element xmi:type="uml:Class" href="ModelWithBDD.uml#__OVZQHRFEeGbA9TcuN7qCA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_EAXk4XRGEeGbA9TcuN7qCA" x="160" y="90" width="100" height="150"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_EApRsHRGEeGbA9TcuN7qCA" type="shape_sysml_block_as_classifier" fontName="Segoe UI" lineColor="0">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_EAsVAHRGEeGbA9TcuN7qCA" source="ShadowFigure">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_EAsVAXRGEeGbA9TcuN7qCA" key="ShadowFigure_Value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_EAsVAnRGEeGbA9TcuN7qCA" source="displayNameLabelIcon">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_EAsVA3RGEeGbA9TcuN7qCA" key="displayNameLabelIcon_value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_EAsVBHRGEeGbA9TcuN7qCA" source="QualifiedName">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_EAsVBXRGEeGbA9TcuN7qCA" key="QualifiedNameDepth" value="1000"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_EApRsnRGEeGbA9TcuN7qCA" type="label_sysml_block_name"/>
+ <children xmi:type="notation:ListCompartment" xmi:id="_EApRs3RGEeGbA9TcuN7qCA" type="compartment_sysml_property_as_list" showTitle="true">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_EApRtHRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_EApRtXRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_EApRtnRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_EApRt3RGEeGbA9TcuN7qCA"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_EApRuHRGEeGbA9TcuN7qCA" visible="false" type="compartment_sysml_part_as_list" showTitle="true">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_EApRuXRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_EApRunRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_EApRu3RGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_EApRvHRGEeGbA9TcuN7qCA"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_EAp4wHRGEeGbA9TcuN7qCA" visible="false" type="compartment_sysml_reference_as_list" showTitle="true">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_EAp4wXRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_EAp4wnRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_EAp4w3RGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_EAp4xHRGEeGbA9TcuN7qCA"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_EAqf0HRGEeGbA9TcuN7qCA" visible="false" type="compartment_uml_port_as_list" showTitle="true">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_EAqf0XRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_EAqf0nRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_EAqf03RGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_EAqf1HRGEeGbA9TcuN7qCA"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_EArG4HRGEeGbA9TcuN7qCA" visible="false" type="compartment_sysml_flowport_as_list" showTitle="true">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_EArG4XRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_EArG4nRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_EArG43RGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_EArG5HRGEeGbA9TcuN7qCA"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_EArG5XRGEeGbA9TcuN7qCA" type="compartment_uml_operation_as_list" showTitle="true">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_EArG5nRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_EArG53RGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_EArG6HRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_EArG6XRGEeGbA9TcuN7qCA"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_EArG6nRGEeGbA9TcuN7qCA" type="compartment_sysml_constraint_as_list" showTitle="true">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_EArG63RGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_EArG7HRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_EArG7XRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_EArG7nRGEeGbA9TcuN7qCA"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_EArt8HRGEeGbA9TcuN7qCA" visible="false" type="compartment_sysml_value_as_list" showTitle="true">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_EArt8XRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_EArt8nRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_EArt83RGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_EArt9HRGEeGbA9TcuN7qCA"/>
+ </children>
+ <element xmi:type="uml:Class" href="ModelWithBDD.uml#_CqW0MHRGEeGbA9TcuN7qCA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_EApRsXRGEeGbA9TcuN7qCA" x="320" y="90" width="100" height="150"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_E9mCIHRGEeGbA9TcuN7qCA" type="2007" fontName="Segoe UI" lineColor="0">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_E9mpMHRGEeGbA9TcuN7qCA" source="ShadowFigure">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_E9mpMXRGEeGbA9TcuN7qCA" key="ShadowFigure_Value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_E9mpMnRGEeGbA9TcuN7qCA" source="displayNameLabelIcon">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_E9mpM3RGEeGbA9TcuN7qCA" key="displayNameLabelIcon_value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_E9mpNHRGEeGbA9TcuN7qCA" source="QualifiedName">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_E9nQQHRGEeGbA9TcuN7qCA" key="QualifiedNameDepth" value="1000"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_E9nQQXRGEeGbA9TcuN7qCA" type="5026"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_E9nQQnRGEeGbA9TcuN7qCA" type="7016">
+ <children xmi:type="notation:Shape" xmi:id="_Id45EHRGEeGbA9TcuN7qCA" type="shape_sysml_block_as_classifier" fontName="Segoe UI" lineColor="0">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_Id7VUHRGEeGbA9TcuN7qCA" source="ShadowFigure">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_Id7VUXRGEeGbA9TcuN7qCA" key="ShadowFigure_Value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_Id78YHRGEeGbA9TcuN7qCA" source="displayNameLabelIcon">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_Id78YXRGEeGbA9TcuN7qCA" key="displayNameLabelIcon_value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_Id78YnRGEeGbA9TcuN7qCA" source="QualifiedName">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_Id78Y3RGEeGbA9TcuN7qCA" key="QualifiedNameDepth" value="1000"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_Id5gIHRGEeGbA9TcuN7qCA" type="label_sysml_block_name"/>
+ <children xmi:type="notation:ListCompartment" xmi:id="_Id5gIXRGEeGbA9TcuN7qCA" type="compartment_sysml_property_as_list" showTitle="true">
+ <children xmi:type="notation:Node" xmi:id="_bSg1sHRGEeGbA9TcuN7qCA" type="shape_sysml_part_as_label">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_bSg1sXRGEeGbA9TcuN7qCA" fontName="Segoe UI" fillColor="0" lineColor="0"/>
+ <element xmi:type="uml:Property" href="ModelWithBDD.uml#_aSF6gHRGEeGbA9TcuN7qCA"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_bSg1snRGEeGbA9TcuN7qCA"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_dcrnMHRGEeGbA9TcuN7qCA" type="shape_sysml_part_as_label">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_dcrnMXRGEeGbA9TcuN7qCA" fontName="Segoe UI" fillColor="0" lineColor="0"/>
+ <element xmi:type="uml:Property" href="ModelWithBDD.uml#_b7tjsHRGEeGbA9TcuN7qCA"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_dcrnMnRGEeGbA9TcuN7qCA"/>
+ </children>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_Id5gInRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_Id5gI3RGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_Id5gJHRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_Id5gJXRGEeGbA9TcuN7qCA"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_Id5gJnRGEeGbA9TcuN7qCA" visible="false" type="compartment_sysml_part_as_list" showTitle="true">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_Id5gJ3RGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_Id5gKHRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_Id5gKXRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_Id5gKnRGEeGbA9TcuN7qCA"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_Id6HMHRGEeGbA9TcuN7qCA" visible="false" type="compartment_sysml_reference_as_list" showTitle="true">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_Id6HMXRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_Id6HMnRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_Id6HM3RGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_Id6HNHRGEeGbA9TcuN7qCA"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_Id6HNXRGEeGbA9TcuN7qCA" visible="false" type="compartment_uml_port_as_list" showTitle="true">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_Id6HNnRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_Id6HN3RGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_Id6HOHRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_Id6HOXRGEeGbA9TcuN7qCA"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_Id6HOnRGEeGbA9TcuN7qCA" visible="false" type="compartment_sysml_flowport_as_list" showTitle="true">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_Id6HO3RGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_Id6HPHRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_Id6HPXRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_Id6HPnRGEeGbA9TcuN7qCA"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_Id6uQHRGEeGbA9TcuN7qCA" type="compartment_uml_operation_as_list" showTitle="true">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_Id6uQXRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_Id6uQnRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_Id6uQ3RGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_Id6uRHRGEeGbA9TcuN7qCA"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_Id6uRXRGEeGbA9TcuN7qCA" type="compartment_sysml_constraint_as_list" showTitle="true">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_Id6uRnRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_Id6uR3RGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_Id6uSHRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_Id6uSXRGEeGbA9TcuN7qCA"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_Id6uSnRGEeGbA9TcuN7qCA" visible="false" type="compartment_sysml_value_as_list" showTitle="true">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_Id6uS3RGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_Id6uTHRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_Id6uTXRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_Id6uTnRGEeGbA9TcuN7qCA"/>
+ </children>
+ <element xmi:type="uml:Class" href="ModelWithBDD.uml#_Idw9QHRGEeGbA9TcuN7qCA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Id45EXRGEeGbA9TcuN7qCA" x="80" y="28" width="161" height="171"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_K5agUHRGEeGbA9TcuN7qCA" type="shape_sysml_block_as_classifier" fontName="Segoe UI" lineColor="0">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_K5djoHRGEeGbA9TcuN7qCA" source="ShadowFigure">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_K5djoXRGEeGbA9TcuN7qCA" key="ShadowFigure_Value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_K5djonRGEeGbA9TcuN7qCA" source="displayNameLabelIcon">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_K5djo3RGEeGbA9TcuN7qCA" key="displayNameLabelIcon_value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_K5djpHRGEeGbA9TcuN7qCA" source="QualifiedName">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_K5djpXRGEeGbA9TcuN7qCA" key="QualifiedNameDepth" value="1000"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_K5agUnRGEeGbA9TcuN7qCA" type="label_sysml_block_name"/>
+ <children xmi:type="notation:ListCompartment" xmi:id="_K5agU3RGEeGbA9TcuN7qCA" type="compartment_sysml_property_as_list" showTitle="true">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_K5agVHRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_K5agVXRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_K5agVnRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_K5agV3RGEeGbA9TcuN7qCA"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_K5agWHRGEeGbA9TcuN7qCA" visible="false" type="compartment_sysml_part_as_list" showTitle="true">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_K5agWXRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_K5agWnRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_K5agW3RGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_K5agXHRGEeGbA9TcuN7qCA"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_K5agXXRGEeGbA9TcuN7qCA" visible="false" type="compartment_sysml_reference_as_list" showTitle="true">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_K5agXnRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_K5agX3RGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_K5agYHRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_K5agYXRGEeGbA9TcuN7qCA"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_K5agYnRGEeGbA9TcuN7qCA" visible="false" type="compartment_uml_port_as_list" showTitle="true">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_K5agY3RGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_K5agZHRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_K5agZXRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_K5agZnRGEeGbA9TcuN7qCA"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_K5agZ3RGEeGbA9TcuN7qCA" visible="false" type="compartment_sysml_flowport_as_list" showTitle="true">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_K5agaHRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_K5agaXRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_K5aganRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_K5aga3RGEeGbA9TcuN7qCA"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_K5agbHRGEeGbA9TcuN7qCA" type="compartment_uml_operation_as_list" showTitle="true">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_K5agbXRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_K5agbnRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_K5agb3RGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_K5agcHRGEeGbA9TcuN7qCA"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_K5agcXRGEeGbA9TcuN7qCA" type="compartment_sysml_constraint_as_list" showTitle="true">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_K5agcnRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_K5agc3RGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_K5agdHRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_K5agdXRGEeGbA9TcuN7qCA"/>
+ </children>
+ <children xmi:type="notation:ListCompartment" xmi:id="_K5agdnRGEeGbA9TcuN7qCA" visible="false" type="compartment_sysml_value_as_list" showTitle="true">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_K5agd3RGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_K5ageHRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_K5ageXRGEeGbA9TcuN7qCA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_K5agenRGEeGbA9TcuN7qCA"/>
+ </children>
+ <element xmi:type="uml:Class" href="ModelWithBDD.uml#_K5RWYHRGEeGbA9TcuN7qCA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_K5agUXRGEeGbA9TcuN7qCA" x="335" y="34" width="100" height="150"/>
+ </children>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_E9nQQ3RGEeGbA9TcuN7qCA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_E9nQRHRGEeGbA9TcuN7qCA"/>
+ </children>
+ <element xmi:type="uml:Package" href="ModelWithBDD.uml#_E8hEEHRGEeGbA9TcuN7qCA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_E9mCIXRGEeGbA9TcuN7qCA" x="470" y="45" width="606" height="251"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_LXISYZdgEeCIWccnqNjPug"/>
+ <element xmi:type="uml:Model" href="ModelWithBDD.uml#_UV0P8EAREeCMpNWxgNcrog"/>
+ </notation:Diagram>
+ <notation:Diagram xmi:id="_D85CYKWDEeG49_vdcs7Y7g" type="InternalBlock" name="IBD_B1" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_D85CYaWDEeG49_vdcs7Y7g" type="shape_sysml_block_as_composite" fontName="Segoe UI" lineColor="0">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_D85CYqWDEeG49_vdcs7Y7g" source="ShadowFigure">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_D85CY6WDEeG49_vdcs7Y7g" key="ShadowFigure_Value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_D85CZKWDEeG49_vdcs7Y7g" source="displayNameLabelIcon">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_D85CZaWDEeG49_vdcs7Y7g" key="displayNameLabelIcon_value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_D85CZqWDEeG49_vdcs7Y7g" source="QualifiedName">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_D85CZ6WDEeG49_vdcs7Y7g" key="QualifiedNameDepth" value="1000"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_D85CaKWDEeG49_vdcs7Y7g" type="label_sysml_block_name"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_D85CaaWDEeG49_vdcs7Y7g" type="compartment_sysml_structure">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_D85CaqWDEeG49_vdcs7Y7g"/>
+ </children>
+ <element xmi:type="uml:Class" href="ModelWithBDD.uml#__OVZQHRFEeGbA9TcuN7qCA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_D85Ca6WDEeG49_vdcs7Y7g" x="40" y="40" width="721" height="481"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_D85CbKWDEeG49_vdcs7Y7g"/>
+ <element xmi:type="uml:Class" href="ModelWithBDD.uml#__OVZQHRFEeGbA9TcuN7qCA"/>
+ </notation:Diagram>
+ <notation:Diagram xmi:id="_flho4LnoEeG1Fot6xcIh4g" type="PapyrusUMLClassDiagram" name="ClassDiagram" measurementUnit="Pixel">
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_flho4bnoEeG1Fot6xcIh4g"/>
+ <element xmi:type="uml:Model" href="ModelWithBDD.uml#_UV0P8EAREeCMpNWxgNcrog"/>
+ </notation:Diagram>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/model/ModelWithBDD.uml b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/model/ModelWithBDD.uml
new file mode 100755
index 0000000..47081a2
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/model/ModelWithBDD.uml
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Blocks="http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks">
+ <uml:Model xmi:id="_UV0P8EAREeCMpNWxgNcrog" name="model">
+ <packagedElement xmi:type="uml:Class" xmi:id="__OVZQHRFEeGbA9TcuN7qCA" name="B1">
+ <ownedAttribute xmi:id="_OsGu0HRGEeGbA9TcuN7qCA" name="pB2" type="_CqW0MHRGEeGbA9TcuN7qCA" aggregation="composite" association="_QqfHEHRGEeGbA9TcuN7qCA">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_QqcDwHRGEeGbA9TcuN7qCA" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_Qqcq0HRGEeGbA9TcuN7qCA" value="1"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_UirgoHRGEeGbA9TcuN7qCA" name="pB1P1" type="_Idw9QHRGEeGbA9TcuN7qCA" aggregation="composite" association="_VwHkIXRGEeGbA9TcuN7qCA">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_VwG9EHRGEeGbA9TcuN7qCA" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_VwHkIHRGEeGbA9TcuN7qCA" value="1"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_R5uCwJqEEeGgRvetq2P46A" name="rB2" type="_CqW0MHRGEeGbA9TcuN7qCA" association="_UVVwopqEEeGgRvetq2P46A">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_UVVwoJqEEeGgRvetq2P46A" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_UVVwoZqEEeGgRvetq2P46A" value="1"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_CqW0MHRGEeGbA9TcuN7qCA" name="B2"/>
+ <packagedElement xmi:type="uml:Package" xmi:id="_E8hEEHRGEeGbA9TcuN7qCA" name="P1">
+ <packagedElement xmi:type="uml:Class" xmi:id="_Idw9QHRGEeGbA9TcuN7qCA" name="B1P1">
+ <ownedAttribute xmi:id="_aSF6gHRGEeGbA9TcuN7qCA" name="pB1" type="__OVZQHRFEeGbA9TcuN7qCA" aggregation="composite" association="_bSZg8HRGEeGbA9TcuN7qCA">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_bSYS0HRGEeGbA9TcuN7qCA" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_bSY54HRGEeGbA9TcuN7qCA" value="1"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_b7tjsHRGEeGbA9TcuN7qCA" name="pB2P1" type="_K5RWYHRGEeGbA9TcuN7qCA" aggregation="composite" association="_dclgkHRGEeGbA9TcuN7qCA">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_dckScHRGEeGbA9TcuN7qCA" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_dck5gHRGEeGbA9TcuN7qCA" value="1"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_K5RWYHRGEeGbA9TcuN7qCA" name="B2P1"/>
+ <packagedElement xmi:type="uml:Association" xmi:id="_bSZg8HRGEeGbA9TcuN7qCA" name="Association1" memberEnd="_aSF6gHRGEeGbA9TcuN7qCA _bSZg83RGEeGbA9TcuN7qCA">
+ <eAnnotations xmi:id="_bSZg8XRGEeGbA9TcuN7qCA" source="org.eclipse.papyrus">
+ <details xmi:id="_bSZg8nRGEeGbA9TcuN7qCA" key="nature" value="SysML_Nature"/>
+ </eAnnotations>
+ <ownedEnd xmi:id="_bSZg83RGEeGbA9TcuN7qCA" name="" type="_Idw9QHRGEeGbA9TcuN7qCA" association="_bSZg8HRGEeGbA9TcuN7qCA"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="_dclgkHRGEeGbA9TcuN7qCA" name="Association2" memberEnd="_b7tjsHRGEeGbA9TcuN7qCA _dclgk3RGEeGbA9TcuN7qCA">
+ <eAnnotations xmi:id="_dclgkXRGEeGbA9TcuN7qCA" source="org.eclipse.papyrus">
+ <details xmi:id="_dclgknRGEeGbA9TcuN7qCA" key="nature" value="SysML_Nature"/>
+ </eAnnotations>
+ <ownedEnd xmi:id="_dclgk3RGEeGbA9TcuN7qCA" name="" type="_Idw9QHRGEeGbA9TcuN7qCA" association="_dclgkHRGEeGbA9TcuN7qCA"/>
+ </packagedElement>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="_QqfHEHRGEeGbA9TcuN7qCA" name="Association1" memberEnd="_OsGu0HRGEeGbA9TcuN7qCA _QqfHE3RGEeGbA9TcuN7qCA">
+ <eAnnotations xmi:id="_QqfHEXRGEeGbA9TcuN7qCA" source="org.eclipse.papyrus">
+ <details xmi:id="_QqfHEnRGEeGbA9TcuN7qCA" key="nature" value="SysML_Nature"/>
+ </eAnnotations>
+ <ownedEnd xmi:id="_QqfHE3RGEeGbA9TcuN7qCA" name="" type="__OVZQHRFEeGbA9TcuN7qCA" association="_QqfHEHRGEeGbA9TcuN7qCA"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="_VwHkIXRGEeGbA9TcuN7qCA" name="Association2" memberEnd="_UirgoHRGEeGbA9TcuN7qCA _VwILMnRGEeGbA9TcuN7qCA">
+ <eAnnotations xmi:id="_VwILMHRGEeGbA9TcuN7qCA" source="org.eclipse.papyrus">
+ <details xmi:id="_VwILMXRGEeGbA9TcuN7qCA" key="nature" value="SysML_Nature"/>
+ </eAnnotations>
+ <ownedEnd xmi:id="_VwILMnRGEeGbA9TcuN7qCA" name="" type="__OVZQHRFEeGbA9TcuN7qCA" association="_VwHkIXRGEeGbA9TcuN7qCA"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="_UVVwopqEEeGgRvetq2P46A" name="Association3" memberEnd="_R5uCwJqEEeGgRvetq2P46A _UVVwpZqEEeGgRvetq2P46A">
+ <eAnnotations xmi:id="_UVVwo5qEEeGgRvetq2P46A" source="org.eclipse.papyrus">
+ <details xmi:id="_UVVwpJqEEeGgRvetq2P46A" key="nature" value="SysML_Nature"/>
+ </eAnnotations>
+ <ownedEnd xmi:id="_UVVwpZqEEeGgRvetq2P46A" name="" type="__OVZQHRFEeGbA9TcuN7qCA" association="_UVVwopqEEeGgRvetq2P46A"/>
+ </packagedElement>
+ <profileApplication xmi:id="_sT65AJdfEeCIWccnqNjPug">
+ <eAnnotations xmi:id="_sUNz8JdfEeCIWccnqNjPug" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#/"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://SysML_PROFILES/SysML.profile.uml#_TZ_nULU5EduiKqCzJMWbGw"/>
+ </profileApplication>
+ <profileApplication xmi:id="_sUNz8ZdfEeCIWccnqNjPug">
+ <eAnnotations xmi:id="_sUNz8pdfEeCIWccnqNjPug" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:id="_sUNz85dfEeCIWccnqNjPug">
+ <eAnnotations xmi:id="_sUNz9JdfEeCIWccnqNjPug" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:id="_sUNz9ZdfEeCIWccnqNjPug">
+ <eAnnotations xmi:id="_sUNz9pdfEeCIWccnqNjPug" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:id="_sUNz95dfEeCIWccnqNjPug">
+ <eAnnotations xmi:id="_sUNz-JdfEeCIWccnqNjPug" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://SysML_PROFILES/SysML.profile.uml#_5WYJ0LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:id="_sUNz-ZdfEeCIWccnqNjPug">
+ <eAnnotations xmi:id="_sUNz-pdfEeCIWccnqNjPug" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//activities"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://SysML_PROFILES/SysML.profile.uml#_C2zXMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:id="_sUNz-5dfEeCIWccnqNjPug">
+ <eAnnotations xmi:id="_sUNz_JdfEeCIWccnqNjPug" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://SysML_PROFILES/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:id="_sUNz_ZdfEeCIWccnqNjPug">
+ <eAnnotations xmi:id="_sUNz_pdfEeCIWccnqNjPug" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:id="_sUNz_5dfEeCIWccnqNjPug">
+ <eAnnotations xmi:id="_sUN0AJdfEeCIWccnqNjPug" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//interactions"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://SysML_PROFILES/SysML.profile.uml#_meOioLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:id="_sUN0AZdfEeCIWccnqNjPug">
+ <eAnnotations xmi:id="_sUN0ApdfEeCIWccnqNjPug" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//statemachines"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://SysML_PROFILES/SysML.profile.uml#_nAF5kLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:id="_sUN0A5dfEeCIWccnqNjPug">
+ <eAnnotations xmi:id="_sUN0BJdfEeCIWccnqNjPug" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//usecases"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://SysML_PROFILES/SysML.profile.uml#_neZmMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Blocks:Block xmi:id="__SrtwHRFEeGbA9TcuN7qCA" base_Class="__OVZQHRFEeGbA9TcuN7qCA"/>
+ <Blocks:Block xmi:id="_CqaekHRGEeGbA9TcuN7qCA" base_Class="_CqW0MHRGEeGbA9TcuN7qCA"/>
+ <Blocks:Block xmi:id="_IdzZgHRGEeGbA9TcuN7qCA" base_Class="_Idw9QHRGEeGbA9TcuN7qCA"/>
+ <Blocks:Block xmi:id="_K5UZsHRGEeGbA9TcuN7qCA" base_Class="_K5RWYHRGEeGbA9TcuN7qCA"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/model/SysMLModelExplorerCopyPasteTestModel.di b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/model/SysMLModelExplorerCopyPasteTestModel.di
new file mode 100755
index 0000000..715509f
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/model/SysMLModelExplorerCopyPasteTestModel.di
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="ASCII"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi">
+ <di:SashWindowsMngr>
+ <pageList>
+ <availablePage>
+ <emfPageIdentifier href="SysMLModelExplorerCopyPasteTestModel.notation#_TmNkwHpOEeGpML05YPbTgg"/>
+ </availablePage>
+ <availablePage>
+ <emfPageIdentifier href="SysMLModelExplorerCopyPasteTestModel.notation#_skVUkHphEeGr6LTFg6LEhg"/>
+ </availablePage>
+ <availablePage>
+ <emfPageIdentifier href="SysMLModelExplorerCopyPasteTestModel.notation#_ByR8IH2bEeGYcfVa7z8CyQ"/>
+ </availablePage>
+ <availablePage>
+ <emfPageIdentifier href="SysMLModelExplorerCopyPasteTestModel.notation#_4Yzc4KW-EeGN-cBhs2fFJg"/>
+ </availablePage>
+ </pageList>
+ <sashModel currentSelection="//@sashModel/@windows.0/@children.0">
+ <windows>
+ <children xsi:type="di:TabFolder">
+ <children>
+ <emfPageIdentifier href="SysMLModelExplorerCopyPasteTestModel.notation#_TmNkwHpOEeGpML05YPbTgg"/>
+ </children>
+ <children>
+ <emfPageIdentifier href="SysMLModelExplorerCopyPasteTestModel.notation#_skVUkHphEeGr6LTFg6LEhg"/>
+ </children>
+ <children>
+ <emfPageIdentifier href="SysMLModelExplorerCopyPasteTestModel.notation#_ByR8IH2bEeGYcfVa7z8CyQ"/>
+ </children>
+ <children>
+ <emfPageIdentifier href="SysMLModelExplorerCopyPasteTestModel.notation#_4Yzc4KW-EeGN-cBhs2fFJg"/>
+ </children>
+ </children>
+ </windows>
+ </sashModel>
+ </di:SashWindowsMngr>
+ <architecture:ArchitectureDescription contextId="org.eclipse.papyrus.sysml.architecture.SysML"/>
+ <architecture:ArchitectureDescriptionPreferences>
+ <viewpointIds>org.eclipse.papyrus.sysml.analysis</viewpointIds>
+ <viewpointIds>org.eclipse.papyrus.sysml.design</viewpointIds>
+ </architecture:ArchitectureDescriptionPreferences>
+</xmi:XMI>
+
\ No newline at end of file
diff --git a/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/model/SysMLModelExplorerCopyPasteTestModel.notation b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/model/SysMLModelExplorerCopyPasteTestModel.notation
new file mode 100755
index 0000000..5483df3
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/model/SysMLModelExplorerCopyPasteTestModel.notation
@@ -0,0 +1,254 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML">
+ <notation:Diagram xmi:id="_TmNkwHpOEeGpML05YPbTgg" type="PapyrusUMLClassDiagram" name="Main" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_xYbnoHpfEeGr6LTFg6LEhg" type="2005" fontName="Segoe UI" fillColor="15053796" gradient="16777215, 16777215, 0" lineColor="0">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_xYeq8HpfEeGr6LTFg6LEhg" source="ShadowFigure">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_xYeq8XpfEeGr6LTFg6LEhg" key="ShadowFigure_Value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_xYhuQHpfEeGr6LTFg6LEhg" source="displayNameLabelIcon">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_xYhuQXpfEeGr6LTFg6LEhg" key="displayNameLabelIcon_value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_xYhuQnpfEeGr6LTFg6LEhg" source="QualifiedName">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_xYhuQ3pfEeGr6LTFg6LEhg" key="QualifiedNameDepth" value="1000"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_zuW9MHpfEeGr6LTFg6LEhg" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_hCGc8HpgEeGr6LTFg6LEhg" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_hCGc8XpgEeGr6LTFg6LEhg" key="StereotypeList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_hCGc8npgEeGr6LTFg6LEhg" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_hCGc83pgEeGr6LTFg6LEhg" key="PropStereoDisplay" value="ModelExplorerTest::TestModel.sourceModel"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_hCGc9HpgEeGr6LTFg6LEhg" key="StereotypePropertyLocation" value="Compartment"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_xYhuRHpfEeGr6LTFg6LEhg" type="5020"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_xYhuRXpfEeGr6LTFg6LEhg" type="7009">
+ <children xmi:type="notation:Shape" xmi:id="_lM1_EHpgEeGr6LTFg6LEhg" type="3009" fontName="Segoe UI" fillColor="12621752" gradient="16777215, 16777215, 0" lineColor="0">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_lM1_EnpgEeGr6LTFg6LEhg" source="ShadowFigure">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_lM1_E3pgEeGr6LTFg6LEhg" key="ShadowFigure_Value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_lM5CYHpgEeGr6LTFg6LEhg" source="displayNameLabelIcon">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_lM5CYXpgEeGr6LTFg6LEhg" key="displayNameLabelIcon_value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_lM5CYnpgEeGr6LTFg6LEhg" source="QualifiedName">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_lM5CY3pgEeGr6LTFg6LEhg" key="QualifiedNameDepth" value="1000"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_pig-0HpgEeGr6LTFg6LEhg" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_VJbwYHphEeGr6LTFg6LEhg" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_VJbwYXphEeGr6LTFg6LEhg" key="StereotypeList" value="ModelExplorerTest::ElementTypeRulesCopyPasteTest"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_VJbwYnphEeGr6LTFg6LEhg" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_VJbwY3phEeGr6LTFg6LEhg" key="PropStereoDisplay" value="ModelExplorerTest::ElementTypeRulesCopyPasteTest.elementType,ModelExplorerTest::ElementTypeRulesCopyPasteTest.preCopyInitialization,ModelExplorerTest::ElementTypeRulesCopyPasteTest.postCopyRule"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_VJbwZHphEeGr6LTFg6LEhg" key="StereotypePropertyLocation" value="Compartment"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_lM5CZHpgEeGr6LTFg6LEhg" type="5017"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_lM5CZXpgEeGr6LTFg6LEhg" type="7010">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_lM5CZnpgEeGr6LTFg6LEhg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_lM5CZ3pgEeGr6LTFg6LEhg"/>
+ </children>
+ <element xmi:type="uml:Package" href="SysMLModelExplorerCopyPasteTestModel.uml#_lLOOcHpgEeGr6LTFg6LEhg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_lM1_EXpgEeGr6LTFg6LEhg" x="15" y="7" width="575" height="229"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_Eh9ZAH2cEeGYcfVa7z8CyQ" type="3009" fontName="Segoe UI" lineColor="0">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_Eh9ZAn2cEeGYcfVa7z8CyQ" source="ShadowFigure">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_Eh9ZA32cEeGYcfVa7z8CyQ" key="ShadowFigure_Value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_Eh9ZBH2cEeGYcfVa7z8CyQ" source="displayNameLabelIcon">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_Eh9ZBX2cEeGYcfVa7z8CyQ" key="displayNameLabelIcon_value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_Eh9ZBn2cEeGYcfVa7z8CyQ" source="QualifiedName">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_Eh9ZB32cEeGYcfVa7z8CyQ" key="QualifiedNameDepth" value="1000"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_Eh9ZCH2cEeGYcfVa7z8CyQ" type="5017"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_Eh9ZCX2cEeGYcfVa7z8CyQ" type="7010">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_Eh9ZCn2cEeGYcfVa7z8CyQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Eh9ZC32cEeGYcfVa7z8CyQ"/>
+ </children>
+ <element xmi:type="uml:Package" href="SysMLModelExplorerCopyPasteTestModel.uml#_v-7hMH2YEeGYcfVa7z8CyQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Eh9ZAX2cEeGYcfVa7z8CyQ" x="15" y="262"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_1r7m8KW-EeGN-cBhs2fFJg" type="3009" fontName="Segoe UI" lineColor="0">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_1r7m8qW-EeGN-cBhs2fFJg" source="ShadowFigure">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_1r7m86W-EeGN-cBhs2fFJg" key="ShadowFigure_Value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_1r7m9KW-EeGN-cBhs2fFJg" source="displayNameLabelIcon">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_1r7m9aW-EeGN-cBhs2fFJg" key="displayNameLabelIcon_value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_1r7m9qW-EeGN-cBhs2fFJg" source="QualifiedName">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_1r7m96W-EeGN-cBhs2fFJg" key="QualifiedNameDepth" value="1000"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_1r7m-KW-EeGN-cBhs2fFJg" type="5017"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_1r7m-aW-EeGN-cBhs2fFJg" type="7010">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_1r7m-qW-EeGN-cBhs2fFJg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_1r7m-6W-EeGN-cBhs2fFJg"/>
+ </children>
+ <element xmi:type="uml:Package" href="SysMLModelExplorerCopyPasteTestModel.uml#_sX-qQJqEEeGgRvetq2P46A"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_1r7m8aW-EeGN-cBhs2fFJg" x="413" y="299"/>
+ </children>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_xYhuRnpfEeGr6LTFg6LEhg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_xYhuR3pfEeGr6LTFg6LEhg"/>
+ </children>
+ <element xmi:type="uml:Model" href="SysMLModelExplorerCopyPasteTestModel.uml#_Tj4CcHpOEeGpML05YPbTgg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_xYbnoXpfEeGr6LTFg6LEhg" x="5" y="10" width="762" height="562"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_TmNkwXpOEeGpML05YPbTgg"/>
+ <element xmi:type="uml:Model" href="SysMLModelExplorerCopyPasteTestModel.uml#_Tj4CcHpOEeGpML05YPbTgg"/>
+ </notation:Diagram>
+ <notation:Diagram xmi:id="_skVUkHphEeGr6LTFg6LEhg" type="PapyrusUMLClassDiagram" name="SysML_Part_MainDiagram" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_tT-BwHphEeGr6LTFg6LEhg" type="2008" fontName="Segoe UI" fillColor="12560536" gradient="16777215, 16777215, 0" lineColor="0">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_tT-BwnphEeGr6LTFg6LEhg" source="ShadowFigure">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_tT-Bw3phEeGr6LTFg6LEhg" key="ShadowFigure_Value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_tT-BxHphEeGr6LTFg6LEhg" source="displayNameLabelIcon">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_tT-BxXphEeGr6LTFg6LEhg" key="displayNameLabelIcon_value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_tUBFEHphEeGr6LTFg6LEhg" source="QualifiedName">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_tUBFEXphEeGr6LTFg6LEhg" key="QualifiedNameDepth" value="1000"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_z6gQ4HphEeGr6LTFg6LEhg" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_z6gQ4XphEeGr6LTFg6LEhg" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_z6gQ4nphEeGr6LTFg6LEhg" key="StereotypeList" value="ModelExplorerTest::SourceTargetRulesCopyPasteTest"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_z6gQ43phEeGr6LTFg6LEhg" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_z6gQ5HphEeGr6LTFg6LEhg" key="PropStereoDisplay" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_z6gQ5XphEeGr6LTFg6LEhg" key="StereotypePropertyLocation" value="Compartment"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_tUBFEnphEeGr6LTFg6LEhg" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_tUBFE3phEeGr6LTFg6LEhg" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_tUBFFHphEeGr6LTFg6LEhg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_tUBFFXphEeGr6LTFg6LEhg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_tUBFFnphEeGr6LTFg6LEhg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_tUBFF3phEeGr6LTFg6LEhg"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_tUBFGHphEeGr6LTFg6LEhg" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_tUBFGXphEeGr6LTFg6LEhg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_tUBFGnphEeGr6LTFg6LEhg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_tUBFG3phEeGr6LTFg6LEhg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_tUBFHHphEeGr6LTFg6LEhg"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_tUBFHXphEeGr6LTFg6LEhg" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_tUBFHnphEeGr6LTFg6LEhg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_tUBFH3phEeGr6LTFg6LEhg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_tUBFIHphEeGr6LTFg6LEhg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_tUBFIXphEeGr6LTFg6LEhg"/>
+ </children>
+ <element xmi:type="uml:Class" href="SysMLModelExplorerCopyPasteTestModel.uml#_tT030HphEeGr6LTFg6LEhg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_tT-BwXphEeGr6LTFg6LEhg" x="50" y="45" width="241" height="221"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_skVUkXphEeGr6LTFg6LEhg"/>
+ <element xmi:type="uml:Package" href="SysMLModelExplorerCopyPasteTestModel.uml#_lLOOcHpgEeGr6LTFg6LEhg"/>
+ </notation:Diagram>
+ <notation:Diagram xmi:id="_ByR8IH2bEeGYcfVa7z8CyQ" type="PapyrusUMLClassDiagram" name="SysML_Block" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_COZ3cH2bEeGYcfVa7z8CyQ" type="2008" fontName="Segoe UI" lineColor="0">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_COZ3cn2bEeGYcfVa7z8CyQ" source="ShadowFigure">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_COZ3c32bEeGYcfVa7z8CyQ" key="ShadowFigure_Value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_COZ3dH2bEeGYcfVa7z8CyQ" source="displayNameLabelIcon">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_COZ3dX2bEeGYcfVa7z8CyQ" key="displayNameLabelIcon_value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_COZ3dn2bEeGYcfVa7z8CyQ" source="QualifiedName">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_COZ3d32bEeGYcfVa7z8CyQ" key="QualifiedNameDepth" value="1000"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_H-xTkH2bEeGYcfVa7z8CyQ" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_9f2PoIMWEeGU2YHAOvJrlg" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_9f2PoYMWEeGU2YHAOvJrlg" key="StereotypeList" value="ModelExplorerTest::SourceTargetRulesCopyPasteTest,ModelExplorerTest::SourceTargetRulesCopyPasteTest,ModelExplorerTest::SourceTargetRulesCopyPasteTest,ModelExplorerTest::SourceTargetRulesCopyPasteTest,ModelExplorerTest::SourceTargetRulesCopyPasteTest,ModelExplorerTest::SourceTargetRulesCopyPasteTest,ModelExplorerTest::SourceTargetRulesCopyPasteTest,ModelExplorerTest::SourceTargetRulesCopyPasteTest"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_9f2PooMWEeGU2YHAOvJrlg" key="PropStereoDisplay" value="ModelExplorerTest::SourceTargetRulesCopyPasteTest.targets,ModelExplorerTest::SourceTargetRulesCopyPasteTest.feature,ModelExplorerTest::SourceTargetRulesCopyPasteTest.preCopyInitialization,ModelExplorerTest::SourceTargetRulesCopyPasteTest.postCopyRule,ModelExplorerTest::SourceTargetRulesCopyPasteTest.postUndoRule,ModelExplorerTest::SourceTargetRulesCopyPasteTest.postRedoRule,ModelExplorerTest::SourceTargetRulesCopyPasteTest.isCopyRuleValidInRedo,ModelExplorerTest::SourceTargetRulesCopyPasteTest.canCopy,ModelExplorerTest::SourceTargetRulesCopyPasteTest.sourceElement,ModelExplorerTest::SourceTargetRulesCopyPasteTest.additionalElementsQuantity"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_9f2Po4MWEeGU2YHAOvJrlg" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_9f2PpIMWEeGU2YHAOvJrlg" key="StereotypePropertyLocation" value="Compartment"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_COZ3eH2bEeGYcfVa7z8CyQ" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_COZ3eX2bEeGYcfVa7z8CyQ" visible="false" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_COZ3en2bEeGYcfVa7z8CyQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_COZ3e32bEeGYcfVa7z8CyQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_COZ3fH2bEeGYcfVa7z8CyQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_COZ3fX2bEeGYcfVa7z8CyQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_COZ3fn2bEeGYcfVa7z8CyQ" visible="false" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_COZ3f32bEeGYcfVa7z8CyQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_COZ3gH2bEeGYcfVa7z8CyQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_COZ3gX2bEeGYcfVa7z8CyQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_COZ3gn2bEeGYcfVa7z8CyQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_COZ3g32bEeGYcfVa7z8CyQ" visible="false" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_COZ3hH2bEeGYcfVa7z8CyQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_COZ3hX2bEeGYcfVa7z8CyQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_COZ3hn2bEeGYcfVa7z8CyQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_COZ3h32bEeGYcfVa7z8CyQ"/>
+ </children>
+ <element xmi:type="uml:Class" href="SysMLModelExplorerCopyPasteTestModel.uml#_ReSXcH2aEeGYcfVa7z8CyQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_COZ3cX2bEeGYcfVa7z8CyQ" x="50" y="80" width="291" height="336"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_COjBYH2bEeGYcfVa7z8CyQ" type="2008" fontName="Segoe UI" lineColor="0">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_COjBYn2bEeGYcfVa7z8CyQ" source="ShadowFigure">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_COjBY32bEeGYcfVa7z8CyQ" key="ShadowFigure_Value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_COjBZH2bEeGYcfVa7z8CyQ" source="displayNameLabelIcon">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_COjBZX2bEeGYcfVa7z8CyQ" key="displayNameLabelIcon_value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_COjBZn2bEeGYcfVa7z8CyQ" source="QualifiedName">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_COjBZ32bEeGYcfVa7z8CyQ" key="QualifiedNameDepth" value="1000"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_J0Jg0H2bEeGYcfVa7z8CyQ" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_8w1NgIMWEeGU2YHAOvJrlg" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_8w1NgYMWEeGU2YHAOvJrlg" key="StereotypeList" value="ModelExplorerTest::SourceTargetRulesCopyPasteTest"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_8w1NgoMWEeGU2YHAOvJrlg" key="PropStereoDisplay" value="ModelExplorerTest::SourceTargetRulesCopyPasteTest.sourceElement,ModelExplorerTest::SourceTargetRulesCopyPasteTest.targets,ModelExplorerTest::SourceTargetRulesCopyPasteTest.feature,ModelExplorerTest::SourceTargetRulesCopyPasteTest.preCopyInitialization,ModelExplorerTest::SourceTargetRulesCopyPasteTest.postCopyRule,ModelExplorerTest::SourceTargetRulesCopyPasteTest.postUndoRule,ModelExplorerTest::SourceTargetRulesCopyPasteTest.postRedoRule,ModelExplorerTest::SourceTargetRulesCopyPasteTest.isCopyRuleValidInRedo,ModelExplorerTest::SourceTargetRulesCopyPasteTest.canCopy,ModelExplorerTest::SourceTargetRulesCopyPasteTest.additionalElementsQuantity"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_8w1Ng4MWEeGU2YHAOvJrlg" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_8w1NhIMWEeGU2YHAOvJrlg" key="StereotypePropertyLocation" value="Compartment"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_COsyYH2bEeGYcfVa7z8CyQ" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_COsyYX2bEeGYcfVa7z8CyQ" visible="false" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_COsyYn2bEeGYcfVa7z8CyQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_COsyY32bEeGYcfVa7z8CyQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_COsyZH2bEeGYcfVa7z8CyQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_COsyZX2bEeGYcfVa7z8CyQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_COsyZn2bEeGYcfVa7z8CyQ" visible="false" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_COsyZ32bEeGYcfVa7z8CyQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_COsyaH2bEeGYcfVa7z8CyQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_COsyaX2bEeGYcfVa7z8CyQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_COsyan2bEeGYcfVa7z8CyQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_COsya32bEeGYcfVa7z8CyQ" visible="false" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_COsybH2bEeGYcfVa7z8CyQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_COsybX2bEeGYcfVa7z8CyQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_COsybn2bEeGYcfVa7z8CyQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_COsyb32bEeGYcfVa7z8CyQ"/>
+ </children>
+ <element xmi:type="uml:Class" href="SysMLModelExplorerCopyPasteTestModel.uml#_wpG0sH2aEeGYcfVa7z8CyQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_COjBYX2bEeGYcfVa7z8CyQ" x="365" y="80" width="271" height="336"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_ByR8IX2bEeGYcfVa7z8CyQ"/>
+ <element xmi:type="uml:Package" href="SysMLModelExplorerCopyPasteTestModel.uml#_v-7hMH2YEeGYcfVa7z8CyQ"/>
+ </notation:Diagram>
+ <notation:Diagram xmi:id="_4Yzc4KW-EeGN-cBhs2fFJg" type="PapyrusUMLClassDiagram" name="SysML_Reference_MainDiagram" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_5TkcAKW-EeGN-cBhs2fFJg" type="2008" fontName="Segoe UI" lineColor="0">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_5TuNAKW-EeGN-cBhs2fFJg" source="ShadowFigure">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_5TuNAaW-EeGN-cBhs2fFJg" key="ShadowFigure_Value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_5TuNAqW-EeGN-cBhs2fFJg" source="displayNameLabelIcon">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_5TuNA6W-EeGN-cBhs2fFJg" key="displayNameLabelIcon_value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_5TuNBKW-EeGN-cBhs2fFJg" source="QualifiedName">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_5TuNBaW-EeGN-cBhs2fFJg" key="QualifiedNameDepth" value="1000"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_5TuNBqW-EeGN-cBhs2fFJg" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_5TuNB6W-EeGN-cBhs2fFJg" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_5TuNCKW-EeGN-cBhs2fFJg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_5TuNCaW-EeGN-cBhs2fFJg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_5TuNCqW-EeGN-cBhs2fFJg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_5TuNC6W-EeGN-cBhs2fFJg"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_5TuNDKW-EeGN-cBhs2fFJg" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_5TuNDaW-EeGN-cBhs2fFJg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_5TuNDqW-EeGN-cBhs2fFJg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_5TuND6W-EeGN-cBhs2fFJg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_5TuNEKW-EeGN-cBhs2fFJg"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_5TuNEaW-EeGN-cBhs2fFJg" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_5TuNEqW-EeGN-cBhs2fFJg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_5TuNE6W-EeGN-cBhs2fFJg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_5TuNFKW-EeGN-cBhs2fFJg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_5TuNFaW-EeGN-cBhs2fFJg"/>
+ </children>
+ <element xmi:type="uml:Class" href="SysMLModelExplorerCopyPasteTestModel.uml#_sX-qQZqEEeGgRvetq2P46A"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_5TkcAaW-EeGN-cBhs2fFJg" x="139" y="94"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_4Yzc4aW-EeGN-cBhs2fFJg"/>
+ <element xmi:type="uml:Package" href="SysMLModelExplorerCopyPasteTestModel.uml#_sX-qQJqEEeGgRvetq2P46A"/>
+ </notation:Diagram>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/model/SysMLModelExplorerCopyPasteTestModel.uml b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/model/SysMLModelExplorerCopyPasteTestModel.uml
new file mode 100755
index 0000000..512b55b
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/model/SysMLModelExplorerCopyPasteTestModel.uml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ModelExplorerTest="http:///schemas/ModelExplorerTest/_JwNf8IMVEeGdYK4JhU1dXg/3" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xsi:schemaLocation="http:///schemas/ModelExplorerTest/_JwNf8IMVEeGdYK4JhU1dXg/3 pathmap://TEST_PROFILES/modelExplorerTest.profile.uml#_JwTmkIMVEeGdYK4JhU1dXg">
+ <uml:Model xmi:id="_Tj4CcHpOEeGpML05YPbTgg" name="Model">
+ <packageImport xmi:id="_Tj4CcXpOEeGpML05YPbTgg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packageImport xmi:id="_nz8ZoHpfEeGr6LTFg6LEhg">
+ <importedPackage xmi:type="uml:Model" href="ModelWithBDD.uml#_UV0P8EAREeCMpNWxgNcrog"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Package" xmi:id="_sX-qQJqEEeGgRvetq2P46A" name="Reference">
+ <packagedElement xmi:type="uml:Class" xmi:id="_sX-qQZqEEeGgRvetq2P46A" name="SimpleReference"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="_lLOOcHpgEeGr6LTFg6LEhg" name="Part">
+ <packagedElement xmi:type="uml:Class" xmi:id="_tT030HphEeGr6LTFg6LEhg" name="SimplePart"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="_v-7hMH2YEeGYcfVa7z8CyQ" name="Block">
+ <packagedElement xmi:type="uml:Class" xmi:id="_ReSXcH2aEeGYcfVa7z8CyQ" name="SimpleBlock"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_wpG0sH2aEeGYcfVa7z8CyQ" name="SimpleBlock2"/>
+ </packagedElement>
+ <profileApplication xmi:id="_e41f0HpfEeGr6LTFg6LEhg">
+ <eAnnotations xmi:id="_e5gOMHpfEeGr6LTFg6LEhg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="pathmap://TEST_PROFILES/modelExplorerTest.profile.uml#_JwTmkIMVEeGdYK4JhU1dXg"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://TEST_PROFILES/modelExplorerTest.profile.uml#_bA2ZgHnOEeGYn78b4G1s-Q"/>
+ </profileApplication>
+ </uml:Model>
+ <ModelExplorerTest:TestModel xmi:id="_hYbuwHpfEeGr6LTFg6LEhg" base_Model="_Tj4CcHpOEeGpML05YPbTgg">
+ <sourceModel href="ModelWithBDD.uml#_UV0P8EAREeCMpNWxgNcrog"/>
+ </ModelExplorerTest:TestModel>
+ <ModelExplorerTest:ElementTypeRulesCopyPasteTest xmi:id="_pia4MHpgEeGr6LTFg6LEhg" base_Package="_lLOOcHpgEeGr6LTFg6LEhg" elementType="org.eclipse.papyrus.sysml.PartProperty" postCopyRule="Association newAssociation = ((Property)newValues.get(0)).getAssociation(); Assert.assertNotNull("New Part should have an association", newAssociation);"/>
+ <ModelExplorerTest:SourceTargetRulesCopyPasteTest xmi:id="_z6XG8HphEeGr6LTFg6LEhg" base_Class="_tT030HphEeGr6LTFg6LEhg" feature="attribute">
+ <sourceElement xmi:type="uml:Property" href="ModelWithBDD.uml#_OsGu0HRGEeGbA9TcuN7qCA"/>
+ <targets xmi:type="uml:Class" href="ModelWithBDD.uml#__OVZQHRFEeGbA9TcuN7qCA"/>
+ <targets xmi:type="uml:Class" href="ModelWithBDD.uml#_CqW0MHRGEeGbA9TcuN7qCA"/>
+ <targets xmi:type="uml:Class" href="ModelWithBDD.uml#_Idw9QHRGEeGbA9TcuN7qCA"/>
+ <targets xmi:type="uml:Class" href="ModelWithBDD.uml#_K5RWYHRGEeGbA9TcuN7qCA"/>
+ </ModelExplorerTest:SourceTargetRulesCopyPasteTest>
+ <ModelExplorerTest:ElementTypeRulesCopyPasteTest xmi:id="_wKFoUH2YEeGYcfVa7z8CyQ" base_Package="_v-7hMH2YEeGYcfVa7z8CyQ" elementType="org.eclipse.papyrus.sysml.Block" preCopyInitialization="List<Property> originalParts = new ArrayList<Property>(); for(Property p : ((org.eclipse.uml2.uml.Class)copiedEObject).getAllAttributes()) { 	if(new org.eclipse.papyrus.sysml.service.types.matcher.PartPropertyMatcher().matches(p)) {originalParts.add(p);}} additionalChecks.put("originalParts", originalParts);" postCopyRule=" FilteredCollectionView<EObject> newClasses = new FilteredCollectionView<EObject>(delta, new IFilter() { /** * {@inheritDoc} */ public boolean isAllowed(Object object) { return object instanceof org.eclipse.uml2.uml.Class && !(object instanceof org.eclipse.uml2.uml.Association); } }); Assert.assertEquals("New values should contain a Class", 1, newClasses.size()); org.eclipse.uml2.uml.Class newBlock = newClasses.toArray(new org.eclipse.uml2.uml.Class[]{})[0]; Assert.assertNotNull("Block stereotype should be applied", ((org.eclipse.uml2.uml.Class) newBlock) .getAppliedStereotype("SysML::Blocks::Block")); List<Property> originalParts = (List<Property>) originalModel .get("originalParts"); List<Property> newParts = new ArrayList<Property>(); for (Property p : ((org.eclipse.uml2.uml.Class) newBlock) .getAllAttributes()) { if (new org.eclipse.papyrus.sysml.service.types.matcher.PartPropertyMatcher().matches(p)) { newParts.add(p); Assert.assertNotNull( "Part should have an associated association.", p.getAssociation()); } } Assert.assertEquals( "Both original and new list of attributes should be quivalent for the blocks", originalParts.size(), newParts.size());"/>
+ <ModelExplorerTest:SourceTargetRulesCopyPasteTest xmi:id="_Rel5f32aEeGYcfVa7z8CyQ" base_Class="_ReSXcH2aEeGYcfVa7z8CyQ" feature="ownedElement" additionalElementsQuantity="4">
+ <sourceElement xmi:type="uml:Class" href="ModelWithBDD.uml#__OVZQHRFEeGbA9TcuN7qCA"/>
+ <targets xmi:type="uml:Package" href="ModelWithBDD.uml#_E8hEEHRGEeGbA9TcuN7qCA"/>
+ <targets xmi:type="uml:Model" href="ModelWithBDD.uml#_UV0P8EAREeCMpNWxgNcrog"/>
+ </ModelExplorerTest:SourceTargetRulesCopyPasteTest>
+ <ModelExplorerTest:SourceTargetRulesCopyPasteTest xmi:id="_wpZIkH2aEeGYcfVa7z8CyQ" base_Class="_wpG0sH2aEeGYcfVa7z8CyQ" feature="ownedElement" additionalElementsQuantity="3">
+ <sourceElement xmi:type="uml:Class" href="ModelWithBDD.uml#_Idw9QHRGEeGbA9TcuN7qCA"/>
+ <targets xmi:type="uml:Package" href="ModelWithBDD.uml#_E8hEEHRGEeGbA9TcuN7qCA"/>
+ <targets xmi:type="uml:Model" href="ModelWithBDD.uml#_UV0P8EAREeCMpNWxgNcrog"/>
+ </ModelExplorerTest:SourceTargetRulesCopyPasteTest>
+ <ModelExplorerTest:ElementTypeRulesCopyPasteTest xmi:id="_sYIbYJqEEeGgRvetq2P46A" base_Package="_sX-qQJqEEeGgRvetq2P46A" elementType="org.eclipse.papyrus.sysml.PartProperty" postCopyRule="Association newAssociation = ((Property)newValues.get(0)).getAssociation(); Assert.assertNotNull("New Reference should have an association", newAssociation);"/>
+ <ModelExplorerTest:SourceTargetRulesCopyPasteTest xmi:id="_sYIbYZqEEeGgRvetq2P46A" base_Class="_sX-qQZqEEeGgRvetq2P46A" feature="attribute">
+ <sourceElement xmi:type="uml:Property" href="ModelWithBDD.uml#_R5uCwJqEEeGgRvetq2P46A"/>
+ <targets xmi:type="uml:Class" href="ModelWithBDD.uml#__OVZQHRFEeGbA9TcuN7qCA"/>
+ <targets xmi:type="uml:Class" href="ModelWithBDD.uml#_CqW0MHRGEeGbA9TcuN7qCA"/>
+ <targets xmi:type="uml:Class" href="ModelWithBDD.uml#_Idw9QHRGEeGbA9TcuN7qCA"/>
+ <targets xmi:type="uml:Class" href="ModelWithBDD.uml#_K5RWYHRGEeGbA9TcuN7qCA"/>
+ </ModelExplorerTest:SourceTargetRulesCopyPasteTest>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/plugin.properties b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/plugin.properties
new file mode 100755
index 0000000..9fc137e
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/plugin.properties
@@ -0,0 +1,14 @@
+#################################################################################
+# Copyright (c) 2011 CEA LIST.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#
+# CEA LIST - Initial API and Implementation.
+#
+##################################################################################
+pluginName=Papyrus SysML Model Explorer Tests
+providerName=Eclipse Modeling Project
diff --git a/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/pom.xml b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/pom.xml
new file mode 100755
index 0000000..77508d3
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/pom.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.papyrus.sysml</groupId>
+ <artifactId>org.eclipse.papyrus.sysml.test</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.papyrus.sysml.modelexplorer.tests</artifactId>
+ <packaging>eclipse-test-plugin</packaging>
+</project>
diff --git a/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/test/org/eclipse/papyrus/sysml/modelexplorer/tests/Activator.java b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/test/org/eclipse/papyrus/sysml/modelexplorer/tests/Activator.java
new file mode 100755
index 0000000..369954f
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/test/org/eclipse/papyrus/sysml/modelexplorer/tests/Activator.java
@@ -0,0 +1,71 @@
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Benoit Maggi (CEA LIST) benoit.maggi@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelexplorer.tests;
+
+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.sysml.modelexplorer.tests"; //$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)
+ */
+ @Override
+ public void start(final 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)
+ */
+ @Override
+ public void stop(final BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/test/org/eclipse/papyrus/sysml/modelexplorer/tests/common/AbstractModelExplorerTest.java b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/test/org/eclipse/papyrus/sysml/modelexplorer/tests/common/AbstractModelExplorerTest.java
new file mode 100755
index 0000000..e07b76c
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/test/org/eclipse/papyrus/sysml/modelexplorer/tests/common/AbstractModelExplorerTest.java
@@ -0,0 +1,488 @@
+/*****************************************************************************
+ * Copyright (c) 2011, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelexplorer.tests.common;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.transaction.RunnableWithResult;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.custom.Customization;
+import org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EObjectTreeElement;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.core.resource.additional.AdditionalResourcesModel;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.HouseKeeper;
+import org.eclipse.papyrus.sysml.modelexplorer.tests.Activator;
+import org.eclipse.papyrus.sysml.modelexplorer.tests.utils.EditorUtils;
+import org.eclipse.papyrus.views.modelexplorer.ModelExplorerPageBookView;
+import org.eclipse.papyrus.views.modelexplorer.ModelExplorerView;
+import org.eclipse.papyrus.views.modelexplorer.NavigatorUtils;
+import org.eclipse.papyrus.views.modelexplorer.matching.IMatchingItem;
+import org.eclipse.papyrus.views.modelexplorer.matching.LinkItemMatchingItem;
+import org.eclipse.papyrus.views.modelexplorer.matching.ModelElementItemMatchingItem;
+import org.eclipse.papyrus.views.modelexplorer.matching.ReferencableMatchingItem;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IViewPart;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.navigator.CommonViewer;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.NamedElement;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.ClassRule;
+
+
+
+/**
+ * Abstract class for Copy/paste
+ */
+public abstract class AbstractModelExplorerTest extends AbstractPapyrusTest {
+
+ @ClassRule
+ public static final HouseKeeper.Static houseKeeper = new HouseKeeper.Static();
+
+ /** main papyrus editor */
+ public static IEditorPart editor = null;
+
+ /** view part: the model explorer */
+ protected static IViewPart modelExplorerPart;
+
+ /** generated selectable objects */
+ protected static org.eclipse.uml2.uml.Model model_EObject;
+
+ protected static org.eclipse.uml2.uml.Class b1_EObject;
+
+ protected static org.eclipse.uml2.uml.Property pB1P1_B1_EObject;
+
+ protected static org.eclipse.uml2.uml.Property rB2_B1_EObject;
+
+ protected static org.eclipse.uml2.uml.Property pB2_B1_EObject;
+
+ protected static org.eclipse.uml2.uml.Class b2_EObject;
+
+ protected static org.eclipse.uml2.uml.Package p1_EObject;
+
+ protected static org.eclipse.uml2.uml.Class b2P1_P1_EObject;
+
+ protected static org.eclipse.uml2.uml.Class b1P1_P1_EObject;
+
+ protected static org.eclipse.uml2.uml.Property pB1_B1P1_P1_EObject;
+
+ protected static org.eclipse.uml2.uml.Property pB2P1_B1P1_P1_EObject;
+
+ protected static Diagram iBD_B1_Diagram;
+
+ protected static Diagram bDD_Main_Diagram;
+
+ /** end of generated selectable objects */
+
+ /**
+ * Initialization of the test
+ *
+ * @throws Exception
+ * thrown when initialization has problem
+ */
+ @BeforeClass
+ public static void openPapyrusWithAnEmptyProject() throws Exception {
+ // Prepare new project for tests
+ IProject testProject = houseKeeper.createProject("TestCopyPasteProject");
+
+ // Copy EmptyModel from bundle to the test project
+ final IFile emptyModel_di = testProject.getFile("ModelWithBDD.di");
+ IFile emptyModel_no = testProject.getFile("ModelWithBDD.notation");
+ IFile emptyModel_uml = testProject.getFile("ModelWithBDD.uml");
+
+ // isInitialized = isInitialized || emptyModel_di.exists();
+
+ emptyModel_di.create(Activator.getDefault().getBundle().getResource("/model/ModelWithBDD.di").openStream(), true, new NullProgressMonitor());
+ emptyModel_no.create(Activator.getDefault().getBundle().getResource("/model/ModelWithBDD.notation").openStream(), true, new NullProgressMonitor());
+ emptyModel_uml.create(Activator.getDefault().getBundle().getResource("/model/ModelWithBDD.uml").openStream(), true, new NullProgressMonitor());
+
+ // Open the EmptyModel.di file with Papyrus (assumed to be the default editor for "di" files here).
+ Display.getDefault().syncExec(new Runnable() {
+
+ public void run() {
+ try {
+ IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+ editor = houseKeeper.openPapyrusEditor(emptyModel_di);
+ modelExplorerPart = page.showView(ModelExplorerPageBookView.VIEW_ID);
+ modelExplorerPart.setFocus();
+ } catch (Exception ex) {
+ ex.printStackTrace(System.out);
+ }
+ }
+ });
+
+ Assert.assertNotNull("Model explorer is null", houseKeeper.getField("modelExplorerPart"));
+
+ prepareTest();
+ }
+
+ /**
+ * Prepare the diagram before testing
+ *
+ * @throws Exception
+ * exception thrown in case of problem
+ */
+ public static void prepareTest() throws Exception {
+ DiagramEditPart diagramEditPart = EditorUtils.getDiagramEditPart();
+ EObject root = diagramEditPart.getDiagramView().getElement();
+
+ Assert.assertTrue("Impossible to find main model", root instanceof Model); //$NON-NLS-1$
+
+ /** generated selectable objects */
+ model_EObject = (org.eclipse.uml2.uml.Model)root;
+ b1_EObject = (org.eclipse.uml2.uml.Class)model_EObject.getPackagedElement("B1");
+ Assert.assertNotNull("Impossible to find Class B1", b1_EObject); //$NON-NLS-1$
+ pB1P1_B1_EObject = b1_EObject.getAttribute("pB1P1", null);
+ Assert.assertNotNull("Impossible to find Property pB1P1", pB1P1_B1_EObject); //$NON-NLS-1$
+ rB2_B1_EObject = b1_EObject.getAttribute("rB2", null);
+ Assert.assertNotNull("Impossible to find Property rB2", rB2_B1_EObject); //$NON-NLS-1$
+ pB2_B1_EObject = b1_EObject.getAttribute("pB2", null);
+ Assert.assertNotNull("Impossible to find Property pB2", pB2_B1_EObject); //$NON-NLS-1$
+
+ b2_EObject = (org.eclipse.uml2.uml.Class)model_EObject.getPackagedElement("B2");
+ Assert.assertNotNull("Impossible to find Class B2", b2_EObject); //$NON-NLS-1$
+
+ p1_EObject = (org.eclipse.uml2.uml.Package)model_EObject.getPackagedElement("P1");
+ Assert.assertNotNull("Impossible to find Package P1", p1_EObject); //$NON-NLS-1$
+ b2P1_P1_EObject = (org.eclipse.uml2.uml.Class)p1_EObject.getPackagedElement("B2P1");
+ Assert.assertNotNull("Impossible to find Class B2P1", b2P1_P1_EObject); //$NON-NLS-1$
+
+ b1P1_P1_EObject = (org.eclipse.uml2.uml.Class)p1_EObject.getPackagedElement("B1P1");
+ Assert.assertNotNull("Impossible to find Class B1P1", b1P1_P1_EObject); //$NON-NLS-1$
+ pB1_B1P1_P1_EObject = b1P1_P1_EObject.getAttribute("pB1", null);
+ Assert.assertNotNull("Impossible to find Property pB1", pB1_B1P1_P1_EObject); //$NON-NLS-1$
+ pB2P1_B1P1_P1_EObject = b1P1_P1_EObject.getAttribute("pB2P1", null);
+ Assert.assertNotNull("Impossible to find Property pB2P1", pB2P1_B1P1_P1_EObject); //$NON-NLS-1$
+
+
+
+
+
+ iBD_B1_Diagram = getDiagram("IBD_B1");
+ Assert.assertNotNull("Impossible to find IBD_B1", iBD_B1_Diagram); //$NON-NLS-1$
+ bDD_Main_Diagram = getDiagram("BDD_Main");
+ Assert.assertNotNull("Impossible to find BDD_Main", bDD_Main_Diagram); //$NON-NLS-1$
+ List<Customization> appliedCustomizations = org.eclipse.papyrus.views.modelexplorer.Activator.getDefault().getCustomizationManager().getManagedCustomizations();
+ Customization SimpleUML = null;
+ Iterator<?> iter = appliedCustomizations.iterator();
+ while(iter.hasNext()) {
+ Customization custo = (Customization)iter.next();
+ if(custo.getName().equals("SimpleUML")) {
+ SimpleUML = custo;
+ }
+ }
+ Assert.assertNotNull("Custom SimpleUML not found", SimpleUML); //$NON-NLS-1$
+ org.eclipse.papyrus.views.modelexplorer.Activator.getDefault().getCustomizationManager().getManagedCustomizations().add(0, SimpleUML);
+
+
+
+ Assert.assertEquals("bad order of applied Custom", "SimpleUML", appliedCustomizations.get(0).getName()); //$NON-NLS-1$
+
+ /** end of generated selectable objects */
+ }
+
+
+ /**
+ * Selects and reveal the specified element
+ *
+ * @param object
+ * the object to select
+ * @throws Exception
+ * exception thrown in case element could not be selected
+ */
+ public static void selectAndReveal(final EObject object) throws Exception {
+ Display.getDefault().syncExec(new Runnable() {
+
+ public void run() {
+ try {
+ selectAndReveal(Arrays.asList(object));
+ } catch (Exception ex) {
+ ex.printStackTrace(System.out);
+ }
+ }
+ });
+ }
+
+ /**
+ * Selects and reveal the specified list of elements
+ *
+ * @param newElements
+ * the list of objects to select
+ * @throws Exception
+ * exception thrown in case element could not be selected
+ */
+ public static void selectAndReveal(List<EObject> newElements) throws Exception {
+ // Retrieve model explorer
+ ModelExplorerView modelExplorerView = null;
+
+ ModelExplorerPageBookView bookViewPart = (ModelExplorerPageBookView)NavigatorUtils.findViewPart(ModelExplorerPageBookView.VIEW_ID);
+ if(bookViewPart != null) {
+ modelExplorerView = (ModelExplorerView)bookViewPart.getActiveView();
+ }
+
+ // Set selection on new element in the model explorer
+ if((modelExplorerView != null) && (newElements != null)) {
+ List<EObject> semanticElementList = new ArrayList<EObject>();
+ semanticElementList.addAll(newElements);
+ modelExplorerView.revealSemanticElement(semanticElementList);
+ } else {
+ throw new Exception("Impossible to find the model explorer required to select: " + newElements); //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * Returns the current editing domain
+ *
+ * @return
+ * the current editing domain
+ */
+ protected TransactionalEditingDomain getEditingDomain() throws Exception {
+ return (TransactionalEditingDomain)editor.getAdapter(TransactionalEditingDomain.class);
+ }
+
+ /**
+ * Returns <code>true</code> if the current Active editor is dirty.
+ *
+ * @return <code>true</code> if the current Active editor is dirty
+ * @throws Exception
+ * exception thrown in case of problem (NPE, etc.)
+ */
+ protected boolean isEditorDirty() throws Exception {
+ RunnableWithResult<Boolean> runnable;
+ Display.getDefault().syncExec(runnable = new RunnableWithResult.Impl<Boolean>() {
+
+ public void run() {
+ setResult(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor().isDirty());
+ }
+ });
+
+ return runnable.getResult();
+ }
+
+ /**
+ * Selects and reveal the specified element
+ *
+ * @param object
+ * the object to select
+ * @throws Exception
+ * exception thrown in case element could not be selected
+ */
+ public static void selectAndRevealDiagram(final Diagram object) throws Exception {
+ Display.getDefault().syncExec(new Runnable() {
+
+ public void run() {
+ try {
+ selectAndRevealDiagram(Arrays.asList(object));
+ } catch (Exception ex) {
+ ex.printStackTrace(System.out);
+ }
+ }
+ });
+ }
+
+ /**
+ * Selects and reveal the specified list of diagrams
+ *
+ * @param newElements
+ * the list of diagrams to select
+ * @throws Exception
+ * exception thrown in case diagram could not be selected
+ */
+ public static void selectAndRevealDiagram(List<Diagram> newDiagrams) throws Exception {
+ // Retrieve model explorer
+ ModelExplorerView modelExplorerView = null;
+ ModelExplorerPageBookView bookViewPart = (ModelExplorerPageBookView)NavigatorUtils.findViewPart(ModelExplorerPageBookView.VIEW_ID);
+ if(bookViewPart != null) {
+ modelExplorerView = (ModelExplorerView)bookViewPart.getActiveView();
+ }
+ modelExplorerView.getCommonViewer().expandAll();
+ // Set selection on new element in the model explorer
+ if((modelExplorerView != null) && (newDiagrams != null)) {
+ List<Diagram> semanticElementList = new ArrayList<Diagram>();
+ semanticElementList.addAll(newDiagrams);
+ // reveal 'container' of the diagram
+
+ modelExplorerView.revealSemanticElement(semanticElementList);
+ //reveal(semanticElementList, modelExplorerView.getCommonViewer());
+ } else {
+ throw new Exception("Impossible to find the model explorer required to select: " + newDiagrams); //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * Expands the given CommonViewer to reveal the given elements
+ *
+ * @param elementList
+ * The elements to reveal
+ * @param commonViewer
+ * The CommonViewer they are to be revealed in
+ */
+ public static void reveal(final Iterable<Diagram> elementList, final CommonViewer commonViewer) {
+ ArrayList<IMatchingItem> matchingItemsToSelect = new ArrayList<IMatchingItem>();
+ // filter out non EMF objects
+ for(Diagram currentEObject : elementList) {
+ matchingItemsToSelect.add(new ModelElementItemMatchingItem(currentEObject));
+ // the content provider exist?
+ if(commonViewer.getContentProvider() != null) {
+ // retrieve the ancestors to reveal them
+ // and allow the selection of the object
+ ArrayList<EObject> parents = new ArrayList<EObject>();
+ // retrieve context
+ EObject tmp = currentEObject.getElement();
+ while(tmp != null) {
+ parents.add(tmp);
+ tmp = tmp.eContainer();
+ }
+ List<EObject> reverseParents = new ArrayList<EObject>(parents);
+ Collections.reverse(reverseParents);
+ // reveal the resource if necessary
+ Resource r = null;
+ if(!parents.isEmpty()) {
+ r = parents.get(parents.size() - 1).eResource();
+ } else {
+ r = currentEObject.eResource();
+ }
+ if(r != null) {
+ ResourceSet rs = r.getResourceSet();
+ if(rs instanceof ModelSet && AdditionalResourcesModel.isAdditionalResource((ModelSet)rs, r.getURI())) {
+ commonViewer.expandToLevel(new ReferencableMatchingItem(rs), 1);
+ commonViewer.expandToLevel(new ReferencableMatchingItem(r), 1);
+ }
+ }
+ /*
+ * reveal the ancestors tree using expandToLevel on each of them
+ * in the good order. This is a lot faster than going through the whole tree
+ * using getChildren of the ContentProvider since our Viewer uses a Hashtable
+ * to keep track of the revealed elements.
+ *
+ * However we need to use a dedicated MatchingItem to do the matching,
+ * and a specific comparer in our viewer so than the equals of MatchingItem is
+ * used in priority.
+ *
+ * Please refer to MatchingItem for more infos.
+ */
+ EObject previousParent = null;
+ for(EObject parent : reverseParents) {
+ if(parent.eContainingFeature() != null && previousParent != null) {
+ commonViewer.expandToLevel(new LinkItemMatchingItem(previousParent, parent.eContainmentFeature()), 1);
+ }
+ commonViewer.expandToLevel(new ModelElementItemMatchingItem(parent), 1);
+ previousParent = parent;
+ }
+ commonViewer.expandToLevel(new LinkItemMatchingItem(currentEObject.eContainer(), currentEObject.eContainmentFeature()), 1);
+ }
+ }
+ commonViewer.setSelection(new StructuredSelection(matchingItemsToSelect), true);
+ }
+
+ /**
+ * Returns the diagram with the given name
+ *
+ * @param name
+ * the name of the diagram to find
+ * @return the diagram with the given name.
+ * @exception Exception
+ * exception thrown in case of issue, e.g. diagram was not found
+ */
+ protected static Diagram getDiagram(String name) throws Exception {
+ Iterator<EObject> it = EditorUtils.getDiagramEditPart().getDiagramView().eResource().getContents().iterator();
+ while(it.hasNext()) {
+ EObject next = it.next();
+ if(next instanceof Diagram) {
+ if(name.equals(((Diagram)next).getName())) {
+ return (Diagram)next;
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Retrieves the Model Element Item for the given EObject
+ *
+ * @param objectToFind
+ * object represented by the searched item
+ * @return the {@link ModelElementItem} that corresponds to the diagram
+ * @throws Exception
+ * exception thrown in case of issue
+ */
+ protected EObjectTreeElement findSemanticModelElementItem(EObject objectToFind) throws Exception {
+ selectAndReveal(objectToFind);
+ IStructuredSelection selection = (IStructuredSelection)modelExplorerPart.getSite().getSelectionProvider().getSelection();
+ Assert.assertEquals("one and only one object should be selected", 1, selection.size()); //$NON-NLS-1$
+ Object selectedElement = selection.getFirstElement();
+ Assert.assertTrue("selection should be a model item element", selectedElement instanceof EObjectTreeElement); //$NON-NLS-1$
+ Assert.assertTrue("selection should be linked to a EObject", ((EObjectTreeElement)selectedElement).getEObject() instanceof EObject); //$NON-NLS-1$
+ Assert.assertTrue("selection should be linked to the Object: " + objectToFind, ((EObjectTreeElement)selectedElement).getEObject().equals(objectToFind)); //$NON-NLS-1$
+ return (EObjectTreeElement)selectedElement;
+ }
+
+ /**
+ * Retrieves the Model Element Item for the given Diagram
+ *
+ * @param diagramToFind
+ * diagram represented by the searched item
+ * @return the {@link ModelElementItem} that corresponds to the diagram
+ * @throws Exception
+ * exception thrown in case of issue
+ */
+ protected EObjectTreeElement findSemanticModelElementItem(Diagram diagramToFind) throws Exception {
+
+ selectAndRevealDiagram(diagramToFind);
+ IStructuredSelection selection = (IStructuredSelection)modelExplorerPart.getSite().getSelectionProvider().getSelection();
+ Assert.assertEquals("one and only one diagram should be selected", 1, selection.size()); //$NON-NLS-1$
+ Object selectedElement = selection.getFirstElement();
+ Assert.assertTrue("selection should be a model item element", selectedElement instanceof EObjectTreeElement); //$NON-NLS-1$
+ Assert.assertTrue("selection should be linked to a Diagram", ((EObjectTreeElement)selectedElement).getEObject() instanceof Diagram); //$NON-NLS-1$
+ Assert.assertTrue("selection should be linked to the Object: " + diagramToFind, ((EObjectTreeElement)selectedElement).getEObject().equals(diagramToFind)); //$NON-NLS-1$
+ return (EObjectTreeElement)selectedElement;
+ }
+
+ protected String printElement(EObject object) {
+ if(object instanceof Diagram) {
+ return printElement((Diagram)object);
+ } else if(object instanceof NamedElement) {
+ return printElement((NamedElement)object);
+ }
+ return EcoreUtil.getID(object);
+ }
+
+ protected String printElement(NamedElement element) {
+ return element.getName() + " <" + element.eClass().getName() + ">";
+ }
+
+ protected String printElement(Diagram diagram) {
+ return diagram.getName() + " <" + diagram.getType() + ">";
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/test/org/eclipse/papyrus/sysml/modelexplorer/tests/copypaste/AbstractCopyPasteBlockTest.java b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/test/org/eclipse/papyrus/sysml/modelexplorer/tests/copypaste/AbstractCopyPasteBlockTest.java
new file mode 100755
index 0000000..26349cd
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/test/org/eclipse/papyrus/sysml/modelexplorer/tests/copypaste/AbstractCopyPasteBlockTest.java
@@ -0,0 +1,85 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
+ *
+ *
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelexplorer.tests.copypaste;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.infra.core.utils.FilteredCollectionView;
+import org.eclipse.papyrus.infra.core.utils.IFilter;
+import org.eclipse.uml2.uml.Property;
+import org.junit.Assert;
+
+
+/**
+ * Test for Copy / Paste of a Part
+ */
+public abstract class AbstractCopyPasteBlockTest extends AbstractCopyPasteTest {
+
+ /**
+ * {@inheritDoc}
+ *
+ *
+ */
+ @Override
+ protected void initializeTest(Map<Object, Object> additionalChecks, EObject targetContainer, EObject copiedEObject) {
+ super.initializeTest(additionalChecks, targetContainer, copiedEObject);
+
+ /* pre-copy initialization */
+ List<Property> originalParts = new ArrayList<Property>();
+ for(Property p : ((org.eclipse.uml2.uml.Class)copiedEObject).getAllAttributes()) {
+ if(new org.eclipse.papyrus.sysml.service.types.matcher.PartPropertyMatcher().matches(p)) {
+ originalParts.add(p);
+ }
+ }
+ additionalChecks.put("originalParts", originalParts);
+ /* END OF pre-copy initialization */
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ *
+ */
+ @Override
+ protected void postCopyAdditionalChecks(Map<?, ?> originalModel, List<EObject> newValues, List<EObject> delta) throws Exception {
+ super.postCopyAdditionalChecks(originalModel, newValues, delta);
+
+ /* post copy checks */
+ FilteredCollectionView<EObject> newClasses = new FilteredCollectionView<EObject>(delta, new IFilter() {
+
+ /** * {@inheritDoc} */
+ public boolean isAllowed(Object object) {
+ return object instanceof org.eclipse.uml2.uml.Class && !(object instanceof org.eclipse.uml2.uml.Association);
+ }
+ });
+ Assert.assertEquals("New values should contain a Class", 1, newClasses.size()); //$NON-NLS-1$
+ org.eclipse.uml2.uml.Class newBlock = newClasses.toArray(new org.eclipse.uml2.uml.Class[]{})[0];
+ Assert.assertNotNull("Block stereotype should be applied", newBlock.getAppliedStereotype("SysML::Blocks::Block")); //$NON-NLS-1$
+ List<Property> originalParts = (List<Property>)originalModel.get("originalParts");
+ List<Property> newParts = new ArrayList<Property>();
+ for(Property p : newBlock.getAllAttributes()) {
+ if(new org.eclipse.papyrus.sysml.service.types.matcher.PartPropertyMatcher().matches(p)) {
+ newParts.add(p);
+ Assert.assertNotNull("Part should have an associated association.", p.getAssociation());
+ }
+ }
+ Assert.assertEquals("Both original and new list of attributes should be quivalent for the blocks", originalParts.size(), newParts.size()); //$NON-NLS-1$
+ /* END OF post copy checks */
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/test/org/eclipse/papyrus/sysml/modelexplorer/tests/copypaste/AbstractCopyPastePartTest.java b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/test/org/eclipse/papyrus/sysml/modelexplorer/tests/copypaste/AbstractCopyPastePartTest.java
new file mode 100755
index 0000000..6d185d8
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/test/org/eclipse/papyrus/sysml/modelexplorer/tests/copypaste/AbstractCopyPastePartTest.java
@@ -0,0 +1,66 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
+ *
+ * from Part - Model
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelexplorer.tests.copypaste;
+
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.uml2.uml.Association;
+import org.eclipse.uml2.uml.Property;
+import org.junit.Assert;
+
+
+/**
+ * Test for Copy / Paste of a Part
+ */
+public abstract class AbstractCopyPastePartTest extends AbstractCopyPasteTest {
+
+ /**
+ * {@inheritDoc}
+ *
+ */
+ @Override
+ protected void initializeTest(Map<Object, Object> additionalChecks, EObject targetContainer, EObject copiedEObject) {
+ super.initializeTest(additionalChecks, targetContainer, copiedEObject);
+
+ /* pre-copy initialization */
+
+ /* END OF pre-copy initialization */
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ */
+ @Override
+ protected void postCopyAdditionalChecks(Map<?, ?> originalModel, List<EObject> newValues, List<EObject> delta) throws Exception {
+ super.postCopyAdditionalChecks(originalModel, newValues, delta);
+
+ /* post copy checks */
+
+ for(EObject newObject : newValues) {
+ if (newObject instanceof Property){
+ Property property = (Property) newObject;
+ Association newAssociation = property.getAssociation();
+ Assert.assertNotNull("New Part should have an association", newAssociation); //$NON-NLS-1$
+ }
+ }
+ /* END OF post copy checks */
+ }
+
+}
+
+
diff --git a/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/test/org/eclipse/papyrus/sysml/modelexplorer/tests/copypaste/AbstractCopyPasteReferenceTest.java b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/test/org/eclipse/papyrus/sysml/modelexplorer/tests/copypaste/AbstractCopyPasteReferenceTest.java
new file mode 100755
index 0000000..17b6ec3
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/test/org/eclipse/papyrus/sysml/modelexplorer/tests/copypaste/AbstractCopyPasteReferenceTest.java
@@ -0,0 +1,61 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
+ *
+ * from Reference - Model
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelexplorer.tests.copypaste;
+
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.uml2.uml.Association;
+import org.eclipse.uml2.uml.Property;
+import org.junit.Assert;
+
+
+
+/**
+ * Test for Copy / Paste of a Part
+ */
+public abstract class AbstractCopyPasteReferenceTest extends AbstractCopyPasteTest {
+
+ /**
+ * {@inheritDoc}
+ *
+ */
+ @Override
+ protected void initializeTest(Map<Object, Object> additionalChecks, EObject targetContainer, EObject copiedEObject) {
+ super.initializeTest(additionalChecks, targetContainer, copiedEObject);
+
+ /* pre-copy initialization */
+
+ /* END OF pre-copy initialization */
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ */
+ @Override
+ protected void postCopyAdditionalChecks(Map<?, ?> originalModel, List<EObject> newValues, List<EObject> delta) throws Exception {
+ super.postCopyAdditionalChecks(originalModel, newValues, delta);
+
+ /* post copy checks */
+ Association newAssociation = ((Property)newValues.get(0)).getAssociation();
+ Assert.assertNotNull("New Reference should have an association", newAssociation); //$NON-NLS-1$
+ /* END OF post copy checks */
+ }
+
+}
+
+
diff --git a/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/test/org/eclipse/papyrus/sysml/modelexplorer/tests/copypaste/AbstractCopyPasteTest.java b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/test/org/eclipse/papyrus/sysml/modelexplorer/tests/copypaste/AbstractCopyPasteTest.java
new file mode 100755
index 0000000..9595843
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/test/org/eclipse/papyrus/sysml/modelexplorer/tests/copypaste/AbstractCopyPasteTest.java
@@ -0,0 +1,157 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
+ *
+ * from Model
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelexplorer.tests.copypaste;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.papyrus.sysml.modelexplorer.tests.common.AbstractModelExplorerTest;
+import org.eclipse.ui.IWorkbenchCommandConstants;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.commands.ICommandService;
+import org.junit.Assert;
+
+
+/**
+ * Abstract class for Copy/paste
+ */
+public abstract class AbstractCopyPasteTest extends AbstractModelExplorerTest {
+
+ /**
+ * Generic implementation of the test
+ *
+ * @throws Exception
+ * exception thrown when the test has problems
+ */
+ protected void testExecutableCopyPaste(EObject targetContainer, EObject copiedEObject, String featureName, int expectedNumberOfAddedElements) throws Exception {
+ testExecutableCopyPaste(targetContainer, copiedEObject, targetContainer.eClass().getEStructuralFeature(featureName), expectedNumberOfAddedElements);
+ }
+
+ /**
+ * Generic implementation of the test
+ *
+ * @throws Exception
+ * exception thrown when the test has problems
+ */
+ protected void testExecutableCopyPaste(EObject targetContainer, EObject copiedEObject, EStructuralFeature feature, int expectedNumberOfAddedElements) throws Exception {
+ // retrieve elements in the model explorer
+ selectAndReveal(targetContainer);
+
+ List<EObject> originalValues = new ArrayList<EObject>((List<EObject>)targetContainer.eGet(feature));
+
+ Map<Object, Object> originalModel = new HashMap<Object, Object>();
+ initializeTest(originalModel, targetContainer, copiedEObject);
+
+ // try to paste in several places
+ // copy Paste b1EObject
+ ICommandService commandService = (ICommandService)PlatformUI.getWorkbench().getService(ICommandService.class);
+ commandService.refreshElements(IWorkbenchCommandConstants.EDIT_PASTE, null);
+ org.eclipse.core.commands.Command pasteCommand = commandService.getCommand(IWorkbenchCommandConstants.EDIT_PASTE);
+ Assert.assertNotNull("Impossible to find paste command", pasteCommand); //$NON-NLS-1$
+ Assert.assertTrue("command in not enabled", pasteCommand.isEnabled()); //$NON-NLS-1$
+ Assert.assertTrue("command in not defined", pasteCommand.isDefined()); //$NON-NLS-1$
+
+ pasteCommand.executeWithChecks(new ExecutionEvent());
+
+ // check editor state (should be non dirty)
+ Assert.assertTrue("Editor should be dirty after paste command execution", isEditorDirty()); //$NON-NLS-1$
+
+
+ // should retrieve a new Part AND a new association
+ List<EObject> newValues = (List<EObject>)targetContainer.eGet(feature);
+ // compute delta
+ List<EObject> delta = new ArrayList<EObject>();
+ for(EObject o : newValues) {
+ if(!originalValues.contains(o)) {
+ delta.add(o);
+ }
+ }
+
+ // size = original size +1
+ Assert.assertEquals("Wrong number of attributes after paste", expectedNumberOfAddedElements, delta.size()); //$NON-NLS-1$
+
+ // part should be linked to an association
+ postCopyAdditionalChecks(originalModel, newValues, delta);
+
+ // undo
+ if(getEditingDomain().getCommandStack().canUndo()) {
+ getEditingDomain().getCommandStack().undo();
+ } else {
+ throw new Exception("Impossible to undo the paste command: " + pasteCommand); //$NON-NLS-1$
+ }
+ // check editor state (should be non dirty)
+ Assert.assertFalse("Editor should not be dirty after undo", isEditorDirty()); //$NON-NLS-1$
+ // check old values equals the actual values
+ newValues = (List<EObject>)targetContainer.eGet(feature);
+ Assert.assertEquals("Initial and current list feature list should be equivalent", newValues, originalValues); //$NON-NLS-1$
+
+ // redo
+ if(getEditingDomain().getCommandStack().canRedo()) {
+ getEditingDomain().getCommandStack().redo();
+ } else {
+ throw new Exception("Impossible to redo the paste command: " + pasteCommand); //$NON-NLS-1$
+ }
+ // check editor state (should be non dirty)
+ Assert.assertTrue("Editor should not dirty after redo", isEditorDirty()); //$NON-NLS-1$
+
+ // check as it was the result of the paste command
+ newValues = (List<EObject>)targetContainer.eGet(feature);
+ delta = new ArrayList<EObject>();
+ for(EObject o : newValues) {
+ if(!originalValues.contains(o)) {
+ delta.add(o);
+ }
+ }
+
+ // size = original size + delta
+ Assert.assertEquals("Wrong number of attributes after paste", expectedNumberOfAddedElements, delta.size()); //$NON-NLS-1$
+
+ // part should be linked to an association
+ postCopyAdditionalChecks(originalModel, newValues, delta);
+
+ // undo again, to restore state
+ if(getEditingDomain().getCommandStack().canUndo()) {
+ getEditingDomain().getCommandStack().undo();
+ } else {
+ throw new Exception("Impossible to re-undo the paste command: " + pasteCommand); //$NON-NLS-1$
+ }
+ // check editor state (should be non dirty)
+ Assert.assertFalse("Editor should not be dirty after undo", isEditorDirty()); //$NON-NLS-1$
+
+ }
+
+ /**
+ * executes additional checks on the new value
+ *
+ * @param originalModel
+ * the map containing all values stored before launching the test
+ * @param newValue
+ * the new value, result of the copy
+ * @param delta
+ * differences between original list and the new one
+ */
+ protected void postCopyAdditionalChecks(Map<?, ?> originalModel, List<EObject> newValues, List<EObject> delta) throws Exception {
+ // use the values contained in the map to do additional checks
+ }
+
+ protected void initializeTest(Map<Object, Object> additionalChecks, EObject targetContainer, EObject copiedEObject) {
+ // nothing to do here
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/test/org/eclipse/papyrus/sysml/modelexplorer/tests/copypaste/CopyPasteInModelExplorer.java b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/test/org/eclipse/papyrus/sysml/modelexplorer/tests/copypaste/CopyPasteInModelExplorer.java
new file mode 100755
index 0000000..c853042
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/test/org/eclipse/papyrus/sysml/modelexplorer/tests/copypaste/CopyPasteInModelExplorer.java
@@ -0,0 +1,192 @@
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST and others.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Benoit Maggi (CEA LIST) benoit.maggi@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelexplorer.tests.copypaste;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.IHandler;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.papyrus.infra.gmfdiag.common.strategy.IStrategy;
+import org.eclipse.papyrus.infra.gmfdiag.common.strategy.paste.PasteStrategyManager;
+import org.eclipse.papyrus.junit.utils.HandlerUtils;
+import org.eclipse.papyrus.junit.utils.tests.AbstractEditorTest;
+import org.eclipse.papyrus.sysml.diagram.common.strategy.paste.PartPasteStrategy;
+import org.eclipse.papyrus.sysml.modelexplorer.tests.Activator;
+import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
+import org.eclipse.ui.ISelectionService;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.Property;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Sample test for cut in model explorer
+ *
+ * @author bmaggi
+ */
+public class CopyPasteInModelExplorer extends AbstractEditorTest {
+
+ public static final String COPY_COMMAND_ID = "org.eclipse.ui.edit.copy"; //$NON-NLS-1$
+
+ public static final String PASTE_COMMAND_ID = "org.eclipse.ui.edit.paste"; //$NON-NLS-1$
+
+ public static final String RESOURCES_PATH = "model/"; //$NON-NLS-1$
+
+ public static final String MODEL_NAME = "Bug435197"; //$NON-NLS-1$
+
+ public static final String PROJECT_NAME = "NonRegression"; //$NON-NLS-1$
+
+ public final static String BLOCK_NAME = "Block"; //$NON-NLS-1$
+
+ public final static String PORT_NAME = "port"; //$NON-NLS-1$
+
+ @Before
+ public void initModelForCutTest() {
+ try {
+ initModel(PROJECT_NAME, MODEL_NAME, Activator.getDefault().getBundle());
+ } catch (Exception e) {
+ Assert.fail(e.getMessage());
+ }
+ }
+
+ @Override
+ protected String getSourcePath() {
+ return RESOURCES_PATH;
+ }
+
+ private PartPasteStrategy getPartPasteStrategy() {
+ List<IStrategy> allStrategies = PasteStrategyManager.getInstance().getAllActiveStrategies();
+ for(IStrategy iStrategy : allStrategies) {
+ if (iStrategy instanceof PartPasteStrategy){
+ return ( PartPasteStrategy) iStrategy;
+ }
+ }
+ return null;
+ }
+
+
+ /**
+ * Test for Bug435197
+ * @throws Exception
+ */
+ @Test
+ public void copyPasteofBlockWithPropertyAndNoAssociationTest() throws Exception {
+
+ PartPasteStrategy partPasteStrategy = getPartPasteStrategy();
+ Assert.assertNotNull("PartPasteStrategy not present", partPasteStrategy);
+ Assert.assertTrue("PartPasteStrategy not active", PasteStrategyManager.getInstance().isActive(partPasteStrategy));
+
+ //get the rootModel
+ Assert.assertNotNull("RootModel is null", getRootUMLModel()); //$NON-NLS-1$
+ //get all semantic elment that will handled
+ Model model = (Model)getRootUMLModel();
+
+ IWorkbenchWindow activeWorkbenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+ ISelectionService selectionService = activeWorkbenchWindow.getSelectionService();
+ modelExplorerView = getModelExplorerView();
+ modelExplorerView.setFocus();
+ List<Object> elements = new ArrayList<Object>();
+ elements.add(getRootUMLModel());
+ modelExplorerView.revealSemanticElement(elements);
+
+ org.eclipse.uml2.uml.Class block = (org.eclipse.uml2.uml.Class)model.getPackagedElement(BLOCK_NAME);
+ elements.clear();
+ elements.add(block);
+ modelExplorerView.revealSemanticElement(elements);
+ Object blockTreeObject = ((IStructuredSelection)selectionService.getSelection()).getFirstElement();
+ Assert.assertNotNull("Class1 TreeElement is null", blockTreeObject); //$NON-NLS-1$
+
+ IHandler copyHandler = HandlerUtils.getActiveHandlerFor(COPY_COMMAND_ID);
+ Assert.assertTrue("Copy not available", copyHandler.isEnabled()); //$NON-NLS-1$
+ copyHandler.execute(new ExecutionEvent());
+
+ // select root
+
+ elements.clear();
+ elements.add(getRootUMLModel());
+ modelExplorerView.revealSemanticElement(elements);
+
+ // paste
+ IHandler pasteHandler = HandlerUtils.getActiveHandlerFor(PASTE_COMMAND_ID);
+ Assert.assertTrue("Paste not available", pasteHandler.isEnabled()); //$NON-NLS-1$
+ pasteHandler.execute(new ExecutionEvent());
+
+ // check that there is a Block
+ org.eclipse.uml2.uml.Class copyOfBlock = (org.eclipse.uml2.uml.Class)model.getPackagedElement(NamedElementUtil.COPY_OF + "_" + BLOCK_NAME + "_1");
+ Assert.assertNotNull("The copy is missing", copyOfBlock); //$NON-NLS-1$
+ }
+
+
+ /**
+ * Test for Bug 436385
+ * @throws Exception
+ */
+ @Test
+ public void copyPasteofPropertyWithoutAssociationTest() throws Exception {
+
+ PartPasteStrategy partPasteStrategy = getPartPasteStrategy();
+ Assert.assertNotNull("PartPasteStrategy not present", partPasteStrategy);
+ Assert.assertTrue("PartPasteStrategy not active", PasteStrategyManager.getInstance().isActive(partPasteStrategy));
+
+ //get the rootModel
+ Assert.assertNotNull("RootModel is null", getRootUMLModel()); //$NON-NLS-1$
+ //get all semantic elment that will handled
+ Model model = (Model)getRootUMLModel();
+
+ IWorkbenchWindow activeWorkbenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+ ISelectionService selectionService = activeWorkbenchWindow.getSelectionService();
+ modelExplorerView = getModelExplorerView();
+ modelExplorerView.setFocus();
+ List<Object> elements = new ArrayList<Object>();
+ elements.add(getRootUMLModel());
+ modelExplorerView.revealSemanticElement(elements);
+
+ org.eclipse.uml2.uml.Class block = (org.eclipse.uml2.uml.Class)model.getPackagedElement(BLOCK_NAME);
+ Property port = block.getAttribute(PORT_NAME, null);
+ Assert.assertNotNull("There is no port", port); //$NON-NLS-1$
+
+ elements.clear();
+ elements.add(port);
+ modelExplorerView.revealSemanticElement(elements);
+ Object blockTreeObject = ((IStructuredSelection)selectionService.getSelection()).getFirstElement();
+ Assert.assertNotNull("Class1 TreeElement is null", blockTreeObject); //$NON-NLS-1$
+
+ IHandler copyHandler = HandlerUtils.getActiveHandlerFor(COPY_COMMAND_ID);
+ Assert.assertTrue("Copy not available", copyHandler.isEnabled()); //$NON-NLS-1$
+ copyHandler.execute(new ExecutionEvent());
+
+ // select the block
+ elements.clear();
+ elements.add(block);
+ modelExplorerView.revealSemanticElement(elements);
+
+ // paste
+ IHandler pasteHandler = HandlerUtils.getActiveHandlerFor(PASTE_COMMAND_ID);
+ Assert.assertTrue("Paste not available", pasteHandler.isEnabled()); //$NON-NLS-1$
+ pasteHandler.execute(new ExecutionEvent());
+
+ // check that there is a Block
+ Property copyOfPort = block.getAttribute(NamedElementUtil.COPY_OF + "_" + PORT_NAME + "_1",null);
+ Assert.assertNotNull("The copy is missing", copyOfPort); //$NON-NLS-1$
+ }
+
+
+
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/test/org/eclipse/papyrus/sysml/modelexplorer/tests/copypaste/CopyPasteSimpleBlock2Test.java b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/test/org/eclipse/papyrus/sysml/modelexplorer/tests/copypaste/CopyPasteSimpleBlock2Test.java
new file mode 100755
index 0000000..a3cb4d8
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/test/org/eclipse/papyrus/sysml/modelexplorer/tests/copypaste/CopyPasteSimpleBlock2Test.java
@@ -0,0 +1,114 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
+ *
+ * from SimpleBlock2 - Model
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelexplorer.tests.copypaste;
+
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IWorkbenchCommandConstants;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.commands.ICommandService;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+
+/**
+ * Test for Copy / Paste of a Part
+ */
+public class CopyPasteSimpleBlock2Test extends AbstractCopyPasteBlockTest {
+
+ /**
+ * prepare the copy
+ *
+ * @throws Exception
+ * exception thrown in case of problems
+ */
+ @Before
+ public void testPrepare() throws Exception {
+ // check editor state (should be non dirty)
+ //FIXME: In Papyrus, the editor may be dirty at initialization. This should not be tested here. We simply save the editor as soon as it is opened.
+ Display.getDefault().syncExec(new Runnable() {
+
+ public void run() {
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor().doSave(new NullProgressMonitor());
+ }
+ });
+ // retrieve elements in the model explorer
+ selectAndReveal(b1P1_P1_EObject);
+
+ // copy Paste
+ ICommandService commandService = (ICommandService)PlatformUI.getWorkbench().getService(ICommandService.class);
+ commandService.refreshElements(IWorkbenchCommandConstants.EDIT_COPY, null);
+ org.eclipse.core.commands.Command copyCommand = commandService.getCommand(IWorkbenchCommandConstants.EDIT_COPY);
+ Assert.assertNotNull("Impossible to find copy command", copyCommand); //$NON-NLS-1$
+ Assert.assertTrue("command in not enabled", copyCommand.isEnabled()); //$NON-NLS-1$
+ Assert.assertTrue("command in not defined", copyCommand.isDefined()); //$NON-NLS-1$
+ copyCommand.executeWithChecks(new ExecutionEvent());
+
+ // check editor state (should be non dirty)
+ Assert.assertFalse("Editor should not be dirty after copy", isEditorDirty()); //$NON-NLS-1$
+ }
+
+ @Override
+ protected void initializeTest(Map<Object, Object> additionalChecks, EObject targetContainer, EObject copiedEObject) {
+ super.initializeTest(additionalChecks, targetContainer, copiedEObject);
+
+ /* pre-copy initialization */
+
+ /* END OF pre-copy initialization */
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void postCopyAdditionalChecks(Map<?, ?> originalModel, List<EObject> newValues, List<EObject> delta) throws Exception {
+ super.postCopyAdditionalChecks(originalModel, newValues, delta);
+
+ /* post copy checks */
+
+ /* END OF post copy checks */
+ }
+
+
+ /**
+ * Test the copy /paste on P1
+ *
+ * @throws Exception
+ * exception thrown in case of problems
+ */
+ @Test
+ public void testCopyPasteInP1() throws Exception {
+ testExecutableCopyPaste(p1_EObject, b1P1_P1_EObject, "ownedElement", 3);
+ }
+
+ /**
+ * Test the copy /paste on model
+ *
+ * @throws Exception
+ * exception thrown in case of problems
+ */
+ @Test
+ public void testCopyPasteInmodel() throws Exception {
+ testExecutableCopyPaste(model_EObject, b1P1_P1_EObject, "ownedElement", 3);
+ }
+
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/test/org/eclipse/papyrus/sysml/modelexplorer/tests/copypaste/CopyPasteSimpleBlockTest.java b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/test/org/eclipse/papyrus/sysml/modelexplorer/tests/copypaste/CopyPasteSimpleBlockTest.java
new file mode 100755
index 0000000..36e8f14
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/test/org/eclipse/papyrus/sysml/modelexplorer/tests/copypaste/CopyPasteSimpleBlockTest.java
@@ -0,0 +1,125 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
+ *
+ * from SimpleBlock - Model
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelexplorer.tests.copypaste;
+
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.RunnableWithResult;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IWorkbenchCommandConstants;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.commands.ICommandService;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+
+/**
+ * Test for Copy / Paste of a Part
+ */
+public class CopyPasteSimpleBlockTest extends AbstractCopyPasteBlockTest {
+
+ /**
+ * prepare the copy
+ *
+ * @throws Exception
+ * exception thrown in case of problems
+ */
+ @Before
+ public void testPrepare() throws Exception {
+ // check editor state (should be non dirty)
+ //FIXME: In Papyrus, the editor may be dirty at initialization. This should not be tested here. We simply save the editor as soon as it is opened.
+ Display.getDefault().syncExec(new Runnable() {
+
+ public void run() {
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor().doSave(new NullProgressMonitor());
+ }
+ });
+ // retrieve elements in the model explorer
+ selectAndReveal(b1_EObject);
+
+ // copy Paste
+ RunnableWithResult<ICommandService> runnable;
+ Display.getDefault().syncExec(runnable = new RunnableWithResult.Impl<ICommandService>() {
+
+ public void run() {
+ ICommandService commandService = (ICommandService)PlatformUI.getWorkbench().getActiveWorkbenchWindow().getService(ICommandService.class);
+ setResult(commandService);
+ }
+ });
+
+ ICommandService commandService = runnable.getResult();
+
+ commandService.refreshElements(IWorkbenchCommandConstants.EDIT_COPY, null);
+ org.eclipse.core.commands.Command copyCommand = commandService.getCommand(IWorkbenchCommandConstants.EDIT_COPY);
+ Assert.assertNotNull("Impossible to find copy command", copyCommand); //$NON-NLS-1$
+ Assert.assertTrue("command in not enabled", copyCommand.isEnabled()); //$NON-NLS-1$
+ Assert.assertTrue("command in not defined", copyCommand.isDefined()); //$NON-NLS-1$
+ copyCommand.executeWithChecks(new ExecutionEvent());
+
+ // check editor state (should be non dirty)
+ Assert.assertFalse("Editor should not be dirty after copy", isEditorDirty()); //$NON-NLS-1$
+ }
+
+ @Override
+ protected void initializeTest(Map<Object, Object> additionalChecks, EObject targetContainer, EObject copiedEObject) {
+ super.initializeTest(additionalChecks, targetContainer, copiedEObject);
+
+ /* pre-copy initialization */
+
+ /* END OF pre-copy initialization */
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void postCopyAdditionalChecks(Map<?, ?> originalModel, List<EObject> newValues, List<EObject> delta) throws Exception {
+ super.postCopyAdditionalChecks(originalModel, newValues, delta);
+
+ /* post copy checks */
+
+ /* END OF post copy checks */
+ }
+
+
+ /**
+ * Test the copy /paste on P1
+ *
+ * @throws Exception
+ * exception thrown in case of problems
+ */
+ @Test
+ public void testCopyPasteInP1() throws Exception {
+ testExecutableCopyPaste(p1_EObject, b1_EObject, "ownedElement", 4);
+ }
+
+ /**
+ * Test the copy /paste on model
+ *
+ * @throws Exception
+ * exception thrown in case of problems
+ */
+ @Test
+ public void testCopyPasteInmodel() throws Exception {
+ testExecutableCopyPaste(model_EObject, b1_EObject, "ownedElement", 4);
+ }
+
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/test/org/eclipse/papyrus/sysml/modelexplorer/tests/copypaste/CopyPasteSimplePartTest.java b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/test/org/eclipse/papyrus/sysml/modelexplorer/tests/copypaste/CopyPasteSimplePartTest.java
new file mode 100755
index 0000000..7a1dbc6
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/test/org/eclipse/papyrus/sysml/modelexplorer/tests/copypaste/CopyPasteSimplePartTest.java
@@ -0,0 +1,136 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
+ *
+ * from SimplePart - Model
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelexplorer.tests.copypaste;
+
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IWorkbenchCommandConstants;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.commands.ICommandService;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+
+/**
+ * Test for Copy / Paste of a Part
+ */
+public class CopyPasteSimplePartTest extends AbstractCopyPastePartTest {
+
+ /**
+ * prepare the copy
+ *
+ * @throws Exception
+ * exception thrown in case of problems
+ */
+ @Before
+ public void testPrepare() throws Exception {
+ // check editor state (should be non dirty)
+ //FIXME: In Papyrus, the editor may be dirty at initialization. This should not be tested here. We simply save the editor as soon as it is opened.
+ Display.getDefault().syncExec(new Runnable() {
+
+ public void run() {
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor().doSave(new NullProgressMonitor());
+ }
+ });
+ // retrieve elements in the model explorer
+ selectAndReveal(pB2_B1_EObject);
+
+ // copy Paste
+ ICommandService commandService = (ICommandService)PlatformUI.getWorkbench().getService(ICommandService.class);
+ commandService.refreshElements(IWorkbenchCommandConstants.EDIT_COPY, null);
+ org.eclipse.core.commands.Command copyCommand = commandService.getCommand(IWorkbenchCommandConstants.EDIT_COPY);
+ Assert.assertNotNull("Impossible to find copy command", copyCommand); //$NON-NLS-1$
+ Assert.assertTrue("command in not enabled", copyCommand.isEnabled()); //$NON-NLS-1$
+ Assert.assertTrue("command in not defined", copyCommand.isDefined()); //$NON-NLS-1$
+ copyCommand.executeWithChecks(new ExecutionEvent());
+
+ // check editor state (should be non dirty)
+ Assert.assertFalse("Editor should not be dirty after copy", isEditorDirty()); //$NON-NLS-1$
+ }
+
+ @Override
+ protected void initializeTest(Map<Object, Object> additionalChecks, EObject targetContainer, EObject copiedEObject) {
+ super.initializeTest(additionalChecks, targetContainer, copiedEObject);
+
+ /* pre-copy initialization */
+
+ /* END OF pre-copy initialization */
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void postCopyAdditionalChecks(Map<?, ?> originalModel, List<EObject> newValues, List<EObject> delta) throws Exception {
+ super.postCopyAdditionalChecks(originalModel, newValues, delta);
+
+ /* post copy checks */
+
+ /* END OF post copy checks */
+ }
+
+
+ /**
+ * Test the copy /paste on B1
+ *
+ * @throws Exception
+ * exception thrown in case of problems
+ */
+ @Test
+ public void testCopyPasteInB1() throws Exception {
+ testExecutableCopyPaste(b1_EObject, pB2_B1_EObject, "attribute", 1);
+ }
+
+ /**
+ * Test the copy /paste on B2
+ *
+ * @throws Exception
+ * exception thrown in case of problems
+ */
+ @Test
+ public void testCopyPasteInB2() throws Exception {
+ testExecutableCopyPaste(b2_EObject, pB2_B1_EObject, "attribute", 1);
+ }
+
+ /**
+ * Test the copy /paste on B1P1
+ *
+ * @throws Exception
+ * exception thrown in case of problems
+ */
+ @Test
+ public void testCopyPasteInB1P1() throws Exception {
+ testExecutableCopyPaste(b1P1_P1_EObject, pB2_B1_EObject, "attribute", 1);
+ }
+
+ /**
+ * Test the copy /paste on B2P1
+ *
+ * @throws Exception
+ * exception thrown in case of problems
+ */
+ @Test
+ public void testCopyPasteInB2P1() throws Exception {
+ testExecutableCopyPaste(b2P1_P1_EObject, pB2_B1_EObject, "attribute", 1);
+ }
+
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/test/org/eclipse/papyrus/sysml/modelexplorer/tests/copypaste/CopyPasteSimpleReferenceTest.java b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/test/org/eclipse/papyrus/sysml/modelexplorer/tests/copypaste/CopyPasteSimpleReferenceTest.java
new file mode 100755
index 0000000..7f2d76c
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/test/org/eclipse/papyrus/sysml/modelexplorer/tests/copypaste/CopyPasteSimpleReferenceTest.java
@@ -0,0 +1,150 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
+ *
+ * from SimpleReference - Model
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelexplorer.tests.copypaste;
+
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IWorkbenchCommandConstants;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.commands.ICommandService;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+
+/**
+ * Test for Copy / Paste of a Part
+ */
+public class CopyPasteSimpleReferenceTest extends AbstractCopyPasteReferenceTest {
+
+ /**
+ * prepare the copy
+ *
+ * @throws Exception
+ * exception thrown in case of problems
+ */
+ @Before
+ public void testPrepare() throws Exception {
+ // check editor state (should be non dirty)
+ //FIXME: In Papyrus, the editor may be dirty at initialization. This should not be tested here. We simply save the editor as soon as it is opened.
+ Display.getDefault().syncExec(new Runnable() {
+
+ public void run() {
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor().doSave(new NullProgressMonitor());
+ }
+ });
+
+ Assert.assertFalse("Editor should not be dirty at initialization", isEditorDirty()); //$NON-NLS-1$
+ // retrieve elements in the model explorer
+ selectAndReveal(rB2_B1_EObject);
+
+ // copy Paste
+ ICommandService commandService = (ICommandService)PlatformUI.getWorkbench().getService(ICommandService.class);
+ commandService.refreshElements(IWorkbenchCommandConstants.EDIT_COPY, null);
+ org.eclipse.core.commands.Command copyCommand = commandService.getCommand(IWorkbenchCommandConstants.EDIT_COPY);
+ Assert.assertNotNull("Impossible to find copy command", copyCommand); //$NON-NLS-1$
+ Assert.assertTrue("command in not enabled", copyCommand.isEnabled()); //$NON-NLS-1$
+ Assert.assertTrue("command in not defined", copyCommand.isDefined()); //$NON-NLS-1$
+ copyCommand.executeWithChecks(new ExecutionEvent());
+
+ // check editor state (should be non dirty)
+ // Assert.assertFalse("Editor should not be dirty after copy", isEditorDirty());
+
+ // NOTE: save editor. The copy command should not dirty the model, the implementation of the copy command or the editor should be modified
+ Assert.assertFalse("Copy command is dirtying the model, whereas it should not. This assert is here to remember that the test code should be modified: Isdirty = false after copy...", isEditorDirty()); //$NON-NLS-1$
+ Display.getDefault().syncExec(new Runnable() {
+
+ public void run() {
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor().doSave(new NullProgressMonitor());
+ }
+ });
+
+ Assert.assertFalse("Save command is non-dirtying the model, whereas it should. ", isEditorDirty()); //$NON-NLS-1$
+ // END NOTE
+ }
+
+ @Override
+ protected void initializeTest(Map<Object, Object> additionalChecks, EObject targetContainer, EObject copiedEObject) {
+ super.initializeTest(additionalChecks, targetContainer, copiedEObject);
+
+ /* pre-copy initialization */
+
+ /* END OF pre-copy initialization */
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void postCopyAdditionalChecks(Map<?, ?> originalModel, List<EObject> newValues, List<EObject> delta) throws Exception {
+ super.postCopyAdditionalChecks(originalModel, newValues, delta);
+
+ /* post copy checks */
+
+ /* END OF post copy checks */
+ }
+
+
+ /**
+ * Test the copy /paste on B1
+ *
+ * @throws Exception
+ * exception thrown in case of problems
+ */
+ @Test
+ public void testCopyPasteInB1() throws Exception {
+ testExecutableCopyPaste(b1_EObject, rB2_B1_EObject, "attribute", 1);
+ }
+
+ /**
+ * Test the copy /paste on B2
+ *
+ * @throws Exception
+ * exception thrown in case of problems
+ */
+ @Test
+ public void testCopyPasteInB2() throws Exception {
+ testExecutableCopyPaste(b2_EObject, rB2_B1_EObject, "attribute", 1);
+ }
+
+ /**
+ * Test the copy /paste on B1P1
+ *
+ * @throws Exception
+ * exception thrown in case of problems
+ */
+ @Test
+ public void testCopyPasteInB1P1() throws Exception {
+ testExecutableCopyPaste(b1P1_P1_EObject, rB2_B1_EObject, "attribute", 1);
+ }
+
+ /**
+ * Test the copy /paste on B2P1
+ *
+ * @throws Exception
+ * exception thrown in case of problems
+ */
+ @Test
+ public void testCopyPasteInB2P1() throws Exception {
+ testExecutableCopyPaste(b2P1_P1_EObject, rB2_B1_EObject, "attribute", 1);
+ }
+
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/test/org/eclipse/papyrus/sysml/modelexplorer/tests/dragdrop/AbstractDragDropTest.java b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/test/org/eclipse/papyrus/sysml/modelexplorer/tests/dragdrop/AbstractDragDropTest.java
new file mode 100755
index 0000000..2bad92d
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/test/org/eclipse/papyrus/sysml/modelexplorer/tests/dragdrop/AbstractDragDropTest.java
@@ -0,0 +1,201 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelexplorer.tests.dragdrop;
+
+import static org.junit.Assert.fail;
+
+import java.lang.reflect.Field;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.emf.common.command.CompoundCommand;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.jface.util.LocalSelectionTransfer;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ViewerDropAdapter;
+import org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EObjectTreeElement;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
+import org.eclipse.papyrus.sysml.modelexplorer.tests.common.AbstractModelExplorerTest;
+import org.eclipse.papyrus.sysml.modelexplorer.tests.utils.EditorUtils;
+import org.eclipse.papyrus.views.modelexplorer.CustomCommonViewer;
+import org.eclipse.papyrus.views.modelexplorer.ModelExplorerPageBookView;
+import org.eclipse.papyrus.views.modelexplorer.ModelExplorerView;
+import org.eclipse.papyrus.views.modelexplorer.NavigatorUtils;
+import org.eclipse.swt.dnd.DND;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.internal.navigator.dnd.NavigatorDnDService;
+import org.eclipse.ui.navigator.CommonDropAdapter;
+import org.eclipse.ui.navigator.CommonDropAdapterAssistant;
+import org.junit.Assert;
+import org.junit.Before;
+
+/**
+ * Abstract Class to implement diagram drag and drop tests.
+ */
+public abstract class AbstractDragDropTest extends AbstractModelExplorerTest {
+
+ /**
+ * prepare the copy
+ *
+ * @throws Exception
+ * exception thrown in case of problems
+ */
+ @Before
+ public void testPrepare() throws Exception {
+ // check editor state (should be non dirty)
+ //FIXME: In Papyrus, the editor may be dirty at initialization. This should not be tested here. We simply save the editor as soon as it is opened.
+ Display.getDefault().syncExec(new Runnable() {
+
+ public void run() {
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor().doSave(new NullProgressMonitor());
+ }
+ });
+
+ Assert.assertFalse("Editor should not be dirty at initialization", isEditorDirty()); //$NON-NLS-1$
+ }
+
+ public List<CompoundCommand> getListOfDropCommands(EObject sourceElement, EObject targetElement) throws Exception {
+ // init source object
+ EObjectTreeElement sourceMEI = null;
+ if(sourceElement instanceof Diagram) {
+ sourceMEI = findSemanticModelElementItem((Diagram)sourceElement);
+ } else {
+ sourceMEI = findSemanticModelElementItem(sourceElement);
+ }
+ EObjectTreeElement targetMEI = null;
+ if(targetElement instanceof Diagram) {
+ targetMEI = findSemanticModelElementItem((Diagram)targetElement);
+ } else {
+ targetMEI = findSemanticModelElementItem(targetElement);
+ }
+ if(sourceElement instanceof Diagram) {
+ selectAndRevealDiagram((Diagram)sourceElement);
+ } else {
+ selectAndReveal(sourceElement);
+ }
+ ModelExplorerView modelExplorerView = null;
+ ModelExplorerPageBookView bookViewPart = (ModelExplorerPageBookView)NavigatorUtils.findViewPart(ModelExplorerPageBookView.VIEW_ID);
+ if(bookViewPart != null) {
+ modelExplorerView = (ModelExplorerView)bookViewPart.getActiveView();
+ Assert.assertNotNull("Impossible to find model explorer view", modelExplorerView); //$NON-NLS-1$
+ }
+ NavigatorDnDService dndService = (NavigatorDnDService)modelExplorerView.getNavigatorContentService().getDnDService();
+ Assert.assertNotNull("Impossible to find dnd service", dndService); //$NON-NLS-1$
+ CommonDropAdapter commonDropAdapter = ((CustomCommonViewer)modelExplorerView.getCommonViewer()).getDropAdapter();
+ CommonDropAdapterAssistant[] commonDropAdapterAssistants = dndService.findCommonDropAdapterAssistants(targetMEI, (IStructuredSelection)modelExplorerView.getCommonViewer().getSelection());
+ List<CompoundCommand> results = new ArrayList<CompoundCommand>();
+ for(CommonDropAdapterAssistant assistant : commonDropAdapterAssistants) {
+ // try to adapt to a Papyrus drop assistant. If not, send a warning
+ if(!(assistant instanceof org.eclipse.papyrus.views.modelexplorer.dnd.CommonDropAdapterAssistant)) {
+ fail("this test expects that only papyrus drop assistants are provided for papyrus model explorer"); //$NON-NLS-1$
+ }
+ org.eclipse.papyrus.views.modelexplorer.dnd.CommonDropAdapterAssistant papyrusAssistant = ((org.eclipse.papyrus.views.modelexplorer.dnd.CommonDropAdapterAssistant)assistant);
+ Field currentOperationField = ViewerDropAdapter.class.getDeclaredField("currentOperation");
+ Assert.assertNotNull(currentOperationField);
+ currentOperationField.setAccessible(true);
+ currentOperationField.set(commonDropAdapter, DND.DROP_MOVE);
+ System.err.println(commonDropAdapter.getCurrentOperation()); // should be 2
+ Field currentLocationField = ViewerDropAdapter.class.getDeclaredField("currentLocation");
+ Assert.assertNotNull(currentLocationField);
+ currentLocationField.setAccessible(true);
+ currentLocationField.set(commonDropAdapter, ViewerDropAdapter.LOCATION_ON);
+ System.err.println(commonDropAdapter.getCurrentLocation()); // should be 3
+ LocalSelectionTransfer.getTransfer().setSelection(modelExplorerView.getCommonViewer().getSelection());
+ CompoundCommand command = papyrusAssistant.getDrop(targetMEI);
+ results.add(command);
+ }
+ return results;
+ }
+
+ public void testExecutableDropOfDiagram(Diagram sourceElement, EObject targetElement) throws Exception {
+ Assert.assertFalse("Editor should not be dirty at the beginning of the test", EditorUtils.getEditor().isDirty()); //$NON-NLS-1$
+ EObject initialDiagramContainer = sourceElement.getElement();
+ // find command for the drag / drop (source, target)
+ List<CompoundCommand> dropCommands = getListOfDropCommands(sourceElement, targetElement);
+ // create only one compound command
+ CompoundCommand executableCommand = new CompoundCommand();
+ for(CompoundCommand cc : dropCommands) {
+ executableCommand.append(cc);
+ }
+ getEditingDomain().getCommandStack().execute(executableCommand);
+ // check results
+ Assert.assertEquals("Context of the diagram should be the target: " + printElement(targetElement), targetElement, sourceElement.getElement()); //$NON-NLS-1$
+ Assert.assertNotNull("diagram should still be contained in a resource", sourceElement.eResource()); //$NON-NLS-1$
+ // try to undo
+ getEditingDomain().getCommandStack().undo();
+ Assert.assertEquals("Context of the diagram should be the initial value: " + printElement(initialDiagramContainer), initialDiagramContainer, sourceElement.getElement()); //$NON-NLS-1$
+ // try to redo
+ getEditingDomain().getCommandStack().redo();
+ // check results
+ Assert.assertEquals("Context of the diagram should be the target: " + printElement(targetElement), targetElement, sourceElement.getElement()); //$NON-NLS-1$
+ Assert.assertNotNull("diagram should still be contained in a resource", sourceElement.eResource()); //$NON-NLS-1$
+ // undo to go to previous state
+ getEditingDomain().getCommandStack().undo();
+ Assert.assertEquals("Context of the diagram should be the initial value: " + printElement(initialDiagramContainer), initialDiagramContainer, sourceElement.getElement()); //$NON-NLS-1$
+
+ Assert.assertFalse("Editor should not be dirty at the end of the test", EditorUtils.getEditor().isDirty()); //$NON-NLS-1$
+ }
+
+ public void testExecutableGraphicalMoveOfDiagram(Diagram sourceElement, EObject targetElement) throws Exception {
+ Assert.assertFalse("Editor should not be dirty at the beginning of the test", EditorUtils.getEditor().isDirty()); //$NON-NLS-1$
+ EObject initialDiagramContainer = sourceElement.getElement();
+ // find command for the drag / drop (source, target)
+ List<CompoundCommand> dropCommands = getListOfDropCommands(sourceElement, targetElement);
+ // create only one compound command
+ CompoundCommand executableCommand = new CompoundCommand();
+ for(CompoundCommand cc : dropCommands) {
+ executableCommand.append(cc);
+ }
+ getEditingDomain().getCommandStack().execute(executableCommand);
+ // check results
+ Assert.assertEquals("Context of the diagram should be the initial value", initialDiagramContainer, sourceElement.getElement()); //$NON-NLS-1$
+ Assert.assertEquals("Owner of the diagram should be the target element", targetElement, DiagramUtils.getOwner(sourceElement)); //$NON-NLS-1$
+ Assert.assertNotNull("diagram should still be contained in a resource", sourceElement.eResource()); //$NON-NLS-1$
+ // try to undo
+ getEditingDomain().getCommandStack().undo();
+ Assert.assertEquals("Context of the diagram should be the initial value: " + printElement(initialDiagramContainer), initialDiagramContainer, sourceElement.getElement()); //$NON-NLS-1$
+ Assert.assertEquals("Owner of the diagram should be the initial value", initialDiagramContainer, DiagramUtils.getOwner(sourceElement)); //$NON-NLS-1$
+ // try to redo
+ getEditingDomain().getCommandStack().redo();
+ // check results
+ Assert.assertEquals("Context of the diagram should be the initial value", initialDiagramContainer, sourceElement.getElement()); //$NON-NLS-1$
+ Assert.assertEquals("Owner of the diagram should be the target element", targetElement, DiagramUtils.getOwner(sourceElement)); //$NON-NLS-1$
+ Assert.assertNotNull("diagram should still be contained in a resource", sourceElement.eResource()); //$NON-NLS-1$
+ // undo to go to previous state
+ getEditingDomain().getCommandStack().undo();
+ Assert.assertEquals("Context of the diagram should be the initial value: " + printElement(initialDiagramContainer), initialDiagramContainer, sourceElement.getElement()); //$NON-NLS-1$
+ Assert.assertEquals("Owner of the diagram should be the initial value", initialDiagramContainer, DiagramUtils.getOwner(sourceElement)); //$NON-NLS-1$
+
+ Assert.assertFalse("Editor should not be dirty at the end of the test", EditorUtils.getEditor().isDirty()); //$NON-NLS-1$
+ }
+
+ public void testUnexecutableDropOfDiagram(Diagram sourceElement, EObject targetElement) throws Exception {
+ // find command for the drag / drop (source, target)
+ List<CompoundCommand> dropCommands = getListOfDropCommands(sourceElement, targetElement);
+ // create only one compound command
+ // boolean that indicates that the command can really be not executable
+ boolean notexecutable = true;
+ for(CompoundCommand cc : dropCommands) {
+ if(cc != null && !cc.isEmpty()) {
+ if(cc.canExecute()) {
+ notexecutable = false;
+ }
+ }
+ }
+ Assert.assertTrue("It should be impossible to move " + printElement(sourceElement) + " on " + printElement(targetElement), notexecutable); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/test/org/eclipse/papyrus/sysml/modelexplorer/tests/dragdrop/IBDDragDropTest.java b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/test/org/eclipse/papyrus/sysml/modelexplorer/tests/dragdrop/IBDDragDropTest.java
new file mode 100755
index 0000000..4aa7579
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/test/org/eclipse/papyrus/sysml/modelexplorer/tests/dragdrop/IBDDragDropTest.java
@@ -0,0 +1,40 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelexplorer.tests.dragdrop;
+
+import org.junit.Test;
+
+/**
+ * Test for the drag and drop of IBd inside the model explorer
+ */
+public class IBDDragDropTest extends AbstractDragDropTest {
+
+ /**
+ * Test on itself. Should do nothing
+ */
+ @Test
+ public void testDragDropIBDonItself() throws Exception {
+ testUnexecutableDropOfDiagram(iBD_B1_Diagram, iBD_B1_Diagram);
+
+ }
+
+ /**
+ * Test on itself. Should do nothing
+ */
+ @Test
+ public void testDragDropBDDonBlock() throws Exception {
+ testExecutableGraphicalMoveOfDiagram(bDD_Main_Diagram, b1_EObject); //Expected result: graphical move to B1
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/test/org/eclipse/papyrus/sysml/modelexplorer/tests/suites/AllCopyPasteTests.java b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/test/org/eclipse/papyrus/sysml/modelexplorer/tests/suites/AllCopyPasteTests.java
new file mode 100755
index 0000000..93b1f5d
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/test/org/eclipse/papyrus/sysml/modelexplorer/tests/suites/AllCopyPasteTests.java
@@ -0,0 +1,42 @@
+ /*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelexplorer.tests.suites;
+
+import org.eclipse.papyrus.sysml.modelexplorer.tests.copypaste.CopyPasteInModelExplorer;
+import org.eclipse.papyrus.sysml.modelexplorer.tests.copypaste.CopyPasteSimpleBlock2Test;
+import org.eclipse.papyrus.sysml.modelexplorer.tests.copypaste.CopyPasteSimpleBlockTest;
+import org.eclipse.papyrus.sysml.modelexplorer.tests.copypaste.CopyPasteSimplePartTest;
+import org.eclipse.papyrus.sysml.modelexplorer.tests.copypaste.CopyPasteSimpleReferenceTest;
+import org.junit.runner.RunWith;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.junit.runners.Suite.SuiteClasses;
+
+
+/**
+ * Tests suite for Copy/Paste
+ *
+ */
+@RunWith(ClassificationSuite.class)
+@SuiteClasses({
+// Reference
+CopyPasteSimpleReferenceTest.class,
+// Block
+CopyPasteSimpleBlockTest.class,
+CopyPasteSimpleBlock2Test.class,
+// Part
+CopyPasteSimplePartTest.class,
+CopyPasteInModelExplorer.class,
+})
+public class AllCopyPasteTests {
+ //Test suite
+}
diff --git a/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/test/org/eclipse/papyrus/sysml/modelexplorer/tests/suites/AllDragDropTests.java b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/test/org/eclipse/papyrus/sysml/modelexplorer/tests/suites/AllDragDropTests.java
new file mode 100755
index 0000000..53c2ebb
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/test/org/eclipse/papyrus/sysml/modelexplorer/tests/suites/AllDragDropTests.java
@@ -0,0 +1,31 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelexplorer.tests.suites;
+
+import org.eclipse.papyrus.sysml.modelexplorer.tests.dragdrop.IBDDragDropTest;
+import org.junit.runner.RunWith;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.junit.runners.Suite.SuiteClasses;
+
+
+/**
+ * Tests suites for Drag And Drop inside the model explorer
+ */
+@RunWith(ClassificationSuite.class)
+@SuiteClasses({
+IBDDragDropTest.class,
+})
+public class AllDragDropTests {
+ //Test suite
+}
diff --git a/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/test/org/eclipse/papyrus/sysml/modelexplorer/tests/suites/AllTests.java b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/test/org/eclipse/papyrus/sysml/modelexplorer/tests/suites/AllTests.java
new file mode 100755
index 0000000..09b22f8
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/test/org/eclipse/papyrus/sysml/modelexplorer/tests/suites/AllTests.java
@@ -0,0 +1,27 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelexplorer.tests.suites;
+
+import org.junit.runner.RunWith;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.junit.runners.Suite.SuiteClasses;
+
+
+/**
+ * Main test suite class
+ */
+@RunWith(ClassificationSuite.class)
+@SuiteClasses({ AllDragDropTests.class, AllCopyPasteTests.class, })
+public class AllTests {
+ //Test suite
+}
diff --git a/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/test/org/eclipse/papyrus/sysml/modelexplorer/tests/utils/EditorUtils.java b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/test/org/eclipse/papyrus/sysml/modelexplorer/tests/utils/EditorUtils.java
new file mode 100755
index 0000000..f0111ed
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.modelexplorer.tests/test/org/eclipse/papyrus/sysml/modelexplorer/tests/utils/EditorUtils.java
@@ -0,0 +1,77 @@
+/*****************************************************************************
+ * Copyright (c) 2011, 2016 CEA LIST, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 485220
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelexplorer.tests.utils;
+
+import org.eclipse.emf.transaction.RunnableWithResult;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor;
+import org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.core.utils.ServiceUtils;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PlatformUI;
+
+
+/**
+ * Utility class for tests
+ */
+public class EditorUtils {
+
+ /**
+ * Retrieves current active editor
+ *
+ * @return current active editor
+ * @throws Exception
+ * exception thrown in case of issue
+ */
+ public static IEditorPart getEditor() throws Exception {
+ RunnableWithResult<IEditorPart> runnable;
+
+ Display.getDefault().syncExec(runnable = new RunnableWithResult.Impl<IEditorPart>() {
+
+ public void run() {
+ IEditorPart editor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+ setResult(editor);
+ }
+ });
+
+ return runnable.getResult();
+ }
+
+ public static DiagramEditor getDiagramEditor() throws Exception {
+
+ ServicesRegistry serviceRegistry = getEditor().getAdapter(ServicesRegistry.class);
+ try {
+ return (DiagramEditor) ServiceUtils.getInstance().getService(ISashWindowsContainer.class, serviceRegistry).getActiveEditor();
+
+ } catch (ServiceException e) {
+ throw new Exception("Unable to retrieve service.", e); //$NON-NLS-1$
+ } catch (ClassCastException e) {
+ throw new Exception("Active diagram is not a DiagramEditor." + e.getMessage(), e); //$NON-NLS-1$
+ }
+ }
+
+ public static DiagramEditPart getDiagramEditPart() throws Exception {
+
+ try {
+ return getDiagramEditor().getDiagramEditPart();
+
+ } catch (NullPointerException e) {
+ throw new Exception("Could not find diagram edit part.", e); //$NON-NLS-1$
+ }
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.allocation.tests/.classpath b/tests/org.eclipse.papyrus.sysml.nattable.allocation.tests/.classpath
new file mode 100755
index 0000000..ad32c83
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.allocation.tests/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.allocation.tests/.project b/tests/org.eclipse.papyrus.sysml.nattable.allocation.tests/.project
new file mode 100755
index 0000000..26faffc
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.allocation.tests/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.sysml.nattable.allocation.tests</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.allocation.tests/.settings/org.eclipse.jdt.core.prefs b/tests/org.eclipse.papyrus.sysml.nattable.allocation.tests/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 0000000..94d61f0
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.allocation.tests/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,291 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.allocation.tests/.settings/org.eclipse.jdt.ui.prefs b/tests/org.eclipse.papyrus.sysml.nattable.allocation.tests/.settings/org.eclipse.jdt.ui.prefs
new file mode 100755
index 0000000..954281d
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.allocation.tests/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,68 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+formatter_profile=_Papyrus
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.allocation.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.papyrus.sysml.nattable.allocation.tests/META-INF/MANIFEST.MF
new file mode 100755
index 0000000..a434726
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.allocation.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,39 @@
+Manifest-Version: 1.0
+Require-Bundle: org.junit;bundle-version="4.11.0",
+ org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.papyrus.junit.utils;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.uml2.uml,
+ org.eclipse.papyrus.infra.core;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.infra.nattable;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.infra.widgets;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.nebula.widgets.nattable.core;bundle-version="[1.5.0,2.0.0)",
+ org.eclipse.papyrus.infra.nattable.model,
+ org.eclipse.papyrus.sysml;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.papyrus.infra.core.log;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.emf.transaction;bundle-version="1.8.0",
+ org.eclipse.papyrus.junit.framework;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.papyrus.infra.core.sasheditor;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.infra.ui;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.infra.core.sashwindows.di;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.papyrus.infra.nattable.gmfdiag;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.nattable.properties;bundle-version="2.2.0",
+ org.eclipse.papyrus.infra.nattable.views.config;bundle-version="3.0.0",
+ org.eclipse.papyrus.sysml.nattable;bundle-version="2.0.0",
+ org.eclipse.papyrus.sysml.nattable.allocation;bundle-version="1.2.0",
+ org.eclipse.papyrus.sysml.nattable.allocation.config;bundle-version="1.2.0",
+ org.eclipse.papyrus.uml.nattable;bundle-version="3.0.0",
+ org.eclipse.papyrus.uml.nattable.generic;bundle-version="1.2.0",
+ org.eclipse.papyrus.uml.nattable.menu;bundle-version="1.2.0"
+Export-Package: org.eclipse.papyrus.sysml.nattable.allocation.tests,
+ org.eclipse.papyrus.sysml.nattable.allocation.tests.tests
+Bundle-Vendor: %Bundle-Vendor
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 1.2.0.qualifier
+Bundle-Name: %Bundle-Name
+Bundle-Localization: plugin
+Bundle-ManifestVersion: 2
+Bundle-Activator: org.eclipse.papyrus.sysml.nattable.allocation.tests.Activator
+Bundle-Description: %Bundle-Description
+Bundle-SymbolicName: org.eclipse.papyrus.sysml.nattable.allocation.tests
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.allocation.tests/about.html b/tests/org.eclipse.papyrus.sysml.nattable.allocation.tests/about.html
new file mode 100755
index 0000000..d35d5ae
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.allocation.tests/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.allocation.tests/build.properties b/tests/org.eclipse.papyrus.sysml.nattable.allocation.tests/build.properties
new file mode 100755
index 0000000..773d47e
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.allocation.tests/build.properties
@@ -0,0 +1,8 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ about.html,\
+ resources/,\
+ plugin.properties
+src.includes = about.html
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.allocation.tests/org.eclipse.papyrus.sysml.nattable.allocation.tests.iml b/tests/org.eclipse.papyrus.sysml.nattable.allocation.tests/org.eclipse.papyrus.sysml.nattable.allocation.tests.iml
new file mode 100755
index 0000000..13cf1bd
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.allocation.tests/org.eclipse.papyrus.sysml.nattable.allocation.tests.iml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+ <component name="NewModuleRootManager" inherit-compiler-output="false">
+ <output url="file://$MODULE_DIR$/bin" />
+ <exclude-output />
+ <content url="file://$MODULE_DIR$">
+ <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
+ </content>
+ <orderEntry type="jdk" jdkName="JavaSE-1.6" jdkType="JavaSDK" />
+ <orderEntry type="module" module-name="org.eclipse.papyrus.junit.utils" />
+ <orderEntry type="module" module-name="org.eclipse.papyrus.infra.core" />
+ <orderEntry type="module" module-name="org.eclipse.papyrus.infra.nattable" />
+ <orderEntry type="module" module-name="org.eclipse.papyrus.infra.widgets" />
+ <orderEntry type="module" module-name="org.eclipse.papyrus.infra.nattable.model" />
+ <orderEntry type="module" module-name="org.eclipse.papyrus.sysml" />
+ <orderEntry type="module" module-name="org.eclipse.papyrus.infra.core.log" />
+ <orderEntry type="module" module-name="org.eclipse.papyrus.junit.framework" />
+ <orderEntry type="module" module-name="org.eclipse.papyrus.infra.core.sasheditor" />
+ <orderEntry type="module" module-name="org.eclipse.papyrus.infra.ui" />
+ <orderEntry type="module" module-name="org.eclipse.papyrus.infra.core.sashwindows.di" />
+ <orderEntry type="library" name="ECLIPSE" level="application" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ </component>
+</module>
\ No newline at end of file
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.allocation.tests/plugin.properties b/tests/org.eclipse.papyrus.sysml.nattable.allocation.tests/plugin.properties
new file mode 100755
index 0000000..2c88811
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.allocation.tests/plugin.properties
@@ -0,0 +1,4 @@
+#Properties file for org.eclipse.papyrus.sysml.nattable.allocation.tests
+Bundle-Vendor = Eclipse Modeling Project
+Bundle-Name = Papyrus Table Allocations Tests
+Bundle-Description = This plugin provides Tests for the plugin org.eclipse.papyrus.uml.nattable.allocation.
\ No newline at end of file
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.allocation.tests/pom.xml b/tests/org.eclipse.papyrus.sysml.nattable.allocation.tests/pom.xml
new file mode 100755
index 0000000..9a5825d
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.allocation.tests/pom.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.papyrus.sysml</groupId>
+ <artifactId>org.eclipse.papyrus.sysml.test</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.papyrus.sysml.nattable.allocation.tests</artifactId>
+ <packaging>eclipse-test-plugin</packaging>
+</project>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.allocation.tests/resources/modelSysMLRequirement.di b/tests/org.eclipse.papyrus.sysml.nattable.allocation.tests/resources/modelSysMLRequirement.di
new file mode 100755
index 0000000..5e3ea0e
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.allocation.tests/resources/modelSysMLRequirement.di
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi" >
+ <di:SashWindowsMngr>
+ <pageList>
+ <availablePage>
+ <emfPageIdentifier href="modelSysMLRequirement.notation#_pBS2xAKOEeSZ5cZUOQKWkw"/>
+ </availablePage>
+ <availablePage>
+ <emfPageIdentifier href="modelSysMLRequirement.notation#_B7qCgAKPEeSZ5cZUOQKWkw"/>
+ </availablePage>
+ <availablePage>
+ <emfPageIdentifier href="modelSysMLRequirement.notation#_C2IGsAKPEeSZ5cZUOQKWkw"/>
+ </availablePage>
+ <availablePage>
+ <emfPageIdentifier href="modelSysMLRequirement.notation#_EGhXkAKPEeSZ5cZUOQKWkw"/>
+ </availablePage>
+ <availablePage>
+ <emfPageIdentifier href="modelSysMLRequirement.notation#_ffxOYAKUEeSZ5cZUOQKWkw"/>
+ </availablePage>
+ <availablePage>
+ <emfPageIdentifier href="modelSysMLRequirement.notation#_ZfPQ8Av4EeSOiKqWiKPo8w"/>
+ </availablePage>
+ </pageList>
+ <sashModel currentSelection="/0/@sashModel/@windows.0/@children.0">
+ <windows>
+ <children xsi:type="di:TabFolder">
+ <children>
+ <emfPageIdentifier href="modelSysMLRequirement.notation#_pBS2xAKOEeSZ5cZUOQKWkw"/>
+ </children>
+ <children>
+ <emfPageIdentifier href="modelSysMLRequirement.notation#_B7qCgAKPEeSZ5cZUOQKWkw"/>
+ </children>
+ <children>
+ <emfPageIdentifier href="modelSysMLRequirement.notation#_EGhXkAKPEeSZ5cZUOQKWkw"/>
+ </children>
+ <children>
+ <emfPageIdentifier href="modelSysMLRequirement.notation#_C2IGsAKPEeSZ5cZUOQKWkw"/>
+ </children>
+ <children>
+ <emfPageIdentifier href="modelSysMLRequirement.notation#_ffxOYAKUEeSZ5cZUOQKWkw"/>
+ </children>
+ <children>
+ <emfPageIdentifier href="modelSysMLRequirement.notation#_ZfPQ8Av4EeSOiKqWiKPo8w"/>
+ </children>
+ </children>
+ </windows>
+ </sashModel>
+ </di:SashWindowsMngr>
+ <architecture:ArchitectureDescription contextId="org.eclipse.papyrus.sysml.architecture.SysML"/>
+ <architecture:ArchitectureDescriptionPreferences>
+ <viewpointIds>org.eclipse.papyrus.sysml.analysis</viewpointIds>
+ <viewpointIds>org.eclipse.papyrus.sysml.design</viewpointIds>
+ </architecture:ArchitectureDescriptionPreferences>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.allocation.tests/resources/modelSysMLRequirement.notation b/tests/org.eclipse.papyrus.sysml.nattable.allocation.tests/resources/modelSysMLRequirement.notation
new file mode 100755
index 0000000..bc9e4d3
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.allocation.tests/resources/modelSysMLRequirement.notation
@@ -0,0 +1,1660 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Requirements="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:nattable="http://www.eclipse.org/papyrus/nattable/model" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis http://www.eclipse.org/papyrus/nattable/model#//nattableaxis http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model#//nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableconfiguration">
+ <notation:Diagram xmi:id="_pBS2xAKOEeSZ5cZUOQKWkw" type="RequirementDiagram" name="NewDiagram" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_q24fUQKOEeSZ5cZUOQKWkw" type="shape_sysml_requirement_as_classifier">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_q3EskAKOEeSZ5cZUOQKWkw" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_q5K-UQKOEeSZ5cZUOQKWkw" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_q5K-UgKOEeSZ5cZUOQKWkw" key="StereotypeList" value="SysML::Requirements::Requirement"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_q5K-UwKOEeSZ5cZUOQKWkw" key="Stereotype_Presentation_Kind" value="Compartment"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_q5K-VAKOEeSZ5cZUOQKWkw" key="PropStereoDisplay" value="SysML::Requirements::Requirement.id,SysML::Requirements::Requirement.text"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_q5K-VQKOEeSZ5cZUOQKWkw" key="StereotypePropertyLocation" value="Compartment"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_q24fUwKOEeSZ5cZUOQKWkw" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_q24fVAKOEeSZ5cZUOQKWkw" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_q24fVQKOEeSZ5cZUOQKWkw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_q24fVgKOEeSZ5cZUOQKWkw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_q24fVwKOEeSZ5cZUOQKWkw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_q24fWAKOEeSZ5cZUOQKWkw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_q24fWQKOEeSZ5cZUOQKWkw" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_q24fWgKOEeSZ5cZUOQKWkw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_q24fWwKOEeSZ5cZUOQKWkw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_q24fXAKOEeSZ5cZUOQKWkw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_q24fXQKOEeSZ5cZUOQKWkw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_q24fXgKOEeSZ5cZUOQKWkw" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_q24fXwKOEeSZ5cZUOQKWkw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_q24fYAKOEeSZ5cZUOQKWkw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_q24fYQKOEeSZ5cZUOQKWkw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_q24fYgKOEeSZ5cZUOQKWkw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_q24fYwKOEeSZ5cZUOQKWkw" type="compartment_sysml_requirement_idinfo_as_list">
+ <children xmi:type="notation:DecorationNode" xmi:id="_q24faAKOEeSZ5cZUOQKWkw" type="label_sysml_requirement_id"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_q24faQKOEeSZ5cZUOQKWkw" type="label_sysml_requirement_text"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_q24fZAKOEeSZ5cZUOQKWkw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_q24fZQKOEeSZ5cZUOQKWkw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_q24fZgKOEeSZ5cZUOQKWkw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_q24fZwKOEeSZ5cZUOQKWkw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_q2-l8AKOEeSZ5cZUOQKWkw" type="compartment_shape_display">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_q2-l8QKOEeSZ5cZUOQKWkw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_q2-l8gKOEeSZ5cZUOQKWkw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_q5K-VgKOEeSZ5cZUOQKWkw" type="AppliedStereotypeCompartement">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_q5RE8AKOEeSZ5cZUOQKWkw" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_q5RE8QKOEeSZ5cZUOQKWkw" key="visible" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_q5K-VwKOEeSZ5cZUOQKWkw" showTitle="true"/>
+ <element xmi:type="Requirements:Requirement" href="modelSysMLRequirement.uml#_q5K-UAKOEeSZ5cZUOQKWkw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_q5K-WAKOEeSZ5cZUOQKWkw"/>
+ </children>
+ <element xmi:type="uml:Class" href="modelSysMLRequirement.uml#_q24fUAKOEeSZ5cZUOQKWkw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_q24fUgKOEeSZ5cZUOQKWkw" x="565" y="11" width="123" height="137"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_tKOa8QKOEeSZ5cZUOQKWkw" type="2007">
+ <children xmi:type="notation:DecorationNode" xmi:id="_tKOa8wKOEeSZ5cZUOQKWkw" type="5026"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_tKOa9AKOEeSZ5cZUOQKWkw" type="7016">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_tKOa9QKOEeSZ5cZUOQKWkw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_tKOa9gKOEeSZ5cZUOQKWkw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_tKUhkAKOEeSZ5cZUOQKWkw" type="compartment_shape_display">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_tKUhkQKOEeSZ5cZUOQKWkw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_tKUhkgKOEeSZ5cZUOQKWkw"/>
+ </children>
+ <element xmi:type="uml:Package" href="modelSysMLRequirement.uml#_tKOa8AKOEeSZ5cZUOQKWkw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_tKOa8gKOEeSZ5cZUOQKWkw" x="12" y="18"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_wDVWEAKOEeSZ5cZUOQKWkw" type="shape_sysml_requirement_as_classifier">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_wDbcsAKOEeSZ5cZUOQKWkw" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_wDbcvAKOEeSZ5cZUOQKWkw" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_wDbcvQKOEeSZ5cZUOQKWkw" key="StereotypeList" value="SysML::Requirements::Requirement"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_wDbcvgKOEeSZ5cZUOQKWkw" key="Stereotype_Presentation_Kind" value="Compartment"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_wDbcvwKOEeSZ5cZUOQKWkw" key="PropStereoDisplay" value="SysML::Requirements::Requirement.id,SysML::Requirements::Requirement.text"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_wDbcwAKOEeSZ5cZUOQKWkw" key="StereotypePropertyLocation" value="Compartment"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_wDVWEgKOEeSZ5cZUOQKWkw" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_wDVWEwKOEeSZ5cZUOQKWkw" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_wDVWFAKOEeSZ5cZUOQKWkw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_wDVWFQKOEeSZ5cZUOQKWkw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_wDVWFgKOEeSZ5cZUOQKWkw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_wDVWFwKOEeSZ5cZUOQKWkw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_wDVWGAKOEeSZ5cZUOQKWkw" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_wDVWGQKOEeSZ5cZUOQKWkw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_wDVWGgKOEeSZ5cZUOQKWkw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_wDVWGwKOEeSZ5cZUOQKWkw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_wDVWHAKOEeSZ5cZUOQKWkw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_wDVWHQKOEeSZ5cZUOQKWkw" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_wDVWHgKOEeSZ5cZUOQKWkw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_wDVWHwKOEeSZ5cZUOQKWkw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_wDVWIAKOEeSZ5cZUOQKWkw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_wDVWIQKOEeSZ5cZUOQKWkw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_wDVWIgKOEeSZ5cZUOQKWkw" type="compartment_sysml_requirement_idinfo_as_list">
+ <children xmi:type="notation:DecorationNode" xmi:id="_wDVWJwKOEeSZ5cZUOQKWkw" type="label_sysml_requirement_id"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_wDVWKAKOEeSZ5cZUOQKWkw" type="label_sysml_requirement_text"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_wDVWIwKOEeSZ5cZUOQKWkw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_wDVWJAKOEeSZ5cZUOQKWkw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_wDVWJQKOEeSZ5cZUOQKWkw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_wDVWJgKOEeSZ5cZUOQKWkw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_wDVWKQKOEeSZ5cZUOQKWkw" type="compartment_shape_display">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_wDVWKgKOEeSZ5cZUOQKWkw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_wDVWKwKOEeSZ5cZUOQKWkw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_wDbcwQKOEeSZ5cZUOQKWkw" type="AppliedStereotypeCompartement">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_wDhjUAKOEeSZ5cZUOQKWkw" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_wDhjUQKOEeSZ5cZUOQKWkw" key="visible" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_wDbcwgKOEeSZ5cZUOQKWkw" showTitle="true"/>
+ <element xmi:type="Requirements:Requirement" href="modelSysMLRequirement.uml#_wDbcuwKOEeSZ5cZUOQKWkw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_wDbcwwKOEeSZ5cZUOQKWkw"/>
+ </children>
+ <element xmi:type="uml:Class" href="modelSysMLRequirement.uml#_wDPPcAKOEeSZ5cZUOQKWkw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_wDVWEQKOEeSZ5cZUOQKWkw" x="297" y="19" width="143"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_xF_s8QKOEeSZ5cZUOQKWkw" type="shape_sysml_requirement_as_classifier">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_xGL6MAKOEeSZ5cZUOQKWkw" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_xGSA0QKOEeSZ5cZUOQKWkw" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_xGSA0gKOEeSZ5cZUOQKWkw" key="StereotypeList" value="SysML::Requirements::Requirement"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_xGSA0wKOEeSZ5cZUOQKWkw" key="Stereotype_Presentation_Kind" value="Compartment"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_xGSA1AKOEeSZ5cZUOQKWkw" key="PropStereoDisplay" value="SysML::Requirements::Requirement.id,SysML::Requirements::Requirement.text"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_xGSA1QKOEeSZ5cZUOQKWkw" key="StereotypePropertyLocation" value="Compartment"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_xF_s8wKOEeSZ5cZUOQKWkw" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_xF_s9AKOEeSZ5cZUOQKWkw" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_xF_s9QKOEeSZ5cZUOQKWkw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_xF_s9gKOEeSZ5cZUOQKWkw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_xF_s9wKOEeSZ5cZUOQKWkw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_xF_s-AKOEeSZ5cZUOQKWkw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_xF_s-QKOEeSZ5cZUOQKWkw" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_xF_s-gKOEeSZ5cZUOQKWkw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_xF_s-wKOEeSZ5cZUOQKWkw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_xF_s_AKOEeSZ5cZUOQKWkw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_xF_s_QKOEeSZ5cZUOQKWkw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_xF_s_gKOEeSZ5cZUOQKWkw" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_xF_s_wKOEeSZ5cZUOQKWkw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_xF_tAAKOEeSZ5cZUOQKWkw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_xF_tAQKOEeSZ5cZUOQKWkw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_xF_tAgKOEeSZ5cZUOQKWkw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_xF_tAwKOEeSZ5cZUOQKWkw" type="compartment_sysml_requirement_idinfo_as_list">
+ <children xmi:type="notation:DecorationNode" xmi:id="_xF_tCAKOEeSZ5cZUOQKWkw" type="label_sysml_requirement_id"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_xF_tCQKOEeSZ5cZUOQKWkw" type="label_sysml_requirement_text"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_xF_tBAKOEeSZ5cZUOQKWkw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_xF_tBQKOEeSZ5cZUOQKWkw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_xF_tBgKOEeSZ5cZUOQKWkw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_xF_tBwKOEeSZ5cZUOQKWkw"/>
+ </children>
+ <element xmi:type="uml:Class" href="modelSysMLRequirement.uml#_xF_s8AKOEeSZ5cZUOQKWkw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_xF_s8gKOEeSZ5cZUOQKWkw" x="658" y="217" width="119"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_yZofEQKOEeSZ5cZUOQKWkw" type="shape_sysml_requirement_as_classifier">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_yZ0sUAKOEeSZ5cZUOQKWkw" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_yZ6y8QKOEeSZ5cZUOQKWkw" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_yZ6y8gKOEeSZ5cZUOQKWkw" key="StereotypeList" value="SysML::Requirements::Requirement"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_yZ6y8wKOEeSZ5cZUOQKWkw" key="Stereotype_Presentation_Kind" value="Compartment"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_yZ6y9AKOEeSZ5cZUOQKWkw" key="PropStereoDisplay" value="SysML::Requirements::Requirement.id,SysML::Requirements::Requirement.text"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_yZ6y9QKOEeSZ5cZUOQKWkw" key="StereotypePropertyLocation" value="Compartment"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_yZofEwKOEeSZ5cZUOQKWkw" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_yZofFAKOEeSZ5cZUOQKWkw" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_yZofFQKOEeSZ5cZUOQKWkw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_yZofFgKOEeSZ5cZUOQKWkw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_yZofFwKOEeSZ5cZUOQKWkw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_yZofGAKOEeSZ5cZUOQKWkw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_yZofGQKOEeSZ5cZUOQKWkw" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_yZofGgKOEeSZ5cZUOQKWkw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_yZofGwKOEeSZ5cZUOQKWkw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_yZofHAKOEeSZ5cZUOQKWkw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_yZofHQKOEeSZ5cZUOQKWkw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_yZofHgKOEeSZ5cZUOQKWkw" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_yZofHwKOEeSZ5cZUOQKWkw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_yZofIAKOEeSZ5cZUOQKWkw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_yZofIQKOEeSZ5cZUOQKWkw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_yZofIgKOEeSZ5cZUOQKWkw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_yZofIwKOEeSZ5cZUOQKWkw" type="compartment_sysml_requirement_idinfo_as_list">
+ <children xmi:type="notation:DecorationNode" xmi:id="_yZofKAKOEeSZ5cZUOQKWkw" type="label_sysml_requirement_id"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_yZofKQKOEeSZ5cZUOQKWkw" type="label_sysml_requirement_text"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_yZofJAKOEeSZ5cZUOQKWkw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_yZofJQKOEeSZ5cZUOQKWkw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_yZofJgKOEeSZ5cZUOQKWkw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_yZofJwKOEeSZ5cZUOQKWkw"/>
+ </children>
+ <element xmi:type="uml:Class" href="modelSysMLRequirement.uml#_yZofEAKOEeSZ5cZUOQKWkw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_yZofEgKOEeSZ5cZUOQKWkw" x="478" y="218" width="147"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_pBS2xQKOEeSZ5cZUOQKWkw"/>
+ <element xmi:type="uml:Model" href="modelSysMLRequirement.uml#_o-VpUAKOEeSZ5cZUOQKWkw"/>
+ </notation:Diagram>
+ <nattable:Table xmi:id="_B7qCgAKPEeSZ5cZUOQKWkw" name="GenericTable0" currentRowAxisProvider="_B7qCggKPEeSZ5cZUOQKWkw" currentColumnAxisProvider="_B7qCgQKPEeSZ5cZUOQKWkw">
+ <context xmi:type="uml:Model" href="modelSysMLRequirement.uml#_o-VpUAKOEeSZ5cZUOQKWkw"/>
+ <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#/"/>
+ <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_B7qCgQKPEeSZ5cZUOQKWkw" description="This axis provider provides available columns according to the rows of the table (features of the object displayed on the other axis)" name="UML Feature axis provider">
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQIgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/attribute"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyAgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/attribute"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjIgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/attribute"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaXwgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/attribute"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQLwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//BehavioredClassifier/classifierBehavior"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyDwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//BehavioredClassifier/classifierBehavior"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjLwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//BehavioredClassifier/classifierBehavior"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaXzwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//BehavioredClassifier/classifierBehavior"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQKQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/clientDependency"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyCQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/clientDependency"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjKQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/clientDependency"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JvzUSgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/clientDependency"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaXyQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/clientDependency"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_Keb76gKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/clientDependency"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQJwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/collaborationUse"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyBwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/collaborationUse"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjJwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/collaborationUse"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaXxwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/collaborationUse"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_JFXQVQKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::derived">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_JWbyNQKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::derived">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_JjNpwQKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::derived">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_KMgeYQKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::derived">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_JFXQXAKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::derivedFrom">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_JWbyPAKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::derivedFrom">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_JjNpyAKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::derivedFrom">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_KMgeaAKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::derivedFrom">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQSgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/elementImport"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyKgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/elementImport"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjSgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/elementImport"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JvzUVAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/elementImport"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX6gKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/elementImport"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_Keb79AKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/elementImport"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQRQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class/extension"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyJQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class/extension"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjRQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class/extension"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX5QKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class/extension"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQMAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/feature"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyEAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/feature"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjMAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/feature"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX0AKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/feature"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQPQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/general"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyHQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/general"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjPQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/general"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX3QKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/general"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQQgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/generalization"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyIgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/generalization"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjQgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/generalization"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX4gKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/generalization"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_JFXQVwKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::id">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_JWbyNwKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::id">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_JjNpwwKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::id">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_KMgeYwKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::id">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQRAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/importedMember"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyJAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/importedMember"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjRAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/importedMember"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JvzUSwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/importedMember"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX5AKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/importedMember"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_Keb76wKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/importedMember"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQSwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/inheritedMember"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyKwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/inheritedMember"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjSwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/inheritedMember"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX6wKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/inheritedMember"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQJAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//BehavioredClassifier/interfaceRealization"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyBAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//BehavioredClassifier/interfaceRealization"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjJAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//BehavioredClassifier/interfaceRealization"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaXxAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//BehavioredClassifier/interfaceRealization"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQKwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/isAbstract"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyCwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/isAbstract"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjKwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/isAbstract"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaXywKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/isAbstract"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQQAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class/isActive"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyIAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class/isActive"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjQAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class/isActive"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX4AKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class/isActive"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQKAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/isFinalSpecialization"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyCAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/isFinalSpecialization"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjKAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/isFinalSpecialization"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaXyAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/isFinalSpecialization"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQMgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//RedefinableElement/isLeaf"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyEgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//RedefinableElement/isLeaf"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjMgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//RedefinableElement/isLeaf"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX0gKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//RedefinableElement/isLeaf"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_JFXQWgKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::master">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_JWbyOgKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::master">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_JjNpxgKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::master">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_KMgeZgKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::master">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQSQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/member"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyKQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/member"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjSQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/member"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JvzUUQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/member"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX6QKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/member"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_Keb78QKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/member"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQUgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyMgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjUgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JvzUWwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX8gKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_Keb7-wKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQJgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/nameExpression"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyBgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/nameExpression"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjJgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/nameExpression"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JvzURQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/nameExpression"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaXxgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/nameExpression"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_Keb75QKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/nameExpression"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQPgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/namespace"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyHgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/namespace"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjPgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/namespace"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JvzUQwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/namespace"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX3gKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/namespace"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_Keb74gKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/namespace"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQTwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class/nestedClassifier"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyLwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class/nestedClassifier"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjTwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class/nestedClassifier"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX7wKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class/nestedClassifier"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JvzURgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Package/nestedPackage"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_Keb75gKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Package/nestedPackage"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JvzUSAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Package/nestingPackage"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_Keb76AKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Package/nestingPackage"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQIwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//StructuredClassifier/ownedAttribute"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyAwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//StructuredClassifier/ownedAttribute"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjIwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//StructuredClassifier/ownedAttribute"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaXwwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//StructuredClassifier/ownedAttribute"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaXygKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//BehavioredClassifier/ownedBehavior"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQKgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//BehavioredClassifier/ownedBehavior"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyCgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//BehavioredClassifier/ownedBehavior"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjKgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//BehavioredClassifier/ownedBehavior"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQJQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Element/ownedComment"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyBQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Element/ownedComment"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjJQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Element/ownedComment"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JvzURAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Element/ownedComment"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaXxQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Element/ownedComment"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_Keb74wKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Element/ownedComment"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQOwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//StructuredClassifier/ownedConnector"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyGwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//StructuredClassifier/ownedConnector"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjOwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//StructuredClassifier/ownedConnector"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX2wKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//StructuredClassifier/ownedConnector"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQIQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Element/ownedElement"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyAQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Element/ownedElement"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjIQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Element/ownedElement"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JvzUQQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Element/ownedElement"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaXwQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Element/ownedElement"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_Keb74AKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Element/ownedElement"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQRgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/ownedMember"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyJgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/ownedMember"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjRgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/ownedMember"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JvzUTQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/ownedMember"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX5gKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/ownedMember"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_Keb77QKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/ownedMember"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQTQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class/ownedOperation"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyLQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class/ownedOperation"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjTQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class/ownedOperation"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX7QKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class/ownedOperation"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQOgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//EncapsulatedClassifier/ownedPort"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyGgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//EncapsulatedClassifier/ownedPort"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjOgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//EncapsulatedClassifier/ownedPort"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX2gKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//EncapsulatedClassifier/ownedPort"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQLgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class/ownedReception"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyDgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class/ownedReception"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjLgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class/ownedReception"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaXzgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class/ownedReception"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQUQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/ownedRule"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyMQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/ownedRule"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjUQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/ownedRule"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JvzUWAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/ownedRule"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX8QKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/ownedRule"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_Keb7-AKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/ownedRule"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JvzUUwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Package/ownedStereotype"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_Keb78wKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Package/ownedStereotype"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQNQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//TemplateableElement/ownedTemplateSignature"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyFQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//TemplateableElement/ownedTemplateSignature"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjNQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//TemplateableElement/ownedTemplateSignature"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JvzUVQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//TemplateableElement/ownedTemplateSignature"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX1QKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//TemplateableElement/ownedTemplateSignature"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_Keb79QKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//TemplateableElement/ownedTemplateSignature"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JvzUSQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Package/ownedType"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_Keb76QKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Package/ownedType"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQTAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/ownedUseCase"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyLAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/ownedUseCase"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjTAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/ownedUseCase"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX7AKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/ownedUseCase"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQSAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Element/owner"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyKAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Element/owner"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjSAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Element/owner"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JvzUTwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Element/owner"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX6AKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Element/owner"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_Keb77wKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Element/owner"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQMQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//ParameterableElement/owningTemplateParameter"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyEQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//ParameterableElement/owningTemplateParameter"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjMQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//ParameterableElement/owningTemplateParameter"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JvzUUAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//ParameterableElement/owningTemplateParameter"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX0QKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//ParameterableElement/owningTemplateParameter"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_Keb78AKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//ParameterableElement/owningTemplateParameter"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQRwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Type/package"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyJwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Type/package"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjRwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Type/package"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX5wKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Type/package"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JvzUQgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Package/packagedElement"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_Keb74QKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Package/packagedElement"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQMwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/packageImport"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyEwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/packageImport"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjMwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/packageImport"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JvzUUgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/packageImport"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX0wKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/packageImport"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_Keb78gKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/packageImport"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JvzUTgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Package/packageMerge"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_Keb77gKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Package/packageMerge"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQPAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//StructuredClassifier/part"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyHAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//StructuredClassifier/part"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjPAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//StructuredClassifier/part"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX3AKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//StructuredClassifier/part"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQLQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/powertypeExtent"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyDQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/powertypeExtent"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjLQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/powertypeExtent"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaXzQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/powertypeExtent"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JvzUTAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Package/profileApplication"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_Keb77AKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Package/profileApplication"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQOQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/qualifiedName"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyGQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/qualifiedName"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjOQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/qualifiedName"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JvzUVwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/qualifiedName"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX2QKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/qualifiedName"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_Keb79wKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/qualifiedName"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQPwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/redefinedClassifier"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyHwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/redefinedClassifier"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjPwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/redefinedClassifier"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX3wKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/redefinedClassifier"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQNgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//RedefinableElement/redefinedElement"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyFgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//RedefinableElement/redefinedElement"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjNgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//RedefinableElement/redefinedElement"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX1gKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//RedefinableElement/redefinedElement"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQOAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//RedefinableElement/redefinitionContext"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyGAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//RedefinableElement/redefinitionContext"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjOAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//RedefinableElement/redefinitionContext"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX2AKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//RedefinableElement/redefinitionContext"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_JFXQVAKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::refinedBy">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_JWbyNAKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::refinedBy">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_JjNpwAKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::refinedBy">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_KMgeYAKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::refinedBy">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQUwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/representation"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyMwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/representation"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjUwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/representation"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX8wKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/representation"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQNAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//StructuredClassifier/role"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyFAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//StructuredClassifier/role"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjNAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//StructuredClassifier/role"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX1AKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//StructuredClassifier/role"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_JFXQWAKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::satisfiedBy">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_JWbyOAKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::satisfiedBy">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_JjNpxAKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::satisfiedBy">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_KMgeZAKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::satisfiedBy">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQQwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/substitution"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyIwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/substitution"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjQwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/substitution"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX4wKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/substitution"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQTgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class/superClass"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyLgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class/superClass"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjTgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class/superClass"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX7gKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class/superClass"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQQQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//TemplateableElement/templateBinding"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyIQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//TemplateableElement/templateBinding"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjQQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//TemplateableElement/templateBinding"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JvzURwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//TemplateableElement/templateBinding"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX4QKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//TemplateableElement/templateBinding"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_Keb75wKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//TemplateableElement/templateBinding"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQNwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//ParameterableElement/templateParameter"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyFwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//ParameterableElement/templateParameter"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjNwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//ParameterableElement/templateParameter"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JvzUVgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//ParameterableElement/templateParameter"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX1wKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//ParameterableElement/templateParameter"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_Keb79gKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//ParameterableElement/templateParameter"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_JFXQWQKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::text">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_JWbyOQKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::text">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_JjNpxQKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::text">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_KMgeZQKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::text">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_JFXQWwKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::tracedTo">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_JWbyOwKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::tracedTo">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_JjNpxwKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::tracedTo">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_KMgeZwKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::tracedTo">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JvzUWgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//Package/URI"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_Keb7-gKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//Package/URI"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQLAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/useCase"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyDAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/useCase"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjLAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/useCase"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaXzAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/useCase"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_JFXQVgKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::verifiedBy">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_JWbyNgKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::verifiedBy">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_JjNpwgKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::verifiedBy">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_KMgeYgKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::verifiedBy">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_Keb75AKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//Model/viewpoint"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQUAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/visibility"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyMAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/visibility"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjUAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/visibility"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JvzUWQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/visibility"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX8AKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/visibility"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_Keb7-QKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/visibility"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr18QNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/clientDependency"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr18gNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//StructuralFeature/isReadOnly"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr18wNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Property/redefinedProperty"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr19ANfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Property/subsettedProperty"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr19QNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/visibility"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr19gNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//MultiplicityElement/lowerValue"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr19wNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//Property/isComposite.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr1-ANfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//Property/aggregation"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr1-QNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Element/ownedComment"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr1-gNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Property/qualifier"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr1-wNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Port/required"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr1_ANfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Port/protocol"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr1_QNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//MultiplicityElement/isUnique"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr1_gNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//Port/isService"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr1_wNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Property/interface"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2AANfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Property/associationEnd"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2AQNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Port/redefinedPort"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2AgNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//TypedElement/type"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2AwNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Port/provided"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2BANfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Element/owner"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2BQNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Property/defaultValue"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2BgNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/namespace"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2BwNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Element/ownedElement"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2CANfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//RedefinableElement/redefinitionContext"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2CQNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//Feature/isStatic"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2CgNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Feature/featuringClassifier"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2CwNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//DeploymentTarget/deployment"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2DANfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//Port/isBehavior"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2DQNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//MultiplicityElement/upperValue"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2DgNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Property/class"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2DwNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//MultiplicityElement/isOrdered"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2EANfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//ConnectableElement/end"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2EQNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//Property/isDerived"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2EgNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//RedefinableElement/redefinedElement"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2EwNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//Property/default"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2FANfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//RedefinableElement/isLeaf"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2FQNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Property/opposite"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2FgNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2FwNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//DeploymentTarget/deployedElement"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2GANfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Property/datatype"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2GQNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Property/owningAssociation"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2GgNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/qualifiedName"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2GwNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Property/association"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2HANfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//ParameterableElement/templateParameter"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2HQNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//ParameterableElement/owningTemplateParameter"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2HgNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//Property/isID"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2HwNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//MultiplicityElement/upper"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2IANfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//Port/isConjugated"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2IQNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/nameExpression"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2IgNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//Property/isDerivedUnion"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2IwNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//MultiplicityElement/lower"/>
+ </axis>
+ </columnAxisProvidersHistory>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_B7qCggKPEeSZ5cZUOQKWkw" description="This axis provider contains the object dropped by the user into the table" name="DroppedElementAxisProvider">
+ <axis xmi:type="nattableaxis:EObjectAxis" xmi:id="_KeV1QAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@rowHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="uml:Model" href="modelSysMLRequirement.uml#_o-VpUAKOEeSZ5cZUOQKWkw"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EObjectAxis" xmi:id="_JvzUQAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@rowHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="uml:Package" href="modelSysMLRequirement.uml#_tKOa8AKOEeSZ5cZUOQKWkw"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EObjectAxis" xmi:id="_KMaXwAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@rowHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="uml:Class" href="modelSysMLRequirement.uml#_xF_s8AKOEeSZ5cZUOQKWkw"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EObjectAxis" xmi:id="_JFXQIAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@rowHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="uml:Class" href="modelSysMLRequirement.uml#_wDPPcAKOEeSZ5cZUOQKWkw"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EObjectAxis" xmi:id="_JWbyAAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@rowHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="uml:Class" href="modelSysMLRequirement.uml#_yZofEAKOEeSZ5cZUOQKWkw"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EObjectAxis" xmi:id="_JjHjIAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@rowHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="uml:Class" href="modelSysMLRequirement.uml#_q24fUAKOEeSZ5cZUOQKWkw"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EObjectAxis" xmi:id="_pEr18ANfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@rowHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="uml:Port" href="modelSysMLRequirement.uml#_mCmlAANfEeSV3fVidaLvSQ"/>
+ </axis>
+ </rowAxisProvidersHistory>
+ </nattable:Table>
+ <nattable:Table xmi:id="_C2IGsAKPEeSZ5cZUOQKWkw" name="RequirementTable0" currentRowAxisProvider="_C2IGtQKPEeSZ5cZUOQKWkw" currentColumnAxisProvider="_C2IGsQKPEeSZ5cZUOQKWkw">
+ <context xmi:type="uml:Model" href="modelSysMLRequirement.uml#_o-VpUAKOEeSZ5cZUOQKWkw"/>
+ <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#/"/>
+ <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_C2IGsQKPEeSZ5cZUOQKWkw" description="Provides the columns of the tables with a default configuration" name="Requirements Feature Columns Provider">
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_C2IGsgKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::id">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_C2IGswKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_C2IGtAKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::text">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ </columnAxisProvidersHistory>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_C2IGtQKPEeSZ5cZUOQKWkw" description="Provides the requirements directly owned by the context of the table" name="Requirement Axis Provider" disconnectSlave="true"/>
+ </nattable:Table>
+ <nattable:Table xmi:id="_EGhXkAKPEeSZ5cZUOQKWkw" name="TableOfViews0" currentRowAxisProvider="_EGhXlgKPEeSZ5cZUOQKWkw" currentColumnAxisProvider="_EGhXkQKPEeSZ5cZUOQKWkw">
+ <context xmi:type="uml:Model" href="modelSysMLRequirement.uml#_o-VpUAKOEeSZ5cZUOQKWkw"/>
+ <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.infra.nattable.views.config/resources/viewpage.nattableconfiguration#/"/>
+ <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_EGhXkQKPEeSZ5cZUOQKWkw" description="Provides the features of the views" name="Papyrus Views feature provider">
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_EGhXkgKPEeSZ5cZUOQKWkw" element="nattable_editor_pages:/name">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.infra.nattable.views.config/resources/viewpage.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_EGhXkwKPEeSZ5cZUOQKWkw" element="nattable_editor_pages:/context">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.infra.nattable.views.config/resources/viewpage.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_EGhXlAKPEeSZ5cZUOQKWkw" element="nattable_editor_pages:/isOpen">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.infra.nattable.views.config/resources/viewpage.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_EGhXlQKPEeSZ5cZUOQKWkw" element="nattable_editor_pages:/type">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.infra.nattable.views.config/resources/viewpage.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ </axis>
+ </columnAxisProvidersHistory>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_EGhXlgKPEeSZ5cZUOQKWkw"/>
+ </nattable:Table>
+ <nattable:Table xmi:id="_ffxOYAKUEeSZ5cZUOQKWkw" name="RequirementTable1" currentRowAxisProvider="_ffxOZQKUEeSZ5cZUOQKWkw" currentColumnAxisProvider="_ffxOYQKUEeSZ5cZUOQKWkw">
+ <context xmi:type="uml:Class" href="modelSysMLRequirement.uml#_q24fUAKOEeSZ5cZUOQKWkw"/>
+ <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#/"/>
+ <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_ffxOYQKUEeSZ5cZUOQKWkw" description="Provides the columns of the tables with a default configuration" name="Requirements Feature Columns Provider">
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_ffxOYgKUEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::id">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_ffxOYwKUEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_ffxOZAKUEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::text">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_yaOl0ANbEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/namespace"/>
+ </axis>
+ </columnAxisProvidersHistory>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_ffxOZQKUEeSZ5cZUOQKWkw" description="Provides the requirements directly owned by the context of the table" name="Requirement Axis Provider" disconnectSlave="true"/>
+ </nattable:Table>
+ <nattable:Table xmi:id="_ZfPQ8Av4EeSOiKqWiKPo8w" name="AllocationTable0" currentRowAxisProvider="_ZfP4AQv4EeSOiKqWiKPo8w" currentColumnAxisProvider="_ZfPQ8Qv4EeSOiKqWiKPo8w">
+ <context xmi:type="uml:Model" href="modelSysMLRequirement.uml#_o-VpUAKOEeSZ5cZUOQKWkw"/>
+ <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.allocation.config/resources/allocation.nattableconfiguration#/"/>
+ <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_ZfPQ8Qv4EeSOiKqWiKPo8w" description="This provider provides the default columns for the SysML Allocation Table" name="SysMLAllocationFeatureProvider">
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_ZfPQ8gv4EeSOiKqWiKPo8w">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.allocation.config/resources/allocation.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_ZfPQ8wv4EeSOiKqWiKPo8w">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.allocation.config/resources/allocation.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Dependency/client"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_ZfPQ9Av4EeSOiKqWiKPo8w">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.allocation.config/resources/allocation.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Dependency/supplier"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_ZfP4AAv4EeSOiKqWiKPo8w">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.allocation.config/resources/allocation.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Element/owner"/>
+ </axis>
+ </columnAxisProvidersHistory>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_ZfP4AQv4EeSOiKqWiKPo8w" description="This row providers allows to display all Allocation in a Table" name="SysMLAllocationProvider" disconnectSlave="true"/>
+ </nattable:Table>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.allocation.tests/resources/modelSysMLRequirement.uml b/tests/org.eclipse.papyrus.sysml.nattable.allocation.tests/resources/modelSysMLRequirement.uml
new file mode 100755
index 0000000..cb184a0
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.allocation.tests/resources/modelSysMLRequirement.uml
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20110701" xmlns:xmi="http://www.omg.org/spec/XMI/20110701" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Allocations="http://www.eclipse.org/papyrus/0.7.0/SysML/Allocations" xmlns:Requirements="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Allocations http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements">
+ <uml:Model xmi:id="_o-VpUAKOEeSZ5cZUOQKWkw" name="SysMLmodel">
+ <packagedElement xmi:type="uml:Package" xmi:id="_tKOa8AKOEeSZ5cZUOQKWkw" name="Star Fighter">
+ <packagedElement xmi:type="uml:Class" xmi:id="_YNurgAKREeSZ5cZUOQKWkw" name="Requirement"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_q24fUAKOEeSZ5cZUOQKWkw" name="Durability" isActive="true">
+ <ownedAttribute xmi:type="uml:Port" xmi:id="_mCmlAANfEeSV3fVidaLvSQ" name="port" visibility="public" isReadOnly="true" aggregation="composite"/>
+ <nestedClassifier xmi:type="uml:Class" xmi:id="_wDPPcAKOEeSZ5cZUOQKWkw" name="Engine">
+ <nestedClassifier xmi:type="uml:Class" xmi:id="_yZofEAKOEeSZ5cZUOQKWkw" name="Maneuverability"/>
+ </nestedClassifier>
+ <nestedClassifier xmi:type="uml:Class" xmi:id="_xF_s8AKOEeSZ5cZUOQKWkw" name="Shield"/>
+ </packagedElement>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Abstraction" xmi:id="_bVbWgAv4EeSOiKqWiKPo8w" name="Allocate"/>
+ <packagedElement xmi:type="uml:Abstraction" xmi:id="_cGN6QAv4EeSOiKqWiKPo8w" name="Allocate1"/>
+ <packagedElement xmi:type="uml:Abstraction" xmi:id="_cg0yoAv4EeSOiKqWiKPo8w" name="Allocate2"/>
+ <packagedElement xmi:type="uml:Abstraction" xmi:id="_c8TNsAv4EeSOiKqWiKPo8w" name="Allocate3"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_o-0KcAKOEeSZ5cZUOQKWkw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_o-0KcQKOEeSZ5cZUOQKWkw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_TZ_nULU5EduiKqCzJMWbGw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_pBS2sAKOEeSZ5cZUOQKWkw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_pBS2sQKOEeSZ5cZUOQKWkw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_pBS2sgKOEeSZ5cZUOQKWkw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_pBS2swKOEeSZ5cZUOQKWkw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_pBS2tAKOEeSZ5cZUOQKWkw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_pBS2tQKOEeSZ5cZUOQKWkw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_pBS2tgKOEeSZ5cZUOQKWkw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_pBS2twKOEeSZ5cZUOQKWkw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_5WYJ0LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_pBS2uAKOEeSZ5cZUOQKWkw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_pBS2uQKOEeSZ5cZUOQKWkw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//activities"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_C2zXMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_pBS2ugKOEeSZ5cZUOQKWkw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_pBS2uwKOEeSZ5cZUOQKWkw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_pBS2vAKOEeSZ5cZUOQKWkw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_pBS2vQKOEeSZ5cZUOQKWkw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_pBS2vgKOEeSZ5cZUOQKWkw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_pBS2vwKOEeSZ5cZUOQKWkw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//interactions"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_meOioLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_pBS2wAKOEeSZ5cZUOQKWkw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_pBS2wQKOEeSZ5cZUOQKWkw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//statemachines"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_nAF5kLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_pBS2wgKOEeSZ5cZUOQKWkw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_pBS2wwKOEeSZ5cZUOQKWkw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//usecases"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_neZmMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Requirements:Requirement xmi:id="_q5K-UAKOEeSZ5cZUOQKWkw" id="1" base_Class="_q24fUAKOEeSZ5cZUOQKWkw"/>
+ <Requirements:Requirement xmi:id="_wDbcuwKOEeSZ5cZUOQKWkw" id="1.2" base_Class="_wDPPcAKOEeSZ5cZUOQKWkw"/>
+ <Requirements:Requirement xmi:id="_xGSA0AKOEeSZ5cZUOQKWkw" text="none" id="1.1" base_Class="_xF_s8AKOEeSZ5cZUOQKWkw"/>
+ <Requirements:Requirement xmi:id="_yZ6y8AKOEeSZ5cZUOQKWkw" text="Huge" id="1.2.1" base_Class="_yZofEAKOEeSZ5cZUOQKWkw"/>
+ <Requirements:Requirement xmi:id="_YN0yIAKREeSZ5cZUOQKWkw" base_Class="_YNurgAKREeSZ5cZUOQKWkw"/>
+ <Allocations:Allocate xmi:id="_bVg2EAv4EeSOiKqWiKPo8w" base_Abstraction="_bVbWgAv4EeSOiKqWiKPo8w"/>
+ <Allocations:Allocate xmi:id="_cGPIYAv4EeSOiKqWiKPo8w" base_Abstraction="_cGN6QAv4EeSOiKqWiKPo8w"/>
+ <Allocations:Allocate xmi:id="_cg1ZsAv4EeSOiKqWiKPo8w" base_Abstraction="_cg0yoAv4EeSOiKqWiKPo8w"/>
+ <Allocations:Allocate xmi:id="_c8T0wAv4EeSOiKqWiKPo8w" base_Abstraction="_c8TNsAv4EeSOiKqWiKPo8w"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.allocation.tests/src/org/eclipse/papyrus/sysml/nattable/allocation/tests/Activator.java b/tests/org.eclipse.papyrus.sysml.nattable.allocation.tests/src/org/eclipse/papyrus/sysml/nattable/allocation/tests/Activator.java
new file mode 100755
index 0000000..6f3f073
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.allocation.tests/src/org/eclipse/papyrus/sysml/nattable/allocation/tests/Activator.java
@@ -0,0 +1,70 @@
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ * Quentin Le Menez (CEA LIST) quentin.lemenez@cea.fr
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.nattable.allocation.tests;
+
+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.sysml.nattable.allocation.tests"; //$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)
+ */
+ @Override
+ 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)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.allocation.tests/src/org/eclipse/papyrus/sysml/nattable/allocation/tests/tests/AllTests.java b/tests/org.eclipse.papyrus.sysml.nattable.allocation.tests/src/org/eclipse/papyrus/sysml/nattable/allocation/tests/tests/AllTests.java
new file mode 100755
index 0000000..241c2d3
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.allocation.tests/src/org/eclipse/papyrus/sysml/nattable/allocation/tests/tests/AllTests.java
@@ -0,0 +1,25 @@
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ * Quentin Le Menez (CEA LIST) quentin.lemenez@cea.fr
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.nattable.allocation.tests.tests;
+
+import org.junit.runner.RunWith;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.junit.runners.Suite.SuiteClasses;
+
+@RunWith(ClassificationSuite.class)
+@SuiteClasses({ RevealAllocationTableTest.class })
+public class AllTests {
+ // JUnit 4 test suite
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.allocation.tests/src/org/eclipse/papyrus/sysml/nattable/allocation/tests/tests/RevealAllocationTableTest.java b/tests/org.eclipse.papyrus.sysml.nattable.allocation.tests/src/org/eclipse/papyrus/sysml/nattable/allocation/tests/tests/RevealAllocationTableTest.java
new file mode 100755
index 0000000..ea46a72
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.allocation.tests/src/org/eclipse/papyrus/sysml/nattable/allocation/tests/tests/RevealAllocationTableTest.java
@@ -0,0 +1,303 @@
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ * Quentin Le Menez (CEA LIST) quentin.lemenez@cea.fr
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.nattable.allocation.tests.tests;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.nebula.widgets.nattable.selection.SelectionLayer;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+import org.eclipse.papyrus.infra.nattable.utils.AxisUtils;
+import org.eclipse.papyrus.infra.widgets.util.NavigationTarget;
+import org.eclipse.papyrus.junit.utils.tests.AbstractEditorTest;
+import org.eclipse.papyrus.sysml.allocations.Allocate;
+import org.eclipse.papyrus.sysml.nattable.allocation.tests.Activator;
+import org.eclipse.ui.ISelectionService;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.uml2.uml.Abstraction;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.Package;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.osgi.framework.Bundle;
+
+
+public class RevealAllocationTableTest extends AbstractEditorTest {
+
+ protected Resource di;
+
+ protected Resource notation;
+
+ protected Resource uml;
+
+ protected Model rootModel;
+
+ protected List<Abstraction> elementListTest;
+
+ protected Package packageTest;
+
+ protected Allocate allocateTest;
+
+ protected Abstraction allocateAbstraction;
+
+
+ /**
+ *
+ * Constructor.
+ * This plugin test the ModelExplorerView
+ */
+ public RevealAllocationTableTest() {
+ super();
+ }
+
+ @Before
+ public void initTests() throws CoreException, IOException {
+ try {
+ initModel("RevealRequirementTableTest", "modelSysMLRequirement", getBundle()); //$NON-NLS-1$ //$NON-NLS-2$
+ } catch (final Exception e) {
+ e.printStackTrace();
+ }
+
+ ResourceSet set = null;
+ try {
+ set = getModelSet();
+ } catch (final ServiceException e) {
+ e.printStackTrace();
+ }
+
+ final List<Resource> resources = set.getResources();
+
+ for(final Resource current : resources) {
+ if(current.getURI().lastSegment().equals("modelSysMLRequirement.uml")) { //$NON-NLS-1$
+ this.uml = current;
+ } else if(current.getURI().lastSegment().equals("modelSysMLRequirement.notation")) { //$NON-NLS-1$
+ this.notation = current;
+ } else if(current.getURI().lastSegment().equals("modelSysMLRequirement.di")) { //$NON-NLS-1$
+ this.di = current;
+ }
+ }
+
+ this.rootModel = (Model)this.uml.getContents().get(0);
+ }
+
+
+ /**
+ * select an element from the model and seek it in the allocation table,
+ * then proceed to check that its row has been correctly selected and that none of the columns are
+ */
+ @Test
+ public void test1SelectElement() {
+ // select the element
+ this.allocateTest = (Allocate)this.uml.getContents().get(6);
+ this.allocateAbstraction = this.allocateTest.getBase_Abstraction();
+
+ // select the page, corresponding to the requirement table used to test the behavior, in the multidiagram view
+ selectTablePage(5);
+
+ final INattableModelManager manager = this.editor.getAdapter(INattableModelManager.class);
+ // verify that the axis is not inverted
+ if(manager.getTable().isInvertAxis()) {
+ manager.invertAxis();
+ }
+
+ Assert.assertTrue(this.editor.getActiveEditor() instanceof NavigationTarget);
+ // spoofs the behavior when the link with editor button is activated
+ ((NavigationTarget)this.editor.getActiveEditor()).revealElement(this.allocateAbstraction);
+ final ISelectionService serv = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService();
+ final ISelection selection = serv.getSelection();
+
+ Assert.assertTrue(selection instanceof IStructuredSelection);
+ final Object currentAxisObject = ((IStructuredSelection)selection).getFirstElement();
+ final Object currentRealObject = AxisUtils.getRepresentedElement(currentAxisObject);
+ // verify that the same element has been selected on both sides
+ Assert.assertTrue("failed to match the selection with: " + this.allocateAbstraction, this.allocateAbstraction.equals(currentRealObject)); //$NON-NLS-1$
+
+ final SelectionLayer layer = manager.getBodyLayerStack().getSelectionLayer();
+ final int[] rowSelectedPositions = layer.getFullySelectedRowPositions();
+ final int[] columnSelectedPositions = layer.getFullySelectedColumnPositions();
+ // verify that the line selected is indeed the line corresponding to the element selected in the model explorer
+ Assert.assertTrue("index of row does not match: " + rowSelectedPositions[0], rowSelectedPositions[0] == 0); //$NON-NLS-1$
+ Assert.assertTrue("number of selected columns does not match: " + columnSelectedPositions.length, columnSelectedPositions.length == 0); //$NON-NLS-1$
+
+ }
+
+
+ /**
+ * select an element from the model and seek it in the allocation table that has had its axis inverted,
+ * then proceed to check that its column has been correctly selected and that none of the rows are
+ */
+ @Test
+ public void test2SelectElementInvertAxis() {
+ this.allocateTest = (Allocate)this.uml.getContents().get(6);
+ this.allocateAbstraction = this.allocateTest.getBase_Abstraction();
+
+ selectTablePage(5);
+
+ final INattableModelManager manager = this.editor.getAdapter(INattableModelManager.class);
+ if(!manager.getTable().isInvertAxis()) {
+ manager.invertAxis();
+ }
+
+ Assert.assertTrue(this.editor.getActiveEditor() instanceof NavigationTarget);
+ ((NavigationTarget)this.editor.getActiveEditor()).revealElement(this.allocateAbstraction);
+ final ISelectionService serv = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService();
+ final ISelection selection = serv.getSelection();
+
+ Assert.assertTrue(selection instanceof IStructuredSelection);
+ final Object currentAxisObject = ((IStructuredSelection)selection).getFirstElement();
+ final Object currentRealObject = AxisUtils.getRepresentedElement(currentAxisObject);
+ Assert.assertTrue("failed to match the selection with: " + this.allocateAbstraction, this.allocateAbstraction.equals(currentRealObject)); //$NON-NLS-1$
+
+ final SelectionLayer layer = manager.getBodyLayerStack().getSelectionLayer();
+ final int[] rowSelectedPositions = layer.getFullySelectedRowPositions();
+ final int[] columnSelectedPositions = layer.getFullySelectedColumnPositions();
+ Assert.assertTrue("index of row does not match: " + columnSelectedPositions[0], columnSelectedPositions[0] == 0); //$NON-NLS-1$
+ Assert.assertTrue("number of selected columns does not match: " + rowSelectedPositions.length, rowSelectedPositions.length == 0); //$NON-NLS-1$
+
+ }
+
+
+ /**
+ * select multiple elements from the model and seek them in the allocation table,
+ * then proceed to check that their rows have been correctly selected and that none of the columns are
+ */
+ @Test
+ public void test3SelectMultipleElements() {
+
+ this.elementListTest = buildList();
+
+ selectTablePage(5);
+
+ final INattableModelManager manager = this.editor.getAdapter(INattableModelManager.class);
+ if(manager.getTable().isInvertAxis()) {
+ manager.invertAxis();
+ }
+
+ Assert.assertTrue(this.editor.getActiveEditor() instanceof NavigationTarget);
+ ((NavigationTarget)this.editor.getActiveEditor()).revealElement(this.elementListTest);
+ final ISelectionService serv = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService();
+ final ISelection selection = serv.getSelection();
+
+ Assert.assertTrue(selection instanceof IStructuredSelection);
+ final List<?> selectedRowElements = ((IStructuredSelection)selection).toList();
+ for(int index = 0; index < selectedRowElements.size(); index++) {
+ final Object currentAxisObject = selectedRowElements.get(index);
+ final Object currentRealObject = AxisUtils.getRepresentedElement(currentAxisObject);
+ Assert.assertTrue("failed to match the selection", this.elementListTest.contains(currentRealObject)); //$NON-NLS-1$
+ }
+
+ final SelectionLayer layer = manager.getBodyLayerStack().getSelectionLayer();
+ final int[] rowSelectedPositions = layer.getFullySelectedRowPositions();
+ final int[] columnSelectedPositions = layer.getFullySelectedColumnPositions();
+
+ Assert.assertTrue("index of row does not match", rowSelectedPositions.length == 3); //$NON-NLS-1$
+ final List rowSelectedPositionsAsList = Arrays.asList(rowSelectedPositions[0], rowSelectedPositions[1], rowSelectedPositions[2]);
+ Assert.assertTrue("index of row does not match", rowSelectedPositionsAsList.contains(0)); //$NON-NLS-1$
+ Assert.assertTrue("index of row does not match", rowSelectedPositionsAsList.contains(1)); //$NON-NLS-1$
+ Assert.assertTrue("index of row does not match", rowSelectedPositionsAsList.contains(2)); //$NON-NLS-1$
+ Assert.assertTrue("number of selected columns does not match: " + columnSelectedPositions.length, columnSelectedPositions.length == 0); //$NON-NLS-1$
+
+ }
+
+
+ /**
+ * select multiple elements from the model and seek them in the allocation table that has had its axis inverted,
+ * then proceed to check that their columns have been correctly selected and that none of the rows are
+ */
+ @Test
+ public void test4SelectMultipleElementsInvertAxis() {
+
+ this.elementListTest = buildList();
+
+ selectTablePage(5);
+
+ final INattableModelManager manager = this.editor.getAdapter(INattableModelManager.class);
+ if(!manager.getTable().isInvertAxis()) {
+ manager.invertAxis();
+ }
+
+ Assert.assertTrue(this.editor.getActiveEditor() instanceof NavigationTarget);
+ ((NavigationTarget)this.editor.getActiveEditor()).revealElement(this.elementListTest);
+ final ISelectionService serv = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService();
+ final ISelection selection = serv.getSelection();
+
+ Assert.assertTrue(selection instanceof IStructuredSelection);
+ final List<?> selectedRowElements = ((IStructuredSelection)selection).toList();
+ for(int index = 0; index < selectedRowElements.size(); index++) {
+ final Object currentAxisObject = selectedRowElements.get(index);
+ final Object currentRealObject = AxisUtils.getRepresentedElement(currentAxisObject);
+ Assert.assertTrue("failed to match the selection", this.elementListTest.contains(currentRealObject)); //$NON-NLS-1$
+ }
+
+ final SelectionLayer layer = manager.getBodyLayerStack().getSelectionLayer();
+ final int[] rowSelectedPositions = layer.getFullySelectedRowPositions();
+ final int[] columnSelectedPositions = layer.getFullySelectedColumnPositions();
+
+ Assert.assertTrue("index of row does not match", columnSelectedPositions.length == 3); //$NON-NLS-1$
+ final List columnSelectedPositionsAsList = Arrays.asList(columnSelectedPositions[0], columnSelectedPositions[1], columnSelectedPositions[2]);
+ Assert.assertTrue("index of row does not match", columnSelectedPositionsAsList.contains(0)); //$NON-NLS-1$
+ Assert.assertTrue("index of row does not match", columnSelectedPositionsAsList.contains(1)); //$NON-NLS-1$
+ Assert.assertTrue("index of row does not match", columnSelectedPositionsAsList.contains(2)); //$NON-NLS-1$
+ Assert.assertTrue("number of selected columns does not match: " + rowSelectedPositions.length, rowSelectedPositions.length == 0); //$NON-NLS-1$
+
+ }
+
+
+ @Override
+ protected Bundle getBundle() {
+ return Activator.getDefault().getBundle();
+ }
+
+ @Override
+ protected String getSourcePath() {
+ return "resources/"; //$NON-NLS-1$
+ }
+
+ protected void selectTablePage(final int index) {
+ try {
+ final Object tablePage = getPageManager().allPages().get(index);
+ // getPageManager().closeAllOpenedPages();
+ // getPageManager().openPage(tablePage);
+ getPageManager().selectPage(tablePage);
+ } catch (final ServiceException e) {
+ Activator.log.error(e);
+ }
+ }
+
+ protected List<Abstraction> buildList() {
+ final List<Abstraction> listAbs = new ArrayList<Abstraction>();
+ this.allocateTest = (Allocate)this.uml.getContents().get(6);
+ this.allocateAbstraction = this.allocateTest.getBase_Abstraction();
+ listAbs.add(this.allocateAbstraction);
+ this.allocateTest = (Allocate)this.uml.getContents().get(7);
+ this.allocateAbstraction = this.allocateTest.getBase_Abstraction();
+ listAbs.add(this.allocateAbstraction);
+ this.allocateTest = (Allocate)this.uml.getContents().get(8);
+ this.allocateAbstraction = this.allocateTest.getBase_Abstraction();
+ listAbs.add(this.allocateAbstraction);
+
+ return listAbs;
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/.classpath b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/.classpath
new file mode 100755
index 0000000..eca7bdb
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/.project b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/.project
new file mode 100755
index 0000000..79c3999
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.sysml.nattable.requirement.tests</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/.settings/org.eclipse.jdt.core.prefs b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 0000000..b3aa6d6
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,291 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/.settings/org.eclipse.jdt.ui.prefs b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/.settings/org.eclipse.jdt.ui.prefs
new file mode 100755
index 0000000..954281d
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,68 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+formatter_profile=_Papyrus
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/META-INF/MANIFEST.MF
new file mode 100755
index 0000000..863627e
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,101 @@
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.papyrus.infra.core.log;bundle-version="[1.2.0,2.0.0)",
+ org.junit,
+ org.eclipse.uml2.uml;bundle-version="4.1.0",
+ org.eclipse.papyrus.junit.framework;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.papyrus.views.modelexplorer;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.emf.transaction,
+ org.eclipse.papyrus.infra.nattable.common;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.sysml.nattable.requirement;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.papyrus.sysml.nattable.requirement.config;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.papyrus.infra.nattable;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.infra.nattable.model,
+ org.eclipse.gmf.runtime.emf.core;bundle-version="1.7.0",
+ org.eclipse.gmf.runtime.emf.type.core,
+ org.eclipse.papyrus.sysml.service.types;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.infra.services.edit;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.infra.core.sasheditor;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.infra.core;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.infra.widgets;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.nebula.widgets.nattable.core;bundle-version="[1.5.0,2.0.0)",
+ org.eclipse.papyrus.junit.utils;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.infra.tools;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.uml.nattable;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.infra.emf.nattable;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.uml.extensionpoints;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.ui.navigator;bundle-version="3.5.500",
+ org.eclipse.papyrus.infra.ui;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.infra.core.sashwindows.di;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.papyrus.infra.nattable.gmfdiag;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.nattable.model.edit;bundle-version="2.0.0",
+ org.eclipse.papyrus.infra.nattable.properties;bundle-version="2.2.0",
+ org.eclipse.papyrus.infra.nattable.views.config;bundle-version="3.0.0",
+ org.eclipse.papyrus.infra.nattable.views.editor;bundle-version="1.2.0",
+ org.eclipse.papyrus.sysml.nattable;bundle-version="2.0.0",
+ org.eclipse.papyrus.uml.nattable.generic;bundle-version="1.2.0",
+ org.eclipse.papyrus.uml.nattable.menu;bundle-version="1.2.0",
+ org.eclipse.papyrus.sysml.architecture;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.gmfdiag.modelexplorer;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.nattable.modelexplorer;bundle-version="3.0.0",
+ org.eclipse.papyrus.sysml.modelexplorer;bundle-version="1.2.0",
+ org.eclipse.papyrus.uml.diagram.modelexplorer;bundle-version="1.2.0",
+ org.eclipse.papyrus.uml.modelexplorer;bundle-version="2.0.0",
+ org.eclipse.papyrus.views.modelexplorer.newchild;bundle-version="1.2.0",
+ org.eclipse.emf.transaction.ui;bundle-version="1.4.0",
+ org.eclipse.papyrus.sysml.diagram.common;bundle-version="2.0.0",
+ org.eclipse.papyrus.sysml.edit;bundle-version="1.2.0",
+ org.eclipse.papyrus.sysml.nattable.menu;bundle-version="1.2.0",
+ org.eclipse.papyrus.sysml.properties;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.editor.welcome;bundle-version="2.0.0",
+ org.eclipse.papyrus.infra.editor.welcome.internationalization;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.editor.welcome.nattable;bundle-version="2.0.0",
+ org.eclipse.papyrus.infra.gmfdiag.welcome;bundle-version="1.2.0",
+ org.eclipse.papyrus.editor;bundle-version="2.0.0",
+ org.eclipse.papyrus.emf.facet.common.core;bundle-version="1.2.0",
+ org.eclipse.papyrus.emf.facet.common.sdk.core;bundle-version="1.2.0",
+ org.eclipse.papyrus.emf.facet.util.core;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.discovery;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.emf.expressions;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.emf.types;bundle-version="3.0.0",
+ org.eclipse.papyrus.infra.emf.types.ui;bundle-version="3.0.0",
+ org.eclipse.papyrus.infra.filters;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.gmfdiag.assistant;bundle-version="1.3.0",
+ org.eclipse.papyrus.infra.gmfdiag.controlmode;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.gmfdiag.css;bundle-version="2.1.0",
+ org.eclipse.papyrus.infra.gmfdiag.dnd;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.gmfdiag.expansion;bundle-version="2.0.0",
+ org.eclipse.papyrus.infra.gmfdiag.hyperlink;bundle-version="3.0.0",
+ org.eclipse.papyrus.infra.gmfdiag.navigation;bundle-version="2.0.0",
+ org.eclipse.papyrus.infra.gmfdiag.properties;bundle-version="3.0.0",
+ org.eclipse.papyrus.infra.gmfdiag.style.edit;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.gmfdiag.widgets;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.internationalization;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.nattable.controlmode;bundle-version="2.0.0",
+ org.eclipse.papyrus.infra.newchild;bundle-version="3.0.0",
+ org.eclipse.papyrus.infra.types.ui;bundle-version="3.0.0",
+ org.eclipse.papyrus.infra.ui.architecture;bundle-version="1.0.0",
+ org.eclipse.papyrus.sysml.diagram.css;bundle-version="1.2.0",
+ org.eclipse.papyrus.sysml.diagram.internalblock;bundle-version="3.0.0",
+ org.eclipse.papyrus.sysml.diagram.parametric;bundle-version="2.0.0",
+ org.eclipse.papyrus.sysml.diagram.requirement;bundle-version="3.0.0",
+ org.eclipse.papyrus.sysml.diagram.ui;bundle-version="2.0.0",
+ org.eclipse.papyrus.sysml.nattable.allocation;bundle-version="1.2.0",
+ org.eclipse.papyrus.sysml.nattable.allocation.config;bundle-version="1.2.0",
+ org.eclipse.papyrus.sysml.service.types.tests;bundle-version="1.2.0",
+ org.eclipse.papyrus.sysml.tests;bundle-version="1.2.0"
+Export-Package: org.eclipse.papyrus.sysml.nattable.requirement.tests,
+ org.eclipse.papyrus.sysml.nattable.requirement.tests.tests
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 1.2.0.qualifier
+Bundle-Name: %pluginName
+Bundle-Localization: plugin
+Bundle-ManifestVersion: 2
+Bundle-Activator: org.eclipse.papyrus.sysml.nattable.requirement.tests.Activator
+Bundle-Description: %pluginDescription
+Bundle-SymbolicName: org.eclipse.papyrus.sysml.nattable.requirement.tests;singleton:=true
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/OSGI-INF/l10n/bundle.properties b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/OSGI-INF/l10n/bundle.properties
new file mode 100755
index 0000000..0536c62
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/OSGI-INF/l10n/bundle.properties
@@ -0,0 +1,3 @@
+#Properties file for org.eclipse.papyrus.sysml.nattable.requirement.tests
+Bundle-Vendor = Eclipse Modeling Project
+Bundle-Name = SysML NatTable Requirements Tests
\ No newline at end of file
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/about.html b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/about.html
new file mode 100755
index 0000000..d35d5ae
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/build.properties b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/build.properties
new file mode 100755
index 0000000..3c15b36
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/build.properties
@@ -0,0 +1,9 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ OSGI-INF/,\
+ about.html,\
+ resources/,\
+ plugin.properties
+src.includes = about.html
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/plugin.properties b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/plugin.properties
new file mode 100755
index 0000000..3145223
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/plugin.properties
@@ -0,0 +1,14 @@
+###############################################################################
+# Copyright (c) 2014 CEA LIST.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# CEA LIST - initial API and implementation
+###############################################################################
+pluginName=Requirement diagram tests
+providerName=Eclipse Modeling Project
+
+pluginDescription=This plugin tests the plugin org.eclipse.papyrus.sysml.nattable.requirement
\ No newline at end of file
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/pom.xml b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/pom.xml
new file mode 100755
index 0000000..8b8066d
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/pom.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.papyrus.sysml</groupId>
+ <artifactId>org.eclipse.papyrus.sysml.test</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.papyrus.sysml.nattable.requirement.tests</artifactId>
+ <packaging>eclipse-test-plugin</packaging>
+</project>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/bugs/bug439501/RequirementsReordering.di b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/bugs/bug439501/RequirementsReordering.di
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/bugs/bug439501/RequirementsReordering.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/bugs/bug439501/RequirementsReordering.notation b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/bugs/bug439501/RequirementsReordering.notation
new file mode 100755
index 0000000..0c25ed3
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/bugs/bug439501/RequirementsReordering.notation
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nattable:Table xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:nattable="http://www.eclipse.org/papyrus/nattable/model" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis http://www.eclipse.org/papyrus/nattable/model#//nattableaxis http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model#//nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableconfiguration" xmi:id="_-R9B0BHvEeabc_zdDAmbEg" name="RequirementTable0" currentRowAxisProvider="_-R9B1RHvEeabc_zdDAmbEg" currentColumnAxisProvider="_-R9B0RHvEeabc_zdDAmbEg">
+ <context xmi:type="uml:Model" href="RequirementsReordering.uml#_U8kqgBHuEeabc_zdDAmbEg"/>
+ <owner xmi:type="uml:Model" href="RequirementsReordering.uml#_U8kqgBHuEeabc_zdDAmbEg"/>
+ <prototype xmi:type="configuration:PapyrusSyncTable" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirementTable.configuration#_lTE0gHDwEeWh-MssWmCB_A"/>
+ <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#/"/>
+ <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_-R9B0RHvEeabc_zdDAmbEg" description="Provides the columns of the tables with a default configuration" name="Requirements Feature Columns Provider">
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_-R9B0hHvEeabc_zdDAmbEg" element="property_of_stereotype:/SysML::Requirements::Requirement::id">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_-R9B0xHvEeabc_zdDAmbEg">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_-R9B1BHvEeabc_zdDAmbEg" element="property_of_stereotype:/SysML::Requirements::Requirement::text">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ </columnAxisProvidersHistory>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_-R9B1RHvEeabc_zdDAmbEg" description="Provides the requirements directly owned by the context of the table" name="Requirement Axis Provider" disconnectSlave="true"/>
+</nattable:Table>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/bugs/bug439501/RequirementsReordering.uml b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/bugs/bug439501/RequirementsReordering.uml
new file mode 100755
index 0000000..ac3b590
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/bugs/bug439501/RequirementsReordering.uml
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Requirements="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements">
+ <uml:Model xmi:id="_U8kqgBHuEeabc_zdDAmbEg" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_6o5QcBHvEeabc_zdDAmbEg" name="Requirement1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_8Jij0BHvEeabc_zdDAmbEg" name="Requirement2"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_8mV0kBHvEeabc_zdDAmbEg" name="Requirement3"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_9JvckBHvEeabc_zdDAmbEg" name="Requirement4"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_VKVZsBHuEeabc_zdDAmbEg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_VKX18BHuEeabc_zdDAmbEg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_TZ_nULU5EduiKqCzJMWbGw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_VKaSMBHuEeabc_zdDAmbEg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_VKa5QBHuEeabc_zdDAmbEg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_VKdVgBHuEeabc_zdDAmbEg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_VKdVgRHuEeabc_zdDAmbEg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_VKd8kBHuEeabc_zdDAmbEg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_VKgY0BHuEeabc_zdDAmbEg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_VKg_4BHuEeabc_zdDAmbEg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_VKhm8BHuEeabc_zdDAmbEg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_5WYJ0LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_VKiOABHuEeabc_zdDAmbEg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_VKi1EBHuEeabc_zdDAmbEg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//activities"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_C2zXMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_VKjcIBHuEeabc_zdDAmbEg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_VKjcIRHuEeabc_zdDAmbEg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_VKlRUBHuEeabc_zdDAmbEg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_VKl4YBHuEeabc_zdDAmbEg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_VKntkBHuEeabc_zdDAmbEg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_VKoUoBHuEeabc_zdDAmbEg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//interactions"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_meOioLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_VKo7sBHuEeabc_zdDAmbEg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_VKo7sRHuEeabc_zdDAmbEg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//statemachines"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_nAF5kLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_VKpiwBHuEeabc_zdDAmbEg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_VKqJ0BHuEeabc_zdDAmbEg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//usecases"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_neZmMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Requirements:Requirement xmi:id="_6pLkUBHvEeabc_zdDAmbEg" base_Class="_6o5QcBHvEeabc_zdDAmbEg"/>
+ <Requirements:Requirement xmi:id="_8JoqcBHvEeabc_zdDAmbEg" base_Class="_8Jij0BHvEeabc_zdDAmbEg"/>
+ <Requirements:Requirement xmi:id="_8mb7MBHvEeabc_zdDAmbEg" base_Class="_8mV0kBHvEeabc_zdDAmbEg"/>
+ <Requirements:Requirement xmi:id="_9JvckRHvEeabc_zdDAmbEg" base_Class="_9JvckBHvEeabc_zdDAmbEg"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/bugs/bug473155/AxisChangeIndexWithConfiguration.di b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/bugs/bug473155/AxisChangeIndexWithConfiguration.di
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/bugs/bug473155/AxisChangeIndexWithConfiguration.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/bugs/bug473155/AxisChangeIndexWithConfiguration.notation b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/bugs/bug473155/AxisChangeIndexWithConfiguration.notation
new file mode 100755
index 0000000..033cdab
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/bugs/bug473155/AxisChangeIndexWithConfiguration.notation
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nattable:Table xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:nattable="http://www.eclipse.org/papyrus/nattable/model" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis http://www.eclipse.org/papyrus/nattable/model#//nattableaxis http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model#//nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableconfiguration" xmi:id="_p-wrkDn9EeWPxqj3h6BDbw" name="RequirementTable0" currentRowAxisProvider="_p-wrlTn9EeWPxqj3h6BDbw" currentColumnAxisProvider="_p-wrkTn9EeWPxqj3h6BDbw">
+ <context xmi:type="uml:Model" href="AxisChangeIndexWithConfiguration.uml#_uY1xkDn6EeWPxqj3h6BDbw"/>
+ <owner xmi:type="uml:Model" href="AxisChangeIndexWithConfiguration.uml#_uY1xkDn6EeWPxqj3h6BDbw"/>
+ <prototype xmi:type="configuration:PapyrusSyncTable" href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wNb3txhEeOqHvRyiN87hA"/>
+ <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#/"/>
+ <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_p-wrkTn9EeWPxqj3h6BDbw" description="Provides the columns of the tables with a default configuration" name="Requirements Feature Columns Provider">
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_p-wrkjn9EeWPxqj3h6BDbw" element="property_of_stereotype:/SysML::Requirements::Requirement::id">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_p-wrkzn9EeWPxqj3h6BDbw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_p-wrlDn9EeWPxqj3h6BDbw" element="property_of_stereotype:/SysML::Requirements::Requirement::text">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ </columnAxisProvidersHistory>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_p-wrlTn9EeWPxqj3h6BDbw" description="Provides the requirements directly owned by the context of the table" name="Requirement Axis Provider" disconnectSlave="true"/>
+ <localRowHeaderAxisConfiguration xmi:type="nattableaxisconfiguration:LocalTableHeaderAxisConfiguration" xmi:id="_01knoDn-EeWPxqj3h6BDbw" indexStyle="NUMERIC"/>
+ <localColumnHeaderAxisConfiguration xmi:type="nattableaxisconfiguration:LocalTableHeaderAxisConfiguration" xmi:id="_zHFskDn-EeWPxqj3h6BDbw"/>
+</nattable:Table>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/bugs/bug473155/AxisChangeIndexWithConfiguration.uml b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/bugs/bug473155/AxisChangeIndexWithConfiguration.uml
new file mode 100755
index 0000000..bd5a0f5
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/bugs/bug473155/AxisChangeIndexWithConfiguration.uml
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Requirements="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements">
+ <uml:Model xmi:id="_uY1xkDn6EeWPxqj3h6BDbw" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_OdbvcDn7EeWPxqj3h6BDbw" name="Class1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_Vn_RoDn7EeWPxqj3h6BDbw" name="Class2"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_udWeIDn6EeWPxqj3h6BDbw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_udY6YDn6EeWPxqj3h6BDbw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_TZ_nULU5EduiKqCzJMWbGw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_udZhcDn6EeWPxqj3h6BDbw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_udZhcTn6EeWPxqj3h6BDbw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_udaIgDn6EeWPxqj3h6BDbw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_udaIgTn6EeWPxqj3h6BDbw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_udaIgjn6EeWPxqj3h6BDbw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_udavkDn6EeWPxqj3h6BDbw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_udavkTn6EeWPxqj3h6BDbw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_udavkjn6EeWPxqj3h6BDbw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_5WYJ0LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_udavkzn6EeWPxqj3h6BDbw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_udavlDn6EeWPxqj3h6BDbw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//activities"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_C2zXMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_udbWoDn6EeWPxqj3h6BDbw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_udbWoTn6EeWPxqj3h6BDbw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_udbWojn6EeWPxqj3h6BDbw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_udbWozn6EeWPxqj3h6BDbw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_udb9sDn6EeWPxqj3h6BDbw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_udb9sTn6EeWPxqj3h6BDbw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//interactions"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_meOioLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_udb9sjn6EeWPxqj3h6BDbw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_udb9szn6EeWPxqj3h6BDbw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//statemachines"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_nAF5kLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_udckwDn6EeWPxqj3h6BDbw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_udckwTn6EeWPxqj3h6BDbw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//usecases"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_neZmMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Requirements:Requirement xmi:id="_Wqs2YDn8EeWPxqj3h6BDbw" base_Class="_OdbvcDn7EeWPxqj3h6BDbw"/>
+ <Requirements:Requirement xmi:id="_8s0ioDn8EeWPxqj3h6BDbw" base_Class="_Vn_RoDn7EeWPxqj3h6BDbw"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/bugs/bug473155/AxisChangeIndexWithoutConfiguration.di b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/bugs/bug473155/AxisChangeIndexWithoutConfiguration.di
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/bugs/bug473155/AxisChangeIndexWithoutConfiguration.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/bugs/bug473155/AxisChangeIndexWithoutConfiguration.notation b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/bugs/bug473155/AxisChangeIndexWithoutConfiguration.notation
new file mode 100755
index 0000000..2bd7255
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/bugs/bug473155/AxisChangeIndexWithoutConfiguration.notation
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nattable:Table xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:nattable="http://www.eclipse.org/papyrus/nattable/model" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis http://www.eclipse.org/papyrus/nattable/model#//nattableaxis http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model#//nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableconfiguration" xmi:id="_p-wrkDn9EeWPxqj3h6BDbw" name="RequirementTable0" currentRowAxisProvider="_p-wrlTn9EeWPxqj3h6BDbw" currentColumnAxisProvider="_p-wrkTn9EeWPxqj3h6BDbw">
+ <context xmi:type="uml:Model" href="AxisChangeIndexWithoutConfiguration.uml#_uY1xkDn6EeWPxqj3h6BDbw"/>
+ <owner xmi:type="uml:Model" href="AxisChangeIndexWithoutConfiguration.uml#_uY1xkDn6EeWPxqj3h6BDbw"/>
+ <prototype xmi:type="configuration:PapyrusSyncTable" href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wNb3txhEeOqHvRyiN87hA"/>
+ <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#/"/>
+ <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_p-wrkTn9EeWPxqj3h6BDbw" description="Provides the columns of the tables with a default configuration" name="Requirements Feature Columns Provider">
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_p-wrkjn9EeWPxqj3h6BDbw" element="property_of_stereotype:/SysML::Requirements::Requirement::id">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_p-wrkzn9EeWPxqj3h6BDbw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_p-wrlDn9EeWPxqj3h6BDbw" element="property_of_stereotype:/SysML::Requirements::Requirement::text">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ </columnAxisProvidersHistory>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_p-wrlTn9EeWPxqj3h6BDbw" description="Provides the requirements directly owned by the context of the table" name="Requirement Axis Provider" disconnectSlave="true"/>
+</nattable:Table>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/bugs/bug473155/AxisChangeIndexWithoutConfiguration.uml b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/bugs/bug473155/AxisChangeIndexWithoutConfiguration.uml
new file mode 100755
index 0000000..bd5a0f5
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/bugs/bug473155/AxisChangeIndexWithoutConfiguration.uml
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Requirements="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements">
+ <uml:Model xmi:id="_uY1xkDn6EeWPxqj3h6BDbw" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_OdbvcDn7EeWPxqj3h6BDbw" name="Class1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_Vn_RoDn7EeWPxqj3h6BDbw" name="Class2"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_udWeIDn6EeWPxqj3h6BDbw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_udY6YDn6EeWPxqj3h6BDbw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_TZ_nULU5EduiKqCzJMWbGw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_udZhcDn6EeWPxqj3h6BDbw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_udZhcTn6EeWPxqj3h6BDbw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_udaIgDn6EeWPxqj3h6BDbw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_udaIgTn6EeWPxqj3h6BDbw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_udaIgjn6EeWPxqj3h6BDbw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_udavkDn6EeWPxqj3h6BDbw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_udavkTn6EeWPxqj3h6BDbw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_udavkjn6EeWPxqj3h6BDbw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_5WYJ0LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_udavkzn6EeWPxqj3h6BDbw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_udavlDn6EeWPxqj3h6BDbw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//activities"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_C2zXMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_udbWoDn6EeWPxqj3h6BDbw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_udbWoTn6EeWPxqj3h6BDbw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_udbWojn6EeWPxqj3h6BDbw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_udbWozn6EeWPxqj3h6BDbw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_udb9sDn6EeWPxqj3h6BDbw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_udb9sTn6EeWPxqj3h6BDbw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//interactions"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_meOioLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_udb9sjn6EeWPxqj3h6BDbw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_udb9szn6EeWPxqj3h6BDbw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//statemachines"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_nAF5kLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_udckwDn6EeWPxqj3h6BDbw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_udckwTn6EeWPxqj3h6BDbw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//usecases"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_neZmMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Requirements:Requirement xmi:id="_Wqs2YDn8EeWPxqj3h6BDbw" base_Class="_OdbvcDn7EeWPxqj3h6BDbw"/>
+ <Requirements:Requirement xmi:id="_8s0ioDn8EeWPxqj3h6BDbw" base_Class="_Vn_RoDn7EeWPxqj3h6BDbw"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/bugs/bug473155/InvertedAxisChangeIndexWithConfiguration.di b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/bugs/bug473155/InvertedAxisChangeIndexWithConfiguration.di
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/bugs/bug473155/InvertedAxisChangeIndexWithConfiguration.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/bugs/bug473155/InvertedAxisChangeIndexWithConfiguration.notation b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/bugs/bug473155/InvertedAxisChangeIndexWithConfiguration.notation
new file mode 100755
index 0000000..4095664
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/bugs/bug473155/InvertedAxisChangeIndexWithConfiguration.notation
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nattable:Table xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:nattable="http://www.eclipse.org/papyrus/nattable/model" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis http://www.eclipse.org/papyrus/nattable/model#//nattableaxis http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model#//nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableconfiguration" xmi:id="_p-wrkDn9EeWPxqj3h6BDbw" name="RequirementTable0" invertAxis="true" currentRowAxisProvider="_p-wrlTn9EeWPxqj3h6BDbw" currentColumnAxisProvider="_p-wrkTn9EeWPxqj3h6BDbw">
+ <context xmi:type="uml:Model" href="InvertedAxisChangeIndexWithConfiguration.uml#_uY1xkDn6EeWPxqj3h6BDbw"/>
+ <owner xmi:type="uml:Model" href="InvertedAxisChangeIndexWithConfiguration.uml#_uY1xkDn6EeWPxqj3h6BDbw"/>
+ <prototype xmi:type="configuration:PapyrusSyncTable" href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wNb3txhEeOqHvRyiN87hA"/>
+ <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#/"/>
+ <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_p-wrkTn9EeWPxqj3h6BDbw" description="Provides the columns of the tables with a default configuration" name="Requirements Feature Columns Provider">
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_p-wrkjn9EeWPxqj3h6BDbw" element="property_of_stereotype:/SysML::Requirements::Requirement::id">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_p-wrkzn9EeWPxqj3h6BDbw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_p-wrlDn9EeWPxqj3h6BDbw" element="property_of_stereotype:/SysML::Requirements::Requirement::text">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ </columnAxisProvidersHistory>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_p-wrlTn9EeWPxqj3h6BDbw" description="Provides the requirements directly owned by the context of the table" name="Requirement Axis Provider" disconnectSlave="true"/>
+ <localRowHeaderAxisConfiguration xmi:type="nattableaxisconfiguration:LocalTableHeaderAxisConfiguration" xmi:id="_ZF8pcDn_EeWPxqj3h6BDbw" indexStyle="NUMERIC"/>
+ <localColumnHeaderAxisConfiguration xmi:type="nattableaxisconfiguration:LocalTableHeaderAxisConfiguration" xmi:id="_ay_aEDn_EeWPxqj3h6BDbw"/>
+</nattable:Table>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/bugs/bug473155/InvertedAxisChangeIndexWithConfiguration.uml b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/bugs/bug473155/InvertedAxisChangeIndexWithConfiguration.uml
new file mode 100755
index 0000000..bd5a0f5
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/bugs/bug473155/InvertedAxisChangeIndexWithConfiguration.uml
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Requirements="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements">
+ <uml:Model xmi:id="_uY1xkDn6EeWPxqj3h6BDbw" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_OdbvcDn7EeWPxqj3h6BDbw" name="Class1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_Vn_RoDn7EeWPxqj3h6BDbw" name="Class2"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_udWeIDn6EeWPxqj3h6BDbw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_udY6YDn6EeWPxqj3h6BDbw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_TZ_nULU5EduiKqCzJMWbGw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_udZhcDn6EeWPxqj3h6BDbw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_udZhcTn6EeWPxqj3h6BDbw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_udaIgDn6EeWPxqj3h6BDbw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_udaIgTn6EeWPxqj3h6BDbw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_udaIgjn6EeWPxqj3h6BDbw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_udavkDn6EeWPxqj3h6BDbw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_udavkTn6EeWPxqj3h6BDbw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_udavkjn6EeWPxqj3h6BDbw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_5WYJ0LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_udavkzn6EeWPxqj3h6BDbw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_udavlDn6EeWPxqj3h6BDbw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//activities"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_C2zXMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_udbWoDn6EeWPxqj3h6BDbw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_udbWoTn6EeWPxqj3h6BDbw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_udbWojn6EeWPxqj3h6BDbw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_udbWozn6EeWPxqj3h6BDbw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_udb9sDn6EeWPxqj3h6BDbw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_udb9sTn6EeWPxqj3h6BDbw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//interactions"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_meOioLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_udb9sjn6EeWPxqj3h6BDbw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_udb9szn6EeWPxqj3h6BDbw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//statemachines"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_nAF5kLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_udckwDn6EeWPxqj3h6BDbw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_udckwTn6EeWPxqj3h6BDbw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//usecases"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_neZmMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Requirements:Requirement xmi:id="_Wqs2YDn8EeWPxqj3h6BDbw" base_Class="_OdbvcDn7EeWPxqj3h6BDbw"/>
+ <Requirements:Requirement xmi:id="_8s0ioDn8EeWPxqj3h6BDbw" base_Class="_Vn_RoDn7EeWPxqj3h6BDbw"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/bugs/bug473155/InvertedAxisChangeIndexWithoutConfiguration.di b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/bugs/bug473155/InvertedAxisChangeIndexWithoutConfiguration.di
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/bugs/bug473155/InvertedAxisChangeIndexWithoutConfiguration.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/bugs/bug473155/InvertedAxisChangeIndexWithoutConfiguration.notation b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/bugs/bug473155/InvertedAxisChangeIndexWithoutConfiguration.notation
new file mode 100755
index 0000000..ca26ee1
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/bugs/bug473155/InvertedAxisChangeIndexWithoutConfiguration.notation
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nattable:Table xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:nattable="http://www.eclipse.org/papyrus/nattable/model" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis http://www.eclipse.org/papyrus/nattable/model#//nattableaxis http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model#//nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableconfiguration" xmi:id="_p-wrkDn9EeWPxqj3h6BDbw" name="RequirementTable0" invertAxis="true" currentRowAxisProvider="_p-wrlTn9EeWPxqj3h6BDbw" currentColumnAxisProvider="_p-wrkTn9EeWPxqj3h6BDbw">
+ <context xmi:type="uml:Model" href="InvertedAxisChangeIndexWithoutConfiguration.uml#_uY1xkDn6EeWPxqj3h6BDbw"/>
+ <owner xmi:type="uml:Model" href="InvertedAxisChangeIndexWithoutConfiguration.uml#_uY1xkDn6EeWPxqj3h6BDbw"/>
+ <prototype xmi:type="configuration:PapyrusSyncTable" href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wNb3txhEeOqHvRyiN87hA"/>
+ <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#/"/>
+ <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_p-wrkTn9EeWPxqj3h6BDbw" description="Provides the columns of the tables with a default configuration" name="Requirements Feature Columns Provider">
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_p-wrkjn9EeWPxqj3h6BDbw" element="property_of_stereotype:/SysML::Requirements::Requirement::id">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_p-wrkzn9EeWPxqj3h6BDbw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_p-wrlDn9EeWPxqj3h6BDbw" element="property_of_stereotype:/SysML::Requirements::Requirement::text">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ </columnAxisProvidersHistory>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_p-wrlTn9EeWPxqj3h6BDbw" description="Provides the requirements directly owned by the context of the table" name="Requirement Axis Provider" disconnectSlave="true"/>
+</nattable:Table>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/bugs/bug473155/InvertedAxisChangeIndexWithoutConfiguration.uml b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/bugs/bug473155/InvertedAxisChangeIndexWithoutConfiguration.uml
new file mode 100755
index 0000000..bd5a0f5
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/bugs/bug473155/InvertedAxisChangeIndexWithoutConfiguration.uml
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Requirements="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements">
+ <uml:Model xmi:id="_uY1xkDn6EeWPxqj3h6BDbw" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_OdbvcDn7EeWPxqj3h6BDbw" name="Class1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_Vn_RoDn7EeWPxqj3h6BDbw" name="Class2"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_udWeIDn6EeWPxqj3h6BDbw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_udY6YDn6EeWPxqj3h6BDbw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_TZ_nULU5EduiKqCzJMWbGw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_udZhcDn6EeWPxqj3h6BDbw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_udZhcTn6EeWPxqj3h6BDbw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_udaIgDn6EeWPxqj3h6BDbw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_udaIgTn6EeWPxqj3h6BDbw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_udaIgjn6EeWPxqj3h6BDbw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_udavkDn6EeWPxqj3h6BDbw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_udavkTn6EeWPxqj3h6BDbw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_udavkjn6EeWPxqj3h6BDbw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_5WYJ0LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_udavkzn6EeWPxqj3h6BDbw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_udavlDn6EeWPxqj3h6BDbw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//activities"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_C2zXMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_udbWoDn6EeWPxqj3h6BDbw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_udbWoTn6EeWPxqj3h6BDbw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_udbWojn6EeWPxqj3h6BDbw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_udbWozn6EeWPxqj3h6BDbw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_udb9sDn6EeWPxqj3h6BDbw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_udb9sTn6EeWPxqj3h6BDbw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//interactions"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_meOioLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_udb9sjn6EeWPxqj3h6BDbw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_udb9szn6EeWPxqj3h6BDbw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//statemachines"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_nAF5kLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_udckwDn6EeWPxqj3h6BDbw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_udckwTn6EeWPxqj3h6BDbw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//usecases"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_neZmMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Requirements:Requirement xmi:id="_Wqs2YDn8EeWPxqj3h6BDbw" base_Class="_OdbvcDn7EeWPxqj3h6BDbw"/>
+ <Requirements:Requirement xmi:id="_8s0ioDn8EeWPxqj3h6BDbw" base_Class="_Vn_RoDn7EeWPxqj3h6BDbw"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/contents_tests_resources/contents_sort_invert_edit_model.di b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/contents_tests_resources/contents_sort_invert_edit_model.di
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/contents_tests_resources/contents_sort_invert_edit_model.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/contents_tests_resources/contents_sort_invert_edit_model.notation b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/contents_tests_resources/contents_sort_invert_edit_model.notation
new file mode 100755
index 0000000..d6deb76
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/contents_tests_resources/contents_sort_invert_edit_model.notation
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmlns:css="http://www.eclipse.org/papyrus/infra/gmfdiag/css" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:nattable="http://www.eclipse.org/papyrus/nattable/model" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:nattablelabelprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattablecontentprovider" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis http://www.eclipse.org/papyrus/nattable/model#//nattableaxis http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model#//nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattablecontentprovider http://www.eclipse.org/papyrus/nattable/model#//nattablelabelprovider">
+ <nattable:Table xmi:id="_DJFBQABeEeWWp-uvBoz03w" name="RequirementTable" currentRowAxisProvider="_DJFBRQBeEeWWp-uvBoz03w" currentColumnAxisProvider="_DJFBQQBeEeWWp-uvBoz03w">
+ <context xmi:type="uml:Model" href="contents_sort_invert_edit_model.uml#_ChwcMOpdEeSLn7DaLatDYg"/>
+ <owner xmi:type="uml:Model" href="contents_sort_invert_edit_model.uml#_ChwcMOpdEeSLn7DaLatDYg"/>
+ <prototype xmi:type="configuration:PapyrusSyncTable" href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wNb3txhEeOqHvRyiN87hA"/>
+ <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#/"/>
+ <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_DJFBQQBeEeWWp-uvBoz03w" description="Provides the columns of the tables with a default configuration" name="Requirements Feature Columns Provider">
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_DJFBQwBeEeWWp-uvBoz03w">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_WcSXUABeEeWWp-uvBoz03w">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/visibility"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_WcTlcABeEeWWp-uvBoz03w" element="property_of_stereotype:/SysML::Requirements::Requirement::derived">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_WcTlcQBeEeWWp-uvBoz03w" element="property_of_stereotype:/SysML::Requirements::Requirement::tracedTo">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ </columnAxisProvidersHistory>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_DJFBRQBeEeWWp-uvBoz03w" description="Provides the requirements directly owned by the context of the table" name="Requirement Axis Provider" disconnectSlave="true"/>
+ <localRowHeaderAxisConfiguration xmi:type="nattableaxisconfiguration:LocalTableHeaderAxisConfiguration" xmi:id="_J46g4ABfEeWWp-uvBoz03w" indexStyle="NUMERIC">
+ <ownedLabelConfigurations xmi:type="nattablelabelprovider:ObjectLabelProviderConfiguration" xmi:id="_J47H8ABfEeWWp-uvBoz03w"/>
+ <axisManagerConfigurations xmi:type="nattableaxisconfiguration:AxisManagerConfiguration" xmi:id="_J47H8QBfEeWWp-uvBoz03w" localHeaderLabelConfiguration="_J47H8ABfEeWWp-uvBoz03w">
+ <axisManager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@rowHeaderAxisConfiguration/@axisManagers.0"/>
+ </axisManagerConfigurations>
+ </localRowHeaderAxisConfiguration>
+ </nattable:Table>
+ <css:ModelStyleSheets xmi:id="_ocncUAB2EeWLLrtiA3fSmg"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/contents_tests_resources/contents_sort_invert_edit_model.uml b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/contents_tests_resources/contents_sort_invert_edit_model.uml
new file mode 100755
index 0000000..d24d370
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/contents_tests_resources/contents_sort_invert_edit_model.uml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Requirements="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements">
+ <uml:Model xmi:id="_ChwcMOpdEeSLn7DaLatDYg" name="model">
+ <packagedElement xmi:type="uml:Class" xmi:id="_2zQYQOpdEeSLn7DaLatDYg" name="Class1">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_A9HkMOpeEeSLn7DaLatDYg" name="Attribute11" visibility="public" type="_2zQYQOpdEeSLn7DaLatDYg">
+ <defaultValue xmi:type="uml:OpaqueExpression" xmi:id="_keGwcOpeEeSLn7DaLatDYg" name="testB"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_Ic69oOpeEeSLn7DaLatDYg" name="Attribute12" visibility="public" type="_4ZeIIOpdEeSLn7DaLatDYg">
+ <defaultValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_lEmIsOpeEeSLn7DaLatDYg" value="123"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_4ZeIIOpdEeSLn7DaLatDYg" name="Class2">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_D3RoMOpeEeSLn7DaLatDYg" name="Attribute21" visibility="public" type="_2zQYQOpdEeSLn7DaLatDYg">
+ <defaultValue xmi:type="uml:OpaqueExpression" xmi:id="_lx_aMOpeEeSLn7DaLatDYg" name="testA"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_I04JcOy1EeSlh_vGEa7fQw" name="Class3"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_wTxvMABdEeWWp-uvBoz03w">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_wT2AoABdEeWWp-uvBoz03w" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Requirements:Requirement xmi:id="_0IEgMABdEeWWp-uvBoz03w" base_Class="_2zQYQOpdEeSLn7DaLatDYg"/>
+ <Requirements:Requirement xmi:id="_1RipsABdEeWWp-uvBoz03w" base_Class="_4ZeIIOpdEeSLn7DaLatDYg"/>
+ <Requirements:Requirement xmi:id="_1-pnUABdEeWWp-uvBoz03w" base_Class="_I04JcOy1EeSlh_vGEa7fQw"/>
+ <Requirements:RequirementRelated xmi:id="_2sXo8ABdEeWWp-uvBoz03w" base_NamedElement="_Ic69oOpeEeSLn7DaLatDYg"/>
+ <Requirements:RequirementRelated xmi:id="_5AyioABdEeWWp-uvBoz03w" base_NamedElement="_A9HkMOpeEeSLn7DaLatDYg"/>
+ <Requirements:RequirementRelated xmi:id="_5jHzoABdEeWWp-uvBoz03w" base_NamedElement="_D3RoMOpeEeSLn7DaLatDYg"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportCellsAll_Test.csv b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportCellsAll_Test.csv
new file mode 100755
index 0000000..37d903b
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportCellsAll_Test.csv
@@ -0,0 +1,3 @@
+;Class1;aaaa
+;CopyOf_Class1_1;bbbb
+;CopyOf_Class1_2;cccc
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportCellsAll_Test.di b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportCellsAll_Test.di
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportCellsAll_Test.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportCellsAll_Test.notation b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportCellsAll_Test.notation
new file mode 100755
index 0000000..b7fb36f
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportCellsAll_Test.notation
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nattable:Table xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:nattable="http://www.eclipse.org/papyrus/nattable/model" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis http://www.eclipse.org/papyrus/nattable/model#//nattableaxis http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model#//nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableconfiguration" xmi:id="_FERfIGhHEeWchZKsEGp2Eg" name="RequirementTable0" currentRowAxisProvider="_FESGMWhHEeWchZKsEGp2Eg" currentColumnAxisProvider="_FERfIWhHEeWchZKsEGp2Eg">
+ <context xmi:type="uml:Model" href="ImportCellsAll_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <owner xmi:type="uml:Model" href="ImportCellsAll_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <prototype xmi:type="configuration:PapyrusSyncTable" href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wNb3txhEeOqHvRyiN87hA"/>
+ <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#/"/>
+ <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_FERfIWhHEeWchZKsEGp2Eg" description="Provides the columns of the tables with a default configuration" name="Requirements Feature Columns Provider">
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FERfImhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::id">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_FERfI2hHEeWchZKsEGp2Eg">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FESGMGhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::text">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ </columnAxisProvidersHistory>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_FESGMWhHEeWchZKsEGp2Eg" description="Provides the requirements directly owned by the context of the table" name="Requirement Axis Provider" disconnectSlave="true"/>
+ <localRowHeaderAxisConfiguration xmi:type="nattableaxisconfiguration:LocalTableHeaderAxisConfiguration" xmi:id="__iG3cHmnEeWVZIGG1XbiFw" indexStyle="NUMERIC">
+ <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:PasteEObjectConfiguration" xmi:id="__iSdoHmnEeWVZIGG1XbiFw" pastedElementId="org.eclipse.papyrus.sysml.Requirement">
+ <postActions>applyStereotype:/SysML::Requirements::Requirement</postActions>
+ <pasteElementContainementFeature xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Package/packagedElement"/>
+ <axisIdentifier xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="__iTEsHmnEeWVZIGG1XbiFw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axisIdentifier>
+ </ownedAxisConfigurations>
+ </localRowHeaderAxisConfiguration>
+</nattable:Table>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportCellsAll_Test.uml b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportCellsAll_Test.uml
new file mode 100755
index 0000000..bbeea50
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportCellsAll_Test.uml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Requirements="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements">
+ <uml:Model xmi:id="_nAjG8GIeEeWkqekCWoLl5g" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_pYCiwGIeEeWkqekCWoLl5g" name="Class1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p2QIwGIeEeWkqekCWoLl5g" name="CopyOf_Class1_1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p5RnkGIeEeWkqekCWoLl5g" name="CopyOf_Class1_2"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZN74GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZN74WgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_TZ_nULU5EduiKqCzJMWbGw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZOi8GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPKAGgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZPxEGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPxEWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQYIGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQYIWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQ_MGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQ_MWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_5WYJ0LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZRmQGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZRmQWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//activities"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_C2zXMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZSNUGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZSNUWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZS0YGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZS0YWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZTbcGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZTbcWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//interactions"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_meOioLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUCgGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUCgWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//statemachines"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_nAF5kLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUpkGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUpkWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//usecases"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_neZmMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Requirements:Requirement xmi:id="_CA5NsGhHEeWchZKsEGp2Eg" base_Class="_pYCiwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_CrCW4GhHEeWchZKsEGp2Eg" base_Class="_p2QIwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_DaVF0GhHEeWchZKsEGp2Eg" base_Class="_p5RnkGIeEeWkqekCWoLl5g"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportCellsAll_Test_Initial.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportCellsAll_Test_Initial.txt
new file mode 100755
index 0000000..3425e9b
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportCellsAll_Test_Initial.txt
@@ -0,0 +1,3 @@
+ Class1
+ CopyOf_Class1_1
+ CopyOf_Class1_2
\ No newline at end of file
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportCellsAll_Test_Result.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportCellsAll_Test_Result.txt
new file mode 100755
index 0000000..aba13c6
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportCellsAll_Test_Result.txt
@@ -0,0 +1,6 @@
+ Class1
+ CopyOf_Class1_1
+ CopyOf_Class1_2
+ Class1 aaaa
+ CopyOf_Class1_1 bbbb
+ CopyOf_Class1_2 cccc
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportEmptyAddAll_Test.csv b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportEmptyAddAll_Test.csv
new file mode 100755
index 0000000..65cbefd
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportEmptyAddAll_Test.csv
@@ -0,0 +1,4 @@
+;Class1;aaaa
+;CopyOf_Class1_1;bbbb
+;CopyOf_Class1_2;cccc
+;;
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportEmptyAddAll_Test.di b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportEmptyAddAll_Test.di
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportEmptyAddAll_Test.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportEmptyAddAll_Test.notation b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportEmptyAddAll_Test.notation
new file mode 100755
index 0000000..4a52c39
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportEmptyAddAll_Test.notation
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nattable:Table xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:nattable="http://www.eclipse.org/papyrus/nattable/model" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis http://www.eclipse.org/papyrus/nattable/model#//nattableaxis http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model#//nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableconfiguration" xmi:id="_FERfIGhHEeWchZKsEGp2Eg" name="RequirementTable0" currentRowAxisProvider="_FESGMWhHEeWchZKsEGp2Eg" currentColumnAxisProvider="_FERfIWhHEeWchZKsEGp2Eg">
+ <context xmi:type="uml:Model" href="ImportEmptyAddAll_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <owner xmi:type="uml:Model" href="ImportEmptyAddAll_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <prototype xmi:type="configuration:PapyrusSyncTable" href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wNb3txhEeOqHvRyiN87hA"/>
+ <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#/"/>
+ <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_FERfIWhHEeWchZKsEGp2Eg" description="Provides the columns of the tables with a default configuration" name="Requirements Feature Columns Provider">
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FERfImhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::id">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_FERfI2hHEeWchZKsEGp2Eg">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FESGMGhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::text">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ </columnAxisProvidersHistory>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_FESGMWhHEeWchZKsEGp2Eg" description="Provides the requirements directly owned by the context of the table" name="Requirement Axis Provider" disconnectSlave="true"/>
+ <localRowHeaderAxisConfiguration xmi:type="nattableaxisconfiguration:LocalTableHeaderAxisConfiguration" xmi:id="__iG3cHmnEeWVZIGG1XbiFw" indexStyle="NUMERIC">
+ <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:PasteEObjectConfiguration" xmi:id="__iSdoHmnEeWVZIGG1XbiFw" pastedElementId="org.eclipse.papyrus.sysml.Requirement">
+ <postActions>applyStereotype:/SysML::Requirements::Requirement</postActions>
+ <pasteElementContainementFeature xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Package/packagedElement"/>
+ <axisIdentifier xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="__iTEsHmnEeWVZIGG1XbiFw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axisIdentifier>
+ </ownedAxisConfigurations>
+ </localRowHeaderAxisConfiguration>
+</nattable:Table>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportEmptyAddAll_Test.uml b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportEmptyAddAll_Test.uml
new file mode 100755
index 0000000..bbeea50
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportEmptyAddAll_Test.uml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Requirements="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements">
+ <uml:Model xmi:id="_nAjG8GIeEeWkqekCWoLl5g" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_pYCiwGIeEeWkqekCWoLl5g" name="Class1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p2QIwGIeEeWkqekCWoLl5g" name="CopyOf_Class1_1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p5RnkGIeEeWkqekCWoLl5g" name="CopyOf_Class1_2"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZN74GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZN74WgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_TZ_nULU5EduiKqCzJMWbGw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZOi8GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPKAGgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZPxEGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPxEWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQYIGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQYIWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQ_MGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQ_MWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_5WYJ0LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZRmQGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZRmQWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//activities"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_C2zXMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZSNUGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZSNUWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZS0YGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZS0YWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZTbcGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZTbcWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//interactions"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_meOioLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUCgGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUCgWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//statemachines"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_nAF5kLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUpkGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUpkWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//usecases"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_neZmMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Requirements:Requirement xmi:id="_CA5NsGhHEeWchZKsEGp2Eg" base_Class="_pYCiwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_CrCW4GhHEeWchZKsEGp2Eg" base_Class="_p2QIwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_DaVF0GhHEeWchZKsEGp2Eg" base_Class="_p5RnkGIeEeWkqekCWoLl5g"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportEmptyAddAll_Test_Initial.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportEmptyAddAll_Test_Initial.txt
new file mode 100755
index 0000000..3425e9b
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportEmptyAddAll_Test_Initial.txt
@@ -0,0 +1,3 @@
+ Class1
+ CopyOf_Class1_1
+ CopyOf_Class1_2
\ No newline at end of file
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportEmptyAddAll_Test_Result.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportEmptyAddAll_Test_Result.txt
new file mode 100755
index 0000000..aba13c6
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportEmptyAddAll_Test_Result.txt
@@ -0,0 +1,6 @@
+ Class1
+ CopyOf_Class1_1
+ CopyOf_Class1_2
+ Class1 aaaa
+ CopyOf_Class1_1 bbbb
+ CopyOf_Class1_2 cccc
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportEmptyReplaceAll_Test.csv b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportEmptyReplaceAll_Test.csv
new file mode 100755
index 0000000..65cbefd
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportEmptyReplaceAll_Test.csv
@@ -0,0 +1,4 @@
+;Class1;aaaa
+;CopyOf_Class1_1;bbbb
+;CopyOf_Class1_2;cccc
+;;
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportEmptyReplaceAll_Test.di b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportEmptyReplaceAll_Test.di
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportEmptyReplaceAll_Test.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportEmptyReplaceAll_Test.notation b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportEmptyReplaceAll_Test.notation
new file mode 100755
index 0000000..09a0edf
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportEmptyReplaceAll_Test.notation
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nattable:Table xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:nattable="http://www.eclipse.org/papyrus/nattable/model" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis http://www.eclipse.org/papyrus/nattable/model#//nattableaxis http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model#//nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableconfiguration" xmi:id="_FERfIGhHEeWchZKsEGp2Eg" name="RequirementTable0" currentRowAxisProvider="_FESGMWhHEeWchZKsEGp2Eg" currentColumnAxisProvider="_FERfIWhHEeWchZKsEGp2Eg">
+ <context xmi:type="uml:Model" href="ImportEmptyReplaceAll_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <owner xmi:type="uml:Model" href="ImportEmptyReplaceAll_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <prototype xmi:type="configuration:PapyrusSyncTable" href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wNb3txhEeOqHvRyiN87hA"/>
+ <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#/"/>
+ <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_FERfIWhHEeWchZKsEGp2Eg" description="Provides the columns of the tables with a default configuration" name="Requirements Feature Columns Provider">
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FERfImhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::id">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_FERfI2hHEeWchZKsEGp2Eg">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FESGMGhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::text">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ </columnAxisProvidersHistory>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_FESGMWhHEeWchZKsEGp2Eg" description="Provides the requirements directly owned by the context of the table" name="Requirement Axis Provider" disconnectSlave="true"/>
+ <localRowHeaderAxisConfiguration xmi:type="nattableaxisconfiguration:LocalTableHeaderAxisConfiguration" xmi:id="__iG3cHmnEeWVZIGG1XbiFw" indexStyle="NUMERIC">
+ <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:PasteEObjectConfiguration" xmi:id="__iSdoHmnEeWVZIGG1XbiFw" pastedElementId="org.eclipse.papyrus.sysml.Requirement">
+ <postActions>applyStereotype:/SysML::Requirements::Requirement</postActions>
+ <pasteElementContainementFeature xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Package/packagedElement"/>
+ <axisIdentifier xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="__iTEsHmnEeWVZIGG1XbiFw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axisIdentifier>
+ </ownedAxisConfigurations>
+ </localRowHeaderAxisConfiguration>
+</nattable:Table>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportEmptyReplaceAll_Test.uml b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportEmptyReplaceAll_Test.uml
new file mode 100755
index 0000000..bbeea50
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportEmptyReplaceAll_Test.uml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Requirements="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements">
+ <uml:Model xmi:id="_nAjG8GIeEeWkqekCWoLl5g" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_pYCiwGIeEeWkqekCWoLl5g" name="Class1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p2QIwGIeEeWkqekCWoLl5g" name="CopyOf_Class1_1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p5RnkGIeEeWkqekCWoLl5g" name="CopyOf_Class1_2"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZN74GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZN74WgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_TZ_nULU5EduiKqCzJMWbGw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZOi8GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPKAGgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZPxEGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPxEWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQYIGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQYIWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQ_MGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQ_MWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_5WYJ0LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZRmQGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZRmQWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//activities"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_C2zXMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZSNUGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZSNUWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZS0YGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZS0YWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZTbcGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZTbcWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//interactions"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_meOioLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUCgGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUCgWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//statemachines"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_nAF5kLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUpkGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUpkWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//usecases"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_neZmMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Requirements:Requirement xmi:id="_CA5NsGhHEeWchZKsEGp2Eg" base_Class="_pYCiwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_CrCW4GhHEeWchZKsEGp2Eg" base_Class="_p2QIwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_DaVF0GhHEeWchZKsEGp2Eg" base_Class="_p5RnkGIeEeWkqekCWoLl5g"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportEmptyReplaceAll_Test_Initial.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportEmptyReplaceAll_Test_Initial.txt
new file mode 100755
index 0000000..3425e9b
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportEmptyReplaceAll_Test_Initial.txt
@@ -0,0 +1,3 @@
+ Class1
+ CopyOf_Class1_1
+ CopyOf_Class1_2
\ No newline at end of file
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportEmptyReplaceAll_Test_Result.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportEmptyReplaceAll_Test_Result.txt
new file mode 100755
index 0000000..56aa9b2
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportEmptyReplaceAll_Test_Result.txt
@@ -0,0 +1,3 @@
+ Class1 aaaa
+ CopyOf_Class1_1 bbbb
+ CopyOf_Class1_2 cccc
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportEmptySkipAll_Test.csv b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportEmptySkipAll_Test.csv
new file mode 100755
index 0000000..65cbefd
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportEmptySkipAll_Test.csv
@@ -0,0 +1,4 @@
+;Class1;aaaa
+;CopyOf_Class1_1;bbbb
+;CopyOf_Class1_2;cccc
+;;
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportEmptySkipAll_Test.di b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportEmptySkipAll_Test.di
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportEmptySkipAll_Test.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportEmptySkipAll_Test.notation b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportEmptySkipAll_Test.notation
new file mode 100755
index 0000000..1bb99e9
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportEmptySkipAll_Test.notation
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nattable:Table xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:nattable="http://www.eclipse.org/papyrus/nattable/model" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis http://www.eclipse.org/papyrus/nattable/model#//nattableaxis http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model#//nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableconfiguration" xmi:id="_FERfIGhHEeWchZKsEGp2Eg" name="RequirementTable0" currentRowAxisProvider="_FESGMWhHEeWchZKsEGp2Eg" currentColumnAxisProvider="_FERfIWhHEeWchZKsEGp2Eg">
+ <context xmi:type="uml:Model" href="ImportEmptySkipAll_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <owner xmi:type="uml:Model" href="ImportEmptySkipAll_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <prototype xmi:type="configuration:PapyrusSyncTable" href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wNb3txhEeOqHvRyiN87hA"/>
+ <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#/"/>
+ <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_FERfIWhHEeWchZKsEGp2Eg" description="Provides the columns of the tables with a default configuration" name="Requirements Feature Columns Provider">
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FERfImhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::id">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_FERfI2hHEeWchZKsEGp2Eg">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FESGMGhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::text">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ </columnAxisProvidersHistory>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_FESGMWhHEeWchZKsEGp2Eg" description="Provides the requirements directly owned by the context of the table" name="Requirement Axis Provider" disconnectSlave="true"/>
+ <localRowHeaderAxisConfiguration xmi:type="nattableaxisconfiguration:LocalTableHeaderAxisConfiguration" xmi:id="__iG3cHmnEeWVZIGG1XbiFw" indexStyle="NUMERIC">
+ <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:PasteEObjectConfiguration" xmi:id="__iSdoHmnEeWVZIGG1XbiFw" pastedElementId="org.eclipse.papyrus.sysml.Requirement">
+ <postActions>applyStereotype:/SysML::Requirements::Requirement</postActions>
+ <pasteElementContainementFeature xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Package/packagedElement"/>
+ <axisIdentifier xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="__iTEsHmnEeWVZIGG1XbiFw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axisIdentifier>
+ </ownedAxisConfigurations>
+ </localRowHeaderAxisConfiguration>
+</nattable:Table>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportEmptySkipAll_Test.uml b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportEmptySkipAll_Test.uml
new file mode 100755
index 0000000..bbeea50
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportEmptySkipAll_Test.uml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Requirements="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements">
+ <uml:Model xmi:id="_nAjG8GIeEeWkqekCWoLl5g" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_pYCiwGIeEeWkqekCWoLl5g" name="Class1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p2QIwGIeEeWkqekCWoLl5g" name="CopyOf_Class1_1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p5RnkGIeEeWkqekCWoLl5g" name="CopyOf_Class1_2"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZN74GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZN74WgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_TZ_nULU5EduiKqCzJMWbGw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZOi8GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPKAGgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZPxEGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPxEWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQYIGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQYIWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQ_MGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQ_MWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_5WYJ0LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZRmQGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZRmQWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//activities"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_C2zXMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZSNUGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZSNUWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZS0YGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZS0YWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZTbcGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZTbcWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//interactions"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_meOioLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUCgGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUCgWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//statemachines"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_nAF5kLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUpkGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUpkWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//usecases"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_neZmMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Requirements:Requirement xmi:id="_CA5NsGhHEeWchZKsEGp2Eg" base_Class="_pYCiwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_CrCW4GhHEeWchZKsEGp2Eg" base_Class="_p2QIwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_DaVF0GhHEeWchZKsEGp2Eg" base_Class="_p5RnkGIeEeWkqekCWoLl5g"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportEmptySkipAll_Test_Initial.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportEmptySkipAll_Test_Initial.txt
new file mode 100755
index 0000000..3425e9b
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportEmptySkipAll_Test_Initial.txt
@@ -0,0 +1,3 @@
+ Class1
+ CopyOf_Class1_1
+ CopyOf_Class1_2
\ No newline at end of file
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportEmptySkipAll_Test_Result.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportEmptySkipAll_Test_Result.txt
new file mode 100755
index 0000000..680bfec
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportEmptySkipAll_Test_Result.txt
@@ -0,0 +1,3 @@
+ Class1
+ CopyOf_Class1_1
+ CopyOf_Class1_2
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportRowsAddAll_Test.csv b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportRowsAddAll_Test.csv
new file mode 100755
index 0000000..65cbefd
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportRowsAddAll_Test.csv
@@ -0,0 +1,4 @@
+;Class1;aaaa
+;CopyOf_Class1_1;bbbb
+;CopyOf_Class1_2;cccc
+;;
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportRowsAddAll_Test.di b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportRowsAddAll_Test.di
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportRowsAddAll_Test.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportRowsAddAll_Test.notation b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportRowsAddAll_Test.notation
new file mode 100755
index 0000000..6bd4e47
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportRowsAddAll_Test.notation
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nattable:Table xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:nattable="http://www.eclipse.org/papyrus/nattable/model" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis http://www.eclipse.org/papyrus/nattable/model#//nattableaxis http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model#//nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableconfiguration" xmi:id="_FERfIGhHEeWchZKsEGp2Eg" name="RequirementTable0" currentRowAxisProvider="_FESGMWhHEeWchZKsEGp2Eg" currentColumnAxisProvider="_FERfIWhHEeWchZKsEGp2Eg">
+ <context xmi:type="uml:Model" href="ImportRowsAddAll_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <owner xmi:type="uml:Model" href="ImportRowsAddAll_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <prototype xmi:type="configuration:PapyrusSyncTable" href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wNb3txhEeOqHvRyiN87hA"/>
+ <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#/"/>
+ <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_FERfIWhHEeWchZKsEGp2Eg" description="Provides the columns of the tables with a default configuration" name="Requirements Feature Columns Provider">
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FERfImhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::id">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_FERfI2hHEeWchZKsEGp2Eg">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FESGMGhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::text">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ </columnAxisProvidersHistory>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_FESGMWhHEeWchZKsEGp2Eg" description="Provides the requirements directly owned by the context of the table" name="Requirement Axis Provider" disconnectSlave="true"/>
+ <localRowHeaderAxisConfiguration xmi:type="nattableaxisconfiguration:LocalTableHeaderAxisConfiguration" xmi:id="__iG3cHmnEeWVZIGG1XbiFw" indexStyle="NUMERIC">
+ <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:PasteEObjectConfiguration" xmi:id="__iSdoHmnEeWVZIGG1XbiFw" pastedElementId="org.eclipse.papyrus.sysml.Requirement">
+ <postActions>applyStereotype:/SysML::Requirements::Requirement</postActions>
+ <pasteElementContainementFeature xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Package/packagedElement"/>
+ <axisIdentifier xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="__iTEsHmnEeWVZIGG1XbiFw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axisIdentifier>
+ </ownedAxisConfigurations>
+ </localRowHeaderAxisConfiguration>
+</nattable:Table>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportRowsAddAll_Test.uml b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportRowsAddAll_Test.uml
new file mode 100755
index 0000000..bbeea50
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportRowsAddAll_Test.uml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Requirements="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements">
+ <uml:Model xmi:id="_nAjG8GIeEeWkqekCWoLl5g" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_pYCiwGIeEeWkqekCWoLl5g" name="Class1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p2QIwGIeEeWkqekCWoLl5g" name="CopyOf_Class1_1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p5RnkGIeEeWkqekCWoLl5g" name="CopyOf_Class1_2"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZN74GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZN74WgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_TZ_nULU5EduiKqCzJMWbGw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZOi8GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPKAGgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZPxEGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPxEWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQYIGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQYIWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQ_MGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQ_MWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_5WYJ0LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZRmQGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZRmQWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//activities"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_C2zXMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZSNUGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZSNUWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZS0YGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZS0YWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZTbcGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZTbcWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//interactions"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_meOioLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUCgGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUCgWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//statemachines"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_nAF5kLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUpkGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUpkWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//usecases"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_neZmMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Requirements:Requirement xmi:id="_CA5NsGhHEeWchZKsEGp2Eg" base_Class="_pYCiwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_CrCW4GhHEeWchZKsEGp2Eg" base_Class="_p2QIwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_DaVF0GhHEeWchZKsEGp2Eg" base_Class="_p5RnkGIeEeWkqekCWoLl5g"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportRowsAddAll_Test_Initial.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportRowsAddAll_Test_Initial.txt
new file mode 100755
index 0000000..3425e9b
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportRowsAddAll_Test_Initial.txt
@@ -0,0 +1,3 @@
+ Class1
+ CopyOf_Class1_1
+ CopyOf_Class1_2
\ No newline at end of file
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportRowsAddAll_Test_Result.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportRowsAddAll_Test_Result.txt
new file mode 100755
index 0000000..aba13c6
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportRowsAddAll_Test_Result.txt
@@ -0,0 +1,6 @@
+ Class1
+ CopyOf_Class1_1
+ CopyOf_Class1_2
+ Class1 aaaa
+ CopyOf_Class1_1 bbbb
+ CopyOf_Class1_2 cccc
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportRowsReplaceAll_Test.csv b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportRowsReplaceAll_Test.csv
new file mode 100755
index 0000000..65cbefd
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportRowsReplaceAll_Test.csv
@@ -0,0 +1,4 @@
+;Class1;aaaa
+;CopyOf_Class1_1;bbbb
+;CopyOf_Class1_2;cccc
+;;
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportRowsReplaceAll_Test.di b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportRowsReplaceAll_Test.di
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportRowsReplaceAll_Test.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportRowsReplaceAll_Test.notation b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportRowsReplaceAll_Test.notation
new file mode 100755
index 0000000..ebc93cb
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportRowsReplaceAll_Test.notation
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nattable:Table xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:nattable="http://www.eclipse.org/papyrus/nattable/model" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis http://www.eclipse.org/papyrus/nattable/model#//nattableaxis http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model#//nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableconfiguration" xmi:id="_FERfIGhHEeWchZKsEGp2Eg" name="RequirementTable0" currentRowAxisProvider="_FESGMWhHEeWchZKsEGp2Eg" currentColumnAxisProvider="_FERfIWhHEeWchZKsEGp2Eg">
+ <context xmi:type="uml:Model" href="ImportRowsReplaceAll_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <owner xmi:type="uml:Model" href="ImportRowsReplaceAll_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <prototype xmi:type="configuration:PapyrusSyncTable" href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wNb3txhEeOqHvRyiN87hA"/>
+ <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#/"/>
+ <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_FERfIWhHEeWchZKsEGp2Eg" description="Provides the columns of the tables with a default configuration" name="Requirements Feature Columns Provider">
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FERfImhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::id">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_FERfI2hHEeWchZKsEGp2Eg">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FESGMGhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::text">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ </columnAxisProvidersHistory>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_FESGMWhHEeWchZKsEGp2Eg" description="Provides the requirements directly owned by the context of the table" name="Requirement Axis Provider" disconnectSlave="true"/>
+ <localRowHeaderAxisConfiguration xmi:type="nattableaxisconfiguration:LocalTableHeaderAxisConfiguration" xmi:id="__iG3cHmnEeWVZIGG1XbiFw" indexStyle="NUMERIC">
+ <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:PasteEObjectConfiguration" xmi:id="__iSdoHmnEeWVZIGG1XbiFw" pastedElementId="org.eclipse.papyrus.sysml.Requirement">
+ <postActions>applyStereotype:/SysML::Requirements::Requirement</postActions>
+ <pasteElementContainementFeature xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Package/packagedElement"/>
+ <axisIdentifier xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="__iTEsHmnEeWVZIGG1XbiFw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axisIdentifier>
+ </ownedAxisConfigurations>
+ </localRowHeaderAxisConfiguration>
+</nattable:Table>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportRowsReplaceAll_Test.uml b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportRowsReplaceAll_Test.uml
new file mode 100755
index 0000000..bbeea50
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportRowsReplaceAll_Test.uml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Requirements="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements">
+ <uml:Model xmi:id="_nAjG8GIeEeWkqekCWoLl5g" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_pYCiwGIeEeWkqekCWoLl5g" name="Class1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p2QIwGIeEeWkqekCWoLl5g" name="CopyOf_Class1_1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p5RnkGIeEeWkqekCWoLl5g" name="CopyOf_Class1_2"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZN74GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZN74WgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_TZ_nULU5EduiKqCzJMWbGw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZOi8GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPKAGgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZPxEGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPxEWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQYIGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQYIWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQ_MGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQ_MWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_5WYJ0LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZRmQGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZRmQWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//activities"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_C2zXMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZSNUGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZSNUWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZS0YGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZS0YWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZTbcGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZTbcWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//interactions"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_meOioLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUCgGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUCgWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//statemachines"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_nAF5kLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUpkGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUpkWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//usecases"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_neZmMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Requirements:Requirement xmi:id="_CA5NsGhHEeWchZKsEGp2Eg" base_Class="_pYCiwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_CrCW4GhHEeWchZKsEGp2Eg" base_Class="_p2QIwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_DaVF0GhHEeWchZKsEGp2Eg" base_Class="_p5RnkGIeEeWkqekCWoLl5g"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportRowsReplaceAll_Test_Initial.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportRowsReplaceAll_Test_Initial.txt
new file mode 100755
index 0000000..3425e9b
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportRowsReplaceAll_Test_Initial.txt
@@ -0,0 +1,3 @@
+ Class1
+ CopyOf_Class1_1
+ CopyOf_Class1_2
\ No newline at end of file
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportRowsReplaceAll_Test_Result.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportRowsReplaceAll_Test_Result.txt
new file mode 100755
index 0000000..56aa9b2
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportRowsReplaceAll_Test_Result.txt
@@ -0,0 +1,3 @@
+ Class1 aaaa
+ CopyOf_Class1_1 bbbb
+ CopyOf_Class1_2 cccc
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportRowsSkipAll_Test.csv b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportRowsSkipAll_Test.csv
new file mode 100755
index 0000000..65cbefd
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportRowsSkipAll_Test.csv
@@ -0,0 +1,4 @@
+;Class1;aaaa
+;CopyOf_Class1_1;bbbb
+;CopyOf_Class1_2;cccc
+;;
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportRowsSkipAll_Test.di b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportRowsSkipAll_Test.di
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportRowsSkipAll_Test.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportRowsSkipAll_Test.notation b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportRowsSkipAll_Test.notation
new file mode 100755
index 0000000..186d5a1
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportRowsSkipAll_Test.notation
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nattable:Table xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:nattable="http://www.eclipse.org/papyrus/nattable/model" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis http://www.eclipse.org/papyrus/nattable/model#//nattableaxis http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model#//nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableconfiguration" xmi:id="_FERfIGhHEeWchZKsEGp2Eg" name="RequirementTable0" currentRowAxisProvider="_FESGMWhHEeWchZKsEGp2Eg" currentColumnAxisProvider="_FERfIWhHEeWchZKsEGp2Eg">
+ <context xmi:type="uml:Model" href="ImportRowsSkipAll_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <owner xmi:type="uml:Model" href="ImportRowsSkipAll_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <prototype xmi:type="configuration:PapyrusSyncTable" href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wNb3txhEeOqHvRyiN87hA"/>
+ <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#/"/>
+ <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_FERfIWhHEeWchZKsEGp2Eg" description="Provides the columns of the tables with a default configuration" name="Requirements Feature Columns Provider">
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FERfImhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::id">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_FERfI2hHEeWchZKsEGp2Eg">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FESGMGhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::text">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ </columnAxisProvidersHistory>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_FESGMWhHEeWchZKsEGp2Eg" description="Provides the requirements directly owned by the context of the table" name="Requirement Axis Provider" disconnectSlave="true"/>
+ <localRowHeaderAxisConfiguration xmi:type="nattableaxisconfiguration:LocalTableHeaderAxisConfiguration" xmi:id="__iG3cHmnEeWVZIGG1XbiFw" indexStyle="NUMERIC">
+ <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:PasteEObjectConfiguration" xmi:id="__iSdoHmnEeWVZIGG1XbiFw" pastedElementId="org.eclipse.papyrus.sysml.Requirement">
+ <postActions>applyStereotype:/SysML::Requirements::Requirement</postActions>
+ <pasteElementContainementFeature xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Package/packagedElement"/>
+ <axisIdentifier xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="__iTEsHmnEeWVZIGG1XbiFw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axisIdentifier>
+ </ownedAxisConfigurations>
+ </localRowHeaderAxisConfiguration>
+</nattable:Table>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportRowsSkipAll_Test.uml b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportRowsSkipAll_Test.uml
new file mode 100755
index 0000000..bbeea50
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportRowsSkipAll_Test.uml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Requirements="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements">
+ <uml:Model xmi:id="_nAjG8GIeEeWkqekCWoLl5g" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_pYCiwGIeEeWkqekCWoLl5g" name="Class1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p2QIwGIeEeWkqekCWoLl5g" name="CopyOf_Class1_1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p5RnkGIeEeWkqekCWoLl5g" name="CopyOf_Class1_2"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZN74GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZN74WgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_TZ_nULU5EduiKqCzJMWbGw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZOi8GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPKAGgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZPxEGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPxEWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQYIGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQYIWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQ_MGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQ_MWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_5WYJ0LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZRmQGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZRmQWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//activities"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_C2zXMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZSNUGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZSNUWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZS0YGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZS0YWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZTbcGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZTbcWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//interactions"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_meOioLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUCgGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUCgWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//statemachines"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_nAF5kLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUpkGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUpkWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//usecases"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_neZmMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Requirements:Requirement xmi:id="_CA5NsGhHEeWchZKsEGp2Eg" base_Class="_pYCiwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_CrCW4GhHEeWchZKsEGp2Eg" base_Class="_p2QIwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_DaVF0GhHEeWchZKsEGp2Eg" base_Class="_p5RnkGIeEeWkqekCWoLl5g"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportRowsSkipAll_Test_Initial.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportRowsSkipAll_Test_Initial.txt
new file mode 100755
index 0000000..3425e9b
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportRowsSkipAll_Test_Initial.txt
@@ -0,0 +1,3 @@
+ Class1
+ CopyOf_Class1_1
+ CopyOf_Class1_2
\ No newline at end of file
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportRowsSkipAll_Test_Result.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportRowsSkipAll_Test_Result.txt
new file mode 100755
index 0000000..680bfec
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/import/ImportRowsSkipAll_Test_Result.txt
@@ -0,0 +1,3 @@
+ Class1
+ CopyOf_Class1_1
+ CopyOf_Class1_2
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyAddAll_Test.di b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyAddAll_Test.di
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyAddAll_Test.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyAddAll_Test.notation b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyAddAll_Test.notation
new file mode 100755
index 0000000..cc0f9c4
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyAddAll_Test.notation
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nattable:Table xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:nattable="http://www.eclipse.org/papyrus/nattable/model" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis http://www.eclipse.org/papyrus/nattable/model#//nattableaxis http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model#//nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableconfiguration" xmi:id="_FERfIGhHEeWchZKsEGp2Eg" name="RequirementTable0" currentRowAxisProvider="_FESGMWhHEeWchZKsEGp2Eg" currentColumnAxisProvider="_FERfIWhHEeWchZKsEGp2Eg">
+ <context xmi:type="uml:Model" href="InsertEmptyAddAll_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <owner xmi:type="uml:Model" href="InsertEmptyAddAll_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <prototype xmi:type="configuration:PapyrusSyncTable" href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wNb3txhEeOqHvRyiN87hA"/>
+ <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#/"/>
+ <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_FERfIWhHEeWchZKsEGp2Eg" description="Provides the columns of the tables with a default configuration" name="Requirements Feature Columns Provider">
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FERfImhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::id">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_FERfI2hHEeWchZKsEGp2Eg">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FESGMGhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::text">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ </columnAxisProvidersHistory>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_FESGMWhHEeWchZKsEGp2Eg" description="Provides the requirements directly owned by the context of the table" name="Requirement Axis Provider" disconnectSlave="true"/>
+ <localRowHeaderAxisConfiguration xmi:type="nattableaxisconfiguration:LocalTableHeaderAxisConfiguration" xmi:id="__iG3cHmnEeWVZIGG1XbiFw" indexStyle="NUMERIC">
+ <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:PasteEObjectConfiguration" xmi:id="__iSdoHmnEeWVZIGG1XbiFw" pastedElementId="org.eclipse.papyrus.sysml.Requirement">
+ <postActions>applyStereotype:/SysML::Requirements::Requirement</postActions>
+ <pasteElementContainementFeature xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Package/packagedElement"/>
+ <axisIdentifier xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="__iTEsHmnEeWVZIGG1XbiFw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axisIdentifier>
+ </ownedAxisConfigurations>
+ </localRowHeaderAxisConfiguration>
+</nattable:Table>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyAddAll_Test.uml b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyAddAll_Test.uml
new file mode 100755
index 0000000..bbeea50
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyAddAll_Test.uml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Requirements="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements">
+ <uml:Model xmi:id="_nAjG8GIeEeWkqekCWoLl5g" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_pYCiwGIeEeWkqekCWoLl5g" name="Class1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p2QIwGIeEeWkqekCWoLl5g" name="CopyOf_Class1_1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p5RnkGIeEeWkqekCWoLl5g" name="CopyOf_Class1_2"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZN74GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZN74WgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_TZ_nULU5EduiKqCzJMWbGw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZOi8GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPKAGgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZPxEGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPxEWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQYIGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQYIWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQ_MGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQ_MWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_5WYJ0LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZRmQGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZRmQWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//activities"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_C2zXMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZSNUGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZSNUWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZS0YGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZS0YWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZTbcGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZTbcWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//interactions"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_meOioLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUCgGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUCgWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//statemachines"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_nAF5kLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUpkGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUpkWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//usecases"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_neZmMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Requirements:Requirement xmi:id="_CA5NsGhHEeWchZKsEGp2Eg" base_Class="_pYCiwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_CrCW4GhHEeWchZKsEGp2Eg" base_Class="_p2QIwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_DaVF0GhHEeWchZKsEGp2Eg" base_Class="_p5RnkGIeEeWkqekCWoLl5g"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyAddAll_Test_Initial.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyAddAll_Test_Initial.txt
new file mode 100755
index 0000000..3425e9b
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyAddAll_Test_Initial.txt
@@ -0,0 +1,3 @@
+ Class1
+ CopyOf_Class1_1
+ CopyOf_Class1_2
\ No newline at end of file
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyAddAll_Test_Result.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyAddAll_Test_Result.txt
new file mode 100755
index 0000000..aba13c6
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyAddAll_Test_Result.txt
@@ -0,0 +1,6 @@
+ Class1
+ CopyOf_Class1_1
+ CopyOf_Class1_2
+ Class1 aaaa
+ CopyOf_Class1_1 bbbb
+ CopyOf_Class1_2 cccc
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyAddAll_Test_ToCopy.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyAddAll_Test_ToCopy.txt
new file mode 100755
index 0000000..b05f44a
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyAddAll_Test_ToCopy.txt
@@ -0,0 +1,4 @@
+ Class1 aaaa
+ CopyOf_Class1_1 bbbb
+ CopyOf_Class1_2 cccc
+
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyAxisIdentifierNotExisting_Test.di b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyAxisIdentifierNotExisting_Test.di
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyAxisIdentifierNotExisting_Test.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyAxisIdentifierNotExisting_Test.notation b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyAxisIdentifierNotExisting_Test.notation
new file mode 100755
index 0000000..82f5cca
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyAxisIdentifierNotExisting_Test.notation
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nattable:Table xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:nattable="http://www.eclipse.org/papyrus/nattable/model" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis http://www.eclipse.org/papyrus/nattable/model#//nattableaxis http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model#//nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableconfiguration" xmi:id="_FERfIGhHEeWchZKsEGp2Eg" name="RequirementTable0" currentRowAxisProvider="_FESGMWhHEeWchZKsEGp2Eg" currentColumnAxisProvider="_FERfIWhHEeWchZKsEGp2Eg">
+ <context xmi:type="uml:Model" href="InsertEmptyAxisIdentifierNotExisting_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <owner xmi:type="uml:Model" href="InsertEmptyAxisIdentifierNotExisting_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <prototype xmi:type="configuration:PapyrusSyncTable" href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wNb3txhEeOqHvRyiN87hA"/>
+ <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#/"/>
+ <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_FERfIWhHEeWchZKsEGp2Eg" description="Provides the columns of the tables with a default configuration" name="Requirements Feature Columns Provider">
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FERfImhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::id">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FESGMGhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::text">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_1etgAG5bEeWpLowMLPbtlg" element="property_of_stereotype:/SysML::Requirements::Requirement::derived">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ </columnAxisProvidersHistory>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_FESGMWhHEeWchZKsEGp2Eg" description="Provides the requirements directly owned by the context of the table" name="Requirement Axis Provider" disconnectSlave="true"/>
+ <localRowHeaderAxisConfiguration xmi:type="nattableaxisconfiguration:LocalTableHeaderAxisConfiguration" xmi:id="_GF2RQHmoEeWVZIGG1XbiFw" indexStyle="NUMERIC">
+ <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:PasteEObjectConfiguration" xmi:id="_GF4GcHmoEeWVZIGG1XbiFw" pastedElementId="org.eclipse.papyrus.sysml.Requirement">
+ <postActions>applyStereotype:/SysML::Requirements::Requirement</postActions>
+ <pasteElementContainementFeature xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Package/packagedElement"/>
+ <axisIdentifier xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_GF4tgHmoEeWVZIGG1XbiFw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axisIdentifier>
+ </ownedAxisConfigurations>
+ </localRowHeaderAxisConfiguration>
+</nattable:Table>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyAxisIdentifierNotExisting_Test.uml b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyAxisIdentifierNotExisting_Test.uml
new file mode 100755
index 0000000..bbeea50
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyAxisIdentifierNotExisting_Test.uml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Requirements="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements">
+ <uml:Model xmi:id="_nAjG8GIeEeWkqekCWoLl5g" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_pYCiwGIeEeWkqekCWoLl5g" name="Class1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p2QIwGIeEeWkqekCWoLl5g" name="CopyOf_Class1_1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p5RnkGIeEeWkqekCWoLl5g" name="CopyOf_Class1_2"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZN74GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZN74WgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_TZ_nULU5EduiKqCzJMWbGw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZOi8GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPKAGgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZPxEGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPxEWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQYIGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQYIWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQ_MGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQ_MWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_5WYJ0LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZRmQGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZRmQWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//activities"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_C2zXMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZSNUGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZSNUWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZS0YGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZS0YWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZTbcGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZTbcWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//interactions"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_meOioLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUCgGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUCgWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//statemachines"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_nAF5kLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUpkGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUpkWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//usecases"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_neZmMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Requirements:Requirement xmi:id="_CA5NsGhHEeWchZKsEGp2Eg" base_Class="_pYCiwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_CrCW4GhHEeWchZKsEGp2Eg" base_Class="_p2QIwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_DaVF0GhHEeWchZKsEGp2Eg" base_Class="_p5RnkGIeEeWkqekCWoLl5g"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyAxisIdentifierNotExisting_Test_Initial.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyAxisIdentifierNotExisting_Test_Initial.txt
new file mode 100755
index 0000000..fb47d81
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyAxisIdentifierNotExisting_Test_Initial.txt
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyAxisIdentifierNotExisting_Test_ToCopy.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyAxisIdentifierNotExisting_Test_ToCopy.txt
new file mode 100755
index 0000000..b2b4754
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyAxisIdentifierNotExisting_Test_ToCopy.txt
@@ -0,0 +1,4 @@
+ Class1 aaaa
+ Class2 bbbb
+ CopyOf_Class1_2 cccc
+
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyClipboard_Test.di b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyClipboard_Test.di
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyClipboard_Test.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyClipboard_Test.notation b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyClipboard_Test.notation
new file mode 100755
index 0000000..211e954
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyClipboard_Test.notation
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nattable:Table xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:nattable="http://www.eclipse.org/papyrus/nattable/model" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis http://www.eclipse.org/papyrus/nattable/model#//nattableaxis http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model#//nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableconfiguration" xmi:id="_FERfIGhHEeWchZKsEGp2Eg" name="RequirementTable0" currentRowAxisProvider="_FESGMWhHEeWchZKsEGp2Eg" currentColumnAxisProvider="_FERfIWhHEeWchZKsEGp2Eg">
+ <context xmi:type="uml:Model" href="InsertEmptyClipboard_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <owner xmi:type="uml:Model" href="InsertEmptyClipboard_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <prototype xmi:type="configuration:PapyrusSyncTable" href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wNb3txhEeOqHvRyiN87hA"/>
+ <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#/"/>
+ <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_FERfIWhHEeWchZKsEGp2Eg" description="Provides the columns of the tables with a default configuration" name="Requirements Feature Columns Provider">
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FERfImhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::id">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_FERfI2hHEeWchZKsEGp2Eg">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FESGMGhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::text">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ </columnAxisProvidersHistory>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_FESGMWhHEeWchZKsEGp2Eg" description="Provides the requirements directly owned by the context of the table" name="Requirement Axis Provider" disconnectSlave="true"/>
+ <localRowHeaderAxisConfiguration xmi:type="nattableaxisconfiguration:LocalTableHeaderAxisConfiguration" xmi:id="__iG3cHmnEeWVZIGG1XbiFw" indexStyle="NUMERIC">
+ <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:PasteEObjectConfiguration" xmi:id="__iSdoHmnEeWVZIGG1XbiFw" pastedElementId="org.eclipse.papyrus.sysml.Requirement">
+ <postActions>applyStereotype:/SysML::Requirements::Requirement</postActions>
+ <pasteElementContainementFeature xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Package/packagedElement"/>
+ <axisIdentifier xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="__iTEsHmnEeWVZIGG1XbiFw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axisIdentifier>
+ </ownedAxisConfigurations>
+ </localRowHeaderAxisConfiguration>
+</nattable:Table>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyClipboard_Test.uml b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyClipboard_Test.uml
new file mode 100755
index 0000000..bbeea50
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyClipboard_Test.uml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Requirements="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements">
+ <uml:Model xmi:id="_nAjG8GIeEeWkqekCWoLl5g" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_pYCiwGIeEeWkqekCWoLl5g" name="Class1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p2QIwGIeEeWkqekCWoLl5g" name="CopyOf_Class1_1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p5RnkGIeEeWkqekCWoLl5g" name="CopyOf_Class1_2"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZN74GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZN74WgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_TZ_nULU5EduiKqCzJMWbGw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZOi8GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPKAGgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZPxEGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPxEWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQYIGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQYIWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQ_MGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQ_MWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_5WYJ0LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZRmQGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZRmQWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//activities"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_C2zXMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZSNUGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZSNUWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZS0YGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZS0YWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZTbcGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZTbcWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//interactions"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_meOioLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUCgGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUCgWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//statemachines"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_nAF5kLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUpkGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUpkWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//usecases"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_neZmMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Requirements:Requirement xmi:id="_CA5NsGhHEeWchZKsEGp2Eg" base_Class="_pYCiwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_CrCW4GhHEeWchZKsEGp2Eg" base_Class="_p2QIwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_DaVF0GhHEeWchZKsEGp2Eg" base_Class="_p5RnkGIeEeWkqekCWoLl5g"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyClipboard_Test_Initial.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyClipboard_Test_Initial.txt
new file mode 100755
index 0000000..3425e9b
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyClipboard_Test_Initial.txt
@@ -0,0 +1,3 @@
+ Class1
+ CopyOf_Class1_1
+ CopyOf_Class1_2
\ No newline at end of file
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyClipboard_Test_ToCopy.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyClipboard_Test_ToCopy.txt
new file mode 100755
index 0000000..e69de29
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyClipboard_Test_ToCopy.txt
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyFailColumns_Test.di b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyFailColumns_Test.di
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyFailColumns_Test.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyFailColumns_Test.notation b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyFailColumns_Test.notation
new file mode 100755
index 0000000..6656dcc
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyFailColumns_Test.notation
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nattable:Table xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:nattable="http://www.eclipse.org/papyrus/nattable/model" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis http://www.eclipse.org/papyrus/nattable/model#//nattableaxis http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model#//nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableconfiguration" xmi:id="_FERfIGhHEeWchZKsEGp2Eg" name="RequirementTable0" currentRowAxisProvider="_FESGMWhHEeWchZKsEGp2Eg" currentColumnAxisProvider="_FERfIWhHEeWchZKsEGp2Eg">
+ <context xmi:type="uml:Model" href="InsertEmptyFailColumns_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <owner xmi:type="uml:Model" href="InsertEmptyFailColumns_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <prototype xmi:type="configuration:PapyrusSyncTable" href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wNb3txhEeOqHvRyiN87hA"/>
+ <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#/"/>
+ <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_FERfIWhHEeWchZKsEGp2Eg" description="Provides the columns of the tables with a default configuration" name="Requirements Feature Columns Provider">
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FERfImhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::id">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_FERfI2hHEeWchZKsEGp2Eg">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FESGMGhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::text">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ </columnAxisProvidersHistory>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_FESGMWhHEeWchZKsEGp2Eg" description="Provides the requirements directly owned by the context of the table" name="Requirement Axis Provider" disconnectSlave="true"/>
+ <localRowHeaderAxisConfiguration xmi:type="nattableaxisconfiguration:LocalTableHeaderAxisConfiguration" xmi:id="_JZP7sHmoEeWVZIGG1XbiFw" indexStyle="NUMERIC">
+ <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:PasteEObjectConfiguration" xmi:id="_JZP7sXmoEeWVZIGG1XbiFw" pastedElementId="org.eclipse.papyrus.sysml.Requirement">
+ <postActions>applyStereotype:/SysML::Requirements::Requirement</postActions>
+ <pasteElementContainementFeature xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Package/packagedElement"/>
+ <axisIdentifier xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JZQiwHmoEeWVZIGG1XbiFw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axisIdentifier>
+ </ownedAxisConfigurations>
+ </localRowHeaderAxisConfiguration>
+</nattable:Table>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyFailColumns_Test.uml b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyFailColumns_Test.uml
new file mode 100755
index 0000000..bbeea50
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyFailColumns_Test.uml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Requirements="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements">
+ <uml:Model xmi:id="_nAjG8GIeEeWkqekCWoLl5g" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_pYCiwGIeEeWkqekCWoLl5g" name="Class1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p2QIwGIeEeWkqekCWoLl5g" name="CopyOf_Class1_1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p5RnkGIeEeWkqekCWoLl5g" name="CopyOf_Class1_2"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZN74GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZN74WgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_TZ_nULU5EduiKqCzJMWbGw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZOi8GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPKAGgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZPxEGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPxEWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQYIGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQYIWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQ_MGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQ_MWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_5WYJ0LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZRmQGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZRmQWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//activities"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_C2zXMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZSNUGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZSNUWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZS0YGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZS0YWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZTbcGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZTbcWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//interactions"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_meOioLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUCgGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUCgWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//statemachines"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_nAF5kLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUpkGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUpkWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//usecases"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_neZmMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Requirements:Requirement xmi:id="_CA5NsGhHEeWchZKsEGp2Eg" base_Class="_pYCiwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_CrCW4GhHEeWchZKsEGp2Eg" base_Class="_p2QIwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_DaVF0GhHEeWchZKsEGp2Eg" base_Class="_p5RnkGIeEeWkqekCWoLl5g"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyFailColumns_Test_Initial.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyFailColumns_Test_Initial.txt
new file mode 100755
index 0000000..3425e9b
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyFailColumns_Test_Initial.txt
@@ -0,0 +1,3 @@
+ Class1
+ CopyOf_Class1_1
+ CopyOf_Class1_2
\ No newline at end of file
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyFailColumns_Test_ToCopy.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyFailColumns_Test_ToCopy.txt
new file mode 100755
index 0000000..b973b81
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyFailColumns_Test_ToCopy.txt
@@ -0,0 +1,4 @@
+ Class1
+ Class2
+ Class3
+
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyReplaceAll_Test.di b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyReplaceAll_Test.di
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyReplaceAll_Test.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyReplaceAll_Test.notation b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyReplaceAll_Test.notation
new file mode 100755
index 0000000..48fb7dd
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyReplaceAll_Test.notation
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nattable:Table xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:nattable="http://www.eclipse.org/papyrus/nattable/model" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis http://www.eclipse.org/papyrus/nattable/model#//nattableaxis http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model#//nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableconfiguration" xmi:id="_FERfIGhHEeWchZKsEGp2Eg" name="RequirementTable0" currentRowAxisProvider="_FESGMWhHEeWchZKsEGp2Eg" currentColumnAxisProvider="_FERfIWhHEeWchZKsEGp2Eg">
+ <context xmi:type="uml:Model" href="InsertEmptyReplaceAll_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <owner xmi:type="uml:Model" href="InsertEmptyReplaceAll_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <prototype xmi:type="configuration:PapyrusSyncTable" href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wNb3txhEeOqHvRyiN87hA"/>
+ <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#/"/>
+ <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_FERfIWhHEeWchZKsEGp2Eg" description="Provides the columns of the tables with a default configuration" name="Requirements Feature Columns Provider">
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FERfImhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::id">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_FERfI2hHEeWchZKsEGp2Eg">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FESGMGhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::text">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ </columnAxisProvidersHistory>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_FESGMWhHEeWchZKsEGp2Eg" description="Provides the requirements directly owned by the context of the table" name="Requirement Axis Provider" disconnectSlave="true"/>
+ <localRowHeaderAxisConfiguration xmi:type="nattableaxisconfiguration:LocalTableHeaderAxisConfiguration" xmi:id="__iG3cHmnEeWVZIGG1XbiFw" indexStyle="NUMERIC">
+ <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:PasteEObjectConfiguration" xmi:id="__iSdoHmnEeWVZIGG1XbiFw" pastedElementId="org.eclipse.papyrus.sysml.Requirement">
+ <postActions>applyStereotype:/SysML::Requirements::Requirement</postActions>
+ <pasteElementContainementFeature xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Package/packagedElement"/>
+ <axisIdentifier xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="__iTEsHmnEeWVZIGG1XbiFw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axisIdentifier>
+ </ownedAxisConfigurations>
+ </localRowHeaderAxisConfiguration>
+</nattable:Table>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyReplaceAll_Test.uml b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyReplaceAll_Test.uml
new file mode 100755
index 0000000..bbeea50
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyReplaceAll_Test.uml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Requirements="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements">
+ <uml:Model xmi:id="_nAjG8GIeEeWkqekCWoLl5g" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_pYCiwGIeEeWkqekCWoLl5g" name="Class1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p2QIwGIeEeWkqekCWoLl5g" name="CopyOf_Class1_1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p5RnkGIeEeWkqekCWoLl5g" name="CopyOf_Class1_2"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZN74GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZN74WgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_TZ_nULU5EduiKqCzJMWbGw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZOi8GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPKAGgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZPxEGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPxEWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQYIGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQYIWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQ_MGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQ_MWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_5WYJ0LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZRmQGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZRmQWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//activities"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_C2zXMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZSNUGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZSNUWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZS0YGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZS0YWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZTbcGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZTbcWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//interactions"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_meOioLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUCgGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUCgWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//statemachines"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_nAF5kLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUpkGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUpkWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//usecases"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_neZmMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Requirements:Requirement xmi:id="_CA5NsGhHEeWchZKsEGp2Eg" base_Class="_pYCiwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_CrCW4GhHEeWchZKsEGp2Eg" base_Class="_p2QIwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_DaVF0GhHEeWchZKsEGp2Eg" base_Class="_p5RnkGIeEeWkqekCWoLl5g"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyReplaceAll_Test_Initial.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyReplaceAll_Test_Initial.txt
new file mode 100755
index 0000000..3425e9b
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyReplaceAll_Test_Initial.txt
@@ -0,0 +1,3 @@
+ Class1
+ CopyOf_Class1_1
+ CopyOf_Class1_2
\ No newline at end of file
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyReplaceAll_Test_Result.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyReplaceAll_Test_Result.txt
new file mode 100755
index 0000000..56aa9b2
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyReplaceAll_Test_Result.txt
@@ -0,0 +1,3 @@
+ Class1 aaaa
+ CopyOf_Class1_1 bbbb
+ CopyOf_Class1_2 cccc
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyReplaceAll_Test_ToCopy.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyReplaceAll_Test_ToCopy.txt
new file mode 100755
index 0000000..b05f44a
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyReplaceAll_Test_ToCopy.txt
@@ -0,0 +1,4 @@
+ Class1 aaaa
+ CopyOf_Class1_1 bbbb
+ CopyOf_Class1_2 cccc
+
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptySkipAll_Test.di b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptySkipAll_Test.di
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptySkipAll_Test.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptySkipAll_Test.notation b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptySkipAll_Test.notation
new file mode 100755
index 0000000..eb8212b
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptySkipAll_Test.notation
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nattable:Table xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:nattable="http://www.eclipse.org/papyrus/nattable/model" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis http://www.eclipse.org/papyrus/nattable/model#//nattableaxis http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model#//nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableconfiguration" xmi:id="_FERfIGhHEeWchZKsEGp2Eg" name="RequirementTable0" currentRowAxisProvider="_FESGMWhHEeWchZKsEGp2Eg" currentColumnAxisProvider="_FERfIWhHEeWchZKsEGp2Eg">
+ <context xmi:type="uml:Model" href="InsertEmptySkipAll_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <owner xmi:type="uml:Model" href="InsertEmptySkipAll_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <prototype xmi:type="configuration:PapyrusSyncTable" href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wNb3txhEeOqHvRyiN87hA"/>
+ <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#/"/>
+ <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_FERfIWhHEeWchZKsEGp2Eg" description="Provides the columns of the tables with a default configuration" name="Requirements Feature Columns Provider">
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FERfImhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::id">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_FERfI2hHEeWchZKsEGp2Eg">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FESGMGhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::text">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ </columnAxisProvidersHistory>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_FESGMWhHEeWchZKsEGp2Eg" description="Provides the requirements directly owned by the context of the table" name="Requirement Axis Provider" disconnectSlave="true"/>
+ <localRowHeaderAxisConfiguration xmi:type="nattableaxisconfiguration:LocalTableHeaderAxisConfiguration" xmi:id="__iG3cHmnEeWVZIGG1XbiFw" indexStyle="NUMERIC">
+ <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:PasteEObjectConfiguration" xmi:id="__iSdoHmnEeWVZIGG1XbiFw" pastedElementId="org.eclipse.papyrus.sysml.Requirement">
+ <postActions>applyStereotype:/SysML::Requirements::Requirement</postActions>
+ <pasteElementContainementFeature xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Package/packagedElement"/>
+ <axisIdentifier xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="__iTEsHmnEeWVZIGG1XbiFw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axisIdentifier>
+ </ownedAxisConfigurations>
+ </localRowHeaderAxisConfiguration>
+</nattable:Table>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptySkipAll_Test.uml b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptySkipAll_Test.uml
new file mode 100755
index 0000000..bbeea50
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptySkipAll_Test.uml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Requirements="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements">
+ <uml:Model xmi:id="_nAjG8GIeEeWkqekCWoLl5g" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_pYCiwGIeEeWkqekCWoLl5g" name="Class1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p2QIwGIeEeWkqekCWoLl5g" name="CopyOf_Class1_1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p5RnkGIeEeWkqekCWoLl5g" name="CopyOf_Class1_2"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZN74GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZN74WgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_TZ_nULU5EduiKqCzJMWbGw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZOi8GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPKAGgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZPxEGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPxEWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQYIGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQYIWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQ_MGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQ_MWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_5WYJ0LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZRmQGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZRmQWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//activities"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_C2zXMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZSNUGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZSNUWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZS0YGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZS0YWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZTbcGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZTbcWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//interactions"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_meOioLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUCgGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUCgWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//statemachines"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_nAF5kLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUpkGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUpkWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//usecases"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_neZmMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Requirements:Requirement xmi:id="_CA5NsGhHEeWchZKsEGp2Eg" base_Class="_pYCiwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_CrCW4GhHEeWchZKsEGp2Eg" base_Class="_p2QIwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_DaVF0GhHEeWchZKsEGp2Eg" base_Class="_p5RnkGIeEeWkqekCWoLl5g"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptySkipAll_Test_Initial.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptySkipAll_Test_Initial.txt
new file mode 100755
index 0000000..3425e9b
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptySkipAll_Test_Initial.txt
@@ -0,0 +1,3 @@
+ Class1
+ CopyOf_Class1_1
+ CopyOf_Class1_2
\ No newline at end of file
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptySkipAll_Test_Result.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptySkipAll_Test_Result.txt
new file mode 100755
index 0000000..680bfec
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptySkipAll_Test_Result.txt
@@ -0,0 +1,3 @@
+ Class1
+ CopyOf_Class1_1
+ CopyOf_Class1_2
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptySkipAll_Test_ToCopy.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptySkipAll_Test_ToCopy.txt
new file mode 100755
index 0000000..b05f44a
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptySkipAll_Test_ToCopy.txt
@@ -0,0 +1,4 @@
+ Class1 aaaa
+ CopyOf_Class1_1 bbbb
+ CopyOf_Class1_2 cccc
+
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyWarningNotExisting_Test.di b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyWarningNotExisting_Test.di
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyWarningNotExisting_Test.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyWarningNotExisting_Test.notation b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyWarningNotExisting_Test.notation
new file mode 100755
index 0000000..738553e
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyWarningNotExisting_Test.notation
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nattable:Table xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:nattable="http://www.eclipse.org/papyrus/nattable/model" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis http://www.eclipse.org/papyrus/nattable/model#//nattableaxis http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model#//nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableconfiguration" xmi:id="_FERfIGhHEeWchZKsEGp2Eg" name="RequirementTable0" currentRowAxisProvider="_FESGMWhHEeWchZKsEGp2Eg" currentColumnAxisProvider="_FERfIWhHEeWchZKsEGp2Eg">
+ <context xmi:type="uml:Model" href="InsertEmptyWarningNotExisting_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <owner xmi:type="uml:Model" href="InsertEmptyWarningNotExisting_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <prototype xmi:type="configuration:PapyrusSyncTable" href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wNb3txhEeOqHvRyiN87hA"/>
+ <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#/"/>
+ <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_FERfIWhHEeWchZKsEGp2Eg" description="Provides the columns of the tables with a default configuration" name="Requirements Feature Columns Provider">
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FERfImhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::id">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_FERfI2hHEeWchZKsEGp2Eg">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FESGMGhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::text">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ </columnAxisProvidersHistory>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_FESGMWhHEeWchZKsEGp2Eg" description="Provides the requirements directly owned by the context of the table" name="Requirement Axis Provider" disconnectSlave="true"/>
+ <localRowHeaderAxisConfiguration xmi:type="nattableaxisconfiguration:LocalTableHeaderAxisConfiguration" xmi:id="_Ogx2MHmoEeWVZIGG1XbiFw" indexStyle="NUMERIC">
+ <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:PasteEObjectConfiguration" xmi:id="_OgydQHmoEeWVZIGG1XbiFw" pastedElementId="org.eclipse.papyrus.sysml.Requirement">
+ <postActions>applyStereotype:/SysML::Requirements::Requirement</postActions>
+ <pasteElementContainementFeature xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Package/packagedElement"/>
+ <axisIdentifier xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_OgydQXmoEeWVZIGG1XbiFw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axisIdentifier>
+ </ownedAxisConfigurations>
+ </localRowHeaderAxisConfiguration>
+</nattable:Table>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyWarningNotExisting_Test.uml b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyWarningNotExisting_Test.uml
new file mode 100755
index 0000000..bbeea50
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyWarningNotExisting_Test.uml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Requirements="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements">
+ <uml:Model xmi:id="_nAjG8GIeEeWkqekCWoLl5g" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_pYCiwGIeEeWkqekCWoLl5g" name="Class1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p2QIwGIeEeWkqekCWoLl5g" name="CopyOf_Class1_1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p5RnkGIeEeWkqekCWoLl5g" name="CopyOf_Class1_2"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZN74GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZN74WgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_TZ_nULU5EduiKqCzJMWbGw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZOi8GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPKAGgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZPxEGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPxEWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQYIGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQYIWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQ_MGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQ_MWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_5WYJ0LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZRmQGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZRmQWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//activities"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_C2zXMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZSNUGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZSNUWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZS0YGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZS0YWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZTbcGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZTbcWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//interactions"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_meOioLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUCgGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUCgWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//statemachines"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_nAF5kLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUpkGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUpkWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//usecases"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_neZmMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Requirements:Requirement xmi:id="_CA5NsGhHEeWchZKsEGp2Eg" base_Class="_pYCiwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_CrCW4GhHEeWchZKsEGp2Eg" base_Class="_p2QIwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_DaVF0GhHEeWchZKsEGp2Eg" base_Class="_p5RnkGIeEeWkqekCWoLl5g"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyWarningNotExisting_Test_Initial.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyWarningNotExisting_Test_Initial.txt
new file mode 100755
index 0000000..3425e9b
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyWarningNotExisting_Test_Initial.txt
@@ -0,0 +1,3 @@
+ Class1
+ CopyOf_Class1_1
+ CopyOf_Class1_2
\ No newline at end of file
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyWarningNotExisting_Test_Result.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyWarningNotExisting_Test_Result.txt
new file mode 100755
index 0000000..f58ea2a
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyWarningNotExisting_Test_Result.txt
@@ -0,0 +1,3 @@
+ Class1 aaaa
+ CopyOf_Class1_1
+ CopyOf_Class1_2 cccc
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyWarningNotExisting_Test_ToCopy.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyWarningNotExisting_Test_ToCopy.txt
new file mode 100755
index 0000000..b2b4754
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertEmptyWarningNotExisting_Test_ToCopy.txt
@@ -0,0 +1,4 @@
+ Class1 aaaa
+ Class2 bbbb
+ CopyOf_Class1_2 cccc
+
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsAddAll_Test.di b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsAddAll_Test.di
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsAddAll_Test.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsAddAll_Test.notation b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsAddAll_Test.notation
new file mode 100755
index 0000000..f0dcb3d
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsAddAll_Test.notation
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nattable:Table xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:nattable="http://www.eclipse.org/papyrus/nattable/model" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis http://www.eclipse.org/papyrus/nattable/model#//nattableaxis http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model#//nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableconfiguration" xmi:id="_FERfIGhHEeWchZKsEGp2Eg" name="RequirementTable0" currentRowAxisProvider="_FESGMWhHEeWchZKsEGp2Eg" currentColumnAxisProvider="_FERfIWhHEeWchZKsEGp2Eg">
+ <context xmi:type="uml:Model" href="InsertRowsAddAll_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <owner xmi:type="uml:Model" href="InsertRowsAddAll_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <prototype xmi:type="configuration:PapyrusSyncTable" href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wNb3txhEeOqHvRyiN87hA"/>
+ <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#/"/>
+ <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_FERfIWhHEeWchZKsEGp2Eg" description="Provides the columns of the tables with a default configuration" name="Requirements Feature Columns Provider">
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FERfImhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::id">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_FERfI2hHEeWchZKsEGp2Eg">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FESGMGhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::text">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ </columnAxisProvidersHistory>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_FESGMWhHEeWchZKsEGp2Eg" description="Provides the requirements directly owned by the context of the table" name="Requirement Axis Provider" disconnectSlave="true"/>
+ <localRowHeaderAxisConfiguration xmi:type="nattableaxisconfiguration:LocalTableHeaderAxisConfiguration" xmi:id="__iG3cHmnEeWVZIGG1XbiFw" indexStyle="NUMERIC">
+ <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:PasteEObjectConfiguration" xmi:id="__iSdoHmnEeWVZIGG1XbiFw" pastedElementId="org.eclipse.papyrus.sysml.Requirement">
+ <postActions>applyStereotype:/SysML::Requirements::Requirement</postActions>
+ <pasteElementContainementFeature xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Package/packagedElement"/>
+ <axisIdentifier xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="__iTEsHmnEeWVZIGG1XbiFw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axisIdentifier>
+ </ownedAxisConfigurations>
+ </localRowHeaderAxisConfiguration>
+</nattable:Table>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsAddAll_Test.uml b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsAddAll_Test.uml
new file mode 100755
index 0000000..bbeea50
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsAddAll_Test.uml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Requirements="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements">
+ <uml:Model xmi:id="_nAjG8GIeEeWkqekCWoLl5g" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_pYCiwGIeEeWkqekCWoLl5g" name="Class1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p2QIwGIeEeWkqekCWoLl5g" name="CopyOf_Class1_1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p5RnkGIeEeWkqekCWoLl5g" name="CopyOf_Class1_2"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZN74GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZN74WgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_TZ_nULU5EduiKqCzJMWbGw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZOi8GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPKAGgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZPxEGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPxEWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQYIGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQYIWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQ_MGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQ_MWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_5WYJ0LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZRmQGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZRmQWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//activities"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_C2zXMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZSNUGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZSNUWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZS0YGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZS0YWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZTbcGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZTbcWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//interactions"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_meOioLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUCgGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUCgWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//statemachines"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_nAF5kLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUpkGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUpkWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//usecases"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_neZmMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Requirements:Requirement xmi:id="_CA5NsGhHEeWchZKsEGp2Eg" base_Class="_pYCiwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_CrCW4GhHEeWchZKsEGp2Eg" base_Class="_p2QIwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_DaVF0GhHEeWchZKsEGp2Eg" base_Class="_p5RnkGIeEeWkqekCWoLl5g"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsAddAll_Test_Initial.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsAddAll_Test_Initial.txt
new file mode 100755
index 0000000..3425e9b
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsAddAll_Test_Initial.txt
@@ -0,0 +1,3 @@
+ Class1
+ CopyOf_Class1_1
+ CopyOf_Class1_2
\ No newline at end of file
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsAddAll_Test_Result.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsAddAll_Test_Result.txt
new file mode 100755
index 0000000..aba13c6
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsAddAll_Test_Result.txt
@@ -0,0 +1,6 @@
+ Class1
+ CopyOf_Class1_1
+ CopyOf_Class1_2
+ Class1 aaaa
+ CopyOf_Class1_1 bbbb
+ CopyOf_Class1_2 cccc
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsAddAll_Test_ToCopy.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsAddAll_Test_ToCopy.txt
new file mode 100755
index 0000000..b05f44a
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsAddAll_Test_ToCopy.txt
@@ -0,0 +1,4 @@
+ Class1 aaaa
+ CopyOf_Class1_1 bbbb
+ CopyOf_Class1_2 cccc
+
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsAxisIdentifierNotExisting_Test.di b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsAxisIdentifierNotExisting_Test.di
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsAxisIdentifierNotExisting_Test.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsAxisIdentifierNotExisting_Test.notation b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsAxisIdentifierNotExisting_Test.notation
new file mode 100755
index 0000000..f43da3e
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsAxisIdentifierNotExisting_Test.notation
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nattable:Table xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:nattable="http://www.eclipse.org/papyrus/nattable/model" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis http://www.eclipse.org/papyrus/nattable/model#//nattableaxis http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model#//nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableconfiguration" xmi:id="_FERfIGhHEeWchZKsEGp2Eg" name="RequirementTable0" currentRowAxisProvider="_FESGMWhHEeWchZKsEGp2Eg" currentColumnAxisProvider="_FERfIWhHEeWchZKsEGp2Eg">
+ <context xmi:type="uml:Model" href="InsertRowsAxisIdentifierNotExisting_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <owner xmi:type="uml:Model" href="InsertRowsAxisIdentifierNotExisting_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <prototype xmi:type="configuration:PapyrusSyncTable" href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wNb3txhEeOqHvRyiN87hA"/>
+ <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#/"/>
+ <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_FERfIWhHEeWchZKsEGp2Eg" description="Provides the columns of the tables with a default configuration" name="Requirements Feature Columns Provider">
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FERfImhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::id">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FESGMGhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::text">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_1etgAG5bEeWpLowMLPbtlg" element="property_of_stereotype:/SysML::Requirements::Requirement::derived">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ </columnAxisProvidersHistory>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_FESGMWhHEeWchZKsEGp2Eg" description="Provides the requirements directly owned by the context of the table" name="Requirement Axis Provider" disconnectSlave="true"/>
+ <localRowHeaderAxisConfiguration xmi:type="nattableaxisconfiguration:LocalTableHeaderAxisConfiguration" xmi:id="_GF2RQHmoEeWVZIGG1XbiFw" indexStyle="NUMERIC">
+ <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:PasteEObjectConfiguration" xmi:id="_GF4GcHmoEeWVZIGG1XbiFw" pastedElementId="org.eclipse.papyrus.sysml.Requirement">
+ <postActions>applyStereotype:/SysML::Requirements::Requirement</postActions>
+ <pasteElementContainementFeature xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Package/packagedElement"/>
+ <axisIdentifier xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_GF4tgHmoEeWVZIGG1XbiFw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axisIdentifier>
+ </ownedAxisConfigurations>
+ </localRowHeaderAxisConfiguration>
+</nattable:Table>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsAxisIdentifierNotExisting_Test.uml b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsAxisIdentifierNotExisting_Test.uml
new file mode 100755
index 0000000..bbeea50
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsAxisIdentifierNotExisting_Test.uml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Requirements="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements">
+ <uml:Model xmi:id="_nAjG8GIeEeWkqekCWoLl5g" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_pYCiwGIeEeWkqekCWoLl5g" name="Class1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p2QIwGIeEeWkqekCWoLl5g" name="CopyOf_Class1_1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p5RnkGIeEeWkqekCWoLl5g" name="CopyOf_Class1_2"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZN74GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZN74WgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_TZ_nULU5EduiKqCzJMWbGw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZOi8GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPKAGgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZPxEGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPxEWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQYIGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQYIWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQ_MGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQ_MWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_5WYJ0LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZRmQGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZRmQWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//activities"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_C2zXMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZSNUGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZSNUWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZS0YGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZS0YWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZTbcGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZTbcWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//interactions"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_meOioLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUCgGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUCgWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//statemachines"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_nAF5kLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUpkGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUpkWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//usecases"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_neZmMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Requirements:Requirement xmi:id="_CA5NsGhHEeWchZKsEGp2Eg" base_Class="_pYCiwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_CrCW4GhHEeWchZKsEGp2Eg" base_Class="_p2QIwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_DaVF0GhHEeWchZKsEGp2Eg" base_Class="_p5RnkGIeEeWkqekCWoLl5g"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsAxisIdentifierNotExisting_Test_Initial.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsAxisIdentifierNotExisting_Test_Initial.txt
new file mode 100755
index 0000000..fb47d81
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsAxisIdentifierNotExisting_Test_Initial.txt
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsAxisIdentifierNotExisting_Test_ToCopy.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsAxisIdentifierNotExisting_Test_ToCopy.txt
new file mode 100755
index 0000000..b2b4754
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsAxisIdentifierNotExisting_Test_ToCopy.txt
@@ -0,0 +1,4 @@
+ Class1 aaaa
+ Class2 bbbb
+ CopyOf_Class1_2 cccc
+
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsFailColumns_Test.di b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsFailColumns_Test.di
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsFailColumns_Test.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsFailColumns_Test.notation b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsFailColumns_Test.notation
new file mode 100755
index 0000000..39de2f2
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsFailColumns_Test.notation
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nattable:Table xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:nattable="http://www.eclipse.org/papyrus/nattable/model" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis http://www.eclipse.org/papyrus/nattable/model#//nattableaxis http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model#//nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableconfiguration" xmi:id="_FERfIGhHEeWchZKsEGp2Eg" name="RequirementTable0" currentRowAxisProvider="_FESGMWhHEeWchZKsEGp2Eg" currentColumnAxisProvider="_FERfIWhHEeWchZKsEGp2Eg">
+ <context xmi:type="uml:Model" href="InsertRowsFailColumns_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <owner xmi:type="uml:Model" href="InsertRowsFailColumns_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <prototype xmi:type="configuration:PapyrusSyncTable" href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wNb3txhEeOqHvRyiN87hA"/>
+ <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#/"/>
+ <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_FERfIWhHEeWchZKsEGp2Eg" description="Provides the columns of the tables with a default configuration" name="Requirements Feature Columns Provider">
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FERfImhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::id">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_FERfI2hHEeWchZKsEGp2Eg">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FESGMGhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::text">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ </columnAxisProvidersHistory>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_FESGMWhHEeWchZKsEGp2Eg" description="Provides the requirements directly owned by the context of the table" name="Requirement Axis Provider" disconnectSlave="true"/>
+ <localRowHeaderAxisConfiguration xmi:type="nattableaxisconfiguration:LocalTableHeaderAxisConfiguration" xmi:id="_JZP7sHmoEeWVZIGG1XbiFw" indexStyle="NUMERIC">
+ <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:PasteEObjectConfiguration" xmi:id="_JZP7sXmoEeWVZIGG1XbiFw" pastedElementId="org.eclipse.papyrus.sysml.Requirement">
+ <postActions>applyStereotype:/SysML::Requirements::Requirement</postActions>
+ <pasteElementContainementFeature xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Package/packagedElement"/>
+ <axisIdentifier xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JZQiwHmoEeWVZIGG1XbiFw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axisIdentifier>
+ </ownedAxisConfigurations>
+ </localRowHeaderAxisConfiguration>
+</nattable:Table>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsFailColumns_Test.uml b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsFailColumns_Test.uml
new file mode 100755
index 0000000..bbeea50
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsFailColumns_Test.uml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Requirements="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements">
+ <uml:Model xmi:id="_nAjG8GIeEeWkqekCWoLl5g" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_pYCiwGIeEeWkqekCWoLl5g" name="Class1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p2QIwGIeEeWkqekCWoLl5g" name="CopyOf_Class1_1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p5RnkGIeEeWkqekCWoLl5g" name="CopyOf_Class1_2"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZN74GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZN74WgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_TZ_nULU5EduiKqCzJMWbGw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZOi8GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPKAGgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZPxEGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPxEWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQYIGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQYIWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQ_MGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQ_MWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_5WYJ0LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZRmQGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZRmQWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//activities"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_C2zXMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZSNUGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZSNUWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZS0YGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZS0YWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZTbcGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZTbcWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//interactions"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_meOioLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUCgGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUCgWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//statemachines"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_nAF5kLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUpkGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUpkWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//usecases"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_neZmMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Requirements:Requirement xmi:id="_CA5NsGhHEeWchZKsEGp2Eg" base_Class="_pYCiwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_CrCW4GhHEeWchZKsEGp2Eg" base_Class="_p2QIwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_DaVF0GhHEeWchZKsEGp2Eg" base_Class="_p5RnkGIeEeWkqekCWoLl5g"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsFailColumns_Test_Initial.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsFailColumns_Test_Initial.txt
new file mode 100755
index 0000000..3425e9b
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsFailColumns_Test_Initial.txt
@@ -0,0 +1,3 @@
+ Class1
+ CopyOf_Class1_1
+ CopyOf_Class1_2
\ No newline at end of file
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsFailColumns_Test_ToCopy.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsFailColumns_Test_ToCopy.txt
new file mode 100755
index 0000000..b973b81
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsFailColumns_Test_ToCopy.txt
@@ -0,0 +1,4 @@
+ Class1
+ Class2
+ Class3
+
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsFailRows_Test.di b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsFailRows_Test.di
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsFailRows_Test.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsFailRows_Test.notation b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsFailRows_Test.notation
new file mode 100755
index 0000000..daf8fbe
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsFailRows_Test.notation
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nattable:Table xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:nattable="http://www.eclipse.org/papyrus/nattable/model" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis http://www.eclipse.org/papyrus/nattable/model#//nattableaxis http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model#//nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableconfiguration" xmi:id="_FERfIGhHEeWchZKsEGp2Eg" name="RequirementTable0" currentRowAxisProvider="_FESGMWhHEeWchZKsEGp2Eg" currentColumnAxisProvider="_FERfIWhHEeWchZKsEGp2Eg">
+ <context xmi:type="uml:Model" href="InsertRowsFailRows_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <owner xmi:type="uml:Model" href="InsertRowsFailRows_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <prototype xmi:type="configuration:PapyrusSyncTable" href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wNb3txhEeOqHvRyiN87hA"/>
+ <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#/"/>
+ <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_FERfIWhHEeWchZKsEGp2Eg" description="Provides the columns of the tables with a default configuration" name="Requirements Feature Columns Provider">
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FERfImhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::id">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_FERfI2hHEeWchZKsEGp2Eg">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FESGMGhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::text">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ </columnAxisProvidersHistory>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_FESGMWhHEeWchZKsEGp2Eg" description="Provides the requirements directly owned by the context of the table" name="Requirement Axis Provider" disconnectSlave="true"/>
+ <localRowHeaderAxisConfiguration xmi:type="nattableaxisconfiguration:LocalTableHeaderAxisConfiguration" xmi:id="_MpQT4HmoEeWVZIGG1XbiFw" indexStyle="NUMERIC">
+ <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:PasteEObjectConfiguration" xmi:id="_MpQ68HmoEeWVZIGG1XbiFw" pastedElementId="org.eclipse.papyrus.sysml.Requirement">
+ <postActions>applyStereotype:/SysML::Requirements::Requirement</postActions>
+ <pasteElementContainementFeature xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Package/packagedElement"/>
+ <axisIdentifier xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_MpQ68XmoEeWVZIGG1XbiFw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axisIdentifier>
+ </ownedAxisConfigurations>
+ </localRowHeaderAxisConfiguration>
+</nattable:Table>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsFailRows_Test.uml b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsFailRows_Test.uml
new file mode 100755
index 0000000..bbeea50
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsFailRows_Test.uml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Requirements="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements">
+ <uml:Model xmi:id="_nAjG8GIeEeWkqekCWoLl5g" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_pYCiwGIeEeWkqekCWoLl5g" name="Class1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p2QIwGIeEeWkqekCWoLl5g" name="CopyOf_Class1_1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p5RnkGIeEeWkqekCWoLl5g" name="CopyOf_Class1_2"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZN74GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZN74WgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_TZ_nULU5EduiKqCzJMWbGw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZOi8GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPKAGgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZPxEGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPxEWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQYIGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQYIWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQ_MGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQ_MWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_5WYJ0LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZRmQGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZRmQWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//activities"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_C2zXMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZSNUGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZSNUWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZS0YGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZS0YWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZTbcGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZTbcWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//interactions"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_meOioLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUCgGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUCgWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//statemachines"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_nAF5kLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUpkGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUpkWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//usecases"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_neZmMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Requirements:Requirement xmi:id="_CA5NsGhHEeWchZKsEGp2Eg" base_Class="_pYCiwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_CrCW4GhHEeWchZKsEGp2Eg" base_Class="_p2QIwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_DaVF0GhHEeWchZKsEGp2Eg" base_Class="_p5RnkGIeEeWkqekCWoLl5g"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsFailRows_Test_Initial.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsFailRows_Test_Initial.txt
new file mode 100755
index 0000000..3425e9b
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsFailRows_Test_Initial.txt
@@ -0,0 +1,3 @@
+ Class1
+ CopyOf_Class1_1
+ CopyOf_Class1_2
\ No newline at end of file
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsFailRows_Test_ToCopy.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsFailRows_Test_ToCopy.txt
new file mode 100755
index 0000000..e39c478
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsFailRows_Test_ToCopy.txt
@@ -0,0 +1,4 @@
+ Class1 aaaa
+ Class2 bbbb
+ Class3 cccc
+
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsReplaceAll_Test.di b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsReplaceAll_Test.di
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsReplaceAll_Test.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsReplaceAll_Test.notation b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsReplaceAll_Test.notation
new file mode 100755
index 0000000..21d70df
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsReplaceAll_Test.notation
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nattable:Table xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:nattable="http://www.eclipse.org/papyrus/nattable/model" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis http://www.eclipse.org/papyrus/nattable/model#//nattableaxis http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model#//nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableconfiguration" xmi:id="_FERfIGhHEeWchZKsEGp2Eg" name="RequirementTable0" currentRowAxisProvider="_FESGMWhHEeWchZKsEGp2Eg" currentColumnAxisProvider="_FERfIWhHEeWchZKsEGp2Eg">
+ <context xmi:type="uml:Model" href="InsertRowsReplaceAll_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <owner xmi:type="uml:Model" href="InsertRowsReplaceAll_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <prototype xmi:type="configuration:PapyrusSyncTable" href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wNb3txhEeOqHvRyiN87hA"/>
+ <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#/"/>
+ <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_FERfIWhHEeWchZKsEGp2Eg" description="Provides the columns of the tables with a default configuration" name="Requirements Feature Columns Provider">
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FERfImhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::id">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_FERfI2hHEeWchZKsEGp2Eg">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FESGMGhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::text">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ </columnAxisProvidersHistory>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_FESGMWhHEeWchZKsEGp2Eg" description="Provides the requirements directly owned by the context of the table" name="Requirement Axis Provider" disconnectSlave="true"/>
+ <localRowHeaderAxisConfiguration xmi:type="nattableaxisconfiguration:LocalTableHeaderAxisConfiguration" xmi:id="__iG3cHmnEeWVZIGG1XbiFw" indexStyle="NUMERIC">
+ <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:PasteEObjectConfiguration" xmi:id="__iSdoHmnEeWVZIGG1XbiFw" pastedElementId="org.eclipse.papyrus.sysml.Requirement">
+ <postActions>applyStereotype:/SysML::Requirements::Requirement</postActions>
+ <pasteElementContainementFeature xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Package/packagedElement"/>
+ <axisIdentifier xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="__iTEsHmnEeWVZIGG1XbiFw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axisIdentifier>
+ </ownedAxisConfigurations>
+ </localRowHeaderAxisConfiguration>
+</nattable:Table>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsReplaceAll_Test.uml b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsReplaceAll_Test.uml
new file mode 100755
index 0000000..bbeea50
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsReplaceAll_Test.uml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Requirements="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements">
+ <uml:Model xmi:id="_nAjG8GIeEeWkqekCWoLl5g" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_pYCiwGIeEeWkqekCWoLl5g" name="Class1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p2QIwGIeEeWkqekCWoLl5g" name="CopyOf_Class1_1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p5RnkGIeEeWkqekCWoLl5g" name="CopyOf_Class1_2"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZN74GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZN74WgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_TZ_nULU5EduiKqCzJMWbGw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZOi8GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPKAGgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZPxEGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPxEWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQYIGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQYIWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQ_MGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQ_MWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_5WYJ0LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZRmQGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZRmQWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//activities"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_C2zXMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZSNUGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZSNUWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZS0YGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZS0YWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZTbcGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZTbcWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//interactions"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_meOioLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUCgGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUCgWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//statemachines"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_nAF5kLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUpkGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUpkWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//usecases"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_neZmMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Requirements:Requirement xmi:id="_CA5NsGhHEeWchZKsEGp2Eg" base_Class="_pYCiwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_CrCW4GhHEeWchZKsEGp2Eg" base_Class="_p2QIwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_DaVF0GhHEeWchZKsEGp2Eg" base_Class="_p5RnkGIeEeWkqekCWoLl5g"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsReplaceAll_Test_Initial.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsReplaceAll_Test_Initial.txt
new file mode 100755
index 0000000..3425e9b
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsReplaceAll_Test_Initial.txt
@@ -0,0 +1,3 @@
+ Class1
+ CopyOf_Class1_1
+ CopyOf_Class1_2
\ No newline at end of file
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsReplaceAll_Test_Result.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsReplaceAll_Test_Result.txt
new file mode 100755
index 0000000..56aa9b2
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsReplaceAll_Test_Result.txt
@@ -0,0 +1,3 @@
+ Class1 aaaa
+ CopyOf_Class1_1 bbbb
+ CopyOf_Class1_2 cccc
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsReplaceAll_Test_ToCopy.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsReplaceAll_Test_ToCopy.txt
new file mode 100755
index 0000000..b05f44a
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsReplaceAll_Test_ToCopy.txt
@@ -0,0 +1,4 @@
+ Class1 aaaa
+ CopyOf_Class1_1 bbbb
+ CopyOf_Class1_2 cccc
+
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsSkipAll_Test.di b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsSkipAll_Test.di
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsSkipAll_Test.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsSkipAll_Test.notation b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsSkipAll_Test.notation
new file mode 100755
index 0000000..36fbea1
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsSkipAll_Test.notation
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nattable:Table xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:nattable="http://www.eclipse.org/papyrus/nattable/model" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis http://www.eclipse.org/papyrus/nattable/model#//nattableaxis http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model#//nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableconfiguration" xmi:id="_FERfIGhHEeWchZKsEGp2Eg" name="RequirementTable0" currentRowAxisProvider="_FESGMWhHEeWchZKsEGp2Eg" currentColumnAxisProvider="_FERfIWhHEeWchZKsEGp2Eg">
+ <context xmi:type="uml:Model" href="InsertRowsSkipAll_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <owner xmi:type="uml:Model" href="InsertRowsSkipAll_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <prototype xmi:type="configuration:PapyrusSyncTable" href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wNb3txhEeOqHvRyiN87hA"/>
+ <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#/"/>
+ <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_FERfIWhHEeWchZKsEGp2Eg" description="Provides the columns of the tables with a default configuration" name="Requirements Feature Columns Provider">
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FERfImhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::id">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_FERfI2hHEeWchZKsEGp2Eg">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FESGMGhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::text">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ </columnAxisProvidersHistory>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_FESGMWhHEeWchZKsEGp2Eg" description="Provides the requirements directly owned by the context of the table" name="Requirement Axis Provider" disconnectSlave="true"/>
+ <localRowHeaderAxisConfiguration xmi:type="nattableaxisconfiguration:LocalTableHeaderAxisConfiguration" xmi:id="__iG3cHmnEeWVZIGG1XbiFw" indexStyle="NUMERIC">
+ <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:PasteEObjectConfiguration" xmi:id="__iSdoHmnEeWVZIGG1XbiFw" pastedElementId="org.eclipse.papyrus.sysml.Requirement">
+ <postActions>applyStereotype:/SysML::Requirements::Requirement</postActions>
+ <pasteElementContainementFeature xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Package/packagedElement"/>
+ <axisIdentifier xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="__iTEsHmnEeWVZIGG1XbiFw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axisIdentifier>
+ </ownedAxisConfigurations>
+ </localRowHeaderAxisConfiguration>
+</nattable:Table>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsSkipAll_Test.uml b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsSkipAll_Test.uml
new file mode 100755
index 0000000..bbeea50
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsSkipAll_Test.uml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Requirements="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements">
+ <uml:Model xmi:id="_nAjG8GIeEeWkqekCWoLl5g" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_pYCiwGIeEeWkqekCWoLl5g" name="Class1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p2QIwGIeEeWkqekCWoLl5g" name="CopyOf_Class1_1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p5RnkGIeEeWkqekCWoLl5g" name="CopyOf_Class1_2"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZN74GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZN74WgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_TZ_nULU5EduiKqCzJMWbGw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZOi8GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPKAGgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZPxEGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPxEWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQYIGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQYIWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQ_MGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQ_MWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_5WYJ0LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZRmQGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZRmQWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//activities"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_C2zXMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZSNUGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZSNUWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZS0YGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZS0YWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZTbcGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZTbcWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//interactions"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_meOioLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUCgGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUCgWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//statemachines"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_nAF5kLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUpkGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUpkWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//usecases"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_neZmMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Requirements:Requirement xmi:id="_CA5NsGhHEeWchZKsEGp2Eg" base_Class="_pYCiwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_CrCW4GhHEeWchZKsEGp2Eg" base_Class="_p2QIwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_DaVF0GhHEeWchZKsEGp2Eg" base_Class="_p5RnkGIeEeWkqekCWoLl5g"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsSkipAll_Test_Initial.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsSkipAll_Test_Initial.txt
new file mode 100755
index 0000000..3425e9b
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsSkipAll_Test_Initial.txt
@@ -0,0 +1,3 @@
+ Class1
+ CopyOf_Class1_1
+ CopyOf_Class1_2
\ No newline at end of file
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsSkipAll_Test_Result.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsSkipAll_Test_Result.txt
new file mode 100755
index 0000000..680bfec
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsSkipAll_Test_Result.txt
@@ -0,0 +1,3 @@
+ Class1
+ CopyOf_Class1_1
+ CopyOf_Class1_2
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsSkipAll_Test_ToCopy.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsSkipAll_Test_ToCopy.txt
new file mode 100755
index 0000000..b05f44a
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsSkipAll_Test_ToCopy.txt
@@ -0,0 +1,4 @@
+ Class1 aaaa
+ CopyOf_Class1_1 bbbb
+ CopyOf_Class1_2 cccc
+
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsWarningNotExisting_Test.di b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsWarningNotExisting_Test.di
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsWarningNotExisting_Test.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsWarningNotExisting_Test.notation b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsWarningNotExisting_Test.notation
new file mode 100755
index 0000000..b92171a
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsWarningNotExisting_Test.notation
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nattable:Table xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:nattable="http://www.eclipse.org/papyrus/nattable/model" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis http://www.eclipse.org/papyrus/nattable/model#//nattableaxis http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model#//nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableconfiguration" xmi:id="_FERfIGhHEeWchZKsEGp2Eg" name="RequirementTable0" currentRowAxisProvider="_FESGMWhHEeWchZKsEGp2Eg" currentColumnAxisProvider="_FERfIWhHEeWchZKsEGp2Eg">
+ <context xmi:type="uml:Model" href="InsertRowsWarningNotExisting_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <owner xmi:type="uml:Model" href="InsertRowsWarningNotExisting_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <prototype xmi:type="configuration:PapyrusSyncTable" href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wNb3txhEeOqHvRyiN87hA"/>
+ <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#/"/>
+ <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_FERfIWhHEeWchZKsEGp2Eg" description="Provides the columns of the tables with a default configuration" name="Requirements Feature Columns Provider">
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FERfImhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::id">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_FERfI2hHEeWchZKsEGp2Eg">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FESGMGhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::text">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ </columnAxisProvidersHistory>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_FESGMWhHEeWchZKsEGp2Eg" description="Provides the requirements directly owned by the context of the table" name="Requirement Axis Provider" disconnectSlave="true"/>
+ <localRowHeaderAxisConfiguration xmi:type="nattableaxisconfiguration:LocalTableHeaderAxisConfiguration" xmi:id="_Ogx2MHmoEeWVZIGG1XbiFw" indexStyle="NUMERIC">
+ <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:PasteEObjectConfiguration" xmi:id="_OgydQHmoEeWVZIGG1XbiFw" pastedElementId="org.eclipse.papyrus.sysml.Requirement">
+ <postActions>applyStereotype:/SysML::Requirements::Requirement</postActions>
+ <pasteElementContainementFeature xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Package/packagedElement"/>
+ <axisIdentifier xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_OgydQXmoEeWVZIGG1XbiFw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axisIdentifier>
+ </ownedAxisConfigurations>
+ </localRowHeaderAxisConfiguration>
+</nattable:Table>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsWarningNotExisting_Test.uml b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsWarningNotExisting_Test.uml
new file mode 100755
index 0000000..bbeea50
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsWarningNotExisting_Test.uml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Requirements="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements">
+ <uml:Model xmi:id="_nAjG8GIeEeWkqekCWoLl5g" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_pYCiwGIeEeWkqekCWoLl5g" name="Class1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p2QIwGIeEeWkqekCWoLl5g" name="CopyOf_Class1_1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p5RnkGIeEeWkqekCWoLl5g" name="CopyOf_Class1_2"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZN74GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZN74WgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_TZ_nULU5EduiKqCzJMWbGw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZOi8GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPKAGgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZPxEGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPxEWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQYIGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQYIWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQ_MGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQ_MWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_5WYJ0LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZRmQGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZRmQWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//activities"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_C2zXMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZSNUGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZSNUWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZS0YGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZS0YWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZTbcGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZTbcWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//interactions"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_meOioLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUCgGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUCgWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//statemachines"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_nAF5kLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUpkGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUpkWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//usecases"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_neZmMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Requirements:Requirement xmi:id="_CA5NsGhHEeWchZKsEGp2Eg" base_Class="_pYCiwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_CrCW4GhHEeWchZKsEGp2Eg" base_Class="_p2QIwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_DaVF0GhHEeWchZKsEGp2Eg" base_Class="_p5RnkGIeEeWkqekCWoLl5g"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsWarningNotExisting_Test_Initial.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsWarningNotExisting_Test_Initial.txt
new file mode 100755
index 0000000..3425e9b
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsWarningNotExisting_Test_Initial.txt
@@ -0,0 +1,3 @@
+ Class1
+ CopyOf_Class1_1
+ CopyOf_Class1_2
\ No newline at end of file
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsWarningNotExisting_Test_Result.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsWarningNotExisting_Test_Result.txt
new file mode 100755
index 0000000..f58ea2a
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsWarningNotExisting_Test_Result.txt
@@ -0,0 +1,3 @@
+ Class1 aaaa
+ CopyOf_Class1_1
+ CopyOf_Class1_2 cccc
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsWarningNotExisting_Test_ToCopy.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsWarningNotExisting_Test_ToCopy.txt
new file mode 100755
index 0000000..b2b4754
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/insert/InsertRowsWarningNotExisting_Test_ToCopy.txt
@@ -0,0 +1,4 @@
+ Class1 aaaa
+ Class2 bbbb
+ CopyOf_Class1_2 cccc
+
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/openTest.di b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/openTest.di
new file mode 100755
index 0000000..7a9deb7
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/openTest.di
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<di:SashWindowsMngr xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi">
+ <pageList>
+ <availablePage>
+ <emfPageIdentifier href="openTest.notation#_WQOhgNm-EeKL79b9rs5dSQ"/>
+ </availablePage>
+ </pageList>
+ <sashModel currentSelection="//@sashModel/@windows.0/@children.0">
+ <windows>
+ <children xsi:type="di:TabFolder"/>
+ </windows>
+ </sashModel>
+</di:SashWindowsMngr>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/openTest.notation b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/openTest.notation
new file mode 100755
index 0000000..d2b7586
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/openTest.notation
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nattable:Table 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:nattable="http://www.eclipse.org/papyrus/nattable/model" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis http://www.eclipse.org/papyrus/nattable/model#//nattableaxis http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model#//nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableconfiguration" xmi:id="_WQOhgNm-EeKL79b9rs5dSQ" name="RequirementTable0" currentRowAxisProvider="_WQOhhdm-EeKL79b9rs5dSQ" currentColumnAxisProvider="_WQOhgdm-EeKL79b9rs5dSQ">
+ <context xmi:type="uml:Model" href="openTest.uml#_SsmpwNm-EeKL79b9rs5dSQ"/>
+ <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#/"/>
+ <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_WQOhgdm-EeKL79b9rs5dSQ" description="Provides the columns of the tables with a default configuration" name="Requirements Feature Columns Provider">
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_WQOhgtm-EeKL79b9rs5dSQ" element="property_of_stereotype:/SysML::Requirements::Requirement::id">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_WQOhg9m-EeKL79b9rs5dSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_WQOhhNm-EeKL79b9rs5dSQ" element="property_of_stereotype:/SysML::Requirements::Requirement::text">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ </columnAxisProvidersHistory>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_WQOhhdm-EeKL79b9rs5dSQ" description="Provides the requirements directly owned by the context of the table" name="Requirement Axis Provider" disconnectSlave="true"/>
+</nattable:Table>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/openTest.uml b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/openTest.uml
new file mode 100755
index 0000000..3e5f2b4
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/openTest.uml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20110701" xmlns:xmi="http://www.omg.org/spec/XMI/20110701" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Requirements="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements">
+ <uml:Model xmi:id="_SsmpwNm-EeKL79b9rs5dSQ" name="SysMLmodel">
+ <packagedElement xmi:type="uml:Class" xmi:id="_UZqBcNm-EeKL79b9rs5dSQ" name="Requirement1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_U-P8QNm-EeKL79b9rs5dSQ" name="Requirement2"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_VlrIoNm-EeKL79b9rs5dSQ" name="Requirement3"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_St8GgNm-EeKL79b9rs5dSQ">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_St8Ggdm-EeKL79b9rs5dSQ" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_TZ_nULU5EduiKqCzJMWbGw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_S2HyINm-EeKL79b9rs5dSQ">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_S2HyIdm-EeKL79b9rs5dSQ" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_S2RjINm-EeKL79b9rs5dSQ">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_S2RjIdm-EeKL79b9rs5dSQ" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_S2RjItm-EeKL79b9rs5dSQ">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_S2RjI9m-EeKL79b9rs5dSQ" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_S2RjJNm-EeKL79b9rs5dSQ">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_S2RjJdm-EeKL79b9rs5dSQ" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_5WYJ0LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_S2RjJtm-EeKL79b9rs5dSQ">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_S2RjJ9m-EeKL79b9rs5dSQ" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//activities"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_C2zXMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_S2RjKNm-EeKL79b9rs5dSQ">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_S2RjKdm-EeKL79b9rs5dSQ" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_S2RjKtm-EeKL79b9rs5dSQ">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_S2RjK9m-EeKL79b9rs5dSQ" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_S2RjLNm-EeKL79b9rs5dSQ">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_S2RjLdm-EeKL79b9rs5dSQ" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//interactions"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_meOioLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_S2RjLtm-EeKL79b9rs5dSQ">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_S2RjL9m-EeKL79b9rs5dSQ" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//statemachines"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_nAF5kLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_S2RjMNm-EeKL79b9rs5dSQ">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_S2RjMdm-EeKL79b9rs5dSQ" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//usecases"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_neZmMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Requirements:Requirement xmi:id="_UZ88YNm-EeKL79b9rs5dSQ" base_Class="_UZqBcNm-EeKL79b9rs5dSQ"/>
+ <Requirements:Requirement xmi:id="_U-ZtQNm-EeKL79b9rs5dSQ" base_Class="_U-P8QNm-EeKL79b9rs5dSQ"/>
+ <Requirements:Requirement xmi:id="_Vl05oNm-EeKL79b9rs5dSQ" base_Class="_VlrIoNm-EeKL79b9rs5dSQ"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteCellsOverwriteAll_Test.di b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteCellsOverwriteAll_Test.di
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteCellsOverwriteAll_Test.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteCellsOverwriteAll_Test.notation b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteCellsOverwriteAll_Test.notation
new file mode 100755
index 0000000..52ef23c
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteCellsOverwriteAll_Test.notation
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nattable:Table xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:nattable="http://www.eclipse.org/papyrus/nattable/model" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis http://www.eclipse.org/papyrus/nattable/model#//nattableaxis http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model#//nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableconfiguration" xmi:id="_FERfIGhHEeWchZKsEGp2Eg" name="RequirementTable0" currentRowAxisProvider="_FESGMWhHEeWchZKsEGp2Eg" currentColumnAxisProvider="_FERfIWhHEeWchZKsEGp2Eg">
+ <context xmi:type="uml:Model" href="PasteCellsOverwriteAll_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <owner xmi:type="uml:Model" href="PasteCellsOverwriteAll_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <prototype xmi:type="configuration:PapyrusSyncTable" href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wNb3txhEeOqHvRyiN87hA"/>
+ <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#/"/>
+ <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_FERfIWhHEeWchZKsEGp2Eg" description="Provides the columns of the tables with a default configuration" name="Requirements Feature Columns Provider">
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FERfImhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::id">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_FERfI2hHEeWchZKsEGp2Eg">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FESGMGhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::text">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ </columnAxisProvidersHistory>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_FESGMWhHEeWchZKsEGp2Eg" description="Provides the requirements directly owned by the context of the table" name="Requirement Axis Provider" disconnectSlave="true"/>
+</nattable:Table>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteCellsOverwriteAll_Test.uml b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteCellsOverwriteAll_Test.uml
new file mode 100755
index 0000000..bbeea50
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteCellsOverwriteAll_Test.uml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Requirements="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements">
+ <uml:Model xmi:id="_nAjG8GIeEeWkqekCWoLl5g" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_pYCiwGIeEeWkqekCWoLl5g" name="Class1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p2QIwGIeEeWkqekCWoLl5g" name="CopyOf_Class1_1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p5RnkGIeEeWkqekCWoLl5g" name="CopyOf_Class1_2"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZN74GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZN74WgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_TZ_nULU5EduiKqCzJMWbGw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZOi8GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPKAGgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZPxEGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPxEWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQYIGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQYIWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQ_MGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQ_MWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_5WYJ0LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZRmQGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZRmQWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//activities"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_C2zXMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZSNUGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZSNUWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZS0YGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZS0YWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZTbcGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZTbcWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//interactions"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_meOioLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUCgGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUCgWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//statemachines"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_nAF5kLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUpkGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUpkWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//usecases"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_neZmMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Requirements:Requirement xmi:id="_CA5NsGhHEeWchZKsEGp2Eg" base_Class="_pYCiwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_CrCW4GhHEeWchZKsEGp2Eg" base_Class="_p2QIwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_DaVF0GhHEeWchZKsEGp2Eg" base_Class="_p5RnkGIeEeWkqekCWoLl5g"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteCellsOverwriteAll_Test_Initial.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteCellsOverwriteAll_Test_Initial.txt
new file mode 100755
index 0000000..3425e9b
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteCellsOverwriteAll_Test_Initial.txt
@@ -0,0 +1,3 @@
+ Class1
+ CopyOf_Class1_1
+ CopyOf_Class1_2
\ No newline at end of file
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteCellsOverwriteAll_Test_Result.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteCellsOverwriteAll_Test_Result.txt
new file mode 100755
index 0000000..10d4176
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteCellsOverwriteAll_Test_Result.txt
@@ -0,0 +1,3 @@
+ Class1 aaaa
+ Class2 bbbb
+ Class3 cccc
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteCellsOverwriteAll_Test_ToCopy.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteCellsOverwriteAll_Test_ToCopy.txt
new file mode 100755
index 0000000..e39c478
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteCellsOverwriteAll_Test_ToCopy.txt
@@ -0,0 +1,4 @@
+ Class1 aaaa
+ Class2 bbbb
+ Class3 cccc
+
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteCellsOverwriteByOneLine_Test.di b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteCellsOverwriteByOneLine_Test.di
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteCellsOverwriteByOneLine_Test.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteCellsOverwriteByOneLine_Test.notation b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteCellsOverwriteByOneLine_Test.notation
new file mode 100755
index 0000000..a17455b
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteCellsOverwriteByOneLine_Test.notation
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nattable:Table xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:nattable="http://www.eclipse.org/papyrus/nattable/model" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis http://www.eclipse.org/papyrus/nattable/model#//nattableaxis http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model#//nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableconfiguration" xmi:id="_FERfIGhHEeWchZKsEGp2Eg" name="RequirementTable0" currentRowAxisProvider="_FESGMWhHEeWchZKsEGp2Eg" currentColumnAxisProvider="_FERfIWhHEeWchZKsEGp2Eg">
+ <context xmi:type="uml:Model" href="PasteCellsOverwriteByOneLine_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <owner xmi:type="uml:Model" href="PasteCellsOverwriteByOneLine_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <prototype xmi:type="configuration:PapyrusSyncTable" href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wNb3txhEeOqHvRyiN87hA"/>
+ <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#/"/>
+ <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_FERfIWhHEeWchZKsEGp2Eg" description="Provides the columns of the tables with a default configuration" name="Requirements Feature Columns Provider">
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FERfImhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::id">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_FERfI2hHEeWchZKsEGp2Eg">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FESGMGhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::text">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ </columnAxisProvidersHistory>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_FESGMWhHEeWchZKsEGp2Eg" description="Provides the requirements directly owned by the context of the table" name="Requirement Axis Provider" disconnectSlave="true"/>
+</nattable:Table>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteCellsOverwriteByOneLine_Test.uml b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteCellsOverwriteByOneLine_Test.uml
new file mode 100755
index 0000000..bbeea50
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteCellsOverwriteByOneLine_Test.uml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Requirements="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements">
+ <uml:Model xmi:id="_nAjG8GIeEeWkqekCWoLl5g" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_pYCiwGIeEeWkqekCWoLl5g" name="Class1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p2QIwGIeEeWkqekCWoLl5g" name="CopyOf_Class1_1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p5RnkGIeEeWkqekCWoLl5g" name="CopyOf_Class1_2"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZN74GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZN74WgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_TZ_nULU5EduiKqCzJMWbGw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZOi8GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPKAGgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZPxEGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPxEWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQYIGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQYIWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQ_MGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQ_MWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_5WYJ0LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZRmQGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZRmQWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//activities"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_C2zXMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZSNUGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZSNUWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZS0YGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZS0YWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZTbcGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZTbcWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//interactions"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_meOioLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUCgGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUCgWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//statemachines"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_nAF5kLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUpkGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUpkWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//usecases"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_neZmMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Requirements:Requirement xmi:id="_CA5NsGhHEeWchZKsEGp2Eg" base_Class="_pYCiwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_CrCW4GhHEeWchZKsEGp2Eg" base_Class="_p2QIwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_DaVF0GhHEeWchZKsEGp2Eg" base_Class="_p5RnkGIeEeWkqekCWoLl5g"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteCellsOverwriteByOneLine_Test_Initial.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteCellsOverwriteByOneLine_Test_Initial.txt
new file mode 100755
index 0000000..3425e9b
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteCellsOverwriteByOneLine_Test_Initial.txt
@@ -0,0 +1,3 @@
+ Class1
+ CopyOf_Class1_1
+ CopyOf_Class1_2
\ No newline at end of file
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteCellsOverwriteByOneLine_Test_Result.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteCellsOverwriteByOneLine_Test_Result.txt
new file mode 100755
index 0000000..10d4176
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteCellsOverwriteByOneLine_Test_Result.txt
@@ -0,0 +1,3 @@
+ Class1 aaaa
+ Class2 bbbb
+ Class3 cccc
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteCellsOverwriteByOneLine_Test_ToCopy.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteCellsOverwriteByOneLine_Test_ToCopy.txt
new file mode 100755
index 0000000..e39c478
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteCellsOverwriteByOneLine_Test_ToCopy.txt
@@ -0,0 +1,4 @@
+ Class1 aaaa
+ Class2 bbbb
+ Class3 cccc
+
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteCellsOverwriteFailColumns_Test.di b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteCellsOverwriteFailColumns_Test.di
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteCellsOverwriteFailColumns_Test.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteCellsOverwriteFailColumns_Test.notation b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteCellsOverwriteFailColumns_Test.notation
new file mode 100755
index 0000000..148b17f
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteCellsOverwriteFailColumns_Test.notation
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nattable:Table xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:nattable="http://www.eclipse.org/papyrus/nattable/model" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis http://www.eclipse.org/papyrus/nattable/model#//nattableaxis http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model#//nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableconfiguration" xmi:id="_FERfIGhHEeWchZKsEGp2Eg" name="RequirementTable0" currentRowAxisProvider="_FESGMWhHEeWchZKsEGp2Eg" currentColumnAxisProvider="_FERfIWhHEeWchZKsEGp2Eg">
+ <context xmi:type="uml:Model" href="PasteCellsOverwriteFailColumns_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <owner xmi:type="uml:Model" href="PasteCellsOverwriteFailColumns_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <prototype xmi:type="configuration:PapyrusSyncTable" href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wNb3txhEeOqHvRyiN87hA"/>
+ <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#/"/>
+ <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_FERfIWhHEeWchZKsEGp2Eg" description="Provides the columns of the tables with a default configuration" name="Requirements Feature Columns Provider">
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FERfImhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::id">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_FERfI2hHEeWchZKsEGp2Eg">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FESGMGhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::text">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ </columnAxisProvidersHistory>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_FESGMWhHEeWchZKsEGp2Eg" description="Provides the requirements directly owned by the context of the table" name="Requirement Axis Provider" disconnectSlave="true"/>
+</nattable:Table>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteCellsOverwriteFailColumns_Test.uml b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteCellsOverwriteFailColumns_Test.uml
new file mode 100755
index 0000000..bbeea50
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteCellsOverwriteFailColumns_Test.uml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Requirements="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements">
+ <uml:Model xmi:id="_nAjG8GIeEeWkqekCWoLl5g" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_pYCiwGIeEeWkqekCWoLl5g" name="Class1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p2QIwGIeEeWkqekCWoLl5g" name="CopyOf_Class1_1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p5RnkGIeEeWkqekCWoLl5g" name="CopyOf_Class1_2"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZN74GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZN74WgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_TZ_nULU5EduiKqCzJMWbGw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZOi8GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPKAGgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZPxEGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPxEWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQYIGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQYIWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQ_MGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQ_MWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_5WYJ0LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZRmQGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZRmQWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//activities"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_C2zXMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZSNUGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZSNUWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZS0YGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZS0YWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZTbcGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZTbcWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//interactions"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_meOioLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUCgGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUCgWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//statemachines"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_nAF5kLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUpkGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUpkWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//usecases"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_neZmMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Requirements:Requirement xmi:id="_CA5NsGhHEeWchZKsEGp2Eg" base_Class="_pYCiwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_CrCW4GhHEeWchZKsEGp2Eg" base_Class="_p2QIwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_DaVF0GhHEeWchZKsEGp2Eg" base_Class="_p5RnkGIeEeWkqekCWoLl5g"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteCellsOverwriteFailColumns_Test_Initial.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteCellsOverwriteFailColumns_Test_Initial.txt
new file mode 100755
index 0000000..3425e9b
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteCellsOverwriteFailColumns_Test_Initial.txt
@@ -0,0 +1,3 @@
+ Class1
+ CopyOf_Class1_1
+ CopyOf_Class1_2
\ No newline at end of file
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteCellsOverwriteFailColumns_Test_ToCopy.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteCellsOverwriteFailColumns_Test_ToCopy.txt
new file mode 100755
index 0000000..e39c478
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteCellsOverwriteFailColumns_Test_ToCopy.txt
@@ -0,0 +1,4 @@
+ Class1 aaaa
+ Class2 bbbb
+ Class3 cccc
+
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteCellsOverwriteFailRows_Test.di b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteCellsOverwriteFailRows_Test.di
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteCellsOverwriteFailRows_Test.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteCellsOverwriteFailRows_Test.notation b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteCellsOverwriteFailRows_Test.notation
new file mode 100755
index 0000000..2b75a0f
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteCellsOverwriteFailRows_Test.notation
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nattable:Table xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:nattable="http://www.eclipse.org/papyrus/nattable/model" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis http://www.eclipse.org/papyrus/nattable/model#//nattableaxis http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model#//nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableconfiguration" xmi:id="_FERfIGhHEeWchZKsEGp2Eg" name="RequirementTable0" currentRowAxisProvider="_FESGMWhHEeWchZKsEGp2Eg" currentColumnAxisProvider="_FERfIWhHEeWchZKsEGp2Eg">
+ <context xmi:type="uml:Model" href="PasteCellsOverwriteFailRows_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <owner xmi:type="uml:Model" href="PasteCellsOverwriteFailRows_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <prototype xmi:type="configuration:PapyrusSyncTable" href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wNb3txhEeOqHvRyiN87hA"/>
+ <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#/"/>
+ <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_FERfIWhHEeWchZKsEGp2Eg" description="Provides the columns of the tables with a default configuration" name="Requirements Feature Columns Provider">
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FERfImhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::id">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_FERfI2hHEeWchZKsEGp2Eg">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FESGMGhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::text">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ </columnAxisProvidersHistory>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_FESGMWhHEeWchZKsEGp2Eg" description="Provides the requirements directly owned by the context of the table" name="Requirement Axis Provider" disconnectSlave="true"/>
+</nattable:Table>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteCellsOverwriteFailRows_Test.uml b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteCellsOverwriteFailRows_Test.uml
new file mode 100755
index 0000000..bbeea50
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteCellsOverwriteFailRows_Test.uml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Requirements="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements">
+ <uml:Model xmi:id="_nAjG8GIeEeWkqekCWoLl5g" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_pYCiwGIeEeWkqekCWoLl5g" name="Class1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p2QIwGIeEeWkqekCWoLl5g" name="CopyOf_Class1_1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p5RnkGIeEeWkqekCWoLl5g" name="CopyOf_Class1_2"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZN74GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZN74WgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_TZ_nULU5EduiKqCzJMWbGw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZOi8GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPKAGgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZPxEGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPxEWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQYIGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQYIWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQ_MGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQ_MWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_5WYJ0LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZRmQGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZRmQWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//activities"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_C2zXMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZSNUGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZSNUWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZS0YGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZS0YWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZTbcGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZTbcWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//interactions"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_meOioLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUCgGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUCgWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//statemachines"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_nAF5kLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUpkGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUpkWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//usecases"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_neZmMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Requirements:Requirement xmi:id="_CA5NsGhHEeWchZKsEGp2Eg" base_Class="_pYCiwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_CrCW4GhHEeWchZKsEGp2Eg" base_Class="_p2QIwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_DaVF0GhHEeWchZKsEGp2Eg" base_Class="_p5RnkGIeEeWkqekCWoLl5g"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteCellsOverwriteFailRows_Test_Initial.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteCellsOverwriteFailRows_Test_Initial.txt
new file mode 100755
index 0000000..3425e9b
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteCellsOverwriteFailRows_Test_Initial.txt
@@ -0,0 +1,3 @@
+ Class1
+ CopyOf_Class1_1
+ CopyOf_Class1_2
\ No newline at end of file
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteCellsOverwriteFailRows_Test_ToCopy.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteCellsOverwriteFailRows_Test_ToCopy.txt
new file mode 100755
index 0000000..e39c478
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteCellsOverwriteFailRows_Test_ToCopy.txt
@@ -0,0 +1,4 @@
+ Class1 aaaa
+ Class2 bbbb
+ Class3 cccc
+
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteColumnsOverwriteAll_Test.di b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteColumnsOverwriteAll_Test.di
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteColumnsOverwriteAll_Test.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteColumnsOverwriteAll_Test.notation b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteColumnsOverwriteAll_Test.notation
new file mode 100755
index 0000000..89fa1d4
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteColumnsOverwriteAll_Test.notation
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nattable:Table xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:nattable="http://www.eclipse.org/papyrus/nattable/model" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis http://www.eclipse.org/papyrus/nattable/model#//nattableaxis http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model#//nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableconfiguration" xmi:id="_FERfIGhHEeWchZKsEGp2Eg" name="RequirementTable0" currentRowAxisProvider="_FESGMWhHEeWchZKsEGp2Eg" currentColumnAxisProvider="_FERfIWhHEeWchZKsEGp2Eg">
+ <context xmi:type="uml:Model" href="PasteColumnsOverwriteAll_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <owner xmi:type="uml:Model" href="PasteColumnsOverwriteAll_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <prototype xmi:type="configuration:PapyrusSyncTable" href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wNb3txhEeOqHvRyiN87hA"/>
+ <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#/"/>
+ <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_FERfIWhHEeWchZKsEGp2Eg" description="Provides the columns of the tables with a default configuration" name="Requirements Feature Columns Provider">
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FERfImhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::id">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_FERfI2hHEeWchZKsEGp2Eg">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FESGMGhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::text">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ </columnAxisProvidersHistory>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_FESGMWhHEeWchZKsEGp2Eg" description="Provides the requirements directly owned by the context of the table" name="Requirement Axis Provider" disconnectSlave="true"/>
+</nattable:Table>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteColumnsOverwriteAll_Test.uml b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteColumnsOverwriteAll_Test.uml
new file mode 100755
index 0000000..bbeea50
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteColumnsOverwriteAll_Test.uml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Requirements="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements">
+ <uml:Model xmi:id="_nAjG8GIeEeWkqekCWoLl5g" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_pYCiwGIeEeWkqekCWoLl5g" name="Class1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p2QIwGIeEeWkqekCWoLl5g" name="CopyOf_Class1_1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p5RnkGIeEeWkqekCWoLl5g" name="CopyOf_Class1_2"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZN74GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZN74WgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_TZ_nULU5EduiKqCzJMWbGw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZOi8GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPKAGgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZPxEGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPxEWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQYIGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQYIWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQ_MGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQ_MWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_5WYJ0LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZRmQGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZRmQWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//activities"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_C2zXMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZSNUGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZSNUWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZS0YGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZS0YWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZTbcGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZTbcWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//interactions"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_meOioLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUCgGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUCgWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//statemachines"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_nAF5kLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUpkGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUpkWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//usecases"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_neZmMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Requirements:Requirement xmi:id="_CA5NsGhHEeWchZKsEGp2Eg" base_Class="_pYCiwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_CrCW4GhHEeWchZKsEGp2Eg" base_Class="_p2QIwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_DaVF0GhHEeWchZKsEGp2Eg" base_Class="_p5RnkGIeEeWkqekCWoLl5g"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteColumnsOverwriteAll_Test_Initial.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteColumnsOverwriteAll_Test_Initial.txt
new file mode 100755
index 0000000..3425e9b
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteColumnsOverwriteAll_Test_Initial.txt
@@ -0,0 +1,3 @@
+ Class1
+ CopyOf_Class1_1
+ CopyOf_Class1_2
\ No newline at end of file
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteColumnsOverwriteAll_Test_Result.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteColumnsOverwriteAll_Test_Result.txt
new file mode 100755
index 0000000..10d4176
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteColumnsOverwriteAll_Test_Result.txt
@@ -0,0 +1,3 @@
+ Class1 aaaa
+ Class2 bbbb
+ Class3 cccc
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteColumnsOverwriteAll_Test_ToCopy.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteColumnsOverwriteAll_Test_ToCopy.txt
new file mode 100755
index 0000000..e39c478
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteColumnsOverwriteAll_Test_ToCopy.txt
@@ -0,0 +1,4 @@
+ Class1 aaaa
+ Class2 bbbb
+ Class3 cccc
+
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteColumnsOverwriteByOneLine_Test.di b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteColumnsOverwriteByOneLine_Test.di
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteColumnsOverwriteByOneLine_Test.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteColumnsOverwriteByOneLine_Test.notation b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteColumnsOverwriteByOneLine_Test.notation
new file mode 100755
index 0000000..2ab3bbf
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteColumnsOverwriteByOneLine_Test.notation
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nattable:Table xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:nattable="http://www.eclipse.org/papyrus/nattable/model" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis http://www.eclipse.org/papyrus/nattable/model#//nattableaxis http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model#//nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableconfiguration" xmi:id="_FERfIGhHEeWchZKsEGp2Eg" name="RequirementTable0" currentRowAxisProvider="_FESGMWhHEeWchZKsEGp2Eg" currentColumnAxisProvider="_FERfIWhHEeWchZKsEGp2Eg">
+ <context xmi:type="uml:Model" href="PasteColumnsOverwriteByOneLine_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <owner xmi:type="uml:Model" href="PasteColumnsOverwriteByOneLine_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <prototype xmi:type="configuration:PapyrusSyncTable" href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wNb3txhEeOqHvRyiN87hA"/>
+ <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#/"/>
+ <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_FERfIWhHEeWchZKsEGp2Eg" description="Provides the columns of the tables with a default configuration" name="Requirements Feature Columns Provider">
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FERfImhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::id">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_FERfI2hHEeWchZKsEGp2Eg">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FESGMGhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::text">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ </columnAxisProvidersHistory>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_FESGMWhHEeWchZKsEGp2Eg" description="Provides the requirements directly owned by the context of the table" name="Requirement Axis Provider" disconnectSlave="true"/>
+</nattable:Table>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteColumnsOverwriteByOneLine_Test.uml b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteColumnsOverwriteByOneLine_Test.uml
new file mode 100755
index 0000000..bbeea50
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteColumnsOverwriteByOneLine_Test.uml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Requirements="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements">
+ <uml:Model xmi:id="_nAjG8GIeEeWkqekCWoLl5g" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_pYCiwGIeEeWkqekCWoLl5g" name="Class1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p2QIwGIeEeWkqekCWoLl5g" name="CopyOf_Class1_1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p5RnkGIeEeWkqekCWoLl5g" name="CopyOf_Class1_2"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZN74GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZN74WgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_TZ_nULU5EduiKqCzJMWbGw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZOi8GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPKAGgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZPxEGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPxEWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQYIGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQYIWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQ_MGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQ_MWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_5WYJ0LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZRmQGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZRmQWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//activities"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_C2zXMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZSNUGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZSNUWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZS0YGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZS0YWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZTbcGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZTbcWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//interactions"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_meOioLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUCgGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUCgWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//statemachines"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_nAF5kLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUpkGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUpkWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//usecases"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_neZmMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Requirements:Requirement xmi:id="_CA5NsGhHEeWchZKsEGp2Eg" base_Class="_pYCiwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_CrCW4GhHEeWchZKsEGp2Eg" base_Class="_p2QIwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_DaVF0GhHEeWchZKsEGp2Eg" base_Class="_p5RnkGIeEeWkqekCWoLl5g"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteColumnsOverwriteByOneLine_Test_Initial.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteColumnsOverwriteByOneLine_Test_Initial.txt
new file mode 100755
index 0000000..3425e9b
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteColumnsOverwriteByOneLine_Test_Initial.txt
@@ -0,0 +1,3 @@
+ Class1
+ CopyOf_Class1_1
+ CopyOf_Class1_2
\ No newline at end of file
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteColumnsOverwriteByOneLine_Test_Result.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteColumnsOverwriteByOneLine_Test_Result.txt
new file mode 100755
index 0000000..1ea4603
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteColumnsOverwriteByOneLine_Test_Result.txt
@@ -0,0 +1,3 @@
+ Class1 Class1
+ Class2 Class2
+ Class3 Class3
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteColumnsOverwriteByOneLine_Test_ToCopy.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteColumnsOverwriteByOneLine_Test_ToCopy.txt
new file mode 100755
index 0000000..da7f8e5
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteColumnsOverwriteByOneLine_Test_ToCopy.txt
@@ -0,0 +1,4 @@
+Class1
+Class2
+Class3
+
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteColumnsOverwriteFailColumns_Test.di b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteColumnsOverwriteFailColumns_Test.di
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteColumnsOverwriteFailColumns_Test.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteColumnsOverwriteFailColumns_Test.notation b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteColumnsOverwriteFailColumns_Test.notation
new file mode 100755
index 0000000..bf24510
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteColumnsOverwriteFailColumns_Test.notation
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nattable:Table xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:nattable="http://www.eclipse.org/papyrus/nattable/model" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis http://www.eclipse.org/papyrus/nattable/model#//nattableaxis http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model#//nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableconfiguration" xmi:id="_FERfIGhHEeWchZKsEGp2Eg" name="RequirementTable0" currentRowAxisProvider="_FESGMWhHEeWchZKsEGp2Eg" currentColumnAxisProvider="_FERfIWhHEeWchZKsEGp2Eg">
+ <context xmi:type="uml:Model" href="PasteColumnsOverwriteFailColumns_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <owner xmi:type="uml:Model" href="PasteColumnsOverwriteFailColumns_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <prototype xmi:type="configuration:PapyrusSyncTable" href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wNb3txhEeOqHvRyiN87hA"/>
+ <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#/"/>
+ <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_FERfIWhHEeWchZKsEGp2Eg" description="Provides the columns of the tables with a default configuration" name="Requirements Feature Columns Provider">
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FERfImhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::id">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_FERfI2hHEeWchZKsEGp2Eg">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FESGMGhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::text">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ </columnAxisProvidersHistory>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_FESGMWhHEeWchZKsEGp2Eg" description="Provides the requirements directly owned by the context of the table" name="Requirement Axis Provider" disconnectSlave="true"/>
+</nattable:Table>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteColumnsOverwriteFailColumns_Test.uml b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteColumnsOverwriteFailColumns_Test.uml
new file mode 100755
index 0000000..bbeea50
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteColumnsOverwriteFailColumns_Test.uml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Requirements="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements">
+ <uml:Model xmi:id="_nAjG8GIeEeWkqekCWoLl5g" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_pYCiwGIeEeWkqekCWoLl5g" name="Class1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p2QIwGIeEeWkqekCWoLl5g" name="CopyOf_Class1_1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p5RnkGIeEeWkqekCWoLl5g" name="CopyOf_Class1_2"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZN74GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZN74WgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_TZ_nULU5EduiKqCzJMWbGw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZOi8GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPKAGgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZPxEGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPxEWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQYIGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQYIWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQ_MGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQ_MWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_5WYJ0LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZRmQGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZRmQWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//activities"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_C2zXMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZSNUGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZSNUWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZS0YGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZS0YWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZTbcGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZTbcWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//interactions"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_meOioLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUCgGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUCgWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//statemachines"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_nAF5kLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUpkGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUpkWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//usecases"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_neZmMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Requirements:Requirement xmi:id="_CA5NsGhHEeWchZKsEGp2Eg" base_Class="_pYCiwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_CrCW4GhHEeWchZKsEGp2Eg" base_Class="_p2QIwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_DaVF0GhHEeWchZKsEGp2Eg" base_Class="_p5RnkGIeEeWkqekCWoLl5g"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteColumnsOverwriteFailColumns_Test_Initial.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteColumnsOverwriteFailColumns_Test_Initial.txt
new file mode 100755
index 0000000..3425e9b
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteColumnsOverwriteFailColumns_Test_Initial.txt
@@ -0,0 +1,3 @@
+ Class1
+ CopyOf_Class1_1
+ CopyOf_Class1_2
\ No newline at end of file
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteColumnsOverwriteFailColumns_Test_ToCopy.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteColumnsOverwriteFailColumns_Test_ToCopy.txt
new file mode 100755
index 0000000..e39c478
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteColumnsOverwriteFailColumns_Test_ToCopy.txt
@@ -0,0 +1,4 @@
+ Class1 aaaa
+ Class2 bbbb
+ Class3 cccc
+
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteColumnsOverwriteFailRows_Test.di b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteColumnsOverwriteFailRows_Test.di
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteColumnsOverwriteFailRows_Test.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteColumnsOverwriteFailRows_Test.notation b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteColumnsOverwriteFailRows_Test.notation
new file mode 100755
index 0000000..cb75f54
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteColumnsOverwriteFailRows_Test.notation
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nattable:Table xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:nattable="http://www.eclipse.org/papyrus/nattable/model" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis http://www.eclipse.org/papyrus/nattable/model#//nattableaxis http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model#//nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableconfiguration" xmi:id="_FERfIGhHEeWchZKsEGp2Eg" name="RequirementTable0" currentRowAxisProvider="_FESGMWhHEeWchZKsEGp2Eg" currentColumnAxisProvider="_FERfIWhHEeWchZKsEGp2Eg">
+ <context xmi:type="uml:Model" href="PasteColumnsOverwriteFailRows_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <owner xmi:type="uml:Model" href="PasteColumnsOverwriteFailRows_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <prototype xmi:type="configuration:PapyrusSyncTable" href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wNb3txhEeOqHvRyiN87hA"/>
+ <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#/"/>
+ <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_FERfIWhHEeWchZKsEGp2Eg" description="Provides the columns of the tables with a default configuration" name="Requirements Feature Columns Provider">
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FERfImhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::id">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_FERfI2hHEeWchZKsEGp2Eg">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FESGMGhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::text">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ </columnAxisProvidersHistory>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_FESGMWhHEeWchZKsEGp2Eg" description="Provides the requirements directly owned by the context of the table" name="Requirement Axis Provider" disconnectSlave="true"/>
+</nattable:Table>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteColumnsOverwriteFailRows_Test.uml b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteColumnsOverwriteFailRows_Test.uml
new file mode 100755
index 0000000..bbeea50
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteColumnsOverwriteFailRows_Test.uml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Requirements="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements">
+ <uml:Model xmi:id="_nAjG8GIeEeWkqekCWoLl5g" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_pYCiwGIeEeWkqekCWoLl5g" name="Class1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p2QIwGIeEeWkqekCWoLl5g" name="CopyOf_Class1_1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p5RnkGIeEeWkqekCWoLl5g" name="CopyOf_Class1_2"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZN74GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZN74WgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_TZ_nULU5EduiKqCzJMWbGw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZOi8GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPKAGgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZPxEGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPxEWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQYIGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQYIWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQ_MGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQ_MWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_5WYJ0LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZRmQGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZRmQWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//activities"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_C2zXMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZSNUGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZSNUWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZS0YGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZS0YWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZTbcGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZTbcWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//interactions"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_meOioLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUCgGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUCgWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//statemachines"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_nAF5kLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUpkGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUpkWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//usecases"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_neZmMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Requirements:Requirement xmi:id="_CA5NsGhHEeWchZKsEGp2Eg" base_Class="_pYCiwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_CrCW4GhHEeWchZKsEGp2Eg" base_Class="_p2QIwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_DaVF0GhHEeWchZKsEGp2Eg" base_Class="_p5RnkGIeEeWkqekCWoLl5g"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteColumnsOverwriteFailRows_Test_Initial.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteColumnsOverwriteFailRows_Test_Initial.txt
new file mode 100755
index 0000000..3425e9b
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteColumnsOverwriteFailRows_Test_Initial.txt
@@ -0,0 +1,3 @@
+ Class1
+ CopyOf_Class1_1
+ CopyOf_Class1_2
\ No newline at end of file
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteColumnsOverwriteFailRows_Test_ToCopy.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteColumnsOverwriteFailRows_Test_ToCopy.txt
new file mode 100755
index 0000000..bd8fa60
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteColumnsOverwriteFailRows_Test_ToCopy.txt
@@ -0,0 +1,3 @@
+ Class1 aaaa
+ Class2 bbbb
+
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyClipboard_Test.di b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyClipboard_Test.di
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyClipboard_Test.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyClipboard_Test.notation b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyClipboard_Test.notation
new file mode 100755
index 0000000..8c356fe
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyClipboard_Test.notation
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nattable:Table xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:nattable="http://www.eclipse.org/papyrus/nattable/model" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis http://www.eclipse.org/papyrus/nattable/model#//nattableaxis http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model#//nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableconfiguration" xmi:id="_FERfIGhHEeWchZKsEGp2Eg" name="RequirementTable0" currentRowAxisProvider="_FESGMWhHEeWchZKsEGp2Eg" currentColumnAxisProvider="_FERfIWhHEeWchZKsEGp2Eg">
+ <context xmi:type="uml:Model" href="PasteEmptyClipboard_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <owner xmi:type="uml:Model" href="PasteEmptyClipboard_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <prototype xmi:type="configuration:PapyrusSyncTable" href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wNb3txhEeOqHvRyiN87hA"/>
+ <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#/"/>
+ <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_FERfIWhHEeWchZKsEGp2Eg" description="Provides the columns of the tables with a default configuration" name="Requirements Feature Columns Provider">
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FERfImhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::id">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_FERfI2hHEeWchZKsEGp2Eg">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FESGMGhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::text">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ </columnAxisProvidersHistory>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_FESGMWhHEeWchZKsEGp2Eg" description="Provides the requirements directly owned by the context of the table" name="Requirement Axis Provider" disconnectSlave="true"/>
+ <localRowHeaderAxisConfiguration xmi:type="nattableaxisconfiguration:LocalTableHeaderAxisConfiguration" xmi:id="__iG3cHmnEeWVZIGG1XbiFw" indexStyle="NUMERIC">
+ <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:PasteEObjectConfiguration" xmi:id="__iSdoHmnEeWVZIGG1XbiFw" pastedElementId="org.eclipse.papyrus.sysml.Requirement">
+ <postActions>applyStereotype:/SysML::Requirements::Requirement</postActions>
+ <pasteElementContainementFeature xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Package/packagedElement"/>
+ <axisIdentifier xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="__iTEsHmnEeWVZIGG1XbiFw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axisIdentifier>
+ </ownedAxisConfigurations>
+ </localRowHeaderAxisConfiguration>
+</nattable:Table>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyClipboard_Test.uml b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyClipboard_Test.uml
new file mode 100755
index 0000000..bbeea50
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyClipboard_Test.uml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Requirements="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements">
+ <uml:Model xmi:id="_nAjG8GIeEeWkqekCWoLl5g" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_pYCiwGIeEeWkqekCWoLl5g" name="Class1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p2QIwGIeEeWkqekCWoLl5g" name="CopyOf_Class1_1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p5RnkGIeEeWkqekCWoLl5g" name="CopyOf_Class1_2"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZN74GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZN74WgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_TZ_nULU5EduiKqCzJMWbGw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZOi8GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPKAGgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZPxEGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPxEWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQYIGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQYIWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQ_MGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQ_MWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_5WYJ0LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZRmQGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZRmQWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//activities"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_C2zXMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZSNUGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZSNUWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZS0YGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZS0YWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZTbcGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZTbcWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//interactions"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_meOioLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUCgGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUCgWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//statemachines"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_nAF5kLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUpkGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUpkWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//usecases"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_neZmMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Requirements:Requirement xmi:id="_CA5NsGhHEeWchZKsEGp2Eg" base_Class="_pYCiwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_CrCW4GhHEeWchZKsEGp2Eg" base_Class="_p2QIwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_DaVF0GhHEeWchZKsEGp2Eg" base_Class="_p5RnkGIeEeWkqekCWoLl5g"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyClipboard_Test_Initial.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyClipboard_Test_Initial.txt
new file mode 100755
index 0000000..3425e9b
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyClipboard_Test_Initial.txt
@@ -0,0 +1,3 @@
+ Class1
+ CopyOf_Class1_1
+ CopyOf_Class1_2
\ No newline at end of file
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyClipboard_Test_ToCopy.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyClipboard_Test_ToCopy.txt
new file mode 100755
index 0000000..e69de29
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyClipboard_Test_ToCopy.txt
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteAddAll_Test.di b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteAddAll_Test.di
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteAddAll_Test.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteAddAll_Test.notation b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteAddAll_Test.notation
new file mode 100755
index 0000000..eda883f
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteAddAll_Test.notation
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nattable:Table xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:nattable="http://www.eclipse.org/papyrus/nattable/model" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis http://www.eclipse.org/papyrus/nattable/model#//nattableaxis http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model#//nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableconfiguration" xmi:id="_FERfIGhHEeWchZKsEGp2Eg" name="RequirementTable0" currentRowAxisProvider="_FESGMWhHEeWchZKsEGp2Eg" currentColumnAxisProvider="_FERfIWhHEeWchZKsEGp2Eg">
+ <context xmi:type="uml:Model" href="PasteEmptyOverwriteAddAll_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <owner xmi:type="uml:Model" href="PasteEmptyOverwriteAddAll_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <prototype xmi:type="configuration:PapyrusSyncTable" href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wNb3txhEeOqHvRyiN87hA"/>
+ <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#/"/>
+ <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_FERfIWhHEeWchZKsEGp2Eg" description="Provides the columns of the tables with a default configuration" name="Requirements Feature Columns Provider">
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FERfImhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::id">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_FERfI2hHEeWchZKsEGp2Eg">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FESGMGhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::text">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ </columnAxisProvidersHistory>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_FESGMWhHEeWchZKsEGp2Eg" description="Provides the requirements directly owned by the context of the table" name="Requirement Axis Provider" disconnectSlave="true"/>
+ <localRowHeaderAxisConfiguration xmi:type="nattableaxisconfiguration:LocalTableHeaderAxisConfiguration" xmi:id="__iG3cHmnEeWVZIGG1XbiFw" indexStyle="NUMERIC">
+ <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:PasteEObjectConfiguration" xmi:id="__iSdoHmnEeWVZIGG1XbiFw" pastedElementId="org.eclipse.papyrus.sysml.Requirement">
+ <postActions>applyStereotype:/SysML::Requirements::Requirement</postActions>
+ <pasteElementContainementFeature xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Package/packagedElement"/>
+ <axisIdentifier xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="__iTEsHmnEeWVZIGG1XbiFw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axisIdentifier>
+ </ownedAxisConfigurations>
+ </localRowHeaderAxisConfiguration>
+</nattable:Table>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteAddAll_Test.uml b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteAddAll_Test.uml
new file mode 100755
index 0000000..bbeea50
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteAddAll_Test.uml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Requirements="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements">
+ <uml:Model xmi:id="_nAjG8GIeEeWkqekCWoLl5g" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_pYCiwGIeEeWkqekCWoLl5g" name="Class1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p2QIwGIeEeWkqekCWoLl5g" name="CopyOf_Class1_1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p5RnkGIeEeWkqekCWoLl5g" name="CopyOf_Class1_2"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZN74GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZN74WgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_TZ_nULU5EduiKqCzJMWbGw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZOi8GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPKAGgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZPxEGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPxEWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQYIGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQYIWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQ_MGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQ_MWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_5WYJ0LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZRmQGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZRmQWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//activities"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_C2zXMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZSNUGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZSNUWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZS0YGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZS0YWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZTbcGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZTbcWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//interactions"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_meOioLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUCgGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUCgWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//statemachines"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_nAF5kLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUpkGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUpkWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//usecases"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_neZmMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Requirements:Requirement xmi:id="_CA5NsGhHEeWchZKsEGp2Eg" base_Class="_pYCiwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_CrCW4GhHEeWchZKsEGp2Eg" base_Class="_p2QIwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_DaVF0GhHEeWchZKsEGp2Eg" base_Class="_p5RnkGIeEeWkqekCWoLl5g"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteAddAll_Test_Initial.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteAddAll_Test_Initial.txt
new file mode 100755
index 0000000..3425e9b
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteAddAll_Test_Initial.txt
@@ -0,0 +1,3 @@
+ Class1
+ CopyOf_Class1_1
+ CopyOf_Class1_2
\ No newline at end of file
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteAddAll_Test_Result.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteAddAll_Test_Result.txt
new file mode 100755
index 0000000..56aa9b2
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteAddAll_Test_Result.txt
@@ -0,0 +1,3 @@
+ Class1 aaaa
+ CopyOf_Class1_1 bbbb
+ CopyOf_Class1_2 cccc
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteAddAll_Test_ToCopy.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteAddAll_Test_ToCopy.txt
new file mode 100755
index 0000000..b05f44a
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteAddAll_Test_ToCopy.txt
@@ -0,0 +1,4 @@
+ Class1 aaaa
+ CopyOf_Class1_1 bbbb
+ CopyOf_Class1_2 cccc
+
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteAxisIdentifierNotExisting_Test.di b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteAxisIdentifierNotExisting_Test.di
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteAxisIdentifierNotExisting_Test.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteAxisIdentifierNotExisting_Test.notation b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteAxisIdentifierNotExisting_Test.notation
new file mode 100755
index 0000000..0984e65
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteAxisIdentifierNotExisting_Test.notation
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nattable:Table xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:nattable="http://www.eclipse.org/papyrus/nattable/model" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis http://www.eclipse.org/papyrus/nattable/model#//nattableaxis http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model#//nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableconfiguration" xmi:id="_FERfIGhHEeWchZKsEGp2Eg" name="RequirementTable0" currentRowAxisProvider="_FESGMWhHEeWchZKsEGp2Eg" currentColumnAxisProvider="_FERfIWhHEeWchZKsEGp2Eg">
+ <context xmi:type="uml:Model" href="PasteEmptyOverwriteAxisIdentifierNotExisting_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <owner xmi:type="uml:Model" href="PasteEmptyOverwriteAxisIdentifierNotExisting_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <prototype xmi:type="configuration:PapyrusSyncTable" href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wNb3txhEeOqHvRyiN87hA"/>
+ <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#/"/>
+ <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_FERfIWhHEeWchZKsEGp2Eg" description="Provides the columns of the tables with a default configuration" name="Requirements Feature Columns Provider">
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FERfImhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::id">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FESGMGhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::text">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_1etgAG5bEeWpLowMLPbtlg" element="property_of_stereotype:/SysML::Requirements::Requirement::derived">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ </columnAxisProvidersHistory>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_FESGMWhHEeWchZKsEGp2Eg" description="Provides the requirements directly owned by the context of the table" name="Requirement Axis Provider" disconnectSlave="true"/>
+ <localRowHeaderAxisConfiguration xmi:type="nattableaxisconfiguration:LocalTableHeaderAxisConfiguration" xmi:id="_GF2RQHmoEeWVZIGG1XbiFw" indexStyle="NUMERIC">
+ <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:PasteEObjectConfiguration" xmi:id="_GF4GcHmoEeWVZIGG1XbiFw" pastedElementId="org.eclipse.papyrus.sysml.Requirement">
+ <postActions>applyStereotype:/SysML::Requirements::Requirement</postActions>
+ <pasteElementContainementFeature xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Package/packagedElement"/>
+ <axisIdentifier xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_GF4tgHmoEeWVZIGG1XbiFw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axisIdentifier>
+ </ownedAxisConfigurations>
+ </localRowHeaderAxisConfiguration>
+</nattable:Table>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteAxisIdentifierNotExisting_Test.uml b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteAxisIdentifierNotExisting_Test.uml
new file mode 100755
index 0000000..bbeea50
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteAxisIdentifierNotExisting_Test.uml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Requirements="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements">
+ <uml:Model xmi:id="_nAjG8GIeEeWkqekCWoLl5g" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_pYCiwGIeEeWkqekCWoLl5g" name="Class1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p2QIwGIeEeWkqekCWoLl5g" name="CopyOf_Class1_1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p5RnkGIeEeWkqekCWoLl5g" name="CopyOf_Class1_2"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZN74GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZN74WgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_TZ_nULU5EduiKqCzJMWbGw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZOi8GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPKAGgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZPxEGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPxEWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQYIGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQYIWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQ_MGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQ_MWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_5WYJ0LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZRmQGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZRmQWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//activities"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_C2zXMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZSNUGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZSNUWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZS0YGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZS0YWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZTbcGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZTbcWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//interactions"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_meOioLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUCgGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUCgWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//statemachines"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_nAF5kLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUpkGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUpkWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//usecases"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_neZmMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Requirements:Requirement xmi:id="_CA5NsGhHEeWchZKsEGp2Eg" base_Class="_pYCiwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_CrCW4GhHEeWchZKsEGp2Eg" base_Class="_p2QIwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_DaVF0GhHEeWchZKsEGp2Eg" base_Class="_p5RnkGIeEeWkqekCWoLl5g"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteAxisIdentifierNotExisting_Test_Initial.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteAxisIdentifierNotExisting_Test_Initial.txt
new file mode 100755
index 0000000..fb47d81
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteAxisIdentifierNotExisting_Test_Initial.txt
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteAxisIdentifierNotExisting_Test_ToCopy.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteAxisIdentifierNotExisting_Test_ToCopy.txt
new file mode 100755
index 0000000..b2b4754
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteAxisIdentifierNotExisting_Test_ToCopy.txt
@@ -0,0 +1,4 @@
+ Class1 aaaa
+ Class2 bbbb
+ CopyOf_Class1_2 cccc
+
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteFailColumns_Test.di b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteFailColumns_Test.di
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteFailColumns_Test.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteFailColumns_Test.notation b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteFailColumns_Test.notation
new file mode 100755
index 0000000..c6016a0
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteFailColumns_Test.notation
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nattable:Table xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:nattable="http://www.eclipse.org/papyrus/nattable/model" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis http://www.eclipse.org/papyrus/nattable/model#//nattableaxis http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model#//nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableconfiguration" xmi:id="_FERfIGhHEeWchZKsEGp2Eg" name="RequirementTable0" currentRowAxisProvider="_FESGMWhHEeWchZKsEGp2Eg" currentColumnAxisProvider="_FERfIWhHEeWchZKsEGp2Eg">
+ <context xmi:type="uml:Model" href="PasteEmptyOverwriteFailColumns_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <owner xmi:type="uml:Model" href="PasteEmptyOverwriteFailColumns_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <prototype xmi:type="configuration:PapyrusSyncTable" href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wNb3txhEeOqHvRyiN87hA"/>
+ <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#/"/>
+ <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_FERfIWhHEeWchZKsEGp2Eg" description="Provides the columns of the tables with a default configuration" name="Requirements Feature Columns Provider">
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FERfImhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::id">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_FERfI2hHEeWchZKsEGp2Eg">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FESGMGhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::text">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ </columnAxisProvidersHistory>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_FESGMWhHEeWchZKsEGp2Eg" description="Provides the requirements directly owned by the context of the table" name="Requirement Axis Provider" disconnectSlave="true"/>
+ <localRowHeaderAxisConfiguration xmi:type="nattableaxisconfiguration:LocalTableHeaderAxisConfiguration" xmi:id="_JZP7sHmoEeWVZIGG1XbiFw" indexStyle="NUMERIC">
+ <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:PasteEObjectConfiguration" xmi:id="_JZP7sXmoEeWVZIGG1XbiFw" pastedElementId="org.eclipse.papyrus.sysml.Requirement">
+ <postActions>applyStereotype:/SysML::Requirements::Requirement</postActions>
+ <pasteElementContainementFeature xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Package/packagedElement"/>
+ <axisIdentifier xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JZQiwHmoEeWVZIGG1XbiFw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axisIdentifier>
+ </ownedAxisConfigurations>
+ </localRowHeaderAxisConfiguration>
+</nattable:Table>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteFailColumns_Test.uml b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteFailColumns_Test.uml
new file mode 100755
index 0000000..bbeea50
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteFailColumns_Test.uml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Requirements="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements">
+ <uml:Model xmi:id="_nAjG8GIeEeWkqekCWoLl5g" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_pYCiwGIeEeWkqekCWoLl5g" name="Class1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p2QIwGIeEeWkqekCWoLl5g" name="CopyOf_Class1_1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p5RnkGIeEeWkqekCWoLl5g" name="CopyOf_Class1_2"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZN74GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZN74WgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_TZ_nULU5EduiKqCzJMWbGw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZOi8GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPKAGgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZPxEGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPxEWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQYIGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQYIWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQ_MGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQ_MWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_5WYJ0LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZRmQGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZRmQWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//activities"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_C2zXMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZSNUGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZSNUWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZS0YGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZS0YWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZTbcGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZTbcWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//interactions"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_meOioLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUCgGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUCgWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//statemachines"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_nAF5kLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUpkGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUpkWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//usecases"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_neZmMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Requirements:Requirement xmi:id="_CA5NsGhHEeWchZKsEGp2Eg" base_Class="_pYCiwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_CrCW4GhHEeWchZKsEGp2Eg" base_Class="_p2QIwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_DaVF0GhHEeWchZKsEGp2Eg" base_Class="_p5RnkGIeEeWkqekCWoLl5g"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteFailColumns_Test_Initial.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteFailColumns_Test_Initial.txt
new file mode 100755
index 0000000..3425e9b
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteFailColumns_Test_Initial.txt
@@ -0,0 +1,3 @@
+ Class1
+ CopyOf_Class1_1
+ CopyOf_Class1_2
\ No newline at end of file
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteFailColumns_Test_ToCopy.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteFailColumns_Test_ToCopy.txt
new file mode 100755
index 0000000..b973b81
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteFailColumns_Test_ToCopy.txt
@@ -0,0 +1,4 @@
+ Class1
+ Class2
+ Class3
+
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteReplaceAll_Test.di b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteReplaceAll_Test.di
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteReplaceAll_Test.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteReplaceAll_Test.notation b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteReplaceAll_Test.notation
new file mode 100755
index 0000000..74d61d4
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteReplaceAll_Test.notation
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nattable:Table xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:nattable="http://www.eclipse.org/papyrus/nattable/model" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis http://www.eclipse.org/papyrus/nattable/model#//nattableaxis http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model#//nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableconfiguration" xmi:id="_FERfIGhHEeWchZKsEGp2Eg" name="RequirementTable0" currentRowAxisProvider="_FESGMWhHEeWchZKsEGp2Eg" currentColumnAxisProvider="_FERfIWhHEeWchZKsEGp2Eg">
+ <context xmi:type="uml:Model" href="PasteEmptyOverwriteReplaceAll_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <owner xmi:type="uml:Model" href="PasteEmptyOverwriteReplaceAll_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <prototype xmi:type="configuration:PapyrusSyncTable" href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wNb3txhEeOqHvRyiN87hA"/>
+ <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#/"/>
+ <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_FERfIWhHEeWchZKsEGp2Eg" description="Provides the columns of the tables with a default configuration" name="Requirements Feature Columns Provider">
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FERfImhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::id">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_FERfI2hHEeWchZKsEGp2Eg">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FESGMGhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::text">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ </columnAxisProvidersHistory>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_FESGMWhHEeWchZKsEGp2Eg" description="Provides the requirements directly owned by the context of the table" name="Requirement Axis Provider" disconnectSlave="true"/>
+ <localRowHeaderAxisConfiguration xmi:type="nattableaxisconfiguration:LocalTableHeaderAxisConfiguration" xmi:id="__iG3cHmnEeWVZIGG1XbiFw" indexStyle="NUMERIC">
+ <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:PasteEObjectConfiguration" xmi:id="__iSdoHmnEeWVZIGG1XbiFw" pastedElementId="org.eclipse.papyrus.sysml.Requirement">
+ <postActions>applyStereotype:/SysML::Requirements::Requirement</postActions>
+ <pasteElementContainementFeature xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Package/packagedElement"/>
+ <axisIdentifier xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="__iTEsHmnEeWVZIGG1XbiFw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axisIdentifier>
+ </ownedAxisConfigurations>
+ </localRowHeaderAxisConfiguration>
+</nattable:Table>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteReplaceAll_Test.uml b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteReplaceAll_Test.uml
new file mode 100755
index 0000000..bbeea50
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteReplaceAll_Test.uml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Requirements="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements">
+ <uml:Model xmi:id="_nAjG8GIeEeWkqekCWoLl5g" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_pYCiwGIeEeWkqekCWoLl5g" name="Class1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p2QIwGIeEeWkqekCWoLl5g" name="CopyOf_Class1_1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p5RnkGIeEeWkqekCWoLl5g" name="CopyOf_Class1_2"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZN74GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZN74WgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_TZ_nULU5EduiKqCzJMWbGw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZOi8GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPKAGgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZPxEGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPxEWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQYIGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQYIWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQ_MGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQ_MWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_5WYJ0LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZRmQGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZRmQWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//activities"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_C2zXMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZSNUGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZSNUWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZS0YGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZS0YWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZTbcGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZTbcWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//interactions"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_meOioLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUCgGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUCgWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//statemachines"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_nAF5kLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUpkGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUpkWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//usecases"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_neZmMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Requirements:Requirement xmi:id="_CA5NsGhHEeWchZKsEGp2Eg" base_Class="_pYCiwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_CrCW4GhHEeWchZKsEGp2Eg" base_Class="_p2QIwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_DaVF0GhHEeWchZKsEGp2Eg" base_Class="_p5RnkGIeEeWkqekCWoLl5g"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteReplaceAll_Test_Initial.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteReplaceAll_Test_Initial.txt
new file mode 100755
index 0000000..3425e9b
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteReplaceAll_Test_Initial.txt
@@ -0,0 +1,3 @@
+ Class1
+ CopyOf_Class1_1
+ CopyOf_Class1_2
\ No newline at end of file
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteReplaceAll_Test_Result.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteReplaceAll_Test_Result.txt
new file mode 100755
index 0000000..56aa9b2
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteReplaceAll_Test_Result.txt
@@ -0,0 +1,3 @@
+ Class1 aaaa
+ CopyOf_Class1_1 bbbb
+ CopyOf_Class1_2 cccc
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteReplaceAll_Test_ToCopy.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteReplaceAll_Test_ToCopy.txt
new file mode 100755
index 0000000..b05f44a
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteReplaceAll_Test_ToCopy.txt
@@ -0,0 +1,4 @@
+ Class1 aaaa
+ CopyOf_Class1_1 bbbb
+ CopyOf_Class1_2 cccc
+
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteSkipAll_Test.di b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteSkipAll_Test.di
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteSkipAll_Test.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteSkipAll_Test.notation b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteSkipAll_Test.notation
new file mode 100755
index 0000000..8e46553
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteSkipAll_Test.notation
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nattable:Table xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:nattable="http://www.eclipse.org/papyrus/nattable/model" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis http://www.eclipse.org/papyrus/nattable/model#//nattableaxis http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model#//nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableconfiguration" xmi:id="_FERfIGhHEeWchZKsEGp2Eg" name="RequirementTable0" currentRowAxisProvider="_FESGMWhHEeWchZKsEGp2Eg" currentColumnAxisProvider="_FERfIWhHEeWchZKsEGp2Eg">
+ <context xmi:type="uml:Model" href="PasteEmptyOverwriteSkipAll_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <owner xmi:type="uml:Model" href="PasteEmptyOverwriteSkipAll_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <prototype xmi:type="configuration:PapyrusSyncTable" href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wNb3txhEeOqHvRyiN87hA"/>
+ <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#/"/>
+ <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_FERfIWhHEeWchZKsEGp2Eg" description="Provides the columns of the tables with a default configuration" name="Requirements Feature Columns Provider">
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FERfImhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::id">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_FERfI2hHEeWchZKsEGp2Eg">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FESGMGhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::text">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ </columnAxisProvidersHistory>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_FESGMWhHEeWchZKsEGp2Eg" description="Provides the requirements directly owned by the context of the table" name="Requirement Axis Provider" disconnectSlave="true"/>
+ <localRowHeaderAxisConfiguration xmi:type="nattableaxisconfiguration:LocalTableHeaderAxisConfiguration" xmi:id="__iG3cHmnEeWVZIGG1XbiFw" indexStyle="NUMERIC">
+ <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:PasteEObjectConfiguration" xmi:id="__iSdoHmnEeWVZIGG1XbiFw" pastedElementId="org.eclipse.papyrus.sysml.Requirement">
+ <postActions>applyStereotype:/SysML::Requirements::Requirement</postActions>
+ <pasteElementContainementFeature xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Package/packagedElement"/>
+ <axisIdentifier xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="__iTEsHmnEeWVZIGG1XbiFw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axisIdentifier>
+ </ownedAxisConfigurations>
+ </localRowHeaderAxisConfiguration>
+</nattable:Table>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteSkipAll_Test.uml b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteSkipAll_Test.uml
new file mode 100755
index 0000000..bbeea50
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteSkipAll_Test.uml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Requirements="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements">
+ <uml:Model xmi:id="_nAjG8GIeEeWkqekCWoLl5g" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_pYCiwGIeEeWkqekCWoLl5g" name="Class1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p2QIwGIeEeWkqekCWoLl5g" name="CopyOf_Class1_1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p5RnkGIeEeWkqekCWoLl5g" name="CopyOf_Class1_2"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZN74GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZN74WgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_TZ_nULU5EduiKqCzJMWbGw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZOi8GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPKAGgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZPxEGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPxEWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQYIGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQYIWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQ_MGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQ_MWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_5WYJ0LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZRmQGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZRmQWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//activities"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_C2zXMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZSNUGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZSNUWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZS0YGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZS0YWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZTbcGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZTbcWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//interactions"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_meOioLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUCgGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUCgWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//statemachines"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_nAF5kLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUpkGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUpkWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//usecases"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_neZmMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Requirements:Requirement xmi:id="_CA5NsGhHEeWchZKsEGp2Eg" base_Class="_pYCiwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_CrCW4GhHEeWchZKsEGp2Eg" base_Class="_p2QIwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_DaVF0GhHEeWchZKsEGp2Eg" base_Class="_p5RnkGIeEeWkqekCWoLl5g"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteSkipAll_Test_Initial.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteSkipAll_Test_Initial.txt
new file mode 100755
index 0000000..3425e9b
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteSkipAll_Test_Initial.txt
@@ -0,0 +1,3 @@
+ Class1
+ CopyOf_Class1_1
+ CopyOf_Class1_2
\ No newline at end of file
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteSkipAll_Test_Result.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteSkipAll_Test_Result.txt
new file mode 100755
index 0000000..56aa9b2
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteSkipAll_Test_Result.txt
@@ -0,0 +1,3 @@
+ Class1 aaaa
+ CopyOf_Class1_1 bbbb
+ CopyOf_Class1_2 cccc
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteSkipAll_Test_ToCopy.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteSkipAll_Test_ToCopy.txt
new file mode 100755
index 0000000..b05f44a
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteSkipAll_Test_ToCopy.txt
@@ -0,0 +1,4 @@
+ Class1 aaaa
+ CopyOf_Class1_1 bbbb
+ CopyOf_Class1_2 cccc
+
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteWarningNotExisting_Test.di b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteWarningNotExisting_Test.di
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteWarningNotExisting_Test.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteWarningNotExisting_Test.notation b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteWarningNotExisting_Test.notation
new file mode 100755
index 0000000..99918cd
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteWarningNotExisting_Test.notation
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nattable:Table xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:nattable="http://www.eclipse.org/papyrus/nattable/model" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis http://www.eclipse.org/papyrus/nattable/model#//nattableaxis http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model#//nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableconfiguration" xmi:id="_FERfIGhHEeWchZKsEGp2Eg" name="RequirementTable0" currentRowAxisProvider="_FESGMWhHEeWchZKsEGp2Eg" currentColumnAxisProvider="_FERfIWhHEeWchZKsEGp2Eg">
+ <context xmi:type="uml:Model" href="PasteEmptyOverwriteWarningNotExisting_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <owner xmi:type="uml:Model" href="PasteEmptyOverwriteWarningNotExisting_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <prototype xmi:type="configuration:PapyrusSyncTable" href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wNb3txhEeOqHvRyiN87hA"/>
+ <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#/"/>
+ <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_FERfIWhHEeWchZKsEGp2Eg" description="Provides the columns of the tables with a default configuration" name="Requirements Feature Columns Provider">
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FERfImhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::id">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_FERfI2hHEeWchZKsEGp2Eg">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FESGMGhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::text">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ </columnAxisProvidersHistory>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_FESGMWhHEeWchZKsEGp2Eg" description="Provides the requirements directly owned by the context of the table" name="Requirement Axis Provider" disconnectSlave="true"/>
+ <localRowHeaderAxisConfiguration xmi:type="nattableaxisconfiguration:LocalTableHeaderAxisConfiguration" xmi:id="_Ogx2MHmoEeWVZIGG1XbiFw" indexStyle="NUMERIC">
+ <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:PasteEObjectConfiguration" xmi:id="_OgydQHmoEeWVZIGG1XbiFw" pastedElementId="org.eclipse.papyrus.sysml.Requirement">
+ <postActions>applyStereotype:/SysML::Requirements::Requirement</postActions>
+ <pasteElementContainementFeature xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Package/packagedElement"/>
+ <axisIdentifier xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_OgydQXmoEeWVZIGG1XbiFw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axisIdentifier>
+ </ownedAxisConfigurations>
+ </localRowHeaderAxisConfiguration>
+</nattable:Table>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteWarningNotExisting_Test.uml b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteWarningNotExisting_Test.uml
new file mode 100755
index 0000000..bbeea50
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteWarningNotExisting_Test.uml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Requirements="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements">
+ <uml:Model xmi:id="_nAjG8GIeEeWkqekCWoLl5g" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_pYCiwGIeEeWkqekCWoLl5g" name="Class1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p2QIwGIeEeWkqekCWoLl5g" name="CopyOf_Class1_1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p5RnkGIeEeWkqekCWoLl5g" name="CopyOf_Class1_2"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZN74GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZN74WgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_TZ_nULU5EduiKqCzJMWbGw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZOi8GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPKAGgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZPxEGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPxEWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQYIGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQYIWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQ_MGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQ_MWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_5WYJ0LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZRmQGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZRmQWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//activities"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_C2zXMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZSNUGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZSNUWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZS0YGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZS0YWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZTbcGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZTbcWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//interactions"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_meOioLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUCgGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUCgWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//statemachines"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_nAF5kLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUpkGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUpkWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//usecases"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_neZmMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Requirements:Requirement xmi:id="_CA5NsGhHEeWchZKsEGp2Eg" base_Class="_pYCiwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_CrCW4GhHEeWchZKsEGp2Eg" base_Class="_p2QIwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_DaVF0GhHEeWchZKsEGp2Eg" base_Class="_p5RnkGIeEeWkqekCWoLl5g"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteWarningNotExisting_Test_Initial.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteWarningNotExisting_Test_Initial.txt
new file mode 100755
index 0000000..3425e9b
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteWarningNotExisting_Test_Initial.txt
@@ -0,0 +1,3 @@
+ Class1
+ CopyOf_Class1_1
+ CopyOf_Class1_2
\ No newline at end of file
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteWarningNotExisting_Test_Result.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteWarningNotExisting_Test_Result.txt
new file mode 100755
index 0000000..f58ea2a
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteWarningNotExisting_Test_Result.txt
@@ -0,0 +1,3 @@
+ Class1 aaaa
+ CopyOf_Class1_1
+ CopyOf_Class1_2 cccc
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteWarningNotExisting_Test_ToCopy.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteWarningNotExisting_Test_ToCopy.txt
new file mode 100755
index 0000000..b2b4754
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteEmptyOverwriteWarningNotExisting_Test_ToCopy.txt
@@ -0,0 +1,4 @@
+ Class1 aaaa
+ Class2 bbbb
+ CopyOf_Class1_2 cccc
+
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteAll_Test.di b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteAll_Test.di
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteAll_Test.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteAll_Test.notation b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteAll_Test.notation
new file mode 100755
index 0000000..c0caaca
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteAll_Test.notation
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nattable:Table xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:nattable="http://www.eclipse.org/papyrus/nattable/model" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis http://www.eclipse.org/papyrus/nattable/model#//nattableaxis http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model#//nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableconfiguration" xmi:id="_FERfIGhHEeWchZKsEGp2Eg" name="RequirementTable0" currentRowAxisProvider="_FESGMWhHEeWchZKsEGp2Eg" currentColumnAxisProvider="_FERfIWhHEeWchZKsEGp2Eg">
+ <context xmi:type="uml:Model" href="PasteRowsOverwriteAll_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <owner xmi:type="uml:Model" href="PasteRowsOverwriteAll_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <prototype xmi:type="configuration:PapyrusSyncTable" href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wNb3txhEeOqHvRyiN87hA"/>
+ <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#/"/>
+ <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_FERfIWhHEeWchZKsEGp2Eg" description="Provides the columns of the tables with a default configuration" name="Requirements Feature Columns Provider">
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FERfImhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::id">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_FERfI2hHEeWchZKsEGp2Eg">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FESGMGhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::text">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ </columnAxisProvidersHistory>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_FESGMWhHEeWchZKsEGp2Eg" description="Provides the requirements directly owned by the context of the table" name="Requirement Axis Provider" disconnectSlave="true"/>
+ <localRowHeaderAxisConfiguration xmi:type="nattableaxisconfiguration:LocalTableHeaderAxisConfiguration" xmi:id="__iG3cHmnEeWVZIGG1XbiFw" indexStyle="NUMERIC">
+ <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:PasteEObjectConfiguration" xmi:id="__iSdoHmnEeWVZIGG1XbiFw" pastedElementId="org.eclipse.papyrus.sysml.Requirement">
+ <postActions>applyStereotype:/SysML::Requirements::Requirement</postActions>
+ <pasteElementContainementFeature xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Package/packagedElement"/>
+ <axisIdentifier xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="__iTEsHmnEeWVZIGG1XbiFw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axisIdentifier>
+ </ownedAxisConfigurations>
+ </localRowHeaderAxisConfiguration>
+</nattable:Table>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteAll_Test.uml b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteAll_Test.uml
new file mode 100755
index 0000000..bbeea50
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteAll_Test.uml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Requirements="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements">
+ <uml:Model xmi:id="_nAjG8GIeEeWkqekCWoLl5g" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_pYCiwGIeEeWkqekCWoLl5g" name="Class1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p2QIwGIeEeWkqekCWoLl5g" name="CopyOf_Class1_1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p5RnkGIeEeWkqekCWoLl5g" name="CopyOf_Class1_2"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZN74GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZN74WgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_TZ_nULU5EduiKqCzJMWbGw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZOi8GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPKAGgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZPxEGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPxEWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQYIGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQYIWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQ_MGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQ_MWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_5WYJ0LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZRmQGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZRmQWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//activities"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_C2zXMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZSNUGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZSNUWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZS0YGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZS0YWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZTbcGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZTbcWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//interactions"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_meOioLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUCgGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUCgWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//statemachines"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_nAF5kLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUpkGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUpkWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//usecases"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_neZmMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Requirements:Requirement xmi:id="_CA5NsGhHEeWchZKsEGp2Eg" base_Class="_pYCiwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_CrCW4GhHEeWchZKsEGp2Eg" base_Class="_p2QIwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_DaVF0GhHEeWchZKsEGp2Eg" base_Class="_p5RnkGIeEeWkqekCWoLl5g"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteAll_Test_Initial.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteAll_Test_Initial.txt
new file mode 100755
index 0000000..3425e9b
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteAll_Test_Initial.txt
@@ -0,0 +1,3 @@
+ Class1
+ CopyOf_Class1_1
+ CopyOf_Class1_2
\ No newline at end of file
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteAll_Test_Result.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteAll_Test_Result.txt
new file mode 100755
index 0000000..56aa9b2
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteAll_Test_Result.txt
@@ -0,0 +1,3 @@
+ Class1 aaaa
+ CopyOf_Class1_1 bbbb
+ CopyOf_Class1_2 cccc
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteAll_Test_ToCopy.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteAll_Test_ToCopy.txt
new file mode 100755
index 0000000..b05f44a
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteAll_Test_ToCopy.txt
@@ -0,0 +1,4 @@
+ Class1 aaaa
+ CopyOf_Class1_1 bbbb
+ CopyOf_Class1_2 cccc
+
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteAxisIdentifierNotExisting_Test.di b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteAxisIdentifierNotExisting_Test.di
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteAxisIdentifierNotExisting_Test.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteAxisIdentifierNotExisting_Test.notation b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteAxisIdentifierNotExisting_Test.notation
new file mode 100755
index 0000000..88b4fd5
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteAxisIdentifierNotExisting_Test.notation
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nattable:Table xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmlns:nattable="http://www.eclipse.org/papyrus/nattable/model" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis http://www.eclipse.org/papyrus/nattable/model#//nattableaxis http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model#//nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableconfiguration" xmi:id="_FERfIGhHEeWchZKsEGp2Eg" name="RequirementTable0" currentRowAxisProvider="_FESGMWhHEeWchZKsEGp2Eg" currentColumnAxisProvider="_FERfIWhHEeWchZKsEGp2Eg">
+ <context xmi:type="uml:Model" href="PasteRowsOverwriteAxisIdentifierNotExisting_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <owner xmi:type="uml:Model" href="PasteRowsOverwriteAxisIdentifierNotExisting_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <prototype xmi:type="configuration:PapyrusSyncTable" href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wNb3txhEeOqHvRyiN87hA"/>
+ <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#/"/>
+ <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_FERfIWhHEeWchZKsEGp2Eg" description="Provides the columns of the tables with a default configuration" name="Requirements Feature Columns Provider">
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FERfImhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::id">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FESGMGhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::text">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_1etgAG5bEeWpLowMLPbtlg" element="property_of_stereotype:/SysML::Requirements::Requirement::derived">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ </columnAxisProvidersHistory>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_FESGMWhHEeWchZKsEGp2Eg" description="Provides the requirements directly owned by the context of the table" name="Requirement Axis Provider" disconnectSlave="true"/>
+ <localRowHeaderAxisConfiguration xmi:type="nattableaxisconfiguration:LocalTableHeaderAxisConfiguration" xmi:id="_GF2RQHmoEeWVZIGG1XbiFw" indexStyle="NUMERIC">
+ <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:PasteEObjectConfiguration" xmi:id="_GF4GcHmoEeWVZIGG1XbiFw" pastedElementId="org.eclipse.papyrus.sysml.Requirement">
+ <postActions>applyStereotype:/SysML::Requirements::Requirement</postActions>
+ <pasteElementContainementFeature xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Package/packagedElement"/>
+ <axisIdentifier xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_GF4tgHmoEeWVZIGG1XbiFw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axisIdentifier>
+ </ownedAxisConfigurations>
+ </localRowHeaderAxisConfiguration>
+</nattable:Table>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteAxisIdentifierNotExisting_Test.uml b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteAxisIdentifierNotExisting_Test.uml
new file mode 100755
index 0000000..bbeea50
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteAxisIdentifierNotExisting_Test.uml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Requirements="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements">
+ <uml:Model xmi:id="_nAjG8GIeEeWkqekCWoLl5g" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_pYCiwGIeEeWkqekCWoLl5g" name="Class1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p2QIwGIeEeWkqekCWoLl5g" name="CopyOf_Class1_1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p5RnkGIeEeWkqekCWoLl5g" name="CopyOf_Class1_2"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZN74GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZN74WgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_TZ_nULU5EduiKqCzJMWbGw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZOi8GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPKAGgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZPxEGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPxEWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQYIGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQYIWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQ_MGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQ_MWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_5WYJ0LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZRmQGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZRmQWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//activities"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_C2zXMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZSNUGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZSNUWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZS0YGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZS0YWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZTbcGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZTbcWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//interactions"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_meOioLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUCgGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUCgWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//statemachines"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_nAF5kLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUpkGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUpkWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//usecases"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_neZmMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Requirements:Requirement xmi:id="_CA5NsGhHEeWchZKsEGp2Eg" base_Class="_pYCiwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_CrCW4GhHEeWchZKsEGp2Eg" base_Class="_p2QIwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_DaVF0GhHEeWchZKsEGp2Eg" base_Class="_p5RnkGIeEeWkqekCWoLl5g"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteAxisIdentifierNotExisting_Test_Initial.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteAxisIdentifierNotExisting_Test_Initial.txt
new file mode 100755
index 0000000..fb47d81
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteAxisIdentifierNotExisting_Test_Initial.txt
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteAxisIdentifierNotExisting_Test_ToCopy.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteAxisIdentifierNotExisting_Test_ToCopy.txt
new file mode 100755
index 0000000..b2b4754
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteAxisIdentifierNotExisting_Test_ToCopy.txt
@@ -0,0 +1,4 @@
+ Class1 aaaa
+ Class2 bbbb
+ CopyOf_Class1_2 cccc
+
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteFailColumns_Test.di b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteFailColumns_Test.di
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteFailColumns_Test.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteFailColumns_Test.notation b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteFailColumns_Test.notation
new file mode 100755
index 0000000..b4cb4d7
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteFailColumns_Test.notation
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nattable:Table xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:nattable="http://www.eclipse.org/papyrus/nattable/model" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis http://www.eclipse.org/papyrus/nattable/model#//nattableaxis http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model#//nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableconfiguration" xmi:id="_FERfIGhHEeWchZKsEGp2Eg" name="RequirementTable0" currentRowAxisProvider="_FESGMWhHEeWchZKsEGp2Eg" currentColumnAxisProvider="_FERfIWhHEeWchZKsEGp2Eg">
+ <context xmi:type="uml:Model" href="PasteRowsOverwriteFailColumns_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <owner xmi:type="uml:Model" href="PasteRowsOverwriteFailColumns_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <prototype xmi:type="configuration:PapyrusSyncTable" href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wNb3txhEeOqHvRyiN87hA"/>
+ <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#/"/>
+ <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_FERfIWhHEeWchZKsEGp2Eg" description="Provides the columns of the tables with a default configuration" name="Requirements Feature Columns Provider">
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FERfImhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::id">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_FERfI2hHEeWchZKsEGp2Eg">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FESGMGhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::text">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ </columnAxisProvidersHistory>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_FESGMWhHEeWchZKsEGp2Eg" description="Provides the requirements directly owned by the context of the table" name="Requirement Axis Provider" disconnectSlave="true"/>
+ <localRowHeaderAxisConfiguration xmi:type="nattableaxisconfiguration:LocalTableHeaderAxisConfiguration" xmi:id="_JZP7sHmoEeWVZIGG1XbiFw" indexStyle="NUMERIC">
+ <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:PasteEObjectConfiguration" xmi:id="_JZP7sXmoEeWVZIGG1XbiFw" pastedElementId="org.eclipse.papyrus.sysml.Requirement">
+ <postActions>applyStereotype:/SysML::Requirements::Requirement</postActions>
+ <pasteElementContainementFeature xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Package/packagedElement"/>
+ <axisIdentifier xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JZQiwHmoEeWVZIGG1XbiFw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axisIdentifier>
+ </ownedAxisConfigurations>
+ </localRowHeaderAxisConfiguration>
+</nattable:Table>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteFailColumns_Test.uml b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteFailColumns_Test.uml
new file mode 100755
index 0000000..bbeea50
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteFailColumns_Test.uml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Requirements="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements">
+ <uml:Model xmi:id="_nAjG8GIeEeWkqekCWoLl5g" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_pYCiwGIeEeWkqekCWoLl5g" name="Class1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p2QIwGIeEeWkqekCWoLl5g" name="CopyOf_Class1_1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p5RnkGIeEeWkqekCWoLl5g" name="CopyOf_Class1_2"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZN74GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZN74WgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_TZ_nULU5EduiKqCzJMWbGw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZOi8GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPKAGgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZPxEGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPxEWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQYIGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQYIWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQ_MGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQ_MWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_5WYJ0LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZRmQGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZRmQWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//activities"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_C2zXMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZSNUGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZSNUWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZS0YGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZS0YWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZTbcGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZTbcWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//interactions"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_meOioLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUCgGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUCgWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//statemachines"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_nAF5kLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUpkGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUpkWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//usecases"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_neZmMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Requirements:Requirement xmi:id="_CA5NsGhHEeWchZKsEGp2Eg" base_Class="_pYCiwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_CrCW4GhHEeWchZKsEGp2Eg" base_Class="_p2QIwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_DaVF0GhHEeWchZKsEGp2Eg" base_Class="_p5RnkGIeEeWkqekCWoLl5g"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteFailColumns_Test_Initial.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteFailColumns_Test_Initial.txt
new file mode 100755
index 0000000..3425e9b
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteFailColumns_Test_Initial.txt
@@ -0,0 +1,3 @@
+ Class1
+ CopyOf_Class1_1
+ CopyOf_Class1_2
\ No newline at end of file
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteFailColumns_Test_ToCopy.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteFailColumns_Test_ToCopy.txt
new file mode 100755
index 0000000..b973b81
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteFailColumns_Test_ToCopy.txt
@@ -0,0 +1,4 @@
+ Class1
+ Class2
+ Class3
+
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteFailRows_Test.di b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteFailRows_Test.di
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteFailRows_Test.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteFailRows_Test.notation b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteFailRows_Test.notation
new file mode 100755
index 0000000..33aa8c9
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteFailRows_Test.notation
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nattable:Table xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:nattable="http://www.eclipse.org/papyrus/nattable/model" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis http://www.eclipse.org/papyrus/nattable/model#//nattableaxis http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model#//nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableconfiguration" xmi:id="_FERfIGhHEeWchZKsEGp2Eg" name="RequirementTable0" currentRowAxisProvider="_FESGMWhHEeWchZKsEGp2Eg" currentColumnAxisProvider="_FERfIWhHEeWchZKsEGp2Eg">
+ <context xmi:type="uml:Model" href="PasteRowsOverwriteFailRows_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <owner xmi:type="uml:Model" href="PasteRowsOverwriteFailRows_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <prototype xmi:type="configuration:PapyrusSyncTable" href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wNb3txhEeOqHvRyiN87hA"/>
+ <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#/"/>
+ <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_FERfIWhHEeWchZKsEGp2Eg" description="Provides the columns of the tables with a default configuration" name="Requirements Feature Columns Provider">
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FERfImhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::id">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_FERfI2hHEeWchZKsEGp2Eg">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FESGMGhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::text">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ </columnAxisProvidersHistory>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_FESGMWhHEeWchZKsEGp2Eg" description="Provides the requirements directly owned by the context of the table" name="Requirement Axis Provider" disconnectSlave="true"/>
+ <localRowHeaderAxisConfiguration xmi:type="nattableaxisconfiguration:LocalTableHeaderAxisConfiguration" xmi:id="_MpQT4HmoEeWVZIGG1XbiFw" indexStyle="NUMERIC">
+ <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:PasteEObjectConfiguration" xmi:id="_MpQ68HmoEeWVZIGG1XbiFw" pastedElementId="org.eclipse.papyrus.sysml.Requirement">
+ <postActions>applyStereotype:/SysML::Requirements::Requirement</postActions>
+ <pasteElementContainementFeature xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Package/packagedElement"/>
+ <axisIdentifier xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_MpQ68XmoEeWVZIGG1XbiFw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axisIdentifier>
+ </ownedAxisConfigurations>
+ </localRowHeaderAxisConfiguration>
+</nattable:Table>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteFailRows_Test.uml b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteFailRows_Test.uml
new file mode 100755
index 0000000..bbeea50
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteFailRows_Test.uml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Requirements="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements">
+ <uml:Model xmi:id="_nAjG8GIeEeWkqekCWoLl5g" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_pYCiwGIeEeWkqekCWoLl5g" name="Class1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p2QIwGIeEeWkqekCWoLl5g" name="CopyOf_Class1_1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p5RnkGIeEeWkqekCWoLl5g" name="CopyOf_Class1_2"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZN74GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZN74WgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_TZ_nULU5EduiKqCzJMWbGw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZOi8GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPKAGgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZPxEGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPxEWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQYIGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQYIWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQ_MGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQ_MWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_5WYJ0LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZRmQGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZRmQWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//activities"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_C2zXMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZSNUGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZSNUWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZS0YGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZS0YWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZTbcGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZTbcWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//interactions"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_meOioLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUCgGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUCgWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//statemachines"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_nAF5kLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUpkGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUpkWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//usecases"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_neZmMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Requirements:Requirement xmi:id="_CA5NsGhHEeWchZKsEGp2Eg" base_Class="_pYCiwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_CrCW4GhHEeWchZKsEGp2Eg" base_Class="_p2QIwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_DaVF0GhHEeWchZKsEGp2Eg" base_Class="_p5RnkGIeEeWkqekCWoLl5g"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteFailRows_Test_Initial.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteFailRows_Test_Initial.txt
new file mode 100755
index 0000000..3425e9b
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteFailRows_Test_Initial.txt
@@ -0,0 +1,3 @@
+ Class1
+ CopyOf_Class1_1
+ CopyOf_Class1_2
\ No newline at end of file
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteFailRows_Test_ToCopy.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteFailRows_Test_ToCopy.txt
new file mode 100755
index 0000000..e39c478
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteFailRows_Test_ToCopy.txt
@@ -0,0 +1,4 @@
+ Class1 aaaa
+ Class2 bbbb
+ Class3 cccc
+
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteWarningNotExisting_Test.di b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteWarningNotExisting_Test.di
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteWarningNotExisting_Test.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteWarningNotExisting_Test.notation b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteWarningNotExisting_Test.notation
new file mode 100755
index 0000000..0c15567
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteWarningNotExisting_Test.notation
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nattable:Table xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:nattable="http://www.eclipse.org/papyrus/nattable/model" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis http://www.eclipse.org/papyrus/nattable/model#//nattableaxis http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model#//nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableconfiguration" xmi:id="_FERfIGhHEeWchZKsEGp2Eg" name="RequirementTable0" currentRowAxisProvider="_FESGMWhHEeWchZKsEGp2Eg" currentColumnAxisProvider="_FERfIWhHEeWchZKsEGp2Eg">
+ <context xmi:type="uml:Model" href="PasteRowsOverwriteWarningNotExisting_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <owner xmi:type="uml:Model" href="PasteRowsOverwriteWarningNotExisting_Test.uml#_nAjG8GIeEeWkqekCWoLl5g"/>
+ <prototype xmi:type="configuration:PapyrusSyncTable" href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wNb3txhEeOqHvRyiN87hA"/>
+ <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#/"/>
+ <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_FERfIWhHEeWchZKsEGp2Eg" description="Provides the columns of the tables with a default configuration" name="Requirements Feature Columns Provider">
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FERfImhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::id">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_FERfI2hHEeWchZKsEGp2Eg">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FESGMGhHEeWchZKsEGp2Eg" element="property_of_stereotype:/SysML::Requirements::Requirement::text">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ </columnAxisProvidersHistory>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_FESGMWhHEeWchZKsEGp2Eg" description="Provides the requirements directly owned by the context of the table" name="Requirement Axis Provider" disconnectSlave="true"/>
+ <localRowHeaderAxisConfiguration xmi:type="nattableaxisconfiguration:LocalTableHeaderAxisConfiguration" xmi:id="_Ogx2MHmoEeWVZIGG1XbiFw" indexStyle="NUMERIC">
+ <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:PasteEObjectConfiguration" xmi:id="_OgydQHmoEeWVZIGG1XbiFw" pastedElementId="org.eclipse.papyrus.sysml.Requirement">
+ <postActions>applyStereotype:/SysML::Requirements::Requirement</postActions>
+ <pasteElementContainementFeature xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Package/packagedElement"/>
+ <axisIdentifier xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_OgydQXmoEeWVZIGG1XbiFw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axisIdentifier>
+ </ownedAxisConfigurations>
+ </localRowHeaderAxisConfiguration>
+</nattable:Table>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteWarningNotExisting_Test.uml b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteWarningNotExisting_Test.uml
new file mode 100755
index 0000000..bbeea50
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteWarningNotExisting_Test.uml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Requirements="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements">
+ <uml:Model xmi:id="_nAjG8GIeEeWkqekCWoLl5g" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_pYCiwGIeEeWkqekCWoLl5g" name="Class1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p2QIwGIeEeWkqekCWoLl5g" name="CopyOf_Class1_1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_p5RnkGIeEeWkqekCWoLl5g" name="CopyOf_Class1_2"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZN74GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZN74WgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_TZ_nULU5EduiKqCzJMWbGw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZOi8GgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPKAGgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZPxEGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZPxEWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQYIGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQYIWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZQ_MGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZQ_MWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_5WYJ0LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZRmQGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZRmQWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//activities"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_C2zXMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZSNUGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZSNUWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZS0YGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZS0YWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZTbcGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZTbcWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//interactions"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_meOioLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUCgGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUCgWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//statemachines"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_nAF5kLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4ZUpkGgREeW_BJ00xUargw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4ZUpkWgREeW_BJ00xUargw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//usecases"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_neZmMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Requirements:Requirement xmi:id="_CA5NsGhHEeWchZKsEGp2Eg" base_Class="_pYCiwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_CrCW4GhHEeWchZKsEGp2Eg" base_Class="_p2QIwGIeEeWkqekCWoLl5g"/>
+ <Requirements:Requirement xmi:id="_DaVF0GhHEeWchZKsEGp2Eg" base_Class="_p5RnkGIeEeWkqekCWoLl5g"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteWarningNotExisting_Test_Initial.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteWarningNotExisting_Test_Initial.txt
new file mode 100755
index 0000000..3425e9b
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteWarningNotExisting_Test_Initial.txt
@@ -0,0 +1,3 @@
+ Class1
+ CopyOf_Class1_1
+ CopyOf_Class1_2
\ No newline at end of file
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteWarningNotExisting_Test_Result.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteWarningNotExisting_Test_Result.txt
new file mode 100755
index 0000000..f58ea2a
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteWarningNotExisting_Test_Result.txt
@@ -0,0 +1,3 @@
+ Class1 aaaa
+ CopyOf_Class1_1
+ CopyOf_Class1_2 cccc
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteWarningNotExisting_Test_ToCopy.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteWarningNotExisting_Test_ToCopy.txt
new file mode 100755
index 0000000..b2b4754
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_overwrite/PasteRowsOverwriteWarningNotExisting_Test_ToCopy.txt
@@ -0,0 +1,4 @@
+ Class1 aaaa
+ Class2 bbbb
+ CopyOf_Class1_2 cccc
+
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_tests/without_service_edit/bug443814/Bug443814_Enumeration.di b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_tests/without_service_edit/bug443814/Bug443814_Enumeration.di
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_tests/without_service_edit/bug443814/Bug443814_Enumeration.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_tests/without_service_edit/bug443814/Bug443814_Enumeration.notation b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_tests/without_service_edit/bug443814/Bug443814_Enumeration.notation
new file mode 100755
index 0000000..0f30191
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_tests/without_service_edit/bug443814/Bug443814_Enumeration.notation
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nattable:Table xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:nattable="http://www.eclipse.org/papyrus/nattable/model" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis http://www.eclipse.org/papyrus/nattable/model#//nattableaxis http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model#//nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableconfiguration" xmi:id="_R7nlIIFBEeSi2cK0RxwHRg" name="RequirementTable0" currentRowAxisProvider="_R7nlJYFBEeSi2cK0RxwHRg" currentColumnAxisProvider="_R7nlIYFBEeSi2cK0RxwHRg">
+ <context xmi:type="uml:Model" href="Bug443814_Enumeration.uml#_OHyHIIFBEeSi2cK0RxwHRg"/>
+ <owner xmi:type="uml:Model" href="Bug443814_Enumeration.uml#_OHyHIIFBEeSi2cK0RxwHRg"/>
+ <prototype xmi:type="configuration:PapyrusSyncTable" href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wNb3txhEeOqHvRyiN87hA"/>
+ <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#/"/>
+ <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_R7nlIYFBEeSi2cK0RxwHRg" description="Provides the columns of the tables with a default configuration" name="Requirements Feature Columns Provider">
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_R7nlIoFBEeSi2cK0RxwHRg" element="property_of_stereotype:/SysML::Requirements::Requirement::id">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_R7nlI4FBEeSi2cK0RxwHRg">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_R7nlJIFBEeSi2cK0RxwHRg" element="property_of_stereotype:/SysML::Requirements::Requirement::text">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_Xd7XIIFBEeSi2cK0RxwHRg" element="property_of_stereotype:/profile::Task::p">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_Y9QukIHTEeSQAc7KMA100g" element="property_of_stereotype:/profile::Task::color">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_XHpJYIHWEeSQAc7KMA100g">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/visibility"/>
+ </axis>
+ </columnAxisProvidersHistory>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_R7nlJYFBEeSi2cK0RxwHRg" description="Provides the requirements directly owned by the context of the table" name="Requirement Axis Provider" disconnectSlave="true"/>
+</nattable:Table>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_tests/without_service_edit/bug443814/Bug443814_Enumeration.txt b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_tests/without_service_edit/bug443814/Bug443814_Enumeration.txt
new file mode 100755
index 0000000..80690c5
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_tests/without_service_edit/bug443814/Bug443814_Enumeration.txt
@@ -0,0 +1,3 @@
+id1 Requirement1 text1 hight black public
+id2 Requirement2 text2 medium red protected
+id3 Requirement3 text3 low blue private
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_tests/without_service_edit/bug443814/Bug443814_Enumeration.uml b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_tests/without_service_edit/bug443814/Bug443814_Enumeration.uml
new file mode 100755
index 0000000..772f512
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_tests/without_service_edit/bug443814/Bug443814_Enumeration.uml
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Requirements="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:profile="http:///schemas/profile/_dymLAIQyEeSqaqLwsIy0SA/0" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements http:///schemas/profile/_dymLAIQyEeSqaqLwsIy0SA/0 model.profile.uml#_dymLAoQyEeSqaqLwsIy0SA">
+ <uml:Model xmi:id="_OHyHIIFBEeSi2cK0RxwHRg" name="SysMLmodel">
+ <packagedElement xmi:type="uml:Class" xmi:id="_ZofKMIFBEeSi2cK0RxwHRg" name="RequirementTest" visibility="protected"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_ORWS0IFBEeSi2cK0RxwHRg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_ORYvEIFBEeSi2cK0RxwHRg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_TZ_nULU5EduiKqCzJMWbGw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_ORbyYIFBEeSi2cK0RxwHRg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_ORbyYYFBEeSi2cK0RxwHRg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_ORcZcIFBEeSi2cK0RxwHRg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_ORdAgIFBEeSi2cK0RxwHRg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_ORdAgYFBEeSi2cK0RxwHRg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_ORdnkIFBEeSi2cK0RxwHRg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_OReOoIFBEeSi2cK0RxwHRg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_OReOoYFBEeSi2cK0RxwHRg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_5WYJ0LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_ORe1sIFBEeSi2cK0RxwHRg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_ORe1sYFBEeSi2cK0RxwHRg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//activities"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_C2zXMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_ORfcwIFBEeSi2cK0RxwHRg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_ORfcwYFBEeSi2cK0RxwHRg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_ORgD0IFBEeSi2cK0RxwHRg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_ORgD0YFBEeSi2cK0RxwHRg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_ORgq4IFBEeSi2cK0RxwHRg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_ORhR8IFBEeSi2cK0RxwHRg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//interactions"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_meOioLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_ORh5AIFBEeSi2cK0RxwHRg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_ORh5AYFBEeSi2cK0RxwHRg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//statemachines"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_nAF5kLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_ORigEIFBEeSi2cK0RxwHRg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_ORjHIIFBEeSi2cK0RxwHRg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//usecases"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_neZmMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_Uhs2kIFBEeSi2cK0RxwHRg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_WiO2kIHTEeSQAc7KMA100g" source="PapyrusVersion">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_WiO2kYHTEeSQAc7KMA100g" key="Version" value="0.0.3"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_WiO2koHTEeSQAc7KMA100g" key="Comment" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_WiO2k4HTEeSQAc7KMA100g" key="Copyright" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_WiO2lIHTEeSQAc7KMA100g" key="Date" value="2014-12-12"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_WiO2lYHTEeSQAc7KMA100g" key="Author" value=""/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_UiMl0IFBEeSi2cK0RxwHRg" source="PapyrusVersion">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_UiMl0YFBEeSi2cK0RxwHRg" key="Version" value="0.0.1"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_UiMl0oFBEeSi2cK0RxwHRg" key="Comment" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_UiMl04FBEeSi2cK0RxwHRg" key="Copyright" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_UiMl1IFBEeSi2cK0RxwHRg" key="Date" value="2014-12-11"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_UiMl1YFBEeSi2cK0RxwHRg" key="Author" value=""/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_UiLXsIFBEeSi2cK0RxwHRg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="model.profile.uml#_dymLAoQyEeSqaqLwsIy0SA"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="model.profile.uml#_x_EI8IFAEeSi2cK0RxwHRg"/>
+ </profileApplication>
+ </uml:Model>
+ <Requirements:Requirement xmi:id="_ZoyFIIFBEeSi2cK0RxwHRg" id="" base_Class="_ZofKMIFBEeSi2cK0RxwHRg"/>
+ <profile:Task xmi:id="_jGGE8IQyEeSqaqLwsIy0SA" base_Class="_ZofKMIFBEeSi2cK0RxwHRg" p="medium" color="red"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_tests/without_service_edit/bug443814/library.di b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_tests/without_service_edit/bug443814/library.di
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_tests/without_service_edit/bug443814/library.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_tests/without_service_edit/bug443814/library.notation b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_tests/without_service_edit/bug443814/library.notation
new file mode 100755
index 0000000..c00ad3d
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_tests/without_service_edit/bug443814/library.notation
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/viewpoints/policy/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_AjOooIHTEeSQAc7KMA100g" type="PapyrusUMLClassDiagram" name="NewDiagram" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_B7h4UIHTEeSQAc7KMA100g" type="2006">
+ <children xmi:type="notation:DecorationNode" xmi:id="_B7p0IIHTEeSQAc7KMA100g" type="5023"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_B7p0IYHTEeSQAc7KMA100g" type="7015">
+ <children xmi:type="notation:Shape" xmi:id="_F7_dEIHTEeSQAc7KMA100g" type="3017">
+ <element xmi:type="uml:EnumerationLiteral" href="library.uml#_F73hQIHTEeSQAc7KMA100g"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_F7_dEYHTEeSQAc7KMA100g"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_Gu_AQIHTEeSQAc7KMA100g" type="3017">
+ <element xmi:type="uml:EnumerationLiteral" href="library.uml#_Gu9yIIHTEeSQAc7KMA100g"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_Gu_AQYHTEeSQAc7KMA100g"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_HVC6sIHTEeSQAc7KMA100g" type="3017">
+ <element xmi:type="uml:EnumerationLiteral" href="library.uml#_HVBskIHTEeSQAc7KMA100g"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_HVC6sYHTEeSQAc7KMA100g"/>
+ </children>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_B7p0IoHTEeSQAc7KMA100g"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_B7p0I4HTEeSQAc7KMA100g"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_B7p0JIHTEeSQAc7KMA100g"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_B7p0JYHTEeSQAc7KMA100g"/>
+ </children>
+ <element xmi:type="uml:Enumeration" href="library.uml#_B49sgIHTEeSQAc7KMA100g"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_B7h4UYHTEeSQAc7KMA100g" x="194" y="38" width="480" height="299"/>
+ </children>
+ <styles xmi:type="notation:StringValueStyle" xmi:id="_AjOooYHTEeSQAc7KMA100g" name="diagram_compatibility_version" stringValue="1.0.0"/>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_AjOoooHTEeSQAc7KMA100g"/>
+ <styles xmi:type="style:PapyrusViewStyle" xmi:id="_AjOoo4HTEeSQAc7KMA100g">
+ <owner xmi:type="uml:Model" href="library.uml#_AipZ0IHTEeSQAc7KMA100g"/>
+ </styles>
+ <element xmi:type="uml:Model" href="library.uml#_AipZ0IHTEeSQAc7KMA100g"/>
+</notation:Diagram>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_tests/without_service_edit/bug443814/library.uml b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_tests/without_service_edit/bug443814/library.uml
new file mode 100755
index 0000000..e2de8b7
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_tests/without_service_edit/bug443814/library.uml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_AipZ0IHTEeSQAc7KMA100g" name="model">
+ <packagedElement xmi:type="uml:Enumeration" xmi:id="_B49sgIHTEeSQAc7KMA100g" name="Color">
+ <ownedLiteral xmi:id="_F73hQIHTEeSQAc7KMA100g" name="black"/>
+ <ownedLiteral xmi:id="_Gu9yIIHTEeSQAc7KMA100g" name="red"/>
+ <ownedLiteral xmi:id="_HVBskIHTEeSQAc7KMA100g" name="blue"/>
+ </packagedElement>
+</uml:Model>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_tests/without_service_edit/bug443814/model.profile.di b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_tests/without_service_edit/bug443814/model.profile.di
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_tests/without_service_edit/bug443814/model.profile.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_tests/without_service_edit/bug443814/model.profile.notation b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_tests/without_service_edit/bug443814/model.profile.notation
new file mode 100755
index 0000000..b461db8
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_tests/without_service_edit/bug443814/model.profile.notation
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/viewpoints/policy/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_yC-YkIFAEeSi2cK0RxwHRg" type="PapyrusUMLProfileDiagram" name="NewDiagram" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_2buhgIFAEeSi2cK0RxwHRg" type="1031">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_2cMbkIFAEeSi2cK0RxwHRg" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_2cNCoIFAEeSi2cK0RxwHRg" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_2cNCoYFAEeSi2cK0RxwHRg" key="StereotypeList" value="StandardProfile::Metaclass"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_2cNCooFAEeSi2cK0RxwHRg" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_2cNpsIFAEeSi2cK0RxwHRg" key="PropStereoDisplay" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_2cNpsYFAEeSi2cK0RxwHRg" key="StereotypePropertyLocation" value="Compartment"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_2cCqkIFAEeSi2cK0RxwHRg" type="1084"/>
+ <element xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_2cDRoIFAEeSi2cK0RxwHRg" x="595" y="333"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_3AxIQIFAEeSi2cK0RxwHRg" type="1026">
+ <children xmi:type="notation:DecorationNode" xmi:id="_3AxvUIFAEeSi2cK0RxwHRg" type="1034"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_3A1ZsIFAEeSi2cK0RxwHRg" type="1071">
+ <children xmi:type="notation:Node" xmi:id="_GsO7kIFBEeSi2cK0RxwHRg" type="3002">
+ <element xmi:type="uml:Property" href="model.profile.uml#_GrzdwIFBEeSi2cK0RxwHRg"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_GsO7kYFBEeSi2cK0RxwHRg"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_SNfq8IHTEeSQAc7KMA100g" type="3002">
+ <element xmi:type="uml:Property" href="model.profile.uml#_SNKTwIHTEeSQAc7KMA100g"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_SNfq8YHTEeSQAc7KMA100g"/>
+ </children>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_3A1ZsYFAEeSi2cK0RxwHRg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_3A1ZsoFAEeSi2cK0RxwHRg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_3A1Zs4FAEeSi2cK0RxwHRg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_3A1ZtIFAEeSi2cK0RxwHRg"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_3A2n0IFAEeSi2cK0RxwHRg" type="1019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_3A2n0YFAEeSi2cK0RxwHRg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_3A2n0oFAEeSi2cK0RxwHRg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_3A2n04FAEeSi2cK0RxwHRg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_3A2n1IFAEeSi2cK0RxwHRg"/>
+ </children>
+ <element xmi:type="uml:Stereotype" href="model.profile.uml#_2_8B0IFAEeSi2cK0RxwHRg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_3AxIQYFAEeSi2cK0RxwHRg" x="341" y="568"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_6uYCcIFAEeSi2cK0RxwHRg" type="2006">
+ <children xmi:type="notation:DecorationNode" xmi:id="_6uYpgIFAEeSi2cK0RxwHRg" type="5023"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_6uYpgYFAEeSi2cK0RxwHRg" type="1063">
+ <children xmi:type="notation:Node" xmi:id="_CuTtcIFBEeSi2cK0RxwHRg" type="1037">
+ <element xmi:type="uml:EnumerationLiteral" href="model.profile.uml#_CuQqIIFBEeSi2cK0RxwHRg"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_CuTtcYFBEeSi2cK0RxwHRg"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_DsDIEIFBEeSi2cK0RxwHRg" type="1037">
+ <element xmi:type="uml:EnumerationLiteral" href="model.profile.uml#_DsBS4IFBEeSi2cK0RxwHRg"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_DsDIEYFBEeSi2cK0RxwHRg"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_EZVr4IFBEeSi2cK0RxwHRg" type="1037">
+ <element xmi:type="uml:EnumerationLiteral" href="model.profile.uml#_EZT2sIFBEeSi2cK0RxwHRg"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_EZVr4YFBEeSi2cK0RxwHRg"/>
+ </children>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_6uYpgoFAEeSi2cK0RxwHRg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_6uYpg4FAEeSi2cK0RxwHRg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_6uYphIFAEeSi2cK0RxwHRg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_6uYphYFAEeSi2cK0RxwHRg"/>
+ </children>
+ <element xmi:type="uml:Enumeration" href="model.profile.uml#_6rwMQIFAEeSi2cK0RxwHRg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_6uYCcYFAEeSi2cK0RxwHRg" x="903" y="428" width="346" height="240"/>
+ </children>
+ <styles xmi:type="notation:StringValueStyle" xmi:id="_yC-YkYFAEeSi2cK0RxwHRg" name="diagram_compatibility_version" stringValue="1.0.0"/>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_yC-YkoFAEeSi2cK0RxwHRg"/>
+ <styles xmi:type="style:PapyrusViewStyle" xmi:id="_yC-Yk4FAEeSi2cK0RxwHRg">
+ <owner xmi:type="uml:Profile" href="model.profile.uml#_x_EI8IFAEeSi2cK0RxwHRg"/>
+ </styles>
+ <element xmi:type="uml:Profile" href="model.profile.uml#_x_EI8IFAEeSi2cK0RxwHRg"/>
+ <edges xmi:type="notation:Connector" xmi:id="_3qurQIFAEeSi2cK0RxwHRg" type="1013" source="_3AxIQIFAEeSi2cK0RxwHRg" target="_2buhgIFAEeSi2cK0RxwHRg">
+ <styles xmi:type="notation:FontStyle" xmi:id="_3qurQYFAEeSi2cK0RxwHRg"/>
+ <element xmi:type="uml:Extension" href="model.profile.uml#_3qgBwIFAEeSi2cK0RxwHRg"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_3qurQoFAEeSi2cK0RxwHRg" points="[17, -14, -253, 213]$[277, -202, 7, 25]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_3ranwIFAEeSi2cK0RxwHRg" id="(0.4016393442622951,0.0)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_RHVZUIQyEeSqaqLwsIy0SA" id="(0.16,1.0)"/>
+ </edges>
+</notation:Diagram>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_tests/without_service_edit/bug443814/model.profile.uml b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_tests/without_service_edit/bug443814/model.profile.uml
new file mode 100755
index 0000000..17ef675
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/paste_tests/without_service_edit/bug443814/model.profile.uml
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Profile xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_x_EI8IFAEeSi2cK0RxwHRg" name="profile" metaclassReference="_2ba_gIFAEeSi2cK0RxwHRg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_dymLAYQyEeSqaqLwsIy0SA" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <contents xmi:type="ecore:EPackage" xmi:id="_dymLAoQyEeSqaqLwsIy0SA" name="profile" nsURI="http:///schemas/profile/_dymLAIQyEeSqaqLwsIy0SA/0" nsPrefix="profile">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_dymLA4QyEeSqaqLwsIy0SA" source="http://www.eclipse.org/uml2/4.0.0/UML">
+ <references xmi:type="uml:Model" href="library.uml#_AipZ0IHTEeSQAc7KMA100g"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_dymLF4QyEeSqaqLwsIy0SA" source="PapyrusVersion">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_dymLGIQyEeSqaqLwsIy0SA" key="Version" value="0.0.1"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_dymLGYQyEeSqaqLwsIy0SA" key="Comment" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_dymLGoQyEeSqaqLwsIy0SA" key="Copyright" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_dymLG4QyEeSqaqLwsIy0SA" key="Date" value="2014-12-15"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_dymLHIQyEeSqaqLwsIy0SA" key="Author" value=""/>
+ </eAnnotations>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_dymLBIQyEeSqaqLwsIy0SA" name="Task">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_dymLBYQyEeSqaqLwsIy0SA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_2_8B0IFAEeSi2cK0RxwHRg"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_dymLBoQyEeSqaqLwsIy0SA" name="base_Class" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_dymLCIQyEeSqaqLwsIy0SA" name="p" ordered="false" lowerBound="1" eType="_dymLDIQyEeSqaqLwsIy0SA"/>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_dymLCoQyEeSqaqLwsIy0SA" name="color" ordered="false" lowerBound="1" eType="_dymLEYQyEeSqaqLwsIy0SA"/>
+ </eClassifiers>
+ <eClassifiers xmi:type="ecore:EEnum" xmi:id="_dymLDIQyEeSqaqLwsIy0SA" name="Priority">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_dymLDYQyEeSqaqLwsIy0SA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_6rwMQIFAEeSi2cK0RxwHRg"/>
+ <eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_dymLDoQyEeSqaqLwsIy0SA" name="hight"/>
+ <eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_dymLD4QyEeSqaqLwsIy0SA" name="medium" value="1"/>
+ <eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_dymLEIQyEeSqaqLwsIy0SA" name="low" value="2"/>
+ </eClassifiers>
+ <eClassifiers xmi:type="ecore:EEnum" xmi:id="_dymLEYQyEeSqaqLwsIy0SA" name="model_Color">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_dymLEoQyEeSqaqLwsIy0SA" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="uml:Enumeration" href="library.uml#_B49sgIHTEeSQAc7KMA100g"/>
+ </eAnnotations>
+ <eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_dymLE4QyEeSqaqLwsIy0SA" name="black"/>
+ <eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_dymLFIQyEeSqaqLwsIy0SA" name="red" value="1"/>
+ <eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_dymLFYQyEeSqaqLwsIy0SA" name="blue" value="2"/>
+ </eClassifiers>
+ </contents>
+ </eAnnotations>
+ <elementImport xmi:type="uml:ElementImport" xmi:id="_2ba_gIFAEeSi2cK0RxwHRg" alias="Class">
+ <importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
+ </elementImport>
+ <packageImport xmi:type="uml:PackageImport" xmi:id="_PfWpsIHTEeSQAc7KMA100g">
+ <importedPackage xmi:type="uml:Model" href="library.uml#_AipZ0IHTEeSQAc7KMA100g"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_2_8B0IFAEeSi2cK0RxwHRg" name="Task">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_3qfasIFAEeSi2cK0RxwHRg" name="base_Class" association="_3qgBwIFAEeSi2cK0RxwHRg">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_GrzdwIFBEeSi2cK0RxwHRg" name="p" type="_6rwMQIFAEeSi2cK0RxwHRg"/>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_SNKTwIHTEeSQAc7KMA100g" name="color">
+ <type xmi:type="uml:Enumeration" href="library.uml#_B49sgIHTEeSQAc7KMA100g"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_3qgBwIFAEeSi2cK0RxwHRg" name="E_Task_Class1" memberEnd="_3qgBwYFAEeSi2cK0RxwHRg _3qfasIFAEeSi2cK0RxwHRg">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_3qgBwYFAEeSi2cK0RxwHRg" name="extension_Task" type="_2_8B0IFAEeSi2cK0RxwHRg" aggregation="composite" association="_3qgBwIFAEeSi2cK0RxwHRg"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Enumeration" xmi:id="_6rwMQIFAEeSi2cK0RxwHRg" name="Priority">
+ <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_CuQqIIFBEeSi2cK0RxwHRg" name="hight"/>
+ <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_DsBS4IFBEeSi2cK0RxwHRg" name="medium"/>
+ <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_EZT2sIFBEeSi2cK0RxwHRg" name="low"/>
+ </packagedElement>
+</uml:Profile>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/revealSemanticModel.di b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/revealSemanticModel.di
new file mode 100755
index 0000000..e3239ea
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/revealSemanticModel.di
@@ -0,0 +1,222 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi" xmlns:org.eclipse.papyrus.infra.table.instance.papyrustableinstance="http://www.eclipse.org/Papyrus/Table/0.8.0/papyrustableinstance" xmlns:tableinstance="http://www.eclipse.org/EMF_Facet/ModelCellEditor/0.1.0/tableinstance" xmlns:tableinstance2="http://www.eclipse.org/EMF_Facet/Table/0.1.0/tableinstance2">
+ <di:SashWindowsMngr>
+ <pageList>
+ <availablePage>
+ <emfPageIdentifier href="revealSemanticModel.notation#_pBS2xAKOEeSZ5cZUOQKWkw"/>
+ </availablePage>
+ <availablePage>
+ <emfPageIdentifier href="revealSemanticModel.notation#_B7qCgAKPEeSZ5cZUOQKWkw"/>
+ </availablePage>
+ <availablePage>
+ <emfPageIdentifier href="revealSemanticModel.notation#_C2IGsAKPEeSZ5cZUOQKWkw"/>
+ </availablePage>
+ <availablePage>
+ <emfPageIdentifier href="revealSemanticModel.notation#_EGhXkAKPEeSZ5cZUOQKWkw"/>
+ </availablePage>
+ <availablePage>
+ <emfPageIdentifier href="revealSemanticModel.notation#_ffxOYAKUEeSZ5cZUOQKWkw"/>
+ </availablePage>
+ <availablePage emfPageIdentifier="/1"/>
+ <availablePage>
+ <emfPageIdentifier href="revealSemanticModel.notation#_ZfPQ8Av4EeSOiKqWiKPo8w"/>
+ </availablePage>
+ </pageList>
+ <sashModel currentSelection="/0/@sashModel/@windows.0/@children.0">
+ <windows>
+ <children xsi:type="di:TabFolder">
+ <children>
+ <emfPageIdentifier href="revealSemanticModel.notation#_pBS2xAKOEeSZ5cZUOQKWkw"/>
+ </children>
+ <children>
+ <emfPageIdentifier href="revealSemanticModel.notation#_B7qCgAKPEeSZ5cZUOQKWkw"/>
+ </children>
+ <children>
+ <emfPageIdentifier href="revealSemanticModel.notation#_EGhXkAKPEeSZ5cZUOQKWkw"/>
+ </children>
+ <children>
+ <emfPageIdentifier href="revealSemanticModel.notation#_C2IGsAKPEeSZ5cZUOQKWkw"/>
+ </children>
+ <children>
+ <emfPageIdentifier href="revealSemanticModel.notation#_ffxOYAKUEeSZ5cZUOQKWkw"/>
+ </children>
+ <children>
+ <emfPageIdentifier href="revealSemanticModel.notation#_ZfPQ8Av4EeSOiKqWiKPo8w"/>
+ </children>
+ </children>
+ </windows>
+ </sashModel>
+ </di:SashWindowsMngr>
+ <org.eclipse.papyrus.infra.table.instance.papyrustableinstance:PapyrusTableInstance name="DefaultTable" table="/2"/>
+ <tableinstance2:TableInstance2 description="Table Description">
+ <tableConfiguration href="platform:/plugin/org.eclipse.papyrus.uml.table.default/resources/default.tableconfiguration2#/"/>
+ <customizations href="emffacet:/customization/UMLPapyrusDefaultBrowserCustomization#/"/>
+ <customizations href="#/2/@localCustomizations.1"/>
+ <customizations href="#/2/@localCustomizations.0"/>
+ <context href="revealSemanticModel.uml#_o-VpUAKOEeSZ5cZUOQKWkw"/>
+ <columns xsi:type="tableinstance:DefaultLabelColumn"/>
+ <columns xsi:type="tableinstance:MetaClassColumn"/>
+ <columns xsi:type="tableinstance:EContainerColumn"/>
+ <columns xsi:type="tableinstance:ReferenceColumn">
+ <reference href="http://www.eclipse.org/emf/2002/Ecore#//EModelElement/eAnnotations"/>
+ </columns>
+ <columns xsi:type="tableinstance:ReferenceColumn">
+ <reference href="http://www.eclipse.org/uml2/4.0.0/UML#//Element/ownedComment"/>
+ </columns>
+ <columns xsi:type="tableinstance:ReferenceColumn">
+ <reference href="http://www.eclipse.org/uml2/4.0.0/UML#//Element/ownedElement"/>
+ </columns>
+ <columns xsi:type="tableinstance:ReferenceColumn">
+ <reference href="http://www.eclipse.org/uml2/4.0.0/UML#//Element/owner"/>
+ </columns>
+ <columns xsi:type="tableinstance:ReferenceColumn">
+ <reference href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/clientDependency"/>
+ </columns>
+ <columns xsi:type="tableinstance:AttributeColumn">
+ <attribute href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/name"/>
+ </columns>
+ <columns xsi:type="tableinstance:ReferenceColumn">
+ <reference href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/nameExpression"/>
+ </columns>
+ <columns xsi:type="tableinstance:ReferenceColumn">
+ <reference href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/namespace"/>
+ </columns>
+ <columns xsi:type="tableinstance:AttributeColumn">
+ <attribute href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/qualifiedName"/>
+ </columns>
+ <columns xsi:type="tableinstance:AttributeColumn">
+ <attribute href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/visibility"/>
+ </columns>
+ <columns xsi:type="tableinstance:AttributeColumn">
+ <attribute href="http://www.eclipse.org/uml2/4.0.0/UML#//RedefinableElement/isLeaf"/>
+ </columns>
+ <columns xsi:type="tableinstance:ReferenceColumn">
+ <reference href="http://www.eclipse.org/uml2/4.0.0/UML#//RedefinableElement/redefinedElement"/>
+ </columns>
+ <columns xsi:type="tableinstance:ReferenceColumn">
+ <reference href="http://www.eclipse.org/uml2/4.0.0/UML#//RedefinableElement/redefinitionContext"/>
+ </columns>
+ <columns xsi:type="tableinstance:ReferenceColumn">
+ <reference href="http://www.eclipse.org/uml2/4.0.0/UML#//Feature/featuringClassifier"/>
+ </columns>
+ <columns xsi:type="tableinstance:AttributeColumn">
+ <attribute href="http://www.eclipse.org/uml2/4.0.0/UML#//Feature/isStatic"/>
+ </columns>
+ <columns xsi:type="tableinstance:ReferenceColumn">
+ <reference href="http://www.eclipse.org/uml2/4.0.0/UML#//TypedElement/type"/>
+ </columns>
+ <columns xsi:type="tableinstance:AttributeColumn">
+ <attribute href="http://www.eclipse.org/uml2/4.0.0/UML#//MultiplicityElement/isOrdered"/>
+ </columns>
+ <columns xsi:type="tableinstance:AttributeColumn">
+ <attribute href="http://www.eclipse.org/uml2/4.0.0/UML#//MultiplicityElement/isUnique"/>
+ </columns>
+ <columns xsi:type="tableinstance:AttributeColumn">
+ <attribute href="http://www.eclipse.org/uml2/4.0.0/UML#//MultiplicityElement/lower"/>
+ </columns>
+ <columns xsi:type="tableinstance:ReferenceColumn">
+ <reference href="http://www.eclipse.org/uml2/4.0.0/UML#//MultiplicityElement/lowerValue"/>
+ </columns>
+ <columns xsi:type="tableinstance:AttributeColumn">
+ <attribute href="http://www.eclipse.org/uml2/4.0.0/UML#//MultiplicityElement/upper"/>
+ </columns>
+ <columns xsi:type="tableinstance:ReferenceColumn">
+ <reference href="http://www.eclipse.org/uml2/4.0.0/UML#//MultiplicityElement/upperValue"/>
+ </columns>
+ <columns xsi:type="tableinstance:AttributeColumn">
+ <attribute href="http://www.eclipse.org/uml2/4.0.0/UML#//StructuralFeature/isReadOnly"/>
+ </columns>
+ <columns xsi:type="tableinstance:ReferenceColumn">
+ <reference href="http://www.eclipse.org/uml2/4.0.0/UML#//ParameterableElement/owningTemplateParameter"/>
+ </columns>
+ <columns xsi:type="tableinstance:ReferenceColumn">
+ <reference href="http://www.eclipse.org/uml2/4.0.0/UML#//ParameterableElement/templateParameter"/>
+ </columns>
+ <columns xsi:type="tableinstance:ReferenceColumn">
+ <reference href="http://www.eclipse.org/uml2/4.0.0/UML#//ConnectableElement/end"/>
+ </columns>
+ <columns xsi:type="tableinstance:ReferenceColumn">
+ <reference href="http://www.eclipse.org/uml2/4.0.0/UML#//DeploymentTarget/deployedElement"/>
+ </columns>
+ <columns xsi:type="tableinstance:ReferenceColumn">
+ <reference href="http://www.eclipse.org/uml2/4.0.0/UML#//DeploymentTarget/deployment"/>
+ </columns>
+ <columns xsi:type="tableinstance:ReferenceColumn">
+ <reference href="http://www.eclipse.org/uml2/4.0.0/UML#//Property/interface"/>
+ </columns>
+ <columns xsi:type="tableinstance:ReferenceColumn">
+ <reference href="http://www.eclipse.org/uml2/4.0.0/UML#//Property/datatype"/>
+ </columns>
+ <columns xsi:type="tableinstance:AttributeColumn">
+ <attribute href="http://www.eclipse.org/uml2/4.0.0/UML#//Property/aggregation"/>
+ </columns>
+ <columns xsi:type="tableinstance:ReferenceColumn">
+ <reference href="http://www.eclipse.org/uml2/4.0.0/UML#//Property/associationEnd"/>
+ </columns>
+ <columns xsi:type="tableinstance:ReferenceColumn">
+ <reference href="http://www.eclipse.org/uml2/4.0.0/UML#//Property/qualifier"/>
+ </columns>
+ <columns xsi:type="tableinstance:ReferenceColumn">
+ <reference href="http://www.eclipse.org/uml2/4.0.0/UML#//Property/class"/>
+ </columns>
+ <columns xsi:type="tableinstance:AttributeColumn">
+ <attribute href="http://www.eclipse.org/uml2/4.0.0/UML#//Property/default"/>
+ </columns>
+ <columns xsi:type="tableinstance:ReferenceColumn">
+ <reference href="http://www.eclipse.org/uml2/4.0.0/UML#//Property/defaultValue"/>
+ </columns>
+ <columns xsi:type="tableinstance:AttributeColumn">
+ <attribute href="http://www.eclipse.org/uml2/4.0.0/UML#//Property/isComposite.1"/>
+ </columns>
+ <columns xsi:type="tableinstance:AttributeColumn">
+ <attribute href="http://www.eclipse.org/uml2/4.0.0/UML#//Property/isDerived"/>
+ </columns>
+ <columns xsi:type="tableinstance:AttributeColumn">
+ <attribute href="http://www.eclipse.org/uml2/4.0.0/UML#//Property/isDerivedUnion"/>
+ </columns>
+ <columns xsi:type="tableinstance:AttributeColumn">
+ <attribute href="http://www.eclipse.org/uml2/4.0.0/UML#//Property/isID"/>
+ </columns>
+ <columns xsi:type="tableinstance:ReferenceColumn">
+ <reference href="http://www.eclipse.org/uml2/4.0.0/UML#//Property/opposite"/>
+ </columns>
+ <columns xsi:type="tableinstance:ReferenceColumn">
+ <reference href="http://www.eclipse.org/uml2/4.0.0/UML#//Property/owningAssociation"/>
+ </columns>
+ <columns xsi:type="tableinstance:ReferenceColumn">
+ <reference href="http://www.eclipse.org/uml2/4.0.0/UML#//Property/redefinedProperty"/>
+ </columns>
+ <columns xsi:type="tableinstance:ReferenceColumn">
+ <reference href="http://www.eclipse.org/uml2/4.0.0/UML#//Property/subsettedProperty"/>
+ </columns>
+ <columns xsi:type="tableinstance:ReferenceColumn">
+ <reference href="http://www.eclipse.org/uml2/4.0.0/UML#//Property/association"/>
+ </columns>
+ <columns xsi:type="tableinstance:AttributeColumn">
+ <attribute href="http://www.eclipse.org/uml2/4.0.0/UML#//Port/isBehavior"/>
+ </columns>
+ <columns xsi:type="tableinstance:AttributeColumn">
+ <attribute href="http://www.eclipse.org/uml2/4.0.0/UML#//Port/isConjugated"/>
+ </columns>
+ <columns xsi:type="tableinstance:AttributeColumn">
+ <attribute href="http://www.eclipse.org/uml2/4.0.0/UML#//Port/isService"/>
+ </columns>
+ <columns xsi:type="tableinstance:ReferenceColumn">
+ <reference href="http://www.eclipse.org/uml2/4.0.0/UML#//Port/protocol"/>
+ </columns>
+ <columns xsi:type="tableinstance:ReferenceColumn">
+ <reference href="http://www.eclipse.org/uml2/4.0.0/UML#//Port/provided"/>
+ </columns>
+ <columns xsi:type="tableinstance:ReferenceColumn">
+ <reference href="http://www.eclipse.org/uml2/4.0.0/UML#//Port/redefinedPort"/>
+ </columns>
+ <columns xsi:type="tableinstance:ReferenceColumn">
+ <reference href="http://www.eclipse.org/uml2/4.0.0/UML#//Port/required"/>
+ </columns>
+ <rows height="168">
+ <element href="revealSemanticModel.uml#_mCmlAANfEeSV3fVidaLvSQ"/>
+ </rows>
+ <localCustomizations metamodelURI="http://www.eclipse.org/emf/2002/Ecore"/>
+ <localCustomizations metamodelURI="http://www.eclipse.org/uml2/4.0.0/UML"/>
+ </tableinstance2:TableInstance2>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/revealSemanticModel.notation b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/revealSemanticModel.notation
new file mode 100755
index 0000000..4371ce1
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/revealSemanticModel.notation
@@ -0,0 +1,1698 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Requirements="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:nattable="http://www.eclipse.org/papyrus/nattable/model" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis http://www.eclipse.org/papyrus/nattable/model#//nattableaxis http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model#//nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableconfiguration">
+ <notation:Diagram xmi:id="_pBS2xAKOEeSZ5cZUOQKWkw" type="RequirementDiagram" name="NewDiagram" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_q24fUQKOEeSZ5cZUOQKWkw" type="shape_sysml_requirement_as_classifier">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_q3EskAKOEeSZ5cZUOQKWkw" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_q5K-UQKOEeSZ5cZUOQKWkw" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_q5K-UgKOEeSZ5cZUOQKWkw" key="StereotypeList" value="SysML::Requirements::Requirement"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_q5K-UwKOEeSZ5cZUOQKWkw" key="Stereotype_Presentation_Kind" value="Compartment"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_q5K-VAKOEeSZ5cZUOQKWkw" key="PropStereoDisplay" value="SysML::Requirements::Requirement.id,SysML::Requirements::Requirement.text"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_q5K-VQKOEeSZ5cZUOQKWkw" key="StereotypePropertyLocation" value="Compartment"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_q24fUwKOEeSZ5cZUOQKWkw" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_q24fVAKOEeSZ5cZUOQKWkw" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_q24fVQKOEeSZ5cZUOQKWkw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_q24fVgKOEeSZ5cZUOQKWkw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_q24fVwKOEeSZ5cZUOQKWkw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_q24fWAKOEeSZ5cZUOQKWkw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_q24fWQKOEeSZ5cZUOQKWkw" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_q24fWgKOEeSZ5cZUOQKWkw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_q24fWwKOEeSZ5cZUOQKWkw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_q24fXAKOEeSZ5cZUOQKWkw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_q24fXQKOEeSZ5cZUOQKWkw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_q24fXgKOEeSZ5cZUOQKWkw" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_q24fXwKOEeSZ5cZUOQKWkw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_q24fYAKOEeSZ5cZUOQKWkw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_q24fYQKOEeSZ5cZUOQKWkw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_q24fYgKOEeSZ5cZUOQKWkw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_q24fYwKOEeSZ5cZUOQKWkw" type="compartment_sysml_requirement_idinfo_as_list">
+ <children xmi:type="notation:DecorationNode" xmi:id="_q24faAKOEeSZ5cZUOQKWkw" type="label_sysml_requirement_id"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_q24faQKOEeSZ5cZUOQKWkw" type="label_sysml_requirement_text"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_q24fZAKOEeSZ5cZUOQKWkw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_q24fZQKOEeSZ5cZUOQKWkw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_q24fZgKOEeSZ5cZUOQKWkw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_q24fZwKOEeSZ5cZUOQKWkw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_q2-l8AKOEeSZ5cZUOQKWkw" type="compartment_shape_display">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_q2-l8QKOEeSZ5cZUOQKWkw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_q2-l8gKOEeSZ5cZUOQKWkw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_q5K-VgKOEeSZ5cZUOQKWkw" type="AppliedStereotypeCompartement">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_q5RE8AKOEeSZ5cZUOQKWkw" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_q5RE8QKOEeSZ5cZUOQKWkw" key="visible" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_q5K-VwKOEeSZ5cZUOQKWkw" showTitle="true"/>
+ <element xmi:type="Requirements:Requirement" href="revealSemanticModel.uml#_q5K-UAKOEeSZ5cZUOQKWkw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_q5K-WAKOEeSZ5cZUOQKWkw"/>
+ </children>
+ <element xmi:type="uml:Class" href="revealSemanticModel.uml#_q24fUAKOEeSZ5cZUOQKWkw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_q24fUgKOEeSZ5cZUOQKWkw" x="565" y="11" width="132" height="137"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_tKOa8QKOEeSZ5cZUOQKWkw" type="2007">
+ <children xmi:type="notation:DecorationNode" xmi:id="_tKOa8wKOEeSZ5cZUOQKWkw" type="5026"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_tKOa9AKOEeSZ5cZUOQKWkw" type="7016">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_tKOa9QKOEeSZ5cZUOQKWkw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_tKOa9gKOEeSZ5cZUOQKWkw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_tKUhkAKOEeSZ5cZUOQKWkw" type="compartment_shape_display">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_tKUhkQKOEeSZ5cZUOQKWkw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_tKUhkgKOEeSZ5cZUOQKWkw"/>
+ </children>
+ <element xmi:type="uml:Package" href="revealSemanticModel.uml#_tKOa8AKOEeSZ5cZUOQKWkw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_tKOa8gKOEeSZ5cZUOQKWkw" x="12" y="18"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_wDVWEAKOEeSZ5cZUOQKWkw" type="shape_sysml_requirement_as_classifier">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_wDbcsAKOEeSZ5cZUOQKWkw" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_wDbcvAKOEeSZ5cZUOQKWkw" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_wDbcvQKOEeSZ5cZUOQKWkw" key="StereotypeList" value="SysML::Requirements::Requirement"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_wDbcvgKOEeSZ5cZUOQKWkw" key="Stereotype_Presentation_Kind" value="Compartment"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_wDbcvwKOEeSZ5cZUOQKWkw" key="PropStereoDisplay" value="SysML::Requirements::Requirement.id,SysML::Requirements::Requirement.text"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_wDbcwAKOEeSZ5cZUOQKWkw" key="StereotypePropertyLocation" value="Compartment"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_wDVWEgKOEeSZ5cZUOQKWkw" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_wDVWEwKOEeSZ5cZUOQKWkw" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_wDVWFAKOEeSZ5cZUOQKWkw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_wDVWFQKOEeSZ5cZUOQKWkw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_wDVWFgKOEeSZ5cZUOQKWkw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_wDVWFwKOEeSZ5cZUOQKWkw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_wDVWGAKOEeSZ5cZUOQKWkw" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_wDVWGQKOEeSZ5cZUOQKWkw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_wDVWGgKOEeSZ5cZUOQKWkw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_wDVWGwKOEeSZ5cZUOQKWkw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_wDVWHAKOEeSZ5cZUOQKWkw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_wDVWHQKOEeSZ5cZUOQKWkw" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_wDVWHgKOEeSZ5cZUOQKWkw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_wDVWHwKOEeSZ5cZUOQKWkw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_wDVWIAKOEeSZ5cZUOQKWkw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_wDVWIQKOEeSZ5cZUOQKWkw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_wDVWIgKOEeSZ5cZUOQKWkw" type="compartment_sysml_requirement_idinfo_as_list">
+ <children xmi:type="notation:DecorationNode" xmi:id="_wDVWJwKOEeSZ5cZUOQKWkw" type="label_sysml_requirement_id"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_wDVWKAKOEeSZ5cZUOQKWkw" type="label_sysml_requirement_text"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_wDVWIwKOEeSZ5cZUOQKWkw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_wDVWJAKOEeSZ5cZUOQKWkw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_wDVWJQKOEeSZ5cZUOQKWkw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_wDVWJgKOEeSZ5cZUOQKWkw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_wDVWKQKOEeSZ5cZUOQKWkw" type="compartment_shape_display">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_wDVWKgKOEeSZ5cZUOQKWkw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_wDVWKwKOEeSZ5cZUOQKWkw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_wDbcwQKOEeSZ5cZUOQKWkw" type="AppliedStereotypeCompartement">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_wDhjUAKOEeSZ5cZUOQKWkw" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_wDhjUQKOEeSZ5cZUOQKWkw" key="visible" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_wDbcwgKOEeSZ5cZUOQKWkw" showTitle="true"/>
+ <element xmi:type="Requirements:Requirement" href="revealSemanticModel.uml#_wDbcuwKOEeSZ5cZUOQKWkw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_wDbcwwKOEeSZ5cZUOQKWkw"/>
+ </children>
+ <element xmi:type="uml:Class" href="revealSemanticModel.uml#_wDPPcAKOEeSZ5cZUOQKWkw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_wDVWEQKOEeSZ5cZUOQKWkw" x="297" y="19" width="143"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_xF_s8QKOEeSZ5cZUOQKWkw" type="shape_sysml_requirement_as_classifier">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_xGL6MAKOEeSZ5cZUOQKWkw" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_xGSA0QKOEeSZ5cZUOQKWkw" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_xGSA0gKOEeSZ5cZUOQKWkw" key="StereotypeList" value="SysML::Requirements::Requirement"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_xGSA0wKOEeSZ5cZUOQKWkw" key="Stereotype_Presentation_Kind" value="Compartment"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_xGSA1AKOEeSZ5cZUOQKWkw" key="PropStereoDisplay" value="SysML::Requirements::Requirement.id,SysML::Requirements::Requirement.text"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_xGSA1QKOEeSZ5cZUOQKWkw" key="StereotypePropertyLocation" value="Compartment"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_xF_s8wKOEeSZ5cZUOQKWkw" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_xF_s9AKOEeSZ5cZUOQKWkw" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_xF_s9QKOEeSZ5cZUOQKWkw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_xF_s9gKOEeSZ5cZUOQKWkw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_xF_s9wKOEeSZ5cZUOQKWkw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_xF_s-AKOEeSZ5cZUOQKWkw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_xF_s-QKOEeSZ5cZUOQKWkw" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_xF_s-gKOEeSZ5cZUOQKWkw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_xF_s-wKOEeSZ5cZUOQKWkw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_xF_s_AKOEeSZ5cZUOQKWkw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_xF_s_QKOEeSZ5cZUOQKWkw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_xF_s_gKOEeSZ5cZUOQKWkw" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_xF_s_wKOEeSZ5cZUOQKWkw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_xF_tAAKOEeSZ5cZUOQKWkw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_xF_tAQKOEeSZ5cZUOQKWkw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_xF_tAgKOEeSZ5cZUOQKWkw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_xF_tAwKOEeSZ5cZUOQKWkw" type="compartment_sysml_requirement_idinfo_as_list">
+ <children xmi:type="notation:DecorationNode" xmi:id="_xF_tCAKOEeSZ5cZUOQKWkw" type="label_sysml_requirement_id"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_xF_tCQKOEeSZ5cZUOQKWkw" type="label_sysml_requirement_text"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_xF_tBAKOEeSZ5cZUOQKWkw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_xF_tBQKOEeSZ5cZUOQKWkw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_xF_tBgKOEeSZ5cZUOQKWkw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_xF_tBwKOEeSZ5cZUOQKWkw"/>
+ </children>
+ <element xmi:type="uml:Class" href="revealSemanticModel.uml#_xF_s8AKOEeSZ5cZUOQKWkw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_xF_s8gKOEeSZ5cZUOQKWkw" x="658" y="217" width="119"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_yZofEQKOEeSZ5cZUOQKWkw" type="shape_sysml_requirement_as_classifier">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_yZ0sUAKOEeSZ5cZUOQKWkw" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_yZ6y8QKOEeSZ5cZUOQKWkw" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_yZ6y8gKOEeSZ5cZUOQKWkw" key="StereotypeList" value="SysML::Requirements::Requirement"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_yZ6y8wKOEeSZ5cZUOQKWkw" key="Stereotype_Presentation_Kind" value="Compartment"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_yZ6y9AKOEeSZ5cZUOQKWkw" key="PropStereoDisplay" value="SysML::Requirements::Requirement.id,SysML::Requirements::Requirement.text"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_yZ6y9QKOEeSZ5cZUOQKWkw" key="StereotypePropertyLocation" value="Compartment"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_yZofEwKOEeSZ5cZUOQKWkw" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_yZofFAKOEeSZ5cZUOQKWkw" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_yZofFQKOEeSZ5cZUOQKWkw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_yZofFgKOEeSZ5cZUOQKWkw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_yZofFwKOEeSZ5cZUOQKWkw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_yZofGAKOEeSZ5cZUOQKWkw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_yZofGQKOEeSZ5cZUOQKWkw" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_yZofGgKOEeSZ5cZUOQKWkw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_yZofGwKOEeSZ5cZUOQKWkw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_yZofHAKOEeSZ5cZUOQKWkw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_yZofHQKOEeSZ5cZUOQKWkw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_yZofHgKOEeSZ5cZUOQKWkw" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_yZofHwKOEeSZ5cZUOQKWkw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_yZofIAKOEeSZ5cZUOQKWkw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_yZofIQKOEeSZ5cZUOQKWkw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_yZofIgKOEeSZ5cZUOQKWkw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_yZofIwKOEeSZ5cZUOQKWkw" type="compartment_sysml_requirement_idinfo_as_list">
+ <children xmi:type="notation:DecorationNode" xmi:id="_yZofKAKOEeSZ5cZUOQKWkw" type="label_sysml_requirement_id"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_yZofKQKOEeSZ5cZUOQKWkw" type="label_sysml_requirement_text"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_yZofJAKOEeSZ5cZUOQKWkw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_yZofJQKOEeSZ5cZUOQKWkw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_yZofJgKOEeSZ5cZUOQKWkw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_yZofJwKOEeSZ5cZUOQKWkw"/>
+ </children>
+ <element xmi:type="uml:Class" href="revealSemanticModel.uml#_yZofEAKOEeSZ5cZUOQKWkw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_yZofEgKOEeSZ5cZUOQKWkw" x="478" y="218" width="147"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_mDXlcAwwEeSc2dWiwYQWHA" type="shape_sysml_requirement_as_classifier">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_mDjysAwwEeSc2dWiwYQWHA" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_mDv_8AwwEeSc2dWiwYQWHA" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_mDv_8QwwEeSc2dWiwYQWHA" key="StereotypeList" value="SysML::Requirements::Requirement"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_mDv_8gwwEeSc2dWiwYQWHA" key="Stereotype_Presentation_Kind" value="Compartment"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_mDv_8wwwEeSc2dWiwYQWHA" key="PropStereoDisplay" value="SysML::Requirements::Requirement.id,SysML::Requirements::Requirement.text"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_mDv_9AwwEeSc2dWiwYQWHA" key="StereotypePropertyLocation" value="Compartment"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_mDXlcgwwEeSc2dWiwYQWHA" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_mDXlcwwwEeSc2dWiwYQWHA" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_mDXldAwwEeSc2dWiwYQWHA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_mDXldQwwEeSc2dWiwYQWHA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_mDXldgwwEeSc2dWiwYQWHA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_mDXldwwwEeSc2dWiwYQWHA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_mDXleAwwEeSc2dWiwYQWHA" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_mDXleQwwEeSc2dWiwYQWHA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_mDXlegwwEeSc2dWiwYQWHA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_mDXlewwwEeSc2dWiwYQWHA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_mDXlfAwwEeSc2dWiwYQWHA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_mDXlfQwwEeSc2dWiwYQWHA" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_mDXlfgwwEeSc2dWiwYQWHA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_mDXlfwwwEeSc2dWiwYQWHA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_mDXlgAwwEeSc2dWiwYQWHA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_mDXlgQwwEeSc2dWiwYQWHA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_mDXlggwwEeSc2dWiwYQWHA" type="compartment_sysml_requirement_idinfo_as_list">
+ <children xmi:type="notation:DecorationNode" xmi:id="_mDdsEAwwEeSc2dWiwYQWHA" type="label_sysml_requirement_id"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_mDdsEQwwEeSc2dWiwYQWHA" type="label_sysml_requirement_text"/>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_mDXlgwwwEeSc2dWiwYQWHA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_mDXlhAwwEeSc2dWiwYQWHA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_mDXlhQwwEeSc2dWiwYQWHA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_mDXlhgwwEeSc2dWiwYQWHA"/>
+ </children>
+ <element xmi:type="uml:Class" href="revealSemanticModel.uml#_mDRe0AwwEeSc2dWiwYQWHA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_mDXlcQwwEeSc2dWiwYQWHA" x="304" y="217"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_pBS2xQKOEeSZ5cZUOQKWkw"/>
+ <element xmi:type="uml:Model" href="revealSemanticModel.uml#_o-VpUAKOEeSZ5cZUOQKWkw"/>
+ </notation:Diagram>
+ <nattable:Table xmi:id="_B7qCgAKPEeSZ5cZUOQKWkw" name="GenericTable0" currentRowAxisProvider="_B7qCggKPEeSZ5cZUOQKWkw" currentColumnAxisProvider="_B7qCgQKPEeSZ5cZUOQKWkw">
+ <context xmi:type="uml:Model" href="revealSemanticModel.uml#_o-VpUAKOEeSZ5cZUOQKWkw"/>
+ <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#/"/>
+ <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_B7qCgQKPEeSZ5cZUOQKWkw" description="This axis provider provides available columns according to the rows of the table (features of the object displayed on the other axis)" name="UML Feature axis provider">
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQIgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/attribute"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyAgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/attribute"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjIgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/attribute"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaXwgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/attribute"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQLwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//BehavioredClassifier/classifierBehavior"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyDwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//BehavioredClassifier/classifierBehavior"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjLwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//BehavioredClassifier/classifierBehavior"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaXzwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//BehavioredClassifier/classifierBehavior"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQKQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/clientDependency"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyCQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/clientDependency"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjKQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/clientDependency"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JvzUSgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/clientDependency"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaXyQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/clientDependency"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_Keb76gKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/clientDependency"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQJwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/collaborationUse"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyBwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/collaborationUse"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjJwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/collaborationUse"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaXxwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/collaborationUse"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_JFXQVQKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::derived">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_JWbyNQKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::derived">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_JjNpwQKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::derived">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_KMgeYQKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::derived">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_JFXQXAKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::derivedFrom">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_JWbyPAKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::derivedFrom">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_JjNpyAKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::derivedFrom">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_KMgeaAKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::derivedFrom">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQSgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/elementImport"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyKgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/elementImport"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjSgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/elementImport"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JvzUVAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/elementImport"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX6gKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/elementImport"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_Keb79AKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/elementImport"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQRQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class/extension"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyJQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class/extension"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjRQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class/extension"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX5QKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class/extension"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQMAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/feature"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyEAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/feature"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjMAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/feature"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX0AKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/feature"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQPQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/general"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyHQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/general"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjPQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/general"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX3QKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/general"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQQgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/generalization"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyIgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/generalization"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjQgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/generalization"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX4gKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/generalization"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_JFXQVwKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::id">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_JWbyNwKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::id">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_JjNpwwKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::id">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_KMgeYwKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::id">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQRAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/importedMember"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyJAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/importedMember"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjRAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/importedMember"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JvzUSwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/importedMember"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX5AKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/importedMember"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_Keb76wKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/importedMember"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQSwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/inheritedMember"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyKwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/inheritedMember"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjSwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/inheritedMember"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX6wKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/inheritedMember"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQJAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//BehavioredClassifier/interfaceRealization"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyBAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//BehavioredClassifier/interfaceRealization"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjJAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//BehavioredClassifier/interfaceRealization"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaXxAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//BehavioredClassifier/interfaceRealization"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQKwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/isAbstract"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyCwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/isAbstract"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjKwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/isAbstract"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaXywKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/isAbstract"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQQAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class/isActive"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyIAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class/isActive"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjQAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class/isActive"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX4AKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class/isActive"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQKAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/isFinalSpecialization"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyCAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/isFinalSpecialization"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjKAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/isFinalSpecialization"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaXyAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/isFinalSpecialization"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQMgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//RedefinableElement/isLeaf"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyEgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//RedefinableElement/isLeaf"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjMgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//RedefinableElement/isLeaf"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX0gKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//RedefinableElement/isLeaf"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_JFXQWgKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::master">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_JWbyOgKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::master">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_JjNpxgKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::master">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_KMgeZgKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::master">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQSQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/member"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyKQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/member"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjSQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/member"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JvzUUQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/member"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX6QKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/member"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_Keb78QKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/member"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQUgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyMgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjUgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JvzUWwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX8gKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_Keb7-wKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQJgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/nameExpression"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyBgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/nameExpression"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjJgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/nameExpression"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JvzURQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/nameExpression"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaXxgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/nameExpression"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_Keb75QKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/nameExpression"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQPgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/namespace"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyHgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/namespace"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjPgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/namespace"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JvzUQwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/namespace"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX3gKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/namespace"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_Keb74gKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/namespace"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQTwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class/nestedClassifier"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyLwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class/nestedClassifier"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjTwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class/nestedClassifier"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX7wKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class/nestedClassifier"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JvzURgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Package/nestedPackage"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_Keb75gKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Package/nestedPackage"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JvzUSAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Package/nestingPackage"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_Keb76AKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Package/nestingPackage"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQIwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//StructuredClassifier/ownedAttribute"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyAwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//StructuredClassifier/ownedAttribute"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjIwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//StructuredClassifier/ownedAttribute"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaXwwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//StructuredClassifier/ownedAttribute"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaXygKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//BehavioredClassifier/ownedBehavior"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQKgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//BehavioredClassifier/ownedBehavior"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyCgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//BehavioredClassifier/ownedBehavior"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjKgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//BehavioredClassifier/ownedBehavior"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQJQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Element/ownedComment"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyBQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Element/ownedComment"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjJQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Element/ownedComment"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JvzURAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Element/ownedComment"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaXxQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Element/ownedComment"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_Keb74wKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Element/ownedComment"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQOwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//StructuredClassifier/ownedConnector"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyGwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//StructuredClassifier/ownedConnector"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjOwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//StructuredClassifier/ownedConnector"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX2wKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//StructuredClassifier/ownedConnector"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQIQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Element/ownedElement"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyAQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Element/ownedElement"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjIQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Element/ownedElement"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JvzUQQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Element/ownedElement"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaXwQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Element/ownedElement"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_Keb74AKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Element/ownedElement"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQRgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/ownedMember"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyJgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/ownedMember"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjRgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/ownedMember"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JvzUTQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/ownedMember"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX5gKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/ownedMember"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_Keb77QKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/ownedMember"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQTQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class/ownedOperation"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyLQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class/ownedOperation"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjTQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class/ownedOperation"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX7QKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class/ownedOperation"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQOgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//EncapsulatedClassifier/ownedPort"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyGgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//EncapsulatedClassifier/ownedPort"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjOgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//EncapsulatedClassifier/ownedPort"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX2gKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//EncapsulatedClassifier/ownedPort"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQLgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class/ownedReception"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyDgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class/ownedReception"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjLgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class/ownedReception"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaXzgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class/ownedReception"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQUQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/ownedRule"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyMQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/ownedRule"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjUQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/ownedRule"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JvzUWAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/ownedRule"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX8QKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/ownedRule"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_Keb7-AKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/ownedRule"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JvzUUwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Package/ownedStereotype"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_Keb78wKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Package/ownedStereotype"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQNQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//TemplateableElement/ownedTemplateSignature"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyFQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//TemplateableElement/ownedTemplateSignature"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjNQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//TemplateableElement/ownedTemplateSignature"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JvzUVQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//TemplateableElement/ownedTemplateSignature"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX1QKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//TemplateableElement/ownedTemplateSignature"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_Keb79QKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//TemplateableElement/ownedTemplateSignature"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JvzUSQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Package/ownedType"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_Keb76QKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Package/ownedType"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQTAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/ownedUseCase"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyLAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/ownedUseCase"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjTAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/ownedUseCase"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX7AKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/ownedUseCase"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQSAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Element/owner"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyKAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Element/owner"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjSAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Element/owner"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JvzUTwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Element/owner"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX6AKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Element/owner"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_Keb77wKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Element/owner"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQMQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//ParameterableElement/owningTemplateParameter"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyEQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//ParameterableElement/owningTemplateParameter"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjMQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//ParameterableElement/owningTemplateParameter"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JvzUUAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//ParameterableElement/owningTemplateParameter"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX0QKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//ParameterableElement/owningTemplateParameter"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_Keb78AKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//ParameterableElement/owningTemplateParameter"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQRwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Type/package"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyJwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Type/package"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjRwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Type/package"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX5wKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Type/package"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JvzUQgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Package/packagedElement"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_Keb74QKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Package/packagedElement"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQMwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/packageImport"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyEwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/packageImport"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjMwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/packageImport"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JvzUUgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/packageImport"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX0wKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/packageImport"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_Keb78gKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/packageImport"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JvzUTgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Package/packageMerge"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_Keb77gKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Package/packageMerge"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQPAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//StructuredClassifier/part"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyHAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//StructuredClassifier/part"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjPAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//StructuredClassifier/part"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX3AKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//StructuredClassifier/part"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQLQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/powertypeExtent"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyDQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/powertypeExtent"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjLQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/powertypeExtent"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaXzQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/powertypeExtent"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JvzUTAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Package/profileApplication"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_Keb77AKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Package/profileApplication"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQOQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/qualifiedName"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyGQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/qualifiedName"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjOQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/qualifiedName"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JvzUVwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/qualifiedName"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX2QKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/qualifiedName"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_Keb79wKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/qualifiedName"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQPwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/redefinedClassifier"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyHwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/redefinedClassifier"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjPwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/redefinedClassifier"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX3wKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/redefinedClassifier"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQNgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//RedefinableElement/redefinedElement"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyFgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//RedefinableElement/redefinedElement"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjNgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//RedefinableElement/redefinedElement"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX1gKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//RedefinableElement/redefinedElement"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQOAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//RedefinableElement/redefinitionContext"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyGAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//RedefinableElement/redefinitionContext"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjOAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//RedefinableElement/redefinitionContext"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX2AKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//RedefinableElement/redefinitionContext"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_JFXQVAKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::refinedBy">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_JWbyNAKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::refinedBy">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_JjNpwAKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::refinedBy">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_KMgeYAKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::refinedBy">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQUwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/representation"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyMwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/representation"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjUwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/representation"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX8wKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/representation"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQNAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//StructuredClassifier/role"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyFAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//StructuredClassifier/role"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjNAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//StructuredClassifier/role"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX1AKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//StructuredClassifier/role"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_JFXQWAKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::satisfiedBy">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_JWbyOAKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::satisfiedBy">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_JjNpxAKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::satisfiedBy">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_KMgeZAKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::satisfiedBy">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQQwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/substitution"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyIwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/substitution"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjQwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/substitution"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX4wKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/substitution"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQTgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class/superClass"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyLgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class/superClass"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjTgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class/superClass"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX7gKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class/superClass"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQQQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//TemplateableElement/templateBinding"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyIQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//TemplateableElement/templateBinding"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjQQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//TemplateableElement/templateBinding"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JvzURwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//TemplateableElement/templateBinding"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX4QKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//TemplateableElement/templateBinding"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_Keb75wKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//TemplateableElement/templateBinding"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQNwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//ParameterableElement/templateParameter"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyFwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//ParameterableElement/templateParameter"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjNwKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//ParameterableElement/templateParameter"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JvzUVgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//ParameterableElement/templateParameter"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX1wKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//ParameterableElement/templateParameter"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_Keb79gKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//ParameterableElement/templateParameter"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_JFXQWQKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::text">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_JWbyOQKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::text">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_JjNpxQKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::text">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_KMgeZQKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::text">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_JFXQWwKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::tracedTo">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_JWbyOwKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::tracedTo">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_JjNpxwKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::tracedTo">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_KMgeZwKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::tracedTo">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JvzUWgKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//Package/URI"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_Keb7-gKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//Package/URI"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQLAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/useCase"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyDAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/useCase"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjLAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/useCase"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaXzAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier/useCase"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_JFXQVgKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::verifiedBy">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_JWbyNgKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::verifiedBy">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_JjNpwgKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::verifiedBy">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_KMgeYgKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::verifiedBy">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_Keb75AKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//Model/viewpoint"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JFXQUAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/visibility"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JWbyMAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/visibility"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JjHjUAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/visibility"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JvzUWQKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/visibility"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_KMaX8AKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/visibility"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_Keb7-QKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/visibility"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr18QNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/clientDependency"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr18gNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//StructuralFeature/isReadOnly"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr18wNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Property/redefinedProperty"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr19ANfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Property/subsettedProperty"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr19QNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/visibility"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr19gNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//MultiplicityElement/lowerValue"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr19wNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//Property/isComposite.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr1-ANfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//Property/aggregation"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr1-QNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Element/ownedComment"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr1-gNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Property/qualifier"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr1-wNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Port/required"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr1_ANfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Port/protocol"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr1_QNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//MultiplicityElement/isUnique"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr1_gNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//Port/isService"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr1_wNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Property/interface"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2AANfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Property/associationEnd"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2AQNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Port/redefinedPort"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2AgNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//TypedElement/type"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2AwNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Port/provided"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2BANfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Element/owner"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2BQNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Property/defaultValue"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2BgNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/namespace"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2BwNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Element/ownedElement"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2CANfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//RedefinableElement/redefinitionContext"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2CQNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//Feature/isStatic"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2CgNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Feature/featuringClassifier"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2CwNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//DeploymentTarget/deployment"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2DANfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//Port/isBehavior"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2DQNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//MultiplicityElement/upperValue"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2DgNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Property/class"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2DwNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//MultiplicityElement/isOrdered"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2EANfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//ConnectableElement/end"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2EQNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//Property/isDerived"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2EgNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//RedefinableElement/redefinedElement"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2EwNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//Property/default"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2FANfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//RedefinableElement/isLeaf"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2FQNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Property/opposite"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2FgNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2FwNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//DeploymentTarget/deployedElement"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2GANfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Property/datatype"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2GQNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Property/owningAssociation"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2GgNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/qualifiedName"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2GwNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Property/association"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2HANfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//ParameterableElement/templateParameter"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2HQNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//ParameterableElement/owningTemplateParameter"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2HgNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//Property/isID"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2HwNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//MultiplicityElement/upper"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2IANfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//Port/isConjugated"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2IQNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/nameExpression"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2IgNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//Property/isDerivedUnion"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_pEr2IwNfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//MultiplicityElement/lower"/>
+ </axis>
+ </columnAxisProvidersHistory>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_B7qCggKPEeSZ5cZUOQKWkw" description="This axis provider contains the object dropped by the user into the table" name="DroppedElementAxisProvider">
+ <axis xmi:type="nattableaxis:EObjectAxis" xmi:id="_KeV1QAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@rowHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="uml:Model" href="revealSemanticModel.uml#_o-VpUAKOEeSZ5cZUOQKWkw"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EObjectAxis" xmi:id="_JvzUQAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@rowHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="uml:Package" href="revealSemanticModel.uml#_tKOa8AKOEeSZ5cZUOQKWkw"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EObjectAxis" xmi:id="_KMaXwAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@rowHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="uml:Class" href="revealSemanticModel.uml#_xF_s8AKOEeSZ5cZUOQKWkw"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EObjectAxis" xmi:id="_JFXQIAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@rowHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="uml:Class" href="revealSemanticModel.uml#_wDPPcAKOEeSZ5cZUOQKWkw"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EObjectAxis" xmi:id="_JWbyAAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@rowHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="uml:Class" href="revealSemanticModel.uml#_yZofEAKOEeSZ5cZUOQKWkw"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EObjectAxis" xmi:id="_JjHjIAKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@rowHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="uml:Class" href="revealSemanticModel.uml#_q24fUAKOEeSZ5cZUOQKWkw"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EObjectAxis" xmi:id="_pEr18ANfEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@rowHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="uml:Port" href="revealSemanticModel.uml#_mCmlAANfEeSV3fVidaLvSQ"/>
+ </axis>
+ </rowAxisProvidersHistory>
+ </nattable:Table>
+ <nattable:Table xmi:id="_C2IGsAKPEeSZ5cZUOQKWkw" name="RequirementTable0" currentRowAxisProvider="_C2IGtQKPEeSZ5cZUOQKWkw" currentColumnAxisProvider="_C2IGsQKPEeSZ5cZUOQKWkw">
+ <context xmi:type="uml:Model" href="revealSemanticModel.uml#_o-VpUAKOEeSZ5cZUOQKWkw"/>
+ <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#/"/>
+ <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_C2IGsQKPEeSZ5cZUOQKWkw" description="Provides the columns of the tables with a default configuration" name="Requirements Feature Columns Provider">
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_C2IGsgKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::id">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_C2IGswKPEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_C2IGtAKPEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::text">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ </columnAxisProvidersHistory>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_C2IGtQKPEeSZ5cZUOQKWkw" description="Provides the requirements directly owned by the context of the table" name="Requirement Axis Provider" disconnectSlave="true"/>
+ </nattable:Table>
+ <nattable:Table xmi:id="_EGhXkAKPEeSZ5cZUOQKWkw" name="TableOfViews0" currentRowAxisProvider="_EGhXlgKPEeSZ5cZUOQKWkw" currentColumnAxisProvider="_EGhXkQKPEeSZ5cZUOQKWkw">
+ <context xmi:type="uml:Model" href="revealSemanticModel.uml#_o-VpUAKOEeSZ5cZUOQKWkw"/>
+ <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.infra.nattable.views.config/resources/viewpage.nattableconfiguration#/"/>
+ <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_EGhXkQKPEeSZ5cZUOQKWkw" description="Provides the features of the views" name="Papyrus Views feature provider">
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_EGhXkgKPEeSZ5cZUOQKWkw" element="nattable_editor_pages:/name">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.infra.nattable.views.config/resources/viewpage.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_EGhXkwKPEeSZ5cZUOQKWkw" element="nattable_editor_pages:/context">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.infra.nattable.views.config/resources/viewpage.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_EGhXlAKPEeSZ5cZUOQKWkw" element="nattable_editor_pages:/isOpen">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.infra.nattable.views.config/resources/viewpage.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_EGhXlQKPEeSZ5cZUOQKWkw" element="nattable_editor_pages:/type">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.infra.nattable.views.config/resources/viewpage.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ </axis>
+ </columnAxisProvidersHistory>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_EGhXlgKPEeSZ5cZUOQKWkw"/>
+ </nattable:Table>
+ <nattable:Table xmi:id="_ffxOYAKUEeSZ5cZUOQKWkw" name="RequirementTable1" currentRowAxisProvider="_ffxOZQKUEeSZ5cZUOQKWkw" currentColumnAxisProvider="_ffxOYQKUEeSZ5cZUOQKWkw">
+ <context xmi:type="uml:Class" href="revealSemanticModel.uml#_q24fUAKOEeSZ5cZUOQKWkw"/>
+ <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#/"/>
+ <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_ffxOYQKUEeSZ5cZUOQKWkw" description="Provides the columns of the tables with a default configuration" name="Requirements Feature Columns Provider">
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_ffxOYgKUEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::id">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_ffxOYwKUEeSZ5cZUOQKWkw">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_yaOl0ANbEeSV3fVidaLvSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/namespace"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_ffxOZAKUEeSZ5cZUOQKWkw" element="property_of_stereotype:/SysML::Requirements::Requirement::text">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ </columnAxisProvidersHistory>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_ffxOZQKUEeSZ5cZUOQKWkw" description="Provides the requirements directly owned by the context of the table" name="Requirement Axis Provider"/>
+ </nattable:Table>
+ <nattable:Table xmi:id="_ZfPQ8Av4EeSOiKqWiKPo8w" name="AllocationTable0" currentRowAxisProvider="_ZfP4AQv4EeSOiKqWiKPo8w" currentColumnAxisProvider="_ZfPQ8Qv4EeSOiKqWiKPo8w">
+ <context xmi:type="uml:Model" href="revealSemanticModel.uml#_o-VpUAKOEeSZ5cZUOQKWkw"/>
+ <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.allocation.config/resources/allocation.nattableconfiguration#/"/>
+ <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_ZfPQ8Qv4EeSOiKqWiKPo8w" description="This provider provides the default columns for the SysML Allocation Table" name="SysMLAllocationFeatureProvider">
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_ZfPQ8gv4EeSOiKqWiKPo8w">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.allocation.config/resources/allocation.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_ZfPQ8wv4EeSOiKqWiKPo8w">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.allocation.config/resources/allocation.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Dependency/client"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_ZfPQ9Av4EeSOiKqWiKPo8w">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.allocation.config/resources/allocation.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Dependency/supplier"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_ZfP4AAv4EeSOiKqWiKPo8w">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.allocation.config/resources/allocation.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Element/owner"/>
+ </axis>
+ </columnAxisProvidersHistory>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_ZfP4AQv4EeSOiKqWiKPo8w" description="This row providers allows to display all Allocation in a Table" name="SysMLAllocationProvider" disconnectSlave="true"/>
+ </nattable:Table>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/revealSemanticModel.uml b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/revealSemanticModel.uml
new file mode 100755
index 0000000..34ad49f
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/revealSemanticModel.uml
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20110701" xmlns:xmi="http://www.omg.org/spec/XMI/20110701" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Allocations="http://www.eclipse.org/papyrus/0.7.0/SysML/Allocations" xmlns:Requirements="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Allocations http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements">
+ <uml:Model xmi:id="_o-VpUAKOEeSZ5cZUOQKWkw" name="SysMLmodel">
+ <packagedElement xmi:type="uml:Package" xmi:id="_tKOa8AKOEeSZ5cZUOQKWkw" name="Star Fighter">
+ <packagedElement xmi:type="uml:Class" xmi:id="_YNurgAKREeSZ5cZUOQKWkw" name="Requirement"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_q24fUAKOEeSZ5cZUOQKWkw" name="Durability" isActive="true">
+ <ownedAttribute xmi:type="uml:Port" xmi:id="_mCmlAANfEeSV3fVidaLvSQ" name="port" visibility="public" isReadOnly="true" aggregation="composite"/>
+ <nestedClassifier xmi:type="uml:Class" xmi:id="_wDPPcAKOEeSZ5cZUOQKWkw" name="Engine">
+ <nestedClassifier xmi:type="uml:Class" xmi:id="_yZofEAKOEeSZ5cZUOQKWkw" name="Maneuverability"/>
+ </nestedClassifier>
+ <nestedClassifier xmi:type="uml:Class" xmi:id="_xF_s8AKOEeSZ5cZUOQKWkw" name="Shield"/>
+ <nestedClassifier xmi:type="uml:Class" xmi:id="_mDRe0AwwEeSc2dWiwYQWHA" name="Firepower"/>
+ </packagedElement>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Abstraction" xmi:id="_bVbWgAv4EeSOiKqWiKPo8w" name="Allocate"/>
+ <packagedElement xmi:type="uml:Abstraction" xmi:id="_cGN6QAv4EeSOiKqWiKPo8w" name="Allocate1"/>
+ <packagedElement xmi:type="uml:Abstraction" xmi:id="_cg0yoAv4EeSOiKqWiKPo8w" name="Allocate2"/>
+ <packagedElement xmi:type="uml:Abstraction" xmi:id="_c8TNsAv4EeSOiKqWiKPo8w" name="Allocate3"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_o-0KcAKOEeSZ5cZUOQKWkw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_o-0KcQKOEeSZ5cZUOQKWkw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_TZ_nULU5EduiKqCzJMWbGw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_pBS2sAKOEeSZ5cZUOQKWkw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_pBS2sQKOEeSZ5cZUOQKWkw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_pBS2sgKOEeSZ5cZUOQKWkw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_pBS2swKOEeSZ5cZUOQKWkw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_pBS2tAKOEeSZ5cZUOQKWkw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_pBS2tQKOEeSZ5cZUOQKWkw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_pBS2tgKOEeSZ5cZUOQKWkw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_pBS2twKOEeSZ5cZUOQKWkw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_5WYJ0LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_pBS2uAKOEeSZ5cZUOQKWkw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_pBS2uQKOEeSZ5cZUOQKWkw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//activities"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_C2zXMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_pBS2ugKOEeSZ5cZUOQKWkw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_pBS2uwKOEeSZ5cZUOQKWkw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_pBS2vAKOEeSZ5cZUOQKWkw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_pBS2vQKOEeSZ5cZUOQKWkw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_pBS2vgKOEeSZ5cZUOQKWkw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_pBS2vwKOEeSZ5cZUOQKWkw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//interactions"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_meOioLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_pBS2wAKOEeSZ5cZUOQKWkw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_pBS2wQKOEeSZ5cZUOQKWkw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//statemachines"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_nAF5kLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_pBS2wgKOEeSZ5cZUOQKWkw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_pBS2wwKOEeSZ5cZUOQKWkw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//usecases"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_neZmMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Requirements:Requirement xmi:id="_q5K-UAKOEeSZ5cZUOQKWkw" id="1" base_Class="_q24fUAKOEeSZ5cZUOQKWkw"/>
+ <Requirements:Requirement xmi:id="_wDbcuwKOEeSZ5cZUOQKWkw" id="1.2" base_Class="_wDPPcAKOEeSZ5cZUOQKWkw"/>
+ <Requirements:Requirement xmi:id="_xGSA0AKOEeSZ5cZUOQKWkw" text="none" id="1.1" base_Class="_xF_s8AKOEeSZ5cZUOQKWkw"/>
+ <Requirements:Requirement xmi:id="_yZ6y8AKOEeSZ5cZUOQKWkw" text="Huge" id="1.2.1" base_Class="_yZofEAKOEeSZ5cZUOQKWkw"/>
+ <Requirements:Requirement xmi:id="_YN0yIAKREeSZ5cZUOQKWkw" base_Class="_YNurgAKREeSZ5cZUOQKWkw"/>
+ <Allocations:Allocate xmi:id="_bVg2EAv4EeSOiKqWiKPo8w" base_Abstraction="_bVbWgAv4EeSOiKqWiKPo8w"/>
+ <Allocations:Allocate xmi:id="_cGPIYAv4EeSOiKqWiKPo8w" base_Abstraction="_cGN6QAv4EeSOiKqWiKPo8w"/>
+ <Allocations:Allocate xmi:id="_cg1ZsAv4EeSOiKqWiKPo8w" base_Abstraction="_cg0yoAv4EeSOiKqWiKPo8w"/>
+ <Allocations:Allocate xmi:id="_c8T0wAv4EeSOiKqWiKPo8w" base_Abstraction="_c8TNsAv4EeSOiKqWiKPo8w"/>
+ <Requirements:Requirement xmi:id="_mDp5UAwwEeSc2dWiwYQWHA" base_Class="_mDRe0AwwEeSc2dWiwYQWHA"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/sysmlModel.di b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/sysmlModel.di
new file mode 100755
index 0000000..1b030e7
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/sysmlModel.di
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi">
+ <di:SashWindowsMngr>
+ <pageList/>
+ <sashModel currentSelection="//@sashModel/@windows.0/@children.0">
+ <windows>
+ <children xsi:type="di:TabFolder"/>
+ </windows>
+ </sashModel>
+ </di:SashWindowsMngr>
+ <architecture:ArchitectureDescription contextId="org.eclipse.papyrus.sysml.architecture.SysML"/>
+ <architecture:ArchitectureDescriptionPreferences>
+ <viewpointIds>org.eclipse.papyrus.sysml.analysis</viewpointIds>
+ <viewpointIds>org.eclipse.papyrus.sysml.design</viewpointIds>
+ </architecture:ArchitectureDescriptionPreferences>
+</xmi:XMI>
+
\ No newline at end of file
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/sysmlModel.notation b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/sysmlModel.notation
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/sysmlModel.notation
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/sysmlModel.uml b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/sysmlModel.uml
new file mode 100755
index 0000000..30d011e
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/sysmlModel.uml
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20110701" xmlns:xmi="http://www.omg.org/spec/XMI/20110701" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Requirements="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements">
+ <uml:Model xmi:id="_NydJMNjoEeKw9PDRLmC3Lg" name="SysMLmodel">
+ <packagedElement xmi:type="uml:Class" xmi:id="_pFCy0Nj3EeKw9PDRLmC3Lg" name="Class1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_4P-YwNmjEeKw9PDRLmC3Lg" name="Requirement1">
+ <nestedClassifier xmi:type="uml:Class" xmi:id="_EKEE0NmnEeKw9PDRLmC3Lg" name="NestedRequirement1"/>
+ <nestedClassifier xmi:type="uml:Class" xmi:id="_E0dssNmnEeKw9PDRLmC3Lg" name="NestedRequirement2"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_DY0OENmnEeKw9PDRLmC3Lg" name="Requirement2"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_NzMwENjoEeKw9PDRLmC3Lg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_NzMwEdjoEeKw9PDRLmC3Lg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_TZ_nULU5EduiKqCzJMWbGw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_N5AdINjoEeKw9PDRLmC3Lg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_N5AdIdjoEeKw9PDRLmC3Lg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_N5AdItjoEeKw9PDRLmC3Lg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_N5AdI9joEeKw9PDRLmC3Lg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_N5AdJNjoEeKw9PDRLmC3Lg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_N5AdJdjoEeKw9PDRLmC3Lg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_N5AdJtjoEeKw9PDRLmC3Lg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_N5AdJ9joEeKw9PDRLmC3Lg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_5WYJ0LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_N5AdKNjoEeKw9PDRLmC3Lg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_N5AdKdjoEeKw9PDRLmC3Lg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//activities"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_C2zXMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_N5AdKtjoEeKw9PDRLmC3Lg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_N5AdK9joEeKw9PDRLmC3Lg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_N5AdLNjoEeKw9PDRLmC3Lg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_N5AdLdjoEeKw9PDRLmC3Lg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_N5AdLtjoEeKw9PDRLmC3Lg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_N5AdL9joEeKw9PDRLmC3Lg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//interactions"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_meOioLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_N5AdMNjoEeKw9PDRLmC3Lg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_N5AdMdjoEeKw9PDRLmC3Lg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//statemachines"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_nAF5kLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_N5AdMtjoEeKw9PDRLmC3Lg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_N5AdM9joEeKw9PDRLmC3Lg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//usecases"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_neZmMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Requirements:Requirement xmi:id="_4QkOoNmjEeKw9PDRLmC3Lg" base_Class="_4P-YwNmjEeKw9PDRLmC3Lg"/>
+ <Requirements:Requirement xmi:id="_DY9_ENmnEeKw9PDRLmC3Lg" base_Class="_DY0OENmnEeKw9PDRLmC3Lg"/>
+ <Requirements:Requirement xmi:id="_EKNOwNmnEeKw9PDRLmC3Lg" base_Class="_EKEE0NmnEeKw9PDRLmC3Lg"/>
+ <Requirements:Requirement xmi:id="_E0m2oNmnEeKw9PDRLmC3Lg" base_Class="_E0dssNmnEeKw9PDRLmC3Lg"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/umlmodel.di b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/umlmodel.di
new file mode 100755
index 0000000..ae31307
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/umlmodel.di
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<di:SashWindowsMngr xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi">
+ <pageList/>
+ <sashModel currentSelection="//@sashModel/@windows.0/@children.0">
+ <windows>
+ <children xsi:type="di:TabFolder"/>
+ </windows>
+ </sashModel>
+</di:SashWindowsMngr>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/umlmodel.notation b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/umlmodel.notation
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/umlmodel.notation
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/umlmodel.uml b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/umlmodel.uml
new file mode 100755
index 0000000..8007da3
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/umlmodel.uml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20110701" xmlns:xmi="http://www.omg.org/spec/XMI/20110701" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xmi:id="_Qv2HpNjoEeKw9PDRLmC3Lg" name="Model">
+ <packageImport xmi:type="uml:PackageImport" xmi:id="_Qv2HpdjoEeKw9PDRLmC3Lg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+</uml:Model>
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/Activator.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/Activator.java
new file mode 100755
index 0000000..dd515e0
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/Activator.java
@@ -0,0 +1,66 @@
+/*****************************************************************************
+ * 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.sysml.nattable.requirement.tests;
+
+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.sysml.nattable.requirement.tests"; //$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/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/bugs/AbstractAxisChangeIndexTest.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/bugs/AbstractAxisChangeIndexTest.java
new file mode 100755
index 0000000..64d352f
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/bugs/AbstractAxisChangeIndexTest.java
@@ -0,0 +1,328 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.bugs;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.commands.Command;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.IHandler;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.nebula.widgets.nattable.grid.GridRegion;
+import org.eclipse.nebula.widgets.nattable.grid.layer.RowHeaderLayer;
+import org.eclipse.nebula.widgets.nattable.layer.AbstractLayer;
+import org.eclipse.nebula.widgets.nattable.layer.DataLayer;
+import org.eclipse.nebula.widgets.nattable.layer.LabelStack;
+import org.eclipse.papyrus.infra.core.sashwindows.di.service.IPageManager;
+import org.eclipse.papyrus.infra.nattable.common.editor.NatTableEditor;
+import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager;
+import org.eclipse.papyrus.infra.nattable.menu.MenuUtils;
+import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AbstractHeaderAxisConfiguration;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisIndexStyle;
+import org.eclipse.papyrus.infra.nattable.utils.HeaderAxisConfigurationManagementUtils;
+import org.eclipse.papyrus.infra.ui.util.EclipseCommandUtils;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.TableUtils;
+import org.eclipse.papyrus.junit.utils.rules.PapyrusEditorFixture;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.commands.ICommandService;
+import org.eclipse.ui.handlers.RadioState;
+import org.eclipse.uml2.uml.Model;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+/**
+ * This abstract class allow to define the tests for the change axis index style.
+ */
+@PluginResource("resources/bugs/bug473155/AxisChangeIndex.di")
+public abstract class AbstractAxisChangeIndexTest extends AbstractPapyrusTest {
+
+ /**
+ * The table name.
+ */
+ private static final String TABLE_NAME = "RequirementTable0"; //$NON-NLS-1$
+
+ /**
+ * The first alphabetic index.
+ */
+ protected static final String INDEX_A = "A"; //$NON-NLS-1$
+
+ /**
+ * The second alphabetic index.
+ */
+ protected static final String INDEX_B = "B"; //$NON-NLS-1$
+
+ /**
+ * The third alphabetic index.
+ */
+ protected static final String INDEX_C = "C"; //$NON-NLS-1$
+
+ /**
+ * The first numeric index.
+ */
+ protected static final int INDEX_0 = 0;
+
+ /**
+ * The sexond numeric index.
+ */
+ protected static final int INDEX_1 = 1;
+
+ /**
+ * The third numeric index.
+ */
+ protected static final int INDEX_2 = 2;
+
+
+ /**
+ * The papyrus fixture.
+ */
+ @Rule
+ public final PapyrusEditorFixture fixture = new PapyrusEditorFixture();
+
+ /**
+ * Constructor.
+ */
+ public AbstractAxisChangeIndexTest() {
+ super();
+ }
+
+ /**
+ * This allow to initialize the tests.
+ */
+ @Before
+ public void init() {
+ final Model model = (Model) fixture.getModel();
+ Assert.assertNotNull("RootModel is null", model); //$NON-NLS-1$
+
+ // Get the table and open it
+ Table mainTable = TableUtils.getNotationFirstTable(fixture.getModelSet(), TABLE_NAME);
+ fixture.getPageManager().openPage(mainTable);
+ fixture.flushDisplayEvents();
+ }
+
+ /**
+ * The test for the change index of the column.
+ *
+ * @throws Exception
+ * The exception.
+ */
+ @Test
+ public void testChangeIndexInitialColumn() throws Exception {
+ // Open the table and get the manager
+ IPageManager pageManager = fixture.getPageManager();
+ List<Object> pages = pageManager.allPages();
+ pageManager.openPage(pages.get(0));
+ IEditorPart part = fixture.getEditor().getActiveEditor();
+ Assert.assertTrue(part instanceof NatTableEditor);
+ NatTableEditor editor = (NatTableEditor) part;
+ INattableModelManager currentManager = (INattableModelManager) editor.getAdapter(INattableModelManager.class);
+ Assert.assertTrue(currentManager instanceof INattableModelManager);
+ MenuUtils.registerNatTableWidgetInEclipseContext(currentManager, new LabelStack(GridRegion.COLUMN_HEADER));
+ // check the initial data
+ checkAlphabeticColumn(currentManager);
+
+ // Get the command service
+ ICommandService commandService = EclipseCommandUtils.getCommandService();
+ Assert.assertNotNull(commandService);
+
+ // Get the command and the handler
+ Command cmd = commandService.getCommand("org.eclipse.papyrus.infra.nattable.column.index.style"); //$NON-NLS-1$
+ IHandler handler = cmd.getHandler();
+ Assert.assertTrue(handler.isEnabled());
+
+ // Put the numeric parameter
+ Map<String, String> parameter = new HashMap<String, String>(1);
+ parameter.put(RadioState.PARAMETER_ID, AxisIndexStyle.NUMERIC.getName()); // $NON-NLS-1$
+
+ // Execute the command with the correct parameter and check its result
+ ExecutionEvent event = new ExecutionEvent(cmd, parameter, null, null);
+ fixture.flushDisplayEvents();
+ Object res = cmd.executeWithChecks(event);
+ Assert.assertTrue(res instanceof IStatus);
+ IStatus iStatus = (IStatus) res;
+ Assert.assertTrue("Returned status is not OK", iStatus.isOK()); //$NON-NLS-1$
+
+ // Check the numeric column data
+ checkNumericColumn(currentManager);
+
+ // Put the alphabetic parameter
+ parameter.clear();
+ parameter.put(RadioState.PARAMETER_ID, AxisIndexStyle.ALPHABETIC.getName()); // $NON-NLS-1$
+
+ // Execute the command with the correct parameter and check its result
+ event = new ExecutionEvent(cmd, parameter, null, null);
+ fixture.flushDisplayEvents();
+ res = cmd.executeWithChecks(event);
+ Assert.assertTrue(res instanceof IStatus);
+ iStatus = (IStatus) res;
+ Assert.assertTrue("Returned status is not OK", iStatus.isOK()); //$NON-NLS-1$
+
+ // check the initial data
+ checkAlphabeticColumn(currentManager);
+ }
+
+ /**
+ * The test for the change index of the row.
+ *
+ * @throws Exception
+ * The exception.
+ */
+ @Test
+ public void testChangeIndexInitialRow() throws Exception {
+ // Open the table and get the manager
+ IPageManager pageManager = fixture.getPageManager();
+ List<Object> pages = pageManager.allPages();
+ pageManager.openPage(pages.get(0));
+ IEditorPart part = fixture.getEditor().getActiveEditor();
+ Assert.assertTrue(part instanceof NatTableEditor);
+ NatTableEditor editor = (NatTableEditor) part;
+ INattableModelManager currentManager = (INattableModelManager) editor.getAdapter(INattableModelManager.class);
+ Assert.assertTrue(currentManager instanceof INattableModelManager);
+ MenuUtils.registerNatTableWidgetInEclipseContext(currentManager, new LabelStack(GridRegion.ROW_HEADER));
+ // check the initial data
+ checkNumericRow(currentManager);
+
+ // Get the command service
+ ICommandService commandService = EclipseCommandUtils.getCommandService();
+ Assert.assertNotNull(commandService);
+
+ // Get the command and the handler
+ Command cmd = commandService.getCommand("org.eclipse.papyrus.infra.nattable.row.index.style"); //$NON-NLS-1$
+ IHandler handler = cmd.getHandler();
+ Assert.assertTrue(handler.isEnabled());
+
+ // Put the numeric parameter
+ Map<String, String> parameter = new HashMap<String, String>(1);
+ parameter.put(RadioState.PARAMETER_ID, AxisIndexStyle.ALPHABETIC.getName()); // $NON-NLS-1$
+
+ // Execute the command with the correct parameter and check its result
+ ExecutionEvent event = new ExecutionEvent(cmd, parameter, null, null);
+ fixture.flushDisplayEvents();
+ Object res = cmd.executeWithChecks(event);
+ Assert.assertTrue(res instanceof IStatus);
+ IStatus iStatus = (IStatus) res;
+ Assert.assertTrue("Returned status is not OK", iStatus.isOK()); //$NON-NLS-1$
+
+ // Check the numeric column data
+ checkAlphabeticRow(currentManager);
+
+ // Put the alphabetic parameter
+ parameter.clear();
+ parameter.put(RadioState.PARAMETER_ID, AxisIndexStyle.NUMERIC.getName());
+
+ // Execute the command with the correct parameter and check its result
+ event = new ExecutionEvent(cmd, parameter, null, null);
+ fixture.flushDisplayEvents();
+ res = cmd.executeWithChecks(event);
+ Assert.assertTrue(res instanceof IStatus);
+ iStatus = (IStatus) res;
+ Assert.assertTrue("Returned status is not OK", iStatus.isOK()); //$NON-NLS-1$
+
+ // check the initial data
+ checkNumericRow(currentManager);
+ }
+
+ /**
+ * This allow to check the alphabetic column.
+ *
+ * @param currentManager
+ * The nattable model manager.
+ */
+ public void checkAlphabeticColumn(final INattableModelManager currentManager) {
+ // Check the index style
+ AbstractHeaderAxisConfiguration headerConfiguration = HeaderAxisConfigurationManagementUtils.getColumnAbstractHeaderAxisInTable(currentManager.getTable());
+ if (null == headerConfiguration) {
+ headerConfiguration = HeaderAxisConfigurationManagementUtils.getColumnAbstractHeaderAxisInTableConfiguration(currentManager.getTable());
+ }
+ Assert.assertEquals("This is not the alphabetic style", headerConfiguration.getIndexStyle(), AxisIndexStyle.ALPHABETIC); //$NON-NLS-1$
+
+ // Check the data
+ final AbstractLayer columnHeaderLayerIndex = ((NattableModelManager) currentManager).getColumnHeaderLayerStack().getColumnIndexDataLayer();
+ Assert.assertTrue("The column layer is not a data lyer", columnHeaderLayerIndex instanceof DataLayer); //$NON-NLS-1$
+ Assert.assertEquals("The first column index is not corresponding to 'A'", INDEX_A, ((DataLayer) columnHeaderLayerIndex).getDataValueByPosition(0, 0)); //$NON-NLS-1$
+ Assert.assertEquals("The second column index is not corresponding to 'B'", INDEX_B, ((DataLayer) columnHeaderLayerIndex).getDataValueByPosition(1, 0)); //$NON-NLS-1$
+ Assert.assertEquals("The third column index is not corresponding to 'C'", INDEX_C, ((DataLayer) columnHeaderLayerIndex).getDataValueByPosition(2, 0)); //$NON-NLS-1$
+ }
+
+ /**
+ * This allow to check the numeric column.
+ *
+ * @param currentManager
+ * The nattable model manager.
+ */
+ public void checkNumericColumn(final INattableModelManager currentManager) {
+ // Check the index style
+ AbstractHeaderAxisConfiguration headerConfiguration = HeaderAxisConfigurationManagementUtils.getColumnAbstractHeaderAxisInTable(currentManager.getTable());
+ if (null == headerConfiguration) {
+ headerConfiguration = HeaderAxisConfigurationManagementUtils.getColumnAbstractHeaderAxisInTableConfiguration(currentManager.getTable());
+ }
+ Assert.assertEquals("This is not the numeric style", headerConfiguration.getIndexStyle(), AxisIndexStyle.NUMERIC); //$NON-NLS-1$
+
+ // Check the data
+ final AbstractLayer columnHeaderLayerIndex = ((NattableModelManager) currentManager).getColumnHeaderLayerStack().getColumnIndexDataLayer();
+ Assert.assertTrue("The column layer is not a data layer", columnHeaderLayerIndex instanceof DataLayer); //$NON-NLS-1$
+ Assert.assertEquals("The first column index is not corresponding to '0'", INDEX_0, ((DataLayer) columnHeaderLayerIndex).getDataValueByPosition(0, 0)); //$NON-NLS-1$
+ Assert.assertEquals("The second column index is not corresponding to '1'", INDEX_1, ((DataLayer) columnHeaderLayerIndex).getDataValueByPosition(1, 0)); //$NON-NLS-1$
+ Assert.assertEquals("The third column index is not corresponding to '2'", INDEX_2, ((DataLayer) columnHeaderLayerIndex).getDataValueByPosition(2, 0)); //$NON-NLS-1$
+ }
+
+ /**
+ * This allow to check the numeric row.
+ *
+ * @param currentManager
+ * The nattable model manager.
+ */
+ public void checkNumericRow(final INattableModelManager currentManager) {
+ // Check the index style
+ AbstractHeaderAxisConfiguration headerConfiguration = HeaderAxisConfigurationManagementUtils.getRowAbstractHeaderAxisInTable(currentManager.getTable());
+ if (null == headerConfiguration) {
+ headerConfiguration = HeaderAxisConfigurationManagementUtils.getRowAbstractHeaderAxisInTableConfiguration(currentManager.getTable());
+ }
+ Assert.assertEquals("This is not the numeric style", headerConfiguration.getIndexStyle(), AxisIndexStyle.NUMERIC); //$NON-NLS-1$
+
+ // check the data
+ final AbstractLayer rowHeaderLayerIndex = ((NattableModelManager) currentManager).getRowHeaderLayerStack().getRowHeaderLayerIndex();
+ Assert.assertTrue("The row layer is not a row header layer", rowHeaderLayerIndex instanceof RowHeaderLayer); //$NON-NLS-1$
+ Assert.assertEquals("The first row index is not corresponding to '0'", INDEX_0, ((RowHeaderLayer) rowHeaderLayerIndex).getDataValueByPosition(0, 0)); //$NON-NLS-1$
+ Assert.assertEquals("The second row index is not corresponding to '1'", INDEX_1, ((RowHeaderLayer) rowHeaderLayerIndex).getDataValueByPosition(0, 1)); //$NON-NLS-1$
+ }
+
+ /**
+ * This allow to check the alphabetic row
+ *
+ * @param currentManager
+ * The nattable model manager.
+ */
+ public void checkAlphabeticRow(final INattableModelManager currentManager) {
+ // Check the index style
+ AbstractHeaderAxisConfiguration headerConfiguration = HeaderAxisConfigurationManagementUtils.getRowAbstractHeaderAxisInTable(currentManager.getTable());
+ if (null == headerConfiguration) {
+ headerConfiguration = HeaderAxisConfigurationManagementUtils.getRowAbstractHeaderAxisInTableConfiguration(currentManager.getTable());
+ }
+ Assert.assertEquals("This is not the alphabetic style", headerConfiguration.getIndexStyle(), AxisIndexStyle.ALPHABETIC); //$NON-NLS-1$
+
+ // check the data
+ final AbstractLayer rowHeaderLayerIndex = ((NattableModelManager) currentManager).getRowHeaderLayerStack().getRowHeaderLayerIndex();
+ Assert.assertTrue("The row layer is not a row header layer", rowHeaderLayerIndex instanceof RowHeaderLayer); //$NON-NLS-1$
+ Assert.assertEquals("The first row index is not corresponding to 'A'", INDEX_A, ((RowHeaderLayer) rowHeaderLayerIndex).getDataValueByPosition(0, 0)); //$NON-NLS-1$
+ Assert.assertEquals("The second row index is not corresponding to 'B'", INDEX_B, ((RowHeaderLayer) rowHeaderLayerIndex).getDataValueByPosition(0, 1)); //$NON-NLS-1$
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/bugs/AbstractInvertedAxisChangeIndexTest.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/bugs/AbstractInvertedAxisChangeIndexTest.java
new file mode 100755
index 0000000..60481ba
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/bugs/AbstractInvertedAxisChangeIndexTest.java
@@ -0,0 +1,266 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.bugs;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.commands.Command;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.IHandler;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.nebula.widgets.nattable.grid.GridRegion;
+import org.eclipse.nebula.widgets.nattable.grid.layer.RowHeaderLayer;
+import org.eclipse.nebula.widgets.nattable.layer.AbstractLayer;
+import org.eclipse.nebula.widgets.nattable.layer.DataLayer;
+import org.eclipse.nebula.widgets.nattable.layer.LabelStack;
+import org.eclipse.papyrus.infra.core.sashwindows.di.service.IPageManager;
+import org.eclipse.papyrus.infra.nattable.common.editor.NatTableEditor;
+import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager;
+import org.eclipse.papyrus.infra.nattable.menu.MenuUtils;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AbstractHeaderAxisConfiguration;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisIndexStyle;
+import org.eclipse.papyrus.infra.nattable.utils.HeaderAxisConfigurationManagementUtils;
+import org.eclipse.papyrus.infra.ui.util.EclipseCommandUtils;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.commands.ICommandService;
+import org.eclipse.ui.handlers.RadioState;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * This abstract class allow to define the tests for the change axis index style when the axis are inverted.
+ */
+public abstract class AbstractInvertedAxisChangeIndexTest extends AbstractAxisChangeIndexTest {
+
+ /**
+ * Constructor.
+ */
+ public AbstractInvertedAxisChangeIndexTest() {
+ super();
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.sysml.nattable.requirement.tests.bugs.AbstractAxisChangeIndexTest#testChangeIndexInitialColumn()
+ *
+ * @throws Exception
+ */
+ @Override
+ @Test
+ public void testChangeIndexInitialColumn() throws Exception {
+ // Try to execute a resize command to check the re-creation
+ IPageManager pageManager = fixture.getPageManager();
+ List<Object> pages = pageManager.allPages();
+ pageManager.openPage(pages.get(0));
+ IEditorPart part = fixture.getEditor().getActiveEditor();
+ Assert.assertTrue(part instanceof NatTableEditor);
+ NatTableEditor editor = (NatTableEditor) part;
+ INattableModelManager currentManager = (INattableModelManager) editor.getAdapter(INattableModelManager.class);
+ Assert.assertTrue(currentManager instanceof INattableModelManager);
+ MenuUtils.registerNatTableWidgetInEclipseContext(currentManager, new LabelStack(GridRegion.COLUMN_HEADER));
+ // check the initial data
+ checkNumericColumn(currentManager);
+
+ // Get the command service
+ ICommandService commandService = EclipseCommandUtils.getCommandService();
+ Assert.assertNotNull(commandService);
+
+ // Get the command and the handler
+ Command cmd = commandService.getCommand("org.eclipse.papyrus.infra.nattable.column.index.style"); //$NON-NLS-1$
+ IHandler handler = cmd.getHandler();
+ Assert.assertTrue(handler.isEnabled());
+
+ // Put the numeric parameter
+ Map<String, String> parameter = new HashMap<String, String>(1);
+ parameter.put(RadioState.PARAMETER_ID, AxisIndexStyle.ALPHABETIC.getName()); // $NON-NLS-1$
+
+ // Execute the command with the correct parameter and check its result
+ ExecutionEvent event = new ExecutionEvent(cmd, parameter, null, null);
+ fixture.flushDisplayEvents();
+ Object res = cmd.executeWithChecks(event);
+ Assert.assertTrue(res instanceof IStatus);
+ IStatus iStatus = (IStatus) res;
+ Assert.assertTrue("Returned status is not OK", iStatus.isOK()); //$NON-NLS-1$
+
+ // Check the numeric column data
+ checkAlphabeticColumn(currentManager);
+
+ // Put the alphabetic parameter
+ parameter.clear();
+ parameter.put(RadioState.PARAMETER_ID, AxisIndexStyle.NUMERIC.getName()); // $NON-NLS-1$
+
+ // Execute the command with the correct parameter and check its result
+ event = new ExecutionEvent(cmd, parameter, null, null);
+ fixture.flushDisplayEvents();
+ res = cmd.executeWithChecks(event);
+ Assert.assertTrue(res instanceof IStatus);
+ iStatus = (IStatus) res;
+ Assert.assertTrue("Returned status is not OK", iStatus.isOK()); //$NON-NLS-1$
+
+ // check the initial data
+ checkNumericColumn(currentManager);
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.sysml.nattable.requirement.tests.bugs.AbstractAxisChangeIndexTest#testChangeIndexInitialRow()
+ *
+ * @throws Exception
+ */
+ @Override
+ @Test
+ public void testChangeIndexInitialRow() throws Exception {
+ // Try to execute a resize command to check the re-creation
+ IPageManager pageManager = fixture.getPageManager();
+ List<Object> pages = pageManager.allPages();
+ pageManager.openPage(pages.get(0));
+ IEditorPart part = fixture.getEditor().getActiveEditor();
+ Assert.assertTrue(part instanceof NatTableEditor);
+ NatTableEditor editor = (NatTableEditor) part;
+ INattableModelManager currentManager = (INattableModelManager) editor.getAdapter(INattableModelManager.class);
+ Assert.assertTrue(currentManager instanceof INattableModelManager);
+ MenuUtils.registerNatTableWidgetInEclipseContext(currentManager, new LabelStack(GridRegion.ROW_HEADER));
+ // check the initial data
+ checkAlphabeticRow(currentManager);
+
+ // Get the command service
+ ICommandService commandService = EclipseCommandUtils.getCommandService();
+ Assert.assertNotNull(commandService);
+
+ // Get the command and the handler
+ Command cmd = commandService.getCommand("org.eclipse.papyrus.infra.nattable.row.index.style"); //$NON-NLS-1$
+ IHandler handler = cmd.getHandler();
+ Assert.assertTrue(handler.isEnabled());
+
+ // Put the numeric parameter
+ Map<String, String> parameter = new HashMap<String, String>(1);
+ parameter.put(RadioState.PARAMETER_ID, AxisIndexStyle.NUMERIC.getName()); // $NON-NLS-1$
+
+ // Execute the command with the correct parameter and check its result
+ ExecutionEvent event = new ExecutionEvent(cmd, parameter, null, null);
+ fixture.flushDisplayEvents();
+ Object res = cmd.executeWithChecks(event);
+ Assert.assertTrue(res instanceof IStatus);
+ IStatus iStatus = (IStatus) res;
+ Assert.assertTrue("Returned status is not OK", iStatus.isOK()); //$NON-NLS-1$
+
+ // Check the numeric column data
+ checkNumericRow(currentManager);
+
+ // Put the alphabetic parameter
+ parameter.clear();
+ parameter.put(RadioState.PARAMETER_ID, AxisIndexStyle.ALPHABETIC.getName());
+
+ // Execute the command with the correct parameter and check its result
+ event = new ExecutionEvent(cmd, parameter, null, null);
+ fixture.flushDisplayEvents();
+ res = cmd.executeWithChecks(event);
+ Assert.assertTrue(res instanceof IStatus);
+ iStatus = (IStatus) res;
+ Assert.assertTrue("Returned status is not OK", iStatus.isOK()); //$NON-NLS-1$
+
+ // check the initial data
+ checkAlphabeticRow(currentManager);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.nattable.generic.tests.bugs.AbstractAxisChangeIndexTest#checkAlphabeticColumn(org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager)
+ *
+ * @param currentManager
+ */
+ @Override
+ public void checkAlphabeticColumn(final INattableModelManager currentManager) {
+ // Check the index style
+ AbstractHeaderAxisConfiguration headerConfiguration = HeaderAxisConfigurationManagementUtils.getColumnAbstractHeaderAxisInTable(currentManager.getTable());
+ if (null == headerConfiguration) {
+ headerConfiguration = HeaderAxisConfigurationManagementUtils.getColumnAbstractHeaderAxisInTableConfiguration(currentManager.getTable());
+ }
+ Assert.assertEquals("This is not the alphabetic style", headerConfiguration.getIndexStyle(), AxisIndexStyle.ALPHABETIC); //$NON-NLS-1$
+
+ // Check the data
+ final AbstractLayer columnHeaderLayerIndex = ((NattableModelManager) currentManager).getColumnHeaderLayerStack().getColumnIndexDataLayer();
+ Assert.assertTrue("The column layer is not a data layer", columnHeaderLayerIndex instanceof DataLayer); //$NON-NLS-1$
+ Assert.assertEquals("The first column index is not corresponding to 'A'", INDEX_A, ((DataLayer) columnHeaderLayerIndex).getDataValueByPosition(0, 0)); //$NON-NLS-1$
+ Assert.assertEquals("The second column index is not corresponding to 'B'", INDEX_B, ((DataLayer) columnHeaderLayerIndex).getDataValueByPosition(1, 0)); //$NON-NLS-1$
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.nattable.generic.tests.bugs.AbstractAxisChangeIndexTest#checkNumericColumn(org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager)
+ *
+ * @param currentManager
+ */
+ @Override
+ public void checkNumericColumn(final INattableModelManager currentManager) {
+ // Check the index style
+ AbstractHeaderAxisConfiguration headerConfiguration = HeaderAxisConfigurationManagementUtils.getColumnAbstractHeaderAxisInTable(currentManager.getTable());
+ if (null == headerConfiguration) {
+ headerConfiguration = HeaderAxisConfigurationManagementUtils.getColumnAbstractHeaderAxisInTableConfiguration(currentManager.getTable());
+ }
+ Assert.assertEquals("This is not the numeric style", headerConfiguration.getIndexStyle(), AxisIndexStyle.NUMERIC); //$NON-NLS-1$
+
+ // Check the data
+ final AbstractLayer columnHeaderLayerIndex = ((NattableModelManager) currentManager).getColumnHeaderLayerStack().getColumnIndexDataLayer();
+ Assert.assertTrue("The column layer is not a data layer", columnHeaderLayerIndex instanceof DataLayer); //$NON-NLS-1$
+ Assert.assertEquals("The first column index is not corresponding to '0'", INDEX_0, ((DataLayer) columnHeaderLayerIndex).getDataValueByPosition(0, 0)); //$NON-NLS-1$
+ Assert.assertEquals("The second column index is not corresponding to '1'", INDEX_1, ((DataLayer) columnHeaderLayerIndex).getDataValueByPosition(1, 0)); //$NON-NLS-1$
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.nattable.generic.tests.bugs.AbstractAxisChangeIndexTest#checkNumericRow(org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager)
+ *
+ * @param currentManager
+ */
+ @Override
+ public void checkNumericRow(final INattableModelManager currentManager) {
+ // Check the index style
+ AbstractHeaderAxisConfiguration headerConfiguration = HeaderAxisConfigurationManagementUtils.getRowAbstractHeaderAxisInTable(currentManager.getTable());
+ if (null == headerConfiguration) {
+ headerConfiguration = HeaderAxisConfigurationManagementUtils.getRowAbstractHeaderAxisInTableConfiguration(currentManager.getTable());
+ }
+ Assert.assertEquals("This is not the numeric style", headerConfiguration.getIndexStyle(), AxisIndexStyle.NUMERIC); //$NON-NLS-1$
+
+ // check the data
+ final AbstractLayer rowHeaderLayerIndex = ((NattableModelManager) currentManager).getRowHeaderLayerStack().getRowHeaderLayerIndex();
+ Assert.assertTrue("The row layer is not a row header layer", rowHeaderLayerIndex instanceof RowHeaderLayer); //$NON-NLS-1$
+ Assert.assertEquals("The first row index is not corresponding to '0'", INDEX_0, ((RowHeaderLayer) rowHeaderLayerIndex).getDataValueByPosition(0, 0)); //$NON-NLS-1$
+ Assert.assertEquals("The second row index is not corresponding to '1'", INDEX_1, ((RowHeaderLayer) rowHeaderLayerIndex).getDataValueByPosition(0, 1)); //$NON-NLS-1$
+ Assert.assertEquals("The third row index is not corresponding to '2'", INDEX_2, ((RowHeaderLayer) rowHeaderLayerIndex).getDataValueByPosition(0, 2)); //$NON-NLS-1$
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.nattable.generic.tests.bugs.AbstractAxisChangeIndexTest#checkAlphabeticRow(org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager)
+ *
+ * @param currentManager
+ */
+ @Override
+ public void checkAlphabeticRow(final INattableModelManager currentManager) {
+ // Check the index style
+ AbstractHeaderAxisConfiguration headerConfiguration = HeaderAxisConfigurationManagementUtils.getRowAbstractHeaderAxisInTable(currentManager.getTable());
+ if (null == headerConfiguration) {
+ headerConfiguration = HeaderAxisConfigurationManagementUtils.getRowAbstractHeaderAxisInTableConfiguration(currentManager.getTable());
+ }
+ Assert.assertEquals("This is not the alphabetic style", headerConfiguration.getIndexStyle(), AxisIndexStyle.ALPHABETIC); //$NON-NLS-1$
+
+ // check the data
+ final AbstractLayer rowHeaderLayerIndex = ((NattableModelManager) currentManager).getRowHeaderLayerStack().getRowHeaderLayerIndex();
+ Assert.assertTrue("The row layer is not a row header layer", rowHeaderLayerIndex instanceof RowHeaderLayer); //$NON-NLS-1$
+ Assert.assertEquals("The first row index is not corresponding to 'A'", INDEX_A, ((RowHeaderLayer) rowHeaderLayerIndex).getDataValueByPosition(0, 0)); //$NON-NLS-1$
+ Assert.assertEquals("The second row index is not corresponding to 'B'", INDEX_B, ((RowHeaderLayer) rowHeaderLayerIndex).getDataValueByPosition(0, 1)); //$NON-NLS-1$
+ Assert.assertEquals("The third row index is not corresponding to 'C'", INDEX_C, ((RowHeaderLayer) rowHeaderLayerIndex).getDataValueByPosition(0, 2)); //$NON-NLS-1$
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/bugs/AxisChangeIndexWithConfigurationTest.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/bugs/AxisChangeIndexWithConfigurationTest.java
new file mode 100755
index 0000000..c7448f4
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/bugs/AxisChangeIndexWithConfigurationTest.java
@@ -0,0 +1,31 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.bugs;
+
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+
+/**
+ * This allow to test the change index style for the table with configuration.
+ */
+@PluginResource("resources/bugs/bug473155/AxisChangeIndexWithConfiguration.di")
+public class AxisChangeIndexWithConfigurationTest extends AbstractAxisChangeIndexTest {
+
+ /**
+ * Constructor.
+ */
+ public AxisChangeIndexWithConfigurationTest() {
+ super();
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/bugs/AxisChangeIndexWithoutConfigurationTest.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/bugs/AxisChangeIndexWithoutConfigurationTest.java
new file mode 100755
index 0000000..d0306cb
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/bugs/AxisChangeIndexWithoutConfigurationTest.java
@@ -0,0 +1,31 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.bugs;
+
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+
+/**
+ * This allow to test the change index style for the table without configuration.
+ */
+@PluginResource("resources/bugs/bug473155/AxisChangeIndexWithoutConfiguration.di")
+public class AxisChangeIndexWithoutConfigurationTest extends AbstractAxisChangeIndexTest {
+
+ /**
+ * Constructor.
+ */
+ public AxisChangeIndexWithoutConfigurationTest() {
+ super();
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/bugs/InvertedAxisChangeIndexWithConfigurationTest.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/bugs/InvertedAxisChangeIndexWithConfigurationTest.java
new file mode 100755
index 0000000..0fea5f0
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/bugs/InvertedAxisChangeIndexWithConfigurationTest.java
@@ -0,0 +1,31 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.bugs;
+
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+
+/**
+ * This allow to test the change index style for the table with configuration and with inverted axis.
+ */
+@PluginResource("resources/bugs/bug473155/InvertedAxisChangeIndexWithConfiguration.di")
+public class InvertedAxisChangeIndexWithConfigurationTest extends AbstractInvertedAxisChangeIndexTest {
+
+ /**
+ * Constructor.
+ */
+ public InvertedAxisChangeIndexWithConfigurationTest() {
+ super();
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/bugs/InvertedAxisChangeIndexWithoutConfigurationTest.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/bugs/InvertedAxisChangeIndexWithoutConfigurationTest.java
new file mode 100755
index 0000000..2edeb0a
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/bugs/InvertedAxisChangeIndexWithoutConfigurationTest.java
@@ -0,0 +1,31 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.bugs;
+
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+
+/**
+ * This allow to test the change index style for the table without configuration and with inverted axis.
+ */
+@PluginResource("resources/bugs/bug473155/InvertedAxisChangeIndexWithoutConfiguration.di")
+public class InvertedAxisChangeIndexWithoutConfigurationTest extends AbstractInvertedAxisChangeIndexTest {
+
+ /**
+ * Constructor.
+ */
+ public InvertedAxisChangeIndexWithoutConfigurationTest() {
+ super();
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/bugs/RequirementReorderingTest.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/bugs/RequirementReorderingTest.java
new file mode 100755
index 0000000..406ec92
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/bugs/RequirementReorderingTest.java
@@ -0,0 +1,184 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.bugs;
+
+import java.util.List;
+
+import org.eclipse.emf.edit.command.MoveCommand;
+import org.eclipse.papyrus.infra.core.sashwindows.di.service.IPageManager;
+import org.eclipse.papyrus.infra.nattable.common.editor.NatTableEditor;
+import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.TableUtils;
+import org.eclipse.papyrus.junit.utils.rules.PapyrusEditorFixture;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+/**
+ * This allow to define the tests for the requirement reodering.
+ */
+@PluginResource("resources/bugs/bug439501/RequirementsReordering.di")
+public class RequirementReorderingTest extends AbstractPapyrusTest {
+
+ /**
+ * The table name.
+ */
+ private static final String TABLE_NAME = "RequirementTable0"; //$NON-NLS-1$
+
+ /**
+ * The first requirement name.
+ */
+ private static final String REQUIREMENT_1 = "Requirement1"; //$NON-NLS-1$
+
+ /**
+ * The second requirement name.
+ */
+ private static final String REQUIREMENT_2 = "Requirement2"; //$NON-NLS-1$
+
+ /**
+ * The third requirement name.
+ */
+ private static final String REQUIREMENT_3 = "Requirement3"; //$NON-NLS-1$
+
+ /**
+ * The fourth requirement name.
+ */
+ private static final String REQUIREMENT_4 = "Requirement4"; //$NON-NLS-1$
+
+
+ /**
+ * The papyrus fixture.
+ */
+ @Rule
+ public final PapyrusEditorFixture fixture = new PapyrusEditorFixture();
+
+ /**
+ * The model reference.
+ */
+ protected Model model;
+
+ /**
+ * Constructor.
+ */
+ public RequirementReorderingTest() {
+ super();
+ }
+
+ /**
+ * This allow to initialize the tests.
+ */
+ @Before
+ public void init() {
+ model = (Model) fixture.getModel();
+ Assert.assertNotNull("RootModel is null", model); //$NON-NLS-1$
+
+ // Get the table and open it
+ Table mainTable = TableUtils.getNotationFirstTable(fixture.getModelSet(), TABLE_NAME);
+ fixture.getPageManager().openPage(mainTable);
+ fixture.flushDisplayEvents();
+ }
+
+ /**
+ * The test for the requirements reordering.
+ *
+ * @throws Exception
+ * The exception.
+ */
+ @Test
+ public void testRequirementsReordering() throws Exception {
+ // Open the table and get the manager
+ final IPageManager pageManager = fixture.getPageManager();
+ final List<Object> pages = pageManager.allPages();
+ pageManager.openPage(pages.get(0));
+ final IEditorPart part = fixture.getEditor().getActiveEditor();
+ Assert.assertTrue(part instanceof NatTableEditor);
+ final NatTableEditor editor = (NatTableEditor) part;
+ final INattableModelManager currentManager = (INattableModelManager) editor.getAdapter(INattableModelManager.class);
+ Assert.assertTrue(currentManager instanceof INattableModelManager);
+
+ // check initial data
+ checkInitialData(currentManager);
+
+ final MoveCommand moveCommand = new MoveCommand(editor.getEditingDomain(), model, UMLPackage.eINSTANCE.getPackage_PackagedElement(), 1, 3);
+ editor.getEditingDomain().getCommandStack().execute(moveCommand);
+ fixture.flushDisplayEvents();
+
+ // Check modified data
+ checkModifiedData(currentManager);
+
+ editor.getEditingDomain().getCommandStack().undo();
+ fixture.flushDisplayEvents();
+
+ // Check initial data
+ checkInitialData(currentManager);
+
+ editor.getEditingDomain().getCommandStack().redo();
+ fixture.flushDisplayEvents();
+
+ // Check modified data
+ checkModifiedData(currentManager);
+ }
+
+ /**
+ * This allows to check the initial table data.
+ *
+ * @param currentManager
+ * The nattable model manager.
+ */
+ protected void checkInitialData(final INattableModelManager currentManager) {
+ final List<Object> rowElements = currentManager.getRowElementsList();
+
+ final Object firstRowRepresentedElement = rowElements.get(0);
+ Assert.assertEquals("The first row element is not the expected one", REQUIREMENT_1, ((NamedElement) firstRowRepresentedElement).getName()); //$NON-NLS-1$
+
+ final Object secondRowRepresentedElement = rowElements.get(1);
+ Assert.assertEquals("The second row element is not the expected one", REQUIREMENT_2, ((NamedElement) secondRowRepresentedElement).getName()); //$NON-NLS-1$
+
+ final Object thirdRowRepresentedElement = rowElements.get(2);
+ Assert.assertEquals("The third row element is not the expected one", REQUIREMENT_3, ((NamedElement) thirdRowRepresentedElement).getName()); //$NON-NLS-1$
+
+ final Object fourthRowRepresentedElement = rowElements.get(3);
+ Assert.assertEquals("The fourth row element is not the expected one", REQUIREMENT_4, ((NamedElement) fourthRowRepresentedElement).getName()); //$NON-NLS-1$
+ }
+
+ /**
+ * This allows to check the modified table data.
+ *
+ * @param currentManager
+ * The nattable model manager.
+ */
+ protected void checkModifiedData(final INattableModelManager currentManager) {
+ final List<Object> rowElements = currentManager.getRowElementsList();
+
+ final Object firstRowRepresentedElement = rowElements.get(0);
+ Assert.assertEquals("The first row element is not the expected one", REQUIREMENT_1, ((NamedElement) firstRowRepresentedElement).getName()); //$NON-NLS-1$
+
+ final Object secondRowRepresentedElement = rowElements.get(1);
+ Assert.assertEquals("The second row element is not the expected one", REQUIREMENT_3, ((NamedElement) secondRowRepresentedElement).getName()); //$NON-NLS-1$
+
+ final Object thirdRowRepresentedElement = rowElements.get(2);
+ Assert.assertEquals("The third row element is not the expected one", REQUIREMENT_4, ((NamedElement) thirdRowRepresentedElement).getName()); //$NON-NLS-1$
+
+ final Object fourthRowRepresentedElement = rowElements.get(3);
+ Assert.assertEquals("The fourth row element is not the expected one", REQUIREMENT_2, ((NamedElement) fourthRowRepresentedElement).getName()); //$NON-NLS-1$
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/importfile/AbstractImportCellsTest.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/importfile/AbstractImportCellsTest.java
new file mode 100755
index 0000000..d474492
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/importfile/AbstractImportCellsTest.java
@@ -0,0 +1,47 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.importfile;
+
+import org.eclipse.nebula.widgets.nattable.NatTable;
+import org.eclipse.nebula.widgets.nattable.selection.command.ClearAllSelectionsCommand;
+import org.eclipse.nebula.widgets.nattable.selection.command.SelectCellCommand;
+import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager;
+
+/**
+ * This class allows to manage the import CSV file tests into rows.
+ */
+public abstract class AbstractImportCellsTest extends AbstractImportTest {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.generic.tests.paste.overwrite.AbstractPasteOverwriteTest#manageSelection(org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager)
+ */
+ @Override
+ public void manageSelection(final NattableModelManager manager) throws Exception {
+ final NatTable natTable = (NatTable) manager.getAdapter(NatTable.class);
+ natTable.doCommand(new ClearAllSelectionsCommand());
+ manager.getBodyLayerStack().getSelectionLayer().doCommand(new SelectCellCommand(manager.getBodyLayerStack().getSelectionLayer(), 0, 0, false, false));
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.nattable.generic.tests.insert.AbstractInsertTest#getCommandId()
+ *
+ * @return
+ */
+ @Override
+ public String getCommandId() {
+ return "org.eclipse.papyrus.infra.nattable.row.import.command"; //$NON-NLS-1$
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/importfile/AbstractImportEmptyTest.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/importfile/AbstractImportEmptyTest.java
new file mode 100755
index 0000000..cbe4181
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/importfile/AbstractImportEmptyTest.java
@@ -0,0 +1,45 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.importfile;
+
+import org.eclipse.nebula.widgets.nattable.NatTable;
+import org.eclipse.nebula.widgets.nattable.selection.command.ClearAllSelectionsCommand;
+import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager;
+
+/**
+ * This class allows to manage the import CSV file tests into rows.
+ */
+public abstract class AbstractImportEmptyTest extends AbstractImportTest {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.generic.tests.paste.overwrite.AbstractPasteOverwriteTest#manageSelection(org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager)
+ */
+ @Override
+ public void manageSelection(final NattableModelManager manager) throws Exception {
+ final NatTable natTable = (NatTable) manager.getAdapter(NatTable.class);
+ natTable.doCommand(new ClearAllSelectionsCommand());
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.nattable.generic.tests.insert.AbstractInsertTest#getCommandId()
+ *
+ * @return
+ */
+ @Override
+ public String getCommandId() {
+ return "org.eclipse.papyrus.infra.nattable.import.command"; //$NON-NLS-1$
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/importfile/AbstractImportRowsTest.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/importfile/AbstractImportRowsTest.java
new file mode 100755
index 0000000..1f10605
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/importfile/AbstractImportRowsTest.java
@@ -0,0 +1,47 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.importfile;
+
+import org.eclipse.nebula.widgets.nattable.NatTable;
+import org.eclipse.nebula.widgets.nattable.selection.command.ClearAllSelectionsCommand;
+import org.eclipse.nebula.widgets.nattable.selection.command.SelectRowsCommand;
+import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager;
+
+/**
+ * This class allows to manage the import CSV file tests into rows.
+ */
+public abstract class AbstractImportRowsTest extends AbstractImportTest {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.generic.tests.paste.overwrite.AbstractPasteOverwriteTest#manageSelection(org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager)
+ */
+ @Override
+ public void manageSelection(final NattableModelManager manager) throws Exception {
+ final NatTable natTable = (NatTable) manager.getAdapter(NatTable.class);
+ natTable.doCommand(new ClearAllSelectionsCommand());
+ manager.getBodyLayerStack().getSelectionLayer().doCommand(new SelectRowsCommand(manager.getBodyLayerStack().getSelectionLayer(), 0, 0, false, false));
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.nattable.generic.tests.insert.AbstractInsertTest#getCommandId()
+ *
+ * @return
+ */
+ @Override
+ public String getCommandId() {
+ return "org.eclipse.papyrus.infra.nattable.row.import.command"; //$NON-NLS-1$
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/importfile/AbstractImportTest.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/importfile/AbstractImportTest.java
new file mode 100755
index 0000000..3c432ab
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/importfile/AbstractImportTest.java
@@ -0,0 +1,145 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.importfile;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.commands.Command;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.IHandler;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.papyrus.infra.nattable.common.editor.NatTableEditor;
+import org.eclipse.papyrus.infra.nattable.handler.ImportTableHandler;
+import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager;
+import org.eclipse.papyrus.infra.tools.util.FileUtils;
+import org.eclipse.papyrus.infra.ui.util.EclipseCommandUtils;
+import org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.overwrite.AbstractPasteInsertTest;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.commands.ICommandService;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * This class allows to manage the import CSV file tests.
+ */
+public abstract class AbstractImportTest extends AbstractPasteInsertTest {
+
+ /**
+ * The path of the model to test.
+ */
+ public static final String INSERT_FOLDER_PATH = "/resources/import/"; //$NON-NLS-1$
+
+ /**
+ * The variable name to determinate if the final dialog must be opened for the import.
+ */
+ public static final String OPEN_DIALOG_BOOLEAN_PARAMETER = "openDialog"; //$NON-NLS-1$
+
+ /**
+ * The variable name to determinate the selected file path.
+ */
+ public static final String SELECTED_FILE_PATH_STRING_PARAMETER = "selectedFilePath"; //$NON-NLS-1$
+
+ /**
+ * Constructor.
+ */
+ public AbstractImportTest() {
+ super();
+ }
+
+ /**
+ * This allows to test the paste.
+ *
+ * @throws Exception
+ * The caught exception
+ */
+ @Test
+ public void testImport() throws Exception {
+ // Open the table and get the manager
+ testOpenExistingTable(getClass().getSimpleName(), "RequirementTable0"); //$NON-NLS-1$
+ final IEditorPart editorPart = editor.getActiveEditor();
+ Assert.assertTrue("Table editor must be a nattable editor", editorPart instanceof NatTableEditor); //$NON-NLS-1$
+ final INattableModelManager currentManager = (INattableModelManager) editor.getAdapter(INattableModelManager.class);
+ Assert.assertTrue("The manager must be a nattable model manager", currentManager instanceof NattableModelManager); //$NON-NLS-1$
+ final NattableModelManager manager = (NattableModelManager) currentManager;
+
+ // Check the table context before command
+ checkTableContent(manager, INITIAL_POST_FILE_NAME);
+
+ // Manage the selection
+ flushDisplayEvents();
+ manageSelection(manager);
+ flushDisplayEvents();
+
+ // fill the clipboard
+ final ICommandService commandService = EclipseCommandUtils.getCommandService();
+ Assert.assertNotNull("The command service must not be null", commandService); //$NON-NLS-1$
+
+ // Get the paste command
+ final Command cmd = commandService.getCommand(getCommandId()); // $NON-NLS-1$
+ final IHandler handler = cmd.getHandler();
+ Assert.assertTrue("The handler must be enabled", handler.isEnabled()); //$NON-NLS-1$
+
+ // Execute the command with the non-UI parameters
+ final Map<Object, Object> parameters = new HashMap<Object, Object>();
+ parameters.put(ImportTableHandler.OPEN_DIALOG_BOOLEAN_PARAMETER, Boolean.FALSE);
+ manageParameters(parameters, manager);
+ final ExecutionEvent event = new ExecutionEvent(cmd, parameters, null, null);
+ flushDisplayEvents();
+ cmd.executeWithChecks(event);
+
+ // Check the table content after command
+ checkTableContent(manager, RESULT_POST_FILE_NAME);
+
+ // Undo/Redo
+ testUndo_Redo(manager);
+ }
+
+ /**
+ * This allows to add parameters if necessary
+ *
+ * @param parameters
+ * The parameters for the command.
+ */
+ public void manageParameters(final Map<Object, Object> parameters, final INattableModelManager manager) {
+ // Create the path for the csv to load (must be with the following form : 'resources/import/TableName.csv')
+ URI uri = manager.getTable().eResource().getURI();
+ uri = uri.trimFileExtension();
+ final StringBuffer buffer = new StringBuffer(uri.lastSegment());
+ buffer.append(FileUtils.DOT_STRING);
+ buffer.append(FileUtils.CSV_EXTENSIOn);
+
+ String csvFileAsString = getWantedString(buffer.toString());
+
+ parameters.put(ImportTableHandler.SELECTED_FILE_PATH_STRING_PARAMETER, csvFileAsString);
+ }
+
+ /**
+ * This allows to get the command id.
+ *
+ * @return The command id.
+ */
+ public abstract String getCommandId();
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.tests.AbstractOpenTableTest#getSourcePath()
+ */
+ @Override
+ protected String getSourcePath() {
+ return INSERT_FOLDER_PATH;
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/importfile/ImportCellsAll_Test.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/importfile/ImportCellsAll_Test.java
new file mode 100755
index 0000000..6361b6c
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/importfile/ImportCellsAll_Test.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.importfile;
+
+import org.eclipse.nebula.widgets.nattable.selection.command.SelectCellCommand;
+import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager;
+
+/**
+ * Test import all of selection with hidden categories.
+ */
+public class ImportCellsAll_Test extends AbstractImportCellsTest {
+
+ /**
+ * Constructor.
+ */
+ public ImportCellsAll_Test() {
+ super();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.generic.tests.importfile.AbstractImportEmptyTest#manageSelection(org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager)
+ */
+ @Override
+ public void manageSelection(final NattableModelManager manager) throws Exception {
+ super.manageSelection(manager);
+ manager.getBodyLayerStack().getSelectionLayer().doCommand(new SelectCellCommand(manager.getBodyLayerStack().getSelectionLayer(), 2, 2, true, false));
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/importfile/ImportEmptyAddAll_Test.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/importfile/ImportEmptyAddAll_Test.java
new file mode 100755
index 0000000..3eb0906
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/importfile/ImportEmptyAddAll_Test.java
@@ -0,0 +1,44 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.importfile;
+
+import java.util.Map;
+
+import org.eclipse.papyrus.infra.nattable.handler.ImportTableHandler;
+import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+import org.eclipse.papyrus.infra.nattable.utils.UserActionConstants;
+
+/**
+ * Test import all of selection with hidden categories.
+ */
+public class ImportEmptyAddAll_Test extends AbstractImportEmptyTest {
+
+ /**
+ * Constructor.
+ */
+ public ImportEmptyAddAll_Test() {
+ super();
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.nattable.generic.tests.insert.AbstractInsertTest#manageParameters(java.util.Map)
+ *
+ * @param parameters
+ */
+ @Override
+ public void manageParameters(final Map<Object, Object> parameters, final INattableModelManager manager) {
+ super.manageParameters(parameters, manager);
+ parameters.put(ImportTableHandler.USER_ACTION__PREFERRED_USER_ACTION, UserActionConstants.ADD_USER_ACTION);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/importfile/ImportEmptyReplaceAll_Test.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/importfile/ImportEmptyReplaceAll_Test.java
new file mode 100755
index 0000000..ee3f73a
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/importfile/ImportEmptyReplaceAll_Test.java
@@ -0,0 +1,44 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.importfile;
+
+import java.util.Map;
+
+import org.eclipse.papyrus.infra.nattable.handler.ImportTableHandler;
+import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+import org.eclipse.papyrus.infra.nattable.utils.UserActionConstants;
+
+/**
+ * Test import all of selection with hidden categories.
+ */
+public class ImportEmptyReplaceAll_Test extends AbstractImportEmptyTest {
+
+ /**
+ * Constructor.
+ */
+ public ImportEmptyReplaceAll_Test() {
+ super();
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.nattable.generic.tests.insert.AbstractInsertTest#manageParameters(java.util.Map)
+ *
+ * @param parameters
+ */
+ @Override
+ public void manageParameters(final Map<Object, Object> parameters, final INattableModelManager manager) {
+ super.manageParameters(parameters, manager);
+ parameters.put(ImportTableHandler.USER_ACTION__PREFERRED_USER_ACTION, UserActionConstants.REPLACE_USER_ACTION);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/importfile/ImportEmptySkipAll_Test.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/importfile/ImportEmptySkipAll_Test.java
new file mode 100755
index 0000000..0fcf2b0
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/importfile/ImportEmptySkipAll_Test.java
@@ -0,0 +1,55 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.importfile;
+
+import java.util.Map;
+
+import org.eclipse.papyrus.infra.nattable.handler.ImportTableHandler;
+import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager;
+import org.eclipse.papyrus.infra.nattable.utils.UserActionConstants;
+
+/**
+ * Test import all of selection with hidden categories.
+ */
+public class ImportEmptySkipAll_Test extends AbstractImportEmptyTest {
+
+ /**
+ * Constructor.
+ */
+ public ImportEmptySkipAll_Test() {
+ super();
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.nattable.generic.tests.insert.AbstractInsertTest#manageParameters(java.util.Map)
+ *
+ * @param parameters
+ */
+ @Override
+ public void manageParameters(final Map<Object, Object> parameters, final INattableModelManager manager) {
+ super.manageParameters(parameters, manager);
+ parameters.put(ImportTableHandler.USER_ACTION__PREFERRED_USER_ACTION, UserActionConstants.SKIP_USER_ACTION);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.generic.tests.paste.overwrite.AbstractPasteInsertTest#testUndo_Redo(org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager)
+ */
+ @Override
+ protected void testUndo_Redo(final NattableModelManager treeManager) throws Exception {
+ // Do nothing
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/importfile/ImportRowsAddAll_Test.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/importfile/ImportRowsAddAll_Test.java
new file mode 100755
index 0000000..4ff5280
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/importfile/ImportRowsAddAll_Test.java
@@ -0,0 +1,58 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.importfile;
+
+import java.util.Map;
+
+import org.eclipse.nebula.widgets.nattable.selection.command.SelectRowsCommand;
+import org.eclipse.papyrus.infra.nattable.handler.ImportTableHandler;
+import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager;
+import org.eclipse.papyrus.infra.nattable.utils.UserActionConstants;
+
+/**
+ * Test import all of selection with hidden categories.
+ */
+public class ImportRowsAddAll_Test extends AbstractImportRowsTest {
+
+ /**
+ * Constructor.
+ */
+ public ImportRowsAddAll_Test() {
+ super();
+ }
+
+ /**
+ * Manage the selection with the shift key.
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.paste.overwrite.AbstractPasteOverwriteTest#manageSelection(org.eclipse.papyrus.infra.nattable.manager.table.TreeNattableModelManager)
+ */
+ @Override
+ public void manageSelection(final NattableModelManager manager) throws Exception {
+ super.manageSelection(manager);
+ manager.getBodyLayerStack().getSelectionLayer().doCommand(new SelectRowsCommand(manager.getBodyLayerStack().getSelectionLayer(), 0, 2, true, false));
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.nattable.generic.tests.insert.AbstractInsertTest#manageParameters(java.util.Map)
+ *
+ * @param parameters
+ */
+ @Override
+ public void manageParameters(final Map<Object, Object> parameters, final INattableModelManager manager) {
+ super.manageParameters(parameters, manager);
+ parameters.put(ImportTableHandler.USER_ACTION__PREFERRED_USER_ACTION, UserActionConstants.ADD_USER_ACTION);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/importfile/ImportRowsReplaceAll_Test.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/importfile/ImportRowsReplaceAll_Test.java
new file mode 100755
index 0000000..0c2c09a
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/importfile/ImportRowsReplaceAll_Test.java
@@ -0,0 +1,58 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.importfile;
+
+import java.util.Map;
+
+import org.eclipse.nebula.widgets.nattable.selection.command.SelectRowsCommand;
+import org.eclipse.papyrus.infra.nattable.handler.ImportTableHandler;
+import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager;
+import org.eclipse.papyrus.infra.nattable.utils.UserActionConstants;
+
+/**
+ * Test import all of selection with hidden categories.
+ */
+public class ImportRowsReplaceAll_Test extends AbstractImportRowsTest {
+
+ /**
+ * Constructor.
+ */
+ public ImportRowsReplaceAll_Test() {
+ super();
+ }
+
+ /**
+ * Manage the selection with the shift key.
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.paste.overwrite.AbstractPasteOverwriteTest#manageSelection(org.eclipse.papyrus.infra.nattable.manager.table.TreeNattableModelManager)
+ */
+ @Override
+ public void manageSelection(final NattableModelManager manager) throws Exception {
+ super.manageSelection(manager);
+ manager.getBodyLayerStack().getSelectionLayer().doCommand(new SelectRowsCommand(manager.getBodyLayerStack().getSelectionLayer(), 0, 2, true, false));
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.nattable.generic.tests.insert.AbstractInsertTest#manageParameters(java.util.Map)
+ *
+ * @param parameters
+ */
+ @Override
+ public void manageParameters(final Map<Object, Object> parameters, final INattableModelManager manager) {
+ super.manageParameters(parameters, manager);
+ parameters.put(ImportTableHandler.USER_ACTION__PREFERRED_USER_ACTION, UserActionConstants.REPLACE_USER_ACTION);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/importfile/ImportRowsSkipAll_Test.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/importfile/ImportRowsSkipAll_Test.java
new file mode 100755
index 0000000..1306ad2
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/importfile/ImportRowsSkipAll_Test.java
@@ -0,0 +1,68 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.importfile;
+
+import java.util.Map;
+
+import org.eclipse.nebula.widgets.nattable.selection.command.SelectRowsCommand;
+import org.eclipse.papyrus.infra.nattable.handler.ImportTableHandler;
+import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager;
+import org.eclipse.papyrus.infra.nattable.utils.UserActionConstants;
+
+/**
+ * Test import all of selection with hidden categories.
+ */
+public class ImportRowsSkipAll_Test extends AbstractImportRowsTest {
+
+ /**
+ * Constructor.
+ */
+ public ImportRowsSkipAll_Test() {
+ super();
+ }
+
+ /**
+ * Manage the selection with the shift key.
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.paste.overwrite.AbstractPasteOverwriteTest#manageSelection(org.eclipse.papyrus.infra.nattable.manager.table.TreeNattableModelManager)
+ */
+ @Override
+ public void manageSelection(final NattableModelManager manager) throws Exception {
+ super.manageSelection(manager);
+ manager.getBodyLayerStack().getSelectionLayer().doCommand(new SelectRowsCommand(manager.getBodyLayerStack().getSelectionLayer(), 0, 2, true, false));
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.nattable.generic.tests.insert.AbstractInsertTest#manageParameters(java.util.Map)
+ *
+ * @param parameters
+ */
+ @Override
+ public void manageParameters(final Map<Object, Object> parameters, final INattableModelManager manager) {
+ super.manageParameters(parameters, manager);
+ parameters.put(ImportTableHandler.USER_ACTION__PREFERRED_USER_ACTION, UserActionConstants.SKIP_USER_ACTION);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.generic.tests.paste.overwrite.AbstractPasteInsertTest#testUndo_Redo(org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager)
+ */
+ @Override
+ protected void testUndo_Redo(final NattableModelManager treeManager) throws Exception {
+ // Do nothing
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/insert/AbstractInsertEmptyTest.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/insert/AbstractInsertEmptyTest.java
new file mode 100755
index 0000000..bc61b00
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/insert/AbstractInsertEmptyTest.java
@@ -0,0 +1,45 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.insert;
+
+import org.eclipse.nebula.widgets.nattable.NatTable;
+import org.eclipse.nebula.widgets.nattable.selection.command.ClearAllSelectionsCommand;
+import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager;
+
+/**
+ * This class allows to manage the insert tests.
+ */
+public abstract class AbstractInsertEmptyTest extends AbstractInsertTest {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.generic.tests.paste.overwrite.AbstractPasteOverwriteTest#manageSelection(org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager)
+ */
+ @Override
+ public void manageSelection(final NattableModelManager manager) throws Exception {
+ final NatTable natTable = (NatTable) manager.getAdapter(NatTable.class);
+ natTable.doCommand(new ClearAllSelectionsCommand());
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.nattable.generic.tests.insert.AbstractInsertTest#getCommandId()
+ *
+ * @return
+ */
+ @Override
+ public String getCommandId() {
+ return "org.eclipse.papyrus.infra.nattable.insert"; //$NON-NLS-1$
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/insert/AbstractInsertRowsTest.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/insert/AbstractInsertRowsTest.java
new file mode 100755
index 0000000..513db46
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/insert/AbstractInsertRowsTest.java
@@ -0,0 +1,47 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.insert;
+
+import org.eclipse.nebula.widgets.nattable.NatTable;
+import org.eclipse.nebula.widgets.nattable.selection.command.ClearAllSelectionsCommand;
+import org.eclipse.nebula.widgets.nattable.selection.command.SelectRowsCommand;
+import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager;
+
+/**
+ * This class allows to manage the insert tests.
+ */
+public abstract class AbstractInsertRowsTest extends AbstractInsertTest {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.generic.tests.paste.overwrite.AbstractPasteOverwriteTest#manageSelection(org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager)
+ */
+ @Override
+ public void manageSelection(final NattableModelManager manager) throws Exception {
+ final NatTable natTable = (NatTable) manager.getAdapter(NatTable.class);
+ natTable.doCommand(new ClearAllSelectionsCommand());
+ manager.getBodyLayerStack().getSelectionLayer().doCommand(new SelectRowsCommand(manager.getBodyLayerStack().getSelectionLayer(), 0, 0, false, false));
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.nattable.generic.tests.insert.AbstractInsertTest#getCommandId()
+ *
+ * @return
+ */
+ @Override
+ public String getCommandId() {
+ return "org.eclipse.papyrus.infra.nattable.row.insert"; //$NON-NLS-1$
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/insert/AbstractInsertTest.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/insert/AbstractInsertTest.java
new file mode 100755
index 0000000..07b95df
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/insert/AbstractInsertTest.java
@@ -0,0 +1,127 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.insert;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.papyrus.infra.nattable.common.editor.NatTableEditor;
+import org.eclipse.papyrus.infra.nattable.handler.InsertInTableHandler;
+import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager;
+import org.eclipse.papyrus.infra.nattable.utils.PasteInsertUtil;
+import org.eclipse.papyrus.infra.tools.util.FileUtils;
+import org.eclipse.papyrus.sysml.nattable.requirement.tests.Activator;
+import org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.overwrite.AbstractPasteInsertTest;
+import org.eclipse.ui.IEditorPart;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * This class allows to manage the insert tests.
+ */
+public abstract class AbstractInsertTest extends AbstractPasteInsertTest {
+
+ /**
+ * The path of the model to test.
+ */
+ public static final String INSERT_FOLDER_PATH = "/resources/insert/"; //$NON-NLS-1$
+
+ /**
+ * Constructor.
+ */
+ public AbstractInsertTest() {
+ super();
+ }
+
+ /**
+ * This allows to test the paste.
+ *
+ * @throws Exception
+ * The caught exception
+ */
+ @Test
+ public void testInsert() throws Exception {
+ // Open the table and get the manager
+ testOpenExistingTable(getClass().getSimpleName(), "RequirementTable0"); //$NON-NLS-1$
+ final IEditorPart editorPart = editor.getActiveEditor();
+ Assert.assertTrue("Table editor must be a nattable editor", editorPart instanceof NatTableEditor); //$NON-NLS-1$
+ final INattableModelManager currentManager = (INattableModelManager) editor.getAdapter(INattableModelManager.class);
+ Assert.assertTrue("The manager must be a nattable model manager", currentManager instanceof NattableModelManager); //$NON-NLS-1$
+ final NattableModelManager manager = (NattableModelManager) currentManager;
+
+ // Check the table context before command
+ checkTableContent(manager, INITIAL_POST_FILE_NAME);
+
+ // Manage the selection
+ manageSelection(manager);
+ flushDisplayEvents();
+
+ // fill the clipboard
+ final String fileName = getSuffixStateFileName(manager, TOCOPY_POST_FILE_NAME);
+ final String str = FileUtils.getStringFromPlatformFile(Activator.PLUGIN_ID, getSourcePath(), fileName);
+ fillClipboard("Fill the clipboard to enable the handler"); //$NON-NLS-1$
+
+ // Execute the command with the non-UI parameters
+ final Map<Object, Object> parameters = new HashMap<Object, Object>();
+ parameters.put(InsertInTableHandler.OPEN_DIALOG_ON_FAIL_BOOLEAN_PARAMETER, Boolean.FALSE);
+ parameters.put(InsertInTableHandler.OPEN__PROGRESS_MONITOR_DIALOG, Boolean.FALSE);
+ // This parameters allows to set the text to paste instead of copy/paste it programmatically (this may be overwrite by other copy)
+ parameters.put(InsertInTableHandler.TEXT_TO_PASTE, str);
+ manageParameters(parameters);
+ flushDisplayEvents();
+ final Object res = PasteInsertUtil.insert(manager, manager.getSelectionInTable(), parameters);
+ Assert.assertTrue("The result must be a status", res instanceof IStatus); //$NON-NLS-1$
+ final IStatus status = (IStatus) res;
+
+ // Check the returned status
+ checkReturned_Status(status);
+
+ if (status.isOK()) {
+ // Check the table content after command
+ checkTableContent(manager, RESULT_POST_FILE_NAME);
+
+ // Undo/Redo
+ testUndo_Redo(manager);
+ }
+ }
+
+ /**
+ * This allows to add parameters if necessary
+ *
+ * @param parameters
+ * The parameters for the command.
+ */
+ public void manageParameters(final Map<Object, Object> parameters) {
+ // Do nothing
+ }
+
+ /**
+ * This allows to get the command id.
+ *
+ * @return The command id.
+ */
+ public abstract String getCommandId();
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.tests.AbstractOpenTableTest#getSourcePath()
+ */
+ @Override
+ protected String getSourcePath() {
+ return INSERT_FOLDER_PATH;
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/insert/InsertEmptyAddAll_Test.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/insert/InsertEmptyAddAll_Test.java
new file mode 100755
index 0000000..b354eff
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/insert/InsertEmptyAddAll_Test.java
@@ -0,0 +1,57 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.insert;
+
+import java.util.Map;
+
+import org.eclipse.nebula.widgets.nattable.selection.command.SelectRowsCommand;
+import org.eclipse.papyrus.infra.nattable.handler.InsertInTableHandler;
+import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager;
+import org.eclipse.papyrus.infra.nattable.utils.UserActionConstants;
+
+/**
+ * Test insert all of selection with hidden categories.
+ */
+public class InsertEmptyAddAll_Test extends AbstractInsertEmptyTest {
+
+ /**
+ * Constructor.
+ */
+ public InsertEmptyAddAll_Test() {
+ super();
+ }
+
+ /**
+ * Manage the selection with the shift key.
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.paste.overwrite.AbstractPasteOverwriteTest#manageSelection(org.eclipse.papyrus.infra.nattable.manager.table.TreeNattableModelManager)
+ */
+ @Override
+ public void manageSelection(final NattableModelManager manager) throws Exception {
+ super.manageSelection(manager);
+ manager.getBodyLayerStack().getSelectionLayer().doCommand(new SelectRowsCommand(manager.getBodyLayerStack().getSelectionLayer(), 0, 2, true, false));
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.nattable.generic.tests.insert.AbstractInsertTest#manageParameters(java.util.Map)
+ *
+ * @param parameters
+ */
+ @Override
+ public void manageParameters(Map<Object, Object> parameters) {
+ super.manageParameters(parameters);
+ parameters.put(InsertInTableHandler.USER_ACTION__PREFERRED_USER_ACTION, UserActionConstants.ADD_USER_ACTION);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/insert/InsertEmptyAxisIdentifierNotExisting_Test.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/insert/InsertEmptyAxisIdentifierNotExisting_Test.java
new file mode 100755
index 0000000..4caccb4
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/insert/InsertEmptyAxisIdentifierNotExisting_Test.java
@@ -0,0 +1,59 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.insert;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.nebula.widgets.nattable.selection.command.SelectRowsCommand;
+import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager;
+import org.eclipse.papyrus.infra.nattable.messages.Messages;
+import org.junit.Assert;
+
+/**
+ * Test insert all of selection with hidden categories.
+ */
+public class InsertEmptyAxisIdentifierNotExisting_Test extends AbstractInsertEmptyTest {
+
+ /**
+ * Constructor.
+ */
+ public InsertEmptyAxisIdentifierNotExisting_Test() {
+ super();
+ }
+
+ /**
+ * Manage the selection with the shift key.
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.paste.overwrite.AbstractPasteOverwriteTest#manageSelection(org.eclipse.papyrus.infra.nattable.manager.table.TreeNattableModelManager)
+ */
+ @Override
+ public void manageSelection(final NattableModelManager manager) throws Exception {
+ super.manageSelection(manager);
+ manager.getBodyLayerStack().getSelectionLayer().doCommand(new SelectRowsCommand(manager.getBodyLayerStack().getSelectionLayer(), 0, 2, true, false));
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.paste.overwrite.AbstractPasteOverwriteTest#checkReturned_Status(org.eclipse.core.runtime.IStatus)
+ */
+ @Override
+ protected void checkReturned_Status(final IStatus status) {
+ Assert.assertEquals("Error must be caught", IStatus.ERROR, status.getSeverity()); //$NON-NLS-1$
+ Assert.assertEquals("Error message is not the expected message", Messages.AbstractPasteInSelectionNattableCommandProvider_ThePasteHasNotBeenDoneBecauseOfSomeProblems, status.getMessage()); //$NON-NLS-1$
+ Assert.assertTrue("Status must be a multi-status", status instanceof MultiStatus); //$NON-NLS-1$
+ Assert.assertEquals("Error message is not the expected message", Messages.AbstractPasteInSelectionNattableCommandProvider_TheAxisUsedAsIdentifierNotAvailable, ((MultiStatus)status).getChildren()[0].getMessage()); //$NON-NLS-1$
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/insert/InsertEmptyClipboard_Test.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/insert/InsertEmptyClipboard_Test.java
new file mode 100755
index 0000000..c9435c5
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/insert/InsertEmptyClipboard_Test.java
@@ -0,0 +1,42 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.insert;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.papyrus.infra.nattable.messages.Messages;
+import org.junit.Assert;
+
+/**
+ * Test insert with empty clipboard.
+ */
+public class InsertEmptyClipboard_Test extends AbstractInsertEmptyTest {
+
+ /**
+ * Constructor.
+ */
+ public InsertEmptyClipboard_Test() {
+ super();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.overwrite.AbstractPasteInsertTest#checkReturned_Status(org.eclipse.core.runtime.IStatus)
+ */
+ @Override
+ protected void checkReturned_Status(final IStatus status) {
+ Assert.assertEquals("Error must be caught", IStatus.ERROR, status.getSeverity()); //$NON-NLS-1$
+ Assert.assertEquals("Error message is not the expected message", Messages.PasteImportHandler_EmptyClipboardString, status.getMessage()); //$NON-NLS-1$
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/insert/InsertEmptyFailColumns_Test.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/insert/InsertEmptyFailColumns_Test.java
new file mode 100755
index 0000000..533f810
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/insert/InsertEmptyFailColumns_Test.java
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.insert;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.nebula.widgets.nattable.selection.command.SelectRowsCommand;
+import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager;
+import org.eclipse.papyrus.infra.nattable.messages.Messages;
+import org.junit.Assert;
+
+/**
+ * Test insert when the number of columns to paste is not equals to the number of columns selected.
+ */
+public class InsertEmptyFailColumns_Test extends AbstractInsertEmptyTest {
+
+ /**
+ * Constructor.
+ */
+ public InsertEmptyFailColumns_Test() {
+ super();
+ }
+
+ /**
+ * Manage the selection with the shift key.
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.paste.overwrite.AbstractPasteOverwriteTest#manageSelection(org.eclipse.papyrus.infra.nattable.manager.table.TreeNattableModelManager)
+ */
+ @Override
+ public void manageSelection(final NattableModelManager manager) throws Exception {
+ super.manageSelection(manager);
+ manager.getBodyLayerStack().getSelectionLayer().doCommand(new SelectRowsCommand(manager.getBodyLayerStack().getSelectionLayer(), 0, 2, true, false));
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.paste.overwrite.AbstractPasteOverwriteTest#checkReturned_Status(org.eclipse.core.runtime.IStatus)
+ */
+ @Override
+ protected void checkReturned_Status(final IStatus status) {
+ Assert.assertEquals("Error must be caught", IStatus.ERROR, status.getSeverity()); //$NON-NLS-1$
+ Assert.assertEquals("Error message is not the expected message", Messages.AbstractPasteInSelectionNattableCommandProvider_readcolumnsexceedsexistingcolumns, status.getMessage()); //$NON-NLS-1$
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/insert/InsertEmptyReplaceAll_Test.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/insert/InsertEmptyReplaceAll_Test.java
new file mode 100755
index 0000000..91861a4
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/insert/InsertEmptyReplaceAll_Test.java
@@ -0,0 +1,57 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.insert;
+
+import java.util.Map;
+
+import org.eclipse.nebula.widgets.nattable.selection.command.SelectRowsCommand;
+import org.eclipse.papyrus.infra.nattable.handler.InsertInTableHandler;
+import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager;
+import org.eclipse.papyrus.infra.nattable.utils.UserActionConstants;
+
+/**
+ * Test insert all of selection with hidden categories.
+ */
+public class InsertEmptyReplaceAll_Test extends AbstractInsertEmptyTest {
+
+ /**
+ * Constructor.
+ */
+ public InsertEmptyReplaceAll_Test() {
+ super();
+ }
+
+ /**
+ * Manage the selection with the shift key.
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.paste.overwrite.AbstractPasteOverwriteTest#manageSelection(org.eclipse.papyrus.infra.nattable.manager.table.TreeNattableModelManager)
+ */
+ @Override
+ public void manageSelection(final NattableModelManager manager) throws Exception {
+ super.manageSelection(manager);
+ manager.getBodyLayerStack().getSelectionLayer().doCommand(new SelectRowsCommand(manager.getBodyLayerStack().getSelectionLayer(), 0, 2, true, false));
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.nattable.generic.tests.insert.AbstractInsertTest#manageParameters(java.util.Map)
+ *
+ * @param parameters
+ */
+ @Override
+ public void manageParameters(Map<Object, Object> parameters) {
+ super.manageParameters(parameters);
+ parameters.put(InsertInTableHandler.USER_ACTION__PREFERRED_USER_ACTION, UserActionConstants.REPLACE_USER_ACTION);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/insert/InsertEmptySkipAll_Test.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/insert/InsertEmptySkipAll_Test.java
new file mode 100755
index 0000000..dd645cb
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/insert/InsertEmptySkipAll_Test.java
@@ -0,0 +1,68 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.insert;
+
+import java.util.Map;
+
+import org.eclipse.nebula.widgets.nattable.selection.command.SelectRowsCommand;
+import org.eclipse.papyrus.infra.nattable.handler.InsertInTableHandler;
+import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager;
+import org.eclipse.papyrus.infra.nattable.utils.UserActionConstants;
+
+/**
+ * Test insert all of selection with hidden categories.
+ */
+public class InsertEmptySkipAll_Test extends AbstractInsertEmptyTest {
+
+ /**
+ * Constructor.
+ */
+ public InsertEmptySkipAll_Test() {
+ super();
+ }
+
+ /**
+ * Manage the selection with the shift key.
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.paste.overwrite.AbstractPasteOverwriteTest#manageSelection(org.eclipse.papyrus.infra.nattable.manager.table.TreeNattableModelManager)
+ */
+ @Override
+ public void manageSelection(final NattableModelManager manager) throws Exception {
+ super.manageSelection(manager);
+ manager.getBodyLayerStack().getSelectionLayer().doCommand(new SelectRowsCommand(manager.getBodyLayerStack().getSelectionLayer(), 0, 2, true, false));
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.nattable.generic.tests.insert.AbstractInsertTest#manageParameters(java.util.Map)
+ *
+ * @param parameters
+ */
+ @Override
+ public void manageParameters(Map<Object, Object> parameters) {
+ super.manageParameters(parameters);
+ parameters.put(InsertInTableHandler.USER_ACTION__PREFERRED_USER_ACTION, UserActionConstants.SKIP_USER_ACTION);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.overwrite.AbstractPasteInsertTest#testUndo_Redo(org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager)
+ *
+ * @param treeManager
+ * @throws Exception
+ */
+ @Override
+ protected void testUndo_Redo(NattableModelManager treeManager) throws Exception {
+ // Do nothing
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/insert/InsertEmptyWarningNotExisting_Test.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/insert/InsertEmptyWarningNotExisting_Test.java
new file mode 100755
index 0000000..5c3962e
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/insert/InsertEmptyWarningNotExisting_Test.java
@@ -0,0 +1,59 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.insert;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.nebula.widgets.nattable.selection.command.SelectRowsCommand;
+import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager;
+import org.eclipse.papyrus.infra.nattable.messages.Messages;
+import org.junit.Assert;
+
+/**
+ * Test pastes overwrite all of selection with hidden categories.
+ */
+public class InsertEmptyWarningNotExisting_Test extends AbstractInsertEmptyTest {
+
+ /**
+ * Constructor.
+ */
+ public InsertEmptyWarningNotExisting_Test() {
+ super();
+ }
+
+ /**
+ * Manage the selection with the shift key.
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.paste.overwrite.AbstractPasteOverwriteTest#manageSelection(org.eclipse.papyrus.infra.nattable.manager.table.TreeNattableModelManager)
+ */
+ @Override
+ public void manageSelection(final NattableModelManager manager) throws Exception {
+ super.manageSelection(manager);
+ manager.getBodyLayerStack().getSelectionLayer().doCommand(new SelectRowsCommand(manager.getBodyLayerStack().getSelectionLayer(), 0, 2, true, false));
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.paste.overwrite.AbstractPasteOverwriteTest#checkReturned_Status(org.eclipse.core.runtime.IStatus)
+ */
+ @Override
+ protected void checkReturned_Status(final IStatus status) {
+ Assert.assertEquals("Warning must be caught", IStatus.WARNING, status.getSeverity()); //$NON-NLS-1$
+ Assert.assertEquals("Warning message is not the expected message", Messages.AbstractPasteInSelectionNattableCommandProvider_ThePasteHasBeenDoneWithSomeProblems, status.getMessage()); //$NON-NLS-1$
+ Assert.assertTrue("Status must be a multi-status", status instanceof MultiStatus); //$NON-NLS-1$
+ Assert.assertEquals("Warning message is not the expected message", "The identifier 'Class2' was not found in the selection, so the object was created", ((MultiStatus)status).getChildren()[0].getMessage()); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/insert/InsertRowsAddAll_Test.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/insert/InsertRowsAddAll_Test.java
new file mode 100755
index 0000000..16d6ecd
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/insert/InsertRowsAddAll_Test.java
@@ -0,0 +1,57 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.insert;
+
+import java.util.Map;
+
+import org.eclipse.nebula.widgets.nattable.selection.command.SelectRowsCommand;
+import org.eclipse.papyrus.infra.nattable.handler.InsertInTableHandler;
+import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager;
+import org.eclipse.papyrus.infra.nattable.utils.UserActionConstants;
+
+/**
+ * Test insert all of selection with hidden categories.
+ */
+public class InsertRowsAddAll_Test extends AbstractInsertRowsTest {
+
+ /**
+ * Constructor.
+ */
+ public InsertRowsAddAll_Test() {
+ super();
+ }
+
+ /**
+ * Manage the selection with the shift key.
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.paste.overwrite.AbstractPasteOverwriteTest#manageSelection(org.eclipse.papyrus.infra.nattable.manager.table.TreeNattableModelManager)
+ */
+ @Override
+ public void manageSelection(final NattableModelManager manager) throws Exception {
+ super.manageSelection(manager);
+ manager.getBodyLayerStack().getSelectionLayer().doCommand(new SelectRowsCommand(manager.getBodyLayerStack().getSelectionLayer(), 0, 2, true, false));
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.nattable.generic.tests.insert.AbstractInsertTest#manageParameters(java.util.Map)
+ *
+ * @param parameters
+ */
+ @Override
+ public void manageParameters(Map<Object, Object> parameters) {
+ super.manageParameters(parameters);
+ parameters.put(InsertInTableHandler.USER_ACTION__PREFERRED_USER_ACTION, UserActionConstants.ADD_USER_ACTION);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/insert/InsertRowsAxisIdentifierNotExisting_Test.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/insert/InsertRowsAxisIdentifierNotExisting_Test.java
new file mode 100755
index 0000000..8fbcc71
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/insert/InsertRowsAxisIdentifierNotExisting_Test.java
@@ -0,0 +1,59 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.insert;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.nebula.widgets.nattable.selection.command.SelectRowsCommand;
+import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager;
+import org.eclipse.papyrus.infra.nattable.messages.Messages;
+import org.junit.Assert;
+
+/**
+ * Test insert all of selection with hidden categories.
+ */
+public class InsertRowsAxisIdentifierNotExisting_Test extends AbstractInsertRowsTest {
+
+ /**
+ * Constructor.
+ */
+ public InsertRowsAxisIdentifierNotExisting_Test() {
+ super();
+ }
+
+ /**
+ * Manage the selection with the shift key.
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.paste.overwrite.AbstractPasteOverwriteTest#manageSelection(org.eclipse.papyrus.infra.nattable.manager.table.TreeNattableModelManager)
+ */
+ @Override
+ public void manageSelection(final NattableModelManager manager) throws Exception {
+ super.manageSelection(manager);
+ manager.getBodyLayerStack().getSelectionLayer().doCommand(new SelectRowsCommand(manager.getBodyLayerStack().getSelectionLayer(), 0, 2, true, false));
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.paste.overwrite.AbstractPasteOverwriteTest#checkReturned_Status(org.eclipse.core.runtime.IStatus)
+ */
+ @Override
+ protected void checkReturned_Status(final IStatus status) {
+ Assert.assertEquals("Error must be caught", IStatus.ERROR, status.getSeverity()); //$NON-NLS-1$
+ Assert.assertEquals("Error message is not the expected message", Messages.AbstractPasteInSelectionNattableCommandProvider_ThePasteHasNotBeenDoneBecauseOfSomeProblems, status.getMessage()); //$NON-NLS-1$
+ Assert.assertTrue("Status must be a multi-status", status instanceof MultiStatus); //$NON-NLS-1$
+ Assert.assertEquals("Error message is not the expected message", Messages.AbstractPasteInSelectionNattableCommandProvider_TheAxisUsedAsIdentifierNotAvailable, ((MultiStatus)status).getChildren()[0].getMessage()); //$NON-NLS-1$
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/insert/InsertRowsFailColumns_Test.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/insert/InsertRowsFailColumns_Test.java
new file mode 100755
index 0000000..633faac
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/insert/InsertRowsFailColumns_Test.java
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.insert;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.nebula.widgets.nattable.selection.command.SelectRowsCommand;
+import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager;
+import org.eclipse.papyrus.infra.nattable.messages.Messages;
+import org.junit.Assert;
+
+/**
+ * Test insert when the number of columns to paste is not equals to the number of columns selected.
+ */
+public class InsertRowsFailColumns_Test extends AbstractInsertRowsTest {
+
+ /**
+ * Constructor.
+ */
+ public InsertRowsFailColumns_Test() {
+ super();
+ }
+
+ /**
+ * Manage the selection with the shift key.
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.paste.overwrite.AbstractPasteOverwriteTest#manageSelection(org.eclipse.papyrus.infra.nattable.manager.table.TreeNattableModelManager)
+ */
+ @Override
+ public void manageSelection(final NattableModelManager manager) throws Exception {
+ super.manageSelection(manager);
+ manager.getBodyLayerStack().getSelectionLayer().doCommand(new SelectRowsCommand(manager.getBodyLayerStack().getSelectionLayer(), 0, 2, true, false));
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.paste.overwrite.AbstractPasteOverwriteTest#checkReturned_Status(org.eclipse.core.runtime.IStatus)
+ */
+ @Override
+ protected void checkReturned_Status(final IStatus status) {
+ Assert.assertEquals("Error must be caught", IStatus.ERROR, status.getSeverity()); //$NON-NLS-1$
+ Assert.assertEquals("Error message is not the expected message", Messages.AbstractPasteInSelectionNattableCommandProvider_readcolumnsexceedsexistingcolumns, status.getMessage()); //$NON-NLS-1$
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/insert/InsertRowsFailRows_Test.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/insert/InsertRowsFailRows_Test.java
new file mode 100755
index 0000000..0bafd6a
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/insert/InsertRowsFailRows_Test.java
@@ -0,0 +1,57 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.insert;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.nebula.widgets.nattable.selection.command.SelectRowsCommand;
+import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager;
+import org.eclipse.papyrus.infra.nattable.messages.Messages;
+import org.junit.Assert;
+
+/**
+ * Test insert when the number of rows to paste is not equals to the number of rows selected.
+ */
+public class InsertRowsFailRows_Test extends AbstractInsertRowsTest {
+
+ /**
+ * Constructor.
+ */
+ public InsertRowsFailRows_Test() {
+ super();
+ }
+
+ /**
+ * Manage the selection with the shift key.
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.paste.overwrite.AbstractPasteOverwriteTest#manageSelection(org.eclipse.papyrus.infra.nattable.manager.table.TreeNattableModelManager)
+ */
+ @Override
+ public void manageSelection(final NattableModelManager manager) throws Exception {
+ super.manageSelection(manager);
+ manager.getBodyLayerStack().getSelectionLayer().doCommand(new SelectRowsCommand(manager.getBodyLayerStack().getSelectionLayer(), 0, 1, true, false));
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.paste.overwrite.AbstractPasteOverwriteTest#checkReturned_Status(org.eclipse.core.runtime.IStatus)
+ */
+ @Override
+ protected void checkReturned_Status(final IStatus status) {
+ Assert.assertEquals("Error must be caught", IStatus.ERROR, status.getSeverity()); //$NON-NLS-1$
+ Assert.assertEquals("Error message is not the expected message", Messages.AbstractPasteInSelectionNattableCommandProvider_readrowsexceedsexistingrows, status.getMessage()); //$NON-NLS-1$
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/insert/InsertRowsReplaceAll_Test.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/insert/InsertRowsReplaceAll_Test.java
new file mode 100755
index 0000000..e45a6c9
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/insert/InsertRowsReplaceAll_Test.java
@@ -0,0 +1,57 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.insert;
+
+import java.util.Map;
+
+import org.eclipse.nebula.widgets.nattable.selection.command.SelectRowsCommand;
+import org.eclipse.papyrus.infra.nattable.handler.InsertInTableHandler;
+import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager;
+import org.eclipse.papyrus.infra.nattable.utils.UserActionConstants;
+
+/**
+ * Test insert all of selection with hidden categories.
+ */
+public class InsertRowsReplaceAll_Test extends AbstractInsertRowsTest {
+
+ /**
+ * Constructor.
+ */
+ public InsertRowsReplaceAll_Test() {
+ super();
+ }
+
+ /**
+ * Manage the selection with the shift key.
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.paste.overwrite.AbstractPasteOverwriteTest#manageSelection(org.eclipse.papyrus.infra.nattable.manager.table.TreeNattableModelManager)
+ */
+ @Override
+ public void manageSelection(final NattableModelManager manager) throws Exception {
+ super.manageSelection(manager);
+ manager.getBodyLayerStack().getSelectionLayer().doCommand(new SelectRowsCommand(manager.getBodyLayerStack().getSelectionLayer(), 0, 2, true, false));
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.nattable.generic.tests.insert.AbstractInsertTest#manageParameters(java.util.Map)
+ *
+ * @param parameters
+ */
+ @Override
+ public void manageParameters(Map<Object, Object> parameters) {
+ super.manageParameters(parameters);
+ parameters.put(InsertInTableHandler.USER_ACTION__PREFERRED_USER_ACTION, UserActionConstants.REPLACE_USER_ACTION);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/insert/InsertRowsSkipAll_Test.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/insert/InsertRowsSkipAll_Test.java
new file mode 100755
index 0000000..10cb2fc
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/insert/InsertRowsSkipAll_Test.java
@@ -0,0 +1,68 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.insert;
+
+import java.util.Map;
+
+import org.eclipse.nebula.widgets.nattable.selection.command.SelectRowsCommand;
+import org.eclipse.papyrus.infra.nattable.handler.InsertInTableHandler;
+import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager;
+import org.eclipse.papyrus.infra.nattable.utils.UserActionConstants;
+
+/**
+ * Test insert all of selection with hidden categories.
+ */
+public class InsertRowsSkipAll_Test extends AbstractInsertRowsTest {
+
+ /**
+ * Constructor.
+ */
+ public InsertRowsSkipAll_Test() {
+ super();
+ }
+
+ /**
+ * Manage the selection with the shift key.
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.paste.overwrite.AbstractPasteOverwriteTest#manageSelection(org.eclipse.papyrus.infra.nattable.manager.table.TreeNattableModelManager)
+ */
+ @Override
+ public void manageSelection(final NattableModelManager manager) throws Exception {
+ super.manageSelection(manager);
+ manager.getBodyLayerStack().getSelectionLayer().doCommand(new SelectRowsCommand(manager.getBodyLayerStack().getSelectionLayer(), 0, 2, true, false));
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.nattable.generic.tests.insert.AbstractInsertTest#manageParameters(java.util.Map)
+ *
+ * @param parameters
+ */
+ @Override
+ public void manageParameters(Map<Object, Object> parameters) {
+ super.manageParameters(parameters);
+ parameters.put(InsertInTableHandler.USER_ACTION__PREFERRED_USER_ACTION, UserActionConstants.SKIP_USER_ACTION);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.overwrite.AbstractPasteInsertTest#testUndo_Redo(org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager)
+ *
+ * @param treeManager
+ * @throws Exception
+ */
+ @Override
+ protected void testUndo_Redo(NattableModelManager treeManager) throws Exception {
+ // Do nothing
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/insert/InsertRowsWarningNotExisting_Test.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/insert/InsertRowsWarningNotExisting_Test.java
new file mode 100755
index 0000000..e3e94e0
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/insert/InsertRowsWarningNotExisting_Test.java
@@ -0,0 +1,59 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.insert;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.nebula.widgets.nattable.selection.command.SelectRowsCommand;
+import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager;
+import org.eclipse.papyrus.infra.nattable.messages.Messages;
+import org.junit.Assert;
+
+/**
+ * Test pastes overwrite all of selection with hidden categories.
+ */
+public class InsertRowsWarningNotExisting_Test extends AbstractInsertRowsTest {
+
+ /**
+ * Constructor.
+ */
+ public InsertRowsWarningNotExisting_Test() {
+ super();
+ }
+
+ /**
+ * Manage the selection with the shift key.
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.paste.overwrite.AbstractPasteOverwriteTest#manageSelection(org.eclipse.papyrus.infra.nattable.manager.table.TreeNattableModelManager)
+ */
+ @Override
+ public void manageSelection(final NattableModelManager manager) throws Exception {
+ super.manageSelection(manager);
+ manager.getBodyLayerStack().getSelectionLayer().doCommand(new SelectRowsCommand(manager.getBodyLayerStack().getSelectionLayer(), 0, 2, true, false));
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.paste.overwrite.AbstractPasteOverwriteTest#checkReturned_Status(org.eclipse.core.runtime.IStatus)
+ */
+ @Override
+ protected void checkReturned_Status(final IStatus status) {
+ Assert.assertEquals("Warning must be caught", IStatus.WARNING, status.getSeverity()); //$NON-NLS-1$
+ Assert.assertEquals("Warning message is not the expected message", Messages.AbstractPasteInSelectionNattableCommandProvider_ThePasteHasBeenDoneWithSomeProblems, status.getMessage()); //$NON-NLS-1$
+ Assert.assertTrue("Status must be a multi-status", status instanceof MultiStatus); //$NON-NLS-1$
+ Assert.assertEquals("Warning message is not the expected message", "The identifier 'Class2' was not found in the selection, so the object was created", ((MultiStatus)status).getChildren()[0].getMessage()); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/AbstractPasteCellsOverwriteTest.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/AbstractPasteCellsOverwriteTest.java
new file mode 100755
index 0000000..70f131f
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/AbstractPasteCellsOverwriteTest.java
@@ -0,0 +1,37 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.overwrite;
+
+import org.eclipse.nebula.widgets.nattable.NatTable;
+import org.eclipse.nebula.widgets.nattable.selection.command.ClearAllSelectionsCommand;
+import org.eclipse.nebula.widgets.nattable.selection.command.SelectCellCommand;
+import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager;
+
+/**
+ * This class allows to manage the paste with overwrite tests.
+ */
+public abstract class AbstractPasteCellsOverwriteTest extends AbstractPasteOverwriteTest {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.paste.overwrite.AbstractPasteOverwriteTest#manageSelection(org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager)
+ */
+ @Override
+ public void manageSelection(final NattableModelManager manager) throws Exception {
+ final NatTable natTable = (NatTable) manager.getAdapter(NatTable.class);
+ natTable.doCommand(new ClearAllSelectionsCommand());
+ manager.getBodyLayerStack().getSelectionLayer().doCommand(new SelectCellCommand(manager.getBodyLayerStack().getSelectionLayer(), 0, 0, false, false));
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/AbstractPasteColumnsOverwriteTest.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/AbstractPasteColumnsOverwriteTest.java
new file mode 100755
index 0000000..7183eac
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/AbstractPasteColumnsOverwriteTest.java
@@ -0,0 +1,37 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.overwrite;
+
+import org.eclipse.nebula.widgets.nattable.NatTable;
+import org.eclipse.nebula.widgets.nattable.selection.command.ClearAllSelectionsCommand;
+import org.eclipse.nebula.widgets.nattable.selection.command.SelectColumnCommand;
+import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager;
+
+/**
+ * This class allows to manage the paste with overwrite tests.
+ */
+public abstract class AbstractPasteColumnsOverwriteTest extends AbstractPasteOverwriteTest {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.paste.overwrite.AbstractPasteOverwriteTest#manageSelection(org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager)
+ */
+ @Override
+ public void manageSelection(final NattableModelManager manager) throws Exception {
+ final NatTable natTable = (NatTable) manager.getAdapter(NatTable.class);
+ natTable.doCommand(new ClearAllSelectionsCommand());
+ manager.getBodyLayerStack().getSelectionLayer().doCommand(new SelectColumnCommand(manager.getBodyLayerStack().getSelectionLayer(), 0, 0, false, false));
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/AbstractPasteEmptyOverwriteTest.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/AbstractPasteEmptyOverwriteTest.java
new file mode 100755
index 0000000..5476e9e
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/AbstractPasteEmptyOverwriteTest.java
@@ -0,0 +1,35 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.overwrite;
+
+import org.eclipse.nebula.widgets.nattable.NatTable;
+import org.eclipse.nebula.widgets.nattable.selection.command.ClearAllSelectionsCommand;
+import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager;
+
+/**
+ * This class allows to manage the paste with overwrite tests.
+ */
+public abstract class AbstractPasteEmptyOverwriteTest extends AbstractPasteOverwriteTest {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.paste.overwrite.AbstractPasteOverwriteTest#manageSelection(org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager)
+ */
+ @Override
+ public void manageSelection(final NattableModelManager manager) throws Exception {
+ final NatTable natTable = (NatTable) manager.getAdapter(NatTable.class);
+ natTable.doCommand(new ClearAllSelectionsCommand());
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/AbstractPasteInsertTest.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/AbstractPasteInsertTest.java
new file mode 100755
index 0000000..1e7a98a
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/AbstractPasteInsertTest.java
@@ -0,0 +1,218 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.overwrite;
+
+import java.awt.Toolkit;
+import java.awt.datatransfer.StringSelection;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.util.List;
+
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.nebula.widgets.nattable.NatTable;
+import org.eclipse.nebula.widgets.nattable.grid.layer.GridLayer;
+import org.eclipse.papyrus.infra.nattable.export.file.PapyrusFileExportCommandHandler;
+import org.eclipse.papyrus.infra.nattable.export.file.PapyrusFileExporter;
+import org.eclipse.papyrus.infra.nattable.export.file.command.PapyrusFileExportCommand;
+import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager;
+import org.eclipse.papyrus.infra.nattable.style.configattribute.PapyrusExportConfigAttributes;
+import org.eclipse.papyrus.infra.tools.util.FileUtils;
+import org.eclipse.papyrus.junit.utils.GenericUtils;
+import org.eclipse.papyrus.sysml.nattable.requirement.tests.Activator;
+import org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.without.service.edit.AbstractOpenTableTest;
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.Before;
+
+/**
+ * This class allows to manage the paste with overwrite tests.
+ */
+public abstract class AbstractPasteInsertTest extends AbstractOpenTableTest {
+
+ /**
+ * The path of the model to test.
+ */
+ public static final String PASTE_FOLDER_PATH = "/resources/paste_overwrite/"; //$NON-NLS-1$
+
+ /**
+ * The suffix of the file containing the initial content.
+ */
+ public static final String INITIAL_POST_FILE_NAME = "_Initial"; //$NON-NLS-1$
+
+ /**
+ * The suffix of the file containing the content to copy.
+ */
+ public static final String TOCOPY_POST_FILE_NAME = "_ToCopy"; //$NON-NLS-1$
+
+ /**
+ * The suffix of the file containing the result content.
+ */
+ public static final String RESULT_POST_FILE_NAME = "_Result"; //$NON-NLS-1$
+
+ /**
+ * Constructor.
+ */
+ public AbstractPasteInsertTest() {
+ super();
+ }
+
+ /**
+ * Initialize the model.
+ *
+ * @throws Exception
+ * The caught exception.
+ */
+ @Before
+ public void initModel() throws Exception {
+ initModel("RequirementTable0", getClass().getSimpleName(), getBundle()); //$NON-NLS-1$
+ };
+
+ /**
+ * This allows to set the selection in table for the paste. The initial selection is the first cell of the table.
+ *
+ * @param manager
+ * The tree nattable model manager.
+ * @throws Exception
+ * The caught exception.
+ */
+ public abstract void manageSelection(final NattableModelManager manager) throws Exception;
+
+ /**
+ * This allows to test the undo redo commands.
+ *
+ * @param treeManager
+ * The tree nattable model manager.
+ * @throws Exception
+ * The caught exception.
+ */
+ protected void testUndo_Redo(final NattableModelManager treeManager) throws Exception {
+ // Check the undo
+ getTransactionalEditingDomain().getCommandStack().undo();
+ // Check the table context after undo
+ checkTableContent(treeManager, INITIAL_POST_FILE_NAME);
+
+ // Check the redo
+ getTransactionalEditingDomain().getCommandStack().redo();
+ // Check the table context after redo
+ checkTableContent(treeManager, RESULT_POST_FILE_NAME);
+ }
+
+ /**
+ * This allows to check the returned status.
+ *
+ * @param status
+ * The status.
+ */
+ protected void checkReturned_Status(final IStatus status) {
+ Assert.assertTrue("The status must be OK", status.isOK()); //$NON-NLS-1$
+ }
+
+ /**
+ * This allows to check the table content comparing the table content with file content.
+ *
+ * @param manager
+ * The nattable model manager.
+ * @param suffixFileName
+ * The suffix of the file to check.
+ * @throws Exception
+ * The caught exception.
+ */
+ protected void checkTableContent(final NattableModelManager manager, final String suffixFileName) throws Exception {
+ final NatTable natTable = (NatTable) manager.getAdapter(NatTable.class);
+ flushDisplayEvents();
+
+ // Unregister and register the papyrus file export to manage it without the shell
+ final GridLayer gridLayer = manager.getGridLayer();
+ gridLayer.unregisterCommandHandler(PapyrusFileExportCommand.class);
+ gridLayer.registerCommandHandler(new PapyrusFileExportCommandHandler(gridLayer.getBodyLayer(), false));
+
+ // Modify the config attribute of the file export to use the file name without the shell
+ IWorkspace workspace = ResourcesPlugin.getWorkspace();
+ final String wsFolder = workspace.getRoot().getLocation().toFile().getPath().toString();
+ final String contentFile = wsFolder + "\\content.txt"; //$NON-NLS-1$
+ natTable.getConfigRegistry().unregisterConfigAttribute(PapyrusExportConfigAttributes.SIMPLE_FILE_EXPORTER);
+ natTable.getConfigRegistry().registerConfigAttribute(PapyrusExportConfigAttributes.SIMPLE_FILE_EXPORTER, new PapyrusFileExporter(contentFile));
+ manager.exportToFile();
+
+ final StringBuilder content = new StringBuilder();
+ final List<String> allLines = Files.readAllLines(Paths.get(contentFile));
+ for (int index = 0; index < allLines.size(); index++) {
+ content.append(allLines.get(index));
+ if (index < allLines.size() - 1) {
+ content.append(FileUtils.getSystemPropertyLineSeparator());
+ }
+ }
+
+ final String str = getWantedString(getSuffixStateFileName(manager, suffixFileName));
+ // we check than the contents of the clipboard (so the displayed table) is the same than the wanted result
+ Assert.assertEquals("The clipboard must be equals to string which one it is filled", str, content.toString()); //$NON-NLS-1$
+ }
+
+ /**
+ * Get the string content from a file.
+ *
+ * @param fileName
+ * a file name
+ * @return
+ * the text stored in the file associated to this test
+ */
+ protected String getWantedString(final String fileName) {
+ return FileUtils.getStringFromPlatformFile(Activator.PLUGIN_ID, getSourcePath(), fileName, FileUtils.getSystemPropertyLineSeparator());// $NON-NLS-1$
+ }
+
+ /**
+ * Get the file name corresponding to the model with the suffix in parameter.
+ *
+ * @param manager
+ * The nattable model manager.
+ * @param suffixFileName
+ * The suffix of the file to get.
+ * @return The file name corresponding
+ */
+ protected String getSuffixStateFileName(final NattableModelManager manager, final String suffixFileName) {
+ URI uri = manager.getTable().eResource().getURI();
+ uri = uri.trimFileExtension();
+ final StringBuffer buffer = new StringBuffer(uri.lastSegment());
+ buffer.append(suffixFileName);
+ buffer.append(FileUtils.DOT_STRING);
+ buffer.append(FileUtils.TEXT_EXTENSION);
+ return buffer.toString();
+ }
+
+ /**
+ * This allows to fill the clipboard with the string in parameter.
+ *
+ * @param newClipBoardContents
+ * The string needed to fill the clipboard.
+ */
+ protected void fillClipboard(final String newClipBoardContents) {
+
+ // its seems that the clipboard must be filled with the same way than we read it!
+ java.awt.datatransfer.Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
+
+ StringSelection s = new StringSelection(newClipBoardContents);
+ clipboard.setContents(s, s);
+ }
+
+ /**
+ * This allow to close the opened editors.
+ */
+ @AfterClass
+ public static void endOfTest() {
+ GenericUtils.closeAllEditors();
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/AbstractPasteOverwriteTest.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/AbstractPasteOverwriteTest.java
new file mode 100755
index 0000000..06aee1e
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/AbstractPasteOverwriteTest.java
@@ -0,0 +1,114 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.overwrite;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.papyrus.infra.nattable.common.editor.NatTableEditor;
+import org.eclipse.papyrus.infra.nattable.handler.PasteInTableHandler;
+import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager;
+import org.eclipse.papyrus.infra.nattable.utils.PasteInsertUtil;
+import org.eclipse.papyrus.infra.tools.util.FileUtils;
+import org.eclipse.papyrus.sysml.nattable.requirement.tests.Activator;
+import org.eclipse.ui.IEditorPart;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * This class allows to manage the paste with overwrite tests.
+ */
+public abstract class AbstractPasteOverwriteTest extends AbstractPasteInsertTest {
+
+ /**
+ * Constructor.
+ */
+ public AbstractPasteOverwriteTest() {
+ super();
+ }
+
+ /**
+ * This allows to test the paste.
+ *
+ * @throws Exception
+ * The caught exception
+ */
+ @Test
+ public void testPaste() throws Exception {
+ // Open the table and get the manager
+ testOpenExistingTable(getClass().getSimpleName(), "RequirementTable0"); //$NON-NLS-1$
+ final IEditorPart editorPart = editor.getActiveEditor();
+ Assert.assertTrue("Table editor must be a nattable editor", editorPart instanceof NatTableEditor); //$NON-NLS-1$
+ final INattableModelManager currentManager = (INattableModelManager) editor.getAdapter(INattableModelManager.class);
+ Assert.assertTrue("The manager must be a nattable model manager", currentManager instanceof NattableModelManager); //$NON-NLS-1$
+ final NattableModelManager manager = (NattableModelManager) currentManager;
+
+ // Check the table context before command
+ checkTableContent(manager, INITIAL_POST_FILE_NAME);
+
+ // Manage the selection
+ manageSelection(manager);
+ flushDisplayEvents();
+
+ // fill the clipboard
+ final String fileName = getSuffixStateFileName(manager, TOCOPY_POST_FILE_NAME);
+ final String str = FileUtils.getStringFromPlatformFile(Activator.PLUGIN_ID, getSourcePath(), fileName);
+ fillClipboard("Fill the clipboard to enable the handler"); //$NON-NLS-1$
+
+ // Execute the command with the non-UI parameters
+ final Map<Object, Object> parameters = new HashMap<Object, Object>();
+ parameters.put(PasteInTableHandler.OPEN_DIALOG_ON_FAIL_BOOLEAN_PARAMETER, Boolean.FALSE);
+ parameters.put(PasteInTableHandler.OPEN__PROGRESS_MONITOR_DIALOG, Boolean.FALSE);
+ // This parameters allows to set the text to paste instead of copy/paste it programmatically (this may be overwrite by other copy)
+ parameters.put(PasteInTableHandler.TEXT_TO_PASTE, str);
+ manageParameters(parameters);
+ flushDisplayEvents();
+ final Object res = PasteInsertUtil.paste(manager, manager.getSelectionInTable(), parameters);
+ Assert.assertTrue("The result must be a status", res instanceof IStatus); //$NON-NLS-1$
+ final IStatus status = (IStatus) res;
+
+ // Check the returned status
+ checkReturned_Status(status);
+
+ if (status.isOK()) {
+ // Check the table content after command
+ checkTableContent(manager, RESULT_POST_FILE_NAME);
+
+ // Undo/Redo
+ testUndo_Redo(manager);
+ }
+ }
+
+ /**
+ * This allows to add parameters if necessary
+ *
+ * @param parameters
+ * The parameters for the command.
+ */
+ public void manageParameters(final Map<Object, Object> parameters) {
+ // Do nothing
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.tests.AbstractOpenTableTest#getSourcePath()
+ */
+ @Override
+ protected String getSourcePath() {
+ return PASTE_FOLDER_PATH;
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/AbstractPasteRowsOverwriteTest.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/AbstractPasteRowsOverwriteTest.java
new file mode 100755
index 0000000..65cded2
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/AbstractPasteRowsOverwriteTest.java
@@ -0,0 +1,37 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.overwrite;
+
+import org.eclipse.nebula.widgets.nattable.NatTable;
+import org.eclipse.nebula.widgets.nattable.selection.command.ClearAllSelectionsCommand;
+import org.eclipse.nebula.widgets.nattable.selection.command.SelectRowsCommand;
+import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager;
+
+/**
+ * This class allows to manage the paste with overwrite tests.
+ */
+public abstract class AbstractPasteRowsOverwriteTest extends AbstractPasteOverwriteTest {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.overwrite.AbstractPasteOverwriteTest#manageSelection(org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager)
+ */
+ @Override
+ public void manageSelection(final NattableModelManager manager) throws Exception {
+ final NatTable natTable = (NatTable) manager.getAdapter(NatTable.class);
+ natTable.doCommand(new ClearAllSelectionsCommand());
+ manager.getBodyLayerStack().getSelectionLayer().doCommand(new SelectRowsCommand(manager.getBodyLayerStack().getSelectionLayer(), 0, 0, false, false));
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/PasteCellsOverwriteAll_Test.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/PasteCellsOverwriteAll_Test.java
new file mode 100755
index 0000000..d7d0510
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/PasteCellsOverwriteAll_Test.java
@@ -0,0 +1,42 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.overwrite;
+
+import org.eclipse.nebula.widgets.nattable.selection.command.SelectCellCommand;
+import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager;
+
+/**
+ * Test pastes overwrite all of selection with hidden categories.
+ */
+public class PasteCellsOverwriteAll_Test extends AbstractPasteCellsOverwriteTest {
+
+ /**
+ * Constructor.
+ */
+ public PasteCellsOverwriteAll_Test() {
+ super();
+ }
+
+ /**
+ * Manage the selection with the shift key.
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.paste.overwrite.AbstractPasteOverwriteTest#manageSelection(org.eclipse.papyrus.infra.nattable.manager.table.TreeNattableModelManager)
+ */
+ @Override
+ public void manageSelection(final NattableModelManager manager) throws Exception {
+ super.manageSelection(manager);
+ manager.getBodyLayerStack().getSelectionLayer().doCommand(new SelectCellCommand(manager.getBodyLayerStack().getSelectionLayer(), 2, 2, true, false));
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/PasteCellsOverwriteByOneLine_Test.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/PasteCellsOverwriteByOneLine_Test.java
new file mode 100755
index 0000000..c96e4bd
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/PasteCellsOverwriteByOneLine_Test.java
@@ -0,0 +1,42 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.overwrite;
+
+import org.eclipse.nebula.widgets.nattable.selection.command.SelectCellCommand;
+import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager;
+
+/**
+ * Test pastes overwrite all of selection with hidden categories when a single line is copied.
+ */
+public class PasteCellsOverwriteByOneLine_Test extends AbstractPasteCellsOverwriteTest {
+
+ /**
+ * Constructor.
+ */
+ public PasteCellsOverwriteByOneLine_Test() {
+ super();
+ }
+
+ /**
+ * Manage the selection with the shift key.
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.paste.overwrite.AbstractPasteOverwriteTest#manageSelection(org.eclipse.papyrus.infra.nattable.manager.table.TreeNattableModelManager)
+ */
+ @Override
+ public void manageSelection(final NattableModelManager manager) throws Exception {
+ super.manageSelection(manager);
+ manager.getBodyLayerStack().getSelectionLayer().doCommand(new SelectCellCommand(manager.getBodyLayerStack().getSelectionLayer(), 2, 2, true, false));
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/PasteCellsOverwriteFailColumns_Test.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/PasteCellsOverwriteFailColumns_Test.java
new file mode 100755
index 0000000..f6baaeb
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/PasteCellsOverwriteFailColumns_Test.java
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.overwrite;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.nebula.widgets.nattable.selection.command.SelectCellCommand;
+import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager;
+import org.eclipse.papyrus.infra.nattable.messages.Messages;
+import org.junit.Assert;
+
+/**
+ * Test pastes overwrite when the number of columns to paste is not equals to the number of columns selected.
+ */
+public class PasteCellsOverwriteFailColumns_Test extends AbstractPasteCellsOverwriteTest {
+
+ /**
+ * Constructor.
+ */
+ public PasteCellsOverwriteFailColumns_Test() {
+ super();
+ }
+
+ /**
+ * Manage the selection with the shift key.
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.paste.overwrite.AbstractPasteOverwriteTest#manageSelection(org.eclipse.papyrus.infra.nattable.manager.table.TreeNattableModelManager)
+ */
+ @Override
+ public void manageSelection(final NattableModelManager manager) throws Exception {
+ super.manageSelection(manager);
+ manager.getBodyLayerStack().getSelectionLayer().doCommand(new SelectCellCommand(manager.getBodyLayerStack().getSelectionLayer(), 1, 2, true, false));
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.paste.overwrite.AbstractPasteOverwriteTest#checkReturned_Status(org.eclipse.core.runtime.IStatus)
+ */
+ @Override
+ protected void checkReturned_Status(final IStatus status) {
+ Assert.assertEquals("Error must be caught", IStatus.ERROR, status.getSeverity()); //$NON-NLS-1$
+ Assert.assertEquals("Error message is not the expected message", Messages.AbstractPasteInSelectionNattableCommandProvider_readcolumnsexceedsexistingcolumns, status.getMessage()); //$NON-NLS-1$
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/PasteCellsOverwriteFailRows_Test.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/PasteCellsOverwriteFailRows_Test.java
new file mode 100755
index 0000000..5562955
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/PasteCellsOverwriteFailRows_Test.java
@@ -0,0 +1,57 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.overwrite;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.nebula.widgets.nattable.selection.command.SelectCellCommand;
+import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager;
+import org.eclipse.papyrus.infra.nattable.messages.Messages;
+import org.junit.Assert;
+
+/**
+ * Test pastes overwrite when the number of rows to paste is not equals to the number of rows selected.
+ */
+public class PasteCellsOverwriteFailRows_Test extends AbstractPasteCellsOverwriteTest {
+
+ /**
+ * Constructor.
+ */
+ public PasteCellsOverwriteFailRows_Test() {
+ super();
+ }
+
+ /**
+ * Manage the selection with the shift key.
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.paste.overwrite.AbstractPasteOverwriteTest#manageSelection(org.eclipse.papyrus.infra.nattable.manager.table.TreeNattableModelManager)
+ */
+ @Override
+ public void manageSelection(final NattableModelManager manager) throws Exception {
+ super.manageSelection(manager);
+ manager.getBodyLayerStack().getSelectionLayer().doCommand(new SelectCellCommand(manager.getBodyLayerStack().getSelectionLayer(), 2, 1, true, false));
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.paste.overwrite.AbstractPasteOverwriteTest#checkReturned_Status(org.eclipse.core.runtime.IStatus)
+ */
+ @Override
+ protected void checkReturned_Status(final IStatus status) {
+ Assert.assertEquals("Error must be caught", IStatus.ERROR, status.getSeverity()); //$NON-NLS-1$
+ Assert.assertEquals("Error message is not the expected message", Messages.AbstractPasteInSelectionNattableCommandProvider_readrowsexceedsexistingrows, status.getMessage()); //$NON-NLS-1$
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/PasteColumnsOverwriteAll_Test.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/PasteColumnsOverwriteAll_Test.java
new file mode 100755
index 0000000..cd3cc07
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/PasteColumnsOverwriteAll_Test.java
@@ -0,0 +1,42 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.overwrite;
+
+import org.eclipse.nebula.widgets.nattable.selection.command.SelectColumnCommand;
+import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager;
+
+/**
+ * Test pastes overwrite all of selection with hidden categories.
+ */
+public class PasteColumnsOverwriteAll_Test extends AbstractPasteColumnsOverwriteTest {
+
+ /**
+ * Constructor.
+ */
+ public PasteColumnsOverwriteAll_Test() {
+ super();
+ }
+
+ /**
+ * Manage the selection with the shift key.
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.paste.overwrite.AbstractPasteOverwriteTest#manageSelection(org.eclipse.papyrus.infra.nattable.manager.table.TreeNattableModelManager)
+ */
+ @Override
+ public void manageSelection(final NattableModelManager manager) throws Exception {
+ super.manageSelection(manager);
+ manager.getBodyLayerStack().getSelectionLayer().doCommand(new SelectColumnCommand(manager.getBodyLayerStack().getSelectionLayer(), 2, 0, true, false));
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/PasteColumnsOverwriteByOneLine_Test.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/PasteColumnsOverwriteByOneLine_Test.java
new file mode 100755
index 0000000..8843d40
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/PasteColumnsOverwriteByOneLine_Test.java
@@ -0,0 +1,46 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.overwrite;
+
+import org.eclipse.nebula.widgets.nattable.NatTable;
+import org.eclipse.nebula.widgets.nattable.selection.command.ClearAllSelectionsCommand;
+import org.eclipse.nebula.widgets.nattable.selection.command.SelectColumnCommand;
+import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager;
+
+/**
+ * Test pastes overwrite all of selection with hidden categories when a single line is copied.
+ */
+public class PasteColumnsOverwriteByOneLine_Test extends AbstractPasteColumnsOverwriteTest {
+
+ /**
+ * Constructor.
+ */
+ public PasteColumnsOverwriteByOneLine_Test() {
+ super();
+ }
+
+ /**
+ * Manage the selection with the shift key.
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.paste.overwrite.AbstractPasteOverwriteTest#manageSelection(org.eclipse.papyrus.infra.nattable.manager.table.TreeNattableModelManager)
+ */
+ @Override
+ public void manageSelection(final NattableModelManager manager) throws Exception {
+ final NatTable natTable = (NatTable) manager.getAdapter(NatTable.class);
+ natTable.doCommand(new ClearAllSelectionsCommand());
+ manager.getBodyLayerStack().getSelectionLayer().doCommand(new SelectColumnCommand(manager.getBodyLayerStack().getSelectionLayer(), 1, 0, false, false));
+ manager.getBodyLayerStack().getSelectionLayer().doCommand(new SelectColumnCommand(manager.getBodyLayerStack().getSelectionLayer(), 2, 0, true, false));
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/PasteColumnsOverwriteFailColumns_Test.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/PasteColumnsOverwriteFailColumns_Test.java
new file mode 100755
index 0000000..94a27f3
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/PasteColumnsOverwriteFailColumns_Test.java
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.overwrite;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.nebula.widgets.nattable.selection.command.SelectColumnCommand;
+import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager;
+import org.eclipse.papyrus.infra.nattable.messages.Messages;
+import org.junit.Assert;
+
+/**
+ * Test pastes overwrite when the number of columns to paste is not equals to the number of columns selected.
+ */
+public class PasteColumnsOverwriteFailColumns_Test extends AbstractPasteColumnsOverwriteTest {
+
+ /**
+ * Constructor.
+ */
+ public PasteColumnsOverwriteFailColumns_Test() {
+ super();
+ }
+
+ /**
+ * Manage the selection with the shift key.
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.paste.overwrite.AbstractPasteOverwriteTest#manageSelection(org.eclipse.papyrus.infra.nattable.manager.table.TreeNattableModelManager)
+ */
+ @Override
+ public void manageSelection(final NattableModelManager manager) throws Exception {
+ super.manageSelection(manager);
+ manager.getBodyLayerStack().getSelectionLayer().doCommand(new SelectColumnCommand(manager.getBodyLayerStack().getSelectionLayer(), 1, 0, true, false));
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.paste.overwrite.AbstractPasteOverwriteTest#checkReturned_Status(org.eclipse.core.runtime.IStatus)
+ */
+ @Override
+ protected void checkReturned_Status(final IStatus status) {
+ Assert.assertEquals("Error must be caught", IStatus.ERROR, status.getSeverity()); //$NON-NLS-1$
+ Assert.assertEquals("Error message is not the expected message", Messages.AbstractPasteInSelectionNattableCommandProvider_readcolumnsexceedsexistingcolumns, status.getMessage()); //$NON-NLS-1$
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/PasteColumnsOverwriteFailRows_Test.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/PasteColumnsOverwriteFailRows_Test.java
new file mode 100755
index 0000000..94f5eca
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/PasteColumnsOverwriteFailRows_Test.java
@@ -0,0 +1,57 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.overwrite;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.nebula.widgets.nattable.selection.command.SelectColumnCommand;
+import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager;
+import org.eclipse.papyrus.infra.nattable.messages.Messages;
+import org.junit.Assert;
+
+/**
+ * Test pastes overwrite when the number of rows to paste is not equals to the number of rows selected.
+ */
+public class PasteColumnsOverwriteFailRows_Test extends AbstractPasteColumnsOverwriteTest {
+
+ /**
+ * Constructor.
+ */
+ public PasteColumnsOverwriteFailRows_Test() {
+ super();
+ }
+
+ /**
+ * Manage the selection with the shift key.
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.paste.overwrite.AbstractPasteOverwriteTest#manageSelection(org.eclipse.papyrus.infra.nattable.manager.table.TreeNattableModelManager)
+ */
+ @Override
+ public void manageSelection(final NattableModelManager manager) throws Exception {
+ super.manageSelection(manager);
+ manager.getBodyLayerStack().getSelectionLayer().doCommand(new SelectColumnCommand(manager.getBodyLayerStack().getSelectionLayer(), 2, 0, true, false));
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.paste.overwrite.AbstractPasteOverwriteTest#checkReturned_Status(org.eclipse.core.runtime.IStatus)
+ */
+ @Override
+ protected void checkReturned_Status(final IStatus status) {
+ Assert.assertEquals("Error must be caught", IStatus.ERROR, status.getSeverity()); //$NON-NLS-1$
+ Assert.assertEquals("Error message is not the expected message", Messages.AbstractPasteInSelectionNattableCommandProvider_readrowsexceedsexistingrows, status.getMessage()); //$NON-NLS-1$
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/PasteEmptyClipboard_Test.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/PasteEmptyClipboard_Test.java
new file mode 100755
index 0000000..826d8fc
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/PasteEmptyClipboard_Test.java
@@ -0,0 +1,42 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.overwrite;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.papyrus.infra.nattable.messages.Messages;
+import org.junit.Assert;
+
+/**
+ * Test paste with empty clipboard.
+ */
+public class PasteEmptyClipboard_Test extends AbstractPasteEmptyOverwriteTest {
+
+ /**
+ * Constructor.
+ */
+ public PasteEmptyClipboard_Test() {
+ super();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.overwrite.AbstractPasteInsertTest#checkReturned_Status(org.eclipse.core.runtime.IStatus)
+ */
+ @Override
+ protected void checkReturned_Status(final IStatus status) {
+ Assert.assertEquals("Error must be caught", IStatus.ERROR, status.getSeverity()); //$NON-NLS-1$
+ Assert.assertEquals("Error message is not the expected message", Messages.PasteImportHandler_EmptyClipboardString, status.getMessage()); //$NON-NLS-1$
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/PasteEmptyOverwriteAddAll_Test.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/PasteEmptyOverwriteAddAll_Test.java
new file mode 100755
index 0000000..59accf7
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/PasteEmptyOverwriteAddAll_Test.java
@@ -0,0 +1,57 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.overwrite;
+
+import java.util.Map;
+
+import org.eclipse.nebula.widgets.nattable.selection.command.SelectRowsCommand;
+import org.eclipse.papyrus.infra.nattable.handler.InsertInTableHandler;
+import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager;
+import org.eclipse.papyrus.infra.nattable.utils.UserActionConstants;
+
+/**
+ * Test pastes overwrite all of selection with hidden categories.
+ */
+public class PasteEmptyOverwriteAddAll_Test extends AbstractPasteEmptyOverwriteTest {
+
+ /**
+ * Constructor.
+ */
+ public PasteEmptyOverwriteAddAll_Test() {
+ super();
+ }
+
+ /**
+ * Manage the selection with the shift key.
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.paste.overwrite.AbstractPasteOverwriteTest#manageSelection(org.eclipse.papyrus.infra.nattable.manager.table.TreeNattableModelManager)
+ */
+ @Override
+ public void manageSelection(final NattableModelManager manager) throws Exception {
+ super.manageSelection(manager);
+ manager.getBodyLayerStack().getSelectionLayer().doCommand(new SelectRowsCommand(manager.getBodyLayerStack().getSelectionLayer(), 0, 2, true, false));
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.overwrite.AbstractPasteOverwriteTest#manageParameters(java.util.Map)
+ */
+ @Override
+ public void manageParameters(Map<Object, Object> parameters) {
+ super.manageParameters(parameters);
+ parameters.put(InsertInTableHandler.USER_ACTION__PREFERRED_USER_ACTION, UserActionConstants.ADD_USER_ACTION);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/PasteEmptyOverwriteAxisIdentifierNotExisting_Test.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/PasteEmptyOverwriteAxisIdentifierNotExisting_Test.java
new file mode 100755
index 0000000..7627c8e
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/PasteEmptyOverwriteAxisIdentifierNotExisting_Test.java
@@ -0,0 +1,59 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.overwrite;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.nebula.widgets.nattable.selection.command.SelectRowsCommand;
+import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager;
+import org.eclipse.papyrus.infra.nattable.messages.Messages;
+import org.junit.Assert;
+
+/**
+ * Test pastes overwrite all of selection with hidden categories.
+ */
+public class PasteEmptyOverwriteAxisIdentifierNotExisting_Test extends AbstractPasteEmptyOverwriteTest {
+
+ /**
+ * Constructor.
+ */
+ public PasteEmptyOverwriteAxisIdentifierNotExisting_Test() {
+ super();
+ }
+
+ /**
+ * Manage the selection with the shift key.
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.paste.overwrite.AbstractPasteOverwriteTest#manageSelection(org.eclipse.papyrus.infra.nattable.manager.table.TreeNattableModelManager)
+ */
+ @Override
+ public void manageSelection(final NattableModelManager manager) throws Exception {
+ super.manageSelection(manager);
+ manager.getBodyLayerStack().getSelectionLayer().doCommand(new SelectRowsCommand(manager.getBodyLayerStack().getSelectionLayer(), 0, 2, true, false));
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.paste.overwrite.AbstractPasteOverwriteTest#checkReturned_Status(org.eclipse.core.runtime.IStatus)
+ */
+ @Override
+ protected void checkReturned_Status(final IStatus status) {
+ Assert.assertEquals("Error must be caught", IStatus.ERROR, status.getSeverity()); //$NON-NLS-1$
+ Assert.assertEquals("Error message is not the expected message", Messages.AbstractPasteInSelectionNattableCommandProvider_ThePasteHasNotBeenDoneBecauseOfSomeProblems, status.getMessage()); //$NON-NLS-1$
+ Assert.assertTrue("Status must be a multi-status", status instanceof MultiStatus); //$NON-NLS-1$
+ Assert.assertEquals("Error message is not the expected message", Messages.AbstractPasteInSelectionNattableCommandProvider_TheAxisUsedAsIdentifierNotAvailable, ((MultiStatus)status).getChildren()[0].getMessage()); //$NON-NLS-1$
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/PasteEmptyOverwriteFailColumns_Test.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/PasteEmptyOverwriteFailColumns_Test.java
new file mode 100755
index 0000000..6e39521
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/PasteEmptyOverwriteFailColumns_Test.java
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.overwrite;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.nebula.widgets.nattable.selection.command.SelectRowsCommand;
+import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager;
+import org.eclipse.papyrus.infra.nattable.messages.Messages;
+import org.junit.Assert;
+
+/**
+ * Test pastes overwrite when the number of columns to paste is not equals to the number of columns selected.
+ */
+public class PasteEmptyOverwriteFailColumns_Test extends AbstractPasteEmptyOverwriteTest {
+
+ /**
+ * Constructor.
+ */
+ public PasteEmptyOverwriteFailColumns_Test() {
+ super();
+ }
+
+ /**
+ * Manage the selection with the shift key.
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.paste.overwrite.AbstractPasteOverwriteTest#manageSelection(org.eclipse.papyrus.infra.nattable.manager.table.TreeNattableModelManager)
+ */
+ @Override
+ public void manageSelection(final NattableModelManager manager) throws Exception {
+ super.manageSelection(manager);
+ manager.getBodyLayerStack().getSelectionLayer().doCommand(new SelectRowsCommand(manager.getBodyLayerStack().getSelectionLayer(), 0, 2, true, false));
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.paste.overwrite.AbstractPasteOverwriteTest#checkReturned_Status(org.eclipse.core.runtime.IStatus)
+ */
+ @Override
+ protected void checkReturned_Status(final IStatus status) {
+ Assert.assertEquals("Error must be caught", IStatus.ERROR, status.getSeverity()); //$NON-NLS-1$
+ Assert.assertEquals("Error message is not the expected message", Messages.AbstractPasteInSelectionNattableCommandProvider_readcolumnsexceedsexistingcolumns, status.getMessage()); //$NON-NLS-1$
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/PasteEmptyOverwriteReplaceAll_Test.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/PasteEmptyOverwriteReplaceAll_Test.java
new file mode 100755
index 0000000..aa1b2dd
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/PasteEmptyOverwriteReplaceAll_Test.java
@@ -0,0 +1,57 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.overwrite;
+
+import java.util.Map;
+
+import org.eclipse.nebula.widgets.nattable.selection.command.SelectRowsCommand;
+import org.eclipse.papyrus.infra.nattable.handler.InsertInTableHandler;
+import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager;
+import org.eclipse.papyrus.infra.nattable.utils.UserActionConstants;
+
+/**
+ * Test pastes overwrite all of selection with hidden categories.
+ */
+public class PasteEmptyOverwriteReplaceAll_Test extends AbstractPasteEmptyOverwriteTest {
+
+ /**
+ * Constructor.
+ */
+ public PasteEmptyOverwriteReplaceAll_Test() {
+ super();
+ }
+
+ /**
+ * Manage the selection with the shift key.
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.paste.overwrite.AbstractPasteOverwriteTest#manageSelection(org.eclipse.papyrus.infra.nattable.manager.table.TreeNattableModelManager)
+ */
+ @Override
+ public void manageSelection(final NattableModelManager manager) throws Exception {
+ super.manageSelection(manager);
+ manager.getBodyLayerStack().getSelectionLayer().doCommand(new SelectRowsCommand(manager.getBodyLayerStack().getSelectionLayer(), 0, 2, true, false));
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.overwrite.AbstractPasteOverwriteTest#manageParameters(java.util.Map)
+ */
+ @Override
+ public void manageParameters(Map<Object, Object> parameters) {
+ super.manageParameters(parameters);
+ parameters.put(InsertInTableHandler.USER_ACTION__PREFERRED_USER_ACTION, UserActionConstants.REPLACE_USER_ACTION);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/PasteEmptyOverwriteSkipAll_Test.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/PasteEmptyOverwriteSkipAll_Test.java
new file mode 100755
index 0000000..2b572ec
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/PasteEmptyOverwriteSkipAll_Test.java
@@ -0,0 +1,68 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.overwrite;
+
+import java.util.Map;
+
+import org.eclipse.nebula.widgets.nattable.selection.command.SelectRowsCommand;
+import org.eclipse.papyrus.infra.nattable.handler.InsertInTableHandler;
+import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager;
+import org.eclipse.papyrus.infra.nattable.utils.UserActionConstants;
+
+/**
+ * Test pastes overwrite all of selection with hidden categories.
+ */
+public class PasteEmptyOverwriteSkipAll_Test extends AbstractPasteEmptyOverwriteTest {
+
+ /**
+ * Constructor.
+ */
+ public PasteEmptyOverwriteSkipAll_Test() {
+ super();
+ }
+
+ /**
+ * Manage the selection with the shift key.
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.paste.overwrite.AbstractPasteOverwriteTest#manageSelection(org.eclipse.papyrus.infra.nattable.manager.table.TreeNattableModelManager)
+ */
+ @Override
+ public void manageSelection(final NattableModelManager manager) throws Exception {
+ super.manageSelection(manager);
+ manager.getBodyLayerStack().getSelectionLayer().doCommand(new SelectRowsCommand(manager.getBodyLayerStack().getSelectionLayer(), 0, 2, true, false));
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.overwrite.AbstractPasteOverwriteTest#manageParameters(java.util.Map)
+ */
+ @Override
+ public void manageParameters(Map<Object, Object> parameters) {
+ super.manageParameters(parameters);
+ parameters.put(InsertInTableHandler.USER_ACTION__PREFERRED_USER_ACTION, UserActionConstants.SKIP_USER_ACTION);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.overwrite.AbstractPasteInsertTest#testUndo_Redo(org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager)
+ *
+ * @param treeManager
+ * @throws Exception
+ */
+ @Override
+ protected void testUndo_Redo(NattableModelManager treeManager) throws Exception {
+ // Do nothing
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/PasteEmptyOverwriteWarningNotExisting_Test.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/PasteEmptyOverwriteWarningNotExisting_Test.java
new file mode 100755
index 0000000..e7e5d73
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/PasteEmptyOverwriteWarningNotExisting_Test.java
@@ -0,0 +1,59 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.overwrite;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.nebula.widgets.nattable.selection.command.SelectRowsCommand;
+import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager;
+import org.eclipse.papyrus.infra.nattable.messages.Messages;
+import org.junit.Assert;
+
+/**
+ * Test pastes overwrite all of selection with hidden categories.
+ */
+public class PasteEmptyOverwriteWarningNotExisting_Test extends AbstractPasteEmptyOverwriteTest {
+
+ /**
+ * Constructor.
+ */
+ public PasteEmptyOverwriteWarningNotExisting_Test() {
+ super();
+ }
+
+ /**
+ * Manage the selection with the shift key.
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.paste.overwrite.AbstractPasteOverwriteTest#manageSelection(org.eclipse.papyrus.infra.nattable.manager.table.TreeNattableModelManager)
+ */
+ @Override
+ public void manageSelection(final NattableModelManager manager) throws Exception {
+ super.manageSelection(manager);
+ manager.getBodyLayerStack().getSelectionLayer().doCommand(new SelectRowsCommand(manager.getBodyLayerStack().getSelectionLayer(), 0, 2, true, false));
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.paste.overwrite.AbstractPasteOverwriteTest#checkReturned_Status(org.eclipse.core.runtime.IStatus)
+ */
+ @Override
+ protected void checkReturned_Status(final IStatus status) {
+ Assert.assertEquals("Warning must be caught", IStatus.WARNING, status.getSeverity()); //$NON-NLS-1$
+ Assert.assertEquals("Warning message is not the expected message", Messages.AbstractPasteInSelectionNattableCommandProvider_ThePasteHasBeenDoneWithSomeProblems, status.getMessage()); //$NON-NLS-1$
+ Assert.assertTrue("Status must be a multi-status", status instanceof MultiStatus); //$NON-NLS-1$
+ Assert.assertEquals("Warning message is not the expected message", "The identifier 'Class2' was not found in the selection", ((MultiStatus)status).getChildren()[0].getMessage()); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/PasteRowsOverwriteAll_Test.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/PasteRowsOverwriteAll_Test.java
new file mode 100755
index 0000000..36b3ccb
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/PasteRowsOverwriteAll_Test.java
@@ -0,0 +1,42 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.overwrite;
+
+import org.eclipse.nebula.widgets.nattable.selection.command.SelectRowsCommand;
+import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager;
+
+/**
+ * Test pastes overwrite all of selection with hidden categories.
+ */
+public class PasteRowsOverwriteAll_Test extends AbstractPasteRowsOverwriteTest {
+
+ /**
+ * Constructor.
+ */
+ public PasteRowsOverwriteAll_Test() {
+ super();
+ }
+
+ /**
+ * Manage the selection with the shift key.
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.paste.overwrite.AbstractPasteOverwriteTest#manageSelection(org.eclipse.papyrus.infra.nattable.manager.table.TreeNattableModelManager)
+ */
+ @Override
+ public void manageSelection(final NattableModelManager manager) throws Exception {
+ super.manageSelection(manager);
+ manager.getBodyLayerStack().getSelectionLayer().doCommand(new SelectRowsCommand(manager.getBodyLayerStack().getSelectionLayer(), 0, 2, true, false));
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/PasteRowsOverwriteAxisIdentifierNotExisting_Test.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/PasteRowsOverwriteAxisIdentifierNotExisting_Test.java
new file mode 100755
index 0000000..84236ac
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/PasteRowsOverwriteAxisIdentifierNotExisting_Test.java
@@ -0,0 +1,59 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.overwrite;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.nebula.widgets.nattable.selection.command.SelectRowsCommand;
+import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager;
+import org.eclipse.papyrus.infra.nattable.messages.Messages;
+import org.junit.Assert;
+
+/**
+ * Test pastes overwrite all of selection with hidden categories.
+ */
+public class PasteRowsOverwriteAxisIdentifierNotExisting_Test extends AbstractPasteRowsOverwriteTest {
+
+ /**
+ * Constructor.
+ */
+ public PasteRowsOverwriteAxisIdentifierNotExisting_Test() {
+ super();
+ }
+
+ /**
+ * Manage the selection with the shift key.
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.paste.overwrite.AbstractPasteOverwriteTest#manageSelection(org.eclipse.papyrus.infra.nattable.manager.table.TreeNattableModelManager)
+ */
+ @Override
+ public void manageSelection(final NattableModelManager manager) throws Exception {
+ super.manageSelection(manager);
+ manager.getBodyLayerStack().getSelectionLayer().doCommand(new SelectRowsCommand(manager.getBodyLayerStack().getSelectionLayer(), 0, 2, true, false));
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.paste.overwrite.AbstractPasteOverwriteTest#checkReturned_Status(org.eclipse.core.runtime.IStatus)
+ */
+ @Override
+ protected void checkReturned_Status(final IStatus status) {
+ Assert.assertEquals("Error must be caught", IStatus.ERROR, status.getSeverity()); //$NON-NLS-1$
+ Assert.assertEquals("Error message is not the expected message", Messages.AbstractPasteInSelectionNattableCommandProvider_ThePasteHasNotBeenDoneBecauseOfSomeProblems, status.getMessage()); //$NON-NLS-1$
+ Assert.assertTrue("Status must be a multi-status", status instanceof MultiStatus); //$NON-NLS-1$
+ Assert.assertEquals("Error message is not the expected message", Messages.AbstractPasteInSelectionNattableCommandProvider_TheAxisUsedAsIdentifierNotAvailable, ((MultiStatus)status).getChildren()[0].getMessage()); //$NON-NLS-1$
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/PasteRowsOverwriteFailColumns_Test.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/PasteRowsOverwriteFailColumns_Test.java
new file mode 100755
index 0000000..c6c07a0
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/PasteRowsOverwriteFailColumns_Test.java
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.overwrite;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.nebula.widgets.nattable.selection.command.SelectRowsCommand;
+import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager;
+import org.eclipse.papyrus.infra.nattable.messages.Messages;
+import org.junit.Assert;
+
+/**
+ * Test pastes overwrite when the number of columns to paste is not equals to the number of columns selected.
+ */
+public class PasteRowsOverwriteFailColumns_Test extends AbstractPasteRowsOverwriteTest {
+
+ /**
+ * Constructor.
+ */
+ public PasteRowsOverwriteFailColumns_Test() {
+ super();
+ }
+
+ /**
+ * Manage the selection with the shift key.
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.paste.overwrite.AbstractPasteOverwriteTest#manageSelection(org.eclipse.papyrus.infra.nattable.manager.table.TreeNattableModelManager)
+ */
+ @Override
+ public void manageSelection(final NattableModelManager manager) throws Exception {
+ super.manageSelection(manager);
+ manager.getBodyLayerStack().getSelectionLayer().doCommand(new SelectRowsCommand(manager.getBodyLayerStack().getSelectionLayer(), 0, 2, true, false));
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.paste.overwrite.AbstractPasteOverwriteTest#checkReturned_Status(org.eclipse.core.runtime.IStatus)
+ */
+ @Override
+ protected void checkReturned_Status(final IStatus status) {
+ Assert.assertEquals("Error must be caught", IStatus.ERROR, status.getSeverity()); //$NON-NLS-1$
+ Assert.assertEquals("Error message is not the expected message", Messages.AbstractPasteInSelectionNattableCommandProvider_readcolumnsexceedsexistingcolumns, status.getMessage()); //$NON-NLS-1$
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/PasteRowsOverwriteFailRows_Test.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/PasteRowsOverwriteFailRows_Test.java
new file mode 100755
index 0000000..6cb3f61
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/PasteRowsOverwriteFailRows_Test.java
@@ -0,0 +1,57 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.overwrite;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.nebula.widgets.nattable.selection.command.SelectRowsCommand;
+import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager;
+import org.eclipse.papyrus.infra.nattable.messages.Messages;
+import org.junit.Assert;
+
+/**
+ * Test pastes overwrite when the number of rows to paste is not equals to the number of rows selected.
+ */
+public class PasteRowsOverwriteFailRows_Test extends AbstractPasteRowsOverwriteTest {
+
+ /**
+ * Constructor.
+ */
+ public PasteRowsOverwriteFailRows_Test() {
+ super();
+ }
+
+ /**
+ * Manage the selection with the shift key.
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.paste.overwrite.AbstractPasteOverwriteTest#manageSelection(org.eclipse.papyrus.infra.nattable.manager.table.TreeNattableModelManager)
+ */
+ @Override
+ public void manageSelection(final NattableModelManager manager) throws Exception {
+ super.manageSelection(manager);
+ manager.getBodyLayerStack().getSelectionLayer().doCommand(new SelectRowsCommand(manager.getBodyLayerStack().getSelectionLayer(), 0, 1, true, false));
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.paste.overwrite.AbstractPasteOverwriteTest#checkReturned_Status(org.eclipse.core.runtime.IStatus)
+ */
+ @Override
+ protected void checkReturned_Status(final IStatus status) {
+ Assert.assertEquals("Error must be caught", IStatus.ERROR, status.getSeverity()); //$NON-NLS-1$
+ Assert.assertEquals("Error message is not the expected message", Messages.AbstractPasteInSelectionNattableCommandProvider_readrowsexceedsexistingrows, status.getMessage()); //$NON-NLS-1$
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/PasteRowsOverwriteWarningNotExisting_Test.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/PasteRowsOverwriteWarningNotExisting_Test.java
new file mode 100755
index 0000000..1bc1774
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/overwrite/PasteRowsOverwriteWarningNotExisting_Test.java
@@ -0,0 +1,59 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.overwrite;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.nebula.widgets.nattable.selection.command.SelectRowsCommand;
+import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager;
+import org.eclipse.papyrus.infra.nattable.messages.Messages;
+import org.junit.Assert;
+
+/**
+ * Test pastes overwrite all of selection with hidden categories.
+ */
+public class PasteRowsOverwriteWarningNotExisting_Test extends AbstractPasteRowsOverwriteTest {
+
+ /**
+ * Constructor.
+ */
+ public PasteRowsOverwriteWarningNotExisting_Test() {
+ super();
+ }
+
+ /**
+ * Manage the selection with the shift key.
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.paste.overwrite.AbstractPasteOverwriteTest#manageSelection(org.eclipse.papyrus.infra.nattable.manager.table.TreeNattableModelManager)
+ */
+ @Override
+ public void manageSelection(final NattableModelManager manager) throws Exception {
+ super.manageSelection(manager);
+ manager.getBodyLayerStack().getSelectionLayer().doCommand(new SelectRowsCommand(manager.getBodyLayerStack().getSelectionLayer(), 0, 2, true, false));
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.paste.overwrite.AbstractPasteOverwriteTest#checkReturned_Status(org.eclipse.core.runtime.IStatus)
+ */
+ @Override
+ protected void checkReturned_Status(final IStatus status) {
+ Assert.assertEquals("Warning must be caught", IStatus.WARNING, status.getSeverity()); //$NON-NLS-1$
+ Assert.assertEquals("Warning message is not the expected message", Messages.AbstractPasteInSelectionNattableCommandProvider_ThePasteHasBeenDoneWithSomeProblems, status.getMessage()); //$NON-NLS-1$
+ Assert.assertTrue("Status must be a multi-status", status instanceof MultiStatus); //$NON-NLS-1$
+ Assert.assertEquals("Warning message is not the expected message", "The identifier 'Class2' was not found in the selection", ((MultiStatus)status).getChildren()[0].getMessage()); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/without/service/edit/AbstractOpenTableTest.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/without/service/edit/AbstractOpenTableTest.java
new file mode 100755
index 0000000..457b702
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/without/service/edit/AbstractOpenTableTest.java
@@ -0,0 +1,90 @@
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.without.service.edit;
+
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.nebula.widgets.nattable.grid.GridRegion;
+import org.eclipse.nebula.widgets.nattable.layer.LabelStack;
+import org.eclipse.papyrus.commands.OpenDiagramCommand;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.emf.gmf.command.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.infra.gmfdiag.common.model.NotationUtils;
+import org.eclipse.papyrus.infra.nattable.common.editor.NatTableEditor;
+import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+import org.eclipse.papyrus.infra.nattable.menu.MenuUtils;
+import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
+import org.eclipse.papyrus.junit.utils.GenericUtils;
+import org.eclipse.papyrus.sysml.nattable.requirement.tests.Activator;
+import org.eclipse.ui.IEditorPart;
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.osgi.framework.Bundle;
+
+/**
+ *
+ */
+public abstract class AbstractOpenTableTest extends org.eclipse.papyrus.junit.utils.tests.AbstractEditorTest {
+
+ /**
+ * This test allows to be sure that we doesn't break existing table model
+ *
+ * @throws Exception
+ */
+
+ public void testOpenExistingTable(String projectName, String modelName) throws Exception {
+ // initModel(projectName, modelName, getBundle()); //$NON-NLS-1$ //$NON-NLS-2$
+
+// Assert.assertEquals(1, pageManager.allPages().size());
+ IEditorPart tableEditor = editor.getActiveEditor();
+ Assert.assertNull(tableEditor);
+ Resource notationResource = NotationUtils.getNotationModel(editor.getServicesRegistry().getService(ModelSet.class)).getResource();
+ Table table = (Table) notationResource.getContents().get(0);
+ TransactionalEditingDomain editingDomain = editor.getServicesRegistry().getService(TransactionalEditingDomain.class);
+ editingDomain.getCommandStack().execute(new GMFtoEMFCommandWrapper(new OpenDiagramCommand(editingDomain, table)));
+ // to refresh the table content
+ // while(!Display.getDefault().isDisposed() && Display.getDefault().readAndDispatch());
+ tableEditor = editor.getActiveEditor();
+ Assert.assertTrue(tableEditor instanceof NatTableEditor);
+ INattableModelManager manager = (INattableModelManager) tableEditor.getAdapter(INattableModelManager.class);
+ Assert.assertNotNull(manager);
+ Assert.assertEquals(org.eclipse.papyrus.sysml.nattable.requirement.config.Activator.TABLE_TYPE, manager.getTable().getTableConfiguration().getType());
+
+ MenuUtils.registerNatTableWidgetInEclipseContext(manager, new LabelStack(GridRegion.BODY));
+ }
+
+
+ protected Table getTable() throws ServiceException {
+ Resource notationResource = NotationUtils.getNotationModel(editor.getServicesRegistry().getService(ModelSet.class)).getResource();
+ Table table = (Table) notationResource.getContents().get(0);
+ return table;
+ }
+
+ @Override
+ protected String getSourcePath() {
+ return "/resources/"; //$NON-NLS-1$
+ }
+
+ @Override
+ protected Bundle getBundle() {
+ return Activator.getDefault().getBundle();
+ }
+
+ @AfterClass
+ public static void endOfTest() {
+ GenericUtils.closeAllEditors();
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/without/service/edit/AbstractPasteTests.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/without/service/edit/AbstractPasteTests.java
new file mode 100755
index 0000000..ad3423b
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/without/service/edit/AbstractPasteTests.java
@@ -0,0 +1,575 @@
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.without.service.edit;
+
+import java.awt.Toolkit;
+import java.awt.datatransfer.StringSelection;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.nattable.common.editor.NatTableEditor;
+import org.eclipse.papyrus.infra.nattable.handler.PasteInTableHandler;
+import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.EObjectTreeItemAxis;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.ITreeItemAxis;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.IPasteConfiguration;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.NattableaxisconfigurationPackage;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.TreeFillingConfiguration;
+import org.eclipse.papyrus.infra.nattable.utils.AxisConfigurationUtils;
+import org.eclipse.papyrus.infra.nattable.utils.AxisUtils;
+import org.eclipse.papyrus.infra.nattable.utils.PasteInsertUtil;
+import org.eclipse.papyrus.infra.tools.util.FileUtils;
+import org.eclipse.papyrus.junit.framework.classification.InvalidTest;
+import org.eclipse.papyrus.junit.utils.EditorUtils;
+import org.eclipse.papyrus.junit.utils.GenericUtils;
+import org.eclipse.papyrus.junit.utils.PapyrusProjectUtils;
+import org.eclipse.papyrus.junit.utils.ProjectUtils;
+import org.eclipse.papyrus.sysml.nattable.requirement.tests.Activator;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.EnumerationLiteral;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.Operation;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.Parameter;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Stereotype;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.eclipse.uml2.uml.VisibilityKind;
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.osgi.framework.Bundle;
+
+/**
+ * @author VL222926
+ *
+ */
+public abstract class AbstractPasteTests extends AbstractOpenTableTest {
+
+ public static final String PASTE_FOLDER_PATH = "/resources/paste_tests/"; //$NON-NLS-1$
+
+ public static final String OPERATION_BASE_NAME = "Operation"; //$NON-NLS-1$
+
+ public static final String PARAMETER_BASE_NAME = "Param"; //$NON-NLS-1$
+
+ public static final String PROPERTY_BASE_NAME = "Property"; //$NON-NLS-1$
+
+ public static final String CLASS_BASE_NAME = "Class"; //$NON-NLS-1$
+
+ public static final String NESTED_CLASS_BASE_NAME = "NestedClass"; //$NON-NLS-1$
+
+ public static final String CLASS_ELEMENT_ID = "org.eclipse.papyrus.uml.Class"; //$NON-NLS-1$
+ public static final String OPERATION_ELEMENT_ID = "org.eclipse.papyrus.uml.Operation"; //$NON-NLS-1$
+ public static final String PARAMETER_ELEMENT_ID = "org.eclipse.papyrus.uml.Parameter"; //$NON-NLS-1$
+ public static final String PROPERTY_ELEMENT_ID = "org.eclipse.papyrus.uml.Property"; //$NON-NLS-1$
+
+
+ @Before
+ public void initModel() throws Exception {
+ initModel("requirementTable", getClass().getSimpleName(), getBundle()); //$NON-NLS-1$
+ };
+
+ /**
+ * Inits this.editor
+ * Fails or throws an exception if an error occurs
+ *
+ * @param bundle
+ * the source bundle where the model is store
+ * @param projectName
+ * the project that will created at runtime to execute test
+ * @param modelName
+ * the model that will be copied and test executed on.
+ */
+ protected void initModel(String projectName, String modelName, Bundle bundle) throws Exception {
+ project = ProjectUtils.createProject(projectName);
+ final IFile project1 = PapyrusProjectUtils.copyPapyrusModel(project, bundle, getSourcePath(), "library"); //$NON-NLS-1$
+ Display.getDefault().syncExec(new Runnable() {
+
+ public void run() {
+ try {
+ editor = EditorUtils.openPapyrusEditor(project1);
+ } catch (Exception ex) {
+ Activator.log.error(ex);
+ Assert.fail(ex.getMessage());
+ }
+ }
+ });
+
+ final IFile porject2 = PapyrusProjectUtils.copyPapyrusModel(project, bundle, getSourcePath(), "model.profile"); //$NON-NLS-1$
+ Display.getDefault().syncExec(new Runnable() {
+
+ public void run() {
+ try {
+ editor = EditorUtils.openPapyrusEditor(porject2);
+ } catch (Exception ex) {
+ Activator.log.error(ex);
+ Assert.fail(ex.getMessage());
+ }
+ }
+ });
+
+ this.diModelFile = PapyrusProjectUtils.copyPapyrusModel(project, bundle, getSourcePath(), modelName);
+ Display.getDefault().syncExec(new Runnable() {
+
+ public void run() {
+ try {
+ editor = EditorUtils.openPapyrusEditor(diModelFile);
+ } catch (Exception ex) {
+ Activator.log.error(ex);
+ Assert.fail(ex.getMessage());
+ }
+ }
+ });
+
+ Assert.assertNotNull(editor);
+ }
+
+
+ protected INattableModelManager getTableManager() {
+ IEditorPart tableEditor = editor.getActiveEditor();
+ Assert.assertTrue(tableEditor instanceof NatTableEditor);
+ INattableModelManager manager = (INattableModelManager) tableEditor.getAdapter(INattableModelManager.class);
+ return manager;
+ }
+
+ /**
+ *
+ * @throws Exception
+ */
+ @Test
+ public void checkModelForTestConsistency() throws Exception {
+ Assert.assertTrue(!getTable().isInvertAxis());
+ Assert.assertEquals(org.eclipse.papyrus.sysml.nattable.requirement.config.Activator.TABLE_TYPE, getTable().getTableConfiguration().getType());
+ Assert.assertEquals(6, getTable().getCurrentColumnAxisProvider().getAxis().size());
+ final IPasteConfiguration conf = (IPasteConfiguration) AxisConfigurationUtils.getIAxisConfigurationUsedInTable(getTable(), NattableaxisconfigurationPackage.eINSTANCE.getPasteEObjectConfiguration(), false);
+ Assert.assertTrue(conf.isDetachedMode());
+ }
+
+ /**
+ *
+ * @throws Exception
+ *
+ * This method tests
+ * <ul>
+ * <li>the open of the table</li>
+ * <li>the paste of the table (must be enabled)</li>
+ * <li>the new contents of the semantic model</li>
+ * <li>the expand (indirectly)</li>
+ * <li>the final contents of the table (compared to the pasted string)</li>
+ * </ul>
+ */
+ @Test
+ public void testPaste() throws Exception {
+ testOpenExistingTable("classTreeTable", " openTest"); //$NON-NLS-1$ //$NON-NLS-2$
+ IEditorPart tableEditor = editor.getActiveEditor();
+ Assert.assertTrue(tableEditor instanceof NatTableEditor);
+ INattableModelManager manager = (INattableModelManager) tableEditor.getAdapter(INattableModelManager.class);
+ // Assert.assertTrue(manager instanceof ITreeNattableModelManager);
+
+ List<?> rowElements = manager.getRowElementsList();
+ int size = rowElements.size();
+ Assert.assertEquals(1, size);
+
+ // fill the clipboard
+ String fileName = getPasteFileName();
+ String str = FileUtils.getStringFromPlatformFile(Activator.PLUGIN_ID, getSourcePath(), fileName);
+ fillClipboard("Fill the clipboard to enable the handler"); //$NON-NLS-1$
+
+ Map<Object, Object> parameters = new HashMap<Object, Object>();
+ parameters.put(PasteInTableHandler.OPEN_DIALOG_ON_FAIL_BOOLEAN_PARAMETER, Boolean.FALSE);
+ parameters.put(PasteInTableHandler.OPEN__PROGRESS_MONITOR_DIALOG, Boolean.FALSE);
+ // This parameters allows to set the text to paste instead of copy/paste it programmatically (this may be overwrite by other copy)
+ parameters.put(PasteInTableHandler.TEXT_TO_PASTE, str);
+ flushDisplayEvents();
+ Object res = PasteInsertUtil.paste(manager, ((NattableModelManager)manager).getSelectionInTable(), parameters);
+ Assert.assertTrue(res instanceof IStatus);
+ IStatus iStatus = (IStatus) res;
+ validateReturnedStatus(iStatus);
+ if (iStatus.isOK()) {
+ verifyModelContents();
+ checkTableDataStructure();
+ checkCopyToClipboard(str);
+
+ // Check the undo and the redo
+ checkUndo_Redo(manager);
+ }
+ }
+
+ /**
+ * This allows to check the undo and the redo.
+ *
+ * @param manager
+ * the nattable model manager.
+ * @throws Exception
+ * The exception.
+ */
+ protected void checkUndo_Redo(final INattableModelManager manager) throws Exception {
+ // Execute the undo and test the table
+ getTransactionalEditingDomain().getCommandStack().undo();
+ flushDisplayEvents();
+
+ final List<?> rowElements = manager.getRowElementsList();
+ final int size = rowElements.size();
+ Assert.assertEquals(1, size);
+
+ // Execute the redo and test the table content
+ getTransactionalEditingDomain().getCommandStack().redo();
+ flushDisplayEvents();
+
+ verifyModelContents();
+ checkTableDataStructure();
+ }
+
+ /**
+ * This allows to check the returned status of the command.
+ *
+ * @param status
+ * The status to check.
+ */
+ protected void validateReturnedStatus(IStatus status) {
+ Assert.assertTrue(status.isOK());
+ }
+
+ /**
+ * This method verifies than the contents of the model is conform to the wanted result
+ *
+ * @throws Exception
+ */
+ protected final void verifyModelContents() throws Exception {
+ // useful in detached mode to apply stereotype ?
+ flushDisplayEvents();
+
+ Package context = (Package) getTable().getContext();
+ List<NamedElement> members = context.getOwnedMembers();
+ Collection<Class> requirements = new HashSet<Class>();
+ for (NamedElement member : members) {
+ if (member instanceof Class) {
+ checkClass((Class) member);
+ requirements.add((Class) member);
+ }
+ }
+
+
+ Assert.assertEquals(4, requirements.size());
+ }
+
+ public static final String REQUIREMENT1_NAME = "Requirement1"; //$NON-NLS-1$
+ public static final String REQUIREMENT2_NAME = "Requirement2"; //$NON-NLS-1$
+ public static final String REQUIREMENT3_NAME = "Requirement3"; //$NON-NLS-1$
+
+ private boolean checkClassColor = false;
+
+ @InvalidTest
+ @Test
+ public void testPasteCheckingColor() throws Exception {
+ this.checkClassColor = true;
+ testPaste();
+ }
+
+ protected void checkClass(Class clazz) throws Exception {
+ String name = clazz.getName();
+
+ Stereotype reqSte = clazz.getAppliedStereotype("SysML::Requirements::Requirement"); //$NON-NLS-1$
+ Stereotype taskSte = clazz.getAppliedStereotype("profile::Task"); //$NON-NLS-1$
+ Assert.assertNotNull(reqSte);
+ Assert.assertNotNull(taskSte);
+ String id = (String) clazz.getValue(reqSte, "id"); //$NON-NLS-1$
+ String text = (String) clazz.getValue(reqSte, "text"); //$NON-NLS-1$
+ Object priority = clazz.getValue(taskSte, "p"); //$NON-NLS-1$
+
+ VisibilityKind visibility = clazz.getVisibility();
+ Assert.assertNotNull(NLS.bind("priority is null for {0} ", clazz.getName()), priority);
+
+ Assert.assertTrue(NLS.bind("Priority must be an instance of EnumerationLiteral, but it is an instance of {0}", priority.getClass().getName()), priority instanceof EnumerationLiteral);
+ EnumerationLiteral priority2 = (EnumerationLiteral) priority;
+ Object color = clazz.getValue(taskSte, "color"); //$NON-NLS-1$
+ EnumerationLiteral color2 = null;
+ if (this.checkClassColor) {
+ Assert.assertTrue(NLS.bind("Color must be an instance of EnumerationLiteral, but it is an instance of {0}", color.getClass().getName()), color instanceof EnumerationLiteral);
+ Assert.assertNotNull(NLS.bind("color is null for {0} ", clazz.getName()), color);
+ color2 = (EnumerationLiteral) color;
+ }
+ if ("RequirementTest".equals(name)) { //$NON-NLS-1$
+ // this is the initial requirement, available in the table
+ Assert.assertTrue(id == null || id.isEmpty()); // $NON-NLS-1$
+ Assert.assertTrue(text == null || text.isEmpty()); // $NON-NLS-1$
+ Assert.assertEquals("medium", priority2.getName()); //$NON-NLS-1$
+ if (this.checkClassColor) {
+ Assert.assertEquals("red", color2.getName()); //$NON-NLS-1$
+ }
+ Assert.assertEquals(VisibilityKind.PROTECTED_LITERAL, visibility);
+ } else if (REQUIREMENT1_NAME.equals(name)) {
+ Assert.assertEquals("id1", id); //$NON-NLS-1$
+ Assert.assertEquals("text1", text); //$NON-NLS-1$
+ Assert.assertEquals("hight", priority2.getName()); //$NON-NLS-1$
+ if (this.checkClassColor) {
+ Assert.assertEquals("black", color2.getName()); //$NON-NLS-1$
+ }
+ Assert.assertEquals(VisibilityKind.PUBLIC_LITERAL, visibility);
+ } else if (REQUIREMENT2_NAME.equals(name)) {
+ Assert.assertEquals("id2", id); //$NON-NLS-1$
+ Assert.assertEquals("text2", text); //$NON-NLS-1$
+ Assert.assertEquals("medium", priority2.getName()); //$NON-NLS-1$
+ if (this.checkClassColor) {
+ Assert.assertEquals("red", color2.getName()); //$NON-NLS-1$
+ }
+ } else if (REQUIREMENT3_NAME.equals(name)) {
+ Assert.assertEquals("id3", id); //$NON-NLS-1$
+ Assert.assertEquals("text3", text); //$NON-NLS-1$
+ Assert.assertEquals("low", priority2.getName()); //$NON-NLS-1$
+ if (this.checkClassColor) {
+ Assert.assertEquals("blue", color2.getName()); //$NON-NLS-1$
+ }
+ } else {
+ throw new Exception("There is an error in the test"); //$NON-NLS-1$
+ }
+ }
+
+ /**
+ *
+ * @param newClipBoardContents
+ */
+ protected void fillClipboard(String newClipBoardContents) {
+
+ // its seems that the clipboard must be filled with the same way than we read it!
+ java.awt.datatransfer.Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
+ StringSelection s = new StringSelection(newClipBoardContents);
+ clipboard.setContents(s, s);
+ }
+
+ protected void checkRootClasses(ITreeItemAxis root, EObject parent) {
+ Object tmp = AxisUtils.getRepresentedElement(root);
+ Assert.assertTrue(tmp instanceof Class);
+ Class clazz = (Class) tmp;
+ Assert.assertEquals(parent, clazz.eContainer());
+
+ }
+
+ protected void checkSynchronizedRoot(List<?> elements) throws ServiceException {
+ Assert.assertEquals(1, elements.size());
+ for (int i = 0; i < elements.size(); i++) {
+ // we check the first level
+ Object tmp = elements.get(0);
+ Assert.assertTrue(tmp instanceof EObjectTreeItemAxis);
+ EObjectTreeItemAxis root = (EObjectTreeItemAxis) tmp;
+ tmp = AxisUtils.getRepresentedElement(root);
+ Assert.assertTrue(tmp instanceof TreeFillingConfiguration);
+ TreeFillingConfiguration fillingConf = (TreeFillingConfiguration) tmp;
+ tmp = AxisUtils.getRepresentedElement(fillingConf.getAxisUsedAsAxisProvider());
+ Assert.assertEquals(UMLPackage.eINSTANCE.getPackage_PackagedElement(), tmp);
+
+
+
+
+ // we check the children : 2 classes
+ List<ITreeItemAxis> classes = root.getChildren();
+ Assert.assertEquals(2, classes.size());
+ for (Object current : classes) {
+ Assert.assertTrue(current instanceof ITreeItemAxis);
+ ITreeItemAxis axis = (ITreeItemAxis) current;
+ checkRootClasses(axis, getTable().getContext());
+ }
+ }
+ }
+
+ protected void checkDnDRoot(List<?> elements) throws ServiceException {
+ Assert.assertEquals(2, elements.size());
+ for (int i = 0; i < elements.size(); i++) {
+ Object tmp = elements.get(i);
+ Assert.assertTrue(tmp instanceof ITreeItemAxis);
+ ITreeItemAxis axis = (ITreeItemAxis) tmp;
+ checkRootClasses(axis, getTable().getContext());
+ }
+ }
+
+ public void checkTableDataStructure() throws ServiceException {
+ flushDisplayEvents();
+ final INattableModelManager manager = (INattableModelManager) this.editor.getAdapter(INattableModelManager.class);
+ List<Object> rows = manager.getRowElementsList();
+ Assert.assertEquals(4, rows.size());
+ }
+
+
+
+ protected void checkChildrenClasses(ITreeItemAxis axisRepresentingClass) throws Exception {
+ List<ITreeItemAxis> axis = axisRepresentingClass.getChildren();
+ Assert.assertEquals(3, axis.size());
+ ITreeItemAxis propertyAxis = null;
+ ITreeItemAxis operationAxis = null;
+ ITreeItemAxis nestedClassAxis = null;
+ Class clazz = (Class) AxisUtils.getRepresentedElement(axisRepresentingClass);
+ for (ITreeItemAxis current : axis) {
+ Object tmp = AxisUtils.getRepresentedElement(current);
+ if (tmp == UMLPackage.eINSTANCE.getStructuredClassifier_OwnedAttribute()) {
+ // property = true;
+ propertyAxis = current;
+ checkPropertyAxis(propertyAxis, clazz);
+ }
+ if (tmp == UMLPackage.eINSTANCE.getClass_OwnedOperation()) {
+ // operation = true;
+ operationAxis = current;
+ checkOperationAxis(operationAxis, clazz);
+ }
+ if (tmp == UMLPackage.eINSTANCE.getClass_NestedClassifier()) {
+ nestedClassAxis = current;
+ checkNestedClassAxis(nestedClassAxis, clazz);
+ // nestedClass = true;
+ }
+ }
+
+ String className = getClass().getSimpleName();
+ className = className.replaceFirst("PasteWithCategories_", ""); //$NON-NLS-1$ //$NON-NLS-2$
+ String[] result = className.split("_"); //$NON-NLS-1$
+ Assert.assertTrue(result.length == 5);
+ String depth1 = result[1];
+ if (depth1.endsWith("3")) { //$NON-NLS-1$
+ Assert.assertNotNull(propertyAxis);
+ Assert.assertNotNull(nestedClassAxis);
+ Assert.assertNotNull(operationAxis);
+
+ } else if (depth1.endsWith("1")) { //$NON-NLS-1$
+ Assert.assertTrue(propertyAxis == null);
+ Assert.assertTrue(nestedClassAxis == null);
+ Assert.assertNotNull(operationAxis);
+ } else {
+ throw new Exception("We have an error in the tests"); //$NON-NLS-1$
+ }
+ }
+
+ public void checkPropertyAxis(ITreeItemAxis propertyAxis, Class parent) {
+ List<ITreeItemAxis> axis = propertyAxis.getChildren();
+ Assert.assertEquals(3, axis.size());
+ Set<Object> properties = new HashSet<Object>();
+ for (ITreeItemAxis tmp : axis) {
+ Assert.assertEquals(0, tmp.getChildren());
+ Object representedElement = AxisUtils.getRepresentedElement(tmp);
+ Assert.assertTrue(representedElement instanceof Property);
+ Assert.assertTrue(((EObject) representedElement).eContainer() == parent);
+ properties.add(representedElement);
+ }
+ // if not a property is marked several time has children of it parent itreeitemaxis
+ Assert.assertEquals(3, properties.size());
+ }
+
+ public void checkNestedClassAxis(ITreeItemAxis nestedClassAxis, Class parent) {
+ List<ITreeItemAxis> axis = nestedClassAxis.getChildren();
+ Assert.assertEquals(3, axis.size());
+ Set<Object> properties = new HashSet<Object>();
+ for (ITreeItemAxis tmp : axis) {
+ Assert.assertEquals(0, tmp.getChildren());
+ Object representedElement = AxisUtils.getRepresentedElement(tmp);
+ Assert.assertTrue(representedElement instanceof Class);
+ Assert.assertTrue(((EObject) representedElement).eContainer() == parent);
+ properties.add(representedElement);
+ }
+ // if not a property is marked several time has children of it parent itreeitemaxis
+ Assert.assertEquals(3, properties.size());
+
+ }
+
+ public void checkOperationAxis(ITreeItemAxis operationAxis, Class parent) {
+ List<ITreeItemAxis> axis = operationAxis.getChildren();
+ Assert.assertEquals(3, axis.size());
+ Set<Object> properties = new HashSet<Object>();
+ for (ITreeItemAxis tmp : axis) {
+ Assert.assertEquals(1, tmp.getChildren());
+ ITreeItemAxis parameterAxis = tmp.getChildren().get(0);
+ Assert.assertEquals(UMLPackage.eINSTANCE.getBehavioralFeature_OwnedParameter(), AxisUtils.getRepresentedElement(parameterAxis.getElement()));
+ Object representedElement = AxisUtils.getRepresentedElement(tmp);
+ Assert.assertTrue(representedElement instanceof Operation);
+ Assert.assertTrue(((EObject) representedElement).eContainer() == parent);
+ properties.add(representedElement);
+ checkParameterAxis(parameterAxis, (Operation) representedElement);
+ }
+ // if not a property is marked several time has children of it parent itreeitemaxis
+ Assert.assertEquals(3, properties.size());
+ }
+
+
+ public void checkParameterAxis(ITreeItemAxis parameterAxis, Operation parent) {
+ List<ITreeItemAxis> axis = parameterAxis.getChildren();
+ Assert.assertEquals(3, axis.size());
+ Set<Object> parameters = new HashSet<Object>();
+ for (ITreeItemAxis tmp : axis) {
+ Assert.assertEquals(0, tmp.getChildren());
+ Object representedElement = AxisUtils.getRepresentedElement(tmp);
+ Assert.assertTrue(representedElement instanceof Parameter);
+ Assert.assertTrue(((EObject) representedElement).eContainer() == parent);
+ parameters.add(representedElement);
+ }
+ // if not a property is marked several time has children of it parent itreeitemaxis
+ Assert.assertEquals(3, parameters.size());
+ }
+
+ public void verifyTableContents_1_1_1(List<?> elements) {
+ Assert.assertEquals(1, elements.size());
+ }
+
+ /**
+ * This method verify the general appearance of the table, currently it doesn't work, because the tree header are not included in the clipboard
+ *
+ * @param pastedString
+ * @throws Exception
+ */
+ protected void checkCopyToClipboard(final String pastedString) throws Exception {
+
+ if (true) {// TODO, fixme
+ return;
+ }
+ }
+
+ /**
+ *
+ * @return
+ * the name of the paste file to use
+ */
+ protected String getPasteFileName() {
+ StringBuilder builder = new StringBuilder(getClass().getSimpleName());
+ builder.append(FileUtils.DOT_STRING);
+ builder.append(FileUtils.TEXT_EXTENSION);
+ return builder.toString();
+ }
+
+
+
+
+
+ @Override
+ protected String getSourcePath() {
+ return PASTE_FOLDER_PATH;
+ }
+
+ @Override
+ protected Bundle getBundle() {
+ return Activator.getDefault().getBundle();
+ }
+
+ @AfterClass
+ public static void endOfTest() {
+ GenericUtils.closeAllEditors();
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/without/service/edit/Bug443814_Enumeration.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/without/service/edit/Bug443814_Enumeration.java
new file mode 100755
index 0000000..cbe5c1c
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/paste/without/service/edit/Bug443814_Enumeration.java
@@ -0,0 +1,173 @@
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.without.service.edit;
+
+import java.util.List;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.emf.ecore.EEnum;
+import org.eclipse.emf.ecore.EEnumLiteral;
+import org.eclipse.papyrus.infra.emf.nattable.dataprovider.EEnumComboBoxDataProvider;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.IAxis;
+import org.eclipse.papyrus.infra.nattable.utils.AxisUtils;
+import org.eclipse.papyrus.uml.nattable.dataprovider.UMLStereotypeSingleEnumerationComboBoxDataProvider;
+import org.eclipse.papyrus.uml.nattable.utils.UMLTableUtils;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.eclipse.uml2.uml.VisibilityKind;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * @author VL222926
+ *
+ */
+public class Bug443814_Enumeration extends AbstractPasteTests {
+
+ /**
+ * @see org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.without.service.edit.AbstractPasteTests#getSourcePath()
+ *
+ * @return
+ */
+ @Override
+ protected String getSourcePath() {
+ return "/resources/paste_tests/without_service_edit/bug443814/"; //$NON-NLS-1$
+ }
+
+ @Test
+ public void availableColorTest() throws Exception {
+
+ StringBuilder builder = new StringBuilder(UMLTableUtils.PROPERTY_OF_STEREOTYPE_PREFIX);
+ builder.append("profile::Task::color"); //$NON-NLS-1$
+ String wantedProperty = builder.toString();
+ testOpenExistingTable("classTreeTable", " openTest"); //$NON-NLS-1$ //$NON-NLS-2$
+ List<IAxis> iAxis = getTable().getCurrentColumnAxisProvider().getAxis();
+ IAxis colorAxis = null;
+ Object representedElement = null;
+
+ for (IAxis current : iAxis) {
+ representedElement = AxisUtils.getRepresentedElement(current);
+ if (wantedProperty.equals(representedElement)) {
+ colorAxis = current;
+ break;
+ }
+ }
+ Assert.assertNotNull(colorAxis);
+ Assert.assertNotNull(representedElement);
+
+ UMLStereotypeSingleEnumerationComboBoxDataProvider provider = new UMLStereotypeSingleEnumerationComboBoxDataProvider(colorAxis, getTableManager());
+ List<?> values = provider.getValues(iAxis.indexOf(colorAxis), 0);
+ boolean findBlack = false;
+ boolean findRed = false;
+ boolean findBlue = false;
+ for (Object current : values) {
+ Assert.assertTrue(current instanceof EEnumLiteral);
+ EEnumLiteral lit = (EEnumLiteral) current;
+ if (lit.getLiteral().equals("black")) { //$NON-NLS-1$
+ findBlack = true;
+ }
+ if (lit.getLiteral().equals("red")) { //$NON-NLS-1$
+ findRed = true;
+ }
+ if (lit.getLiteral().equals("blue")) { //$NON-NLS-1$
+ findBlue = true;
+ }
+ }
+
+
+ Assert.assertTrue(findBlack);
+ Assert.assertTrue(findRed);
+ Assert.assertTrue(findBlue);
+ }
+
+ @Test
+ public void availablePriorityTest() throws Exception {
+ StringBuilder builder = new StringBuilder(UMLTableUtils.PROPERTY_OF_STEREOTYPE_PREFIX);
+ builder.append("profile::Task::p"); //$NON-NLS-1$
+ String wantedProperty = builder.toString();
+ testOpenExistingTable("classTreeTable", " openTest"); //$NON-NLS-1$ //$NON-NLS-2$
+ List<IAxis> iAxis = getTable().getCurrentColumnAxisProvider().getAxis();
+ IAxis priorityAxis = null;
+ Object representedElement = null;
+
+ for (IAxis current : iAxis) {
+ representedElement = AxisUtils.getRepresentedElement(current);
+ if (wantedProperty.equals(representedElement)) {
+ priorityAxis = current;
+ break;
+ }
+ }
+ Assert.assertNotNull(priorityAxis);
+ Assert.assertNotNull(representedElement);
+
+ UMLStereotypeSingleEnumerationComboBoxDataProvider provider = new UMLStereotypeSingleEnumerationComboBoxDataProvider(priorityAxis, getTableManager());
+ List<?> values = provider.getValues(iAxis.indexOf(priorityAxis), 0);
+ boolean findHight = false;
+ boolean findMedium = false;
+ boolean findLow = false;
+ for (Object current : values) {
+ Assert.assertTrue(current instanceof EEnumLiteral);
+ EEnumLiteral lit = (EEnumLiteral) current;
+ if (lit.getLiteral().equals("hight")) { //$NON-NLS-1$
+ findHight = true;
+ }
+ if (lit.getLiteral().equals("medium")) { //$NON-NLS-1$
+ findMedium = true;
+ }
+ if (lit.getLiteral().equals("low")) { //$NON-NLS-1$
+ findLow = true;
+ }
+ }
+
+
+ Assert.assertTrue(findHight);
+ Assert.assertTrue(findMedium);
+ Assert.assertTrue(findLow);
+ }
+
+ @Test
+ public void availableVisibilityTest() throws Exception {
+ testOpenExistingTable("classTreeTable", " openTest"); //$NON-NLS-1$ //$NON-NLS-2$
+ List<IAxis> iAxis = getTable().getCurrentColumnAxisProvider().getAxis();
+ IAxis visibilityAxis = null;
+ Object representedElement = null;
+ for (IAxis current : iAxis) {
+ representedElement = AxisUtils.getRepresentedElement(current);
+ if (UMLPackage.eINSTANCE.getNamedElement_Visibility() == representedElement) {
+ visibilityAxis = current;
+ break;
+ }
+ }
+ Assert.assertNotNull(visibilityAxis);
+ Assert.assertNotNull(representedElement);
+ EEnumComboBoxDataProvider provider = new EEnumComboBoxDataProvider((EEnum) UMLPackage.eINSTANCE.getNamedElement_Visibility().getEType());
+ List<?> values = provider.getValues(iAxis.indexOf(visibilityAxis), 0);
+ Assert.assertEquals(4, values.size());
+ Assert.assertTrue(values.contains(VisibilityKind.PACKAGE_LITERAL));
+ Assert.assertTrue(values.contains(VisibilityKind.PUBLIC_LITERAL));
+ Assert.assertTrue(values.contains(VisibilityKind.PRIVATE_LITERAL));
+ Assert.assertTrue(values.contains(VisibilityKind.PROTECTED_LITERAL));
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.without.service.edit.AbstractPasteTests#validateReturnedStatus(org.eclipse.core.runtime.IStatus)
+ */
+ @Override
+ protected void validateReturnedStatus(final IStatus status) {
+ Assert.assertEquals("Status must be a warning", IStatus.WARNING, status.getSeverity());
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/tests/AllTests.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/tests/AllTests.java
new file mode 100755
index 0000000..bc98386
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/tests/AllTests.java
@@ -0,0 +1,145 @@
+/*****************************************************************************
+ * 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:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.tests;
+
+
+import org.eclipse.papyrus.sysml.nattable.requirement.tests.bugs.AxisChangeIndexWithConfigurationTest;
+import org.eclipse.papyrus.sysml.nattable.requirement.tests.bugs.AxisChangeIndexWithoutConfigurationTest;
+import org.eclipse.papyrus.sysml.nattable.requirement.tests.bugs.InvertedAxisChangeIndexWithConfigurationTest;
+import org.eclipse.papyrus.sysml.nattable.requirement.tests.bugs.InvertedAxisChangeIndexWithoutConfigurationTest;
+import org.eclipse.papyrus.sysml.nattable.requirement.tests.bugs.RequirementReorderingTest;
+import org.eclipse.papyrus.sysml.nattable.requirement.tests.importfile.ImportCellsAll_Test;
+import org.eclipse.papyrus.sysml.nattable.requirement.tests.importfile.ImportEmptyAddAll_Test;
+import org.eclipse.papyrus.sysml.nattable.requirement.tests.importfile.ImportEmptyReplaceAll_Test;
+import org.eclipse.papyrus.sysml.nattable.requirement.tests.importfile.ImportEmptySkipAll_Test;
+import org.eclipse.papyrus.sysml.nattable.requirement.tests.importfile.ImportRowsAddAll_Test;
+import org.eclipse.papyrus.sysml.nattable.requirement.tests.importfile.ImportRowsReplaceAll_Test;
+import org.eclipse.papyrus.sysml.nattable.requirement.tests.importfile.ImportRowsSkipAll_Test;
+import org.eclipse.papyrus.sysml.nattable.requirement.tests.insert.InsertEmptyAddAll_Test;
+import org.eclipse.papyrus.sysml.nattable.requirement.tests.insert.InsertEmptyAxisIdentifierNotExisting_Test;
+import org.eclipse.papyrus.sysml.nattable.requirement.tests.insert.InsertEmptyClipboard_Test;
+import org.eclipse.papyrus.sysml.nattable.requirement.tests.insert.InsertEmptyFailColumns_Test;
+import org.eclipse.papyrus.sysml.nattable.requirement.tests.insert.InsertEmptyReplaceAll_Test;
+import org.eclipse.papyrus.sysml.nattable.requirement.tests.insert.InsertEmptySkipAll_Test;
+import org.eclipse.papyrus.sysml.nattable.requirement.tests.insert.InsertEmptyWarningNotExisting_Test;
+import org.eclipse.papyrus.sysml.nattable.requirement.tests.insert.InsertRowsAddAll_Test;
+import org.eclipse.papyrus.sysml.nattable.requirement.tests.insert.InsertRowsAxisIdentifierNotExisting_Test;
+import org.eclipse.papyrus.sysml.nattable.requirement.tests.insert.InsertRowsFailColumns_Test;
+import org.eclipse.papyrus.sysml.nattable.requirement.tests.insert.InsertRowsFailRows_Test;
+import org.eclipse.papyrus.sysml.nattable.requirement.tests.insert.InsertRowsReplaceAll_Test;
+import org.eclipse.papyrus.sysml.nattable.requirement.tests.insert.InsertRowsSkipAll_Test;
+import org.eclipse.papyrus.sysml.nattable.requirement.tests.insert.InsertRowsWarningNotExisting_Test;
+import org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.overwrite.PasteCellsOverwriteAll_Test;
+import org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.overwrite.PasteCellsOverwriteByOneLine_Test;
+import org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.overwrite.PasteCellsOverwriteFailColumns_Test;
+import org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.overwrite.PasteCellsOverwriteFailRows_Test;
+import org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.overwrite.PasteColumnsOverwriteAll_Test;
+import org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.overwrite.PasteColumnsOverwriteByOneLine_Test;
+import org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.overwrite.PasteColumnsOverwriteFailColumns_Test;
+import org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.overwrite.PasteColumnsOverwriteFailRows_Test;
+import org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.overwrite.PasteEmptyClipboard_Test;
+import org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.overwrite.PasteEmptyOverwriteAddAll_Test;
+import org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.overwrite.PasteEmptyOverwriteAxisIdentifierNotExisting_Test;
+import org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.overwrite.PasteEmptyOverwriteFailColumns_Test;
+import org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.overwrite.PasteEmptyOverwriteReplaceAll_Test;
+import org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.overwrite.PasteEmptyOverwriteSkipAll_Test;
+import org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.overwrite.PasteEmptyOverwriteWarningNotExisting_Test;
+import org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.overwrite.PasteRowsOverwriteAll_Test;
+import org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.overwrite.PasteRowsOverwriteAxisIdentifierNotExisting_Test;
+import org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.overwrite.PasteRowsOverwriteFailColumns_Test;
+import org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.overwrite.PasteRowsOverwriteFailRows_Test;
+import org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.overwrite.PasteRowsOverwriteWarningNotExisting_Test;
+import org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.without.service.edit.Bug443814_Enumeration;
+import org.junit.runner.RunWith;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.junit.runners.Suite.SuiteClasses;
+
+
+@RunWith(ClassificationSuite.class)
+@SuiteClasses({
+ SortAxisRequirementTableTest.class,
+ InvertAxisRequirementTableTest.class,
+ EditAxisRequirementTableTest.class,
+ Bug443814_Enumeration.class,
+ AxisChangeIndexWithConfigurationTest.class,
+ AxisChangeIndexWithoutConfigurationTest.class,
+ InvertedAxisChangeIndexWithConfigurationTest.class,
+ InvertedAxisChangeIndexWithoutConfigurationTest.class,
+ TableCreationInSysMLModelTest.class,
+ OpenTableTest.class,
+ TableCreationInUMLModel.class,
+ RevealRequirementTableTest.class,
+
+ // Bug 439501: Test the requirements reordering
+ RequirementReorderingTest.class,
+
+ // Paste Overwrite tests
+ PasteEmptyClipboard_Test.class,
+
+ PasteCellsOverwriteAll_Test.class,
+ PasteCellsOverwriteByOneLine_Test.class,
+ PasteCellsOverwriteFailColumns_Test.class,
+ PasteCellsOverwriteFailRows_Test.class,
+
+ PasteColumnsOverwriteAll_Test.class,
+ PasteColumnsOverwriteByOneLine_Test.class,
+ PasteColumnsOverwriteFailColumns_Test.class,
+ PasteColumnsOverwriteFailRows_Test.class,
+
+ PasteRowsOverwriteAll_Test.class,
+ PasteRowsOverwriteFailColumns_Test.class,
+ PasteRowsOverwriteFailRows_Test.class,
+ PasteRowsOverwriteWarningNotExisting_Test.class,
+ PasteRowsOverwriteAxisIdentifierNotExisting_Test.class,
+
+ PasteEmptyOverwriteReplaceAll_Test.class,
+ PasteEmptyOverwriteAddAll_Test.class,
+ PasteEmptyOverwriteSkipAll_Test.class,
+ PasteEmptyOverwriteFailColumns_Test.class,
+ PasteEmptyOverwriteWarningNotExisting_Test.class,
+ PasteEmptyOverwriteAxisIdentifierNotExisting_Test.class,
+
+ // Insert tests
+ InsertEmptyClipboard_Test.class,
+
+ InsertRowsAddAll_Test.class,
+ InsertRowsReplaceAll_Test.class,
+ InsertRowsSkipAll_Test.class,
+ InsertRowsFailColumns_Test.class,
+ InsertRowsFailRows_Test.class,
+ InsertRowsWarningNotExisting_Test.class,
+ InsertRowsAxisIdentifierNotExisting_Test.class,
+
+ InsertEmptyReplaceAll_Test.class,
+ InsertEmptyAddAll_Test.class,
+ InsertEmptySkipAll_Test.class,
+ InsertEmptyFailColumns_Test.class,
+ InsertEmptyWarningNotExisting_Test.class,
+ InsertEmptyAxisIdentifierNotExisting_Test.class,
+
+ // Import tests
+ ImportCellsAll_Test.class,
+ ImportEmptyReplaceAll_Test.class,
+ ImportEmptyAddAll_Test.class,
+ ImportEmptySkipAll_Test.class,
+ ImportRowsReplaceAll_Test.class,
+ ImportRowsAddAll_Test.class,
+ ImportRowsSkipAll_Test.class
+})
+public class AllTests {
+
+ /** The type of the requirement table */
+ public static final String REQUIREMENT_TABLE_ID = "PapyrusSysMLRequirementTable"; //$NON-NLS-1$
+
+ /** the creation command tested for the requirement table */
+ public static final String COMMAND_ID = "org.eclipse.papyrus.sysml.nattable.requirement.create.withoutdialog.command"; //$NON-NLS-1$
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/tests/EditAxisRequirementTableTest.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/tests/EditAxisRequirementTableTest.java
new file mode 100755
index 0000000..5e0cf65
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/tests/EditAxisRequirementTableTest.java
@@ -0,0 +1,388 @@
+/*****************************************************************************
+ * Copyright (c) 2015 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:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.tests;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.command.CompoundCommand;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.command.AddCommand;
+import org.eclipse.emf.edit.command.RemoveCommand;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.papyrus.infra.nattable.common.editor.NatTableEditor;
+import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.IAxis;
+import org.eclipse.papyrus.junit.utils.GenericUtils;
+import org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.without.service.edit.AbstractOpenTableTest;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Stereotype;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * This class allows to test the add and remove actions in the requirements NatTable
+ */
+public class EditAxisRequirementTableTest extends AbstractOpenTableTest {
+
+ /**
+ * The file name of the papyrus project used.
+ */
+ public static String fileName = "contents_sort_invert_edit_model"; //$NON-NLS-1$
+
+ /**
+ * The first class name in the model.
+ */
+ private static final String FIRST_CLASS = "Class1"; //$NON-NLS-1$
+
+ /**
+ * The second class name in the model.
+ */
+ private static final String SECOND_CLASS = "Class2"; //$NON-NLS-1$
+
+ /**
+ * The third class name in the model.
+ */
+ private static final String THIRD_CLASS = "Class3"; //$NON-NLS-1$
+
+ /**
+ * The created class name in the model.
+ */
+ private static final String FOURTH_CLASS = "Class4"; //$NON-NLS-1$
+
+ /**
+ * The 'derived' property of requirement stereotype.
+ */
+ private static final String DERIVED_PROPERTY = "property_of_stereotype:/SysML::Requirements::Requirement::derived"; //$NON-NLS-1$
+
+ /**
+ * The 'traced to' property of requirement stereotype.
+ */
+ private static final String TRACED_TO_PROPERTY = "property_of_stereotype:/SysML::Requirements::Requirement::tracedTo"; //$NON-NLS-1$
+
+ /**
+ * Initialize the model.
+ *
+ * @throws Exception
+ * The exception.
+ */
+ @Before
+ public void initModel() throws Exception {
+ initModel("RequirementTable", fileName, getBundle()); //$NON-NLS-1$
+ };
+
+ /**
+ * This allow to test the add row in a table.
+ *
+ * @throws Exception
+ * The exception.
+ */
+ @Test
+ public void editRows() throws Exception {
+ testOpenExistingTable(fileName, "RequirementTable"); //$NON-NLS-1$
+ IEditorPart tableEditor = editor.getActiveEditor();
+ Assert.assertTrue(tableEditor instanceof NatTableEditor);
+ INattableModelManager manager = (INattableModelManager) tableEditor.getAdapter(INattableModelManager.class);
+
+ // Test the initial display
+ // Check the row elements
+ List<?> rowElements = manager.getRowElementsList();
+ Assert.assertEquals(3, rowElements.size());
+ checkInitialRows(rowElements);
+
+ // Create a class to add in rows
+ org.eclipse.uml2.uml.Package rootModel = getRootUMLModel();
+ final Class fourthClass = UMLFactory.eINSTANCE.createClass();
+ fourthClass.setName(FOURTH_CLASS);
+ Assert.assertNotNull(fourthClass);
+ final CompoundCommand compoundCommand = new CompoundCommand("Add class with requirement stereotype"); //$NON-NLS-1$
+ compoundCommand.append(AddCommand.create(getTransactionalEditingDomain(), rootModel, UMLPackage.Literals.PACKAGE__PACKAGED_ELEMENT, fourthClass));
+ final Stereotype requirement = (Stereotype) rootModel.getProfileApplications().get(0).getAppliedProfile().getPackagedElement("Requirement"); //$NON-NLS-1$
+ compoundCommand.append(new RecordingCommand(getTransactionalEditingDomain()) {
+ public void doExecute() {
+ fourthClass.applyStereotype(requirement);
+ }
+ });
+ getTransactionalEditingDomain().getCommandStack().execute(compoundCommand);
+
+ // The created class and property display
+ rowElements = manager.getRowElementsList();
+ Assert.assertEquals(4, rowElements.size());
+ checkAddedRow(rowElements);
+
+ // Check the undo
+ getTransactionalEditingDomain().getCommandStack().undo();
+ rowElements = manager.getRowElementsList();
+ Assert.assertEquals(3, rowElements.size());
+ checkInitialRows(rowElements);
+ // Check the redo
+ getTransactionalEditingDomain().getCommandStack().redo();
+ rowElements = manager.getRowElementsList();
+ Assert.assertEquals(4, rowElements.size());
+ checkAddedRow(rowElements);
+
+ // Search the second class and remove it
+ Class secondClass = null;
+ for (final Element element : rootModel.getOwnedElements()) {
+ if (element instanceof Class && ((Class) element).getName().equals(SECOND_CLASS)) {
+ secondClass = (Class) element;
+ }
+ }
+ Assert.assertNotNull(secondClass);
+ getTransactionalEditingDomain().getCommandStack().execute(RemoveCommand.create(getTransactionalEditingDomain(), rootModel, UMLPackage.Literals.PACKAGE__PACKAGED_ELEMENT, secondClass));
+
+ // Check the removed class
+ rowElements = manager.getRowElementsList();
+ Assert.assertEquals(3, rowElements.size());
+ checkRemovedRow(rowElements);
+
+ // Check the undo
+ getTransactionalEditingDomain().getCommandStack().undo();
+ rowElements = manager.getRowElementsList();
+ Assert.assertEquals(4, rowElements.size());
+
+ // This will be different because the undo add the readded element to the last element of table
+ final Object firstRowRepresentedElement = rowElements.get(0);
+ Assert.assertEquals(UMLPackage.eINSTANCE.getClass_(), ((EObject) firstRowRepresentedElement).eClass());
+ Assert.assertEquals(FIRST_CLASS, ((org.eclipse.uml2.uml.Class) firstRowRepresentedElement).getName());
+
+ final Object secondRowRepresentedElement = rowElements.get(1);
+ Assert.assertEquals(UMLPackage.eINSTANCE.getClass_(), ((EObject) secondRowRepresentedElement).eClass());
+ Assert.assertEquals(THIRD_CLASS, ((org.eclipse.uml2.uml.Class) secondRowRepresentedElement).getName());
+
+ final Object thirdRowRepresentedElement = rowElements.get(2);
+ Assert.assertEquals(UMLPackage.eINSTANCE.getClass_(), ((EObject) thirdRowRepresentedElement).eClass());
+ Assert.assertEquals(FOURTH_CLASS, ((org.eclipse.uml2.uml.Class) thirdRowRepresentedElement).getName());
+
+ final Object fourthRowRepresentedElement = rowElements.get(3);
+ Assert.assertEquals(UMLPackage.eINSTANCE.getClass_(), ((EObject) fourthRowRepresentedElement).eClass());
+ Assert.assertEquals(SECOND_CLASS, ((org.eclipse.uml2.uml.Class) fourthRowRepresentedElement).getName());
+
+ // Check the redo
+ getTransactionalEditingDomain().getCommandStack().redo();
+ rowElements = manager.getRowElementsList();
+ Assert.assertEquals(3, rowElements.size());
+ checkRemovedRow(rowElements);
+ }
+
+ /**
+ * This allows to check the initial display rows.
+ *
+ * @param rowElements The row elements.
+ * @throws Exception The exception.
+ */
+ public void checkInitialRows(final List<?> rowElements) throws Exception{
+ final Object firstRowRepresentedElement = rowElements.get(0);
+ Assert.assertEquals(UMLPackage.eINSTANCE.getClass_(), ((EObject) firstRowRepresentedElement).eClass());
+ Assert.assertEquals(FIRST_CLASS, ((org.eclipse.uml2.uml.Class) firstRowRepresentedElement).getName());
+
+ final Object secondRowRepresentedElement = rowElements.get(1);
+ Assert.assertEquals(UMLPackage.eINSTANCE.getClass_(), ((EObject) secondRowRepresentedElement).eClass());
+ Assert.assertEquals(SECOND_CLASS, ((org.eclipse.uml2.uml.Class) secondRowRepresentedElement).getName());
+
+ final Object thirdRowRepresentedElement = rowElements.get(2);
+ Assert.assertEquals(UMLPackage.eINSTANCE.getClass_(), ((EObject) thirdRowRepresentedElement).eClass());
+ Assert.assertEquals(THIRD_CLASS, ((org.eclipse.uml2.uml.Class) thirdRowRepresentedElement).getName());
+ }
+
+ /**
+ * This allows to check the columns after the added row.
+ *
+ * @param rowElements The row elements.
+ * @throws Exception The exception.
+ */
+ public void checkAddedRow(final List<?> rowElements) throws Exception{
+ checkInitialRows(rowElements);
+
+ final Object fourthRowRepresentedElement = rowElements.get(3);
+ Assert.assertEquals(UMLPackage.eINSTANCE.getClass_(), ((EObject) fourthRowRepresentedElement).eClass());
+ Assert.assertEquals(FOURTH_CLASS, ((org.eclipse.uml2.uml.Class) fourthRowRepresentedElement).getName());
+ }
+
+ /**
+ * This allows to check the columns after the removed row.
+ *
+ * @param rowElements The row elements.
+ * @throws Exception The exception.
+ */
+ public void checkRemovedRow(final List<?> rowElements) throws Exception{
+ final Object firstRowRepresentedElement = rowElements.get(0);
+ Assert.assertEquals(UMLPackage.eINSTANCE.getClass_(), ((EObject) firstRowRepresentedElement).eClass());
+ Assert.assertEquals(FIRST_CLASS, ((org.eclipse.uml2.uml.Class) firstRowRepresentedElement).getName());
+
+ final Object secondRowRepresentedElement = rowElements.get(1);
+ Assert.assertEquals(UMLPackage.eINSTANCE.getClass_(), ((EObject) secondRowRepresentedElement).eClass());
+ Assert.assertEquals(THIRD_CLASS, ((org.eclipse.uml2.uml.Class) secondRowRepresentedElement).getName());
+
+ final Object thirdRowRepresentedElement = rowElements.get(2);
+ Assert.assertEquals(UMLPackage.eINSTANCE.getClass_(), ((EObject) thirdRowRepresentedElement).eClass());
+ Assert.assertEquals(FOURTH_CLASS, ((org.eclipse.uml2.uml.Class) thirdRowRepresentedElement).getName());
+ }
+
+ /**
+ * This allow to test the add column in a table.
+ *
+ * @throws Exception
+ * The exception.
+ */
+ @Test
+ public void editColumns() throws Exception {
+ testOpenExistingTable(fileName, "RequirementTable"); //$NON-NLS-1$
+ IEditorPart tableEditor = editor.getActiveEditor();
+ Assert.assertTrue(tableEditor instanceof NatTableEditor);
+ INattableModelManager manager = (INattableModelManager) tableEditor.getAdapter(INattableModelManager.class);
+
+ // Test the initial display
+ // Check the row elements
+ List<?> columnElements = manager.getColumnElementsList();
+ Assert.assertEquals(4, columnElements.size());
+ checkInitialColumns(columnElements);
+
+ // Add columns
+ final Collection<Object> columnsToAdd = new ArrayList<Object>();
+ columnsToAdd.add(UMLPackage.Literals.MULTIPLICITY_ELEMENT__LOWER_VALUE);
+ columnsToAdd.add(UMLPackage.Literals.TYPED_ELEMENT__TYPE);
+ manager.addColumns(columnsToAdd);
+
+ // Check the created columns display
+ columnElements = manager.getColumnElementsList();
+ Assert.assertEquals(6, columnElements.size());
+ checkAddedColumns(columnElements);
+
+ // Check the undo
+ getTransactionalEditingDomain().getCommandStack().undo();
+ columnElements = manager.getColumnElementsList();
+ Assert.assertEquals(4, columnElements.size());
+ checkInitialColumns(columnElements);
+ // Check the redo
+ getTransactionalEditingDomain().getCommandStack().redo();
+ columnElements = manager.getColumnElementsList();
+ Assert.assertEquals(6, columnElements.size());
+ checkAddedColumns(columnElements);
+
+ // Get the 'derived' property to remove it from wolumns
+ final org.eclipse.uml2.uml.Package rootModel = getRootUMLModel();
+ final Stereotype requirement = (Stereotype) rootModel.getProfileApplications().get(0).getAppliedProfile().getPackagedElement("Requirement"); //$NON-NLS-1$
+ final Property derivedProperty = requirement.getOwnedAttribute("derived", null); //$NON-NLS-1$
+
+ // Remove columns
+ final Collection<Object> columnsToRemove = new ArrayList<Object>();
+ columnsToRemove.add(UMLPackage.Literals.NAMED_ELEMENT__VISIBILITY);
+ columnsToRemove.add(derivedProperty);
+ columnsToRemove.add(UMLPackage.Literals.MULTIPLICITY_ELEMENT__LOWER_VALUE);
+ manager.removeColumns(columnsToRemove);
+
+ // Check the columns after remove
+ columnElements = manager.getColumnElementsList();
+ Assert.assertEquals(3, columnElements.size());
+ checkRemovedColumns(columnElements);
+
+ // Check the undo
+ getTransactionalEditingDomain().getCommandStack().undo();
+ columnElements = manager.getColumnElementsList();
+ Assert.assertEquals(6, columnElements.size());
+ checkAddedColumns(columnElements);
+ // Check the redo
+ getTransactionalEditingDomain().getCommandStack().redo();
+ columnElements = manager.getColumnElementsList();
+ Assert.assertEquals(3, columnElements.size());
+ checkRemovedColumns(columnElements);
+ }
+
+ /**
+ * This allows to check the initial display columns.
+ *
+ * @param columnElements The row elements.
+ * @throws Exception The exception.
+ */
+ public void checkInitialColumns(final List<?> columnElements) throws Exception{
+ final IAxis firstColumn = (IAxis) columnElements.get(0);
+ final Object firstColumnRepresentedElement = firstColumn.getElement();
+ Assert.assertEquals(UMLPackage.Literals.NAMED_ELEMENT__NAME, firstColumnRepresentedElement);
+
+ final IAxis secondColumn = (IAxis) columnElements.get(1);
+ final Object secondColumnRepresentedElement = secondColumn.getElement();
+ Assert.assertEquals(UMLPackage.Literals.NAMED_ELEMENT__VISIBILITY, secondColumnRepresentedElement);
+
+ final IAxis thirdColumn = (IAxis) columnElements.get(2);
+ final Object thirdColumnRepresentedElement = thirdColumn.getElement();
+ Assert.assertEquals(DERIVED_PROPERTY, thirdColumnRepresentedElement);
+
+ final IAxis fourthColumn = (IAxis) columnElements.get(3);
+ final Object fourthColumnRepresentedElement = fourthColumn.getElement();
+ Assert.assertEquals(TRACED_TO_PROPERTY, fourthColumnRepresentedElement);
+ }
+
+ /**
+ * This allows to check the columns after the added columns.
+ *
+ * @param columnElements The column elements.
+ * @throws Exception The exception.
+ */
+ public void checkAddedColumns(final List<?> columnElements) throws Exception{
+ checkInitialColumns(columnElements);
+
+ final IAxis fifthColumn = (IAxis) columnElements.get(4);
+ final Object fifthColumnRepresentedElement = fifthColumn.getElement();
+ Assert.assertEquals(UMLPackage.Literals.MULTIPLICITY_ELEMENT__LOWER_VALUE, fifthColumnRepresentedElement);
+
+ final IAxis sixthColumn = (IAxis) columnElements.get(5);
+ final Object sixthColumnRepresentedElement = sixthColumn.getElement();
+ Assert.assertEquals(UMLPackage.Literals.TYPED_ELEMENT__TYPE, sixthColumnRepresentedElement);
+ }
+
+ /**
+ * This allows to check the columns after the removed row.
+ *
+ * @param columnElements The column elements.
+ * @throws Exception The exception.
+ */
+ public void checkRemovedColumns(final List<?> columnElements) throws Exception{
+ final IAxis firstColumn = (IAxis) columnElements.get(0);
+ final Object firstColumnRepresentedElement = firstColumn.getElement();
+ Assert.assertEquals(UMLPackage.Literals.NAMED_ELEMENT__NAME, firstColumnRepresentedElement);
+
+ final IAxis secondColumn = (IAxis) columnElements.get(1);
+ final Object secondColumnRepresentedElement = secondColumn.getElement();
+ Assert.assertEquals(TRACED_TO_PROPERTY, secondColumnRepresentedElement);
+
+ final IAxis thirdColumn = (IAxis) columnElements.get(2);
+ final Object thirdColumnRepresentedElement = thirdColumn.getElement();
+ Assert.assertEquals(UMLPackage.Literals.TYPED_ELEMENT__TYPE, thirdColumnRepresentedElement);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getSourcePath() {
+ return "/resources/contents_tests_resources/"; //$NON-NLS-1$
+ }
+
+ /**
+ * This allow to close the opened editors.
+ */
+ @AfterClass
+ public static void endOfTest() {
+ GenericUtils.closeAllEditors();
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/tests/InvertAxisRequirementTableTest.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/tests/InvertAxisRequirementTableTest.java
new file mode 100755
index 0000000..251c2ab
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/tests/InvertAxisRequirementTableTest.java
@@ -0,0 +1,186 @@
+/*****************************************************************************
+ * Copyright (c) 2015 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:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.tests;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.infra.nattable.common.editor.NatTableEditor;
+import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.IAxis;
+import org.eclipse.papyrus.junit.utils.GenericUtils;
+import org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.without.service.edit.AbstractOpenTableTest;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * This class allows to test the invert axis in the Requirements NatTable
+ */
+public class InvertAxisRequirementTableTest extends AbstractOpenTableTest {
+
+ /**
+ * The file name of the papyrus project used.
+ */
+ public static String fileName = "contents_sort_invert_edit_model"; //$NON-NLS-1$
+
+ /**
+ * The first class name in the model.
+ */
+ private static final String FIRST_CLASS = "Class1"; //$NON-NLS-1$
+
+ /**
+ * The second class name in the model.
+ */
+ private static final String SECOND_CLASS = "Class2"; //$NON-NLS-1$
+
+ /**
+ * The second class name in the model.
+ */
+ private static final String THIRD_CLASS = "Class3"; //$NON-NLS-1$
+
+ /**
+ * The 'derived' property of requirement stereotype.
+ */
+ private static final String DERIVED_PROPERTY = "property_of_stereotype:/SysML::Requirements::Requirement::derived"; //$NON-NLS-1$
+
+ /**
+ * The 'traced to' property of requirement stereotype.
+ */
+ private static final String TRACED_TO_PROPERTY = "property_of_stereotype:/SysML::Requirements::Requirement::tracedTo"; //$NON-NLS-1$
+
+ /**
+ * Initialize the model.
+ *
+ * @throws Exception
+ * The exception.
+ */
+ @Before
+ public void initModel() throws Exception {
+ initModel("RequirementTable", fileName, getBundle()); //$NON-NLS-1$
+ };
+
+ /**
+ * This allow to test the invert axis method.
+ *
+ * @throws Exception
+ * The exception.
+ */
+ @Test
+ public void invertAxis() throws Exception {
+ testOpenExistingTable(fileName, "RequirementTable"); //$NON-NLS-1$
+ IEditorPart tableEditor = editor.getActiveEditor();
+ Assert.assertTrue(tableEditor instanceof NatTableEditor);
+ INattableModelManager manager = (INattableModelManager) tableEditor.getAdapter(INattableModelManager.class);
+
+ // Check the initial rows ans columns
+ Assert.assertEquals(4, manager.getColumnElementsList().size());
+ Assert.assertEquals(3, manager.getRowElementsList().size());
+ checkInitialTable(manager.getColumnElementsList(), manager.getRowElementsList());
+
+ // Invert Axis and check the rows and columns
+ manager.invertAxis();
+ Assert.assertEquals(4, manager.getRowElementsList().size());
+ Assert.assertEquals(3, manager.getColumnElementsList().size());
+ checkInitialTable(manager.getRowElementsList(), manager.getColumnElementsList());
+
+ // Invert Axis a second time and check the rows and columns
+ manager.invertAxis();
+ Assert.assertEquals(4, manager.getColumnElementsList().size());
+ Assert.assertEquals(3, manager.getRowElementsList().size());
+ checkInitialTable(manager.getColumnElementsList(), manager.getRowElementsList());
+
+// checkUndoRedo(manager);
+ }
+
+ /**
+ * This allow to check the undo and the redo action.
+ *
+ * @param manager The nattable model manager.
+ * @throws Exception The exception.
+ */
+ public void checkUndoRedo(final INattableModelManager manager) throws Exception {
+ getTransactionalEditingDomain().getCommandStack().undo();
+ Assert.assertEquals(4, manager.getRowElementsList().size());
+ Assert.assertEquals(3, manager.getColumnElementsList().size());
+ checkInitialTable(manager.getRowElementsList(), manager.getColumnElementsList());
+
+ // check the redo
+ getTransactionalEditingDomain().getCommandStack().redo();
+ Assert.assertEquals(4, manager.getColumnElementsList().size());
+ Assert.assertEquals(3, manager.getRowElementsList().size());
+ checkInitialTable(manager.getColumnElementsList(), manager.getRowElementsList());
+ }
+
+ /**
+ * This allow to test the row and the columns elements.
+ *
+ * @param columnElements
+ * The column elements.
+ * @param rowElements
+ * The row elements.
+ * @throws Exception
+ * The exception.
+ */
+ private void checkInitialTable(List<?> columnElements, final List<?> rowElements) throws Exception {
+ // Check the columns elements
+ IAxis firstColumn = (IAxis) columnElements.get(0);
+ Object firstColumnRepresentedElement = firstColumn.getElement();
+ Assert.assertEquals(UMLPackage.Literals.NAMED_ELEMENT__NAME, firstColumnRepresentedElement);
+
+ IAxis secondColumn = (IAxis) columnElements.get(1);
+ Object secondColumnRepresentedElement = secondColumn.getElement();
+ Assert.assertEquals(UMLPackage.Literals.NAMED_ELEMENT__VISIBILITY, secondColumnRepresentedElement);
+
+ IAxis thirdColumn = (IAxis) columnElements.get(2);
+ Object thirdColumnRepresentedElement = thirdColumn.getElement();
+ Assert.assertEquals(DERIVED_PROPERTY, thirdColumnRepresentedElement);
+
+ IAxis fourthColumn = (IAxis) columnElements.get(3);
+ Object fourthColumnRepresentedElement = fourthColumn.getElement();
+ Assert.assertEquals(TRACED_TO_PROPERTY, fourthColumnRepresentedElement);
+
+ // Check the row elements
+ EObject firstRow = (EObject) rowElements.get(0);
+ Assert.assertEquals(UMLPackage.eINSTANCE.getClass_(), ((EObject) firstRow).eClass());
+ Assert.assertEquals(FIRST_CLASS, ((org.eclipse.uml2.uml.Class) firstRow).getName());
+
+ EObject secondRow = (EObject) rowElements.get(1);
+ Assert.assertEquals(UMLPackage.eINSTANCE.getClass_(), ((EObject) secondRow).eClass());
+ Assert.assertEquals(SECOND_CLASS, ((org.eclipse.uml2.uml.Class) secondRow).getName());
+
+ EObject thirdRow = (EObject) rowElements.get(2);
+ Assert.assertEquals(UMLPackage.eINSTANCE.getClass_(), ((EObject) thirdRow).eClass());
+ Assert.assertEquals(THIRD_CLASS, ((org.eclipse.uml2.uml.Class) thirdRow).getName());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getSourcePath() {
+ return "/resources/contents_tests_resources/"; //$NON-NLS-1$
+ }
+
+ /**
+ * This allow to close the opened editors.
+ */
+ @AfterClass
+ public static void endOfTest() {
+ GenericUtils.closeAllEditors();
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/tests/OpenTableTest.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/tests/OpenTableTest.java
new file mode 100755
index 0000000..4595952
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/tests/OpenTableTest.java
@@ -0,0 +1,77 @@
+/*****************************************************************************
+ * 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.sysml.nattable.requirement.tests.tests;
+
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.commands.OpenDiagramCommand;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.core.sashwindows.di.service.IPageManager;
+import org.eclipse.papyrus.infra.emf.gmf.command.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.infra.gmfdiag.common.model.NotationUtils;
+import org.eclipse.papyrus.infra.nattable.common.editor.NatTableEditor;
+import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
+import org.eclipse.papyrus.junit.utils.GenericUtils;
+import org.eclipse.ui.IEditorPart;
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.Test;
+import org.osgi.framework.Bundle;
+
+
+public class OpenTableTest extends org.eclipse.papyrus.junit.utils.tests.AbstractEditorTest {
+
+
+ /**
+ * This test allows to be sure that we doesn't break existing table model
+ *
+ * @throws Exception
+ */
+ @Test
+ public void testOpenExistingTable() throws Exception {
+ initModel("requirementtableTest", "openTest", getBundle()); //$NON-NLS-1$ //$NON-NLS-2$
+ IPageManager pageManager = editor.getServicesRegistry().getService(IPageManager.class);
+ Assert.assertEquals(1, pageManager.allPages().size());
+ IEditorPart tableEditor = editor.getActiveEditor();
+ Assert.assertNull(tableEditor);
+ Resource notationResource = NotationUtils.getNotationModel(editor.getServicesRegistry().getService(ModelSet.class)).getResource();
+ Table requirementTable = (Table)notationResource.getContents().get(0);
+ TransactionalEditingDomain editingDomain = editor.getServicesRegistry().getService(TransactionalEditingDomain.class);
+ editingDomain.getCommandStack().execute(new GMFtoEMFCommandWrapper(new OpenDiagramCommand(editingDomain, requirementTable)));
+ //to refresh the table content
+// while(!Display.getDefault().isDisposed() && Display.getDefault().readAndDispatch());
+ tableEditor = editor.getActiveEditor();
+ Assert.assertTrue(tableEditor instanceof NatTableEditor);
+ INattableModelManager manager = (INattableModelManager)tableEditor.getAdapter(INattableModelManager.class);
+ Assert.assertNotNull(manager);
+ Assert.assertEquals(AllTests.REQUIREMENT_TABLE_ID, manager.getTable().getTableConfiguration().getType());
+
+ }
+
+ @Override
+ protected String getSourcePath() {
+ return "/resources/"; //$NON-NLS-1$
+ }
+
+ @Override
+ protected Bundle getBundle() {
+ return org.eclipse.papyrus.sysml.nattable.requirement.tests.Activator.getDefault().getBundle();
+ }
+
+ @AfterClass
+ public static void endOfTest() {
+ GenericUtils.closeAllEditors();
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/tests/RevealRequirementTableTest.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/tests/RevealRequirementTableTest.java
new file mode 100755
index 0000000..a1cd25d
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/tests/RevealRequirementTableTest.java
@@ -0,0 +1,680 @@
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ * Quentin Le Menez (CEA LIST) quentin.lemenez@cea.fr
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.tests;
+
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.nebula.widgets.nattable.selection.SelectionLayer;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+import org.eclipse.papyrus.infra.nattable.provider.TableStructuredSelection;
+import org.eclipse.papyrus.infra.nattable.utils.AxisUtils;
+import org.eclipse.papyrus.infra.nattable.utils.TableSelectionWrapper;
+import org.eclipse.papyrus.infra.widgets.util.IRevealSemanticElement;
+import org.eclipse.papyrus.infra.widgets.util.NavigationTarget;
+import org.eclipse.papyrus.junit.utils.tests.AbstractEditorTest;
+import org.eclipse.papyrus.sysml.nattable.requirement.tests.Activator;
+import org.eclipse.papyrus.uml.nattable.utils.UMLTableUtils;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.ISelectionService;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.osgi.framework.Bundle;
+
+
+public class RevealRequirementTableTest extends AbstractEditorTest {
+
+ protected Resource di;
+
+ protected Resource notation;
+
+ protected Resource uml;
+
+ protected Model rootModel;
+
+ protected Class classTest;
+
+ protected List<?> elementListTest;
+
+ protected Package packageTest;
+
+ private List<?> root;
+
+ private Object diagramTest;
+
+
+ /**
+ *
+ * Constructor.
+ * This plugin test the ModelExplorerView
+ */
+ public RevealRequirementTableTest() {
+ super();
+ }
+
+ @Before
+ public void initTests() throws CoreException, IOException {
+ try {
+ initModel("revealSemanticModel", "revealSemanticModel", getBundle()); //$NON-NLS-1$ //$NON-NLS-2$
+ } catch (final Exception e) {
+ e.printStackTrace();
+ }
+
+ ResourceSet set = null;
+ try {
+ set = getModelSet();
+ } catch (final ServiceException e) {
+ e.printStackTrace();
+ }
+
+ final List<Resource> resources = set.getResources();
+
+ for (final Resource current : resources) {
+ if (current.getURI().lastSegment().equals("revealSemanticModel.uml")) { //$NON-NLS-1$
+ uml = current;
+ } else if (current.getURI().lastSegment().equals("revealSemanticModel.notation")) { //$NON-NLS-1$
+ notation = current;
+ } else if (current.getURI().lastSegment().equals("revealSemanticModel.di")) { //$NON-NLS-1$
+ di = current;
+ }
+ }
+
+ rootModel = (Model) uml.getContents().get(0);
+ root = notation.getContents();
+ // TODO on luna : open diagram
+ }
+
+
+ /**
+ * select an element from the model explorer and seek it in the requirement table,
+ * then proceed to check that its row has been correctly selected and that none of the columns are
+ */
+ @Test
+ public void test1SelectElement() {
+ // select the element
+ diagramTest = root.get(0);
+ // select the page, corresponding to the requirement table used to test the behavior, in the multidiagram view
+ selectTablePage(3);
+
+ final INattableModelManager manager = editor.getAdapter(INattableModelManager.class);
+ // verify that the axis is not inverted
+ if (manager.getTable().isInvertAxis()) {
+ manager.invertAxis();
+ }
+
+ Assert.assertTrue(editor.getActiveEditor() instanceof NavigationTarget);
+ // spoofs the behavior when the link with editor button is activated
+ ((NavigationTarget) editor.getActiveEditor()).revealElement(diagramTest);
+ final ISelectionService serv = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService();
+ final ISelection selection = serv.getSelection();
+
+ Assert.assertTrue(selection instanceof IStructuredSelection);
+ final Object currentAxisObject = ((IStructuredSelection) selection).getFirstElement();
+ final Object currentRealObject = AxisUtils.getRepresentedElement(currentAxisObject);
+ // verify that the same element has been selected on both sides
+ Assert.assertTrue("failed to match the selection with: " + diagramTest, diagramTest.equals(currentRealObject)); //$NON-NLS-1$
+
+ final SelectionLayer layer = manager.getBodyLayerStack().getSelectionLayer();
+ final int[] rowSelectedPositions = layer.getFullySelectedRowPositions();
+ final int[] columnSelectedPositions = layer.getFullySelectedColumnPositions();
+ // verify that the line selected is indeed the line corresponding to the element selected in the model explorer
+ Assert.assertTrue("index of row does not match: " + rowSelectedPositions[0], rowSelectedPositions[0] == 0); //$NON-NLS-1$
+ Assert.assertTrue("number of selected columns does not match: " + columnSelectedPositions.length, columnSelectedPositions.length == 0); //$NON-NLS-1$
+
+ }
+
+
+ /**
+ * select an element from the model explorer and seek it in the requirement table which has had its axis inverted,
+ * then proceed to check that its column has been correctly selected and that none of the rows are
+ */
+ @Test
+ public void test2SelectElementInvertAxis() {
+ diagramTest = root.get(0);
+ selectTablePage(3);
+
+ final INattableModelManager manager = editor.getAdapter(INattableModelManager.class);
+ if (!manager.getTable().isInvertAxis()) {
+ manager.invertAxis();
+ }
+
+ Assert.assertTrue(editor.getActiveEditor() instanceof NavigationTarget);
+ ((NavigationTarget) editor.getActiveEditor()).revealElement(diagramTest);
+ final ISelectionService serv = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService();
+ final ISelection selection = serv.getSelection();
+
+ Assert.assertTrue(selection instanceof IStructuredSelection);
+ final Object currentAxisObject = ((IStructuredSelection) selection).getFirstElement();
+ final Object currentRealObject = AxisUtils.getRepresentedElement(currentAxisObject);
+ Assert.assertTrue("failed to match the selection with: " + diagramTest, diagramTest.equals(currentRealObject)); //$NON-NLS-1$
+
+ final SelectionLayer layer = manager.getBodyLayerStack().getSelectionLayer();
+ final int[] rowSelectedPositions = layer.getFullySelectedRowPositions();
+ final int[] columnSelectedPositions = layer.getFullySelectedColumnPositions();
+ Assert.assertTrue("index of row does not match: " + columnSelectedPositions[0], columnSelectedPositions[0] == 0); //$NON-NLS-1$
+ Assert.assertTrue("number of selected columns does not match: " + rowSelectedPositions.length, rowSelectedPositions.length == 0); //$NON-NLS-1$
+
+ }
+
+
+ /**
+ * select an element from the model explorer and seek it in the requirement table,
+ * then proceed to check that its row has been correctly selected and that none of the columns are
+ */
+ @Test
+ public void test3SelectElement() {
+ classTest = (Class) rootModel.allOwnedElements().get(4);
+ selectTablePage(4);
+
+ final INattableModelManager manager = editor.getAdapter(INattableModelManager.class);
+ if (manager.getTable().isInvertAxis()) {
+ manager.invertAxis();
+ }
+
+ Assert.assertTrue(editor.getActiveEditor() instanceof NavigationTarget);
+ ((NavigationTarget) editor.getActiveEditor()).revealElement(classTest);
+ final ISelectionService serv = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService();
+ final ISelection selection = serv.getSelection();
+
+ Assert.assertTrue(selection instanceof IStructuredSelection);
+ final Object currentAxisObject = ((IStructuredSelection) selection).getFirstElement();
+ final Object currentRealObject = AxisUtils.getRepresentedElement(currentAxisObject);
+ Assert.assertTrue("failed to match the selection with: " + classTest, classTest.equals(currentRealObject)); //$NON-NLS-1$
+
+ final SelectionLayer layer = manager.getBodyLayerStack().getSelectionLayer();
+ final int[] rowSelectedPositions = layer.getFullySelectedRowPositions();
+ final int[] columnSelectedPositions = layer.getFullySelectedColumnPositions();
+ Assert.assertTrue("index of row does not match: " + rowSelectedPositions[0], rowSelectedPositions[0] == 0); //$NON-NLS-1$
+ Assert.assertTrue("number of selected columns does not match: " + columnSelectedPositions.length, columnSelectedPositions.length == 0); //$NON-NLS-1$
+
+ }
+
+
+ /**
+ * select an element from the model explorer and seek it in the requirement table which has had its axis inverted,
+ * then proceed to check that its column has been correctly selected and that none of the rows are
+ */
+ @Test
+ public void test4SelectElementInvertAxis() {
+ classTest = (Class) rootModel.allOwnedElements().get(4);
+ selectTablePage(4);
+
+ final INattableModelManager manager = editor.getAdapter(INattableModelManager.class);
+ if (!manager.getTable().isInvertAxis()) {
+ manager.invertAxis();
+ }
+
+ Assert.assertTrue(editor.getActiveEditor() instanceof NavigationTarget);
+ ((NavigationTarget) editor.getActiveEditor()).revealElement(classTest);
+ final ISelectionService serv = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService();
+ final ISelection selection = serv.getSelection();
+
+ Assert.assertTrue(selection instanceof IStructuredSelection);
+ final Object currentAxisObject = ((IStructuredSelection) selection).getFirstElement();
+ final Object currentRealObject = AxisUtils.getRepresentedElement(currentAxisObject);
+ Assert.assertTrue("failed to match the selection with: " + classTest, classTest.equals(currentRealObject)); //$NON-NLS-1$
+
+ final SelectionLayer layer = manager.getBodyLayerStack().getSelectionLayer();
+ final int[] rowSelectedPositions = layer.getFullySelectedRowPositions();
+ final int[] columnSelectedPositions = layer.getFullySelectedColumnPositions();
+ Assert.assertTrue("index of row does not match: " + columnSelectedPositions[0], columnSelectedPositions[0] == 0); //$NON-NLS-1$
+ Assert.assertTrue("number of selected columns does not match: " + rowSelectedPositions.length, rowSelectedPositions.length == 0); //$NON-NLS-1$
+
+ }
+
+
+ /**
+ * select multiple elements from the model explorer and seek them in the requirement table,
+ * then proceed to check that their rows have been correctly selected and that none of the columns are
+ */
+ @Test
+ public void test5SelectMultipleElements() {
+ elementListTest = rootModel.allOwnedElements().get(2).getOwnedElements().subList(0, 3);
+
+ selectTablePage(4);
+
+ final INattableModelManager manager = editor.getAdapter(INattableModelManager.class);
+ if (manager.getTable().isInvertAxis()) {
+ manager.invertAxis();
+ }
+
+ Assert.assertTrue(editor.getActiveEditor() instanceof NavigationTarget);
+ ((NavigationTarget) editor.getActiveEditor()).revealElement(elementListTest);
+ final ISelectionService serv = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService();
+ final ISelection selection = serv.getSelection();
+
+ Assert.assertTrue(selection instanceof IStructuredSelection);
+ final List<?> selectedRowElements = ((IStructuredSelection) selection).toList();
+ for (int index = 0; index < selectedRowElements.size(); index++) {
+ final Object currentAxisObject = selectedRowElements.get(index);
+ final Object currentRealObject = AxisUtils.getRepresentedElement(currentAxisObject);
+ // the requirement object is a class with the requirement stereotype applied to it, and we only need to verify that those are indeed selected
+ if (currentRealObject instanceof Class) {
+ Assert.assertTrue("failed to match the selection", elementListTest.contains(currentRealObject)); //$NON-NLS-1$
+ }
+ }
+
+ final SelectionLayer layer = manager.getBodyLayerStack().getSelectionLayer();
+ final int[] rowSelectedPositions = layer.getFullySelectedRowPositions();
+ final int[] columnSelectedPositions = layer.getFullySelectedColumnPositions();
+
+ Assert.assertTrue("index of row does not match", rowSelectedPositions.length == 2); //$NON-NLS-1$
+ final List rowSelectedPositionsAsList = Arrays.asList(rowSelectedPositions[0], rowSelectedPositions[1]);
+ Assert.assertTrue("index of row does not match", rowSelectedPositionsAsList.contains(0)); //$NON-NLS-1$
+ Assert.assertTrue("index of row does not match", rowSelectedPositionsAsList.contains(1)); //$NON-NLS-1$
+ Assert.assertTrue("number of selected columns does not match: " + columnSelectedPositions.length, columnSelectedPositions.length == 0); //$NON-NLS-1$
+
+ }
+
+
+ /**
+ * select all elements of the table from the model explorer and seek them in the requirement table,
+ * then proceed to check the behavior of the selection
+ */
+ @Test
+ public void test5SelectMultipleElementsAllLines() {
+ elementListTest = rootModel.allOwnedElements().get(2).getOwnedElements();
+
+ selectTablePage(4);
+
+ final INattableModelManager manager = editor.getAdapter(INattableModelManager.class);
+ if (manager.getTable().isInvertAxis()) {
+ manager.invertAxis();
+ }
+
+ Assert.assertTrue(editor.getActiveEditor() instanceof NavigationTarget);
+ ((NavigationTarget) editor.getActiveEditor()).revealElement(elementListTest);
+ final ISelectionService serv = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService();
+ final ISelection selection = serv.getSelection();
+
+ Assert.assertTrue(selection instanceof IStructuredSelection);
+ final List<?> selectedRowElements = ((IStructuredSelection) selection).toList();
+ for (int index = 0; index < selectedRowElements.size(); index++) {
+ final Object currentAxisObject = selectedRowElements.get(index);
+ final Object currentRealObject = AxisUtils.getRepresentedElement(currentAxisObject);
+ // the requirement object is a class with the requirement stereotype applied to it, and we only need to verify that those are indeed selected
+ if (currentRealObject instanceof Class) {
+ Assert.assertTrue("failed to match the selection", elementListTest.contains(currentRealObject)); //$NON-NLS-1$
+ }
+ }
+
+ final SelectionLayer layer = manager.getBodyLayerStack().getSelectionLayer();
+ final int[] rowSelectedPositions = layer.getFullySelectedRowPositions();
+ final int[] columnSelectedPositions = layer.getFullySelectedColumnPositions();
+
+ Assert.assertTrue("index of row does not match", rowSelectedPositions.length == 3); //$NON-NLS-1$
+ final List rowSelectedPositionsAsList = Arrays.asList(rowSelectedPositions[0], rowSelectedPositions[1], rowSelectedPositions[2]);
+ Assert.assertTrue("index of row does not match", rowSelectedPositionsAsList.contains(0)); //$NON-NLS-1$
+ Assert.assertTrue("index of row does not match", rowSelectedPositionsAsList.contains(1)); //$NON-NLS-1$
+ Assert.assertTrue("index of row does not match", rowSelectedPositionsAsList.contains(2)); //$NON-NLS-1$
+ // the test directly under fails because having selected both elements we have selected every row elements in the table,
+ // therefore all the columns are also considered selected (Ctrl + A behavior) and it befalls the user to know if he wanted to select rows or cells
+ // Assert.assertTrue("number of selected columns does not match: " + columnSelectedPositions.length, columnSelectedPositions.length == 0);
+ Assert.assertTrue("number of selected columns does not match: " + columnSelectedPositions.length, columnSelectedPositions.length == 4); //$NON-NLS-1$
+
+ }
+
+
+ /**
+ * select multiple elements from the model explorer and seek them in the requirement table which axis has been inverted,
+ * then proceed to check that their columns have been correctly selected and that none of the rows are
+ */
+ @Test
+ public void test6SelectMultipleElementsInvertAxis() {
+ elementListTest = rootModel.allOwnedElements().get(2).getOwnedElements().subList(0, 3);
+
+ selectTablePage(4);
+
+ final INattableModelManager manager = editor.getAdapter(INattableModelManager.class);
+ if (!manager.getTable().isInvertAxis()) {
+ manager.invertAxis();
+ }
+
+ Assert.assertTrue(editor.getActiveEditor() instanceof NavigationTarget);
+ ((NavigationTarget) editor.getActiveEditor()).revealElement(elementListTest);
+ final ISelectionService serv = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService();
+ final ISelection selection = serv.getSelection();
+
+ Assert.assertTrue(selection instanceof IStructuredSelection);
+ final List<?> selectedRowElements = ((IStructuredSelection) selection).toList();
+ for (int index = 0; index < selectedRowElements.size(); index++) {
+ final Object currentAxisObject = selectedRowElements.get(index);
+ final Object currentRealObject = AxisUtils.getRepresentedElement(currentAxisObject);
+ // the requirement object is a class with the requirement stereotype applied to it, and we only need to verify that those are indeed selected
+ if (currentRealObject instanceof Class) {
+ Assert.assertTrue("failed to match the selection", elementListTest.contains(currentRealObject)); //$NON-NLS-1$
+ }
+ }
+
+ final SelectionLayer layer = manager.getBodyLayerStack().getSelectionLayer();
+ final int[] rowSelectedPositions = layer.getFullySelectedRowPositions();
+ final int[] columnSelectedPositions = layer.getFullySelectedColumnPositions();
+
+ Assert.assertTrue("index of row does not match", columnSelectedPositions.length == 2); //$NON-NLS-1$
+ final List columnSelectedPositionsAsList = Arrays.asList(columnSelectedPositions[0], columnSelectedPositions[1]);
+ Assert.assertTrue("index of row does not match", columnSelectedPositionsAsList.contains(0)); //$NON-NLS-1$
+ Assert.assertTrue("index of row does not match", columnSelectedPositionsAsList.contains(1)); //$NON-NLS-1$
+ Assert.assertTrue("number of selected columns does not match: " + rowSelectedPositions.length, rowSelectedPositions.length == 0); //$NON-NLS-1$
+
+ }
+
+ @Override
+ protected void flushDisplayEvents() {
+ for (;;) {
+ try {
+ if (!Display.getCurrent().readAndDispatch()) {
+ break;
+ }
+ } catch (final Exception e) {
+ final Bundle testBundle = getBundle();
+ Platform.getLog(testBundle).log(new Status(IStatus.ERROR, testBundle.getSymbolicName(), "Uncaught exception in display runnable.", e)); //$NON-NLS-1$
+ }
+ }
+ }
+
+ /**
+ * select all elements of the table from the model explorer and seek them in the requirement table,
+ * then proceed to check the behavior of the selection
+ */
+ @Test
+ public void test6SelectMultipleElementsInvertAxisAllColumns() {
+ elementListTest = rootModel.allOwnedElements().get(2).getOwnedElements();
+ selectTablePage(4);
+
+ final INattableModelManager manager = editor.getAdapter(INattableModelManager.class);
+ if (!manager.getTable().isInvertAxis()) {
+ manager.invertAxis();
+ }
+
+ Assert.assertTrue(editor.getActiveEditor() instanceof NavigationTarget);
+ ((NavigationTarget) editor.getActiveEditor()).revealElement(elementListTest);
+ final ISelectionService serv = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService();
+ final ISelection selection = serv.getSelection();
+
+ Assert.assertTrue(selection instanceof TableStructuredSelection);
+ final TableStructuredSelection tableSelection = (TableStructuredSelection) selection;
+ final TableSelectionWrapper wrapper = (TableSelectionWrapper) tableSelection.getAdapter(TableSelectionWrapper.class);
+ final Map<Integer, Object> selectedRows = wrapper.getFullySelectedRows();
+ final Map<Integer, Object> selectedColumns = wrapper.getFullySelectedColumns();
+
+ // rows are feature
+ for (final Entry<Integer, Object> current : selectedRows.entrySet()) {
+ switch (current.getKey()) {
+ case 0:
+ final StringBuffer buffer = new StringBuffer();
+ buffer.append(UMLTableUtils.PROPERTY_OF_STEREOTYPE_PREFIX);
+ buffer.append("SysML::Requirements::Requirement::id"); //$NON-NLS-1$
+ Assert.assertEquals(buffer.toString(), AxisUtils.getRepresentedElement(current.getValue()));
+ break;
+ case 1:
+ Assert.assertEquals(UMLPackage.eINSTANCE.getNamedElement_Name(), AxisUtils.getRepresentedElement(current.getValue()));
+ break;
+ case 2:
+ Assert.assertEquals(UMLPackage.eINSTANCE.getNamedElement_Namespace(), AxisUtils.getRepresentedElement(current.getValue()));
+ break;
+ case 3:
+ final StringBuffer buffer1 = new StringBuffer();
+ buffer1.append(UMLTableUtils.PROPERTY_OF_STEREOTYPE_PREFIX);
+ buffer1.append("SysML::Requirements::Requirement::text"); //$NON-NLS-1$
+ Assert.assertEquals(buffer1.toString(), AxisUtils.getRepresentedElement(current.getValue()));
+ break;
+ default:
+ Assert.assertTrue("The test contains an error", false); //$NON-NLS-1$
+ break;
+ }
+ }
+ Assert.assertEquals(0, selectedRows.size());
+
+ Assert.assertEquals(3, selectedColumns.size());
+
+ for (final Entry<Integer, Object> current : selectedColumns.entrySet()) {
+ Assert.assertTrue(current.getValue() instanceof Class);
+
+ }
+ wrapper.getFullySelectedColumns();
+
+ final List<?> selectedRowElements = ((IStructuredSelection) selection).toList();
+ for (int index = 0; index < selectedRowElements.size(); index++) {
+ final Object currentAxisObject = selectedRowElements.get(index);
+ final Object currentRealObject = AxisUtils.getRepresentedElement(currentAxisObject);
+ // the requirement object is a class with the requirement stereotype applied to it, and we only need to verify that those are indeed selected
+ if (currentRealObject instanceof Class) {
+ Assert.assertTrue("failed to match the selection", elementListTest.contains(currentRealObject)); //$NON-NLS-1$
+ }
+ }
+
+ final SelectionLayer layer = manager.getBodyLayerStack().getSelectionLayer();
+ final int[] rowSelectedPositions = layer.getFullySelectedRowPositions();
+ final int[] columnSelectedPositions = layer.getFullySelectedColumnPositions();
+
+ Assert.assertTrue("index of row does not match", columnSelectedPositions.length == 3); //$NON-NLS-1$
+ final List columnSelectedPositionsAsList = Arrays.asList(columnSelectedPositions[0], columnSelectedPositions[1], columnSelectedPositions[2]);
+ Assert.assertTrue("index of row does not match", columnSelectedPositionsAsList.contains(0)); //$NON-NLS-1$
+ Assert.assertTrue("index of row does not match", columnSelectedPositionsAsList.contains(1)); //$NON-NLS-1$
+ Assert.assertTrue("index of row does not match", columnSelectedPositionsAsList.contains(2)); //$NON-NLS-1$
+ // the test directly under fails because having selected both elements we have selected every row elements in the table,
+ // therefore all the rows are also considered selected (Ctrl + A behavior) and it befalls the user to know if he wanted to select columns or cells
+ // Assert.assertTrue("number of selected columns does not match: " + rowSelectedPositions.length, rowSelectedPositions.length == 0);
+ Assert.assertTrue("number of selected columns does not match: " + rowSelectedPositions.length, rowSelectedPositions.length == 4); //$NON-NLS-1$
+
+ }
+
+
+
+ /**
+ * select an element from the model and seek it in the sorted requirement table,
+ * then proceed to check that its row has been correctly selected and that none of the columns are
+ */
+ @Test
+ @Ignore
+ // sort is not yet supported by the requirement tables
+ public void test7SelectSortedElement() {
+ this.classTest = (Class) this.rootModel.allOwnedElements().get(4);
+ selectTablePage(4);
+ final INattableModelManager manager = this.editor.getAdapter(INattableModelManager.class);
+ if (manager.getTable().isInvertAxis()) {
+ manager.invertAxis();
+ }
+ manager.sortRowsByName(true);
+
+ Assert.assertTrue(editor.getActiveEditor() instanceof IRevealSemanticElement);
+ ((IRevealSemanticElement) this.editor.getActiveEditor()).revealSemanticElement(Collections.singletonList(this.classTest));
+ final ISelectionService serv = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService();
+ final ISelection selection = serv.getSelection();
+
+ Assert.assertTrue(selection instanceof IStructuredSelection);
+ final Object currentAxisObject = ((IStructuredSelection) selection).getFirstElement();
+ final Object currentRealObject = AxisUtils.getRepresentedElement(currentAxisObject);
+ Assert.assertTrue("failed to match the selection with: " + this.classTest, this.classTest.equals(currentRealObject)); //$NON-NLS-1$
+
+ final SelectionLayer layer = manager.getBodyLayerStack().getSelectionLayer();
+ final int[] rowSelectedPositions = layer.getFullySelectedRowPositions();
+ final int[] columnSelectedPositions = layer.getFullySelectedColumnPositions();
+ Assert.assertTrue("index of row does not match: " + rowSelectedPositions[0], rowSelectedPositions[0] == 1); //$NON-NLS-1$
+ Assert.assertTrue("number of selected columns does not match: " + columnSelectedPositions.length, columnSelectedPositions.length == 0); //$NON-NLS-1$
+
+ }
+
+
+ /**
+ * select an element from the model and seek it in the requirement table that has had its axis inverted,
+ * then proceed to check that its column has been correctly selected and that none of the rows are
+ */
+ @Test
+ @Ignore
+ // sort is not yet supported by the requirement tables
+ public void test8SelectSortedElementInvertAxis() {
+ this.classTest = (Class) this.rootModel.allOwnedElements().get(4);
+ selectTablePage(4);
+
+ final INattableModelManager manager = this.editor.getAdapter(INattableModelManager.class);
+ if (!manager.getTable().isInvertAxis()) {
+ manager.invertAxis();
+ }
+ manager.sortColumnsByName(true);
+
+ Assert.assertTrue(editor.getActiveEditor() instanceof IRevealSemanticElement);
+ ((IRevealSemanticElement) this.editor.getActiveEditor()).revealSemanticElement(Collections.singletonList(this.classTest));
+ final ISelectionService serv = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService();
+ final ISelection selection = serv.getSelection();
+
+ Assert.assertTrue(selection instanceof IStructuredSelection);
+ final Object currentAxisObject = ((IStructuredSelection) selection).getFirstElement();
+ final Object currentRealObject = AxisUtils.getRepresentedElement(currentAxisObject);
+ Assert.assertTrue("failed to match the selection with: " + this.classTest, this.classTest.equals(currentRealObject)); //$NON-NLS-1$
+
+ final SelectionLayer layer = manager.getBodyLayerStack().getSelectionLayer();
+ final int[] rowSelectedPositions = layer.getFullySelectedRowPositions();
+ final int[] columnSelectedPositions = layer.getFullySelectedColumnPositions();
+ Assert.assertTrue("index of row does not match: " + columnSelectedPositions[0], columnSelectedPositions[0] == 0); //$NON-NLS-1$
+ Assert.assertTrue("number of selected columns does not match: " + rowSelectedPositions.length, rowSelectedPositions.length == 0); //$NON-NLS-1$
+
+ }
+
+
+ /**
+ * select multiple elements from the model and seek them in the requirement table,
+ * then proceed to check that their rows have been correctly selected and that none of the columns are
+ */
+ @Test
+ @Ignore
+ // sort is not yet supported by the requirement tables
+ public void test9SelectSortedMultipleElements() {
+ this.elementListTest = this.rootModel.allOwnedElements().get(2).getOwnedElements();
+ selectTablePage(4);
+
+ final INattableModelManager manager = this.editor.getAdapter(INattableModelManager.class);
+ if (manager.getTable().isInvertAxis()) {
+ manager.invertAxis();
+ }
+ manager.sortRowsByName(true);
+
+ Assert.assertTrue(editor.getActiveEditor() instanceof IRevealSemanticElement);
+ ((IRevealSemanticElement) this.editor.getActiveEditor()).revealSemanticElement(this.elementListTest);
+ final ISelectionService serv = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService();
+ final ISelection selection = serv.getSelection();
+
+ Assert.assertTrue(selection instanceof IStructuredSelection);
+ final List<?> selectedRowElements = ((IStructuredSelection) selection).toList();
+ for (int index = 0; index < selectedRowElements.size(); index++) {
+ final Object currentAxisObject = selectedRowElements.get(index);
+ final Object currentRealObject = AxisUtils.getRepresentedElement(currentAxisObject);
+ Assert.assertTrue("failed to match the selection", this.elementListTest.contains(currentRealObject)); //$NON-NLS-1$
+ }
+
+ final SelectionLayer layer = manager.getBodyLayerStack().getSelectionLayer();
+ final int[] rowSelectedPositions = layer.getFullySelectedRowPositions();
+ final int[] columnSelectedPositions = layer.getFullySelectedColumnPositions();
+
+ Assert.assertTrue("index of row does not match", rowSelectedPositions.length == 2); //$NON-NLS-1$
+ final List rowSelectedPositionsAsList = Arrays.asList(rowSelectedPositions[0], rowSelectedPositions[1]);
+ Assert.assertTrue("index of row does not match", rowSelectedPositionsAsList.contains(0)); //$NON-NLS-1$
+ Assert.assertTrue("index of row does not match", rowSelectedPositionsAsList.contains(1)); //$NON-NLS-1$
+ // the test directly under fails because having selected both elements we have selected every row elements in the table,
+ // therefore all the columns are also considered selected (Ctrl + A behavior)
+ // Assert.assertTrue("number of selected columns does not match: " + columnSelectedPositions.length, columnSelectedPositions.length == 0);
+ Assert.assertTrue("number of selected columns does not match: " + columnSelectedPositions.length, columnSelectedPositions.length == 4); //$NON-NLS-1$
+
+ }
+
+
+ /**
+ * select multiple elements from the model and seek them in the requirement table that has had its axis inverted,
+ * then proceed to check that their columns have been correctly selected and that none of the rows are
+ */
+ @Test
+ @Ignore
+ // sort is not yet supported by the requirement tables
+ public void test10SelectSortedMultipleElementsInvertAxis() {
+ this.elementListTest = this.rootModel.allOwnedElements().get(2).getOwnedElements();
+ selectTablePage(4);
+
+ final INattableModelManager manager = this.editor.getAdapter(INattableModelManager.class);
+ if (!manager.getTable().isInvertAxis()) {
+ manager.invertAxis();
+ }
+ manager.sortColumnsByName(true);
+
+ Assert.assertTrue(editor.getActiveEditor() instanceof IRevealSemanticElement);
+ ((IRevealSemanticElement) this.editor.getActiveEditor()).revealSemanticElement(this.elementListTest);
+ final ISelectionService serv = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService();
+ final ISelection selection = serv.getSelection();
+
+ Assert.assertTrue(selection instanceof IStructuredSelection);
+ final List<?> selectedRowElements = ((IStructuredSelection) selection).toList();
+ for (int index = 0; index < selectedRowElements.size(); index++) {
+ final Object currentAxisObject = selectedRowElements.get(index);
+ final Object currentRealObject = AxisUtils.getRepresentedElement(currentAxisObject);
+ Assert.assertTrue("failed to match the selection", this.elementListTest.contains(currentRealObject)); //$NON-NLS-1$
+ }
+
+ final SelectionLayer layer = manager.getBodyLayerStack().getSelectionLayer();
+ final int[] rowSelectedPositions = layer.getFullySelectedRowPositions();
+ final int[] columnSelectedPositions = layer.getFullySelectedColumnPositions();
+
+ Assert.assertTrue("index of row does not match", columnSelectedPositions.length == 2); //$NON-NLS-1$
+ final List columnSelectedPositionsAsList = Arrays.asList(columnSelectedPositions[0], columnSelectedPositions[1]);
+ Assert.assertTrue("index of row does not match", columnSelectedPositionsAsList.contains(0)); //$NON-NLS-1$
+ Assert.assertTrue("index of row does not match", columnSelectedPositionsAsList.contains(1)); //$NON-NLS-1$
+ // the test directly under fails because having selected both elements we have selected every column elements in the table,
+ // therefore all the rows are also considered selected (Ctrl + A behavior)
+ // Assert.assertTrue("number of selected columns does not match: " + rowSelectedPositions.length, rowSelectedPositions.length == 0);
+ Assert.assertTrue("number of selected columns does not match: " + rowSelectedPositions.length, rowSelectedPositions.length == 4); //$NON-NLS-1$
+
+ }
+
+
+ @Override
+ protected Bundle getBundle() {
+ return Activator.getDefault().getBundle();
+ }
+
+ @Override
+ protected String getSourcePath() {
+ return "resources/"; //$NON-NLS-1$
+ }
+
+ protected void selectTablePage(final int index) {
+ try {
+ final Object tablePage = getPageManager().allPages().get(index);
+ // getPageManager().closeAllOpenedPages();
+ // getPageManager().openPage(tablePage);
+ getPageManager().selectPage(tablePage);
+ } catch (final ServiceException e) {
+ Activator.log.error(e);
+ }
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/tests/SortAxisRequirementTableTest.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/tests/SortAxisRequirementTableTest.java
new file mode 100755
index 0000000..c341898
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/tests/SortAxisRequirementTableTest.java
@@ -0,0 +1,181 @@
+/*****************************************************************************
+ * Copyright (c) 2015 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:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.tests;
+
+import java.util.List;
+
+import org.eclipse.papyrus.infra.nattable.common.editor.NatTableEditor;
+import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.IAxis;
+import org.eclipse.papyrus.junit.utils.GenericUtils;
+import org.eclipse.papyrus.sysml.nattable.requirement.tests.paste.without.service.edit.AbstractOpenTableTest;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * This class allows to test the sort in the Requirements NatTable
+ */
+public class SortAxisRequirementTableTest extends AbstractOpenTableTest {
+
+ /**
+ * The file name of the papyrus project used.
+ */
+ public static String fileName = "contents_sort_invert_edit_model"; //$NON-NLS-1$
+
+ /**
+ * Initialize the model.
+ *
+ * @throws Exception
+ * The exception.
+ */
+ @Before
+ public void initModel() throws Exception {
+ initModel("RequirementTable", fileName, getBundle()); //$NON-NLS-1$
+ };
+
+ /**
+ * This allows to test the sort columns by name.
+ *
+ * @throws Exception
+ * The exception.
+ */
+ @Test
+ public void sortColumns() throws Exception {
+ testOpenExistingTable(fileName, "RequirementTable");
+ IEditorPart tableEditor = editor.getActiveEditor();
+ Assert.assertTrue(tableEditor instanceof NatTableEditor);
+ INattableModelManager manager = (INattableModelManager) tableEditor.getAdapter(INattableModelManager.class);
+
+ List<?> columnElements = manager.getColumnElementsList();
+ Assert.assertEquals(4, columnElements.size());
+
+ // Check the initial display
+ checkinitialColumns(columnElements);
+
+ // Sort ASC columns by name and check the new order
+ manager.sortColumnsByName(true);
+ columnElements = manager.getColumnElementsList();
+ checkSortedColumns(columnElements, true);
+
+ // Check the undo
+ getTransactionalEditingDomain().getCommandStack().undo();
+ columnElements = manager.getColumnElementsList();
+ checkinitialColumns(columnElements);
+ // Check the redo
+ getTransactionalEditingDomain().getCommandStack().redo();
+ columnElements = manager.getColumnElementsList();
+ checkSortedColumns(columnElements, true);
+
+ // Sort DESC columns by name and check the new order
+ manager.sortColumnsByName(false);
+ columnElements = manager.getColumnElementsList();
+ checkSortedColumns(columnElements, false);
+
+ // Check the undo
+ getTransactionalEditingDomain().getCommandStack().undo();
+ columnElements = manager.getColumnElementsList();
+ checkSortedColumns(columnElements, true);
+ // Check the redo
+ getTransactionalEditingDomain().getCommandStack().redo();
+ columnElements = manager.getColumnElementsList();
+ checkSortedColumns(columnElements, false);
+ }
+
+ /**
+ * This allows to check the columns when a sort was done.
+ *
+ * @param columnElements The column elements.
+ * @param alphabeticOrder <code>true</code> if the alphabetic order is used, <code>false</code> otherwise.
+ * @throws Exception The exception.
+ */
+ public void checkSortedColumns(final List<?> columnElements, final boolean alphabeticOrder) throws Exception{
+ if(alphabeticOrder){
+ final IAxis firstColumn = (IAxis) columnElements.get(0);
+ final Object firstColumnRepresentedElement = firstColumn.getElement();
+ Assert.assertEquals("property_of_stereotype:/SysML::Requirements::Requirement::derived", firstColumnRepresentedElement);
+
+ final IAxis secondColumn = (IAxis) columnElements.get(1);
+ final Object secondColumnRepresentedElement = secondColumn.getElement();
+ Assert.assertEquals(UMLPackage.Literals.NAMED_ELEMENT__NAME, secondColumnRepresentedElement);
+
+ final IAxis thirdColumn = (IAxis) columnElements.get(2);
+ final Object thirdColumnRepresentedElement = thirdColumn.getElement();
+ Assert.assertEquals("property_of_stereotype:/SysML::Requirements::Requirement::tracedTo", thirdColumnRepresentedElement);
+
+ final IAxis fourthColumn = (IAxis) columnElements.get(3);
+ final Object fourthColumnRepresentedElement = fourthColumn.getElement();
+ Assert.assertEquals(UMLPackage.Literals.NAMED_ELEMENT__VISIBILITY, fourthColumnRepresentedElement);
+ }else{
+ final IAxis firstColumn = (IAxis) columnElements.get(0);
+ final Object firstColumnRepresentedElement = firstColumn.getElement();
+ Assert.assertEquals(UMLPackage.Literals.NAMED_ELEMENT__VISIBILITY, firstColumnRepresentedElement);
+
+ final IAxis secondColumn = (IAxis) columnElements.get(1);
+ final Object secondColumnRepresentedElement = secondColumn.getElement();
+ Assert.assertEquals("property_of_stereotype:/SysML::Requirements::Requirement::tracedTo", secondColumnRepresentedElement);
+
+ final IAxis thirdColumn = (IAxis) columnElements.get(2);
+ final Object thirdColumnRepresentedElement = thirdColumn.getElement();
+ Assert.assertEquals(UMLPackage.Literals.NAMED_ELEMENT__NAME, thirdColumnRepresentedElement);
+
+ final IAxis fourthColumn = (IAxis) columnElements.get(3);
+ final Object fourthColumnRepresentedElement = fourthColumn.getElement();
+ Assert.assertEquals("property_of_stereotype:/SysML::Requirements::Requirement::derived", fourthColumnRepresentedElement);
+ }
+ }
+
+ /**
+ * This allow to check the initial display columns.
+ *
+ * @param columnElements The column elements.
+ * @throws Exception The exception.
+ */
+ public void checkinitialColumns(final List<?> columnElements) throws Exception{
+ final IAxis firstColumn = (IAxis) columnElements.get(0);
+ final Object firstColumnRepresentedElement = firstColumn.getElement();
+ Assert.assertEquals(UMLPackage.Literals.NAMED_ELEMENT__NAME, firstColumnRepresentedElement);
+
+ final IAxis secondColumn = (IAxis) columnElements.get(1);
+ final Object secondColumnRepresentedElement = secondColumn.getElement();
+ Assert.assertEquals(UMLPackage.Literals.NAMED_ELEMENT__VISIBILITY, secondColumnRepresentedElement);
+
+ final IAxis thirdColumn = (IAxis) columnElements.get(2);
+ final Object thirdColumnRepresentedElement = thirdColumn.getElement();
+ Assert.assertEquals("property_of_stereotype:/SysML::Requirements::Requirement::derived", thirdColumnRepresentedElement);
+
+ final IAxis fourthColumn = (IAxis) columnElements.get(3);
+ final Object fourthColumnRepresentedElement = fourthColumn.getElement();
+ Assert.assertEquals("property_of_stereotype:/SysML::Requirements::Requirement::tracedTo", fourthColumnRepresentedElement);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getSourcePath() {
+ return "/resources/contents_tests_resources/"; //$NON-NLS-1$
+ }
+
+ /**
+ * This allow to close the opened editors.
+ */
+ @AfterClass
+ public static void endOfTest() {
+ GenericUtils.closeAllEditors();
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/tests/TableCreationInSysMLModelTest.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/tests/TableCreationInSysMLModelTest.java
new file mode 100755
index 0000000..874ed3f
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/tests/TableCreationInSysMLModelTest.java
@@ -0,0 +1,323 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2014 CEA LIST and others.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.tests;
+
+import java.io.IOException;
+import java.util.Collection;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.RunnableWithResult;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.papyrus.infra.emf.gmf.command.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.infra.nattable.common.editor.NatTableEditor;
+import org.eclipse.papyrus.infra.nattable.manager.axis.IAxisManager;
+import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager;
+import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.infra.ui.editor.IMultiDiagramEditor;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.DisplayUtils;
+import org.eclipse.papyrus.junit.utils.GenericUtils;
+import org.eclipse.papyrus.junit.utils.ModelExplorerUtils;
+import org.eclipse.papyrus.junit.utils.PapyrusProjectUtils;
+import org.eclipse.papyrus.junit.utils.ProjectUtils;
+import org.eclipse.papyrus.junit.utils.rules.HouseKeeper;
+import org.eclipse.papyrus.sysml.nattable.requirement.tests.Activator;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.views.modelexplorer.ModelExplorerView;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.NamedElement;
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.ClassRule;
+import org.junit.Test;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleException;
+
+public class TableCreationInSysMLModelTest extends AbstractPapyrusTest {
+
+ @ClassRule
+ public static final HouseKeeper.Static houseKeeper = new HouseKeeper.Static();
+
+ private static Class class_;
+
+ private static Class requirement1;
+
+ private static Class requirement2;
+
+ private static Class requirement3;
+
+ private static Class nestedRequirement1;
+
+ private static Class nestedRequirement2;
+
+ private static Class nestedRequirement3;
+
+ private static final String MODEL_PATH = "/resources/sysmlModel"; //$NON-NLS-1$
+
+ private static final String SOURCE_PATH = "/resources/"; //$NON-NLS-1$
+
+ private static final String FILE_ROOT_NAME = "sysmlModel"; //$NON-NLS-1$
+
+ private static final String PROJECT_NAME = "test"; //$NON-NLS-1$
+
+ private static IMultiDiagramEditor papyrusEditor;
+
+ private static final String BUNDLE_ID = Activator.getDefault().getBundle().getSymbolicName();
+
+ protected static Model rootModel;
+
+ protected static ModelExplorerView view;
+
+ @BeforeClass
+ public static void init() {
+ try {
+
+ initTests(Activator.getDefault().getBundle(), PROJECT_NAME, MODEL_PATH);
+
+ } catch (CoreException e) {
+ Activator.log.error(e);
+ } catch (IOException e) {
+ Activator.log.error(e);
+ } catch (BundleException e) {
+ Activator.log.error(e);
+ }
+ }
+
+ public static void initTests(final Bundle bundle, final String projectName, final String papyrusModelPath) throws CoreException, IOException, BundleException {
+ ProjectUtils.removeAllProjectFromTheWorkspace();
+ IProject testProject = houseKeeper.createProject(projectName);
+ final IFile file = PapyrusProjectUtils.copyPapyrusModel(testProject, bundle, SOURCE_PATH, FILE_ROOT_NAME);
+ RunnableWithResult<?> runnableWithResult = new RunnableWithResult.Impl<Object>() {
+
+ @Override
+ public void run() {
+ try {
+ papyrusEditor = houseKeeper.openPapyrusEditor(file);
+ } catch (Exception ex) {
+ Activator.log.error(ex);
+ Assert.fail(ex.getMessage());
+ }
+
+ try {
+ TableCreationInSysMLModelTest.view = ModelExplorerUtils.openModelExplorerView();
+ } catch (PartInitException e) {
+ setStatus(new Status(IStatus.ERROR, bundle.getSymbolicName(), e.getMessage()));
+ }
+ EObject root = ModelExplorerUtils.getRootInModelExplorer(TableCreationInSysMLModelTest.view);
+ TableCreationInSysMLModelTest.rootModel = (Model) root;
+ class_ = (Class) TableCreationInSysMLModelTest.rootModel.getMember("Class1"); //$NON-NLS-1$
+ requirement1 = (Class) TableCreationInSysMLModelTest.rootModel.getMember("Requirement1"); //$NON-NLS-1$
+ requirement2 = (Class) TableCreationInSysMLModelTest.rootModel.getMember("Requirement2"); //$NON-NLS-1$
+ if (requirement1 != null) {
+ nestedRequirement1 = (Class) requirement1.getMember("NestedRequirement1"); //$NON-NLS-1$
+ nestedRequirement2 = (Class) requirement1.getMember("NestedRequirement2"); //$NON-NLS-1$
+ setStatus(Status.OK_STATUS);
+
+ } else {
+ setStatus(new Status(IStatus.ERROR, bundle.getSymbolicName(), "Requirement1 not found")); //$NON-NLS-1$
+
+ }
+
+ }
+
+ };
+ Display.getDefault().syncExec(runnableWithResult);
+
+ Assert.assertEquals(runnableWithResult.getStatus().getMessage(), IStatus.OK, runnableWithResult.getStatus().getSeverity());
+ Assert.assertNotNull(class_);
+ Assert.assertNotNull(requirement1);
+ Assert.assertNotNull(requirement2);
+ Assert.assertNotNull(TableCreationInSysMLModelTest.rootModel);
+ }
+
+ @Test
+ public void testCreationHandlerStatusOnRootModel() {
+ ModelExplorerUtils.testHandlerStatusInModelExplorer(TableCreationInSysMLModelTest.view, AllTests.COMMAND_ID, TableCreationInSysMLModelTest.rootModel, true);
+ }
+
+ @Test
+ public void testCreationHandlerStatusOnRequirement() {
+ ModelExplorerUtils.testHandlerStatusInModelExplorer(TableCreationInSysMLModelTest.view, AllTests.COMMAND_ID, requirement1, true);
+ }
+
+ @Test
+ public void testCreationHandlerStatusOnClass() {
+ ModelExplorerUtils.testHandlerStatusInModelExplorer(TableCreationInSysMLModelTest.view, AllTests.COMMAND_ID, class_, false);
+ }
+
+ @Test
+ public void testCreationAndDestructionOnRootModel() {
+ Object result = ModelExplorerUtils.executeCreateNestedEditorHandlerInModelExplorer(papyrusEditor, TableCreationInSysMLModelTest.view, AllTests.COMMAND_ID, TableCreationInSysMLModelTest.rootModel, BUNDLE_ID);
+ // to refresh the table content
+ DisplayUtils.flushEventLoop();
+ Assert.assertTrue(result instanceof NatTableEditor);
+ NatTableEditor editor = (NatTableEditor) result;
+ NattableModelManager manager = (NattableModelManager) editor.getAdapter(INattableModelManager.class);
+ Assert.assertNotNull(manager);
+ Table table = manager.getTable();
+ Assert.assertEquals(AllTests.REQUIREMENT_TABLE_ID, table.getTableConfiguration().getType());
+
+ IAxisManager rowAxisManager = manager.getRowAxisManager();
+ Collection<Object> managedAxis = rowAxisManager.getAllManagedAxis();
+ Assert.assertEquals(2, managedAxis.size());
+ Assert.assertTrue(managedAxis.contains(requirement1));
+ Assert.assertTrue(managedAxis.contains(requirement2));
+
+
+ Assert.assertEquals(managedAxis.size(), rowAxisManager.getTableManager().getRowElementsList().size());
+ Assert.assertTrue(rowAxisManager.getTableManager().getRowElementsList().contains(requirement1));
+ Assert.assertTrue(rowAxisManager.getTableManager().getRowElementsList().contains(requirement2));
+
+ final TransactionalEditingDomain domain = (TransactionalEditingDomain) papyrusEditor.getAdapter(TransactionalEditingDomain.class);
+ Assert.assertNotNull(domain);
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(TableCreationInSysMLModelTest.rootModel);
+ Assert.assertNotNull(provider);
+ CreateElementRequest request = new CreateElementRequest(domain, TableCreationInSysMLModelTest.rootModel, SysMLElementTypes.REQUIREMENT);
+ final ICommand creationCommand = provider.getEditCommand(request);
+ Assert.assertNotNull(creationCommand);
+ Assert.assertTrue(creationCommand.canExecute());
+
+ domain.getCommandStack().execute(new GMFtoEMFCommandWrapper(creationCommand));
+ NamedElement requirement = TableCreationInSysMLModelTest.rootModel.getMember("Requirement3"); //$NON-NLS-1$
+ Assert.assertNotNull(requirement);
+ requirement3 = (Class) requirement;
+ // to refresh the table content
+ DisplayUtils.flushEventLoop();
+ managedAxis = rowAxisManager.getAllManagedAxis();
+ Assert.assertEquals(3, managedAxis.size());
+ Assert.assertTrue(managedAxis.contains(requirement1));
+ Assert.assertTrue(managedAxis.contains(requirement2));
+ Assert.assertTrue(managedAxis.contains(requirement3));
+ Assert.assertEquals(managedAxis.size(), rowAxisManager.getTableManager().getRowElementsList().size());
+ Assert.assertTrue(rowAxisManager.getTableManager().getRowElementsList().contains(requirement1));
+ Assert.assertTrue(rowAxisManager.getTableManager().getRowElementsList().contains(requirement2));
+ Assert.assertTrue(rowAxisManager.getTableManager().getRowElementsList().contains(requirement3));
+
+ DestroyElementRequest destroyRequest = new DestroyElementRequest(domain, requirement3, false);
+ provider = ElementEditServiceUtils.getCommandProvider(requirement3);
+ final ICommand destroyCommand = provider.getEditCommand(destroyRequest);
+ Assert.assertNotNull(destroyCommand);
+ Assert.assertTrue(destroyCommand.canExecute());
+
+ domain.getCommandStack().execute(new GMFtoEMFCommandWrapper(destroyCommand));
+ requirement = TableCreationInSysMLModelTest.rootModel.getMember("Requirement3"); //$NON-NLS-1$
+ Assert.assertNull(requirement);
+ requirement3 = (Class) requirement;
+ // to refresh the table content
+ DisplayUtils.flushEventLoop();
+ managedAxis = rowAxisManager.getAllManagedAxis();
+ Assert.assertEquals(2, managedAxis.size());
+ Assert.assertTrue(managedAxis.contains(requirement1));
+ Assert.assertTrue(managedAxis.contains(requirement2));
+
+ Assert.assertEquals(managedAxis.size(), rowAxisManager.getTableManager().getRowElementsList().size());
+ Assert.assertTrue(rowAxisManager.getTableManager().getRowElementsList().contains(requirement1));
+ Assert.assertTrue(rowAxisManager.getTableManager().getRowElementsList().contains(requirement2));
+ }
+
+ @Test
+ public void testCreationAndDestructionOnRequirement() {
+ Object result = ModelExplorerUtils.executeCreateNestedEditorHandlerInModelExplorer(papyrusEditor, TableCreationInSysMLModelTest.view, AllTests.COMMAND_ID, TableCreationInSysMLModelTest.requirement1, BUNDLE_ID);
+ // to refresh the table content
+ DisplayUtils.flushEventLoop();
+ Assert.assertTrue(result instanceof NatTableEditor);
+ NatTableEditor editor = (NatTableEditor) result;
+ NattableModelManager manager = (NattableModelManager) editor.getAdapter(INattableModelManager.class);
+ Assert.assertNotNull(manager);
+ Table table = manager.getTable();
+ Assert.assertEquals(AllTests.REQUIREMENT_TABLE_ID, table.getTableConfiguration().getType());
+
+ IAxisManager rowAxisManager = manager.getRowAxisManager();
+ Collection<Object> managedAxis = rowAxisManager.getAllManagedAxis();
+ Assert.assertEquals(2, managedAxis.size());
+ Assert.assertTrue(managedAxis.contains(nestedRequirement1));
+ Assert.assertTrue(managedAxis.contains(nestedRequirement2));
+
+
+ Assert.assertEquals(managedAxis.size(), rowAxisManager.getTableManager().getRowElementsList().size());
+ Assert.assertTrue(rowAxisManager.getTableManager().getRowElementsList().contains(nestedRequirement1));
+ Assert.assertTrue(rowAxisManager.getTableManager().getRowElementsList().contains(nestedRequirement2));
+
+ final TransactionalEditingDomain domain = (TransactionalEditingDomain) papyrusEditor.getAdapter(TransactionalEditingDomain.class);
+ Assert.assertNotNull(domain);
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(TableCreationInSysMLModelTest.requirement1);
+ Assert.assertNotNull(provider);
+ CreateElementRequest request = new CreateElementRequest(domain, TableCreationInSysMLModelTest.requirement1, SysMLElementTypes.REQUIREMENT);
+ final ICommand creationCommand = provider.getEditCommand(request);
+ Assert.assertNotNull(creationCommand);
+ Assert.assertTrue(creationCommand.canExecute());
+
+ domain.getCommandStack().execute(new GMFtoEMFCommandWrapper(creationCommand));
+ final NamedElement createdElement = (NamedElement) request.getNewElement();
+ NamedElement requirement = TableCreationInSysMLModelTest.requirement1.getMember(createdElement.getName());
+ Assert.assertNotNull(requirement);
+ nestedRequirement3 = (Class) requirement;
+
+ // to refresh the table content
+ DisplayUtils.flushEventLoop();
+ managedAxis = rowAxisManager.getAllManagedAxis();
+ Assert.assertEquals(3, managedAxis.size());
+ Assert.assertTrue(managedAxis.contains(nestedRequirement1));
+ Assert.assertTrue(managedAxis.contains(nestedRequirement2));
+ Assert.assertTrue(managedAxis.contains(nestedRequirement3));
+ Assert.assertEquals(managedAxis.size(), rowAxisManager.getTableManager().getRowElementsList().size());
+ Assert.assertTrue(rowAxisManager.getTableManager().getRowElementsList().contains(nestedRequirement1));
+ Assert.assertTrue(rowAxisManager.getTableManager().getRowElementsList().contains(nestedRequirement2));
+ Assert.assertTrue(rowAxisManager.getTableManager().getRowElementsList().contains(nestedRequirement3));
+
+ DestroyElementRequest destroyRequest = new DestroyElementRequest(domain, nestedRequirement3, false);
+ provider = ElementEditServiceUtils.getCommandProvider(nestedRequirement3);
+ final ICommand destroyCommand = provider.getEditCommand(destroyRequest);
+ Assert.assertNotNull(destroyCommand);
+ Assert.assertTrue(destroyCommand.canExecute());
+
+ domain.getCommandStack().execute(new GMFtoEMFCommandWrapper(destroyCommand));
+ requirement = TableCreationInSysMLModelTest.requirement1.getMember(createdElement.getName());
+ Assert.assertNull(requirement);
+ nestedRequirement3 = (Class) requirement;
+
+ // to refresh the table content
+ DisplayUtils.flushEventLoop();
+
+ managedAxis = rowAxisManager.getAllManagedAxis();
+ Assert.assertEquals(2, managedAxis.size());
+ Assert.assertTrue(managedAxis.contains(nestedRequirement1));
+ Assert.assertTrue(managedAxis.contains(nestedRequirement2));
+
+ Assert.assertEquals(managedAxis.size(), rowAxisManager.getTableManager().getRowElementsList().size());
+ Assert.assertTrue(rowAxisManager.getTableManager().getRowElementsList().contains(nestedRequirement1));
+ Assert.assertTrue(rowAxisManager.getTableManager().getRowElementsList().contains(nestedRequirement2));
+ }
+
+ @AfterClass
+ public static void endOfTest() {
+ GenericUtils.closeAllEditors();
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/tests/TableCreationInUMLModel.java b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/tests/TableCreationInUMLModel.java
new file mode 100755
index 0000000..b6520c6
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/tests/TableCreationInUMLModel.java
@@ -0,0 +1,126 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2014 CEA LIST and others.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.tests;
+
+import java.io.IOException;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.RunnableWithResult;
+import org.eclipse.papyrus.infra.ui.editor.IMultiDiagramEditor;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.GenericUtils;
+import org.eclipse.papyrus.junit.utils.ModelExplorerUtils;
+import org.eclipse.papyrus.junit.utils.PapyrusProjectUtils;
+import org.eclipse.papyrus.junit.utils.ProjectUtils;
+import org.eclipse.papyrus.junit.utils.rules.HouseKeeper;
+import org.eclipse.papyrus.sysml.nattable.requirement.tests.Activator;
+import org.eclipse.papyrus.views.modelexplorer.ModelExplorerView;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.uml2.uml.Model;
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.ClassRule;
+import org.junit.Test;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleException;
+
+
+public class TableCreationInUMLModel extends AbstractPapyrusTest {
+
+ @ClassRule
+ public static final HouseKeeper.Static houseKeeper = new HouseKeeper.Static();
+
+ private static final String MODEL_PATH = "/resources/umlmodel"; //$NON-NLS-1$
+
+ private static final String SOURCE_PATH = "/resources/"; //$NON-NLS-1$
+
+ private static final String FILE_ROOT_NAME = "umlmodel"; //$NON-NLS-1$
+
+ private static final String PROJECT_NAME = "testCreationWithNoProfile"; //$NON-NLS-1$
+
+ private static IMultiDiagramEditor papyrusEditor;
+
+ private static final String BUNDLE_ID = Activator.getDefault().getBundle().getSymbolicName();
+
+ protected static Model rootModel;
+
+ protected static ModelExplorerView view;
+
+ @BeforeClass
+ public static void init() {
+ try {
+
+ initTests(Activator.getDefault().getBundle(), PROJECT_NAME, MODEL_PATH);
+
+ } catch (CoreException e) {
+ Activator.log.error(e);
+ } catch (IOException e) {
+ Activator.log.error(e);
+ } catch (BundleException e) {
+ Activator.log.error(e);
+ }
+ }
+
+ public static void initTests(final Bundle bundle, final String projectName, final String papyrusModelPath) throws CoreException, IOException, BundleException {
+ ProjectUtils.removeAllProjectFromTheWorkspace();
+ IProject testProject = houseKeeper.createProject(projectName);
+ final IFile file = PapyrusProjectUtils.copyPapyrusModel(testProject, bundle, SOURCE_PATH, FILE_ROOT_NAME);
+ RunnableWithResult<?> runnableWithResult = new RunnableWithResult.Impl<Object>() {
+
+ @Override
+ public void run() {
+ try {
+ papyrusEditor = houseKeeper.openPapyrusEditor(file);
+ } catch (Exception ex){
+ Activator.log.error(ex);
+ Assert.fail(ex.getMessage());
+ }
+
+ try {
+ TableCreationInSysMLModelTest.view = ModelExplorerUtils.openModelExplorerView();
+ } catch (PartInitException e) {
+ setStatus(new Status(IStatus.ERROR, bundle.getSymbolicName(), e.getMessage()));
+ }
+ EObject root = ModelExplorerUtils.getRootInModelExplorer(TableCreationInSysMLModelTest.view);
+ TableCreationInSysMLModelTest.rootModel = (Model)root;
+ // we look for the testedCommand
+ setStatus(Status.OK_STATUS);
+ }
+
+ };
+ Display.getDefault().syncExec(runnableWithResult);
+ Assert.assertEquals(runnableWithResult.getStatus().getMessage(), IStatus.OK, runnableWithResult.getStatus().getSeverity());
+ Assert.assertNotNull(TableCreationInSysMLModelTest.rootModel);
+
+ }
+
+
+ @Test
+ public void testCreationHandlerStatusOnRootModel() {
+ ModelExplorerUtils.testHandlerStatusInModelExplorer(TableCreationInSysMLModelTest.view, AllTests.COMMAND_ID, TableCreationInSysMLModelTest.rootModel, false);
+ }
+
+ @AfterClass
+ public static void endOfTest() {
+ GenericUtils.closeAllEditors();
+ }
+}
diff --git a/tests/org.eclipse.papyrus.sysml.service.types.tests/.classpath b/tests/org.eclipse.papyrus.sysml.service.types.tests/.classpath
new file mode 100755
index 0000000..64c5e31
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.service.types.tests/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/tests/org.eclipse.papyrus.sysml.service.types.tests/.project b/tests/org.eclipse.papyrus.sysml.service.types.tests/.project
new file mode 100755
index 0000000..b670ede
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.service.types.tests/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.sysml.service.types.tests</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/tests/org.eclipse.papyrus.sysml.service.types.tests/.settings/org.eclipse.jdt.core.prefs b/tests/org.eclipse.papyrus.sysml.service.types.tests/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 0000000..c585cc4
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.service.types.tests/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,291 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/tests/org.eclipse.papyrus.sysml.service.types.tests/.settings/org.eclipse.jdt.ui.prefs b/tests/org.eclipse.papyrus.sysml.service.types.tests/.settings/org.eclipse.jdt.ui.prefs
new file mode 100755
index 0000000..954281d
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.service.types.tests/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,68 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+formatter_profile=_Papyrus
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/tests/org.eclipse.papyrus.sysml.service.types.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.papyrus.sysml.service.types.tests/META-INF/MANIFEST.MF
new file mode 100755
index 0000000..5a7d787
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.service.types.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,16 @@
+Manifest-Version: 1.0
+Require-Bundle: org.junit;bundle-version="4.10.0",
+ org.eclipse.papyrus.infra.types.core;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.junit.framework;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.papyrus.sysml.service.types;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.sysml;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.papyrus.sysml.architecture;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.papyrus.sysml.edit;bundle-version="1.2.0"
+Export-Package: org.eclipse.papyrus.sysml.service.types.tests.suites
+Bundle-Vendor: %providerName
+Bundle-Version: 1.2.0.qualifier
+Bundle-Name: %pluginName
+Bundle-Localization: plugin
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.papyrus.sysml.service.types.tests;singleton:=true
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/tests/org.eclipse.papyrus.sysml.service.types.tests/about.html b/tests/org.eclipse.papyrus.sysml.service.types.tests/about.html
new file mode 100755
index 0000000..d35d5ae
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.service.types.tests/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/tests/org.eclipse.papyrus.sysml.service.types.tests/build.properties b/tests/org.eclipse.papyrus.sysml.service.types.tests/build.properties
new file mode 100755
index 0000000..cdd2db7
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.service.types.tests/build.properties
@@ -0,0 +1,7 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ about.html,\
+ plugin.properties
+src.includes = about.html
diff --git a/tests/org.eclipse.papyrus.sysml.service.types.tests/plugin.properties b/tests/org.eclipse.papyrus.sysml.service.types.tests/plugin.properties
new file mode 100755
index 0000000..610410b
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.service.types.tests/plugin.properties
@@ -0,0 +1,14 @@
+#################################################################################
+# Copyright (c) 2011 CEA LIST.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#
+# CEA LIST - Initial API and Implementation.
+#
+##################################################################################
+pluginName=Papyrus SysML Service Types Tests
+providerName=Eclipse Modeling Project
diff --git a/tests/org.eclipse.papyrus.sysml.service.types.tests/pom.xml b/tests/org.eclipse.papyrus.sysml.service.types.tests/pom.xml
new file mode 100755
index 0000000..3420b29
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.service.types.tests/pom.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.papyrus.sysml</groupId>
+ <artifactId>org.eclipse.papyrus.sysml.test</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.papyrus.sysml.service.types.tests</artifactId>
+ <packaging>eclipse-test-plugin</packaging>
+</project>
diff --git a/tests/org.eclipse.papyrus.sysml.service.types.tests/src/org/eclipse/papyrus/sysml/service/types/tests/registry/TestElementTypeRegistryContent.java b/tests/org.eclipse.papyrus.sysml.service.types.tests/src/org/eclipse/papyrus/sysml/service/types/tests/registry/TestElementTypeRegistryContent.java
new file mode 100755
index 0000000..720c8c1
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.service.types.tests/src/org/eclipse/papyrus/sysml/service/types/tests/registry/TestElementTypeRegistryContent.java
@@ -0,0 +1,349 @@
+package org.eclipse.papyrus.sysml.service.types.tests.registry;
+
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.util.Iterator;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.emf.type.core.IClientContext;
+import org.eclipse.gmf.runtime.emf.type.core.ISpecializationType;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.services.edit.context.TypeContext;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditServiceProvider;
+import org.eclipse.papyrus.infra.types.core.registries.ElementTypeSetConfigurationRegistry;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.sysml.activities.ActivitiesPackage;
+import org.eclipse.papyrus.sysml.allocations.AllocationsPackage;
+import org.eclipse.papyrus.sysml.architecture.SysMLArchitectureContextIds;
+import org.eclipse.papyrus.sysml.blocks.BlocksPackage;
+import org.eclipse.papyrus.sysml.constraints.ConstraintsPackage;
+import org.eclipse.papyrus.sysml.modelelements.ModelelementsPackage;
+import org.eclipse.papyrus.sysml.portandflows.PortandflowsPackage;
+import org.eclipse.papyrus.sysml.requirements.RequirementsPackage;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ *
+ */
+public class TestElementTypeRegistryContent extends AbstractPapyrusTest {
+ private static IClientContext context;
+
+ private static final String PAPYRUS_ELEMENT_TYPE_PREFIX = "org.eclipse.papyrus.sysml."; //$NON-NLS-1$
+
+ private static final String PAPYRUS_ST_APPLICATION_TYPE_PREFIX = "org.eclipse.papyrus.sysml.stereotype."; //$NON-NLS-1$
+
+ @BeforeClass
+ public static void before() {
+ Assert.assertNotNull("registry should not be null after init", ElementTypeSetConfigurationRegistry.getInstance());
+ Assert.assertNotNull("element type should not be null", SysMLElementTypes.BLOCK);
+
+ try {
+ context = TypeContext.getContext(SysMLArchitectureContextIds.SysML);
+ } catch (ServiceException e) {
+ fail("Default client context could not be found.");
+ }
+ }
+
+
+ @Test
+ public void testRegistryContentForSysMLModelElements() {
+
+ // Iterate over SysML ModelElements sub-profile contents
+ Iterator<EObject> it = ModelelementsPackage.eINSTANCE.eAllContents();
+ while (it.hasNext()) {
+ EObject eObject = it.next();
+ if (eObject instanceof EClass) {
+
+ EClass eClass = (EClass) eObject;
+ assertTrue("No type found in Papyrus context for " + eClass.getName(), ElementEditServiceUtils.getEditServiceProvider(context).isKnownElementType(PAPYRUS_ELEMENT_TYPE_PREFIX + eClass.getName()));
+ }
+ }
+ }
+
+ @Test
+ public void testRegistryContentForStereotypeApplicationsInModelElements() {
+
+ // Iterate over SysML ModelElements sub-profile contents
+ Iterator<EObject> it = ModelelementsPackage.eINSTANCE.eAllContents();
+ while (it.hasNext()) {
+ EObject eObject = it.next();
+ if (eObject instanceof EClass) {
+
+ EClass eClass = (EClass) eObject;
+ assertTrue("No type found in Papyrus context for " + eClass.getName(), ElementEditServiceUtils.getEditServiceProvider(context).isKnownElementType(PAPYRUS_ST_APPLICATION_TYPE_PREFIX + eClass.getName()));
+ }
+ }
+ }
+
+ @Test
+ public void testRegistryContentForSysMLBlocks() {
+
+ // Iterate over SysML Blocks sub-profile contents
+ Iterator<EObject> it = BlocksPackage.eINSTANCE.eAllContents();
+ while (it.hasNext()) {
+ EObject eObject = it.next();
+ if (eObject instanceof EClass) {
+ EClass eClass = (EClass) eObject;
+
+ if ("DistributedProperty".equals(eClass.getName())) {
+ // Not implemented
+ continue;
+ }
+
+ if ("NestedConnectorEnd".equals(eClass.getName())) {
+ // Not implemented
+ continue;
+ }
+
+ if ("ParticipantProperty".equals(eClass.getName())) {
+ // Not implemented
+ continue;
+ }
+
+ if ("ConnectorProperty".equals(eClass.getName())) {
+ // Not implemented
+ continue;
+ }
+
+ if ("BindingConnector".equals(eClass.getName())) {
+ // Not implemented
+ continue;
+ }
+
+ if ("PropertySpecificType".equals(eClass.getName())) {
+ // Not implemented
+ continue;
+ }
+
+ assertTrue("No type found in Papyrus context for " + eClass.getName(), ElementEditServiceUtils.getEditServiceProvider(context).isKnownElementType(PAPYRUS_ELEMENT_TYPE_PREFIX + eClass.getName()));
+ }
+ }
+ }
+
+ @Test
+ public void testRegistryContentForStereotypeApplicationsInBlocks() {
+
+ // Iterate over SysML Blocks sub-profile contents
+ Iterator<EObject> it = BlocksPackage.eINSTANCE.eAllContents();
+ while (it.hasNext()) {
+ EObject eObject = it.next();
+ if (eObject instanceof EClass) {
+ EClass eClass = (EClass) eObject;
+
+ assertTrue("No type found in Papyrus context for " + eClass.getName(), ElementEditServiceUtils.getEditServiceProvider(context).isKnownElementType(PAPYRUS_ST_APPLICATION_TYPE_PREFIX + eClass.getName()));
+ }
+ }
+ }
+
+ @Test
+ public void testRegistryContentForSysMLConstraints() {
+
+ // Iterate over SysML Constraints sub-profile contents
+ Iterator<EObject> it = ConstraintsPackage.eINSTANCE.eAllContents();
+ while (it.hasNext()) {
+ EObject eObject = it.next();
+ if (eObject instanceof EClass) {
+
+ EClass eClass = (EClass) eObject;
+ assertTrue("No type found in Papyrus context for " + eClass.getName(), ElementEditServiceUtils.getEditServiceProvider(context).isKnownElementType(PAPYRUS_ELEMENT_TYPE_PREFIX + eClass.getName()));
+ }
+ }
+ }
+
+ @Test
+ public void testRegistryContentForStereotypeApplicationsInConstraints() {
+
+ // Iterate over SysML Constraints sub-profile contents
+ Iterator<EObject> it = ConstraintsPackage.eINSTANCE.eAllContents();
+ while (it.hasNext()) {
+ EObject eObject = it.next();
+ if (eObject instanceof EClass) {
+
+ EClass eClass = (EClass) eObject;
+ assertTrue("No type found in Papyrus context for " + eClass.getName(), ElementEditServiceUtils.getEditServiceProvider(context).isKnownElementType(PAPYRUS_ST_APPLICATION_TYPE_PREFIX + eClass.getName()));
+ }
+ }
+ }
+
+ @Test
+ public void testRegistryContentForStereotypeApplicationsInActivities() {
+
+ // Iterate over SysML Activities sub-profile contents
+ Iterator<EObject> it = ActivitiesPackage.eINSTANCE.eAllContents();
+ while (it.hasNext()) {
+ EObject eObject = it.next();
+ if (eObject instanceof EClass) {
+
+ EClass eClass = (EClass) eObject;
+ assertTrue("No type found in Papyrus context for " + eClass.getName(), ElementEditServiceUtils.getEditServiceProvider(context).isKnownElementType(PAPYRUS_ST_APPLICATION_TYPE_PREFIX + eClass.getName()));
+ }
+ }
+ }
+
+ @Test
+ public void testRegistryContentForSysMLRequirements() {
+
+ // Iterate over SysML Requirements sub-profile contents
+ Iterator<EObject> it = RequirementsPackage.eINSTANCE.eAllContents();
+ while (it.hasNext()) {
+ EObject eObject = it.next();
+ if (eObject instanceof EClass) {
+ EClass eClass = (EClass) eObject;
+
+ if ("TestCase".equals(eClass.getName())) {
+ // Not implemented
+ continue;
+ }
+
+ if ("RequirementRelated".equals(eClass.getName())) {
+ // Not implemented
+ continue;
+ }
+
+ assertTrue("No type found in Papyrus context for " + eClass.getName(), ElementEditServiceUtils.getEditServiceProvider(context).isKnownElementType(PAPYRUS_ELEMENT_TYPE_PREFIX + eClass.getName()));
+ }
+ }
+ }
+
+ @Test
+ public void testRegistryContentForStereotypeApplicationsInRequirements() {
+
+ // Iterate over SysML Requirements sub-profile contents
+ Iterator<EObject> it = RequirementsPackage.eINSTANCE.eAllContents();
+ while (it.hasNext()) {
+ EObject eObject = it.next();
+ if (eObject instanceof EClass) {
+ EClass eClass = (EClass) eObject;
+
+ assertTrue("No type found in Papyrus context for " + eClass.getName(), ElementEditServiceUtils.getEditServiceProvider(context).isKnownElementType(PAPYRUS_ST_APPLICATION_TYPE_PREFIX + eClass.getName()));
+ }
+ }
+ }
+
+ @Test
+ public void testRegistryContentForSysMLAllocations() {
+
+ // Iterate over SysML Allocations sub-profile contents
+ Iterator<EObject> it = AllocationsPackage.eINSTANCE.eAllContents();
+ while (it.hasNext()) {
+ EObject eObject = it.next();
+ if (eObject instanceof EClass) {
+ EClass eClass = (EClass) eObject;
+
+ if ("Allocated".equals(eClass.getName())) {
+ // Not implemented
+ continue;
+ }
+
+ if ("AllocateActivityPartition".equals(eClass.getName())) {
+ // Not implemented
+ continue;
+ }
+
+ assertTrue("No type found in Papyrus context for " + eClass.getName(), ElementEditServiceUtils.getEditServiceProvider(context).isKnownElementType(PAPYRUS_ELEMENT_TYPE_PREFIX + eClass.getName()));
+ }
+ }
+ }
+
+ @Test
+ public void testRegistryContentForStereotypeApplicationsInAllocations() {
+
+ // Iterate over SysML Allocations sub-profile contents
+ Iterator<EObject> it = AllocationsPackage.eINSTANCE.eAllContents();
+ while (it.hasNext()) {
+ EObject eObject = it.next();
+ if (eObject instanceof EClass) {
+ EClass eClass = (EClass) eObject;
+
+ assertTrue("No type found in Papyrus context for " + eClass.getName(), ElementEditServiceUtils.getEditServiceProvider(context).isKnownElementType(PAPYRUS_ST_APPLICATION_TYPE_PREFIX + eClass.getName()));
+ }
+ }
+ }
+
+ @Test
+ public void testRegistryContentForSysMLPortAndFlows() {
+
+ // Iterate over SysML PortAndFlows sub-profile contents
+ Iterator<EObject> it = PortandflowsPackage.eINSTANCE.eAllContents();
+ while (it.hasNext()) {
+ EObject eObject = it.next();
+ if (eObject instanceof EClass) {
+
+ EClass eClass = (EClass) eObject;
+ assertTrue("No type found in Papyrus context for " + eClass.getName(), ElementEditServiceUtils.getEditServiceProvider(context).isKnownElementType(PAPYRUS_ELEMENT_TYPE_PREFIX + eClass.getName()));
+ }
+ }
+ }
+
+ @Test
+ public void testRegistryContentForStereotypeApplicationsInPortAndFlows() {
+
+ // Iterate over SysML PortAndFlows sub-profile contents
+ Iterator<EObject> it = PortandflowsPackage.eINSTANCE.eAllContents();
+ while (it.hasNext()) {
+ EObject eObject = it.next();
+ if (eObject instanceof EClass) {
+
+ EClass eClass = (EClass) eObject;
+ assertTrue("No type found in Papyrus context for " + eClass.getName(), ElementEditServiceUtils.getEditServiceProvider(context).isKnownElementType(PAPYRUS_ST_APPLICATION_TYPE_PREFIX + eClass.getName()));
+ }
+ }
+ }
+
+ @Test
+ public void testRegistryContentForSysMLAssociations() {
+
+ IElementEditServiceProvider service = ElementEditServiceUtils.getEditServiceProvider(context);
+
+ assertTrue("No ISpecializationType found for SysML Association in Papyrus context", service.isKnownElementType("org.eclipse.papyrus.sysml.Association"));
+
+ assertTrue("Incorrect constant initialization for SysML Association", SysMLElementTypes.ASSOCIATION != null);
+ assertTrue("Incorrect constant initialization for SysML AssociationComposite", SysMLElementTypes.ASSOCIATION_COMPOSITE != null);
+ assertTrue("Incorrect constant initialization for SysML AssociationCompositeDirected", SysMLElementTypes.ASSOCIATION_COMPOSITE_DIRECTED != null);
+ assertTrue("Incorrect constant initialization for SysML AssociationNone", SysMLElementTypes.ASSOCIATION_NONE != null);
+ assertTrue("Incorrect constant initialization for SysML AssociationNoneDirected", SysMLElementTypes.ASSOCIATION_NONE_DIRECTED != null);
+ assertTrue("Incorrect constant initialization for SysML AssociationShared", SysMLElementTypes.ASSOCIATION_SHARED != null);
+ assertTrue("Incorrect constant initialization for SysML AssociationSharedDirected", SysMLElementTypes.ASSOCIATION_SHARED_DIRECTED != null);
+
+ assertTrue("No ISpecializationType found for SysML Association in Papyrus context", service.isKnownElementType(SysMLElementTypes.ASSOCIATION.getId()));
+ assertTrue("No ISpecializationType found for SysML AssociationComposite in Papyrus context", service.isKnownElementType(SysMLElementTypes.ASSOCIATION_COMPOSITE.getId()));
+ assertTrue("No ISpecializationType found for SysML AssociationCompositeDirected in Papyrus context", service.isKnownElementType(SysMLElementTypes.ASSOCIATION_COMPOSITE_DIRECTED.getId()));
+ assertTrue("No ISpecializationType found for SysML AssociationNone in Papyrus context", service.isKnownElementType(SysMLElementTypes.ASSOCIATION_NONE.getId()));
+ assertTrue("No ISpecializationType found for SysML AssociationNoneDirected in Papyrus context", service.isKnownElementType(SysMLElementTypes.ASSOCIATION_NONE_DIRECTED.getId()));
+ assertTrue("No ISpecializationType found for SysML AssociationShared in Papyrus context", service.isKnownElementType(SysMLElementTypes.ASSOCIATION_SHARED.getId()));
+ assertTrue("No ISpecializationType found for SysML AssociationSharedDirected in Papyrus context", service.isKnownElementType(SysMLElementTypes.ASSOCIATION_SHARED_DIRECTED.getId()));
+
+ assertTrue("Incorrect kind of ElementType (ISpecializationType expected for " + SysMLElementTypes.ASSOCIATION.getId() + ")", SysMLElementTypes.ASSOCIATION instanceof ISpecializationType);
+ assertTrue("Incorrect kind of ElementType (ISpecializationType expected for " + SysMLElementTypes.ASSOCIATION_COMPOSITE.getId() + ")", SysMLElementTypes.ASSOCIATION_COMPOSITE instanceof ISpecializationType);
+ assertTrue("Incorrect kind of ElementType (ISpecializationType expected for " + SysMLElementTypes.ASSOCIATION_COMPOSITE_DIRECTED.getId() + ")", SysMLElementTypes.ASSOCIATION_COMPOSITE_DIRECTED instanceof ISpecializationType);
+ assertTrue("Incorrect kind of ElementType (ISpecializationType expected for " + SysMLElementTypes.ASSOCIATION_NONE.getId() + ")", SysMLElementTypes.ASSOCIATION_NONE instanceof ISpecializationType);
+ assertTrue("Incorrect kind of ElementType (ISpecializationType expected for " + SysMLElementTypes.ASSOCIATION_NONE_DIRECTED.getId() + ")", SysMLElementTypes.ASSOCIATION_NONE_DIRECTED instanceof ISpecializationType);
+ assertTrue("Incorrect kind of ElementType (ISpecializationType expected for " + SysMLElementTypes.ASSOCIATION_SHARED.getId() + ")", SysMLElementTypes.ASSOCIATION_SHARED instanceof ISpecializationType);
+ assertTrue("Incorrect kind of ElementType (ISpecializationType expected for " + SysMLElementTypes.ASSOCIATION_SHARED_DIRECTED.getId() + ")", SysMLElementTypes.ASSOCIATION_SHARED_DIRECTED instanceof ISpecializationType);
+
+ ISpecializationType association = (ISpecializationType) SysMLElementTypes.ASSOCIATION;
+ ISpecializationType associationComposite = (ISpecializationType) SysMLElementTypes.ASSOCIATION_COMPOSITE;
+ ISpecializationType associationCompositeDirected = (ISpecializationType) SysMLElementTypes.ASSOCIATION_COMPOSITE_DIRECTED;
+ ISpecializationType associationNone = (ISpecializationType) SysMLElementTypes.ASSOCIATION_NONE;
+ ISpecializationType associationNoneDirected = (ISpecializationType) SysMLElementTypes.ASSOCIATION_NONE_DIRECTED;
+ ISpecializationType associationShared = (ISpecializationType) SysMLElementTypes.ASSOCIATION_SHARED;
+ ISpecializationType associationSharedDirected = (ISpecializationType) SysMLElementTypes.ASSOCIATION_SHARED_DIRECTED;
+
+ assertTrue("Incorrect specialization type hierarchy for " + SysMLElementTypes.ASSOCIATION.getId(), association.isSpecializationOf(UMLElementTypes.ASSOCIATION_BASE));
+ assertTrue("Incorrect specialization type hierarchy for " + SysMLElementTypes.ASSOCIATION_COMPOSITE.getId(), associationComposite.isSpecializationOf(association));
+ assertTrue("Incorrect specialization type hierarchy for " + SysMLElementTypes.ASSOCIATION_COMPOSITE_DIRECTED.getId(), associationCompositeDirected.isSpecializationOf(association));
+ assertTrue("Incorrect specialization type hierarchy for " + SysMLElementTypes.ASSOCIATION_NONE.getId(), associationNone.isSpecializationOf(association));
+ assertTrue("Incorrect specialization type hierarchy for " + SysMLElementTypes.ASSOCIATION_NONE_DIRECTED.getId(), associationNoneDirected.isSpecializationOf(association));
+ assertTrue("Incorrect specialization type hierarchy for " + SysMLElementTypes.ASSOCIATION_SHARED.getId(), associationShared.isSpecializationOf(association));
+ assertTrue("Incorrect specialization type hierarchy for " + SysMLElementTypes.ASSOCIATION_SHARED_DIRECTED.getId(), associationSharedDirected.isSpecializationOf(association));
+
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.service.types.tests/src/org/eclipse/papyrus/sysml/service/types/tests/suites/AllTests.java b/tests/org.eclipse.papyrus.sysml.service.types.tests/src/org/eclipse/papyrus/sysml/service/types/tests/suites/AllTests.java
new file mode 100755
index 0000000..b0c472b
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.service.types.tests/src/org/eclipse/papyrus/sysml/service/types/tests/suites/AllTests.java
@@ -0,0 +1,15 @@
+package org.eclipse.papyrus.sysml.service.types.tests.suites;
+
+import org.eclipse.papyrus.sysml.service.types.tests.registry.TestElementTypeRegistryContent;
+import org.junit.runner.RunWith;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.junit.runners.Suite.SuiteClasses;
+
+/**
+ * Main Test suite.
+ */
+@RunWith(ClassificationSuite.class)
+@SuiteClasses({ TestElementTypeRegistryContent.class })
+public class AllTests {
+
+}
diff --git a/tests/org.eclipse.papyrus.sysml.tests/.classpath b/tests/org.eclipse.papyrus.sysml.tests/.classpath
new file mode 100755
index 0000000..304e861
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/tests/org.eclipse.papyrus.sysml.tests/.project b/tests/org.eclipse.papyrus.sysml.tests/.project
new file mode 100755
index 0000000..b410d9f
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.sysml.tests</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
diff --git a/tests/org.eclipse.papyrus.sysml.tests/.settings/org.eclipse.jdt.core.prefs b/tests/org.eclipse.papyrus.sysml.tests/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 0000000..c585cc4
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,291 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/tests/org.eclipse.papyrus.sysml.tests/.settings/org.eclipse.jdt.ui.prefs b/tests/org.eclipse.papyrus.sysml.tests/.settings/org.eclipse.jdt.ui.prefs
new file mode 100755
index 0000000..954281d
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,68 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+formatter_profile=_Papyrus
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/tests/org.eclipse.papyrus.sysml.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.papyrus.sysml.tests/META-INF/MANIFEST.MF
new file mode 100755
index 0000000..1f76bb1
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,26 @@
+Manifest-Version: 1.0
+Export-Package: org.eclipse.papyrus.sysml.allocations.tests,
+ org.eclipse.papyrus.sysml.modelelements.tests,
+ org.eclipse.papyrus.sysml.portandflows.tests,
+ org.eclipse.papyrus.sysml.requirements.tests,
+ org.eclipse.papyrus.sysml.tests,
+ org.eclipse.papyrus.sysml.utils
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.papyrus.sysml;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.emf.ecore,
+ org.eclipse.uml2.uml,
+ org.eclipse.emf.ecore.xmi,
+ org.eclipse.papyrus.uml.tools.utils;bundle-version="[3.0.0,4.0.0)",
+ org.junit;bundle-version="4.10.0",
+ org.eclipse.papyrus.junit.framework;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.papyrus.junit.utils;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.uml2.uml.resources
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-ClassPath: .
+Bundle-Version: 1.2.0.qualifier
+Bundle-Name: %pluginName
+Bundle-Localization: plugin
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.papyrus.sysml.tests;singleton:=true
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/tests/org.eclipse.papyrus.sysml.tests/about.html b/tests/org.eclipse.papyrus.sysml.tests/about.html
new file mode 100755
index 0000000..d35d5ae
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/tests/org.eclipse.papyrus.sysml.tests/build.properties b/tests/org.eclipse.papyrus.sysml.tests/build.properties
new file mode 100755
index 0000000..4ee0058
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/build.properties
@@ -0,0 +1,14 @@
+
+# <copyright>
+# </copyright>
+#
+# $Id$
+
+bin.includes = .,\
+ META-INF/,\
+ plugin.properties,\
+ about.html,\
+ samples/
+jars.compile.order = .
+source.. = src/
+output.. = bin/
diff --git a/tests/org.eclipse.papyrus.sysml.tests/plugin.properties b/tests/org.eclipse.papyrus.sysml.tests/plugin.properties
new file mode 100755
index 0000000..f71c613
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/plugin.properties
@@ -0,0 +1,12 @@
+#################################################################################
+# Copyright (c) 2008 CEA LIST.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - initial API and implementation
+##################################################################################
+pluginName=Tests for static version of the SysML profile
+providerName=Eclipse Modeling Project
diff --git a/tests/org.eclipse.papyrus.sysml.tests/pom.xml b/tests/org.eclipse.papyrus.sysml.tests/pom.xml
new file mode 100755
index 0000000..dde4b03
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/pom.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.papyrus.sysml</groupId>
+ <artifactId>org.eclipse.papyrus.sysml.test</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.papyrus.sysml.tests</artifactId>
+ <packaging>eclipse-test-plugin</packaging>
+</project>
diff --git a/tests/org.eclipse.papyrus.sysml.tests/samples/SysML_Allocate_TEST.uml b/tests/org.eclipse.papyrus.sysml.tests/samples/SysML_Allocate_TEST.uml
new file mode 100755
index 0000000..7a5918a
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/samples/SysML_Allocate_TEST.uml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Allocations="http://www.papyrusuml.org/SysML/Allocations/1" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/2.1.0/UML" xsi:schemaLocation="http://www.papyrusuml.org/SysML/Allocations/1 http://www.papyrusuml.org/SysML/1#//allocations">
+ <uml:Model xmi:id="_wJfGRw_xEd2mbaTvSwUWQw" name="SysML_Allocate_TEST">
+ <packageImport xmi:id="_wJfGSA_xEd2mbaTvSwUWQw">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Class" xmi:id="_zIq0AA_xEd2mbaTvSwUWQw" name="Class_0"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_zhGiIA_xEd2mbaTvSwUWQw" name="Class_1" clientDependency="_6vCvgA_xEd2mbaTvSwUWQw _CwrqsA_yEd2mbaTvSwUWQw"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_zx8agA_xEd2mbaTvSwUWQw" name="Class_2"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_0BSeEA_xEd2mbaTvSwUWQw" name="Class_3"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_0V2Y0A_xEd2mbaTvSwUWQw" name="Class_4" clientDependency="_DUvaAA_yEd2mbaTvSwUWQw"/>
+ <packagedElement xmi:type="uml:Abstraction" xmi:id="_6vCvgA_xEd2mbaTvSwUWQw" name="FromClass_1toClass_2" supplier="_zx8agA_xEd2mbaTvSwUWQw" client="_zhGiIA_xEd2mbaTvSwUWQw"/>
+ <packagedElement xmi:type="uml:Abstraction" xmi:id="_CwrqsA_yEd2mbaTvSwUWQw" name="FromClass_1toClass_3" supplier="_0BSeEA_xEd2mbaTvSwUWQw" client="_zhGiIA_xEd2mbaTvSwUWQw"/>
+ <packagedElement xmi:type="uml:Abstraction" xmi:id="_DUvaAA_yEd2mbaTvSwUWQw" name="FromClass_4toClass_3" supplier="_0BSeEA_xEd2mbaTvSwUWQw" client="_0V2Y0A_xEd2mbaTvSwUWQw"/>
+ <profileApplication xmi:id="_wJfGSQ_xEd2mbaTvSwUWQw">
+ <eAnnotations xmi:id="_wJfGSg_xEd2mbaTvSwUWQw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/uml2/schemas/Standard/1#/"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://UML_PROFILES/Standard.profile.uml#_0"/>
+ </profileApplication>
+ <profileApplication xmi:id="_yC7T8A_xEd2mbaTvSwUWQw">
+ <eAnnotations xmi:id="_yDFE8A_xEd2mbaTvSwUWQw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.papyrusuml.org/SysML/1#//allocations"/>
+ </eAnnotations>
+ <appliedProfile href="../../../plugin/com.cea.papyrus.uml4sysml.extension/model/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Allocations:Allocated xmi:id="_8y6rwA_xEd2mbaTvSwUWQw" base_NamedElement="_zhGiIA_xEd2mbaTvSwUWQw"/>
+ <Allocations:Allocate xmi:id="_-XgD8A_xEd2mbaTvSwUWQw" base_Abstraction="_6vCvgA_xEd2mbaTvSwUWQw"/>
+ <Allocations:Allocated xmi:id="_Bw6PwA_yEd2mbaTvSwUWQw" base_NamedElement="_zIq0AA_xEd2mbaTvSwUWQw"/>
+ <Allocations:Allocated xmi:id="_Bw6PwQ_yEd2mbaTvSwUWQw" base_NamedElement="_0V2Y0A_xEd2mbaTvSwUWQw"/>
+ <Allocations:Allocated xmi:id="_Bw6Pwg_yEd2mbaTvSwUWQw" base_NamedElement="_0BSeEA_xEd2mbaTvSwUWQw"/>
+ <Allocations:Allocated xmi:id="_Bw6Pww_yEd2mbaTvSwUWQw" base_NamedElement="_zx8agA_xEd2mbaTvSwUWQw"/>
+ <Allocations:Allocate xmi:id="_E85qoA_yEd2mbaTvSwUWQw" base_Abstraction="_CwrqsA_yEd2mbaTvSwUWQw"/>
+ <Allocations:Allocate xmi:id="_E85qoQ_yEd2mbaTvSwUWQw" base_Abstraction="_DUvaAA_yEd2mbaTvSwUWQw"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.tests/samples/SysML_Copy_TEST.uml b/tests/org.eclipse.papyrus.sysml.tests/samples/SysML_Copy_TEST.uml
new file mode 100755
index 0000000..44ba71d
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/samples/SysML_Copy_TEST.uml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:Requirements="http://www.papyrusuml.org/SysML/Requirements/1" xmlns:uml="http://www.eclipse.org/uml2/2.1.0/UML">
+ <uml:Model xmi:id="_FjBFMQ_xEd2mbaTvSwUWQw" name="SysML_Copy_TEST">
+ <packageImport xmi:id="_FjBFMg_xEd2mbaTvSwUWQw">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Class" xmi:id="_H7ms4A_xEd2mbaTvSwUWQw" name="Class_0" clientDependency="_JHml8A_xEd2mbaTvSwUWQw"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_IRqccA_xEd2mbaTvSwUWQw" name="Class_1"/>
+ <packagedElement xmi:type="uml:Abstraction" xmi:id="_JHml8A_xEd2mbaTvSwUWQw" name="FromClass_0toClass_1" supplier="_IRqccA_xEd2mbaTvSwUWQw" client="_H7ms4A_xEd2mbaTvSwUWQw"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_J4U4QA_xEd2mbaTvSwUWQw" name="Class_2"/>
+ <profileApplication xmi:id="_FjBFMw_xEd2mbaTvSwUWQw">
+ <eAnnotations xmi:id="_FjBFNA_xEd2mbaTvSwUWQw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/uml2/schemas/Standard/1#/"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://UML_PROFILES/Standard.profile.uml#_0"/>
+ </profileApplication>
+ <profileApplication xmi:id="_He2fcA_xEd2mbaTvSwUWQw">
+ <eAnnotations xmi:id="_He_pYA_xEd2mbaTvSwUWQw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.papyrusuml.org/SysML/1#//requirements"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Requirements:Requirement xmi:id="_LZoS8A_xEd2mbaTvSwUWQw" base_Class="_J4U4QA_xEd2mbaTvSwUWQw"/>
+ <Requirements:Requirement xmi:id="_LZoS8Q_xEd2mbaTvSwUWQw" base_Class="_IRqccA_xEd2mbaTvSwUWQw"/>
+ <Requirements:Requirement xmi:id="_LZoS8g_xEd2mbaTvSwUWQw" base_Class="_H7ms4A_xEd2mbaTvSwUWQw"/>
+ <Requirements:Copy xmi:id="_Mpf_YA_xEd2mbaTvSwUWQw" base_Abstraction="_JHml8A_xEd2mbaTvSwUWQw"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.tests/samples/SysML_DeriveReqt_TEST.uml b/tests/org.eclipse.papyrus.sysml.tests/samples/SysML_DeriveReqt_TEST.uml
new file mode 100755
index 0000000..4b86016
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/samples/SysML_DeriveReqt_TEST.uml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:Requirements="http://www.papyrusuml.org/SysML/Requirements/1" xmlns:uml="http://www.eclipse.org/uml2/2.1.0/UML">
+ <uml:Model xmi:id="_u2TcYA_wEd2mbaTvSwUWQw" name="SysML_DeriveReqt_TEST">
+ <packageImport xmi:id="_u2TcYQ_wEd2mbaTvSwUWQw">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Class" xmi:id="_x5NzwA_wEd2mbaTvSwUWQw" name="Class_0"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_yOhVYA_wEd2mbaTvSwUWQw" name="Class_1" clientDependency="_3KuJoA_wEd2mbaTvSwUWQw _48Q_wA_wEd2mbaTvSwUWQw"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_yoJWUA_wEd2mbaTvSwUWQw" name="Class_2"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_y7-RQA_wEd2mbaTvSwUWQw" name="Class_3" clientDependency="_5hE9AA_wEd2mbaTvSwUWQw"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_zWMvIA_wEd2mbaTvSwUWQw" name="Class_4"/>
+ <packagedElement xmi:type="uml:Abstraction" xmi:id="_3KuJoA_wEd2mbaTvSwUWQw" name="FromClass_1toClass_2" supplier="_yoJWUA_wEd2mbaTvSwUWQw" client="_yOhVYA_wEd2mbaTvSwUWQw"/>
+ <packagedElement xmi:type="uml:Abstraction" xmi:id="_48Q_wA_wEd2mbaTvSwUWQw" name="FromClass_1toClass_4" supplier="_zWMvIA_wEd2mbaTvSwUWQw" client="_yOhVYA_wEd2mbaTvSwUWQw"/>
+ <packagedElement xmi:type="uml:Abstraction" xmi:id="_5hE9AA_wEd2mbaTvSwUWQw" name="FromClass_3toClass_4" supplier="_zWMvIA_wEd2mbaTvSwUWQw" client="_y7-RQA_wEd2mbaTvSwUWQw"/>
+ <profileApplication xmi:id="_u2TcYg_wEd2mbaTvSwUWQw">
+ <eAnnotations xmi:id="_u2TcYw_wEd2mbaTvSwUWQw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/uml2/schemas/Standard/1#/"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://UML_PROFILES/Standard.profile.uml#_0"/>
+ </profileApplication>
+ <profileApplication xmi:id="_xaXUkA_wEd2mbaTvSwUWQw">
+ <eAnnotations xmi:id="_xahFkA_wEd2mbaTvSwUWQw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.papyrusuml.org/SysML/1#//requirements"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Requirements:DeriveReqt xmi:id="_8SswEA_wEd2mbaTvSwUWQw" base_Abstraction="_3KuJoA_wEd2mbaTvSwUWQw"/>
+ <Requirements:DeriveReqt xmi:id="_8SswEQ_wEd2mbaTvSwUWQw" base_Abstraction="_48Q_wA_wEd2mbaTvSwUWQw"/>
+ <Requirements:DeriveReqt xmi:id="_8SswEg_wEd2mbaTvSwUWQw" base_Abstraction="_5hE9AA_wEd2mbaTvSwUWQw"/>
+ <Requirements:Requirement xmi:id="_91CskA_wEd2mbaTvSwUWQw" base_Class="_yoJWUA_wEd2mbaTvSwUWQw"/>
+ <Requirements:Requirement xmi:id="_91CskQ_wEd2mbaTvSwUWQw" base_Class="_zWMvIA_wEd2mbaTvSwUWQw"/>
+ <Requirements:Requirement xmi:id="_91MdkA_wEd2mbaTvSwUWQw" base_Class="_y7-RQA_wEd2mbaTvSwUWQw"/>
+ <Requirements:Requirement xmi:id="_91MdkQ_wEd2mbaTvSwUWQw" base_Class="_yOhVYA_wEd2mbaTvSwUWQw"/>
+ <Requirements:Requirement xmi:id="_91Mdkg_wEd2mbaTvSwUWQw" base_Class="_x5NzwA_wEd2mbaTvSwUWQw"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.tests/samples/SysML_FlowPort_TEST.uml b/tests/org.eclipse.papyrus.sysml.tests/samples/SysML_FlowPort_TEST.uml
new file mode 100755
index 0000000..6b48a36
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/samples/SysML_FlowPort_TEST.uml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:PortAndFlows="http://www.papyrusuml.org/SysML/PortAndFlows/1" xmlns:uml="http://www.eclipse.org/uml2/2.1.0/UML">
+ <uml:Model xmi:id="_XAwHEA_xEd2mbaTvSwUWQw" name="SysML_FlowPort_TEST">
+ <packageImport xmi:id="_XAwHEQ_xEd2mbaTvSwUWQw">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Class" xmi:id="_dtUFsA_xEd2mbaTvSwUWQw" name="Class_0">
+ <ownedAttribute xmi:type="uml:Port" xmi:id="_eK9rAA_xEd2mbaTvSwUWQw" name="Port_0" aggregation="composite"/>
+ <ownedAttribute xmi:type="uml:Port" xmi:id="_jzbIUA_xEd2mbaTvSwUWQw" name="Port_1" type="_g-Er0A_xEd2mbaTvSwUWQw" aggregation="composite"/>
+ <ownedAttribute xmi:type="uml:Port" xmi:id="_nu9JwA_xEd2mbaTvSwUWQw" name="Port_2" type="_irJ4sA_xEd2mbaTvSwUWQw" aggregation="composite"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Interface" xmi:id="_g-Er0A_xEd2mbaTvSwUWQw" name="Interface_0"/>
+ <packagedElement xmi:type="uml:PrimitiveType" xmi:id="_irJ4sA_xEd2mbaTvSwUWQw" name="PrimitiveType_0"/>
+ <profileApplication xmi:id="_XAwHEg_xEd2mbaTvSwUWQw">
+ <eAnnotations xmi:id="_XAwHEw_xEd2mbaTvSwUWQw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/uml2/schemas/Standard/1#/"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://UML_PROFILES/Standard.profile.uml#_0"/>
+ </profileApplication>
+ <profileApplication xmi:id="_bHAx0A_xEd2mbaTvSwUWQw">
+ <eAnnotations xmi:id="_bHAx0Q_xEd2mbaTvSwUWQw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.papyrusuml.org/SysML/1#//portandflows"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <PortAndFlows:FlowPort xmi:id="_fJZpMA_xEd2mbaTvSwUWQw" base_Port="_eK9rAA_xEd2mbaTvSwUWQw"/>
+ <PortAndFlows:FlowSpecification xmi:id="_hqfF4A_xEd2mbaTvSwUWQw" base_Interface="_g-Er0A_xEd2mbaTvSwUWQw"/>
+ <PortAndFlows:FlowPort xmi:id="_mDOAsA_xEd2mbaTvSwUWQw" base_Port="_jzbIUA_xEd2mbaTvSwUWQw"/>
+ <PortAndFlows:FlowPort xmi:id="_oefJQA_xEd2mbaTvSwUWQw" base_Port="_nu9JwA_xEd2mbaTvSwUWQw"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.tests/samples/SysML_Refine_TEST.uml b/tests/org.eclipse.papyrus.sysml.tests/samples/SysML_Refine_TEST.uml
new file mode 100755
index 0000000..6377b23
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/samples/SysML_Refine_TEST.uml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Requirements="http://www.papyrusuml.org/SysML/Requirements/1" xmlns:standard="http://www.eclipse.org/uml2/schemas/Standard/1" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/2.1.0/UML" xsi:schemaLocation="http://www.papyrusuml.org/SysML/Requirements/1 http://www.papyrusuml.org/SysML/1#//requirements">
+ <uml:Model xmi:id="_wJfGRw_xEd2mbaTvSwUWQw" name="SysML_Refine_TEST">
+ <packageImport xmi:id="_wJfGSA_xEd2mbaTvSwUWQw">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Class" xmi:id="_zIq0AA_xEd2mbaTvSwUWQw" name="Class_0"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_zhGiIA_xEd2mbaTvSwUWQw" name="Class_1" clientDependency="_6vCvgA_xEd2mbaTvSwUWQw _CwrqsA_yEd2mbaTvSwUWQw"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_zx8agA_xEd2mbaTvSwUWQw" name="Class_2"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_0BSeEA_xEd2mbaTvSwUWQw" name="Class_3"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_0V2Y0A_xEd2mbaTvSwUWQw" name="Class_4" clientDependency="_DUvaAA_yEd2mbaTvSwUWQw"/>
+ <packagedElement xmi:type="uml:Abstraction" xmi:id="_6vCvgA_xEd2mbaTvSwUWQw" name="FromClass_1toClass_2" supplier="_zx8agA_xEd2mbaTvSwUWQw" client="_zhGiIA_xEd2mbaTvSwUWQw"/>
+ <packagedElement xmi:type="uml:Abstraction" xmi:id="_CwrqsA_yEd2mbaTvSwUWQw" name="FromClass_1toClass_3" supplier="_0BSeEA_xEd2mbaTvSwUWQw" client="_zhGiIA_xEd2mbaTvSwUWQw"/>
+ <packagedElement xmi:type="uml:Abstraction" xmi:id="_DUvaAA_yEd2mbaTvSwUWQw" name="FromClass_4toClass_3" supplier="_0BSeEA_xEd2mbaTvSwUWQw" client="_0V2Y0A_xEd2mbaTvSwUWQw"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_houV4A_yEd2mbaTvSwUWQw" name="Class_5"/>
+ <profileApplication xmi:id="_wJfGSQ_xEd2mbaTvSwUWQw">
+ <eAnnotations xmi:id="_wJfGSg_xEd2mbaTvSwUWQw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/uml2/schemas/Standard/1#/"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://UML_PROFILES/Standard.profile.uml#_0"/>
+ </profileApplication>
+ <profileApplication xmi:id="_ZeccEA_yEd2mbaTvSwUWQw">
+ <eAnnotations xmi:id="_ZeccEQ_yEd2mbaTvSwUWQw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.papyrusuml.org/SysML/1#//requirements"/>
+ </eAnnotations>
+ <appliedProfile href="../../../plugin/com.cea.papyrus.uml4sysml.extension/model/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Requirements:Requirement xmi:id="_bnrZcg_yEd2mbaTvSwUWQw" base_Class="_zIq0AA_xEd2mbaTvSwUWQw"/>
+ <Requirements:RequirementRelated xmi:id="_jx96UA_yEd2mbaTvSwUWQw" base_NamedElement="_houV4A_yEd2mbaTvSwUWQw"/>
+ <standard:Refine xmi:id="_w_CjIA_zEd2mbaTvSwUWQw" base_Abstraction="_6vCvgA_xEd2mbaTvSwUWQw"/>
+ <standard:Refine xmi:id="_w_MUIA_zEd2mbaTvSwUWQw" base_Abstraction="_CwrqsA_yEd2mbaTvSwUWQw"/>
+ <standard:Refine xmi:id="_w_MUIQ_zEd2mbaTvSwUWQw" base_Abstraction="_DUvaAA_yEd2mbaTvSwUWQw"/>
+ <Requirements:Requirement xmi:id="_0tnGoA_zEd2mbaTvSwUWQw" base_Class="_0BSeEA_xEd2mbaTvSwUWQw"/>
+ <Requirements:Requirement xmi:id="_5TnBYA_zEd2mbaTvSwUWQw" base_Class="_zx8agA_xEd2mbaTvSwUWQw"/>
+ <Requirements:RequirementRelated xmi:id="_7LtygA_zEd2mbaTvSwUWQw" base_NamedElement="_0V2Y0A_xEd2mbaTvSwUWQw"/>
+ <Requirements:RequirementRelated xmi:id="_7LtygQ_zEd2mbaTvSwUWQw" base_NamedElement="_zhGiIA_xEd2mbaTvSwUWQw"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.tests/samples/SysML_Satisfy_TEST.uml b/tests/org.eclipse.papyrus.sysml.tests/samples/SysML_Satisfy_TEST.uml
new file mode 100755
index 0000000..2ea2c07
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/samples/SysML_Satisfy_TEST.uml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:com.cea.papyrus.profiles="http://www.eclipse.org/uml2/schemas/Standard/1" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:Requirements="http://www.papyrusuml.org/SysML/Requirements/1" xmlns:uml="http://www.eclipse.org/uml2/2.1.0/UML">
+ <uml:Model xmi:id="_wJfGRw_xEd2mbaTvSwUWQw" name="SysML_Satisfy_TEST">
+ <packageImport xmi:id="_wJfGSA_xEd2mbaTvSwUWQw">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Class" xmi:id="_zIq0AA_xEd2mbaTvSwUWQw" name="Class_0"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_zhGiIA_xEd2mbaTvSwUWQw" name="Class_1" clientDependency="_v7uPgA_0Ed2mbaTvSwUWQw _waaWoA_0Ed2mbaTvSwUWQw"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_zx8agA_xEd2mbaTvSwUWQw" name="Class_2"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_0BSeEA_xEd2mbaTvSwUWQw" name="Class_3"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_0V2Y0A_xEd2mbaTvSwUWQw" name="Class_4" clientDependency="_xFLx8A_0Ed2mbaTvSwUWQw"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_houV4A_yEd2mbaTvSwUWQw" name="Class_5"/>
+ <packagedElement xmi:type="uml:Realization" xmi:id="_v7uPgA_0Ed2mbaTvSwUWQw" name="FromClass_1toClass_2" supplier="_zx8agA_xEd2mbaTvSwUWQw" client="_zhGiIA_xEd2mbaTvSwUWQw"/>
+ <packagedElement xmi:type="uml:Realization" xmi:id="_waaWoA_0Ed2mbaTvSwUWQw" name="FromClass_1toClass_3" supplier="_0BSeEA_xEd2mbaTvSwUWQw" client="_zhGiIA_xEd2mbaTvSwUWQw"/>
+ <packagedElement xmi:type="uml:Realization" xmi:id="_xFLx8A_0Ed2mbaTvSwUWQw" name="FromClass_4toClass_3" supplier="_0BSeEA_xEd2mbaTvSwUWQw" client="_0V2Y0A_xEd2mbaTvSwUWQw"/>
+ <profileApplication xmi:id="_wJfGSQ_xEd2mbaTvSwUWQw">
+ <eAnnotations xmi:id="_wJfGSg_xEd2mbaTvSwUWQw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/uml2/schemas/Standard/1#/"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://UML_PROFILES/Standard.profile.uml#_0"/>
+ </profileApplication>
+ <profileApplication xmi:id="_ZeccEA_yEd2mbaTvSwUWQw">
+ <eAnnotations xmi:id="_ZeccEQ_yEd2mbaTvSwUWQw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.papyrusuml.org/SysML/1#//requirements"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Requirements:Requirement xmi:id="_bnrZcg_yEd2mbaTvSwUWQw" base_Class="_zIq0AA_xEd2mbaTvSwUWQw"/>
+ <Requirements:RequirementRelated xmi:id="_jx96UA_yEd2mbaTvSwUWQw" base_NamedElement="_houV4A_yEd2mbaTvSwUWQw"/>
+ <com.cea.papyrus.profiles:Refine xmi:id="_w_CjIA_zEd2mbaTvSwUWQw"/>
+ <com.cea.papyrus.profiles:Refine xmi:id="_w_MUIA_zEd2mbaTvSwUWQw"/>
+ <com.cea.papyrus.profiles:Refine xmi:id="_w_MUIQ_zEd2mbaTvSwUWQw"/>
+ <Requirements:Requirement xmi:id="_0tnGoA_zEd2mbaTvSwUWQw" base_Class="_0BSeEA_xEd2mbaTvSwUWQw"/>
+ <Requirements:Requirement xmi:id="_5TnBYA_zEd2mbaTvSwUWQw" base_Class="_zx8agA_xEd2mbaTvSwUWQw"/>
+ <Requirements:RequirementRelated xmi:id="_7LtygA_zEd2mbaTvSwUWQw" base_NamedElement="_0V2Y0A_xEd2mbaTvSwUWQw"/>
+ <Requirements:RequirementRelated xmi:id="_7LtygQ_zEd2mbaTvSwUWQw" base_NamedElement="_zhGiIA_xEd2mbaTvSwUWQw"/>
+ <Requirements:Satisfy xmi:id="_DG8jsA_0Ed2mbaTvSwUWQw"/>
+ <Requirements:Satisfy xmi:id="_PYFlMA_0Ed2mbaTvSwUWQw"/>
+ <Requirements:Satisfy xmi:id="_PYFlMQ_0Ed2mbaTvSwUWQw"/>
+ <Requirements:Satisfy xmi:id="_ziY0MA_0Ed2mbaTvSwUWQw" base_Realization="_xFLx8A_0Ed2mbaTvSwUWQw"/>
+ <Requirements:Satisfy xmi:id="_ziY0MQ_0Ed2mbaTvSwUWQw" base_Realization="_waaWoA_0Ed2mbaTvSwUWQw"/>
+ <Requirements:Satisfy xmi:id="_ziY0Mg_0Ed2mbaTvSwUWQw" base_Realization="_v7uPgA_0Ed2mbaTvSwUWQw"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.tests/samples/SysML_Trace_TEST.uml b/tests/org.eclipse.papyrus.sysml.tests/samples/SysML_Trace_TEST.uml
new file mode 100755
index 0000000..d6382b8
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/samples/SysML_Trace_TEST.uml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:standard="http://www.eclipse.org/uml2/schemas/Standard/1" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:Requirements="http://www.papyrusuml.org/SysML/Requirements/1" xmlns:uml="http://www.eclipse.org/uml2/2.1.0/UML">
+ <uml:Model xmi:id="_wJfGRw_xEd2mbaTvSwUWQw" name="SysML_Trace_TEST">
+ <packageImport xmi:id="_wJfGSA_xEd2mbaTvSwUWQw">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Class" xmi:id="_zIq0AA_xEd2mbaTvSwUWQw" name="Class_0"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_zhGiIA_xEd2mbaTvSwUWQw" name="Class_1" clientDependency="_6vCvgA_xEd2mbaTvSwUWQw _CwrqsA_yEd2mbaTvSwUWQw"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_zx8agA_xEd2mbaTvSwUWQw" name="Class_2"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_0BSeEA_xEd2mbaTvSwUWQw" name="Class_3"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_0V2Y0A_xEd2mbaTvSwUWQw" name="Class_4" clientDependency="_DUvaAA_yEd2mbaTvSwUWQw"/>
+ <packagedElement xmi:type="uml:Abstraction" xmi:id="_6vCvgA_xEd2mbaTvSwUWQw" name="FromClass_1toClass_2" supplier="_zx8agA_xEd2mbaTvSwUWQw" client="_zhGiIA_xEd2mbaTvSwUWQw"/>
+ <packagedElement xmi:type="uml:Abstraction" xmi:id="_CwrqsA_yEd2mbaTvSwUWQw" name="FromClass_1toClass_3" supplier="_0BSeEA_xEd2mbaTvSwUWQw" client="_zhGiIA_xEd2mbaTvSwUWQw"/>
+ <packagedElement xmi:type="uml:Abstraction" xmi:id="_DUvaAA_yEd2mbaTvSwUWQw" name="FromClass_4toClass_3" supplier="_0BSeEA_xEd2mbaTvSwUWQw" client="_0V2Y0A_xEd2mbaTvSwUWQw"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_houV4A_yEd2mbaTvSwUWQw" name="Class_5"/>
+ <profileApplication xmi:id="_wJfGSQ_xEd2mbaTvSwUWQw">
+ <eAnnotations xmi:id="_wJfGSg_xEd2mbaTvSwUWQw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/uml2/schemas/Standard/1#/"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://UML_PROFILES/Standard.profile.uml#_0"/>
+ </profileApplication>
+ <profileApplication xmi:id="_ZeccEA_yEd2mbaTvSwUWQw">
+ <eAnnotations xmi:id="_ZeccEQ_yEd2mbaTvSwUWQw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.papyrusuml.org/SysML/1#//requirements"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <standard:Trace xmi:id="_RgE3UA_yEd2mbaTvSwUWQw" base_Abstraction="_6vCvgA_xEd2mbaTvSwUWQw"/>
+ <standard:Trace xmi:id="_RgE3UQ_yEd2mbaTvSwUWQw" base_Abstraction="_CwrqsA_yEd2mbaTvSwUWQw"/>
+ <standard:Trace xmi:id="_RgE3Ug_yEd2mbaTvSwUWQw" base_Abstraction="_DUvaAA_yEd2mbaTvSwUWQw"/>
+ <Requirements:Requirement xmi:id="_bnYegA_yEd2mbaTvSwUWQw" base_Class="_0V2Y0A_xEd2mbaTvSwUWQw"/>
+ <Requirements:Requirement xmi:id="_bnrZcQ_yEd2mbaTvSwUWQw" base_Class="_zhGiIA_xEd2mbaTvSwUWQw"/>
+ <Requirements:Requirement xmi:id="_bnrZcg_yEd2mbaTvSwUWQw" base_Class="_zIq0AA_xEd2mbaTvSwUWQw"/>
+ <Requirements:RequirementRelated xmi:id="_gHa7MA_yEd2mbaTvSwUWQw" base_NamedElement="_zx8agA_xEd2mbaTvSwUWQw"/>
+ <Requirements:RequirementRelated xmi:id="_hFQccA_yEd2mbaTvSwUWQw" base_NamedElement="_0BSeEA_xEd2mbaTvSwUWQw"/>
+ <Requirements:RequirementRelated xmi:id="_jx96UA_yEd2mbaTvSwUWQw" base_NamedElement="_houV4A_yEd2mbaTvSwUWQw"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.tests/samples/SysML_Verify_TEST.uml b/tests/org.eclipse.papyrus.sysml.tests/samples/SysML_Verify_TEST.uml
new file mode 100755
index 0000000..74ce4a6
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/samples/SysML_Verify_TEST.uml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:Requirements="http://www.papyrusuml.org/SysML/Requirements/1" xmlns:uml="http://www.eclipse.org/uml2/2.1.0/UML">
+ <uml:Model xmi:id="_wJfGRw_xEd2mbaTvSwUWQw" name="SysML_Verify_TEST">
+ <packageImport xmi:id="_wJfGSA_xEd2mbaTvSwUWQw">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Class" xmi:id="_zIq0AA_xEd2mbaTvSwUWQw" name="Class_0"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_zhGiIA_xEd2mbaTvSwUWQw" name="Class_1">
+ <ownedOperation xmi:id="_312fYA_yEd2mbaTvSwUWQw" name="c1_Op1" clientDependency="_6vCvgA_xEd2mbaTvSwUWQw"/>
+ <ownedOperation xmi:id="_4AbXsA_yEd2mbaTvSwUWQw" name="c1_Op2" clientDependency="_CwrqsA_yEd2mbaTvSwUWQw"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_zx8agA_xEd2mbaTvSwUWQw" name="Class_2"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_0BSeEA_xEd2mbaTvSwUWQw" name="Class_3"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_0V2Y0A_xEd2mbaTvSwUWQw" name="Class_4">
+ <ownedOperation xmi:id="_7KL98A_yEd2mbaTvSwUWQw" name="c4_Op1"/>
+ <ownedOperation xmi:id="_7Vq1MA_yEd2mbaTvSwUWQw" name="c4_Op2" clientDependency="_DUvaAA_yEd2mbaTvSwUWQw"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Abstraction" xmi:id="_6vCvgA_xEd2mbaTvSwUWQw" name="FromOperation_0toClass_2" supplier="_zx8agA_xEd2mbaTvSwUWQw" client="_312fYA_yEd2mbaTvSwUWQw"/>
+ <packagedElement xmi:type="uml:Abstraction" xmi:id="_CwrqsA_yEd2mbaTvSwUWQw" name="FromOperation_1toClass_3" supplier="_0BSeEA_xEd2mbaTvSwUWQw" client="_4AbXsA_yEd2mbaTvSwUWQw"/>
+ <packagedElement xmi:type="uml:Abstraction" xmi:id="_DUvaAA_yEd2mbaTvSwUWQw" name="FromOperation_1toClass_3" supplier="_0BSeEA_xEd2mbaTvSwUWQw" client="_7Vq1MA_yEd2mbaTvSwUWQw"/>
+ <profileApplication xmi:id="_wJfGSQ_xEd2mbaTvSwUWQw">
+ <eAnnotations xmi:id="_wJfGSg_xEd2mbaTvSwUWQw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/uml2/schemas/Standard/1#/"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://UML_PROFILES/Standard.profile.uml#_0"/>
+ </profileApplication>
+ <profileApplication xmi:id="_ZeccEA_yEd2mbaTvSwUWQw">
+ <eAnnotations xmi:id="_ZeccEQ_yEd2mbaTvSwUWQw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.papyrusuml.org/SysML/1#//requirements"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Requirements:Requirement xmi:id="_bnrZcg_yEd2mbaTvSwUWQw" base_Class="_zIq0AA_xEd2mbaTvSwUWQw"/>
+ <Requirements:RequirementRelated xmi:id="_jx96UA_yEd2mbaTvSwUWQw"/>
+ <Requirements:Verify xmi:id="_vSYpgA_yEd2mbaTvSwUWQw" base_Abstraction="_DUvaAA_yEd2mbaTvSwUWQw"/>
+ <Requirements:Verify xmi:id="_w90QkA_yEd2mbaTvSwUWQw" base_Abstraction="_CwrqsA_yEd2mbaTvSwUWQw"/>
+ <Requirements:Verify xmi:id="_yoEL4A_yEd2mbaTvSwUWQw" base_Abstraction="_6vCvgA_xEd2mbaTvSwUWQw"/>
+ <Requirements:Requirement xmi:id="_2jmNUA_yEd2mbaTvSwUWQw" base_Class="_0BSeEA_xEd2mbaTvSwUWQw"/>
+ <Requirements:Requirement xmi:id="_3LhwAA_yEd2mbaTvSwUWQw" base_Class="_zx8agA_xEd2mbaTvSwUWQw"/>
+ <Requirements:TestCase xmi:id="_D9KPcA_zEd2mbaTvSwUWQw" base_Operation="_312fYA_yEd2mbaTvSwUWQw"/>
+ <Requirements:TestCase xmi:id="_FGeA4A_zEd2mbaTvSwUWQw" base_Operation="_4AbXsA_yEd2mbaTvSwUWQw"/>
+ <Requirements:TestCase xmi:id="_GEdTIA_zEd2mbaTvSwUWQw" base_Operation="_7KL98A_yEd2mbaTvSwUWQw"/>
+ <Requirements:TestCase xmi:id="_GEdTIQ_zEd2mbaTvSwUWQw" base_Operation="_7Vq1MA_yEd2mbaTvSwUWQw"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.tests/samples/SysML_View_TEST.uml b/tests/org.eclipse.papyrus.sysml.tests/samples/SysML_View_TEST.uml
new file mode 100755
index 0000000..02cb237
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/samples/SysML_View_TEST.uml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:ModelElements="http://www.papyrusuml.org/SysML/ModelElements/1" xmlns:uml="http://www.eclipse.org/uml2/2.1.0/UML">
+ <uml:Model xmi:id="_vKPhgA_vEd2uupC7rat70Q" name="SysML_View_TEST">
+ <packageImport xmi:id="_vKPhgQ_vEd2uupC7rat70Q">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Class" xmi:id="_v9DegA_vEd2uupC7rat70Q" name="Class_0"/>
+ <packagedElement xmi:type="uml:Package" xmi:id="_xOtToA_vEd2uupC7rat70Q" name="Package_0" clientDependency="_1ofXUA_vEd2uupC7rat70Q"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_xknSMA_vEd2uupC7rat70Q" name="Class_1"/>
+ <packagedElement xmi:type="uml:Package" xmi:id="_yAVk4A_vEd2uupC7rat70Q" name="Package_1"/>
+ <packagedElement xmi:type="uml:Abstraction" xmi:id="_1ofXUA_vEd2uupC7rat70Q" name="FromPackage_0toClass_0" supplier="_v9DegA_vEd2uupC7rat70Q" client="_xOtToA_vEd2uupC7rat70Q"/>
+ <profileApplication xmi:id="_vKPhgg_vEd2uupC7rat70Q">
+ <eAnnotations xmi:id="_vKPhgw_vEd2uupC7rat70Q" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/uml2/schemas/Standard/1#/"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://UML_PROFILES/Standard.profile.uml#_0"/>
+ </profileApplication>
+ <profileApplication xmi:id="_3pF9Xw_vEd2uupC7rat70Q">
+ <eAnnotations xmi:id="_3pPHEA_vEd2uupC7rat70Q" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.papyrusuml.org/SysML/1#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <ModelElements:Conform xmi:id="_5P6J8A_vEd2uupC7rat70Q" base_Dependency="_1ofXUA_vEd2uupC7rat70Q"/>
+ <ModelElements:ViewPoint xmi:id="_6YLZkA_vEd2uupC7rat70Q" base_Class="_v9DegA_vEd2uupC7rat70Q"/>
+ <ModelElements:ViewPoint xmi:id="_7AQtQA_vEd2uupC7rat70Q" base_Class="_xknSMA_vEd2uupC7rat70Q"/>
+ <ModelElements:View xmi:id="_7oWA8A_vEd2uupC7rat70Q" base_Package="_yAVk4A_vEd2uupC7rat70Q"/>
+ <ModelElements:View xmi:id="_8UTvEA_vEd2uupC7rat70Q" base_Package="_xOtToA_vEd2uupC7rat70Q"/>
+</xmi:XMI>
diff --git a/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/activities/tests/ActivitiesTests.java b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/activities/tests/ActivitiesTests.java
new file mode 100755
index 0000000..bf63539
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/activities/tests/ActivitiesTests.java
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.activities.tests;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+
+/**
+ * <!-- begin-user-doc --> A test suite for the '<em><b>activities</b></em>' package. <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+public class ActivitiesTests extends TestSuite {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static void main(String[] args) {
+ TestRunner.run(suite());
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static Test suite() {
+ TestSuite suite = new ActivitiesTests("activities Tests");
+ return suite;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ActivitiesTests(String name) {
+ super(name);
+ }
+
+} // ActivitiesTests
diff --git a/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/activities/tests/ContinuousTest.java b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/activities/tests/ContinuousTest.java
new file mode 100755
index 0000000..77faaca
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/activities/tests/ContinuousTest.java
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.activities.tests;
+
+import junit.textui.TestRunner;
+
+import org.eclipse.papyrus.sysml.activities.ActivitiesFactory;
+import org.eclipse.papyrus.sysml.activities.Continuous;
+import org.junit.Ignore;
+
+/**
+ * <!-- begin-user-doc --> A test case for the model object '<em><b>Continuous</b></em>'. <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+@Ignore("no tests")
+public class ContinuousTest extends RateTest {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static void main(String[] args) {
+ TestRunner.run(ContinuousTest.class);
+ }
+
+ /**
+ * Constructs a new Continuous test case with the given name.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public ContinuousTest(String name) {
+ super(name);
+ }
+
+ /**
+ * Returns the fixture for this Continuous test case. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ @Override
+ protected Continuous getFixture() {
+ return (Continuous)fixture;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#setUp()
+ * @generated
+ */
+ @Override
+ protected void setUp() throws Exception {
+ setFixture(ActivitiesFactory.eINSTANCE.createContinuous());
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#tearDown()
+ * @generated
+ */
+ @Override
+ protected void tearDown() throws Exception {
+ setFixture(null);
+ }
+
+} // ContinuousTest
diff --git a/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/activities/tests/ControlOperatorTest.java b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/activities/tests/ControlOperatorTest.java
new file mode 100755
index 0000000..62fb76e
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/activities/tests/ControlOperatorTest.java
@@ -0,0 +1,104 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.activities.tests;
+
+import junit.framework.TestCase;
+import junit.textui.TestRunner;
+
+import org.eclipse.papyrus.sysml.activities.ActivitiesFactory;
+import org.eclipse.papyrus.sysml.activities.ControlOperator;
+import org.junit.Ignore;
+
+/**
+ * <!-- begin-user-doc --> A test case for the model object '<em><b>Control Operator</b></em>'. <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+@Ignore("no tests")
+public class ControlOperatorTest extends TestCase {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static void main(String[] args) {
+ TestRunner.run(ControlOperatorTest.class);
+ }
+
+ /**
+ * The fixture for this Control Operator test case. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ protected ControlOperator fixture = null;
+
+ /**
+ * Constructs a new Control Operator test case with the given name.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public ControlOperatorTest(String name) {
+ super(name);
+ }
+
+ /**
+ * Returns the fixture for this Control Operator test case.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ protected ControlOperator getFixture() {
+ return fixture;
+ }
+
+ /**
+ * Sets the fixture for this Control Operator test case.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ protected void setFixture(ControlOperator fixture) {
+ this.fixture = fixture;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#setUp()
+ * @generated
+ */
+ @Override
+ protected void setUp() throws Exception {
+ setFixture(ActivitiesFactory.eINSTANCE.createControlOperator());
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#tearDown()
+ * @generated
+ */
+ @Override
+ protected void tearDown() throws Exception {
+ setFixture(null);
+ }
+
+} // ControlOperatorTest
diff --git a/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/activities/tests/DiscreteTest.java b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/activities/tests/DiscreteTest.java
new file mode 100755
index 0000000..f011211
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/activities/tests/DiscreteTest.java
@@ -0,0 +1,84 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.activities.tests;
+
+import junit.textui.TestRunner;
+
+import org.eclipse.papyrus.sysml.activities.ActivitiesFactory;
+import org.eclipse.papyrus.sysml.activities.Discrete;
+import org.junit.Ignore;
+
+/**
+ * <!-- begin-user-doc --> A test case for the model object '<em><b>Discrete</b></em>'. <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+@Ignore("no tests")
+public class DiscreteTest extends RateTest {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static void main(String[] args) {
+ TestRunner.run(DiscreteTest.class);
+ }
+
+ /**
+ * Constructs a new Discrete test case with the given name.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public DiscreteTest(String name) {
+ super(name);
+ }
+
+ /**
+ * Returns the fixture for this Discrete test case. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ @Override
+ protected Discrete getFixture() {
+ return (Discrete)fixture;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#setUp()
+ * @generated
+ */
+ @Override
+ protected void setUp() throws Exception {
+ setFixture(ActivitiesFactory.eINSTANCE.createDiscrete());
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#tearDown()
+ * @generated
+ */
+ @Override
+ protected void tearDown() throws Exception {
+ setFixture(null);
+ }
+
+} // DiscreteTest
diff --git a/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/activities/tests/NoBufferTest.java b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/activities/tests/NoBufferTest.java
new file mode 100755
index 0000000..a686e21
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/activities/tests/NoBufferTest.java
@@ -0,0 +1,102 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.activities.tests;
+
+import junit.framework.TestCase;
+import junit.textui.TestRunner;
+
+import org.eclipse.papyrus.sysml.activities.ActivitiesFactory;
+import org.eclipse.papyrus.sysml.activities.NoBuffer;
+import org.junit.Ignore;
+
+/**
+ * <!-- begin-user-doc --> A test case for the model object '<em><b>No Buffer</b></em>'. <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+@Ignore("no tests")
+public class NoBufferTest extends TestCase {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static void main(String[] args) {
+ TestRunner.run(NoBufferTest.class);
+ }
+
+ /**
+ * The fixture for this No Buffer test case.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected NoBuffer fixture = null;
+
+ /**
+ * Constructs a new No Buffer test case with the given name.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public NoBufferTest(String name) {
+ super(name);
+ }
+
+ /**
+ * Returns the fixture for this No Buffer test case. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ protected NoBuffer getFixture() {
+ return fixture;
+ }
+
+ /**
+ * Sets the fixture for this No Buffer test case.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void setFixture(NoBuffer fixture) {
+ this.fixture = fixture;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#setUp()
+ * @generated
+ */
+ @Override
+ protected void setUp() throws Exception {
+ setFixture(ActivitiesFactory.eINSTANCE.createNoBuffer());
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#tearDown()
+ * @generated
+ */
+ @Override
+ protected void tearDown() throws Exception {
+ setFixture(null);
+ }
+
+} // NoBufferTest
diff --git a/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/activities/tests/OptionalTest.java b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/activities/tests/OptionalTest.java
new file mode 100755
index 0000000..c4a189f
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/activities/tests/OptionalTest.java
@@ -0,0 +1,109 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.activities.tests;
+
+import junit.framework.TestCase;
+import junit.textui.TestRunner;
+
+import org.eclipse.papyrus.sysml.activities.ActivitiesFactory;
+import org.eclipse.papyrus.sysml.activities.Optional;
+import org.junit.Ignore;
+
+/**
+ * <!-- begin-user-doc -->
+ * A test case for the model object '<em><b>Optional</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+@Ignore("no tests")
+public class OptionalTest extends TestCase {
+
+ /**
+ * The fixture for this Optional test case.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected Optional fixture = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static void main(String[] args) {
+ TestRunner.run(OptionalTest.class);
+ }
+
+ /**
+ * Constructs a new Optional test case with the given name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public OptionalTest(String name) {
+ super(name);
+ }
+
+ /**
+ * Sets the fixture for this Optional test case.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void setFixture(Optional fixture) {
+ this.fixture = fixture;
+ }
+
+ /**
+ * Returns the fixture for this Optional test case.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected Optional getFixture() {
+ return fixture;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#setUp()
+ * @generated
+ */
+ @Override
+ protected void setUp() throws Exception {
+ setFixture(ActivitiesFactory.eINSTANCE.createOptional());
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#tearDown()
+ * @generated
+ */
+ @Override
+ protected void tearDown() throws Exception {
+ setFixture(null);
+ }
+
+} //OptionalTest
diff --git a/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/activities/tests/OverwriteTest.java b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/activities/tests/OverwriteTest.java
new file mode 100755
index 0000000..bc66b5d
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/activities/tests/OverwriteTest.java
@@ -0,0 +1,102 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.activities.tests;
+
+import junit.framework.TestCase;
+import junit.textui.TestRunner;
+
+import org.eclipse.papyrus.sysml.activities.ActivitiesFactory;
+import org.eclipse.papyrus.sysml.activities.Overwrite;
+import org.junit.Ignore;
+
+/**
+ * <!-- begin-user-doc --> A test case for the model object '<em><b>Overwrite</b></em>'. <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+@Ignore("no tests")
+public class OverwriteTest extends TestCase {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static void main(String[] args) {
+ TestRunner.run(OverwriteTest.class);
+ }
+
+ /**
+ * The fixture for this Overwrite test case.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected Overwrite fixture = null;
+
+ /**
+ * Constructs a new Overwrite test case with the given name.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public OverwriteTest(String name) {
+ super(name);
+ }
+
+ /**
+ * Returns the fixture for this Overwrite test case. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ protected Overwrite getFixture() {
+ return fixture;
+ }
+
+ /**
+ * Sets the fixture for this Overwrite test case.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void setFixture(Overwrite fixture) {
+ this.fixture = fixture;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#setUp()
+ * @generated
+ */
+ @Override
+ protected void setUp() throws Exception {
+ setFixture(ActivitiesFactory.eINSTANCE.createOverwrite());
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#tearDown()
+ * @generated
+ */
+ @Override
+ protected void tearDown() throws Exception {
+ setFixture(null);
+ }
+
+} // OverwriteTest
diff --git a/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/activities/tests/ProbabilityTest.java b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/activities/tests/ProbabilityTest.java
new file mode 100755
index 0000000..49bdcca
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/activities/tests/ProbabilityTest.java
@@ -0,0 +1,102 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.activities.tests;
+
+import junit.framework.TestCase;
+import junit.textui.TestRunner;
+
+import org.eclipse.papyrus.sysml.activities.ActivitiesFactory;
+import org.eclipse.papyrus.sysml.activities.Probability;
+import org.junit.Ignore;
+
+/**
+ * <!-- begin-user-doc --> A test case for the model object '<em><b>Probability</b></em>'. <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+@Ignore("no tests")
+public class ProbabilityTest extends TestCase {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static void main(String[] args) {
+ TestRunner.run(ProbabilityTest.class);
+ }
+
+ /**
+ * The fixture for this Probability test case.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected Probability fixture = null;
+
+ /**
+ * Constructs a new Probability test case with the given name.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public ProbabilityTest(String name) {
+ super(name);
+ }
+
+ /**
+ * Returns the fixture for this Probability test case. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ protected Probability getFixture() {
+ return fixture;
+ }
+
+ /**
+ * Sets the fixture for this Probability test case. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ protected void setFixture(Probability fixture) {
+ this.fixture = fixture;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#setUp()
+ * @generated
+ */
+ @Override
+ protected void setUp() throws Exception {
+ setFixture(ActivitiesFactory.eINSTANCE.createProbability());
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#tearDown()
+ * @generated
+ */
+ @Override
+ protected void tearDown() throws Exception {
+ setFixture(null);
+ }
+
+} // ProbabilityTest
diff --git a/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/activities/tests/RateTest.java b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/activities/tests/RateTest.java
new file mode 100755
index 0000000..c4f9b0a
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/activities/tests/RateTest.java
@@ -0,0 +1,102 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.activities.tests;
+
+import junit.framework.TestCase;
+import junit.textui.TestRunner;
+
+import org.eclipse.papyrus.sysml.activities.ActivitiesFactory;
+import org.eclipse.papyrus.sysml.activities.Rate;
+import org.junit.Ignore;
+
+/**
+ * <!-- begin-user-doc --> A test case for the model object '<em><b>Rate</b></em>'. <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+@Ignore("no tests")
+public class RateTest extends TestCase {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static void main(String[] args) {
+ TestRunner.run(RateTest.class);
+ }
+
+ /**
+ * The fixture for this Rate test case.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected Rate fixture = null;
+
+ /**
+ * Constructs a new Rate test case with the given name.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public RateTest(String name) {
+ super(name);
+ }
+
+ /**
+ * Returns the fixture for this Rate test case.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected Rate getFixture() {
+ return fixture;
+ }
+
+ /**
+ * Sets the fixture for this Rate test case.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void setFixture(Rate fixture) {
+ this.fixture = fixture;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#setUp()
+ * @generated
+ */
+ @Override
+ protected void setUp() throws Exception {
+ setFixture(ActivitiesFactory.eINSTANCE.createRate());
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#tearDown()
+ * @generated
+ */
+ @Override
+ protected void tearDown() throws Exception {
+ setFixture(null);
+ }
+
+} // RateTest
diff --git a/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/allocations/tests/AllocateActivityPartitionTest.java b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/allocations/tests/AllocateActivityPartitionTest.java
new file mode 100755
index 0000000..8fd8bce
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/allocations/tests/AllocateActivityPartitionTest.java
@@ -0,0 +1,103 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.allocations.tests;
+
+import junit.framework.TestCase;
+import junit.textui.TestRunner;
+
+import org.eclipse.papyrus.sysml.allocations.AllocateActivityPartition;
+import org.eclipse.papyrus.sysml.allocations.AllocationsFactory;
+import org.junit.Ignore;
+
+/**
+ * <!-- begin-user-doc --> A test case for the model object ' <em><b>Allocate Activity Partition</b></em>'. <!-- end-user-doc -->
+ *
+ * @generated
+ */
+@Ignore("no tests")
+public class AllocateActivityPartitionTest extends TestCase {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static void main(String[] args) {
+ TestRunner.run(AllocateActivityPartitionTest.class);
+ }
+
+ /**
+ * The fixture for this Allocate Activity Partition test case.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ protected AllocateActivityPartition fixture = null;
+
+ /**
+ * Constructs a new Allocate Activity Partition test case with the given name. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public AllocateActivityPartitionTest(String name) {
+ super(name);
+ }
+
+ /**
+ * Returns the fixture for this Allocate Activity Partition test case.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected AllocateActivityPartition getFixture() {
+ return fixture;
+ }
+
+ /**
+ * Sets the fixture for this Allocate Activity Partition test case.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ protected void setFixture(AllocateActivityPartition fixture) {
+ this.fixture = fixture;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#setUp()
+ * @generated
+ */
+ @Override
+ protected void setUp() throws Exception {
+ setFixture(AllocationsFactory.eINSTANCE.createAllocateActivityPartition());
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#tearDown()
+ * @generated
+ */
+ @Override
+ protected void tearDown() throws Exception {
+ setFixture(null);
+ }
+
+} // AllocateActivityPartitionTest
diff --git a/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/allocations/tests/AllocateTest.java b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/allocations/tests/AllocateTest.java
new file mode 100755
index 0000000..802c367
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/allocations/tests/AllocateTest.java
@@ -0,0 +1,102 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.allocations.tests;
+
+import junit.framework.TestCase;
+import junit.textui.TestRunner;
+
+import org.eclipse.papyrus.sysml.allocations.Allocate;
+import org.eclipse.papyrus.sysml.allocations.AllocationsFactory;
+import org.junit.Ignore;
+
+/**
+ * <!-- begin-user-doc --> A test case for the model object '<em><b>Allocate</b></em>'. <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+@Ignore("no tests")
+public class AllocateTest extends TestCase {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static void main(String[] args) {
+ TestRunner.run(AllocateTest.class);
+ }
+
+ /**
+ * The fixture for this Allocate test case.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected Allocate fixture = null;
+
+ /**
+ * Constructs a new Allocate test case with the given name.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public AllocateTest(String name) {
+ super(name);
+ }
+
+ /**
+ * Returns the fixture for this Allocate test case. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ protected Allocate getFixture() {
+ return fixture;
+ }
+
+ /**
+ * Sets the fixture for this Allocate test case.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void setFixture(Allocate fixture) {
+ this.fixture = fixture;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#setUp()
+ * @generated
+ */
+ @Override
+ protected void setUp() throws Exception {
+ setFixture(AllocationsFactory.eINSTANCE.createAllocate());
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#tearDown()
+ * @generated
+ */
+ @Override
+ protected void tearDown() throws Exception {
+ setFixture(null);
+ }
+
+} // AllocateTest
diff --git a/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/allocations/tests/AllocatedTest.java b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/allocations/tests/AllocatedTest.java
new file mode 100755
index 0000000..3fe67ea
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/allocations/tests/AllocatedTest.java
@@ -0,0 +1,218 @@
+/*****************************************************************************
+ * Copyright (c) 2009, 2014 CEA LIST and others.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 422257
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.allocations.tests;
+
+import static org.junit.Assert.fail;
+
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.HouseKeeper;
+import org.eclipse.papyrus.sysml.allocations.Allocated;
+import org.eclipse.papyrus.sysml.allocations.AllocationsFactory;
+import org.eclipse.papyrus.sysml.allocations.AllocationsPackage;
+import org.eclipse.papyrus.sysml.utils.SysMLTestResources;
+import org.eclipse.uml2.uml.Abstraction;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.util.UMLUtil.StereotypeApplicationHelper;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+/**
+ * <!-- begin-user-doc --> A test case for the model object '<em><b>Allocated</b></em>'. <!--
+ * end-user-doc -->
+ * <p>
+ * The following features are tested:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.allocations.Allocated#getAllocatedFrom() <em>Allocated From</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.allocations.Allocated#getAllocatedTo() <em>Allocated To</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class AllocatedTest extends AbstractPapyrusTest {
+
+ @Rule
+ public final HouseKeeper houseKeeper = new HouseKeeper();
+
+ protected Allocated fixture = null;
+
+ protected Class c0 = null;
+
+ protected Class c1 = null;
+
+ protected Class c2 = null;
+
+ protected Class c3 = null;
+
+ protected Class c4 = null;
+
+ protected Allocated ac0 = null;
+
+ protected Allocated ac1 = null;
+
+ protected Allocated ac2 = null;
+
+ protected Allocated ac3 = null;
+
+ protected Allocated ac4 = null;
+
+ protected Model model = null;
+
+ /**
+ * Returns the fixture for this Allocated test case. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ protected Allocated getFixture() {
+ return fixture;
+ }
+
+ /**
+ * Sets the fixture for this Allocated test case.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void setFixture(Allocated fixture) {
+ this.fixture = fixture;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#setUp()
+ * @generated NOT
+ */
+ @Before
+ public void setUp() throws Exception {
+ setFixture(AllocationsFactory.eINSTANCE.createAllocated());
+
+ // Prepare test
+ model = SysMLTestResources.createSysMLModel(houseKeeper.createResourceSet());
+ if(model == null) {
+ fail();
+ }
+
+ if(model.getAppliedProfiles().isEmpty()) {
+ fail();
+ }
+
+ // Create classes
+ c0 = model.createOwnedClass("C0", false);
+ c1 = model.createOwnedClass("C1", false);
+ c2 = model.createOwnedClass("C2", false);
+ c3 = model.createOwnedClass("C3", false);
+ c4 = model.createOwnedClass("C4", false);
+
+ // Add Allocated stereotype
+
+ ac0 = (Allocated)StereotypeApplicationHelper.getInstance(null).applyStereotype(c0, AllocationsPackage.eINSTANCE.getAllocated());
+ ac1 = (Allocated)StereotypeApplicationHelper.getInstance(null).applyStereotype(c1, AllocationsPackage.eINSTANCE.getAllocated());
+ ac2 = (Allocated)StereotypeApplicationHelper.getInstance(null).applyStereotype(c2, AllocationsPackage.eINSTANCE.getAllocated());
+ ac3 = (Allocated)StereotypeApplicationHelper.getInstance(null).applyStereotype(c3, AllocationsPackage.eINSTANCE.getAllocated());
+ ac4 = (Allocated)StereotypeApplicationHelper.getInstance(null).applyStereotype(c4, AllocationsPackage.eINSTANCE.getAllocated());
+
+ // Add Abstractions with allocate stereotype
+ // c1 -> c2, c3
+ // c4 -> c3
+ Abstraction c1_c2 = UMLFactory.eINSTANCE.createAbstraction();
+ c1_c2.getClients().add(c1);
+ c1_c2.getSuppliers().add(c2);
+ model.getPackagedElements().add(c1_c2);
+
+ StereotypeApplicationHelper.getInstance(null).applyStereotype(c1_c2, AllocationsPackage.eINSTANCE.getAllocate());
+
+ Abstraction c1_c3 = UMLFactory.eINSTANCE.createAbstraction();
+ model.getPackagedElements().add(c1_c3);
+ c1_c3.getClients().add(c1);
+ c1_c3.getSuppliers().add(c3);
+ StereotypeApplicationHelper.getInstance(null).applyStereotype(c1_c3, AllocationsPackage.eINSTANCE.getAllocate());
+
+ Abstraction c4_c3 = UMLFactory.eINSTANCE.createAbstraction();
+ model.getPackagedElements().add(c4_c3);
+ c4_c3.getClients().add(c4);
+ c4_c3.getSuppliers().add(c3);
+ StereotypeApplicationHelper.getInstance(null).applyStereotype(c4_c3, AllocationsPackage.eINSTANCE.getAllocate());
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#tearDown()
+ * @generated
+ */
+ @After
+ public void tearDown() throws Exception {
+ setFixture(null);
+ }
+
+ /**
+ * Tests the '{@link org.eclipse.papyrus.sysml.allocations.Allocated#getAllocatedFrom()
+ * <em>Allocated From</em>}' feature getter. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.allocations.Allocated#getAllocatedFrom()
+ * @generated NOT
+ */
+ @Test
+ public void testGetAllocatedFrom() {
+
+ // Verifies : ac0.getAllocatedFrom = []
+ if(!ac0.getAllocatedFrom().isEmpty()) {
+ fail();
+ }
+
+ // Verifies : ac2.getAllocatedFrom = [c1]
+ if(!ac2.getAllocatedFrom().contains(c1)) {
+ fail();
+ }
+
+ // Verifies : ac3.getAllocatedFrom = [c1, c4]
+ if(!(ac3.getAllocatedFrom().contains(c1) && ac3.getAllocatedFrom().contains(c4))) {
+ fail();
+ }
+ }
+
+ /**
+ * Tests the '{@link org.eclipse.papyrus.sysml.allocations.Allocated#getAllocatedTo()
+ * <em>Allocated To</em>}' feature getter. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.allocations.Allocated#getAllocatedTo()
+ * @generated NOT
+ */
+ @Test
+ public void testGetAllocatedTo() {
+
+ // Verifies : ac0.getAllocatedTo = []
+ if(!ac0.getAllocatedTo().isEmpty()) {
+ fail();
+ }
+
+ // Verifies : ac0.getAllocatedTo = [c2, c3]
+ if(!(ac1.getAllocatedTo().contains(c2) && ac1.getAllocatedTo().contains(c3))) {
+ fail();
+ }
+
+ // Verifies : ac4.getAllocatedTo = [c3]
+ if(!ac4.getAllocatedTo().contains(c3)) {
+ fail();
+ }
+ }
+
+} // AllocatedTest
diff --git a/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/allocations/tests/AllocationsTests.java b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/allocations/tests/AllocationsTests.java
new file mode 100755
index 0000000..5dedf49
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/allocations/tests/AllocationsTests.java
@@ -0,0 +1,32 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.allocations.tests;
+
+import junit.framework.TestSuite;
+
+import org.junit.runner.RunWith;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.junit.runners.Suite.SuiteClasses;
+
+/**
+ * <!-- begin-user-doc --> A test suite for the '<em><b>allocations</b></em>' package. <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+@RunWith(ClassificationSuite.class)
+@SuiteClasses({ AllocatedTest.class })
+public class AllocationsTests extends TestSuite {
+ // AllocationsTests
+}
diff --git a/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/blocks/tests/BindingConnectorTest.java b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/blocks/tests/BindingConnectorTest.java
new file mode 100755
index 0000000..caf27ec
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/blocks/tests/BindingConnectorTest.java
@@ -0,0 +1,104 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.blocks.tests;
+
+import junit.framework.TestCase;
+import junit.textui.TestRunner;
+
+import org.eclipse.papyrus.sysml.blocks.BindingConnector;
+import org.eclipse.papyrus.sysml.blocks.BlocksFactory;
+import org.junit.Ignore;
+
+/**
+ * <!-- begin-user-doc --> A test case for the model object '<em><b>Binding Connector</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+@Ignore("no tests")
+public class BindingConnectorTest extends TestCase {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static void main(String[] args) {
+ TestRunner.run(BindingConnectorTest.class);
+ }
+
+ /**
+ * The fixture for this Binding Connector test case. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ protected BindingConnector fixture = null;
+
+ /**
+ * Constructs a new Binding Connector test case with the given name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public BindingConnectorTest(String name) {
+ super(name);
+ }
+
+ /**
+ * Returns the fixture for this Binding Connector test case.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ protected BindingConnector getFixture() {
+ return fixture;
+ }
+
+ /**
+ * Sets the fixture for this Binding Connector test case.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ protected void setFixture(BindingConnector fixture) {
+ this.fixture = fixture;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#setUp()
+ * @generated
+ */
+ @Override
+ protected void setUp() throws Exception {
+ setFixture(BlocksFactory.eINSTANCE.createBindingConnector());
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#tearDown()
+ * @generated
+ */
+ @Override
+ protected void tearDown() throws Exception {
+ setFixture(null);
+ }
+
+} // BindingConnectorTest
diff --git a/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/blocks/tests/BlockTest.java b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/blocks/tests/BlockTest.java
new file mode 100755
index 0000000..e1fa439
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/blocks/tests/BlockTest.java
@@ -0,0 +1,102 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.blocks.tests;
+
+import junit.framework.TestCase;
+import junit.textui.TestRunner;
+
+import org.eclipse.papyrus.sysml.blocks.Block;
+import org.eclipse.papyrus.sysml.blocks.BlocksFactory;
+import org.junit.Ignore;
+
+/**
+ * <!-- begin-user-doc --> A test case for the model object '<em><b>Block</b></em>'. <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+@Ignore("no tests")
+public class BlockTest extends TestCase {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static void main(String[] args) {
+ TestRunner.run(BlockTest.class);
+ }
+
+ /**
+ * The fixture for this Block test case.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected Block fixture = null;
+
+ /**
+ * Constructs a new Block test case with the given name.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public BlockTest(String name) {
+ super(name);
+ }
+
+ /**
+ * Returns the fixture for this Block test case.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected Block getFixture() {
+ return fixture;
+ }
+
+ /**
+ * Sets the fixture for this Block test case.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void setFixture(Block fixture) {
+ this.fixture = fixture;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#setUp()
+ * @generated
+ */
+ @Override
+ protected void setUp() throws Exception {
+ setFixture(BlocksFactory.eINSTANCE.createBlock());
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#tearDown()
+ * @generated
+ */
+ @Override
+ protected void tearDown() throws Exception {
+ setFixture(null);
+ }
+
+} // BlockTest
diff --git a/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/blocks/tests/BlocksTests.java b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/blocks/tests/BlocksTests.java
new file mode 100755
index 0000000..f5aba1a
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/blocks/tests/BlocksTests.java
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.blocks.tests;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+
+/**
+ * <!-- begin-user-doc --> A test suite for the '<em><b>blocks</b></em>' package. <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+public class BlocksTests extends TestSuite {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static void main(String[] args) {
+ TestRunner.run(suite());
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static Test suite() {
+ TestSuite suite = new BlocksTests("blocks Tests");
+ return suite;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public BlocksTests(String name) {
+ super(name);
+ }
+
+} // BlocksTests
diff --git a/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/blocks/tests/ConnectorPropertyTest.java b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/blocks/tests/ConnectorPropertyTest.java
new file mode 100755
index 0000000..45299ea
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/blocks/tests/ConnectorPropertyTest.java
@@ -0,0 +1,104 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.blocks.tests;
+
+import junit.framework.TestCase;
+import junit.textui.TestRunner;
+
+import org.eclipse.papyrus.sysml.blocks.BlocksFactory;
+import org.eclipse.papyrus.sysml.blocks.ConnectorProperty;
+import org.junit.Ignore;
+
+/**
+ * <!-- begin-user-doc --> A test case for the model object '<em><b>Connector Property</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+@Ignore("no tests")
+public class ConnectorPropertyTest extends TestCase {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static void main(String[] args) {
+ TestRunner.run(ConnectorPropertyTest.class);
+ }
+
+ /**
+ * The fixture for this Connector Property test case. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ protected ConnectorProperty fixture = null;
+
+ /**
+ * Constructs a new Connector Property test case with the given name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ConnectorPropertyTest(String name) {
+ super(name);
+ }
+
+ /**
+ * Returns the fixture for this Connector Property test case.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ protected ConnectorProperty getFixture() {
+ return fixture;
+ }
+
+ /**
+ * Sets the fixture for this Connector Property test case.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ protected void setFixture(ConnectorProperty fixture) {
+ this.fixture = fixture;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#setUp()
+ * @generated
+ */
+ @Override
+ protected void setUp() throws Exception {
+ setFixture(BlocksFactory.eINSTANCE.createConnectorProperty());
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#tearDown()
+ * @generated
+ */
+ @Override
+ protected void tearDown() throws Exception {
+ setFixture(null);
+ }
+
+} // ConnectorPropertyTest
diff --git a/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/blocks/tests/DimensionTest.java b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/blocks/tests/DimensionTest.java
new file mode 100755
index 0000000..9dff527
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/blocks/tests/DimensionTest.java
@@ -0,0 +1,102 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.blocks.tests;
+
+import junit.framework.TestCase;
+import junit.textui.TestRunner;
+
+import org.eclipse.papyrus.sysml.blocks.BlocksFactory;
+import org.eclipse.papyrus.sysml.blocks.Dimension;
+import org.junit.Ignore;
+
+/**
+ * <!-- begin-user-doc --> A test case for the model object '<em><b>Dimension</b></em>'. <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+@Ignore("no tests")
+public class DimensionTest extends TestCase {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static void main(String[] args) {
+ TestRunner.run(DimensionTest.class);
+ }
+
+ /**
+ * The fixture for this Dimension test case.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected Dimension fixture = null;
+
+ /**
+ * Constructs a new Dimension test case with the given name.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public DimensionTest(String name) {
+ super(name);
+ }
+
+ /**
+ * Returns the fixture for this Dimension test case. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ protected Dimension getFixture() {
+ return fixture;
+ }
+
+ /**
+ * Sets the fixture for this Dimension test case.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void setFixture(Dimension fixture) {
+ this.fixture = fixture;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#setUp()
+ * @generated
+ */
+ @Override
+ protected void setUp() throws Exception {
+ setFixture(BlocksFactory.eINSTANCE.createDimension());
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#tearDown()
+ * @generated
+ */
+ @Override
+ protected void tearDown() throws Exception {
+ setFixture(null);
+ }
+
+} // DimensionTest
diff --git a/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/blocks/tests/DistributedPropertyTest.java b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/blocks/tests/DistributedPropertyTest.java
new file mode 100755
index 0000000..045fc22
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/blocks/tests/DistributedPropertyTest.java
@@ -0,0 +1,105 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.blocks.tests;
+
+import junit.framework.TestCase;
+import junit.textui.TestRunner;
+
+import org.eclipse.papyrus.sysml.blocks.BlocksFactory;
+import org.eclipse.papyrus.sysml.blocks.DistributedProperty;
+import org.junit.Ignore;
+
+/**
+ * <!-- begin-user-doc --> A test case for the model object '<em><b>Distributed Property</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+@Ignore("no tests")
+public class DistributedPropertyTest extends TestCase {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static void main(String[] args) {
+ TestRunner.run(DistributedPropertyTest.class);
+ }
+
+ /**
+ * The fixture for this Distributed Property test case.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ protected DistributedProperty fixture = null;
+
+ /**
+ * Constructs a new Distributed Property test case with the given name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public DistributedPropertyTest(String name) {
+ super(name);
+ }
+
+ /**
+ * Returns the fixture for this Distributed Property test case.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ protected DistributedProperty getFixture() {
+ return fixture;
+ }
+
+ /**
+ * Sets the fixture for this Distributed Property test case.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ protected void setFixture(DistributedProperty fixture) {
+ this.fixture = fixture;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#setUp()
+ * @generated
+ */
+ @Override
+ protected void setUp() throws Exception {
+ setFixture(BlocksFactory.eINSTANCE.createDistributedProperty());
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#tearDown()
+ * @generated
+ */
+ @Override
+ protected void tearDown() throws Exception {
+ setFixture(null);
+ }
+
+} // DistributedPropertyTest
diff --git a/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/blocks/tests/NestedConnectorEndTest.java b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/blocks/tests/NestedConnectorEndTest.java
new file mode 100755
index 0000000..f66940c
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/blocks/tests/NestedConnectorEndTest.java
@@ -0,0 +1,105 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.blocks.tests;
+
+import junit.framework.TestCase;
+import junit.textui.TestRunner;
+
+import org.eclipse.papyrus.sysml.blocks.BlocksFactory;
+import org.eclipse.papyrus.sysml.blocks.NestedConnectorEnd;
+import org.junit.Ignore;
+
+/**
+ * <!-- begin-user-doc --> A test case for the model object '<em><b>Nested Connector End</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+@Ignore("no tests")
+public class NestedConnectorEndTest extends TestCase {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static void main(String[] args) {
+ TestRunner.run(NestedConnectorEndTest.class);
+ }
+
+ /**
+ * The fixture for this Nested Connector End test case.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ protected NestedConnectorEnd fixture = null;
+
+ /**
+ * Constructs a new Nested Connector End test case with the given name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public NestedConnectorEndTest(String name) {
+ super(name);
+ }
+
+ /**
+ * Returns the fixture for this Nested Connector End test case.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ protected NestedConnectorEnd getFixture() {
+ return fixture;
+ }
+
+ /**
+ * Sets the fixture for this Nested Connector End test case.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ protected void setFixture(NestedConnectorEnd fixture) {
+ this.fixture = fixture;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#setUp()
+ * @generated
+ */
+ @Override
+ protected void setUp() throws Exception {
+ setFixture(BlocksFactory.eINSTANCE.createNestedConnectorEnd());
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#tearDown()
+ * @generated
+ */
+ @Override
+ protected void tearDown() throws Exception {
+ setFixture(null);
+ }
+
+} // NestedConnectorEndTest
diff --git a/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/blocks/tests/ParticipantPropertyTest.java b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/blocks/tests/ParticipantPropertyTest.java
new file mode 100755
index 0000000..5a1c283
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/blocks/tests/ParticipantPropertyTest.java
@@ -0,0 +1,105 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.blocks.tests;
+
+import junit.framework.TestCase;
+import junit.textui.TestRunner;
+
+import org.eclipse.papyrus.sysml.blocks.BlocksFactory;
+import org.eclipse.papyrus.sysml.blocks.ParticipantProperty;
+import org.junit.Ignore;
+
+/**
+ * <!-- begin-user-doc --> A test case for the model object '<em><b>Participant Property</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+@Ignore("no tests")
+public class ParticipantPropertyTest extends TestCase {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static void main(String[] args) {
+ TestRunner.run(ParticipantPropertyTest.class);
+ }
+
+ /**
+ * The fixture for this Participant Property test case.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ protected ParticipantProperty fixture = null;
+
+ /**
+ * Constructs a new Participant Property test case with the given name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ParticipantPropertyTest(String name) {
+ super(name);
+ }
+
+ /**
+ * Returns the fixture for this Participant Property test case.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ protected ParticipantProperty getFixture() {
+ return fixture;
+ }
+
+ /**
+ * Sets the fixture for this Participant Property test case.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ protected void setFixture(ParticipantProperty fixture) {
+ this.fixture = fixture;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#setUp()
+ * @generated
+ */
+ @Override
+ protected void setUp() throws Exception {
+ setFixture(BlocksFactory.eINSTANCE.createParticipantProperty());
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#tearDown()
+ * @generated
+ */
+ @Override
+ protected void tearDown() throws Exception {
+ setFixture(null);
+ }
+
+} // ParticipantPropertyTest
diff --git a/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/blocks/tests/PropertySpecificTypeTest.java b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/blocks/tests/PropertySpecificTypeTest.java
new file mode 100755
index 0000000..bd81349
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/blocks/tests/PropertySpecificTypeTest.java
@@ -0,0 +1,104 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.blocks.tests;
+
+import junit.framework.TestCase;
+import junit.textui.TestRunner;
+
+import org.eclipse.papyrus.sysml.blocks.BlocksFactory;
+import org.eclipse.papyrus.sysml.blocks.PropertySpecificType;
+import org.junit.Ignore;
+
+/**
+ * <!-- begin-user-doc --> A test case for the model object '<em><b>Property Specific Type</b></em> '. <!-- end-user-doc -->
+ *
+ * @generated
+ */
+@Ignore("no tests")
+public class PropertySpecificTypeTest extends TestCase {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static void main(String[] args) {
+ TestRunner.run(PropertySpecificTypeTest.class);
+ }
+
+ /**
+ * The fixture for this Property Specific Type test case.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ protected PropertySpecificType fixture = null;
+
+ /**
+ * Constructs a new Property Specific Type test case with the given name.
+ * <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public PropertySpecificTypeTest(String name) {
+ super(name);
+ }
+
+ /**
+ * Returns the fixture for this Property Specific Type test case.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ protected PropertySpecificType getFixture() {
+ return fixture;
+ }
+
+ /**
+ * Sets the fixture for this Property Specific Type test case.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ protected void setFixture(PropertySpecificType fixture) {
+ this.fixture = fixture;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#setUp()
+ * @generated
+ */
+ @Override
+ protected void setUp() throws Exception {
+ setFixture(BlocksFactory.eINSTANCE.createPropertySpecificType());
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#tearDown()
+ * @generated
+ */
+ @Override
+ protected void tearDown() throws Exception {
+ setFixture(null);
+ }
+
+} // PropertySpecificTypeTest
diff --git a/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/blocks/tests/UnitTest.java b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/blocks/tests/UnitTest.java
new file mode 100755
index 0000000..a751f47
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/blocks/tests/UnitTest.java
@@ -0,0 +1,102 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.blocks.tests;
+
+import junit.framework.TestCase;
+import junit.textui.TestRunner;
+
+import org.eclipse.papyrus.sysml.blocks.BlocksFactory;
+import org.eclipse.papyrus.sysml.blocks.Unit;
+import org.junit.Ignore;
+
+/**
+ * <!-- begin-user-doc --> A test case for the model object '<em><b>Unit</b></em>'. <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+@Ignore("no tests")
+public class UnitTest extends TestCase {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static void main(String[] args) {
+ TestRunner.run(UnitTest.class);
+ }
+
+ /**
+ * The fixture for this Unit test case.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected Unit fixture = null;
+
+ /**
+ * Constructs a new Unit test case with the given name.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public UnitTest(String name) {
+ super(name);
+ }
+
+ /**
+ * Returns the fixture for this Unit test case.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected Unit getFixture() {
+ return fixture;
+ }
+
+ /**
+ * Sets the fixture for this Unit test case.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void setFixture(Unit fixture) {
+ this.fixture = fixture;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#setUp()
+ * @generated
+ */
+ @Override
+ protected void setUp() throws Exception {
+ setFixture(BlocksFactory.eINSTANCE.createUnit());
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#tearDown()
+ * @generated
+ */
+ @Override
+ protected void tearDown() throws Exception {
+ setFixture(null);
+ }
+
+} // UnitTest
diff --git a/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/blocks/tests/ValueTypeTest.java b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/blocks/tests/ValueTypeTest.java
new file mode 100755
index 0000000..a3c2fef
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/blocks/tests/ValueTypeTest.java
@@ -0,0 +1,102 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.blocks.tests;
+
+import junit.framework.TestCase;
+import junit.textui.TestRunner;
+
+import org.eclipse.papyrus.sysml.blocks.BlocksFactory;
+import org.eclipse.papyrus.sysml.blocks.ValueType;
+import org.junit.Ignore;
+
+/**
+ * <!-- begin-user-doc --> A test case for the model object '<em><b>Value Type</b></em>'. <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+@Ignore("no tests")
+public class ValueTypeTest extends TestCase {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static void main(String[] args) {
+ TestRunner.run(ValueTypeTest.class);
+ }
+
+ /**
+ * The fixture for this Value Type test case.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ValueType fixture = null;
+
+ /**
+ * Constructs a new Value Type test case with the given name.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public ValueTypeTest(String name) {
+ super(name);
+ }
+
+ /**
+ * Returns the fixture for this Value Type test case. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ protected ValueType getFixture() {
+ return fixture;
+ }
+
+ /**
+ * Sets the fixture for this Value Type test case.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void setFixture(ValueType fixture) {
+ this.fixture = fixture;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#setUp()
+ * @generated
+ */
+ @Override
+ protected void setUp() throws Exception {
+ setFixture(BlocksFactory.eINSTANCE.createValueType());
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#tearDown()
+ * @generated
+ */
+ @Override
+ protected void tearDown() throws Exception {
+ setFixture(null);
+ }
+
+} // ValueTypeTest
diff --git a/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/constraints/tests/ConstraintBlockTest.java b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/constraints/tests/ConstraintBlockTest.java
new file mode 100755
index 0000000..5a3db61
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/constraints/tests/ConstraintBlockTest.java
@@ -0,0 +1,86 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.constraints.tests;
+
+import junit.textui.TestRunner;
+
+import org.eclipse.papyrus.sysml.blocks.tests.BlockTest;
+import org.eclipse.papyrus.sysml.constraints.ConstraintBlock;
+import org.eclipse.papyrus.sysml.constraints.ConstraintsFactory;
+import org.junit.Ignore;
+
+/**
+ * <!-- begin-user-doc --> A test case for the model object '<em><b>Constraint Block</b></em>'. <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+@Ignore("no tests")
+public class ConstraintBlockTest extends BlockTest {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static void main(String[] args) {
+ TestRunner.run(ConstraintBlockTest.class);
+ }
+
+ /**
+ * Constructs a new Constraint Block test case with the given name.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public ConstraintBlockTest(String name) {
+ super(name);
+ }
+
+ /**
+ * Returns the fixture for this Constraint Block test case.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected ConstraintBlock getFixture() {
+ return (ConstraintBlock)fixture;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#setUp()
+ * @generated
+ */
+ @Override
+ protected void setUp() throws Exception {
+ setFixture(ConstraintsFactory.eINSTANCE.createConstraintBlock());
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#tearDown()
+ * @generated
+ */
+ @Override
+ protected void tearDown() throws Exception {
+ setFixture(null);
+ }
+
+} // ConstraintBlockTest
diff --git a/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/constraints/tests/ConstraintPropertyTest.java b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/constraints/tests/ConstraintPropertyTest.java
new file mode 100755
index 0000000..f08e683
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/constraints/tests/ConstraintPropertyTest.java
@@ -0,0 +1,104 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.constraints.tests;
+
+import junit.framework.TestCase;
+import junit.textui.TestRunner;
+
+import org.eclipse.papyrus.sysml.constraints.ConstraintProperty;
+import org.eclipse.papyrus.sysml.constraints.ConstraintsFactory;
+import org.junit.Ignore;
+
+/**
+ * <!-- begin-user-doc --> A test case for the model object '<em><b>Constraint Property</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+@Ignore("no tests")
+public class ConstraintPropertyTest extends TestCase {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static void main(String[] args) {
+ TestRunner.run(ConstraintPropertyTest.class);
+ }
+
+ /**
+ * The fixture for this Constraint Property test case. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ protected ConstraintProperty fixture = null;
+
+ /**
+ * Constructs a new Constraint Property test case with the given name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ConstraintPropertyTest(String name) {
+ super(name);
+ }
+
+ /**
+ * Returns the fixture for this Constraint Property test case.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ protected ConstraintProperty getFixture() {
+ return fixture;
+ }
+
+ /**
+ * Sets the fixture for this Constraint Property test case.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ protected void setFixture(ConstraintProperty fixture) {
+ this.fixture = fixture;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#setUp()
+ * @generated
+ */
+ @Override
+ protected void setUp() throws Exception {
+ setFixture(ConstraintsFactory.eINSTANCE.createConstraintProperty());
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#tearDown()
+ * @generated
+ */
+ @Override
+ protected void tearDown() throws Exception {
+ setFixture(null);
+ }
+
+} // ConstraintPropertyTest
diff --git a/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/constraints/tests/ConstraintsTests.java b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/constraints/tests/ConstraintsTests.java
new file mode 100755
index 0000000..6192371
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/constraints/tests/ConstraintsTests.java
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.constraints.tests;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+
+/**
+ * <!-- begin-user-doc --> A test suite for the '<em><b>constraints</b></em>' package. <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+public class ConstraintsTests extends TestSuite {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static void main(String[] args) {
+ TestRunner.run(suite());
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static Test suite() {
+ TestSuite suite = new ConstraintsTests("constraints Tests");
+ return suite;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ConstraintsTests(String name) {
+ super(name);
+ }
+
+} // ConstraintsTests
diff --git a/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/interactions/tests/InteractionsTests.java b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/interactions/tests/InteractionsTests.java
new file mode 100755
index 0000000..45d0d8f
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/interactions/tests/InteractionsTests.java
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.interactions.tests;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+
+/**
+ * <!-- begin-user-doc --> A test suite for the '<em><b>interactions</b></em>' package. <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+public class InteractionsTests extends TestSuite {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static void main(String[] args) {
+ TestRunner.run(suite());
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static Test suite() {
+ TestSuite suite = new InteractionsTests("interactions Tests");
+ return suite;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public InteractionsTests(String name) {
+ super(name);
+ }
+
+} // InteractionsTests
diff --git a/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/modelelements/tests/ConformTest.java b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/modelelements/tests/ConformTest.java
new file mode 100755
index 0000000..e4c2165
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/modelelements/tests/ConformTest.java
@@ -0,0 +1,102 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelelements.tests;
+
+import junit.framework.TestCase;
+import junit.textui.TestRunner;
+
+import org.eclipse.papyrus.sysml.modelelements.Conform;
+import org.eclipse.papyrus.sysml.modelelements.ModelelementsFactory;
+import org.junit.Ignore;
+
+/**
+ * <!-- begin-user-doc --> A test case for the model object '<em><b>Conform</b></em>'. <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+@Ignore("no tests")
+public class ConformTest extends TestCase {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static void main(String[] args) {
+ TestRunner.run(ConformTest.class);
+ }
+
+ /**
+ * The fixture for this Conform test case.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected Conform fixture = null;
+
+ /**
+ * Constructs a new Conform test case with the given name.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public ConformTest(String name) {
+ super(name);
+ }
+
+ /**
+ * Returns the fixture for this Conform test case.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected Conform getFixture() {
+ return fixture;
+ }
+
+ /**
+ * Sets the fixture for this Conform test case.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void setFixture(Conform fixture) {
+ this.fixture = fixture;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#setUp()
+ * @generated
+ */
+ @Override
+ protected void setUp() throws Exception {
+ setFixture(ModelelementsFactory.eINSTANCE.createConform());
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#tearDown()
+ * @generated
+ */
+ @Override
+ protected void tearDown() throws Exception {
+ setFixture(null);
+ }
+
+} // ConformTest
diff --git a/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/modelelements/tests/ModelelementsTests.java b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/modelelements/tests/ModelelementsTests.java
new file mode 100755
index 0000000..82c0da6
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/modelelements/tests/ModelelementsTests.java
@@ -0,0 +1,29 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelelements.tests;
+
+import org.junit.runner.RunWith;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.junit.runners.Suite.SuiteClasses;
+
+/**
+ * A test suite for the '<em><b>modelelements</b></em>' package.
+ */
+@RunWith(ClassificationSuite.class)
+@SuiteClasses({ ViewTest.class
+// ProblemTest.class, RationaleTest.class, ViewPointTest.class
+})
+public class ModelelementsTests {
+ // ModelelementsTests
+}
diff --git a/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/modelelements/tests/ProblemTest.java b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/modelelements/tests/ProblemTest.java
new file mode 100755
index 0000000..0d90fd1
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/modelelements/tests/ProblemTest.java
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelelements.tests;
+
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.sysml.modelelements.ModelelementsFactory;
+import org.eclipse.papyrus.sysml.modelelements.Problem;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+
+/**
+ * <!-- begin-user-doc --> A test case for the model object '<em><b>Problem</b></em>'. <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+@Ignore("no tests")
+public class ProblemTest extends AbstractPapyrusTest {
+
+ /**
+ * The fixture for this Problem test case.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected Problem fixture = null;
+
+ /**
+ * Returns the fixture for this Problem test case.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected Problem getFixture() {
+ return fixture;
+ }
+
+ /**
+ * Sets the fixture for this Problem test case.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void setFixture(Problem fixture) {
+ this.fixture = fixture;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#setUp()
+ * @generated
+ */
+ @Before
+ public void setUp() throws Exception {
+ setFixture(ModelelementsFactory.eINSTANCE.createProblem());
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#tearDown()
+ * @generated
+ */
+ @After
+ public void tearDown() throws Exception {
+ setFixture(null);
+ }
+
+} // ProblemTest
diff --git a/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/modelelements/tests/RationaleTest.java b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/modelelements/tests/RationaleTest.java
new file mode 100755
index 0000000..cc02479
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/modelelements/tests/RationaleTest.java
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelelements.tests;
+
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.sysml.modelelements.ModelelementsFactory;
+import org.eclipse.papyrus.sysml.modelelements.Rationale;
+import org.junit.After;
+import org.junit.Ignore;
+
+/**
+ * <!-- begin-user-doc --> A test case for the model object '<em><b>Rationale</b></em>'. <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+@Ignore("no tests")
+public class RationaleTest extends AbstractPapyrusTest {
+
+ /**
+ * The fixture for this Rationale test case.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected Rationale fixture = null;
+
+ /**
+ * Returns the fixture for this Rationale test case. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ protected Rationale getFixture() {
+ return fixture;
+ }
+
+ /**
+ * Sets the fixture for this Rationale test case.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void setFixture(Rationale fixture) {
+ this.fixture = fixture;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#setUp()
+ * @generated
+ */
+ @After
+ public void setUp() throws Exception {
+ setFixture(ModelelementsFactory.eINSTANCE.createRationale());
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#tearDown()
+ * @generated
+ */
+ @After
+ public void tearDown() throws Exception {
+ setFixture(null);
+ }
+
+} // RationaleTest
diff --git a/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/modelelements/tests/ViewPointTest.java b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/modelelements/tests/ViewPointTest.java
new file mode 100755
index 0000000..5e65d32
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/modelelements/tests/ViewPointTest.java
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelelements.tests;
+
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.sysml.modelelements.ModelelementsFactory;
+import org.eclipse.papyrus.sysml.modelelements.ViewPoint;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+
+/**
+ * <!-- begin-user-doc --> A test case for the model object '<em><b>View Point</b></em>'. <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+@Ignore("no tests")
+public class ViewPointTest extends AbstractPapyrusTest {
+
+ /**
+ * The fixture for this View Point test case.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ViewPoint fixture = null;
+
+ /**
+ * Returns the fixture for this View Point test case. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ protected ViewPoint getFixture() {
+ return fixture;
+ }
+
+ /**
+ * Sets the fixture for this View Point test case.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void setFixture(ViewPoint fixture) {
+ this.fixture = fixture;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#setUp()
+ * @generated
+ */
+ @Before
+ public void setUp() throws Exception {
+ setFixture(ModelelementsFactory.eINSTANCE.createViewPoint());
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#tearDown()
+ * @generated
+ */
+ @After
+ public void tearDown() throws Exception {
+ setFixture(null);
+ }
+
+} // ViewPointTest
diff --git a/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/modelelements/tests/ViewTest.java b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/modelelements/tests/ViewTest.java
new file mode 100755
index 0000000..f1f664e
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/modelelements/tests/ViewTest.java
@@ -0,0 +1,167 @@
+/*****************************************************************************
+ * Copyright (c) 2009, 2014 CEA LIST and others.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 422257
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.modelelements.tests;
+
+import static org.junit.Assert.fail;
+
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.HouseKeeper;
+import org.eclipse.papyrus.sysml.modelelements.ModelelementsFactory;
+import org.eclipse.papyrus.sysml.modelelements.ModelelementsPackage;
+import org.eclipse.papyrus.sysml.modelelements.View;
+import org.eclipse.papyrus.sysml.modelelements.ViewPoint;
+import org.eclipse.papyrus.sysml.utils.SysMLTestResources;
+import org.eclipse.uml2.uml.Abstraction;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.util.UMLUtil.StereotypeApplicationHelper;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+/**
+ * <!-- begin-user-doc --> A test case for the model object '<em><b>View</b></em>'. <!--
+ * end-user-doc -->
+ * <p>
+ * The following features are tested:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.modelelements.View#getViewPoint() <em>View Point</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ViewTest extends AbstractPapyrusTest {
+
+ @Rule
+ public final HouseKeeper houseKeeper = new HouseKeeper();
+
+ protected View fixture = null;
+
+ protected Package p0 = null;
+
+ protected Package p1 = null;
+
+ protected Class c1 = null;
+
+ protected ViewPoint vp1 = null;
+
+ protected View v0 = null;
+
+ protected View v1 = null;
+
+ protected Model model = null;
+
+ /**
+ * Returns the fixture for this View test case.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected View getFixture() {
+ return fixture;
+ }
+
+ /**
+ * Sets the fixture for this View test case.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void setFixture(View fixture) {
+ this.fixture = fixture;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#setUp()
+ * @generated NOT
+ */
+ @Before
+ public void setUp() throws Exception {
+ setFixture(ModelelementsFactory.eINSTANCE.createView());
+
+ // Prepare test
+ model = SysMLTestResources.createSysMLModel(houseKeeper.createResourceSet());
+ if(model == null) {
+ fail();
+ }
+
+ if(model.getAppliedProfiles().isEmpty()) {
+ fail();
+ }
+
+ // Create packages
+ p0 = model.createNestedPackage("p0");
+ p1 = model.createNestedPackage("p1");
+
+ // Create classes
+ c1 = model.createOwnedClass("c1", false);
+
+ // Add View stereotype
+
+ v0 = (View)StereotypeApplicationHelper.getInstance(null).applyStereotype(p0, ModelelementsPackage.eINSTANCE.getView());
+ v1 = (View)StereotypeApplicationHelper.getInstance(null).applyStereotype(p1, ModelelementsPackage.eINSTANCE.getView());
+
+ // Add ViewPoint stereotype
+ vp1 = (ViewPoint)StereotypeApplicationHelper.getInstance(null).applyStereotype(c1, ModelelementsPackage.eINSTANCE.getViewPoint());
+
+ // Add Abstractions with allocate stereotype
+ // v1 (p1) -> vp1 (c1)
+ Abstraction v1_vp1 = UMLFactory.eINSTANCE.createAbstraction();
+ v1_vp1.getClients().add(p1);
+ v1_vp1.getSuppliers().add(c1);
+ model.getPackagedElements().add(v1_vp1);
+
+ StereotypeApplicationHelper.getInstance(null).applyStereotype(v1_vp1, ModelelementsPackage.eINSTANCE.getConform());
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#tearDown()
+ * @generated
+ */
+ @After
+ public void tearDown() throws Exception {
+ setFixture(null);
+ }
+
+ /**
+ * Tests the '{@link org.eclipse.papyrus.sysml.modelelements.View#getViewPoint()
+ * <em>View Point</em>}' feature getter. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.modelelements.View#getViewPoint()
+ * @generated NOT
+ */
+ @Test
+ public void testGetViewPoint() {
+
+ // Verifies : v0.getViewPoint = []
+ if(v0.getViewPoint() != null) {
+ fail();
+ }
+
+ // Verifies : v1.getViewPoint = vp1
+ if(!v1.getViewPoint().equals(vp1)) {
+ fail();
+ }
+ }
+
+} // ViewTest
diff --git a/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/portandflows/tests/FlowPortTest.java b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/portandflows/tests/FlowPortTest.java
new file mode 100755
index 0000000..0ecffb1
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/portandflows/tests/FlowPortTest.java
@@ -0,0 +1,218 @@
+/*****************************************************************************
+ * Copyright (c) 2009, 2014 CEA LIST and others.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 422257
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.portandflows.tests;
+
+import static org.junit.Assert.fail;
+
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.HouseKeeper;
+import org.eclipse.papyrus.sysml.portandflows.FlowDirection;
+import org.eclipse.papyrus.sysml.portandflows.FlowPort;
+import org.eclipse.papyrus.sysml.portandflows.FlowSpecification;
+import org.eclipse.papyrus.sysml.portandflows.PortandflowsFactory;
+import org.eclipse.papyrus.sysml.portandflows.PortandflowsPackage;
+import org.eclipse.papyrus.sysml.utils.SysMLTestResources;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.Image;
+import org.eclipse.uml2.uml.Interface;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.Port;
+import org.eclipse.uml2.uml.PrimitiveType;
+import org.eclipse.uml2.uml.Stereotype;
+import org.eclipse.uml2.uml.util.UMLUtil;
+import org.eclipse.uml2.uml.util.UMLUtil.StereotypeApplicationHelper;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+/**
+ * <!-- begin-user-doc --> A test case for the model object '<em><b>Flow Port</b></em>'. <!--
+ * end-user-doc -->
+ * <p>
+ * The following features are tested:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.portandflows.FlowPort#isAtomic() <em>Is Atomic</em>}</li>
+ * </ul>
+ * </p>
+ * <p>
+ * The following operations are tested:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.portandflows.FlowPort#getIcon() <em>Get Icon</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class FlowPortTest extends AbstractPapyrusTest {
+
+ @Rule
+ public final HouseKeeper houseKeeper = new HouseKeeper();
+
+ protected FlowPort fixture = null;
+
+ protected Class c0 = null;
+
+ protected Interface i2 = null;
+
+ protected Port p0 = null;
+
+ protected Port p1 = null;
+
+ protected Port p2 = null;
+
+ protected FlowPort fp0 = null;
+
+ protected FlowPort fp1 = null;
+
+ protected FlowPort fp2 = null;
+
+ protected FlowSpecification fsp2 = null;
+
+ protected Model model = null;
+
+ /**
+ * Returns the fixture for this Flow Port test case. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ protected FlowPort getFixture() {
+ return fixture;
+ }
+
+ /**
+ * Sets the fixture for this Flow Port test case.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void setFixture(FlowPort fixture) {
+ this.fixture = fixture;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#setUp()
+ * @generated NOT
+ */
+ @Before
+ public void setUp() throws Exception {
+ setFixture(PortandflowsFactory.eINSTANCE.createFlowPort());
+
+ // Prepare test
+ model = SysMLTestResources.createSysMLModel(houseKeeper.createResourceSet());
+ if(model == null) {
+ fail();
+ }
+
+ if(model.getAppliedProfiles().isEmpty()) {
+ fail();
+ }
+
+ // Create classes & interface
+ c0 = model.createOwnedClass("c0", false);
+ i2 = model.createOwnedInterface("i2");
+
+ // Create type
+ PrimitiveType ptype = model.createOwnedPrimitiveType("type");
+
+ // Create ports
+ p0 = c0.createOwnedPort("p0", null);
+ p1 = c0.createOwnedPort("p1", ptype);
+ p2 = c0.createOwnedPort("p2", i2);
+
+ // Add FlowPort stereotypes
+ fp0 = (FlowPort)StereotypeApplicationHelper.getInstance(null).applyStereotype(p0, PortandflowsPackage.eINSTANCE.getFlowPort());
+ fp1 = (FlowPort)StereotypeApplicationHelper.getInstance(null).applyStereotype(p1, PortandflowsPackage.eINSTANCE.getFlowPort());
+ fp1.setDirection(FlowDirection.OUT);
+ fp2 = (FlowPort)StereotypeApplicationHelper.getInstance(null).applyStereotype(p2, PortandflowsPackage.eINSTANCE.getFlowPort());
+ fp2.setDirection(FlowDirection.IN);
+ fp2.setIsConjugated(true);
+
+ // Add FlowSpecification
+ fsp2 = (FlowSpecification)StereotypeApplicationHelper.getInstance(null).applyStereotype(i2, PortandflowsPackage.eINSTANCE.getFlowSpecification());
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#tearDown()
+ * @generated
+ */
+ @After
+ public void tearDown() throws Exception {
+ setFixture(null);
+ }
+
+ /**
+ * Tests the '{@link org.eclipse.papyrus.sysml.portandflows.FlowPort#isAtomic() <em>Is Atomic</em>}' feature getter.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.portandflows.FlowPort#isAtomic()
+ * @generated NOT
+ */
+ @Test
+ public void testIsAtomic() {
+ // FlowPort without type is Atomic
+ if(!fp0.isAtomic()) {
+ fail();
+ }
+
+ // FlowPort type is not a FlowSpecification
+ if(!fp1.isAtomic()) {
+ fail();
+ }
+
+ // FlowPort type is a FlowSpecification
+ if(fp2.isAtomic()) {
+ fail();
+ }
+ }
+
+ /**
+ * Tests the '{@link org.eclipse.papyrus.sysml.portandflows.FlowPort#getIcon()
+ * <em>Get Icon</em>}' operation. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.portandflows.FlowPort#getIcon()
+ * @generated NOT
+ */
+ @Test
+ public void testGetIcon() {
+
+ // Retrieve Stereotype
+ Stereotype s = UMLUtil.getStereotype(fp0);
+
+ //Image i0 = s.getIcons().get(1); // IN
+ Image i1 = s.getIcons().get(2); // OUT
+ Image i2 = s.getIcons().get(3); // INOUT
+ Image i3 = s.getIcons().get(4); // NA
+
+ if(!fp0.getIcon().equals(i2)) { // fp0 is INOUT
+ fail();
+ }
+
+ if(!fp1.getIcon().equals(i1)) { // fp1 is OUT
+ fail();
+ }
+
+ if(!fp2.getIcon().equals(i3)) { // fp2 is atomic
+ fail();
+ }
+ }
+
+} // FlowPortTest
diff --git a/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/portandflows/tests/FlowPropertyTest.java b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/portandflows/tests/FlowPropertyTest.java
new file mode 100755
index 0000000..b362a33
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/portandflows/tests/FlowPropertyTest.java
@@ -0,0 +1,174 @@
+/*****************************************************************************
+ * Copyright (c) 2009, 2014 CEA LIST and others.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 422257
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.portandflows.tests;
+
+import static org.junit.Assert.fail;
+
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.HouseKeeper;
+import org.eclipse.papyrus.sysml.portandflows.FlowDirection;
+import org.eclipse.papyrus.sysml.portandflows.FlowProperty;
+import org.eclipse.papyrus.sysml.portandflows.PortandflowsFactory;
+import org.eclipse.papyrus.sysml.portandflows.PortandflowsPackage;
+import org.eclipse.papyrus.sysml.utils.SysMLTestResources;
+import org.eclipse.uml2.uml.Image;
+import org.eclipse.uml2.uml.Interface;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Stereotype;
+import org.eclipse.uml2.uml.util.UMLUtil;
+import org.eclipse.uml2.uml.util.UMLUtil.StereotypeApplicationHelper;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+/**
+ * <!-- begin-user-doc --> A test case for the model object '<em><b>Flow Property</b></em>'. <!--
+ * end-user-doc -->
+ * <p>
+ * The following operations are tested:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.portandflows.FlowProperty#getIcon() <em>Get Icon</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class FlowPropertyTest extends AbstractPapyrusTest {
+
+ @Rule
+ public final HouseKeeper houseKeeper = new HouseKeeper();
+
+ /**
+ * The fixture for this Flow Property test case. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ protected FlowProperty fixture = null;
+
+ protected Interface i = null;
+
+ protected FlowProperty fp0 = null;
+
+ protected FlowProperty fp1 = null;
+
+ protected FlowProperty fp2 = null;
+
+ protected Model model = null;
+
+ /**
+ * Returns the fixture for this Flow Property test case.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ protected FlowProperty getFixture() {
+ return fixture;
+ }
+
+ /**
+ * Sets the fixture for this Flow Property test case. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ protected void setFixture(FlowProperty fixture) {
+ this.fixture = fixture;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#setUp()
+ * @generated NOT
+ */
+ @Before
+ public void setUp() throws Exception {
+ setFixture(PortandflowsFactory.eINSTANCE.createFlowProperty());
+
+ // Prepare test
+ model = SysMLTestResources.createSysMLModel(houseKeeper.createResourceSet());
+ if(model == null) {
+ fail();
+ }
+
+ if(model.getAppliedProfiles().isEmpty()) {
+ fail();
+ }
+
+ // Create interface
+ i = model.createOwnedInterface("i");
+
+ // Create properties
+ Property p0 = i.createOwnedAttribute("p0", null);
+ Property p1 = i.createOwnedAttribute("p1", null);
+ Property p2 = i.createOwnedAttribute("p2", null);
+
+ // Add FlowPort stereotypes
+ fp0 = (FlowProperty)StereotypeApplicationHelper.getInstance(null).applyStereotype(p0, PortandflowsPackage.eINSTANCE.getFlowProperty());
+ fp0.setDirection(FlowDirection.IN);
+
+ fp1 = (FlowProperty)StereotypeApplicationHelper.getInstance(null).applyStereotype(p1, PortandflowsPackage.eINSTANCE.getFlowProperty());
+ fp1.setDirection(FlowDirection.OUT);
+
+ fp2 = (FlowProperty)StereotypeApplicationHelper.getInstance(null).applyStereotype(p2, PortandflowsPackage.eINSTANCE.getFlowProperty());
+ fp2.setDirection(FlowDirection.INOUT);
+
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#tearDown()
+ * @generated
+ */
+ @After
+ public void tearDown() throws Exception {
+ setFixture(null);
+ }
+
+ /**
+ * Tests the '{@link org.eclipse.papyrus.sysml.portandflows.FlowProperty#getIcon()
+ * <em>Get Icon</em>}' operation. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.portandflows.FlowProperty#getIcon()
+ * @generated NOT
+ */
+ @Test
+ public void testGetIcon() {
+
+ // Retrieve Stereotype
+ Stereotype s = UMLUtil.getStereotype(fp0);
+
+ Image i0 = s.getIcons().get(1); // IN
+ Image i1 = s.getIcons().get(2); // OUT
+ Image i2 = s.getIcons().get(3); // INOUT
+
+ if(!fp0.getIcon().equals(i0)) {
+ fail();
+ }
+
+ if(!fp1.getIcon().equals(i1)) {
+ fail();
+ }
+
+ if(!fp2.getIcon().equals(i2)) {
+ fail();
+ }
+ }
+
+} // FlowPropertyTest
diff --git a/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/portandflows/tests/FlowSpecificationTest.java b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/portandflows/tests/FlowSpecificationTest.java
new file mode 100755
index 0000000..653d5ed
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/portandflows/tests/FlowSpecificationTest.java
@@ -0,0 +1,104 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.portandflows.tests;
+
+import junit.framework.TestCase;
+import junit.textui.TestRunner;
+
+import org.eclipse.papyrus.sysml.portandflows.FlowSpecification;
+import org.eclipse.papyrus.sysml.portandflows.PortandflowsFactory;
+import org.junit.Ignore;
+
+/**
+ * <!-- begin-user-doc --> A test case for the model object '<em><b>Flow Specification</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+@Ignore("no tests")
+public class FlowSpecificationTest extends TestCase {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static void main(String[] args) {
+ TestRunner.run(FlowSpecificationTest.class);
+ }
+
+ /**
+ * The fixture for this Flow Specification test case. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ protected FlowSpecification fixture = null;
+
+ /**
+ * Constructs a new Flow Specification test case with the given name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public FlowSpecificationTest(String name) {
+ super(name);
+ }
+
+ /**
+ * Returns the fixture for this Flow Specification test case.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ protected FlowSpecification getFixture() {
+ return fixture;
+ }
+
+ /**
+ * Sets the fixture for this Flow Specification test case.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ protected void setFixture(FlowSpecification fixture) {
+ this.fixture = fixture;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#setUp()
+ * @generated
+ */
+ @Override
+ protected void setUp() throws Exception {
+ setFixture(PortandflowsFactory.eINSTANCE.createFlowSpecification());
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#tearDown()
+ * @generated
+ */
+ @Override
+ protected void tearDown() throws Exception {
+ setFixture(null);
+ }
+
+} // FlowSpecificationTest
diff --git a/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/portandflows/tests/ItemFlowTest.java b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/portandflows/tests/ItemFlowTest.java
new file mode 100755
index 0000000..be66908
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/portandflows/tests/ItemFlowTest.java
@@ -0,0 +1,102 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.portandflows.tests;
+
+import junit.framework.TestCase;
+import junit.textui.TestRunner;
+
+import org.eclipse.papyrus.sysml.portandflows.ItemFlow;
+import org.eclipse.papyrus.sysml.portandflows.PortandflowsFactory;
+import org.junit.Ignore;
+
+/**
+ * <!-- begin-user-doc --> A test case for the model object '<em><b>Item Flow</b></em>'. <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+@Ignore("no tests")
+public class ItemFlowTest extends TestCase {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static void main(String[] args) {
+ TestRunner.run(ItemFlowTest.class);
+ }
+
+ /**
+ * The fixture for this Item Flow test case.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ItemFlow fixture = null;
+
+ /**
+ * Constructs a new Item Flow test case with the given name.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public ItemFlowTest(String name) {
+ super(name);
+ }
+
+ /**
+ * Returns the fixture for this Item Flow test case. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ protected ItemFlow getFixture() {
+ return fixture;
+ }
+
+ /**
+ * Sets the fixture for this Item Flow test case.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void setFixture(ItemFlow fixture) {
+ this.fixture = fixture;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#setUp()
+ * @generated
+ */
+ @Override
+ protected void setUp() throws Exception {
+ setFixture(PortandflowsFactory.eINSTANCE.createItemFlow());
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#tearDown()
+ * @generated
+ */
+ @Override
+ protected void tearDown() throws Exception {
+ setFixture(null);
+ }
+
+} // ItemFlowTest
diff --git a/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/portandflows/tests/PortandflowsTests.java b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/portandflows/tests/PortandflowsTests.java
new file mode 100755
index 0000000..8ac93be
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/portandflows/tests/PortandflowsTests.java
@@ -0,0 +1,32 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.portandflows.tests;
+
+import junit.framework.TestSuite;
+
+import org.junit.runner.RunWith;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.junit.runners.Suite.SuiteClasses;
+
+/**
+ * <!-- begin-user-doc --> A test suite for the '<em><b>portandflows</b></em>' package. <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+@RunWith(ClassificationSuite.class)
+@SuiteClasses({ FlowPortTest.class, FlowPropertyTest.class })
+public class PortandflowsTests extends TestSuite {
+ // PortandflowsTests
+}
diff --git a/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/requirements/tests/CopyTest.java b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/requirements/tests/CopyTest.java
new file mode 100755
index 0000000..dd0dfa3
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/requirements/tests/CopyTest.java
@@ -0,0 +1,102 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.requirements.tests;
+
+import junit.framework.TestCase;
+import junit.textui.TestRunner;
+
+import org.eclipse.papyrus.sysml.requirements.Copy;
+import org.eclipse.papyrus.sysml.requirements.RequirementsFactory;
+import org.junit.Ignore;
+
+/**
+ * <!-- begin-user-doc --> A test case for the model object '<em><b>Copy</b></em>'. <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+@Ignore("no tests")
+public class CopyTest extends TestCase {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static void main(String[] args) {
+ TestRunner.run(CopyTest.class);
+ }
+
+ /**
+ * The fixture for this Copy test case.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected Copy fixture = null;
+
+ /**
+ * Constructs a new Copy test case with the given name.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public CopyTest(String name) {
+ super(name);
+ }
+
+ /**
+ * Returns the fixture for this Copy test case.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected Copy getFixture() {
+ return fixture;
+ }
+
+ /**
+ * Sets the fixture for this Copy test case.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void setFixture(Copy fixture) {
+ this.fixture = fixture;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#setUp()
+ * @generated
+ */
+ @Override
+ protected void setUp() throws Exception {
+ setFixture(RequirementsFactory.eINSTANCE.createCopy());
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#tearDown()
+ * @generated
+ */
+ @Override
+ protected void tearDown() throws Exception {
+ setFixture(null);
+ }
+
+} // CopyTest
diff --git a/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/requirements/tests/DeriveReqtTest.java b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/requirements/tests/DeriveReqtTest.java
new file mode 100755
index 0000000..09b6a4e
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/requirements/tests/DeriveReqtTest.java
@@ -0,0 +1,102 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.requirements.tests;
+
+import junit.framework.TestCase;
+import junit.textui.TestRunner;
+
+import org.eclipse.papyrus.sysml.requirements.DeriveReqt;
+import org.eclipse.papyrus.sysml.requirements.RequirementsFactory;
+import org.junit.Ignore;
+
+/**
+ * <!-- begin-user-doc --> A test case for the model object '<em><b>Derive Reqt</b></em>'. <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+@Ignore("no tests")
+public class DeriveReqtTest extends TestCase {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static void main(String[] args) {
+ TestRunner.run(DeriveReqtTest.class);
+ }
+
+ /**
+ * The fixture for this Derive Reqt test case.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected DeriveReqt fixture = null;
+
+ /**
+ * Constructs a new Derive Reqt test case with the given name.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public DeriveReqtTest(String name) {
+ super(name);
+ }
+
+ /**
+ * Returns the fixture for this Derive Reqt test case. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ protected DeriveReqt getFixture() {
+ return fixture;
+ }
+
+ /**
+ * Sets the fixture for this Derive Reqt test case. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ protected void setFixture(DeriveReqt fixture) {
+ this.fixture = fixture;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#setUp()
+ * @generated
+ */
+ @Override
+ protected void setUp() throws Exception {
+ setFixture(RequirementsFactory.eINSTANCE.createDeriveReqt());
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#tearDown()
+ * @generated
+ */
+ @Override
+ protected void tearDown() throws Exception {
+ setFixture(null);
+ }
+
+} // DeriveReqtTest
diff --git a/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/requirements/tests/RequirementRelatedTest.java b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/requirements/tests/RequirementRelatedTest.java
new file mode 100755
index 0000000..db86516
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/requirements/tests/RequirementRelatedTest.java
@@ -0,0 +1,404 @@
+/*****************************************************************************
+ * Copyright (c) 2009, 2014 CEA LIST and others.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 422257
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.requirements.tests;
+
+import static org.junit.Assert.fail;
+
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.HouseKeeper;
+import org.eclipse.papyrus.sysml.requirements.Requirement;
+import org.eclipse.papyrus.sysml.requirements.RequirementRelated;
+import org.eclipse.papyrus.sysml.requirements.RequirementsFactory;
+import org.eclipse.papyrus.sysml.requirements.RequirementsPackage;
+import org.eclipse.papyrus.sysml.utils.SysMLTestResources;
+import org.eclipse.uml2.uml.Abstraction;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.Realization;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.profile.standard.StandardPackage;
+import org.eclipse.uml2.uml.util.UMLUtil.StereotypeApplicationHelper;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+/**
+ * <!-- begin-user-doc --> A test case for the model object '<em><b>Requirement Related</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are tested:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.requirements.RequirementRelated#getTracedFrom() <em>Traced From</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.requirements.RequirementRelated#getSatisfies() <em>Satisfies</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.requirements.RequirementRelated#getRefines() <em>Refines</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.requirements.RequirementRelated#getVerifies() <em>Verifies</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class RequirementRelatedTest extends AbstractPapyrusTest {
+
+ @Rule
+ public final HouseKeeper houseKeeper = new HouseKeeper();
+
+ protected RequirementRelated fixture = null;
+
+ protected RequirementRelated default_reqR = null;
+
+ protected Model model = null;
+
+ // ////////////////////////////////////////////////////////////////////
+
+ protected Class copy = null;
+
+ protected Class master = null;
+
+ protected Requirement copy_req = null;
+
+ protected Requirement master_req = null;
+
+ protected RequirementRelated copy_reqR = null;
+
+ protected Requirement trace1_req = null;
+
+ protected Requirement trace2_req = null;
+
+ protected RequirementRelated traced_reqR = null;
+
+ // ////////////////////////////////////////////////////////////////////
+ // ////////////////////////////////////////////////////////////////////
+ protected Requirement satisfied1_req = null;
+
+ protected Requirement satisfied2_req = null;
+
+ protected RequirementRelated satisfying_reqR = null;
+
+ // ////////////////////////////////////////////////////////////////////
+ // ////////////////////////////////////////////////////////////////////
+ protected Requirement verified1_req = null;
+
+ protected Requirement verified2_req = null;
+
+ protected RequirementRelated verifying_reqR = null;
+
+ // ////////////////////////////////////////////////////////////////////
+ // ////////////////////////////////////////////////////////////////////
+ protected Requirement refined1_req = null;
+
+ protected Requirement refined2_req = null;
+
+ protected RequirementRelated refining_reqR = null;
+
+ // ////////////////////////////////////////////////////////////////////
+
+ /**
+ * Returns the fixture for this Requirement Related test case.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ protected RequirementRelated getFixture() {
+ return fixture;
+ }
+
+ /**
+ * Sets the fixture for this Requirement Related test case.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ protected void setFixture(RequirementRelated fixture) {
+ this.fixture = fixture;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#setUp()
+ * @generated NOT
+ */
+ @Before
+ public void setUp() throws Exception {
+ setFixture(RequirementsFactory.eINSTANCE.createRequirementRelated());
+
+ // Prepare test
+ model = SysMLTestResources.createSysMLModel(houseKeeper.createResourceSet());
+ if(model == null) {
+ fail();
+ }
+
+ if(model.getAppliedProfiles().isEmpty()) {
+ fail();
+ }
+
+ // Create classes & interface
+ Class defaultClass = model.createOwnedClass("defaultClass", false);
+
+ // Add Requirement stereotypes
+ default_reqR = (RequirementRelated)StereotypeApplicationHelper.getInstance(null).applyStereotype(defaultClass, RequirementsPackage.eINSTANCE.getRequirementRelated());
+
+ // ////////////////////////////////////////////////////////////////////
+ // Prepare getTracedFrom test elements
+ // ////////////////////////////////////////////////////////////////////
+
+ Class traced = model.createOwnedClass("traced", false);
+ traced_reqR = (RequirementRelated)StereotypeApplicationHelper.getInstance(null).applyStereotype(traced, RequirementsPackage.eINSTANCE.getRequirementRelated());
+
+ Class trace1 = model.createOwnedClass("trace1", false);
+ trace1_req = (Requirement)StereotypeApplicationHelper.getInstance(null).applyStereotype(trace1, RequirementsPackage.eINSTANCE.getRequirement());
+
+ Class trace2 = model.createOwnedClass("trace2", false);
+ trace2_req = (Requirement)StereotypeApplicationHelper.getInstance(null).applyStereotype(trace2, RequirementsPackage.eINSTANCE.getRequirement());
+
+ // Add "Trace" (Abstraction)
+ // trace1, trace2 -> traced
+ Abstraction t11 = UMLFactory.eINSTANCE.createAbstraction();
+ t11.getClients().add(traced);
+ t11.getSuppliers().add(trace1);
+ model.getPackagedElements().add(t11);
+ StereotypeApplicationHelper.getInstance(null).applyStereotype(t11, StandardPackage.eINSTANCE.getTrace());
+
+ Abstraction t12 = UMLFactory.eINSTANCE.createAbstraction();
+ t12.getClients().add(traced);
+ t12.getSuppliers().add(trace2);
+ model.getPackagedElements().add(t12);
+ StereotypeApplicationHelper.getInstance(null).applyStereotype(t12, StandardPackage.eINSTANCE.getTrace());
+
+ master = model.createOwnedClass("master", false);
+ master_req = (Requirement)StereotypeApplicationHelper.getInstance(null).applyStereotype(master, RequirementsPackage.eINSTANCE.getRequirement());
+
+ copy = model.createOwnedClass("copy", false);
+ copy_req = (Requirement)StereotypeApplicationHelper.getInstance(null).applyStereotype(copy, RequirementsPackage.eINSTANCE.getRequirement());
+ copy_reqR = (RequirementRelated)StereotypeApplicationHelper.getInstance(null).applyStereotype(copy, RequirementsPackage.eINSTANCE.getRequirementRelated());
+
+ // Add "copy" (Abstraction) between master and copy
+ // copy -> master
+ Abstraction c_m = UMLFactory.eINSTANCE.createAbstraction();
+ c_m.getClients().add(copy);
+ c_m.getSuppliers().add(master);
+ model.getPackagedElements().add(c_m);
+ StereotypeApplicationHelper.getInstance(null).applyStereotype(c_m, RequirementsPackage.eINSTANCE.getCopy());
+
+
+ // ////////////////////////////////////////////////////////////////////
+
+ // ////////////////////////////////////////////////////////////////////
+ // Prepare getSatisfies() test elements
+ // ////////////////////////////////////////////////////////////////////
+
+ Class satisfying = model.createOwnedClass("satisfying", false);
+ satisfying_reqR = (RequirementRelated)StereotypeApplicationHelper.getInstance(null).applyStereotype(satisfying, RequirementsPackage.eINSTANCE.getRequirementRelated());
+
+ Class satisfied1 = model.createOwnedClass("satisfied1", false);
+ satisfied1_req = (Requirement)StereotypeApplicationHelper.getInstance(null).applyStereotype(satisfied1, RequirementsPackage.eINSTANCE.getRequirement());
+
+ Class satisfied2 = model.createOwnedClass("satisfied2", false);
+ satisfied2_req = (Requirement)StereotypeApplicationHelper.getInstance(null).applyStereotype(satisfied2, RequirementsPackage.eINSTANCE.getRequirement());
+
+ // Add "Satisfy" (Realization)
+ // satisfying_reqR -> satisfied1_req, satisfied2_req
+ Realization s1 = UMLFactory.eINSTANCE.createRealization();
+ s1.getClients().add(satisfying);
+ s1.getSuppliers().add(satisfied1);
+ model.getPackagedElements().add(s1);
+ StereotypeApplicationHelper.getInstance(null).applyStereotype(s1, RequirementsPackage.eINSTANCE.getSatisfy());
+
+
+ Realization s2 = UMLFactory.eINSTANCE.createRealization();
+ s2.getClients().add(satisfying);
+ s2.getSuppliers().add(satisfied2);
+ model.getPackagedElements().add(s2);
+ StereotypeApplicationHelper.getInstance(null).applyStereotype(s2, RequirementsPackage.eINSTANCE.getSatisfy());
+
+ // ////////////////////////////////////////////////////////////////////
+
+ // ////////////////////////////////////////////////////////////////////
+ // Prepare getVerifies() test elements
+ // ////////////////////////////////////////////////////////////////////
+
+ Class verifying = model.createOwnedClass("verifying", false);
+ verifying_reqR = (RequirementRelated)StereotypeApplicationHelper.getInstance(null).applyStereotype(verifying, RequirementsPackage.eINSTANCE.getRequirementRelated());
+
+ Class verified1 = model.createOwnedClass("verified1", false);
+ verified1_req = (Requirement)StereotypeApplicationHelper.getInstance(null).applyStereotype(verified1, RequirementsPackage.eINSTANCE.getRequirement());
+ Class verified2 = model.createOwnedClass("verified2", false);
+ verified2_req = (Requirement)StereotypeApplicationHelper.getInstance(null).applyStereotype(verified2, RequirementsPackage.eINSTANCE.getRequirement());
+
+ // Add "Verify" (Realization)
+ // verifying_reqR -> verified1_req, verified2_req
+ Realization v1 = UMLFactory.eINSTANCE.createRealization();
+ v1.getClients().add(verifying);
+ v1.getSuppliers().add(verified1);
+ model.getPackagedElements().add(v1);
+ StereotypeApplicationHelper.getInstance(null).applyStereotype(v1, RequirementsPackage.eINSTANCE.getVerify());
+
+ Realization v2 = UMLFactory.eINSTANCE.createRealization();
+ v2.getClients().add(verifying);
+ v2.getSuppliers().add(verified2);
+ model.getPackagedElements().add(v2);
+ StereotypeApplicationHelper.getInstance(null).applyStereotype(v2, RequirementsPackage.eINSTANCE.getVerify());
+
+
+ // ////////////////////////////////////////////////////////////////////
+
+ // ////////////////////////////////////////////////////////////////////
+ // Prepare getRefines() test elements
+ // ////////////////////////////////////////////////////////////////////
+
+ Class refining = model.createOwnedClass("refining", false);
+ refining_reqR = (RequirementRelated)StereotypeApplicationHelper.getInstance(null).applyStereotype(refining, RequirementsPackage.eINSTANCE.getRequirementRelated());
+
+ Class refined1 = model.createOwnedClass("refined1", false);
+ refined1_req = (Requirement)StereotypeApplicationHelper.getInstance(null).applyStereotype(refined1, RequirementsPackage.eINSTANCE.getRequirement());
+ Class refined2 = model.createOwnedClass("refined2", false);
+ refined2_req = (Requirement)StereotypeApplicationHelper.getInstance(null).applyStereotype(refined2, RequirementsPackage.eINSTANCE.getRequirement());
+
+ // Add "Refine" (Abstraction)
+ // refining_reqR -> refined1_req, refined2_req
+ Abstraction r1 = UMLFactory.eINSTANCE.createAbstraction();
+ r1.getClients().add(refining);
+ r1.getSuppliers().add(refined1);
+ model.getPackagedElements().add(r1);
+ StereotypeApplicationHelper.getInstance(null).applyStereotype(r1, StandardPackage.eINSTANCE.getRefine());
+
+ Abstraction r2 = UMLFactory.eINSTANCE.createAbstraction();
+ r2.getClients().add(refining);
+ r2.getSuppliers().add(refined2);
+ model.getPackagedElements().add(r2);
+ StereotypeApplicationHelper.getInstance(null).applyStereotype(r2, StandardPackage.eINSTANCE.getRefine());
+
+
+ // ////////////////////////////////////////////////////////////////////
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#tearDown()
+ * @generated
+ */
+ @After
+ public void tearDown() throws Exception {
+ setFixture(null);
+ }
+
+ /**
+ * Tests the '{@link org.eclipse.papyrus.sysml.requirements.RequirementRelated#getRefines()
+ * <em>Refines</em>}' feature getter. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.requirements.RequirementRelated#getRefines()
+ * @generated NOT
+ */
+ @Test
+ public void testGetRefines() {
+
+ // Isolated RequirementRelated
+ if(!default_reqR.getRefines().isEmpty()) {
+ fail();
+ }
+
+ // refining_reqR.getRefines() = [refined1_req, refined2_req]
+ if(!refining_reqR.getRefines().contains(refined1_req)) {
+ fail();
+ }
+ if(!refining_reqR.getRefines().contains(refined2_req)) {
+ fail();
+ }
+ }
+
+ /**
+ * Tests the '{@link org.eclipse.papyrus.sysml.requirements.RequirementRelated#getSatisfies()
+ * <em>Satisfies</em>}' feature getter. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.requirements.RequirementRelated#getSatisfies()
+ * @generated NOT
+ */
+ @Test
+ public void testGetSatisfies() {
+
+ // Isolated RequirementRelated
+ if(!default_reqR.getSatisfies().isEmpty()) {
+ fail();
+ }
+
+ // satisfying_reqR.getSatisfies() = [satisfied1_req, satisfied2_req]
+ if(!satisfying_reqR.getSatisfies().contains(satisfied1_req)) {
+ fail();
+ }
+ if(!satisfying_reqR.getSatisfies().contains(satisfied2_req)) {
+ fail();
+ }
+ }
+
+ /**
+ * Tests the '{@link org.eclipse.papyrus.sysml.requirements.RequirementRelated#getTracedFrom()
+ * <em>Traced From</em>}' feature getter. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.requirements.RequirementRelated#getTracedFrom()
+ * @generated NOT
+ */
+ @Test
+ public void testGetTracedFrom() {
+
+ // Isolated RequirementRelated
+ if(!default_reqR.getTracedFrom().isEmpty()) {
+ fail();
+ }
+
+ // traced_reqR.getTraceFrom() = [trace1_Req, trace2_req]
+ if(!traced_reqR.getTracedFrom().contains(trace1_req)) {
+ fail();
+ }
+ if(!traced_reqR.getTracedFrom().contains(trace2_req)) {
+ fail();
+ }
+
+ // Should not include Trace subtypes clients
+ // Test getter through Copy (should not be taken into account see bug #352563)
+ if(copy_reqR.getTracedFrom().contains(master)) {
+ fail();
+ }
+ }
+
+ /**
+ * Tests the '{@link org.eclipse.papyrus.sysml.requirements.RequirementRelated#getVerifies()
+ * <em>Verifies</em>}' feature getter. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.requirements.RequirementRelated#getVerifies()
+ * @generated NOT
+ */
+ @Test
+ public void testGetVerifies() {
+
+ // Isolated RequirementRelated
+ if(!default_reqR.getVerifies().isEmpty()) {
+ fail();
+ }
+
+ // verifying_reqR.getVerifies() = [verified1_req, verified2_req]
+ if(!verifying_reqR.getVerifies().contains(verified1_req)) {
+ fail();
+ }
+ if(!verifying_reqR.getVerifies().contains(verified2_req)) {
+ fail();
+ }
+
+ }
+
+} // RequirementRelatedTest
diff --git a/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/requirements/tests/RequirementTest.java b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/requirements/tests/RequirementTest.java
new file mode 100755
index 0000000..cc7fe4a
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/requirements/tests/RequirementTest.java
@@ -0,0 +1,591 @@
+/*****************************************************************************
+ * Copyright (c) 2009, 2014 CEA LIST and others.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 422257
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.requirements.tests;
+
+import static org.junit.Assert.fail;
+
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.HouseKeeper;
+import org.eclipse.papyrus.sysml.requirements.Requirement;
+import org.eclipse.papyrus.sysml.requirements.RequirementsFactory;
+import org.eclipse.papyrus.sysml.requirements.RequirementsPackage;
+import org.eclipse.papyrus.sysml.utils.SysMLTestResources;
+import org.eclipse.uml2.uml.Abstraction;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.Operation;
+import org.eclipse.uml2.uml.Realization;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.profile.standard.StandardPackage;
+import org.eclipse.uml2.uml.util.UMLUtil.StereotypeApplicationHelper;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+/**
+ * <!-- begin-user-doc --> A test case for the model object '<em><b>Requirement</b></em>'. <!--
+ * end-user-doc -->
+ * <p>
+ * The following features are tested:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.requirements.Requirement#getDerived() <em>Derived</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.requirements.Requirement#getDerivedFrom() <em>Derived From</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.requirements.Requirement#getSatisfiedBy() <em>Satisfied By</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.requirements.Requirement#getRefinedBy() <em>Refined By</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.requirements.Requirement#getTracedTo() <em>Traced To</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.requirements.Requirement#getVerifiedBy() <em>Verified By</em>}</li>
+ * <li>{@link org.eclipse.papyrus.sysml.requirements.Requirement#getMaster() <em>Master</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class RequirementTest extends AbstractPapyrusTest {
+
+ @Rule
+ public final HouseKeeper houseKeeper = new HouseKeeper();
+
+ /**
+ * The fixture for this Requirement test case. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ protected Requirement fixture = null;
+
+ protected Class defaultClass = null;
+
+ protected Requirement default_req = null;
+
+ // ////////////////////////////////////////////////////////////////////
+ protected Class copy = null;
+
+ protected Class master = null;
+
+ protected Requirement copy_req = null;
+
+ protected Requirement master_req = null;
+
+ // ////////////////////////////////////////////////////////////////////
+ // ////////////////////////////////////////////////////////////////////
+ protected Class derive1 = null;
+
+ protected Class derive2 = null;
+
+ protected Class derived1 = null;
+
+ protected Class derived2 = null;
+
+ protected Requirement derive1_req = null;
+
+ protected Requirement derive2_req = null;
+
+ protected Requirement derived1_req = null;
+
+ protected Requirement derived2_req = null;
+
+ // ////////////////////////////////////////////////////////////////////
+ // ////////////////////////////////////////////////////////////////////
+ protected Class satisfied = null;
+
+ protected Class satisfyingNE1 = null;
+
+ protected Class satisfyingNE2 = null;
+
+ protected Requirement satisfied_req = null;
+
+ // ////////////////////////////////////////////////////////////////////
+ // ////////////////////////////////////////////////////////////////////
+ protected Class refined = null;
+
+ protected Class refiningNE1 = null;
+
+ protected Class refiningNE2 = null;
+
+ protected Requirement refined_req = null;
+
+ // ////////////////////////////////////////////////////////////////////
+ // ////////////////////////////////////////////////////////////////////
+ protected Class traced1 = null;
+
+ protected Class traced2 = null;
+
+ protected Class trace = null;
+
+ protected Requirement traced1_req = null;
+
+ protected Requirement traced2_req = null;
+
+ protected Requirement trace_req = null;
+
+ // ////////////////////////////////////////////////////////////////////
+
+ // ////////////////////////////////////////////////////////////////////
+ protected Requirement verified_req = null;
+
+ protected org.eclipse.papyrus.sysml.requirements.TestCase testCase1 = null;
+
+ protected NamedElement verifierNamedElement = null;
+
+ // ////////////////////////////////////////////////////////////////////
+
+ protected org.eclipse.papyrus.sysml.requirements.TestCase testCase2 = null;
+
+ protected Model model = null;
+
+ /**
+ * Returns the fixture for this Requirement test case. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ protected Requirement getFixture() {
+ return fixture;
+ }
+
+ /**
+ * Sets the fixture for this Requirement test case. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ protected void setFixture(Requirement fixture) {
+ this.fixture = fixture;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#setUp()
+ * @generated NOT
+ */
+ @Before
+ public void setUp() throws Exception {
+ setFixture(RequirementsFactory.eINSTANCE.createRequirement());
+
+ // Prepare test
+ model = SysMLTestResources.createSysMLModel(houseKeeper.createResourceSet());
+ if(model == null) {
+ fail();
+ }
+
+ if(model.getAppliedProfiles().isEmpty()) {
+ fail();
+ }
+
+ // Create classes & interface
+ defaultClass = model.createOwnedClass("defaultClass", false);
+
+ // Add Requirement stereotypes
+ default_req = (Requirement)StereotypeApplicationHelper.getInstance(null).applyStereotype(defaultClass, RequirementsPackage.eINSTANCE.getRequirement());
+
+ // ////////////////////////////////////////////////////////////////////
+ // Prepare getMaster test elements
+ // ////////////////////////////////////////////////////////////////////
+
+ master = model.createOwnedClass("master", false);
+ master_req = (Requirement)StereotypeApplicationHelper.getInstance(null).applyStereotype(master, RequirementsPackage.eINSTANCE.getRequirement());
+ copy = model.createOwnedClass("copy", false);
+ copy_req = (Requirement)StereotypeApplicationHelper.getInstance(null).applyStereotype(copy, RequirementsPackage.eINSTANCE.getRequirement());
+
+ // Add "copy" (Abstraction) between master and copy
+ // copy -> master
+ Abstraction c_m = UMLFactory.eINSTANCE.createAbstraction();
+ c_m.getClients().add(copy);
+ c_m.getSuppliers().add(master);
+ model.getPackagedElements().add(c_m);
+ StereotypeApplicationHelper.getInstance(null).applyStereotype(c_m, RequirementsPackage.eINSTANCE.getCopy());
+
+ // ////////////////////////////////////////////////////////////////////
+
+ // ////////////////////////////////////////////////////////////////////
+ // Prepare getDerived / getDerivedFrom test elements
+ // ////////////////////////////////////////////////////////////////////
+
+ derive1 = model.createOwnedClass("d1", false);
+ derive1_req = (Requirement)StereotypeApplicationHelper.getInstance(null).applyStereotype(derive1, RequirementsPackage.eINSTANCE.getRequirement());
+
+ derive2 = model.createOwnedClass("d2", false);
+ derive2_req = (Requirement)StereotypeApplicationHelper.getInstance(null).applyStereotype(derive2, RequirementsPackage.eINSTANCE.getRequirement());
+
+ derived1 = model.createOwnedClass("dd1", false);
+ derived1_req = (Requirement)StereotypeApplicationHelper.getInstance(null).applyStereotype(derived1, RequirementsPackage.eINSTANCE.getRequirement());
+
+ derived2 = model.createOwnedClass("dd2", false);
+ derived2_req = (Requirement)StereotypeApplicationHelper.getInstance(null).applyStereotype(derived2, RequirementsPackage.eINSTANCE.getRequirement());
+
+ // Add "DeriveReqt" (Abstraction) between derive and derived
+ // derived1 -> derive1, derive2
+ // derived2 -> derive2
+ Abstraction d11 = UMLFactory.eINSTANCE.createAbstraction();
+ d11.getClients().add(derived1);
+ d11.getSuppliers().add(derive1);
+ model.getPackagedElements().add(d11);
+ StereotypeApplicationHelper.getInstance(null).applyStereotype(d11, RequirementsPackage.eINSTANCE.getDeriveReqt());
+
+ Abstraction d12 = UMLFactory.eINSTANCE.createAbstraction();
+ d12.getClients().add(derived1);
+ d12.getSuppliers().add(derive2);
+ model.getPackagedElements().add(d12);
+ StereotypeApplicationHelper.getInstance(null).applyStereotype(d12, RequirementsPackage.eINSTANCE.getDeriveReqt());
+
+ Abstraction d22 = UMLFactory.eINSTANCE.createAbstraction();
+ d22.getClients().add(derived2);
+ d22.getSuppliers().add(derive2);
+ model.getPackagedElements().add(d22);
+ StereotypeApplicationHelper.getInstance(null).applyStereotype(d22, RequirementsPackage.eINSTANCE.getDeriveReqt());
+
+ // ////////////////////////////////////////////////////////////////////
+
+ // ////////////////////////////////////////////////////////////////////
+ // Prepare getSatisfiedBy test elements
+ // ////////////////////////////////////////////////////////////////////
+
+ satisfied = model.createOwnedClass("satisfied", false);
+ satisfied_req = (Requirement)StereotypeApplicationHelper.getInstance(null).applyStereotype(satisfied, RequirementsPackage.eINSTANCE.getRequirement());
+
+ satisfyingNE1 = model.createOwnedClass("sNE1", false);
+ satisfyingNE2 = model.createOwnedClass("sNE2", false);
+
+ // Add "Satisfy" (Realization) between satisfyingNE(s) and satisfied
+ // requirement
+ // satisfyingNE1, satisfyingNE2 -> satisfied
+ Realization ne1_s1 = UMLFactory.eINSTANCE.createRealization();
+ ne1_s1.getClients().add(satisfyingNE1);
+ ne1_s1.getSuppliers().add(satisfied);
+ model.getPackagedElements().add(ne1_s1);
+ StereotypeApplicationHelper.getInstance(null).applyStereotype(ne1_s1, RequirementsPackage.eINSTANCE.getSatisfy());
+
+ Realization ne2_s1 = UMLFactory.eINSTANCE.createRealization();
+ ne2_s1.getClients().add(satisfyingNE2);
+ ne2_s1.getSuppliers().add(satisfied);
+ model.getPackagedElements().add(ne2_s1);
+ StereotypeApplicationHelper.getInstance(null).applyStereotype(ne2_s1, RequirementsPackage.eINSTANCE.getSatisfy());
+
+ // ////////////////////////////////////////////////////////////////////
+
+ // ////////////////////////////////////////////////////////////////////
+ // Prepare getRefinedBy test elements
+ // ////////////////////////////////////////////////////////////////////
+
+ refined = model.createOwnedClass("refined", false);
+ refined_req = (Requirement)StereotypeApplicationHelper.getInstance(null).applyStereotype(refined, RequirementsPackage.eINSTANCE.getRequirement());
+
+ refiningNE1 = model.createOwnedClass("rNE1", false);
+ refiningNE2 = model.createOwnedClass("rNE2", false);
+
+ // Add "Refine" (Abstraction) between refiningNE(s) and refined
+ // requirement
+ // refiningNE1, refiningNE2 -> refined
+ Abstraction rne1_s1 = UMLFactory.eINSTANCE.createAbstraction();
+ rne1_s1.getClients().add(refiningNE1);
+ rne1_s1.getSuppliers().add(refined);
+ model.getPackagedElements().add(rne1_s1);
+ StereotypeApplicationHelper.getInstance(null).applyStereotype(rne1_s1, StandardPackage.eINSTANCE.getRefine());
+
+ Abstraction rne2_s1 = UMLFactory.eINSTANCE.createAbstraction();
+ rne2_s1.getClients().add(refiningNE2);
+ rne2_s1.getSuppliers().add(refined);
+ model.getPackagedElements().add(rne2_s1);
+ StereotypeApplicationHelper.getInstance(null).applyStereotype(rne2_s1, StandardPackage.eINSTANCE.getRefine());
+
+ // ////////////////////////////////////////////////////////////////////
+
+ // ////////////////////////////////////////////////////////////////////
+ // Prepare getTracedTo test elements
+ // ////////////////////////////////////////////////////////////////////
+
+ traced1 = model.createOwnedClass("traced1", false);
+ traced1_req = (Requirement)StereotypeApplicationHelper.getInstance(null).applyStereotype(traced1, RequirementsPackage.eINSTANCE.getRequirement());
+
+ traced2 = model.createOwnedClass("traced2", false);
+ traced2_req = (Requirement)StereotypeApplicationHelper.getInstance(null).applyStereotype(traced2, RequirementsPackage.eINSTANCE.getRequirement());
+
+ trace = model.createOwnedClass("trace", false);
+ trace_req = (Requirement)StereotypeApplicationHelper.getInstance(null).applyStereotype(trace, RequirementsPackage.eINSTANCE.getRequirement());
+
+ // Add "Trace" (Abstraction)
+ // [traced1, traced2] -> trace
+ Abstraction t11 = UMLFactory.eINSTANCE.createAbstraction();
+ t11.getClients().add(traced1);
+ t11.getSuppliers().add(trace);
+ model.getPackagedElements().add(t11);
+ StereotypeApplicationHelper.getInstance(null).applyStereotype(t11, StandardPackage.eINSTANCE.getTrace());
+
+ Abstraction t12 = UMLFactory.eINSTANCE.createAbstraction();
+ t12.getClients().add(traced2);
+ t12.getSuppliers().add(trace);
+ model.getPackagedElements().add(t12);
+ StereotypeApplicationHelper.getInstance(null).applyStereotype(t12, StandardPackage.eINSTANCE.getTrace());
+
+ // ////////////////////////////////////////////////////////////////////
+
+ // ////////////////////////////////////////////////////////////////////
+ // Prepare getVerifiedBy test elements
+ // ////////////////////////////////////////////////////////////////////
+
+ verifierNamedElement = model.createOwnedClass("verifierNamedElement", false);
+
+ Class verified = model.createOwnedClass("verified", false);
+ verified_req = (Requirement)StereotypeApplicationHelper.getInstance(null).applyStereotype(verified, RequirementsPackage.eINSTANCE.getRequirement());
+
+ Class testClass = model.createOwnedClass("testClass", false);
+ Operation op1 = testClass.createOwnedOperation("op1", null, null, null);
+ Operation op2 = testClass.createOwnedOperation("op2", null, null, null);
+
+ testCase1 = (org.eclipse.papyrus.sysml.requirements.TestCase)StereotypeApplicationHelper.getInstance(null).applyStereotype(op1, RequirementsPackage.eINSTANCE.getTestCase());
+ testCase2 = (org.eclipse.papyrus.sysml.requirements.TestCase)StereotypeApplicationHelper.getInstance(null).applyStereotype(op2, RequirementsPackage.eINSTANCE.getTestCase());
+
+ // Add "Verify" (Abstraction)
+ // testCase1, testCase2 -> verified
+ Abstraction t1_v = UMLFactory.eINSTANCE.createAbstraction();
+ t1_v.getClients().add(op1);
+ t1_v.getSuppliers().add(verified);
+ model.getPackagedElements().add(t1_v);
+ StereotypeApplicationHelper.getInstance(null).applyStereotype(t1_v, RequirementsPackage.eINSTANCE.getVerify());
+
+ Abstraction t2_v = UMLFactory.eINSTANCE.createAbstraction();
+ t2_v.getClients().add(op2);
+ t2_v.getSuppliers().add(verified);
+ model.getPackagedElements().add(t2_v);
+ StereotypeApplicationHelper.getInstance(null).applyStereotype(t2_v, RequirementsPackage.eINSTANCE.getVerify());
+
+ // Add "Verify" (Abstraction)
+ // verifierNamedElement -> verified
+ Abstraction t3_v = UMLFactory.eINSTANCE.createAbstraction();
+ t3_v.getClients().add(verifierNamedElement);
+ t3_v.getSuppliers().add(verified);
+ model.getPackagedElements().add(t3_v);
+ StereotypeApplicationHelper.getInstance(null).applyStereotype(t3_v, RequirementsPackage.eINSTANCE.getVerify());
+
+ // ////////////////////////////////////////////////////////////////////
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#tearDown()
+ * @generated
+ */
+ @After
+ public void tearDown() throws Exception {
+ setFixture(null);
+ }
+
+ /**
+ * Tests the '{@link org.eclipse.papyrus.sysml.requirements.Requirement#getDerived()
+ * <em>Derived</em>}' feature getter. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.requirements.Requirement#getDerived()
+ * @generated NOT
+ */
+ @Test
+ public void testGetDerived() {
+
+ // Isolated requirement : default_req.getDerived() = []
+ if(!default_req.getDerived().isEmpty()) {
+ fail();
+ }
+
+ // Verifies : derive1_req.getDerived() = [derived1_req]
+ if(!derive1_req.getDerived().contains(derived1_req)) {
+ fail();
+ }
+
+ // Verifies : derive2_req.getDerived() = [derived1_req, derived2_req]
+ if(!derive2_req.getDerived().contains(derived1_req)) {
+ fail();
+ }
+
+ if(!derive2_req.getDerived().contains(derived2_req)) {
+ fail();
+ }
+ }
+
+ /**
+ * Tests the '{@link org.eclipse.papyrus.sysml.requirements.Requirement#getDerivedFrom()
+ * <em>Derived From</em>}' feature getter. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.requirements.Requirement#getDerivedFrom()
+ * @generated NOT
+ */
+ @Test
+ public void testGetDerivedFrom() {
+
+ // Isolated requirement : default_req.getDerivedFrom() = []
+ if(!default_req.getDerivedFrom().isEmpty()) {
+ fail();
+ }
+
+ // Verifies : derived2_req.getDerivedFrom() = [derive2_req]
+ if(!derived2_req.getDerivedFrom().contains(derive2_req)) {
+ fail();
+ }
+
+ // Verifies : derived1_req.getDerivedFrom() = [derive1_req, derive2_req]
+ if(!derived1_req.getDerivedFrom().contains(derive1_req)) {
+ fail();
+ }
+ if(!derived1_req.getDerivedFrom().contains(derive2_req)) {
+ fail();
+ }
+ }
+
+ /**
+ * Tests the '{@link org.eclipse.papyrus.sysml.requirements.Requirement#getMaster()
+ * <em>Master</em>}' feature getter. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.requirements.Requirement#getMaster()
+ * @generated NOT
+ */
+ @Test
+ public void testGetMaster() {
+
+ // Isolated requirement : default_req.getMaster() = null
+ if(default_req.getMaster() != null) {
+ fail();
+ }
+
+ // Try retrieving Master from Copy requirement
+ if(!master_req.equals(copy_req.getMaster())) {
+ fail();
+ }
+ }
+
+ /**
+ * Tests the '{@link org.eclipse.papyrus.sysml.requirements.Requirement#getRefinedBy()
+ * <em>Refined By</em>}' feature getter. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.requirements.Requirement#getRefinedBy()
+ * @generated NOT
+ */
+ @Test
+ public void testGetRefinedBy() {
+
+ // Isolated requirement : default_req.getRefinedBy() = []
+ if(!default_req.getRefinedBy().isEmpty()) {
+ fail();
+ }
+
+ // Verifies : refined_req.getRefinedBy() = [refiningNE1, refiningNE2]
+ if(!refined_req.getRefinedBy().contains(refiningNE1)) {
+ fail();
+ }
+ if(!refined_req.getRefinedBy().contains(refiningNE2)) {
+ fail();
+ }
+ }
+
+ /**
+ * Tests the '{@link org.eclipse.papyrus.sysml.requirements.Requirement#getSatisfiedBy()
+ * <em>Satisfied By</em>}' feature getter. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.requirements.Requirement#getSatisfiedBy()
+ * @generated NOT
+ */
+ @Test
+ public void testGetSatisfiedBy() {
+
+ // Isolated requirement : default_req.getSatisfiedBy() = []
+ if(!default_req.getSatisfiedBy().isEmpty()) {
+ fail();
+ }
+
+ // Verifies : satisfied_req.getSatisfiedBy() = [satisfyingNE1, satisfyingNE2]
+ if(!satisfied_req.getSatisfiedBy().contains(satisfyingNE1)) {
+ fail();
+ }
+ if(!satisfied_req.getSatisfiedBy().contains(satisfyingNE2)) {
+ fail();
+ }
+ }
+
+ /**
+ * Tests the '{@link org.eclipse.papyrus.sysml.requirements.Requirement#getTracedTo()
+ * <em>Traced To</em>}' feature getter. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.requirements.Requirement#getTracedTo()
+ * @generated NOT
+ */
+ @Test
+ public void testGetTracedTo() {
+
+ // Isolated requirement : default_req.getTracedTo = []
+ if(!default_req.getTracedTo().isEmpty()) {
+ fail();
+ }
+
+ // DeriveReqt / Verify / Copy inherits from Trace
+ // Test getter through Copy (should not be taken into account see bug #352563)
+ if(master_req.getTracedTo().contains(copy)) {
+ fail();
+ }
+
+ // Test getter through DeriveReqt (tracedTo = Clients)
+ // derived1 -> [derive1_req, derive2_req] (should not be taken into account see bug #352563)
+ // derived2 -> [derive2_req] (should not be taken into account see bug #352563)
+ if(derive1_req.getTracedTo().contains(derived1)) {
+ fail();
+ }
+ if(derive2_req.getTracedTo().contains(derived1)) {
+ fail();
+ }
+ if(derive2_req.getTracedTo().contains(derived2)) {
+ fail();
+ }
+
+ // Test getter through Verify (should not be taken into account see bug #352563)
+ // Should not happen...
+
+ // Direct test
+ if(!trace_req.getTracedTo().contains(traced1)) {
+ fail();
+ }
+ if(!trace_req.getTracedTo().contains(traced2)) {
+ fail();
+ }
+
+ }
+
+ /**
+ * Tests the '{@link org.eclipse.papyrus.sysml.requirements.Requirement#getVerifiedBy()
+ * <em>Verified By</em>}' feature getter. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.requirements.Requirement#getVerifiedBy()
+ * @generated NOT
+ */
+ @Test
+ public void testGetVerifiedBy() {
+
+ // Isolated requirement : default_req.getVerifiedBy() = []
+ if(!default_req.getVerifiedBy().isEmpty()) {
+ fail();
+ }
+
+ // Test getVerifiedBy getter for
+ // [testCase1, testCase2, verifierNamedElement] -> verified_req
+ if(!verified_req.getVerifiedBy().contains(testCase1.getBase_Operation())) {
+ fail();
+ }
+ if(!verified_req.getVerifiedBy().contains(testCase2.getBase_Operation())) {
+ fail();
+ }
+ if(!verified_req.getVerifiedBy().contains(verifierNamedElement)) {
+ fail();
+ }
+ }
+
+} // RequirementTest
diff --git a/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/requirements/tests/RequirementsTests.java b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/requirements/tests/RequirementsTests.java
new file mode 100755
index 0000000..d7d9db2
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/requirements/tests/RequirementsTests.java
@@ -0,0 +1,32 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.requirements.tests;
+
+import junit.framework.TestSuite;
+
+import org.junit.runner.RunWith;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.junit.runners.Suite.SuiteClasses;
+
+/**
+ * <!-- begin-user-doc --> A test suite for the '<em><b>requirements</b></em>' package. <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+@RunWith(ClassificationSuite.class)
+@SuiteClasses({ TestCaseTest.class, RequirementTest.class, RequirementRelatedTest.class })
+public class RequirementsTests extends TestSuite {
+ // RequirementsTests
+}
diff --git a/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/requirements/tests/SatisfyTest.java b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/requirements/tests/SatisfyTest.java
new file mode 100755
index 0000000..ff042e1
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/requirements/tests/SatisfyTest.java
@@ -0,0 +1,102 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.requirements.tests;
+
+import junit.framework.TestCase;
+import junit.textui.TestRunner;
+
+import org.eclipse.papyrus.sysml.requirements.RequirementsFactory;
+import org.eclipse.papyrus.sysml.requirements.Satisfy;
+import org.junit.Ignore;
+
+/**
+ * <!-- begin-user-doc --> A test case for the model object '<em><b>Satisfy</b></em>'. <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+@Ignore("no tests")
+public class SatisfyTest extends TestCase {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static void main(String[] args) {
+ TestRunner.run(SatisfyTest.class);
+ }
+
+ /**
+ * The fixture for this Satisfy test case.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected Satisfy fixture = null;
+
+ /**
+ * Constructs a new Satisfy test case with the given name.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public SatisfyTest(String name) {
+ super(name);
+ }
+
+ /**
+ * Returns the fixture for this Satisfy test case.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected Satisfy getFixture() {
+ return fixture;
+ }
+
+ /**
+ * Sets the fixture for this Satisfy test case.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void setFixture(Satisfy fixture) {
+ this.fixture = fixture;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#setUp()
+ * @generated
+ */
+ @Override
+ protected void setUp() throws Exception {
+ setFixture(RequirementsFactory.eINSTANCE.createSatisfy());
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#tearDown()
+ * @generated
+ */
+ @Override
+ protected void tearDown() throws Exception {
+ setFixture(null);
+ }
+
+} // SatisfyTest
diff --git a/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/requirements/tests/TestCaseTest.java b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/requirements/tests/TestCaseTest.java
new file mode 100755
index 0000000..da57e12
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/requirements/tests/TestCaseTest.java
@@ -0,0 +1,194 @@
+/*****************************************************************************
+ * Copyright (c) 2009, 2014 CEA LIST and others.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 422257
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.requirements.tests;
+
+import static org.junit.Assert.fail;
+
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.HouseKeeper;
+import org.eclipse.papyrus.sysml.requirements.Requirement;
+import org.eclipse.papyrus.sysml.requirements.RequirementsFactory;
+import org.eclipse.papyrus.sysml.requirements.RequirementsPackage;
+import org.eclipse.papyrus.sysml.utils.SysMLTestResources;
+import org.eclipse.uml2.uml.Abstraction;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.Operation;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.util.UMLUtil.StereotypeApplicationHelper;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+/**
+ * <!-- begin-user-doc --> A test case for the model object '<em><b>Test Case</b></em>'. <!--
+ * end-user-doc -->
+ * <p>
+ * The following features are tested:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.sysml.requirements.TestCase#getVerifies() <em>Verifies</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class TestCaseTest extends AbstractPapyrusTest {
+
+ @Rule
+ public final HouseKeeper houseKeeper = new HouseKeeper();
+
+ protected org.eclipse.papyrus.sysml.requirements.TestCase fixture = null;
+
+ // ////////////////////////////////////////////////////////////////////
+ protected Model model = null;
+
+ protected Requirement verified1_req = null;
+
+ protected Requirement verified2_req = null;
+
+ protected org.eclipse.papyrus.sysml.requirements.TestCase testCase0 = null;
+
+ protected org.eclipse.papyrus.sysml.requirements.TestCase testCase1 = null;
+
+ protected org.eclipse.papyrus.sysml.requirements.TestCase testCase2 = null;
+
+ // ////////////////////////////////////////////////////////////////////
+
+ /**
+ * Returns the fixture for this Test Case test case. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ */
+ protected org.eclipse.papyrus.sysml.requirements.TestCase getFixture() {
+ return fixture;
+ }
+
+ /**
+ * Sets the fixture for this Test Case test case.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void setFixture(org.eclipse.papyrus.sysml.requirements.TestCase fixture) {
+ this.fixture = fixture;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#setUp()
+ * @generated NOT
+ */
+ @Before
+ public void setUp() throws Exception {
+ setFixture(RequirementsFactory.eINSTANCE.createTestCase());
+
+ // Prepare test
+ model = SysMLTestResources.createSysMLModel(houseKeeper.createResourceSet());
+ if(model == null) {
+ fail();
+ }
+
+ if(model.getAppliedProfiles().isEmpty()) {
+ fail();
+ }
+
+ // ////////////////////////////////////////////////////////////////////
+ // Prepare getVerifies test elements
+ // ////////////////////////////////////////////////////////////////////
+
+ Class verified1 = model.createOwnedClass("verified1", false);
+ verified1_req = (Requirement)StereotypeApplicationHelper.getInstance(null).applyStereotype(verified1, RequirementsPackage.eINSTANCE.getRequirement());
+
+ Class verified2 = model.createOwnedClass("verified2", false);
+ verified2_req = (Requirement)StereotypeApplicationHelper.getInstance(null).applyStereotype(verified2, RequirementsPackage.eINSTANCE.getRequirement());
+
+ Class testClass = model.createOwnedClass("testClass", false);
+ Operation op0 = testClass.createOwnedOperation("op0", null, null, null);
+ Operation op1 = testClass.createOwnedOperation("op1", null, null, null);
+ Operation op2 = testClass.createOwnedOperation("op2", null, null, null);
+
+ testCase0 = (org.eclipse.papyrus.sysml.requirements.TestCase)StereotypeApplicationHelper.getInstance(null).applyStereotype(op0, RequirementsPackage.eINSTANCE.getTestCase());
+ testCase1 = (org.eclipse.papyrus.sysml.requirements.TestCase)StereotypeApplicationHelper.getInstance(null).applyStereotype(op1, RequirementsPackage.eINSTANCE.getTestCase());
+ testCase2 = (org.eclipse.papyrus.sysml.requirements.TestCase)StereotypeApplicationHelper.getInstance(null).applyStereotype(op2, RequirementsPackage.eINSTANCE.getTestCase());
+
+ // Add "Verify" (Abstraction)
+ // testCase1, testCase2 -> verified1
+ // testCase2 -> verified2
+ Abstraction t1_v1 = UMLFactory.eINSTANCE.createAbstraction();
+ t1_v1.getClients().add(op1);
+ t1_v1.getSuppliers().add(verified1);
+ model.getPackagedElements().add(t1_v1);
+ StereotypeApplicationHelper.getInstance(null).applyStereotype(t1_v1, RequirementsPackage.eINSTANCE.getVerify());
+
+ Abstraction t1_v2 = UMLFactory.eINSTANCE.createAbstraction();
+ t1_v2.getClients().add(op1);
+ t1_v2.getSuppliers().add(verified2);
+ model.getPackagedElements().add(t1_v2);
+ StereotypeApplicationHelper.getInstance(null).applyStereotype(t1_v2, RequirementsPackage.eINSTANCE.getVerify());
+
+ Abstraction t2_v2 = UMLFactory.eINSTANCE.createAbstraction();
+ t2_v2.getClients().add(op2);
+ t2_v2.getSuppliers().add(verified2);
+ model.getPackagedElements().add(t2_v2);
+ StereotypeApplicationHelper.getInstance(null).applyStereotype(t2_v2, RequirementsPackage.eINSTANCE.getVerify());
+
+ // ////////////////////////////////////////////////////////////////////
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#tearDown()
+ * @generated
+ */
+ @After
+ public void tearDown() throws Exception {
+ setFixture(null);
+ }
+
+ /**
+ * Tests the '{@link org.eclipse.papyrus.sysml.requirements.TestCase#getVerifies()
+ * <em>Verifies</em>}' feature getter. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.sysml.requirements.TestCase#getVerifies()
+ * @generated NOT
+ */
+ @Test
+ public void testGetVerifies() {
+
+ // testCase0 -> []
+ if(!testCase0.getVerifies().isEmpty()) {
+ fail();
+ }
+
+ // testCase1 -> [verified1_req, verified2_req]
+ if(!testCase1.getVerifies().contains(verified1_req)) {
+ fail();
+ }
+ if(!testCase1.getVerifies().contains(verified2_req)) {
+ fail();
+ }
+
+ // testCase2 -> [verified2_req]
+ if(!testCase2.getVerifies().contains(verified2_req)) {
+ fail();
+ }
+
+ }
+
+} // TestCaseTest
diff --git a/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/requirements/tests/VerifyTest.java b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/requirements/tests/VerifyTest.java
new file mode 100755
index 0000000..65eeda3
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/requirements/tests/VerifyTest.java
@@ -0,0 +1,102 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.requirements.tests;
+
+import junit.framework.TestCase;
+import junit.textui.TestRunner;
+
+import org.eclipse.papyrus.sysml.requirements.RequirementsFactory;
+import org.eclipse.papyrus.sysml.requirements.Verify;
+import org.junit.Ignore;
+
+/**
+ * <!-- begin-user-doc --> A test case for the model object '<em><b>Verify</b></em>'. <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+@Ignore("no tests")
+public class VerifyTest extends TestCase {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static void main(String[] args) {
+ TestRunner.run(VerifyTest.class);
+ }
+
+ /**
+ * The fixture for this Verify test case.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected Verify fixture = null;
+
+ /**
+ * Constructs a new Verify test case with the given name.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public VerifyTest(String name) {
+ super(name);
+ }
+
+ /**
+ * Returns the fixture for this Verify test case.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected Verify getFixture() {
+ return fixture;
+ }
+
+ /**
+ * Sets the fixture for this Verify test case.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void setFixture(Verify fixture) {
+ this.fixture = fixture;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#setUp()
+ * @generated
+ */
+ @Override
+ protected void setUp() throws Exception {
+ setFixture(RequirementsFactory.eINSTANCE.createVerify());
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see junit.framework.TestCase#tearDown()
+ * @generated
+ */
+ @Override
+ protected void tearDown() throws Exception {
+ setFixture(null);
+ }
+
+} // VerifyTest
diff --git a/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/statemachines/tests/StatemachinesTests.java b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/statemachines/tests/StatemachinesTests.java
new file mode 100755
index 0000000..1c0451a
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/statemachines/tests/StatemachinesTests.java
@@ -0,0 +1,22 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.statemachines.tests;
+
+
+/**
+ * A test suite for the '<em><b>statemachines</b></em>' package.
+ */
+public class StatemachinesTests {
+ // StatemachinesTests
+}
diff --git a/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/tests/SysmlAllTests.java b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/tests/SysmlAllTests.java
new file mode 100755
index 0000000..aef84de
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/tests/SysmlAllTests.java
@@ -0,0 +1,33 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.tests;
+
+import org.eclipse.papyrus.sysml.allocations.tests.AllocationsTests;
+import org.eclipse.papyrus.sysml.modelelements.tests.ModelelementsTests;
+import org.eclipse.papyrus.sysml.portandflows.tests.PortandflowsTests;
+import org.eclipse.papyrus.sysml.requirements.tests.RequirementsTests;
+import org.junit.runner.RunWith;
+import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.junit.runners.Suite.SuiteClasses;
+
+/**
+ * A test suite for the '<em><b>Sysml</b></em>' model.
+ */
+@RunWith(ClassificationSuite.class)
+@SuiteClasses({ ModelelementsTests.class, PortandflowsTests.class, AllocationsTests.class, RequirementsTests.class
+
+})
+public class SysmlAllTests {
+ // SysmlAllTests
+}
diff --git a/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/usecases/tests/UsecasesTests.java b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/usecases/tests/UsecasesTests.java
new file mode 100755
index 0000000..01362dd
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/usecases/tests/UsecasesTests.java
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.usecases.tests;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+
+/**
+ * <!-- begin-user-doc --> A test suite for the '<em><b>usecases</b></em>' package. <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+public class UsecasesTests extends TestSuite {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static void main(String[] args) {
+ TestRunner.run(suite());
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static Test suite() {
+ TestSuite suite = new UsecasesTests("usecases Tests");
+ return suite;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public UsecasesTests(String name) {
+ super(name);
+ }
+
+} // UsecasesTests
diff --git a/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/utils/SysMLTestResources.java b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/utils/SysMLTestResources.java
new file mode 100755
index 0000000..48d56c3
--- /dev/null
+++ b/tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/utils/SysMLTestResources.java
@@ -0,0 +1,103 @@
+/*****************************************************************************
+ * Copyright (c) 2009, 2014 CEA LIST and others.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 422257
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.utils;
+
+import java.io.IOException;
+import java.util.Iterator;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.URIConverter;
+import org.eclipse.papyrus.sysml.util.SysmlResource;
+import org.eclipse.papyrus.uml.tools.utils.PackageUtil;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.Profile;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.resource.UMLResource;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+public class SysMLTestResources {
+
+ /**
+ * Creates a model with SysML profile applied for JUnit test
+ *
+ * @param resourceSet
+ * the resource set in which to create the model
+ * @return the created model
+ */
+ public static Model createSysMLModel(ResourceSet resourceSet) {
+
+ SysMLTestResources.registerResourceFactories();
+
+ Model model = null;
+ model = UMLFactory.eINSTANCE.createModel();
+ model.setName("TestSysML");
+
+ Resource resource = resourceSet.createResource(URI.createURI("temp.uml"));
+ resource.getContents().add(model);
+
+ // Apply UML Standard profile
+ // Retrieve standard profile
+ Profile umlStdProfile = (Profile)PackageUtil.loadPackage(URI.createURI(UMLResource.STANDARD_PROFILE_URI), resourceSet);
+ // Apply to new model
+ model.applyProfile(umlStdProfile);
+
+ // Retrieve SysML profile and apply with subprofile
+ Profile sysml = (Profile)PackageUtil.loadPackage(URI.createURI(SysmlResource.SYSML_PROFILE_URI), resourceSet);
+ if(sysml != null) {
+ PackageUtil.applyProfile(model, sysml, true);
+ }
+
+ return model;
+ }
+
+ protected static void registerPathmaps(URI uri) {
+ URIConverter.URI_MAP.put(URI.createURI(UMLResource.LIBRARIES_PATHMAP), uri.appendSegment("libraries").appendSegment(""));
+
+ URIConverter.URI_MAP.put(URI.createURI(UMLResource.METAMODELS_PATHMAP), uri.appendSegment("metamodels").appendSegment(""));
+
+ URIConverter.URI_MAP.put(URI.createURI(UMLResource.PROFILES_PATHMAP), uri.appendSegment("profiles").appendSegment(""));
+ }
+
+ protected static void registerResourceFactories() {
+ Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put(UMLResource.FILE_EXTENSION, UMLResource.Factory.INSTANCE);
+ }
+
+ protected static void save(ResourceSet resourceSet, org.eclipse.uml2.uml.Package package_, URI uri) {
+ Resource resource = resourceSet.createResource(uri);
+ EList<EObject> contents = resource.getContents();
+
+ contents.add(package_);
+
+ for(Iterator<?> allContents = UMLUtil.getAllContents(package_, true, false); allContents.hasNext();) {
+
+ EObject eObject = (EObject)allContents.next();
+
+ if(eObject instanceof Element) {
+ contents.addAll(((Element)eObject).getStereotypeApplications());
+ }
+ }
+
+ try {
+ resource.save(null);
+ } catch (IOException ioe) {
+ // err
+ }
+ }
+}
diff --git a/tests/org.eclipse.papyrus.uml.diagram.tests/.classpath b/tests/org.eclipse.papyrus.uml.diagram.tests/.classpath
new file mode 100755
index 0000000..098194c
--- /dev/null
+++ b/tests/org.eclipse.papyrus.uml.diagram.tests/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/tests/org.eclipse.papyrus.uml.diagram.tests/.project b/tests/org.eclipse.papyrus.uml.diagram.tests/.project
new file mode 100755
index 0000000..7ed077f
--- /dev/null
+++ b/tests/org.eclipse.papyrus.uml.diagram.tests/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.uml.diagram.tests</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <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>
+ <nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
+ </natures>
+</projectDescription>
diff --git a/tests/org.eclipse.papyrus.uml.diagram.tests/.settings/org.eclipse.jdt.core.prefs b/tests/org.eclipse.papyrus.uml.diagram.tests/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 0000000..eb9bfba
--- /dev/null
+++ b/tests/org.eclipse.papyrus.uml.diagram.tests/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,296 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/tests/org.eclipse.papyrus.uml.diagram.tests/.settings/org.eclipse.jdt.ui.prefs b/tests/org.eclipse.papyrus.uml.diagram.tests/.settings/org.eclipse.jdt.ui.prefs
new file mode 100755
index 0000000..954281d
--- /dev/null
+++ b/tests/org.eclipse.papyrus.uml.diagram.tests/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,68 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+formatter_profile=_Papyrus
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/tests/org.eclipse.papyrus.uml.diagram.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.papyrus.uml.diagram.tests/META-INF/MANIFEST.MF
new file mode 100755
index 0000000..cabd287
--- /dev/null
+++ b/tests/org.eclipse.papyrus.uml.diagram.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,59 @@
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.papyrus.uml.service.types;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.infra.core;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.editor;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.gmf.runtime.diagram.ui.resources.editor;bundle-version="1.2.0",
+ org.eclipse.papyrus.uml.diagram.common;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.5.0",
+ org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.uml2.uml;bundle-version="4.0.0",
+ org.eclipse.papyrus.infra.core.log;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.ui.ide;bundle-version="3.8.0",
+ org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.infra.core.sasheditor;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.infra.widgets;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.infra.emf;bundle-version="[3.0.0,4.0.0)",
+ org.junit;bundle-version="4.10.0",
+ org.eclipse.papyrus.uml.tools;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.gmf.runtime.common.core,
+ org.eclipse.papyrus.junit.utils;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.uml.diagram.profile;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.infra.emf.appearance;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.uml.tools.utils;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.junit.framework;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.papyrus.views.modelexplorer;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.xtend.lib,
+ org.eclipse.xtend.lib.macro,
+ org.eclipse.xtext.xbase.lib,
+ com.google.guava;bundle-version="21.0.0",
+ org.eclipse.papyrus.infra.gmfdiag.css;bundle-version="[2.1.0,3.0.0)",
+ org.eclipse.papyrus.infra.gmfdiag.css.model;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.papyrus.infra.gmfdiag.css.properties;bundle-version="[2.1.0,3.0.0)",
+ org.eclipse.papyrus.infra.services.edit;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.core.expressions;bundle-version="3.5.0",
+ org.eclipse.papyrus.infra.gmfdiag.dnd;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.papyrus.infra.ui;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.infra.gmfdiag.preferences;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.uml.service.types.ui;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.uml.architecture;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.papyrus.uml.diagram.wizards;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.infra.editor.welcome;bundle-version="2.0.0"
+Export-Package: org.eclipse.papyrus.uml.diagram.tests.appearance,
+ org.eclipse.papyrus.uml.diagram.tests.canonical,
+ org.eclipse.papyrus.uml.diagram.tests.createFromPalette,
+ org.eclipse.papyrus.uml.diagram.tests.delete,
+ org.eclipse.papyrus.uml.diagram.tests.drop,
+ org.eclipse.papyrus.uml.diagram.tests.edition,
+ org.eclipse.papyrus.uml.diagram.tests.rules,
+ org.eclipse.papyrus.uml.diagram.tests.synchronization
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 1.2.0.qualifier
+Bundle-Name: %pluginName
+Bundle-Localization: plugin
+Bundle-ManifestVersion: 2
+Bundle-Activator: org.eclipse.papyrus.uml.diagram.tests.Activator
+Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.tests;singleton:=true
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
diff --git a/tests/org.eclipse.papyrus.uml.diagram.tests/about.html b/tests/org.eclipse.papyrus.uml.diagram.tests/about.html
new file mode 100755
index 0000000..d35d5ae
--- /dev/null
+++ b/tests/org.eclipse.papyrus.uml.diagram.tests/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/tests/org.eclipse.papyrus.uml.diagram.tests/build.properties b/tests/org.eclipse.papyrus.uml.diagram.tests/build.properties
new file mode 100755
index 0000000..9de44fb
--- /dev/null
+++ b/tests/org.eclipse.papyrus.uml.diagram.tests/build.properties
@@ -0,0 +1,8 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.properties,\
+ about.html,\
+ resources/
+src.includes = about.html
diff --git a/tests/org.eclipse.papyrus.uml.diagram.tests/plugin.properties b/tests/org.eclipse.papyrus.uml.diagram.tests/plugin.properties
new file mode 100755
index 0000000..eb1d437
--- /dev/null
+++ b/tests/org.eclipse.papyrus.uml.diagram.tests/plugin.properties
@@ -0,0 +1,12 @@
+#################################################################################
+# Copyright (c) 2008 CEA LIST.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - initial API and implementation
+##################################################################################
+pluginName=Papyrus common Diagram
+providerName=Eclipse Modeling Project
diff --git a/tests/org.eclipse.papyrus.uml.diagram.tests/pom.xml b/tests/org.eclipse.papyrus.uml.diagram.tests/pom.xml
new file mode 100755
index 0000000..7bc210c
--- /dev/null
+++ b/tests/org.eclipse.papyrus.uml.diagram.tests/pom.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.papyrus.sysml</groupId>
+ <artifactId>org.eclipse.papyrus.sysml.test</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ </parent>
+ <groupId>org.eclipse.papyrus.tests</groupId>
+ <artifactId>org.eclipse.papyrus.uml.diagram.tests</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ <packaging>eclipse-test-plugin</packaging>
+</project>
diff --git a/tests/org.eclipse.papyrus.uml.diagram.tests/resources/synch-test-model.di b/tests/org.eclipse.papyrus.uml.diagram.tests/resources/synch-test-model.di
new file mode 100755
index 0000000..bf9abab
--- /dev/null
+++ b/tests/org.eclipse.papyrus.uml.diagram.tests/resources/synch-test-model.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/org.eclipse.papyrus.uml.diagram.tests/resources/synch-test-model.notation b/tests/org.eclipse.papyrus.uml.diagram.tests/resources/synch-test-model.notation
new file mode 100755
index 0000000..b2e9f76
--- /dev/null
+++ b/tests/org.eclipse.papyrus.uml.diagram.tests/resources/synch-test-model.notation
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<css:ModelStyleSheets xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:css="http://www.eclipse.org/papyrus/infra/gmfdiag/css" xmi:id="_682nUOBLEeSgAIqn-1RXEA">
+ <stylesheets xmi:type="css:EmbeddedStyleSheet" xmi:id="_AocRIOBMEeSgAIqn-1RXEA" label="synchronize all" content="* { canonical: true; }"/>
+</css:ModelStyleSheets>
diff --git a/tests/org.eclipse.papyrus.uml.diagram.tests/resources/synch-test-model.uml b/tests/org.eclipse.papyrus.uml.diagram.tests/resources/synch-test-model.uml
new file mode 100755
index 0000000..38749eb
--- /dev/null
+++ b/tests/org.eclipse.papyrus.uml.diagram.tests/resources/synch-test-model.uml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_zFSOIOBLEeSgAIqn-1RXEA" name="synch-test">
+ <packageImport xmi:type="uml:PackageImport" xmi:id="_zFSOIeBLEeSgAIqn-1RXEA">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+</uml:Model>
diff --git a/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/Activator.java b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/Activator.java
new file mode 100755
index 0000000..61238bf
--- /dev/null
+++ b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/Activator.java
@@ -0,0 +1,63 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * (CEA LIST) - Initial API and implementation
+ /*****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.tests;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.uml.diagram.tests"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+}
diff --git a/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/appearance/AbstractAppearanceNodeTest.java b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/appearance/AbstractAppearanceNodeTest.java
new file mode 100755
index 0000000..b3d23b1
--- /dev/null
+++ b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/appearance/AbstractAppearanceNodeTest.java
@@ -0,0 +1,458 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2015 CEA LIST, Christian W. Damus, and others.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * (CEA LIST) - Initial API and implementation
+ * Christian W. Damus - bug 464647
+ /*****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.tests.appearance;
+
+import static org.hamcrest.CoreMatchers.notNullValue;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.junit.Assert.assertTrue;
+
+import java.util.Iterator;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.emf.edit.command.SetCommand;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.figures.BorderedNodeFigure;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.draw2d.ui.text.TextFlowEx;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.GradientStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.Shape;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.gmf.runtime.notation.datatype.GradientData;
+import org.eclipse.papyrus.commands.wrappers.EMFtoGEFCommandWrapper;
+import org.eclipse.papyrus.infra.emf.appearance.style.AnnotationStyleProvider;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.CornerBentFigure;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.NoteShadowBorder;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusNodeFigure;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.RectangularShadowBorder;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.widgets.Display;
+import org.junit.Assert;
+
+import com.google.common.collect.Iterators;
+
+/**
+ * This abstract class is used to test the appearance of a node
+ *
+ */
+public abstract class AbstractAppearanceNodeTest extends AppearanceElementTest {
+ protected Command command = null;
+
+ /**
+ * test the if the background is refreshed on the figure
+ *
+ * @param createdEditpart
+ */
+ public void testBackgroundColor(GraphicalEditPart createdEditpart) {
+ View view = createdEditpart.getNotationView();
+ assertTrue("view must be instance of Shape", view instanceof Shape);
+ Shape shape = (Shape) view;
+ command = new EMFtoGEFCommandWrapper(SetCommand.create(createdEditpart.getEditingDomain(), shape, NotationPackage.eINSTANCE.getFillStyle_FillColor(), 0));
+ Assert.assertTrue("the command must be executable", command.canExecute());
+ executeOnUIThread(command);
+ command = new EMFtoGEFCommandWrapper(SetCommand.create(createdEditpart.getEditingDomain(), shape, NotationPackage.eINSTANCE.getFillStyle_Gradient(), null));
+ Assert.assertTrue("the command must be executable", command.canExecute());
+ executeOnUIThread(command);
+ createdEditpart.refresh();
+ createdEditpart.isActive();
+ IFigure fig = getPrimaryFigure(createdEditpart);
+ Assert.assertTrue("Figure must be an instance of Nodefigure", fig instanceof NodeFigure);
+ Assert.assertEquals("the background is not refreshed", Display.getDefault().getSystemColor(SWT.COLOR_BLACK), ((NodeFigure) fig).getBackgroundColor());
+
+ }
+
+ /**
+ * get the primary figure that correspond to the edipart
+ *
+ * @param createdEditpart
+ * @return a Ifigure
+ */
+ protected IFigure getPrimaryFigure(GraphicalEditPart createdEditpart) {
+ if (createdEditpart.getFigure() instanceof BorderedNodeFigure) {
+ IFigure nodePlate = (IFigure) ((BorderedNodeFigure) createdEditpart.getFigure()).getChildren().get(0);
+ // now verify position of each subfigure
+ IFigure fig = ((IFigure) nodePlate.getChildren().get(0));
+ return fig;
+ } else {
+ return createdEditpart.getFigure();
+ }
+ }
+
+ /**
+ * test the if the foreground is refreshed on the figure
+ *
+ * @param createdEditpart
+ */
+ public void testForegroundColor(GraphicalEditPart createdEditpart) {
+ View view = createdEditpart.getNotationView();
+ assertTrue("view must be instance of Shape", view instanceof Shape);
+ Shape shape = (Shape) view;
+ command = new EMFtoGEFCommandWrapper(SetCommand.create(createdEditpart.getEditingDomain(), shape, NotationPackage.eINSTANCE.getLineStyle_LineColor(), 0));
+ Assert.assertTrue("the command must be executable", command.canExecute());
+ executeOnUIThread(command);
+ command = new EMFtoGEFCommandWrapper(SetCommand.create(createdEditpart.getEditingDomain(), shape, NotationPackage.eINSTANCE.getFillStyle_Gradient(), null));
+ Assert.assertTrue("the command must be executable", command.canExecute());
+ executeOnUIThread(command);
+ createdEditpart.refresh();
+ createdEditpart.isActive();
+ IFigure fig = getPrimaryFigure(createdEditpart);
+ Assert.assertTrue("Figure must be an instance of Nodefigure", fig instanceof NodeFigure);
+ Assert.assertEquals("the foreground is not refreshed", Display.getDefault().getSystemColor(SWT.COLOR_BLACK), ((NodeFigure) fig).getForegroundColor());
+
+ }
+
+ /**
+ * test the if the gradient is refreshed on the figure
+ * in the figure the background is taken in account and Color1
+ *
+ * @param createdEditpart
+ */
+ public void testGradient(GraphicalEditPart createdEditpart) {
+ View view = createdEditpart.getNotationView();
+ assertTrue("view must be instance of Shape", view instanceof Shape);
+ Shape shape = (Shape) view;
+ // gradient take in account fill color and gradient 1
+ command = new EMFtoGEFCommandWrapper(SetCommand.create(createdEditpart.getEditingDomain(), shape, NotationPackage.eINSTANCE.getFillStyle_FillColor(), 0));
+ Assert.assertTrue("the command must be executable", command.canExecute());
+ executeOnUIThread(command);
+ command = new EMFtoGEFCommandWrapper(SetCommand.create(createdEditpart.getEditingDomain(), shape, NotationPackage.eINSTANCE.getFillStyle_Gradient(), null));
+ Assert.assertTrue("the command must be executable", command.canExecute());
+ executeOnUIThread(command);
+ command = new EMFtoGEFCommandWrapper(SetCommand.create(createdEditpart.getEditingDomain(), shape, NotationPackage.eINSTANCE.getFillStyle_Gradient(), new GradientData(256, 512, GradientStyle.VERTICAL)));
+ Assert.assertTrue("the command must be executable", command.canExecute());
+ executeOnUIThread(command);
+ createdEditpart.refresh();
+ createdEditpart.isActive();
+ IFigure fig = getPrimaryFigure(createdEditpart);
+ Assert.assertTrue("Figure must be an instance of Nodefigure", fig instanceof NodeFigure);
+ Assert.assertEquals("the gradient background is not refreshed", Display.getDefault().getSystemColor(SWT.COLOR_BLACK), ((NodeFigure) fig).getBackgroundColor());
+ Assert.assertEquals("the gradient color1 is not refreshed", 0, ((NodeFigure) fig).getGradientColor1());
+ Assert.assertEquals("the gradient color2 is not refreshed", 256, ((NodeFigure) fig).getGradientColor2());
+ Assert.assertEquals("the gradient style is not refreshed", 0, ((NodeFigure) fig).getGradientStyle());
+ }
+
+ /**
+ * test the if the line width is refreshed on the figure
+ *
+ * @param createdEditpart
+ */
+ public void testLineWidth(GraphicalEditPart createdEditpart) {
+ View view = createdEditpart.getNotationView();
+ assertTrue("view must be instance of Shape", view instanceof Shape);
+ Shape shape = (Shape) view;
+ command = new EMFtoGEFCommandWrapper(SetCommand.create(createdEditpart.getEditingDomain(), shape, NotationPackage.eINSTANCE.getLineStyle_LineWidth(), 10));
+ Assert.assertTrue("the command must be executable", command.canExecute());
+ executeOnUIThread(command);
+ command = new EMFtoGEFCommandWrapper(SetCommand.create(createdEditpart.getEditingDomain(), shape, NotationPackage.eINSTANCE.getFillStyle_Gradient(), null));
+ Assert.assertTrue("the command must be executable", command.canExecute());
+ executeOnUIThread(command);
+ createdEditpart.refresh();
+ createdEditpart.isActive();
+ IFigure fig = getPrimaryFigure(createdEditpart);
+ Assert.assertTrue("Figure must be an instance of Nodefigure", fig instanceof NodeFigure);
+ Assert.assertEquals("the line width is not refreshed", 10, ((NodeFigure) fig).getLineWidth());
+
+ }
+
+ /**
+ * test the if the transparency is refreshed on the figure
+ *
+ * @param createdEditpart
+ */
+ public void testTransparency(GraphicalEditPart createdEditpart) {
+ View view = createdEditpart.getNotationView();
+ assertTrue("view must be instance of Shape", view instanceof Shape);
+ Shape shape = (Shape) view;
+
+ // Comment and Constraint shapes, at least, require a gradient to support transparency
+ command = new EMFtoGEFCommandWrapper(
+ SetCommand.create(createdEditpart.getEditingDomain(), shape, NotationPackage.eINSTANCE.getFillStyle_Gradient(), GradientData.getDefaultGradientData()).chain(
+ SetCommand.create(createdEditpart.getEditingDomain(), shape, NotationPackage.eINSTANCE.getFillStyle_Transparency(), 50)));
+ Assert.assertTrue("the command must be executable", command.canExecute());
+ executeOnUIThread(command);
+ createdEditpart.refresh();
+ createdEditpart.isActive();
+ IFigure fig = getPrimaryFigure(createdEditpart);
+ Assert.assertTrue("Figure must be an instance of Nodefigure", fig instanceof NodeFigure);
+ Assert.assertEquals("the transparency is not refreshed", 50, ((NodeFigure) fig).getTransparency());
+ }
+
+ /**
+ * test the if the font of the contained label is refreshed on the figure
+ *
+ * @param createdEditpart
+ */
+ public void testFont(GraphicalEditPart createdEditpart) {
+ View view = createdEditpart.getNotationView();
+ assertTrue("view must be instance of Shape", view instanceof Shape);
+ Shape shape = (Shape) view;
+ command = new EMFtoGEFCommandWrapper(SetCommand.create(createdEditpart.getEditingDomain(), shape, NotationPackage.eINSTANCE.getFontStyle_FontName(), "Arial"));
+ Assert.assertTrue("the command must be executable", command.canExecute());
+ executeOnUIThread(command);
+ createdEditpart.refresh();
+ createdEditpart.isActive();
+ if (!(createdEditpart instanceof ITextAwareEditPart)) {
+ EditPart nameEditpart = createdEditpart.getPrimaryChildEditPart();
+ if (nameEditpart instanceof ITextAwareEditPart) {
+ IFigure fig = getPrimaryFigure((GraphicalEditPart) nameEditpart);
+ Assert.assertEquals("the font face is not refreshed", "Arial", fig.getFont().getFontData()[0].getName());
+ }
+ }
+
+ }
+
+ /**
+ * test the if the font of the contained label is refreshed on the figure
+ *
+ * @param createdEditpart
+ */
+ public void testFont_Italic(GraphicalEditPart createdEditpart) {
+ View view = createdEditpart.getNotationView();
+ assertTrue("view must be instance of Shape", view instanceof Shape);
+ Shape shape = (Shape) view;
+ command = new EMFtoGEFCommandWrapper(SetCommand.create(createdEditpart.getEditingDomain(), shape, NotationPackage.eINSTANCE.getFontStyle_Italic(), true));
+ Assert.assertTrue("the command must be executable", command.canExecute());
+ executeOnUIThread(command);
+ createdEditpart.refresh();
+ createdEditpart.isActive();
+ if (!(createdEditpart instanceof ITextAwareEditPart)) {
+ EditPart nameEditpart = createdEditpart.getPrimaryChildEditPart();
+ if (nameEditpart instanceof ITextAwareEditPart) {
+ IFigure fig = getPrimaryFigure((GraphicalEditPart) nameEditpart);
+ Assert.assertEquals("the font style is not refreshed", SWT.ITALIC, ((WrappingLabel) fig).getFont().getFontData()[0].getStyle() & SWT.ITALIC);
+ }
+ }
+
+ }
+
+ /**
+ * test the if the font of the contained label is refreshed on the figure
+ *
+ * @param createdEditpart
+ */
+ public void testFont_Bold(GraphicalEditPart createdEditpart) {
+ View view = createdEditpart.getNotationView();
+ assertTrue("view must be instance of Shape", view instanceof Shape);
+ Shape shape = (Shape) view;
+ command = new EMFtoGEFCommandWrapper(SetCommand.create(createdEditpart.getEditingDomain(), shape, NotationPackage.eINSTANCE.getFontStyle_Bold(), true));
+ Assert.assertTrue("the command must be executable", command.canExecute());
+ executeOnUIThread(command);
+ createdEditpart.refresh();
+ createdEditpart.isActive();
+ if (!(createdEditpart instanceof ITextAwareEditPart)) {
+ EditPart nameEditpart = createdEditpart.getPrimaryChildEditPart();
+ if (nameEditpart instanceof ITextAwareEditPart) {
+ IFigure fig = getPrimaryFigure((GraphicalEditPart) nameEditpart);
+ Assert.assertTrue("Figure must be an instance of Nodefigure", fig instanceof WrappingLabel);
+ Assert.assertEquals("the font style is not refreshed", SWT.BOLD, ((WrappingLabel) fig).getFont().getFontData()[0].getStyle() & SWT.BOLD);
+ }
+ }
+
+ }
+
+ /**
+ * test the if the font height of the contained label is refreshed on the figure
+ *
+ * @param createdEditpart
+ */
+ public void testFontHeight(GraphicalEditPart createdEditpart) {
+ View view = createdEditpart.getNotationView();
+ assertTrue("view must be instance of Shape", view instanceof Shape);
+ Shape shape = (Shape) view;
+ int newFontHeight = shape.getFontHeight() + 2;
+ command = new EMFtoGEFCommandWrapper(SetCommand.create(createdEditpart.getEditingDomain(), shape, NotationPackage.eINSTANCE.getFontStyle_FontHeight(), newFontHeight));
+ Assert.assertTrue("the command must be executable", command.canExecute());
+ executeOnUIThread(command);
+ createdEditpart.refresh();
+ createdEditpart.isActive();
+ if (!(createdEditpart instanceof ITextAwareEditPart)) {
+ EditPart nameEditpart = createdEditpart.getPrimaryChildEditPart();
+ if (nameEditpart instanceof ITextAwareEditPart) {
+ IFigure fig = getPrimaryFigure((GraphicalEditPart) nameEditpart);
+ Assert.assertEquals("the font height is not refreshed", newFontHeight, (int) fig.getFont().getFontData()[0].height);
+ }
+ }
+ }
+
+ /**
+ * test the if the font height of the contained label is refreshed on the figure
+ *
+ * @param createdEditpart
+ */
+ public void testFont_Underline(GraphicalEditPart createdEditpart) {
+ View view = createdEditpart.getNotationView();
+ assertTrue("view must be instance of Shape", view instanceof Shape);
+ Shape shape = (Shape) view;
+ command = new EMFtoGEFCommandWrapper(SetCommand.create(createdEditpart.getEditingDomain(), shape, NotationPackage.eINSTANCE.getFontStyle_Underline(), true));
+ Assert.assertTrue("the command must be executable", command.canExecute());
+ executeOnUIThread(command);
+ createdEditpart.refresh();
+ createdEditpart.isActive();
+ if (!(createdEditpart instanceof ITextAwareEditPart)) {
+ EditPart nameEditpart = createdEditpart.getPrimaryChildEditPart();
+ if (nameEditpart instanceof ITextAwareEditPart) {
+ IFigure fig = getPrimaryFigure((GraphicalEditPart) nameEditpart);
+ TextFlowEx flow = findTextFlow(fig);
+ assertThat("No text flow found", flow, notNullValue());
+ Assert.assertEquals("the font style is not refreshed", true, flow.isTextUnderlined());
+ }
+ }
+ }
+
+ TextFlowEx findTextFlow(IFigure figure) {
+ TextFlowEx result = null;
+
+ if (figure instanceof TextFlowEx) {
+ result = (TextFlowEx) figure;
+ } else {
+ for (Iterator<IFigure> iter = Iterators.filter(figure.getChildren().iterator(), IFigure.class); (result == null) && iter.hasNext();) {
+ result = findTextFlow(iter.next());
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * test the if the font height of the contained label is refreshed on the figure
+ *
+ * @param createdEditpart
+ */
+ public void testFont_StrikeThrough(GraphicalEditPart createdEditpart) {
+ View view = createdEditpart.getNotationView();
+ assertTrue("view must be instance of Shape", view instanceof Shape);
+ Shape shape = (Shape) view;
+ command = new EMFtoGEFCommandWrapper(SetCommand.create(createdEditpart.getEditingDomain(), shape, NotationPackage.eINSTANCE.getFontStyle_StrikeThrough(), true));
+ Assert.assertTrue("the command must be executable", command.canExecute());
+ executeOnUIThread(command);
+ createdEditpart.refresh();
+ createdEditpart.isActive();
+ if (!(createdEditpart instanceof ITextAwareEditPart)) {
+ EditPart nameEditpart = createdEditpart.getPrimaryChildEditPart();
+ if (nameEditpart instanceof ITextAwareEditPart) {
+ IFigure fig = getPrimaryFigure((GraphicalEditPart) nameEditpart);
+ TextFlowEx flow = findTextFlow(fig);
+ assertThat("No text flow found", flow, notNullValue());
+ Assert.assertEquals("the font style is not refreshed", true, flow.isTextStrikedThrough());
+ }
+ }
+ }
+
+
+ /**
+ * test the if the font height of the contained label is refreshed on the figure
+ *
+ * @param createdEditpart
+ */
+ public void testFont_FontColor(GraphicalEditPart createdEditpart) {
+ View view = createdEditpart.getNotationView();
+ assertTrue("view must be instance of Shape", view instanceof Shape);
+ Shape shape = (Shape) view;
+ command = new EMFtoGEFCommandWrapper(SetCommand.create(createdEditpart.getEditingDomain(), shape, NotationPackage.eINSTANCE.getFontStyle_FontColor(), FigureUtilities.RGBToInteger(new RGB(0, 255, 0))));
+ Assert.assertTrue("the command must be executable", command.canExecute());
+ executeOnUIThread(command);
+ createdEditpart.refresh();
+ createdEditpart.isActive();
+ if (!(createdEditpart instanceof ITextAwareEditPart)) {
+ EditPart nameEditpart = createdEditpart.getPrimaryChildEditPart();
+ if (nameEditpart instanceof ITextAwareEditPart) {
+ IFigure fig = getPrimaryFigure((GraphicalEditPart) nameEditpart);
+ Assert.assertEquals("the foreground colour is not refreshed", Display.getDefault().getSystemColor(SWT.COLOR_GREEN), fig.getForegroundColor());
+ }
+ }
+ }
+
+ /**
+ * test the if the icon of the contained label is refreshed on the figure
+ *
+ * @param createdEditpart
+ */
+ public void testElementIcon(GraphicalEditPart createdEditpart) {
+ View view = createdEditpart.getNotationView();
+ assertTrue("view must be instance of Shape", view instanceof Shape);
+ Shape shape = (Shape) view;
+ command = new EMFtoGEFCommandWrapper(AnnotationStyleProvider.getSetElementIconCommand(createdEditpart.getEditingDomain(), shape, true));
+ Assert.assertTrue("the command must be executable", command.canExecute());
+ executeOnUIThread(command);
+ createdEditpart.refresh();
+ createdEditpart.isActive();
+ if (!(createdEditpart instanceof ITextAwareEditPart)) {
+ EditPart nameEditpart = createdEditpart.getPrimaryChildEditPart();
+ if (nameEditpart instanceof ITextAwareEditPart) {
+ IFigure fig = getPrimaryFigure((GraphicalEditPart) nameEditpart);
+ Assert.assertTrue("Figure must be an instance of Nodefigure", fig instanceof WrappingLabel);
+ Assert.assertNotNull("icon of the label is not refreshed", ((WrappingLabel) fig).getIcon());
+ }
+ }
+ }
+
+ /**
+ * test the if the shadow is refreshed on the figure
+ *
+ * @param createdEditpart
+ */
+ public void testShadow(GraphicalEditPart createdEditpart) {
+ View view = createdEditpart.getNotationView();
+ assertTrue("view must be instance of Shape", view instanceof Shape);
+ Shape shape = (Shape) view;
+ command = new EMFtoGEFCommandWrapper(AnnotationStyleProvider.getSetShadowCommand(createdEditpart.getEditingDomain(), shape, true));
+ Assert.assertTrue("the command must be executable", command.canExecute());
+ executeOnUIThread(command);
+ createdEditpart.refresh();
+ createdEditpart.isActive();
+ IFigure fig = getPrimaryFigure(createdEditpart);
+ Assert.assertTrue("Figure must be an instance of Nodefigure", fig instanceof NodeFigure);
+
+ if (fig instanceof RoundedCompartmentFigure) {
+ // This kind of figure always replaces its shadow border with a plain rectangle border
+ // because it has custom paint behaviour that draws its own border
+ Assert.assertTrue("the shadow is not refreshed", ((RoundedCompartmentFigure) fig).isShadow());
+ } else if (fig instanceof PapyrusNodeFigure) {
+ Assert.assertTrue("the shadow is not refreshed", ((NodeFigure) fig).getBorder() instanceof RectangularShadowBorder);
+ } else if (fig instanceof CornerBentFigure) {
+ Assert.assertTrue("the shadow is not refreshed", ((CornerBentFigure) fig).getBorder() instanceof NoteShadowBorder);
+ } else {
+ Assert.fail("unverified figure type: " + fig.getClass().getName());
+ }
+ }
+
+ @Override
+ public void testAppearance(IElementType type) {
+ GraphicalEditPart createdEditpart = createNodeOptionally(type, getContainerEditPart());
+ testBackgroundColor(createdEditpart);
+ testForegroundColor(createdEditpart);
+ testGradient(createdEditpart);
+ testLineWidth(createdEditpart);
+ testTransparency(createdEditpart);
+ testFont(createdEditpart);
+ testFontHeight(createdEditpart);
+ testFont_FontColor(createdEditpart);
+ testFont_StrikeThrough(createdEditpart);
+ testFont_Underline(createdEditpart);
+ testElementIcon(createdEditpart);
+ testShadow(createdEditpart);
+ testFont_Italic(createdEditpart);
+ testFont_Bold(createdEditpart);
+
+
+ }
+}
diff --git a/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/appearance/AppearanceElementTest.java b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/appearance/AppearanceElementTest.java
new file mode 100755
index 0000000..5dbc92b
--- /dev/null
+++ b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/appearance/AppearanceElementTest.java
@@ -0,0 +1,28 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * (CEA LIST) - Initial API and implementation
+ /*****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.tests.appearance;
+
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.uml.diagram.tests.canonical.AbstractPapyrusTestCase;
+
+
+public abstract class AppearanceElementTest extends AbstractPapyrusTestCase{
+
+
+ public abstract void testAppearance(IElementType type);
+ public abstract GraphicalEditPart getContainerEditPart();
+
+
+
+}
diff --git a/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/appearance/AppearanceNodeLabelTest.java b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/appearance/AppearanceNodeLabelTest.java
new file mode 100755
index 0000000..a72eeed
--- /dev/null
+++ b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/appearance/AppearanceNodeLabelTest.java
@@ -0,0 +1,21 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2015 CEA LIST, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus - bug 464647
+ *
+ /*****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.tests.appearance;
+
+/**
+ * Abstract test suite for the appearance tests of a node label edit-part.
+ */
+public abstract class AppearanceNodeLabelTest extends AbstractAppearanceNodeTest {
+ // No specific API or implementation
+}
diff --git a/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/AbstractGenericShapeTest.java b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/AbstractGenericShapeTest.java
new file mode 100755
index 0000000..de29fdd
--- /dev/null
+++ b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/AbstractGenericShapeTest.java
@@ -0,0 +1,90 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.tests.canonical;
+
+import java.util.List;
+
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedBorderNamedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * Test if lists of class return by getRoundedCompartmentEditParts and by
+ * getRoundedBorderNamedElementEditParts extends respectively RoundedCompartmentEditPart and
+ * RoundedBorderNamedElementEditPart.
+ */
+abstract public class AbstractGenericShapeTest extends AbstractPapyrusTest {
+
+ /**
+ * Test rounded compartment edit parts.
+ */
+ @Test
+ public void testRoundedCompartmentEditParts() {
+
+ List<Class<?>> roundedCompartmentEditParts = getRoundedCompartmentEditParts();
+
+ for (Class<?> clazz : roundedCompartmentEditParts) {
+ Assert.assertTrue(clazz.getName() + " have to extends RoundedCompartmentEditPart", classExtends(clazz, RoundedCompartmentEditPart.class));
+ }
+ }
+
+
+ /**
+ * Test rounded border named element edit parts.
+ */
+ @Test
+ public void testRoundedBorderNamedElementEditParts() {
+
+ List<Class<?>> roundedBorderNamedElementEditParts = getRoundedBorderNamedElementEditParts();
+
+ for (Class<?> clazz : roundedBorderNamedElementEditParts) {
+ Assert.assertTrue(clazz.getName() + " have to extends RoundedBorderNamedElementEditPart", classExtends(clazz, RoundedBorderNamedElementEditPart.class));
+ }
+ }
+
+
+ /**
+ * test class1 extends directly or not of class2.
+ *
+ * @param class1
+ * the class1
+ * @param class2
+ * the class2
+ * @return true, if successful
+ */
+ private boolean classExtends(Class<?> class1, Class<?> class2) {
+ boolean extend = false;
+ while (null != class1 && !extend) {
+ extend = class1.getCanonicalName().equals(class2.getCanonicalName());
+ class1 = class1.getSuperclass();
+ }
+ return extend;
+ }
+
+ /**
+ * Gets the rounded compartment edit parts.
+ *
+ * @return the rounded compartment edit parts
+ */
+ public abstract List<Class<?>> getRoundedCompartmentEditParts();
+
+ /**
+ * Gets the rounded border named element edit parts.
+ *
+ * @return the rounded border named element edit parts
+ */
+ public abstract List<Class<?>> getRoundedBorderNamedElementEditParts();
+}
\ No newline at end of file
diff --git a/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/AbstractPapyrusSemanticTestCase.java b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/AbstractPapyrusSemanticTestCase.java
new file mode 100755
index 0000000..5678879
--- /dev/null
+++ b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/AbstractPapyrusSemanticTestCase.java
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.diagram.tests.canonical;
+
+import static org.junit.Assert.assertNotNull;
+
+import java.util.List;
+
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.junit.Assert;
+
+public abstract class AbstractPapyrusSemanticTestCase extends AbstractPapyrusTestCase {
+
+ /**
+ * create childNodeEditPart in parentEditPart
+ */
+ protected IGraphicalEditPart createChild(String childVID, IGraphicalEditPart container) {
+ final CreateViewRequest requestcreation = createRequest(childVID, container);
+ Command cmd = container.getCommand(requestcreation);
+ executeOnUIThread(cmd);
+ return findChildBySemanticHint(container, childVID);
+ }
+
+ protected CreateViewRequest createRequest(String childVID, IGraphicalEditPart container) {
+ final IElementType childType = getTypeByID(childVID);
+ final CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(childType, container.getDiagramPreferencesHint());
+ requestcreation.setSize(new Dimension(1, 1));
+ requestcreation.setLocation(new Point(10, 10));
+ return requestcreation;
+ }
+
+ protected abstract IElementType getTypeByID(String vid);
+
+ protected IGraphicalEditPart findChildBySemanticHint(IGraphicalEditPart parent, String vid) {
+ IGraphicalEditPart childEP = parent.getChildBySemanticHint(vid);
+ Assert.assertNotNull("Parent " + parent + ", type " + parent.getNotationView() + " looking for: " + vid, childEP);
+ return childEP;
+ }
+
+ public void checkListElementReferenceSemantic(IGraphicalEditPart childEP, IGraphicalEditPart parentEP, EReference... expectedFeature) {
+ EObject child = getSemanticElement(childEP);
+ EObject parent = getSemanticElement(parentEP);
+ for (EReference feature: expectedFeature) {
+ Object objectList = parent.eGet(feature);
+ Assert.assertTrue("Feature result should be list", objectList instanceof List<?>);
+ List<?> children = (List<?>) objectList;
+ Assert.assertTrue(getAssertMasageForContainChild(parent, child, feature), children.contains(child));
+ }
+ }
+
+ public void checkOneElementReferenceSemantic(IGraphicalEditPart childEP, IGraphicalEditPart parentEP, EReference feature) {
+ EObject child = getSemanticElement(childEP);
+ EObject parent = getSemanticElement(parentEP);
+
+ Object objectChildElement = parent.eGet(feature);
+ Assert.assertEquals(getAssertMasageForContainChild(child, parent, feature), child, objectChildElement);
+ }
+
+ protected EObject getSemanticElement(IGraphicalEditPart ep) {
+ EObject activityNode = ep.resolveSemanticElement();
+ assertNotNull("Primary view of " + ep.getNotationView() + " must have EObject element", activityNode);
+ return activityNode;
+ }
+
+ protected String getAssertMasageForContainChild(EObject child, EObject parent, EReference feature) {
+ return "Element:" + parent.getClass().getSimpleName() + "should contein child:" + child.getClass().getSimpleName() + " in feature: " + feature.getName();
+ }
+}
diff --git a/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/AbstractPapyrusTestCase.java b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/AbstractPapyrusTestCase.java
new file mode 100755
index 0000000..766ff30
--- /dev/null
+++ b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/AbstractPapyrusTestCase.java
@@ -0,0 +1,482 @@
+/*****************************************************************************
+ * Copyright (c) 2009, 2015 CEA LIST, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434993
+ * Christian W. Damus (CEA) - bug 436047
+ * Christian W. Damus - bug 473183
+ * Christian W. Damus - bug 464647
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.tests.canonical;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.util.ArrayList;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.emf.common.command.CommandStack;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.StringValueStyle;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.commands.ICreationCommand;
+import org.eclipse.papyrus.commands.wrappers.GEFtoEMFCommandWrapper;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.core.resource.NotFoundException;
+import org.eclipse.papyrus.infra.core.services.ExtensionServicesRegistry;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.core.utils.DiResourceSet;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.infra.gmfdiag.common.reconciler.DiagramVersioningUtils;
+import org.eclipse.papyrus.infra.ui.editor.IMultiDiagramEditor;
+import org.eclipse.papyrus.infra.gmfdiag.preferences.Activator;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.HouseKeeper;
+import org.eclipse.papyrus.uml.diagram.common.commands.CreateUMLModelCommand;
+import org.eclipse.papyrus.uml.diagram.common.part.UmlGmfDiagramEditor;
+import org.eclipse.papyrus.uml.diagram.profile.CreateProfileModelCommand;
+import org.eclipse.papyrus.uml.tools.model.UmlModel;
+import org.eclipse.papyrus.uml.tools.model.UmlUtils;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.intro.IIntroPart;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.Profile;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.eclipse.uml2.uml.util.UMLUtil;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.ClassRule;
+import org.junit.Rule;
+
+/**
+ * The Class AbstractPapyrusTestCase.
+ */
+public abstract class AbstractPapyrusTestCase extends AbstractPapyrusTest {
+
+ @ClassRule
+ public static final SharedTestSuiteState suiteState = new SharedTestSuiteState();
+
+ @Rule
+ public final HouseKeeper houseKeeper = suiteState.testState();
+
+ protected boolean operationFailed = false;
+
+ /** The Constant CREATION. */
+ protected static final String CREATION = "CREATION:"; //$NON-NLS-1$
+
+ /** The Constant CONTAINER_CREATION. */
+ protected static final String CONTAINER_CREATION = "CONTAINER CREATION: "; //$NON-NLS-1$
+
+ /** The Constant DROP. */
+ protected static final String DROP = "DROP: "; //$NON-NLS-1$
+
+ /** The Constant DESTROY_DELETION. */
+ protected static final String DESTROY_DELETION = "DESTROY DELETION: "; //$NON-NLS-1$
+
+ /** The Constant COMMAND_NULL. */
+ protected static final String COMMAND_NULL = " command null"; //$NON-NLS-1$
+
+ /** The Constant VIEW_DELETION. */
+ protected static final String VIEW_DELETION = "VIEW DELETION: "; //$NON-NLS-1$
+
+ /** The Constant TEST_THE_REDO. */
+ protected static final String TEST_THE_REDO = "test the redo"; //$NON-NLS-1$
+
+ /** The Constant TEST_THE_UNDO. */
+ protected static final String TEST_THE_UNDO = "test the undo"; //$NON-NLS-1$
+
+ /** The Constant TEST_THE_EXECUTION. */
+ protected static final String TEST_THE_EXECUTION = "test the execution"; //$NON-NLS-1$
+
+ /** The Constant TEST_IF_THE_COMMAND_CAN_BE_EXECUTED. */
+ protected static final String TEST_IF_THE_COMMAND_CAN_BE_EXECUTED = "test if the command can be executed"; //$NON-NLS-1$
+
+ /** The Constant TEST_IF_THE_COMMAND_IS_CREATED. */
+ protected static final String TEST_IF_THE_COMMAND_IS_CREATED = "test if the command is created"; //$NON-NLS-1$
+
+ /** The Constant INITIALIZATION_TEST. */
+ protected static final String INITIALIZATION_TEST = "Intitial State"; //$NON-NLS-1$
+
+ /** The Constant CHANGE_CONTAINER. */
+ protected static final String CHANGE_CONTAINER = "CHANGE CONTAINER"; //$NON-NLS-1$
+
+ /** The papyrus editor. */
+ protected IMultiDiagramEditor papyrusEditor;
+
+ /** The di resource set. */
+ protected ModelSet diResourceSet;
+
+ /** The project. */
+ protected IProject project;
+
+ /** The file. */
+ protected IFile file;
+
+ /** The diagram editor. */
+ protected UmlGmfDiagramEditor diagramEditor = null;
+
+ /** The diagram edit part. */
+ protected DiagramEditPart diagramEditPart;
+
+
+
+ /**
+ * @see junit.framework.TestCase#setUp()
+ *
+ * @throws Exception
+ */
+ @Before
+ public void setUp() throws Exception {
+ // Set the preference to "true" for the dialog to display existing link instead of create a new one.
+ final IPreferenceStore store = Activator.getDefault().getPreferenceStore();
+ final String alwaysCreateLinkPreferenceName = PreferencesConstantsHelper.getPapyrusEditorConstant(PreferencesConstantsHelper.RESTORE_LINK_ELEMENT);
+ store.setValue(alwaysCreateLinkPreferenceName, true);
+ store.setDefault(alwaysCreateLinkPreferenceName, true);
+
+ suiteState.setupTest();
+ }
+
+ void doSetUp() throws Exception {
+ projectCreation();
+
+ }
+
+ /**
+ * Gets the root view.
+ *
+ * @return the root view
+ */
+ protected View getRootView() {
+ return getDiagramEditPart().getDiagramView();
+ }
+
+ /**
+ * Gets the root semantic model.
+ *
+ * @return the root semantic model
+ */
+ protected Element getRootSemanticModel() {
+ return (Element) getRootView().getElement();
+ }
+
+ /**
+ * @see junit.framework.TestCase#tearDown()
+ *
+ * @throws Exception
+ */
+ @After
+ public void tearDown() throws Exception {
+ suiteState.teardownTest();
+ }
+
+ void doTearDown() throws Exception {
+ Runnable runnable = new Runnable() {
+
+ @Override
+ public void run() {
+ // if the diagram is a Profile we dont save it because we dont need to define it
+ if (diagramEditPart == null || !diagramEditPart.getDiagramView().getType().equals("PapyrusUMLProfileDiagram")) { //$NON-NLS-1$
+ papyrusEditor.doSave(new NullProgressMonitor());
+ }
+
+ // diResourceSet.save( new NullProgressMonitor());
+ if (diagramEditor != null) {
+ diagramEditor.close(true);
+ }
+ papyrusEditor = null;
+ diagramEditPart = null;
+ diagramEditor = null;
+ }
+ };
+ Display.getDefault().syncExec(runnable);
+ }
+
+ /**
+ * Gets the diagram edit part.
+ *
+ * @return the diagram edit part
+ */
+ protected DiagramEditPart getDiagramEditPart() {
+ if (diagramEditPart == null) {
+ diagramEditor = (UmlGmfDiagramEditor) papyrusEditor.getActiveEditor();
+ diagramEditPart = papyrusEditor.getAdapter(DiagramEditPart.class);
+ Assert.assertNotNull("Cannot find the diagram editor", diagramEditor); //$NON-NLS-1$
+ Assert.assertNotNull("Cannot find the Diagram edit part", diagramEditPart); //$NON-NLS-1$
+ StringValueStyle style = (StringValueStyle) diagramEditPart.getNotationView().getNamedStyle(NotationPackage.eINSTANCE.getStringValueStyle(), DiagramVersioningUtils.COMPATIBILITY_VERSION);
+ Assert.assertNotNull("A version must be associated with every diagram", style); //$NON-NLS-1$
+ Assert.assertTrue("The created diagram has not a good version", DiagramVersioningUtils.isOfCurrentPapyrusVersion((Diagram) diagramEditPart.getNotationView())); //$NON-NLS-1$
+ }
+ return diagramEditPart;
+ }
+
+ protected abstract ICreationCommand getDiagramCommandCreation();
+
+ /**
+ * Returns the Project
+ */
+ protected abstract String getProjectName();
+
+ /**
+ * Returns the File
+ */
+ protected abstract String getFileName();
+
+ protected String[] getRequiredProfiles() {
+ return new String[0];
+ }
+
+ /**
+ * Project creation.
+ */
+ protected void projectCreation() throws Exception {
+ // assert the intro is not visible
+ Runnable closeIntroRunnable = new Runnable() {
+
+ @Override
+ public void run() {
+ try {
+ IIntroPart introPart = PlatformUI.getWorkbench().getIntroManager().getIntro();
+ if (introPart != null) {
+ PlatformUI.getWorkbench().getIntroManager().closeIntro(introPart);
+ }
+ } catch (Exception ex) {
+ ex.printStackTrace(System.out);
+ Assert.fail(ex.getMessage());
+ }
+ }
+ };
+ Display.getDefault().syncExec(closeIntroRunnable);
+ /*
+ * final String timestamp = Long.toString(System.currentTimeMillis());
+ *
+ * project = root.getProject("DiagramTestProject_" + timestamp); file =
+ * project.getFile("DiagramTest_" + timestamp + ".di"); //$NON-NLS-2$
+ */
+ project = houseKeeper.createProject(getProjectName());
+ file = project.getFile(getFileName());
+ this.diResourceSet = houseKeeper.cleanUpLater(new DiResourceSet());
+ // at this point, no resources have been created
+
+ if (file.exists()) {
+ file.delete(true, new NullProgressMonitor());
+ }
+ if (!file.exists()) {
+ // Don't create a zero-byte file. Create an empty XMI document
+ Resource diResource = diResourceSet.createResource(URI.createPlatformResourceURI(file.getFullPath().toString(), true));
+ diResource.save(null);
+ diResource.unload();
+ diResourceSet.createsModels(file);
+ if (!file.getName().endsWith(".profile.di")) { //$NON-NLS-1$
+
+ new CreateUMLModelCommand().createModel(this.diResourceSet);
+
+ ServicesRegistry registry = new ExtensionServicesRegistry(org.eclipse.papyrus.infra.core.Activator.PLUGIN_ID);
+ try {
+ registry.add(ModelSet.class, Integer.MAX_VALUE, diResourceSet); // High priority to override all contributions
+ registry.startRegistry();
+ } catch (ServiceException ex) {
+ // Ignore exceptions
+ }
+
+ // Apply the required profiles
+ ArrayList<IFile> modifiedFiles = new ArrayList<IFile>();
+ modifiedFiles.add(file);
+ ICommand commandProfiles = new AbstractTransactionalCommand(diResourceSet.getTransactionalEditingDomain(), "Apply profiles", modifiedFiles) { //$NON-NLS-1$
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ UmlModel resModel = UmlUtils.getUmlModel(diResourceSet);
+ EObject obj;
+ try {
+ obj = resModel.lookupRoot();
+ } catch (NotFoundException e) {
+ return CommandResult.newErrorCommandResult(e);
+ }
+ if (obj instanceof Model) {
+ Model model = (Model) obj;
+ for (String uri : getRequiredProfiles()) {
+ EPackage definition = EPackage.Registry.INSTANCE.getEPackage(uri);
+ if (definition != null) {
+ Profile profile = UMLUtil.getProfile(definition, model);
+ model.applyProfile(profile);
+ }
+ }
+ }
+ return CommandResult.newOKCommandResult();
+ }
+ };
+ commandProfiles.execute(new NullProgressMonitor(), null);
+
+ } else {
+ new CreateProfileModelCommand().createModel(this.diResourceSet);
+ ServicesRegistry registry = new ExtensionServicesRegistry(org.eclipse.papyrus.infra.core.Activator.PLUGIN_ID);
+ try {
+ registry.add(ModelSet.class, Integer.MAX_VALUE, diResourceSet); // High priority to override all contributions
+ registry.startRegistry();
+ } catch (ServiceException ex) {
+ // Ignore exceptions
+ }
+ }
+ ICreationCommand command = getDiagramCommandCreation();
+ command.createDiagram(diResourceSet, null, "DiagramToTest"); //$NON-NLS-1$
+ diResourceSet.save(new NullProgressMonitor());
+ }
+
+ papyrusEditor = houseKeeper.openPapyrusEditor(file);
+ Assert.assertNotNull("Failed to open the editor", papyrusEditor); //$NON-NLS-1$
+ }
+
+ /**
+ * Call {@link AbstractPapyrusTestCase#execute(Command) execute} on the UI
+ * thread.
+ */
+ protected void executeOnUIThread(final Command command) {
+ Display.getDefault().syncExec(new Runnable() {
+
+ @Override
+ public void run() {
+ execute(command);
+ }
+ });
+ }
+
+ /** Call {@link AbstractPapyrusTestCase#undo() undo} on the UI thread. */
+ protected void undoOnUIThread() {
+ Display.getDefault().syncExec(new Runnable() {
+
+ @Override
+ public void run() {
+ undo();
+ }
+ });
+ }
+
+ /** Call {@link AbstractPapyrusTestCase#redo() redo} on the UI thread. */
+ protected void redoOnUIThread() {
+ Display.getDefault().syncExec(new Runnable() {
+
+ @Override
+ public void run() {
+ redo();
+ }
+ });
+ }
+
+ protected void assertLastOperationSuccessful() {
+ Assert.assertFalse("The operation failed. Look at the log, or put a breakpoint on ExecutionException or DefaultOperationHistory#notifyNotOK to find the cause.", this.operationFailed); //$NON-NLS-1$
+ }
+
+ /**
+ * Reset the "operation failed" state. Call this before executing each
+ * operation for which you want to test whether if failed with {@link AbstractPapyrusTestCase#assertLastOperationSuccessful()}.
+ */
+ protected void resetLastOperationFailedState() {
+ this.operationFailed = false;
+ }
+
+ /** Execute the given command in the diagram editor. */
+ protected void execute(final Command command) {
+ resetLastOperationFailedState();
+ getCommandStack().execute(GEFtoEMFCommandWrapper.wrap(command));
+ assertLastOperationSuccessful();
+ }
+
+ /** Undo the last command done in the diagram editor. */
+ protected void undo() {
+ resetLastOperationFailedState();
+ final CommandStack commandStack = getCommandStack();
+ Assert.assertTrue("We should be able to undo", commandStack.canUndo()); //$NON-NLS-1$
+ commandStack.undo();
+ assertLastOperationSuccessful();
+ }
+
+ /** Redo the last command undone in the diagram editor. */
+ protected void redo() {
+ resetLastOperationFailedState();
+ final CommandStack commandStack = getCommandStack();
+ Assert.assertTrue("We should be able to redo", commandStack.canRedo()); //$NON-NLS-1$
+ commandStack.redo();
+ assertLastOperationSuccessful();
+ }
+
+ /** The command stack to use to execute commands on the diagram. */
+ protected CommandStack getCommandStack() {
+ // not "diagramEditor.getDiagramEditDomain().getDiagramCommandStack()"
+ // because it messes up undo contexts
+ return getEditingDomain().getCommandStack();
+ }
+
+ /**
+ * Create a node, if necessary. It will not be necessary if the node we are trying implicitly
+ * exists because it's the behavior frame of a behavior diagram.
+ */
+ public GraphicalEditPart createNodeOptionally(IElementType type, final IGraphicalEditPart containerEditPart) {
+
+ GraphicalEditPart result = null;
+
+ if (UMLPackage.Literals.BEHAVIOR.isSuperTypeOf(type.getEClass()) && (containerEditPart instanceof DiagramEditPart)) {
+ // Look for the existing behavior frame
+ result = (GraphicalEditPart) containerEditPart.getChildBySemanticHint(((IHintedType) type).getSemanticHint());
+ }
+
+ if (result == null) {
+ // CREATION
+ final Command[] command = { null };
+ final CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, containerEditPart.getDiagramPreferencesHint());
+ Display.getDefault().syncExec(new Runnable() {
+
+ @Override
+ public void run() {
+ command[0] = containerEditPart.getCommand(requestcreation);
+ }
+ });
+ assertNotNull("the command must not be null", command[0]);
+ assertTrue("the command must be executable", command[0].canExecute()); //$NON-NLS-1$
+ // execute the creation
+ executeOnUIThread(command[0]);
+
+ result = (GraphicalEditPart) containerEditPart.getChildren().get((containerEditPart.getChildren().size() - 1));
+ }
+
+ Assert.assertNotNull("The editpart must be created", result); //$NON-NLS-1$
+ return result;
+ }
+
+ protected TransactionalEditingDomain getEditingDomain() {
+ return diagramEditor.getEditingDomain();
+ }
+}
diff --git a/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/AbstractTestDiagram.java b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/AbstractTestDiagram.java
new file mode 100755
index 0000000..0ddbef0
--- /dev/null
+++ b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/AbstractTestDiagram.java
@@ -0,0 +1,126 @@
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Benoit Maggi (CEA LIST) benoit.maggi@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.tests.canonical;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.updater.DiagramUpdater;
+import org.eclipse.papyrus.views.modelexplorer.NavigatorUtils;
+import org.eclipse.uml2.uml.Element;
+import org.junit.Assert;
+import org.junit.Before;
+
+/**
+ * Abstract class to test diagrams :
+ * - drop a diagram from model explorer to a diagram
+ */
+public abstract class AbstractTestDiagram extends org.eclipse.papyrus.uml.diagram.tests.canonical.AbstractPapyrusTestCase {
+
+
+ /** command computed on the ui thread */
+ protected Command command;
+
+ /**
+ * @see org.eclipse.papyrus.diagram.clazz.test.canonical.AbstractPapyrusTestCase#setUp()
+ *
+ * @throws Exception
+ */
+ @Before
+ @Override
+ public void setUp() throws Exception {
+ super.setUp();
+ }
+
+
+ /**
+ * @see org.eclipse.papyrus.diagram.clazz.test.canonical.AbstractPapyrusTestCase#getRootView()
+ *
+ * @return
+ */
+ @Override
+ protected View getRootView() {
+ return (View) getDiagramEditPart().getModel();
+ };
+
+ public abstract DiagramUpdater getDiagramUpdater();
+
+
+ /**
+ * TODO : Should be provided as an utility in Papyrus, but where ?
+ * most of the code comes from
+ * org.eclipse.papyrus.infra.gmfdiag.modelexplorer.queries.GetContainedDiagrams
+ */
+ protected Diagram getFirstDiagram() {
+ Element rootSemanticModel = getRootSemanticModel();
+ Iterator<EObject> roots = NavigatorUtils.getNotationRoots(rootSemanticModel);
+ while (roots.hasNext()) {
+ EObject root = roots.next();
+ if (root instanceof Diagram) {
+ Diagram diagram = (Diagram) root;
+ return diagram;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * See Bug 450341
+ * Test the drop of a diagram to a diagram
+ * @param diagram
+ * @param expectedGraphicalChildren
+ * @param expectedSemanticChildren
+ * @param addedGraphicalChildren
+ */
+ public void testDrop(Diagram diagram, int expectedGraphicalChildren, int expectedSemanticChildren, int addedGraphicalChildren) {
+ // DROP
+ assertEquals(DROP + INITIALIZATION_TEST, expectedGraphicalChildren, getRootView().getChildren().size());
+
+ assertEquals(DROP + INITIALIZATION_TEST, expectedSemanticChildren, getRootSemanticModel().getOwnedElements().size());
+
+ DropObjectsRequest dropObjectsRequest = new DropObjectsRequest();
+ List<EObject> list = new ArrayList<EObject>();
+ list.add(diagram);
+ dropObjectsRequest.setObjects(list);
+ dropObjectsRequest.setLocation(new Point(40, 40));
+ Command command = getDiagramEditPart().getCommand(dropObjectsRequest);
+ assertNotNull(DROP + COMMAND_NULL, command);
+ assertTrue(DROP + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(DROP + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute());
+ // execute the drop
+ executeOnUIThread(command);
+ Assert.assertEquals(DROP + TEST_THE_EXECUTION, expectedGraphicalChildren + addedGraphicalChildren, getRootView().getChildren().size());
+ Assert.assertEquals(DROP + TEST_THE_EXECUTION, expectedSemanticChildren, getRootSemanticModel().getOwnedElements().size());
+ // undo the drop
+ undoOnUIThread();
+ Assert.assertEquals(DROP + TEST_THE_UNDO, expectedGraphicalChildren, getRootView().getChildren().size());
+ Assert.assertEquals(DROP + TEST_THE_UNDO, expectedSemanticChildren, getRootSemanticModel().getOwnedElements().size());
+ // redo the drop
+ redoOnUIThread();
+ Assert.assertEquals(DROP + TEST_THE_REDO, expectedGraphicalChildren + addedGraphicalChildren, getRootView().getChildren().size());
+ Assert.assertEquals(DROP + TEST_THE_REDO, expectedSemanticChildren, getRootSemanticModel().getOwnedElements().size());
+ }
+}
diff --git a/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/AbstractTestMultiLink.java b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/AbstractTestMultiLink.java
new file mode 100755
index 0000000..581a625
--- /dev/null
+++ b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/AbstractTestMultiLink.java
@@ -0,0 +1,434 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.tests.canonical;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.util.ArrayList;
+
+import org.eclipse.draw2d.ConnectionAnchor;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.gef.ConnectionEditPart;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.NodeEditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.RequestConstants;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gef.requests.GroupRequest;
+import org.eclipse.gef.requests.ReconnectRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeCompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.EditCommandRequestWrapper;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Relationship;
+import org.junit.Before;
+
+/**
+ * The Class MultiLink.
+ */
+public abstract class AbstractTestMultiLink extends AbstractPapyrusTestCase {
+
+ protected static final String THE_BRANCH_TO_RECONNECT_EXISTS = "the branch to reconnect exists"; //$NON-NLS-1$
+
+ protected static final String BRANCH_EXISTS_RECONNECTION_ON_TARGET = "branch exists reconnection on target "; //$NON-NLS-1$
+
+ protected static final String RECONNECTION_TARGET = "Reconnection target "; //$NON-NLS-1$
+
+ protected static final String BRANCH_EXISTS_RECONNECTION_ON_SOURCE = "branch exists reconnection on Source "; //$NON-NLS-1$
+
+ protected static final String RECONNECTION_SOURCE = "Reconnection Source "; //$NON-NLS-1$
+
+ GraphicalEditPart source = null;
+
+ GraphicalEditPart target = null;
+
+ GraphicalEditPart thirdPlayer = null;
+
+ GraphicalEditPart fourthPlayer = null;
+
+ GraphicalEditPart guestPlayer = null;
+
+ ConnectionEditPart binaryLink = null;
+
+ ShapeNodeEditPart linkNode = null;
+
+ /** The Constant CREATION. */
+ protected static final String CREATION = "CREATION:"; //$NON-NLS-1$
+
+ /** The Constant CONTAINER_CREATION. */
+ protected static final String CONTAINER_CREATION = "CONTAINER CREATION: "; //$NON-NLS-1$
+
+ /** The Constant DROP. */
+ protected static final String DROP = "DROP: "; //$NON-NLS-1$
+
+ /** The Constant DESTROY_DELETION. */
+ protected static final String DESTROY_DELETION = "DESTROY DELETION: "; //$NON-NLS-1$
+
+ /** The Constant COMMAND_NULL. */
+ protected static final String COMMAND_NULL = " command null"; //$NON-NLS-1$
+
+ /** The Constant VIEW_DELETION. */
+ protected static final String VIEW_DELETION = "VIEW DELETION: "; //$NON-NLS-1$
+
+ /** The Constant TEST_THE_REDO. */
+ protected static final String TEST_THE_REDO = "test the redo"; //$NON-NLS-1$
+
+ /** The Constant TEST_THE_UNDO. */
+ protected static final String TEST_THE_UNDO = "test the undo"; //$NON-NLS-1$
+
+ /** The Constant TEST_THE_EXECUTION. */
+ protected static final String TEST_THE_EXECUTION = "test the execution"; //$NON-NLS-1$
+
+ /** The Constant TEST_IF_THE_COMMAND_CAN_BE_EXECUTED. */
+ protected static final String TEST_IF_THE_COMMAND_CAN_BE_EXECUTED = "test if the command can be executed"; //$NON-NLS-1$
+
+ /** The Constant TEST_IF_THE_COMMAND_IS_CREATED. */
+ protected static final String TEST_IF_THE_COMMAND_IS_CREATED = "test if the command is created"; //$NON-NLS-1$
+
+ /** The Constant INITIALIZATION_TEST. */
+ protected static final String INITIALIZATION_TEST = "Intitial State"; //$NON-NLS-1$
+
+ /** The Constant CHANGE_CONTAINER. */
+ protected static final String CHANGE_CONTAINER = "CHANGE CONTAINER"; //$NON-NLS-1$
+
+ /** The root compartment. */
+ protected ShapeCompartmentEditPart rootCompartment = null;
+
+ /**
+ * Test view deletion.
+ *
+ * @param type
+ * the type
+ */
+ public void testViewDeletion(IElementType type) {
+ //DELETION OF THE VIEW
+ //DELETION OF ALL THE VIEW
+ assertTrue(VIEW_DELETION + INITIALIZATION_TEST, linkNode != null);
+ Request deleteViewRequest = new GroupRequest(RequestConstants.REQ_DELETE);
+ Command command = linkNode.getCommand(deleteViewRequest);
+ assertNotNull(VIEW_DELETION + COMMAND_NULL, command);
+ assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, getDiagramEditPart().getChildren().size() == 5);
+ assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == 0);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(VIEW_DELETION + TEST_THE_UNDO, getDiagramEditPart().getChildren().size() == 6);
+ assertTrue(VIEW_DELETION + TEST_THE_UNDO, ((Diagram)getRootView()).getEdges().size() == 4);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(VIEW_DELETION + TEST_THE_REDO, getDiagramEditPart().getChildren().size() == 5);
+ assertTrue(VIEW_DELETION + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == 0);
+ }
+
+ public static Point getIntersectionPoint(ConnectionEditPart connEP, boolean source) {
+ ConnectionAnchor sourceAnchor;
+ ConnectionAnchor targetAnchor;
+ NodeEditPart sourceEP = (NodeEditPart)connEP.getSource();
+ NodeEditPart targetEP = (NodeEditPart)connEP.getTarget();
+ Point endLocation;
+ sourceAnchor = sourceEP.getSourceConnectionAnchor(connEP);
+ targetAnchor = targetEP.getTargetConnectionAnchor(connEP);
+ if(source) {
+ endLocation = sourceAnchor.getLocation(targetAnchor.getReferencePoint()).getCopy();
+ } else {
+ endLocation = targetAnchor.getLocation(sourceAnchor.getReferencePoint()).getCopy();
+ }
+ return endLocation;
+ }
+
+ /**
+ * Test destroy.
+ *
+ * @param type
+ * the type
+ */
+ public void testDestroy(IElementType type) {
+ //DESTROY SEMANTIC+ VIEW
+ assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 6);
+ Request deleteViewRequest = new EditCommandRequestWrapper(new DestroyElementRequest(false));
+ Command command = linkNode.getCommand(deleteViewRequest);
+ assertNotNull(DESTROY_DELETION + COMMAND_NULL, command);
+ assertTrue(DESTROY_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(DESTROY_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, getDiagramEditPart().getChildren().size() == 5);
+ assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == 0);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(DESTROY_DELETION + TEST_THE_UNDO, getDiagramEditPart().getChildren().size() == 6);
+ assertTrue(DESTROY_DELETION + TEST_THE_UNDO, ((Diagram)getRootView()).getEdges().size() == 4);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(DESTROY_DELETION + TEST_THE_REDO, getDiagramEditPart().getChildren().size() == 5);
+ assertTrue(DESTROY_DELETION + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == 0);
+ }
+
+ /**
+ * Test drop.
+ *
+ * @param type
+ * the type
+ */
+ public void testDrop(IElementType type) {
+ //DROP
+ //INIT
+ assertTrue(DROP + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 5);
+ assertTrue(DROP + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 6);
+ assertTrue(DROP + INITIALIZATION_TEST, ((Diagram)getRootView()).getEdges().size() == 0);
+ assertTrue(DROP + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().get(5) instanceof Relationship);
+ Relationship relationship = (Relationship)getRootSemanticModel().getOwnedElements().get(5);
+ //DO
+ DropObjectsRequest dropObjectsRequest = new DropObjectsRequest();
+ ArrayList<Element> list = new ArrayList<Element>();
+ list.add(relationship);
+ dropObjectsRequest.setObjects(list);
+ dropObjectsRequest.setLocation(new Point(20, 20));
+ Command command = getDiagramEditPart().getCommand(dropObjectsRequest);
+ assertNotNull(DROP + COMMAND_NULL, command);
+ assertTrue(DROP + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(DROP + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(DROP + TEST_THE_EXECUTION, getDiagramEditPart().getChildren().size() == 6);
+ assertTrue(DROP + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == 4);
+ //UNDO
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(DROP + TEST_THE_UNDO, getDiagramEditPart().getChildren().size() == 5);
+ assertTrue(DROP + TEST_THE_UNDO, ((Diagram)getRootView()).getEdges().size() == 0);
+ //REDO
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(DROP + TEST_THE_REDO, getDiagramEditPart().getChildren().size() == 6);
+ assertTrue(DROP + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 6);
+ assertTrue(DROP + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == 4);
+ }
+
+ /**
+ * Test to create a node.
+ *
+ * @param branchType
+ * type of the branch to create
+ * @param flow
+ * TODO
+ *
+ */
+ public void testToCreateAMultiLink(IElementType branchType, boolean flow) {
+ //test to create the branch for dependency to node
+ Command cmd = target.getCommand(createConnectionViewRequest(branchType, binaryLink, thirdPlayer));
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, cmd.canExecute() == true);
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().execute(cmd);
+ // EditorUtils.getTransactionalEditingDomain().getCommandStack().execute(cmd);
+ assertTrue(CREATION + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == 3);
+ assertTrue(CREATION + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 6);
+ //Undo
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(CREATION + TEST_THE_UNDO, ((Diagram)getRootView()).getEdges().size() == 1);
+ assertTrue(CREATION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 6);
+ //redo
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(CREATION + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == 3);
+ assertTrue(CREATION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 6);
+ assertTrue(CREATION + TEST_THE_REDO, getDiagramEditPart().getChildren().get(5) != null);
+ linkNode = (ShapeNodeEditPart)getDiagramEditPart().getChildren().get(5);
+ //test to create the branch from node to multidependency
+ if(flow) {
+ cmd = linkNode.getCommand(createConnectionViewRequest(branchType, fourthPlayer, linkNode));
+ } else {//test to create the branch from multidependency to node
+ cmd = linkNode.getCommand(createConnectionViewRequest(branchType, linkNode, fourthPlayer));
+ }
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, cmd.canExecute() == true);
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().execute(cmd);
+ assertTrue(CREATION + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == 4);
+ assertTrue(CREATION + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 6);
+ //undo
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(CREATION + TEST_THE_UNDO, ((Diagram)getRootView()).getEdges().size() == 3);
+ assertTrue(CREATION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 6);
+ //redo
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(CREATION + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == 4);
+ assertTrue(CREATION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 6);
+ }
+
+ public void testTargetReconnectAMultiLink(IElementType type) {
+ //target reconnection
+ ReconnectRequest reconnectRequest = new ReconnectRequest();
+ assertTrue(THE_BRANCH_TO_RECONNECT_EXISTS, (ConnectionEditPart)target.getTargetConnections().get(0) != null);
+ ConnectionEditPart branch = (ConnectionEditPart)target.getTargetConnections().get(0);
+ reconnectRequest.setConnectionEditPart(branch);
+ reconnectRequest.setTargetEditPart(guestPlayer);
+ reconnectRequest.setType(RequestConstants.REQ_RECONNECT_TARGET);
+ Command cmd = guestPlayer.getCommand(reconnectRequest);
+ assertTrue(RECONNECTION_TARGET + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, cmd.canExecute() == true);
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().execute(cmd);
+ // EditorUtils.getTransactionalEditingDomain().getCommandStack().execute(cmd);
+ assertTrue(RECONNECTION_TARGET + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == 4);
+ assertTrue(RECONNECTION_TARGET + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 6);
+ assertTrue(BRANCH_EXISTS_RECONNECTION_ON_TARGET, branch.getTarget().equals(guestPlayer));
+ //undo
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(BRANCH_EXISTS_RECONNECTION_ON_TARGET + TEST_THE_UNDO, branch.getTarget().equals(target));
+ //redo
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(BRANCH_EXISTS_RECONNECTION_ON_TARGET + TEST_THE_REDO, branch.getTarget().equals(guestPlayer));
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().undo();
+ }
+
+ public void testSourceReconnectAMultiLink(IElementType type) {
+ //target reconnection
+ ReconnectRequest reconnectRequest = new ReconnectRequest();
+ assertTrue(THE_BRANCH_TO_RECONNECT_EXISTS, (ConnectionEditPart)source.getSourceConnections().get(0) != null);
+ ConnectionEditPart branch = (ConnectionEditPart)source.getSourceConnections().get(0);
+ reconnectRequest.setConnectionEditPart(branch);
+ reconnectRequest.setTargetEditPart(guestPlayer);
+ reconnectRequest.setType(RequestConstants.REQ_RECONNECT_SOURCE);
+ Command cmd = guestPlayer.getCommand(reconnectRequest);
+ assertTrue(RECONNECTION_SOURCE + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, cmd.canExecute() == true);
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().execute(cmd);
+ assertTrue(RECONNECTION_SOURCE + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == 4);
+ assertTrue(RECONNECTION_SOURCE + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 6);
+ assertTrue(BRANCH_EXISTS_RECONNECTION_ON_SOURCE + TEST_THE_EXECUTION, branch.getSource().equals(guestPlayer));
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(BRANCH_EXISTS_RECONNECTION_ON_SOURCE + TEST_THE_UNDO, branch.getSource().equals(source));
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(BRANCH_EXISTS_RECONNECTION_ON_SOURCE + TEST_THE_REDO, branch.getSource().equals(guestPlayer));
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().undo();
+ }
+
+ public CreateConnectionViewRequest createConnectionViewRequest(IElementType type, EditPart source, EditPart target) {
+ CreateConnectionViewRequest connectionRequest = CreateViewRequestFactory.getCreateConnectionRequest(type, ((IGraphicalEditPart)getDiagramEditPart()).getDiagramPreferencesHint());
+ connectionRequest.setSourceEditPart(null);
+ connectionRequest.setTargetEditPart(source);
+ connectionRequest.setType(RequestConstants.REQ_CONNECTION_START);
+ source.getCommand(connectionRequest);
+ // Now, setup the request in preparation to get the
+ // connection end
+ // command.
+ connectionRequest.setSourceEditPart(source);
+ connectionRequest.setTargetEditPart(target);
+ connectionRequest.setType(RequestConstants.REQ_CONNECTION_END);
+ return connectionRequest;
+ }
+
+ protected abstract CreateViewRequest createViewRequestShapeContainer();
+
+ /**
+ * @see org.eclipse.papyrus.diagram.clazz.test.canonical.AbstractPapyrusTestCase#setUp()
+ *
+ * @throws Exception
+ */
+ @Before
+ @Override
+ public void setUp() throws Exception {
+ super.setUp();
+ CreateViewRequest requestcreation = createViewRequestShapeContainer();
+ //1st node
+ requestcreation.setLocation(new Point(10, 10));
+ Command command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CONTAINER_CREATION + COMMAND_NULL, command);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 1);
+ requestcreation.setLocation(new Point(400, 10));
+ //2d node
+ command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CONTAINER_CREATION + COMMAND_NULL, command);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 2);
+ requestcreation.setLocation(new Point(200, 200));
+ //3d node
+ command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CONTAINER_CREATION + COMMAND_NULL, command);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 3);
+ source = (GraphicalEditPart)getDiagramEditPart().getChildren().get(0);
+ target = (GraphicalEditPart)getDiagramEditPart().getChildren().get(1);
+ thirdPlayer = (GraphicalEditPart)getDiagramEditPart().getChildren().get(2);
+ //4d node
+ requestcreation.setLocation(new Point(400, 400));
+ command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CONTAINER_CREATION + COMMAND_NULL, command);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
+ fourthPlayer = (GraphicalEditPart)getDiagramEditPart().getChildren().get(3);
+ //4d guest
+ requestcreation.setLocation(new Point(600, 400));
+ command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CONTAINER_CREATION + COMMAND_NULL, command);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 5);
+ guestPlayer = (GraphicalEditPart)getDiagramEditPart().getChildren().get(4);
+ }
+
+ public void installbinaryLink(IElementType type) {
+ //binaryLink
+ Command command = target.getCommand(createConnectionViewRequest(type, source, target));
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram)getRootView()).getEdges().size() == 1);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 6);
+ binaryLink = (ConnectionEditPart)source.getSourceConnections().get(0);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.diagram.clazz.test.canonical.AbstractPapyrusTestCase#getRootView()
+ *
+ * @return
+ */
+ @Override
+ protected View getRootView() {
+ return (View)getDiagramEditPart().getModel();
+ }
+
+ /**
+ * Test to manage child node.
+ *
+ * @param type
+ * the type
+ * @param containerType
+ * the container type
+ */
+ public void testToManageMultiLink(IElementType binaryLinkType, IElementType branchType, boolean flow) {
+ installbinaryLink(binaryLinkType);
+ testToCreateAMultiLink(branchType, flow);
+ testTargetReconnectAMultiLink(branchType);
+ if(flow) {
+ testSourceReconnectAMultiLink(branchType);
+ }
+ testDestroy(branchType);
+ //end of the test
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(CREATION + TEST_THE_UNDO, getDiagramEditPart().getChildren().get(5) instanceof ShapeNodeEditPart);
+ linkNode = (ShapeNodeEditPart)getDiagramEditPart().getChildren().get(5);
+ testViewDeletion(branchType);
+ testDrop(branchType);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/AbstractTestNode.java b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/AbstractTestNode.java
new file mode 100755
index 0000000..0ed56f0
--- /dev/null
+++ b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/AbstractTestNode.java
@@ -0,0 +1,646 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Remi Schnekenburger (CEA LIST) - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 431618
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.tests.canonical;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.commands.IHandler;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.RequestConstants;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gef.requests.ChangeBoundsRequest;
+import org.eclipse.gef.requests.GroupRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.LabelEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ResizableCompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeCompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.EditCommandRequestWrapper;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.notation.BasicCompartment;
+import org.eclipse.gmf.runtime.notation.Shape;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.updater.DiagramUpdater;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IPapyrusEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IRoundedRectangleFigure;
+import org.eclipse.papyrus.junit.utils.DisplayUtils;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedBorderNamedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editparts.UMLCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.common.locator.PortPositionLocator;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.commands.ICommandService;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Pseudostate;
+import org.junit.Assert;
+import org.junit.Before;
+
+/**
+ * Abstract class to test nodes
+ */
+public abstract class AbstractTestNode extends org.eclipse.papyrus.uml.diagram.tests.canonical.AbstractPapyrusTestCase {
+
+ /** <code>true</code> if semantic tests should be run on graphical manipulation */
+ private boolean testSemantic;
+
+ /** command computed on the ui thread */
+ protected Command command;
+
+ /**
+ * @see org.eclipse.papyrus.diagram.clazz.test.canonical.AbstractPapyrusTestCase#setUp()
+ *
+ * @throws Exception
+ */
+ @Before
+ @Override
+ public void setUp() throws Exception {
+ super.setUp();
+ testSemantic = isSemanticTest();
+ }
+
+ /**
+ * Returns <code>true</code> if semantic tests should be also performed
+ *
+ * @return <code>true</code> if semantic tests should be also performed
+ */
+ protected boolean isSemanticTest() {
+ return false;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.diagram.clazz.test.canonical.AbstractPapyrusTestCase#getRootView()
+ *
+ * @return
+ */
+ @Override
+ protected abstract View getRootView();
+
+ public abstract DiagramUpdater getDiagramUpdater();
+
+ /**
+ * Returns the container edit part
+ */
+ protected abstract IGraphicalEditPart getContainerEditPart();
+
+
+
+ /**
+ * Test to manage child node.
+ *
+ * @param type
+ * the type
+ * @param containerType
+ * the container type
+ */
+ public void testToManageNode(IElementType type, EClass eClass, IElementType containerType, boolean containerMove, String initialName, int numberSemanticChildreen) {
+ // create a node
+ testToCreateANode(type, 0, 0, 1, 1, false, initialName, numberSemanticChildreen);
+ // creates a second one
+ testToCreateANode(type, 1, 1, 1, 1, false, initialName, numberSemanticChildreen);
+ // destroy the first element
+ testDestroy(type, 2, 2, 1, 1);
+ // destroy the second one
+ testDestroy(type, 1, 1, 1, 1);
+ // the node has been destroyed, the UML element also. restore one element
+ undoOnUIThread();
+ // the node and the UML element are present
+ testViewDeletion(type, 1, 1, 1);
+ // The node has been deleted, the uml element is still present
+ testDrop(type, eClass, 0, 1, 1);
+
+ // The element can be dropped several time in the diagrams
+ testDrop(type, eClass, 1, 1, 1);
+
+ // undo the second drop
+ undoOnUIThread();
+ // the node and element are present
+ if (containerMove) {
+ testChangeContainer(type, containerType);
+ }
+ }
+
+ /**
+ * Test to manage child node.
+ *
+ * @param type
+ * the type
+ * @param containerType
+ * the container type
+ */
+ public void testToManageNode(IElementType type, EClass eClass, IElementType containerType, boolean containerMove, int numberSemanticChildreen) {
+ testToManageNode(type, eClass, containerType, containerMove, null, numberSemanticChildreen);
+ }
+
+ /**
+ * Test to manage child node.
+ *
+ * @param type
+ * the type
+ * @param containerType
+ * the container type
+ */
+ public void testToManageNode(IElementType type, EClass eClass, IElementType containerType, boolean containerMove) {
+ testToManageNode(type, eClass, containerType, containerMove, null, 0);
+ }
+
+ /**
+ * Test to manage child node.
+ *
+ * @param type
+ * the type
+ * @param containerType
+ * the container type
+ */
+ public void testToManageNodeWithMask(IElementType type, EClass eClass, IElementType containerType, boolean containerMove, String initialName, int numberSemanticChildreen) {
+ // create a node
+ testToCreateANode(type, 0, 0, 1, 1, true, initialName, numberSemanticChildreen);
+ // creates a second one
+ testToCreateANode(type, 1, 1, 1, 1, true, initialName, numberSemanticChildreen);
+ // destroy the first element
+ testDestroy(type, 2, 2, 1, 1);
+ // destroy the second one
+ testDestroy(type, 1, 1, 1, 1);
+ // the node has been destroyed, the UML element also. restore one element
+ undoOnUIThread();
+ // the node and the UML element are present
+ testViewDeletion(type, 1, 1, 1);
+ // The node has been deleted, the uml element is still present
+ testDrop(type, eClass, 0, 1, 1);
+
+ // The element can be dropped several time in the diagrams
+ testDrop(type, eClass, 1, 1, 1);
+ // the node and element are present
+ if (containerMove) {
+ testChangeContainer(type, containerType);
+ }
+ }
+
+ /**
+ * Test to manage child node.
+ *
+ * @param type
+ * the type
+ * @param containerType
+ * the container type
+ */
+ public void testToManageNode(IElementType type, EClass eClass, IElementType containerType, boolean containerMove, EReference containmentFeature, boolean maskmanaged, int numberSemanticChildreen) {
+ // create a node
+ testToCreateANode(type);
+ // creates a second one
+ testToCreateANode(type, 1, 1, 1, 1, maskmanaged, null, numberSemanticChildreen);
+ // destroy the first element
+ testDestroy(type, 2, 2, 1, 1);
+ // destroy the second one
+ testDestroy(type, 1, 1, 1, 1);
+ // the node has been destroyed, the UML element also. restore one element
+ undoOnUIThread();
+ // the node and the UML element are present
+ testViewDeletion(type, 1, 1, 1);
+ // The node has been deleted, the uml element is still present
+ testDrop(type, eClass, 0, 1, 1);
+ // the node and element are present
+ if (containerMove) {
+ testChangeContainer(type, containerType);
+ }
+ }
+
+ /**
+ * Test to manage child node.
+ *
+ * @param type
+ * the type
+ * @param containerType
+ * the container type
+ * @deprecated, @use {@link AbstractTestNode#testToManageNode(IElementType, EClass, IElementType, boolean)}
+ */
+ @Deprecated
+ public void testToManageChildNode(IElementType type, EClass eClass, IElementType containerType, boolean containerMove, boolean maskmanaged, int numberSemanticChildreen) {
+ testToManageNode(type, eClass, containerType, containerMove, null, numberSemanticChildreen);
+ }
+
+ /**
+ * Test destroy.
+ *
+ * @param type
+ * the type
+ */
+ public void testDestroy(IElementType type) {
+ testDestroy(type, 1, 1, 1, 1);
+ }
+
+ /**
+ * Test destroy.
+ *
+ * @param type
+ * the type
+ */
+ public void testDestroy(IElementType type, int expectedGraphicalChildren, int expectedSemanticChildren, int removedGraphicalChildren, int removedSemanticChildren) {
+ // DESTROY SEMANTIC + VIEW
+ assertEquals(DESTROY_DELETION + INITIALIZATION_TEST, expectedGraphicalChildren, getRootView().getChildren().size());
+ if (testSemantic) {
+ assertEquals(DESTROY_DELETION + INITIALIZATION_TEST, expectedSemanticChildren, getRootSemanticModel().getOwnedElements().size());
+ }
+ Request deleteViewRequest = new EditCommandRequestWrapper(new DestroyElementRequest(false));
+ EditPart currentEditPart = ((GraphicalEditPart) getContainerEditPart().getChildren().get(getContainerEditPart().getChildren().size() - 1));
+ Command command = currentEditPart.getCommand(deleteViewRequest);
+ assertNotNull(DESTROY_DELETION + COMMAND_NULL, command);
+ assertTrue(DESTROY_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(DESTROY_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute());
+ testEnableForDeleteFromModel(currentEditPart);
+ executeOnUIThread(command);
+ assertEquals(DESTROY_DELETION + TEST_THE_EXECUTION, expectedGraphicalChildren - removedGraphicalChildren, getRootView().getChildren().size());
+ if (testSemantic) {
+ assertEquals(DESTROY_DELETION + INITIALIZATION_TEST, expectedSemanticChildren - removedSemanticChildren, getRootSemanticModel().getOwnedElements().size());
+ }
+ undoOnUIThread();
+ assertEquals(DESTROY_DELETION + TEST_THE_UNDO, expectedGraphicalChildren, getRootView().getChildren().size());
+ if (testSemantic) {
+ assertEquals(DESTROY_DELETION + TEST_THE_UNDO, expectedSemanticChildren, getRootSemanticModel().getOwnedElements().size());
+ }
+ redoOnUIThread();
+ assertEquals(DESTROY_DELETION + TEST_THE_REDO, expectedGraphicalChildren - removedGraphicalChildren, getRootView().getChildren().size());
+ if (testSemantic) {
+ assertEquals(DESTROY_DELETION + TEST_THE_REDO, expectedSemanticChildren - removedSemanticChildren, getRootSemanticModel().getOwnedElements().size());
+ }
+ }
+
+ /**
+ * test id the handler delete from model is enable
+ *
+ * @param currentEditPart
+ */
+ protected void testEnableForDeleteFromModel(EditPart currentEditPart) {
+
+ //////////////
+
+ // It seems difficult to ensure that the selection is properly considered as the active Eclipse Selection
+ // Depending on which view/editor has the focus, Eclipse may consider that another selection is active
+ // This is a little bit brute-force but seems necessary to ensure that all tests succeed, independently
+ // of the initial Eclipse state (e.g. if another test suite has opened/enabled some different views)
+ // Also, simply calling setSelection() is not sufficient; it seems that "some things" happen asynchronously
+ // afterwards, so we need to flush events several times
+ diagramEditor.setFocus();
+ DisplayUtils.flushEventLoop();
+
+ diagramEditor.getSite().getSelectionProvider().setSelection(new StructuredSelection(currentEditPart));
+ DisplayUtils.flushEventLoop();
+
+ diagramEditor.setFocus();
+ DisplayUtils.flushEventLoop();
+ //////////////
+
+ ICommandService commandService = PlatformUI.getWorkbench().getService(ICommandService.class);
+ org.eclipse.core.commands.Command cmd = commandService.getCommand("org.eclipse.ui.edit.delete"); //$NON-NLS-1$
+ IHandler handler = cmd.getHandler();
+ boolean enabled = handler != null && handler.isHandled() && handler.isEnabled();
+ assertTrue("Delete from model handler must be enable", enabled); //$NON-NLS-1$
+ }
+
+ /**
+ * Test drop.
+ *
+ * @param type
+ * the type
+ */
+ public void testDrop(IElementType type, EClass eClass, int expectedGraphicalChildren, int expectedSemanticChildren, int addedGraphicalChildren) {
+ // DROP
+ assertEquals(DROP + INITIALIZATION_TEST, expectedGraphicalChildren, getRootView().getChildren().size());
+ if (testSemantic) {
+ assertEquals(DROP + INITIALIZATION_TEST, expectedSemanticChildren, getRootSemanticModel().getOwnedElements().size());
+ }
+ DropObjectsRequest dropObjectsRequest = new DropObjectsRequest();
+ ArrayList<Element> list = new ArrayList<Element>();
+ for (Element element : getRootSemanticModel().getOwnedElements()) {
+ if (element != null && element.eClass().equals(eClass)) {
+ list.add(element);
+ }
+ }
+ dropObjectsRequest.setObjects(list);
+ dropObjectsRequest.setLocation(new Point(40, 40));
+ Command command = getContainerEditPart().getCommand(dropObjectsRequest);
+ assertNotNull(DROP + COMMAND_NULL, command);
+ assertTrue(DROP + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(DROP + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute());
+ // execute the drop
+ executeOnUIThread(command);
+ Assert.assertEquals(DROP + TEST_THE_EXECUTION, expectedGraphicalChildren + addedGraphicalChildren, getRootView().getChildren().size());
+ if (testSemantic) {
+ Assert.assertEquals(DROP + TEST_THE_EXECUTION, expectedSemanticChildren, getRootSemanticModel().getOwnedElements().size());
+ }
+ // undo the drop
+ undoOnUIThread();
+ Assert.assertEquals(DROP + TEST_THE_UNDO, expectedGraphicalChildren, getRootView().getChildren().size());
+ if (testSemantic) {
+ Assert.assertEquals(DROP + TEST_THE_UNDO, expectedSemanticChildren, getRootSemanticModel().getOwnedElements().size());
+ }
+ // redo the drop
+ redoOnUIThread();
+ Assert.assertEquals(DROP + TEST_THE_REDO, expectedGraphicalChildren + addedGraphicalChildren, getRootView().getChildren().size());
+ if (testSemantic) {
+ assertTrue(DROP + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() != 0);
+ }
+ }
+
+ /**
+ * Test change container.
+ *
+ * @param type
+ * the type
+ * @param containerType
+ * the container type
+ */
+ public void testChangeContainer(IElementType type, IElementType containerType) {
+ // CHANGE CONTAINER
+ assertEquals(CHANGE_CONTAINER + INITIALIZATION_TEST, 1, getContainerEditPart().getChildren().size());
+ assertEquals(CHANGE_CONTAINER + INITIALIZATION_TEST, 1, getRootSemanticModel().getOwnedElements().size());
+ final Request requestcreation = CreateViewRequestFactory.getCreateShapeRequest(containerType, getContainerEditPart().getDiagramPreferencesHint());
+ command = null;
+ Display.getDefault().syncExec(new Runnable() {
+
+ public void run() {
+ command = getContainerEditPart().getCommand(requestcreation);
+ }
+ });
+ assertNotNull(CONTAINER_CREATION + COMMAND_NULL, command);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute());
+ executeOnUIThread(command);
+ assertEquals(CONTAINER_CREATION + TEST_THE_EXECUTION, 2, getRootView().getChildren().size());
+ GraphicalEditPart containerEditPart = (GraphicalEditPart) getContainerEditPart().getChildren().get(1);
+ ChangeBoundsRequest changeBoundsRequest = new ChangeBoundsRequest(RequestConstants.REQ_ADD);
+ changeBoundsRequest.setEditParts((EditPart) getContainerEditPart().getChildren().get(0));
+ changeBoundsRequest.setLocation(new Point(30, 30));
+ ShapeCompartmentEditPart compartment = null;
+ int index = 0;
+ while (compartment == null && index < containerEditPart.getChildren().size()) {
+ if ((containerEditPart.getChildren().get(index)) instanceof ShapeCompartmentEditPart) {
+ compartment = (ShapeCompartmentEditPart) (containerEditPart.getChildren().get(index));
+ }
+ index++;
+ }
+ assertTrue("Container not found", compartment != null); //$NON-NLS-1$
+ command = compartment.getCommand(changeBoundsRequest);
+ assertNotNull(CHANGE_CONTAINER, command);
+ assertTrue(CHANGE_CONTAINER + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(CHANGE_CONTAINER + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute());
+ // execute change container
+ executeOnUIThread(command);
+ assertEquals(CHANGE_CONTAINER + TEST_THE_EXECUTION, 1, getRootView().getChildren().size());
+ assertEquals(CHANGE_CONTAINER + TEST_THE_EXECUTION, 1, getRootSemanticModel().getOwnedElements().size());
+ assertEquals(CHANGE_CONTAINER + TEST_THE_EXECUTION, 1, compartment.getChildren().size());
+ // undo change container
+ undoOnUIThread();
+ assertEquals(CHANGE_CONTAINER + TEST_THE_UNDO, 2, getRootView().getChildren().size());
+ assertEquals(CHANGE_CONTAINER + TEST_THE_UNDO, 2, getRootSemanticModel().getOwnedElements().size());
+ assertEquals(CHANGE_CONTAINER + TEST_THE_EXECUTION, 0, compartment.getChildren().size());
+ // redo change container
+ redoOnUIThread();
+ assertEquals(CHANGE_CONTAINER + TEST_THE_REDO, 1, getRootView().getChildren().size());
+ assertEquals(CHANGE_CONTAINER + TEST_THE_REDO, 1, getRootSemanticModel().getOwnedElements().size());
+ assertEquals(CHANGE_CONTAINER + TEST_THE_EXECUTION, 1, compartment.getChildren().size());
+ }
+
+ /**
+ * Test to create a node.
+ *
+ * @param type
+ * the type
+ */
+ public void testToCreateANode(IElementType type, int expectedGraphicalChildren, int expectedSemanticChildren, int addedGraphicalChildren, int addedSemanticChildren, boolean maskmanaged, String initialName, int numberSemanticChildreen) {
+ command = null;
+ // CREATION
+ assertEquals(CREATION + INITIALIZATION_TEST, expectedGraphicalChildren, getRootView().getChildren().size());
+ Element root = getRootSemanticModel();
+ List<Element> ownedElements = root.getOwnedElements();
+ if (isSemanticTest()) {
+ assertEquals(CREATION + INITIALIZATION_TEST, expectedSemanticChildren, ownedElements.size());
+ }
+ final CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getContainerEditPart().getDiagramPreferencesHint());
+ Display.getDefault().syncExec(new Runnable() {
+
+ public void run() {
+ command = getContainerEditPart().getCommand(requestcreation);
+ }
+ });
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute()); //$NON-NLS-1$
+ // execute the creation
+ executeOnUIThread(command);
+ assertEquals(CREATION + TEST_THE_EXECUTION, expectedGraphicalChildren + addedGraphicalChildren, getRootView().getChildren().size());
+ if (addedGraphicalChildren >= 1) {
+ Assert.assertTrue("Node must be org.eclipse.gmf.runtime.notation.Shape", getRootView().getChildren().get(expectedGraphicalChildren + addedGraphicalChildren - 1) instanceof Shape); //$NON-NLS-1$
+ }
+
+ if (testSemantic) {
+ assertEquals(CREATION + TEST_THE_EXECUTION, expectedSemanticChildren + addedSemanticChildren, getRootSemanticModel().getOwnedElements().size());
+ }
+ // undo the creation
+ undoOnUIThread();
+ assertEquals(CREATION + TEST_THE_UNDO, expectedGraphicalChildren, getRootView().getChildren().size());
+ if (testSemantic) {
+ assertEquals(CREATION + TEST_THE_UNDO, expectedSemanticChildren, getRootSemanticModel().getOwnedElements().size());
+ }
+ // redo the creation test
+ redoOnUIThread();
+ assertEquals(CREATION + TEST_THE_REDO, expectedGraphicalChildren + addedGraphicalChildren, getRootView().getChildren().size());
+ if (testSemantic) {
+ assertEquals(CREATION + TEST_THE_REDO, expectedSemanticChildren + addedSemanticChildren, getRootSemanticModel().getOwnedElements().size());
+ }
+
+ EditPart createdEditPart = (EditPart) getContainerEditPart().getChildren().get((getContainerEditPart().getChildren().size() - 1));
+ Assert.assertNotNull("The editpart must be created", createdEditPart); //$NON-NLS-1$
+ testNodeEditPart(maskmanaged, createdEditPart, initialName);
+
+
+ // test diagram updater
+ if (getDiagramUpdater() != null) {
+ Assert.assertNotEquals("Diagram updater must detect that children has been created", 0, getDiagramUpdater().getSemanticChildren(getRootView()).size()); //$NON-NLS-1$
+ Assert.assertEquals("Diagram updater must detect that no link has been created", 0, getDiagramUpdater().getContainedLinks(getRootView()).size()); //$NON-NLS-1$
+ Assert.assertEquals("Diagram updater must detect that no link are incoming", 0, getDiagramUpdater().getIncomingLinks((View) getRootView().getChildren().get(expectedGraphicalChildren + addedGraphicalChildren - 1)).size()); //$NON-NLS-1$
+ Assert.assertEquals("Diagram updater must detect that no link are outgoing", 0, getDiagramUpdater().getOutgoingLinks((View) getRootView().getChildren().get(expectedGraphicalChildren + addedGraphicalChildren - 1)).size()); //$NON-NLS-1$
+ Assert.assertEquals(
+ "Diagram updater must detect that no children has ben created in the new element", numberSemanticChildreen, //$NON-NLS-1$
+ getDiagramUpdater().getSemanticChildren((View) getRootView().getChildren().get(expectedGraphicalChildren + addedGraphicalChildren - 1)).size());
+ Assert.assertEquals("Diagram updater must detect that no link has been created in the new element", 0, getDiagramUpdater().getContainedLinks((View) getRootView().getChildren().get(expectedGraphicalChildren + addedGraphicalChildren - 1)).size()); //$NON-NLS-1$
+ }
+ createdEditPart.getChildren();
+ for (Iterator<?> iteratorEditPart = createdEditPart.getChildren().iterator(); iteratorEditPart.hasNext();) {
+ Object subEditPart = iteratorEditPart.next();
+ if (subEditPart instanceof UMLCompartmentEditPart) {
+ Assert.assertEquals("Diagram updater must detect that children has been created", 0, getDiagramUpdater().getSemanticChildren(((CompartmentEditPart) subEditPart).getNotationView()).size()); //$NON-NLS-1$
+ }
+
+ }
+ }
+
+ /**
+ * this method is used to test the created editpart
+ *
+ * @param maskmanaged
+ * @param createdEditPart
+ */
+ protected void testNodeEditPart(boolean maskmanaged, EditPart createdEditPart, String initialName) {
+ if (maskmanaged) {
+ Assert.assertNotNull("the created editpolicy must have as MASK_MANAGED_LABEL_EDIT_POLICY", createdEditPart.getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY)); //$NON-NLS-1$
+ }
+ int index = 0;
+ while (index < createdEditPart.getChildren().size()) {
+ if ((createdEditPart.getChildren().get(index)) instanceof ResizableCompartmentEditPart) {
+ ResizableCompartmentEditPart compartment = (ResizableCompartmentEditPart) (createdEditPart.getChildren().get(index));
+ Assert.assertFalse("compartment must not be selectable", compartment.isSelectable()); //$NON-NLS-1$
+ }
+ index++;
+ }
+ testNameLabel(createdEditPart, initialName);
+ testRoundedCompartmentEditPart(createdEditPart);
+ }
+
+
+ /**
+ * Test rounded compartment edit part and rounded border named element edit part.
+ *
+ * @param createdEditPart
+ * the created edit part
+ */
+ protected void testRoundedCompartmentEditPart(final EditPart createdEditPart) {
+
+
+ if (createdEditPart instanceof RoundedBorderNamedElementEditPart) {
+ Assert.assertTrue("RoundedBorderNamedElementEditPart must have specific locator PortPositionLocator)", ((RoundedBorderNamedElementEditPart) createdEditPart).getBorderItemLocator() instanceof PortPositionLocator);
+ }
+
+ IFigure primaryShape = ((IPapyrusEditPart) createdEditPart).getPrimaryShape();
+ if (createdEditPart instanceof RoundedCompartmentEditPart || createdEditPart instanceof RoundedBorderNamedElementEditPart) {
+
+ List<?> children = createdEditPart.getChildren();
+ for (Object child : children) {
+ if (child instanceof ResizableCompartmentEditPart) {
+ // Test if has the needed edit policy
+ EditPolicy borderDisplayeditPolicy = ((ResizableCompartmentEditPart) child).getEditPolicy(BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY);
+ Assert.assertNotNull("Compartment " + child.getClass().toString() + " must have BorderDisplayEditPolicy", borderDisplayeditPolicy);
+ // Test if the compartment notation view is instance of BasicCompartment
+ Assert.assertTrue("Compartment view " + child.getClass().toString() + " must be instance of BasicCompartment", ((ResizableCompartmentEditPart) child).getModel() instanceof BasicCompartment);
+ }
+
+ if (child instanceof FloatingLabelEditPart) {
+ Assert.assertTrue("FloatingLabelEditPart must use specific locator RoundedRectangleLabelPositionLocator", ((FloatingLabelEditPart) child).getBorderItemLocator() instanceof RoundedRectangleLabelPositionLocator);
+ }
+ }
+
+ Assert.assertTrue("The Figure of " + createdEditPart.getClass().toString() + ") must implement IRoundedRectangleFigure", primaryShape instanceof IRoundedRectangleFigure);
+
+ }
+ }
+
+ protected void testNameLabel(EditPart createdEditPart, String initialName) {
+ if (createdEditPart instanceof NamedElementEditPart) {
+ GraphicalEditPart namedEditPart = (GraphicalEditPart) ((NamedElementEditPart) createdEditPart).getPrimaryChildEditPart();
+ Assert.assertTrue("the primary editpart must be the namelabelEditpart", namedEditPart instanceof ITextAwareEditPart); //$NON-NLS-1$
+ String name = namedEditPart.resolveSemanticElement().eClass().getName();
+ if (initialName != null) {
+ name = initialName;
+ }
+ // Don't test if it's a Pseudostate: the name = the kind of element
+ if (!(((View) namedEditPart.getModel()).getElement() instanceof Pseudostate)) {
+ if (name.length() < ((ITextAwareEditPart) namedEditPart).getEditText().length()) {
+ Assert.assertEquals(" the name must contain the name of the metaclass", name, ((ITextAwareEditPart) namedEditPart).getEditText().substring(0, name.length())); //$NON-NLS-1$
+ } else {
+ // not the same it sure but display the mistake is important
+ Assert.assertEquals(" the name must contain the name of the metaclass", name, ((ITextAwareEditPart) namedEditPart).getEditText()); //$NON-NLS-1$
+ }
+ }
+ if (namedEditPart instanceof CompartmentEditPart) {
+ Assert.assertTrue("the primary editpart must be the namelabelEditpart", namedEditPart instanceof CompartmentEditPart); //$NON-NLS-1$
+ Assert.assertTrue("namelabelEditpart must be editable", ((CompartmentEditPart) namedEditPart).isEditModeEnabled()); //$NON-NLS-1$
+ } else {
+ Assert.assertTrue("the primary editpart must be the namelabelEditpart", namedEditPart instanceof LabelEditPart); //$NON-NLS-1$
+
+ }
+ }
+ }
+
+ /**
+ * Test to create a node.
+ *
+ * @param type
+ * the type
+ */
+ public void testToCreateANode(IElementType type) {
+ testToCreateANode(type, 0, getRequiredProfiles().length, 1, 1, false, null, 0);
+ }
+
+ /**
+ * Test view deletion.
+ *
+ * @param type
+ * the type
+ */
+ public void testViewDeletion(IElementType type, int expectedGraphicalChildren, int expectedSemanticChildren, int removedGraphicalChildren) {
+ // DELETION OF THE VIEW
+ assertEquals(VIEW_DELETION + INITIALIZATION_TEST, expectedGraphicalChildren, getRootView().getChildren().size());
+
+ Request deleteViewRequest = new GroupRequest(RequestConstants.REQ_DELETE);
+ Command command = ((IGraphicalEditPart) getContainerEditPart().getChildren().get(getContainerEditPart().getChildren().size() - 1)).getCommand(deleteViewRequest);
+ assertNotNull(VIEW_DELETION + COMMAND_NULL, command);
+ assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute());
+ // execute hide the view
+ executeOnUIThread(command);
+ assertEquals(VIEW_DELETION + TEST_THE_EXECUTION, expectedGraphicalChildren - removedGraphicalChildren, getRootView().getChildren().size());
+ if (testSemantic) {
+ Assert.assertEquals(VIEW_DELETION + TEST_THE_EXECUTION, expectedSemanticChildren, getRootSemanticModel().getOwnedElements().size());
+ }
+ // undo hide the view
+ undoOnUIThread();
+ assertEquals(VIEW_DELETION + TEST_THE_UNDO, expectedGraphicalChildren, getRootView().getChildren().size());
+ if (testSemantic) {
+ Assert.assertEquals(VIEW_DELETION + TEST_THE_EXECUTION, expectedSemanticChildren, getRootSemanticModel().getOwnedElements().size());
+ }
+ // redo hide the view
+ redoOnUIThread();
+ assertEquals(VIEW_DELETION + TEST_THE_REDO, expectedGraphicalChildren - removedGraphicalChildren, getRootView().getChildren().size());
+ if (testSemantic) {
+ Assert.assertEquals(VIEW_DELETION + TEST_THE_EXECUTION, expectedSemanticChildren, getRootSemanticModel().getOwnedElements().size());
+ }
+ }
+
+ protected abstract CreateViewRequest createViewRequestShapeContainer();
+}
diff --git a/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/SharedTestSuiteState.java b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/SharedTestSuiteState.java
new file mode 100755
index 0000000..061124c
--- /dev/null
+++ b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/SharedTestSuiteState.java
@@ -0,0 +1,354 @@
+/*****************************************************************************
+ * Copyright (c) 2015 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.diagram.tests.canonical;
+
+import static org.junit.Assert.fail;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.StringValueStyle;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.commands.ICreationCommand;
+import org.eclipse.papyrus.infra.architecture.ArchitectureDescriptionUtils;
+import org.eclipse.papyrus.infra.architecture.ArchitectureDomainManager;
+import org.eclipse.papyrus.infra.core.architecture.merged.MergedArchitectureContext;
+import org.eclipse.papyrus.infra.core.architecture.merged.MergedArchitectureViewpoint;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.core.services.ExtensionServicesRegistry;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.gmfdiag.common.reconciler.DiagramVersioningUtils;
+import org.eclipse.papyrus.infra.ui.editor.IMultiDiagramEditor;
+import org.eclipse.papyrus.junit.utils.JUnitUtils;
+import org.eclipse.papyrus.junit.utils.rules.HouseKeeper;
+import org.eclipse.papyrus.uml.architecture.UMLArchitectureContextIds;
+import org.eclipse.papyrus.uml.tools.model.UmlModel;
+import org.eclipse.papyrus.uml.tools.utils.CustomUMLUtil;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.intro.IIntroPart;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.Assert;
+import org.junit.rules.TestRule;
+import org.junit.runner.Description;
+import org.junit.runners.model.FrameworkMethod;
+import org.junit.runners.model.Statement;
+
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.Iterators;
+import com.google.common.collect.Lists;
+
+/**
+ * <p>
+ * Shared state for the tests in a generated test suite ("test context"). Manages
+ * a single diagram editor to be shared by all of the test cases, with clean-up
+ * after each test to allow it to be safely reused by the next.
+ * </p>
+ * <p>
+ * This behavior is factored out as a test rule so as to make as little impact as possible
+ * on the structure of the base test framework, which is shared with the non-generated tests.
+ * </p>
+ */
+@StateNotShareable
+public class SharedTestSuiteState implements TestRule {
+ private final HouseKeeper houseKeeper = new HouseKeeper();
+
+ private boolean canShareState;
+
+ private AbstractPapyrusTestCase testCase;
+
+ private ModelSet modelSet;
+ private IProject project;
+ private IFile file;
+ private IMultiDiagramEditor papyrusEditor;
+ private View diagram;
+ private List<EObject> preserve;
+ private DiagramEditPart diagramEditPart;
+
+ public SharedTestSuiteState() {
+ super();
+ }
+
+ @Override
+ public Statement apply(Statement base, Description description) {
+ Statement result;
+
+ if (description.isSuite()) {
+ result = applyToTestContext(base, description);
+ } else {
+ fail("GeneratedTestSuiteStateRule may only be used with @ClassRule");
+ result = null; // Unreachable
+ }
+
+ return result;
+ }
+
+ public HouseKeeper testState() {
+ return new HouseKeeper() {
+
+ @Override
+ public Statement apply(final Statement base, FrameworkMethod method, final Object target) {
+ Statement result;
+
+ if (canShareState) {
+ result = applyToTestCase(base, method, target);
+ } else {
+ result = new Statement() {
+
+ @Override
+ public void evaluate() throws Throwable {
+ testCase = (AbstractPapyrusTestCase) target;
+ try {
+ base.evaluate();
+ } finally {
+ testCase = null;
+ }
+ }
+ };
+ }
+
+ return super.apply(result, method, target);
+ }
+ };
+ }
+
+ public IProject getProject() {
+ return project;
+ }
+
+ protected Statement applyToTestContext(final Statement base, Description description) {
+ canShareState = JUnitUtils.getAnnotation(description, StateNotShareable.class) == null;
+
+ return !canShareState
+ ? base
+ : houseKeeper.apply(base, method("apply", Statement.class, Description.class), this); //$NON-NLS-1$
+ }
+
+ private FrameworkMethod method(String name, Class<?>... parameterType) {
+ try {
+ return new FrameworkMethod(SharedTestSuiteState.class.getMethod(name, parameterType));
+ } catch (Exception e) {
+ fail(e.getMessage());
+ return null; // Unreachable
+ }
+ }
+
+ protected void createProject() throws Exception {
+ // Ensure that the intro is not visible
+ Runnable closeIntroRunnable = new Runnable() {
+
+ @Override
+ public void run() {
+ try {
+ IIntroPart introPart = PlatformUI.getWorkbench().getIntroManager().getIntro();
+ if (introPart != null) {
+ PlatformUI.getWorkbench().getIntroManager().closeIntro(introPart);
+ }
+ } catch (Exception ex) {
+ ex.printStackTrace(System.out);
+ Assert.fail(ex.getMessage());
+ }
+ }
+ };
+ Display.getDefault().syncExec(closeIntroRunnable);
+
+ // Make sure it is nullified for the next test context
+ houseKeeper.setField("project", houseKeeper.createProject(testCase.getProjectName())); //$NON-NLS-1$
+ houseKeeper.setField("file", project.getFile(testCase.getFileName())); //$NON-NLS-1$
+
+ @SuppressWarnings("deprecation")
+ ModelSet _modelSet = houseKeeper.cleanUpLater(new org.eclipse.papyrus.infra.core.utils.DiResourceSet());
+ modelSet = _modelSet;
+ // at this point, no resources have been created
+
+ if (file.exists()) {
+ file.delete(true, null);
+ }
+ if (!file.exists()) {
+ URI fileURI = URI.createPlatformResourceURI(file.getFullPath().toString(), true);
+ modelSet.createModels(fileURI);
+
+ final String contextId="org.eclipse.papyrus.sysml.architecture.SysML";
+// if (fileURI.lastSegment().matches(".*\\.profile\\.(di|uml)"))
+// contextId = UMLArchitectureContextIds.Profile;
+// else
+// contextId = UMLArchitectureContextIds.UML;
+
+ final List<String> viewpointIds = new ArrayList<String>();
+ MergedArchitectureContext context = ArchitectureDomainManager.getInstance().getArchitectureContextById(contextId);
+ for (MergedArchitectureViewpoint viewpoint : context.getViewpoints()) {
+ viewpointIds.add(viewpoint.getId());
+ }
+
+ ArchitectureDescriptionUtils utils = new ArchitectureDescriptionUtils(modelSet);
+ Command c = utils.createNewModel(contextId, viewpointIds.toArray(new String[0]));
+
+ TransactionalEditingDomain ted = modelSet.getTransactionalEditingDomain();
+ ted.getCommandStack().execute(c);
+
+ ServicesRegistry registry = new ExtensionServicesRegistry(org.eclipse.papyrus.infra.core.Activator.PLUGIN_ID);
+ try {
+ registry.add(ModelSet.class, Integer.MAX_VALUE, modelSet); // High priority to override all contributions
+ registry.startRegistry();
+ } catch (ServiceException ex) {
+ // Ignore exceptions
+ }
+ }
+ }
+
+ protected void createDiagramEditor() throws Exception {
+ // If we're not the first test in the suite, there will already be a diagram
+ if (diagram == null) {
+ // First, create the diagram
+ ICreationCommand command = testCase.getDiagramCommandCreation();
+ command.createDiagram(modelSet, null, "DiagramToTest"); //$NON-NLS-1$
+
+ // Must save the model so that the editor may open it
+ modelSet.save(new NullProgressMonitor());
+
+ // Forget this resource set; we'll get the editor's to replace it
+ modelSet.unload();
+
+ // Then, open the Papyrus editor
+ papyrusEditor = houseKeeper.openPapyrusEditor(file);
+ Assert.assertNotNull("Failed to open the editor", papyrusEditor); //$NON-NLS-1$
+
+ // Get the new resource set from this editor
+ modelSet = papyrusEditor.getServicesRegistry().getService(ModelSet.class);
+
+ // And get the diagram
+ diagram = getDiagramEditPart().getDiagramView();
+
+ // Whatever the model and diagram are initialized with, don't destroy any of it
+ ImmutableList.Builder<EObject> preserve = ImmutableList.builder();
+ preserve.addAll(diagram.eResource().getAllContents());
+
+ UmlModel uml = (UmlModel) modelSet.getModel(UmlModel.MODEL_ID);
+ preserve.addAll(uml.getResource().getAllContents());
+
+ houseKeeper.setField("preserve", preserve.build());
+ }
+ }
+
+ /**
+ * Obtains the root model element of the test suite, that should be preserved when cleaning up
+ * each individual test case for reuse by the next. For example, in the case of behavior diagrams,
+ * this would be the behavior, itself.
+ *
+ * @param testModel
+ * the root package of the test model, which is shared by all test cases anyways
+ *
+ * @return the root model element to share amongst test cases, or {@code null} if none
+ * (just preserve the test model root package, then)
+ */
+ protected EObject getRootModelElement(Package testModel) {
+ return (EObject) EcoreUtil.getObjectByType(testModel.eContents(), UMLPackage.Literals.BEHAVIOR);
+ }
+
+ /**
+ * Gets the diagram edit part.
+ *
+ * @return the diagram edit part
+ */
+ protected DiagramEditPart getDiagramEditPart() {
+ if (diagramEditPart == null) {
+ IEditorPart diagramEditor = papyrusEditor.getActiveEditor();
+ Assert.assertNotNull("Cannot find the diagram editor from papyrusEditor : "+papyrusEditor+" title: "+papyrusEditor.getTitle(), diagramEditor); //$NON-NLS-1$
+ diagramEditPart = papyrusEditor.getAdapter(DiagramEditPart.class);
+ Assert.assertNotNull("Cannot find the Diagram edit part", diagramEditPart); //$NON-NLS-1$
+ StringValueStyle style = (StringValueStyle) diagramEditPart.getNotationView().getNamedStyle(NotationPackage.eINSTANCE.getStringValueStyle(), DiagramVersioningUtils.COMPATIBILITY_VERSION);
+ Assert.assertNotNull("A version must be associated with every diagram", style); //$NON-NLS-1$
+ Assert.assertTrue("The created diagram has not a good version", DiagramVersioningUtils.isOfCurrentPapyrusVersion((Diagram) diagramEditPart.getNotationView())); //$NON-NLS-1$
+ }
+ return diagramEditPart;
+ }
+
+ protected Statement applyToTestCase(final Statement base, FrameworkMethod method, final Object testCase) {
+ return !canShareState ? base : new Statement() {
+
+ @Override
+ public void evaluate() throws Throwable {
+ SharedTestSuiteState.this.testCase = (AbstractPapyrusTestCase) testCase;
+
+ if (project == null) {
+ createProject();
+ }
+ createDiagramEditor();
+ setTestState();
+ try {
+ base.evaluate();
+ } finally {
+ cleanup();
+ SharedTestSuiteState.this.testCase = null;
+ }
+ }
+ };
+ }
+
+ protected void cleanup() throws Exception {
+ // Delete any model content previously created
+ final TransactionalEditingDomain domain = modelSet.getTransactionalEditingDomain();
+ domain.getCommandStack().execute(new RecordingCommand(domain) {
+
+ @Override
+ protected void doExecute() {
+ // Destroy any other diagrams that were created, CSS stylesheets, etc.
+ List<EObject> toDestroy = Lists.newArrayList();
+ Iterators.addAll(toDestroy, diagram.eResource().getAllContents());
+
+ UmlModel uml = (UmlModel) modelSet.getModel(UmlModel.MODEL_ID);
+ Iterators.addAll(toDestroy, uml.getResource().getAllContents());
+
+ toDestroy.removeAll(preserve);
+
+ CustomUMLUtil.destroyAll(toDestroy);
+ }
+ });
+ domain.getCommandStack().flush();
+ }
+
+ private void setTestState() {
+ testCase.project = project;
+ testCase.file = file;
+ testCase.papyrusEditor = papyrusEditor;
+ testCase.diResourceSet = modelSet;
+ }
+
+ void setupTest() throws Exception {
+ if (!canShareState) {
+ testCase.doSetUp();
+ }
+ }
+
+ void teardownTest() throws Exception {
+ if (!canShareState) {
+ testCase.doTearDown();
+ }
+ }
+}
diff --git a/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/StateNotShareable.java b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/StateNotShareable.java
new file mode 100755
index 0000000..d307641
--- /dev/null
+++ b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/StateNotShareable.java
@@ -0,0 +1,33 @@
+/*****************************************************************************
+ * Copyright (c) 2015 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.diagram.tests.canonical;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * An annotation applicable to subclasses of the {@link AbstractPapyrusTestCase} that
+ * indicates that test cases in a suite cannot share the state (in particular, the
+ * diagram editor) that is otherwise shared via the {@link SharedTestSuiteState} rule.
+ *
+ * @see AbstractPapyrusTestCase
+ * @see SharedTestSuiteState
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.TYPE)
+public @interface StateNotShareable {
+ // Empty annotation
+}
diff --git a/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestChildLabel.java b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestChildLabel.java
new file mode 100755
index 0000000..c2c3413
--- /dev/null
+++ b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestChildLabel.java
@@ -0,0 +1,440 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.tests.canonical;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.util.ArrayList;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.RequestConstants;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gef.requests.ChangeBoundsRequest;
+import org.eclipse.gef.requests.GroupRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ListCompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.EditCommandRequestWrapper;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.notation.Shape;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.updater.DiagramUpdater;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.uml2.uml.Element;
+import org.junit.Assert;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class TestChildLabel.
+ */
+public abstract class TestChildLabel extends org.eclipse.papyrus.uml.diagram.tests.canonical.AbstractPapyrusTestCase {
+
+ /** The Constant CREATION. */
+ protected static final String CREATION = "CREATION:"; //$NON-NLS-1$
+
+ /** The Constant CONTAINER_CREATION. */
+ protected static final String CONTAINER_CREATION = "CONTAINER CREATION: "; //$NON-NLS-1$
+
+ /** The Constant DROP. */
+ protected static final String DROP = "DROP: "; //$NON-NLS-1$
+
+ /** The Constant DESTROY_DELETION. */
+ protected static final String DESTROY_DELETION = "DESTROY DELETION: "; //$NON-NLS-1$
+
+ /** The Constant COMMAND_NULL. */
+ protected static final String COMMAND_NULL = " command null"; //$NON-NLS-1$
+
+ /** The Constant VIEW_DELETION. */
+ protected static final String VIEW_DELETION = "VIEW DELETION: "; //$NON-NLS-1$
+
+ /** The Constant TEST_THE_REDO. */
+ protected static final String TEST_THE_REDO = "test the redo"; //$NON-NLS-1$
+
+ /** The Constant TEST_THE_UNDO. */
+ protected static final String TEST_THE_UNDO = "test the undo"; //$NON-NLS-1$
+
+ /** The Constant TEST_THE_EXECUTION. */
+ protected static final String TEST_THE_EXECUTION = "test the execution"; //$NON-NLS-1$
+
+ /** The Constant TEST_IF_THE_COMMAND_CAN_BE_EXECUTED. */
+ protected static final String TEST_IF_THE_COMMAND_CAN_BE_EXECUTED = "test if the command can be executed"; //$NON-NLS-1$
+
+ /** The Constant TEST_IF_THE_COMMAND_IS_CREATED. */
+ protected static final String TEST_IF_THE_COMMAND_IS_CREATED = "test if the command is created"; //$NON-NLS-1$
+
+ /** The Constant INITIALIZATION_TEST. */
+ protected static final String INITIALIZATION_TEST = "Intitial State"; //$NON-NLS-1$
+
+ /** The Constant CHANGE_CONTAINER. */
+ protected static final String CHANGE_CONTAINER = "CHANGE CONTAINER"; //$NON-NLS-1$
+
+ /** The top node. */
+ protected GraphicalEditPart topNode;
+
+ public abstract DiagramUpdater getDiagramUpdater();
+
+ /**
+ * Test view deletion.
+ *
+ * @param type
+ * the type
+ * @param containerType
+ * the container type
+ */
+ public void testViewDeletion(IElementType type, String containerType) {
+ ListCompartmentEditPart compartment = null;
+ int index = 0;
+ while(compartment == null && index < getTopEditPart().getChildren().size()) {
+ if((getTopEditPart().getChildren().get(index)) instanceof ListCompartmentEditPart && (((View)((ListCompartmentEditPart)(getTopEditPart().getChildren().get(index))).getModel()).getType().equals(containerType))) { //$NON-NLS-1$
+ compartment = (ListCompartmentEditPart)(getTopEditPart().getChildren().get(index));
+ }
+ index++;
+ }
+ assertTrue("Container not found", compartment != null); //$NON-NLS-1$
+ //DELETION OF THE VIEW
+ assertTrue(VIEW_DELETION + INITIALIZATION_TEST, compartment.getChildren().size() == 1);
+ assertTrue(VIEW_DELETION + INITIALIZATION_TEST, ((Element)((View)getTopEditPart().getModel()).getElement()).getOwnedElements().size() == 1);
+ Request deleteViewRequest = new GroupRequest(RequestConstants.REQ_DELETE);
+ Command command = ((GraphicalEditPart)compartment.getChildren().get(0)).getCommand(deleteViewRequest);
+ assertNotNull(VIEW_DELETION + COMMAND_NULL, command);
+ assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, compartment.getChildren().size() == 0);
+ assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, ((Element)((View)getTopEditPart().getModel()).getElement()).getOwnedElements().size() == 1);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(VIEW_DELETION + TEST_THE_UNDO, compartment.getChildren().size() == 1);
+ assertTrue(VIEW_DELETION + TEST_THE_UNDO, ((Element)((View)getTopEditPart().getModel()).getElement()).getOwnedElements().size() == 1);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(VIEW_DELETION + TEST_THE_REDO, compartment.getChildren().size() == 0);
+ assertTrue(VIEW_DELETION + TEST_THE_REDO, ((Element)((View)getTopEditPart().getModel()).getElement()).getOwnedElements().size() == 1);
+ }
+
+ /**
+ * Test destroy.
+ *
+ * @param type
+ * the type
+ * @param containerType
+ * the container type
+ */
+ public void testDestroy(IElementType type, String containerType) {
+ ListCompartmentEditPart compartment = null;
+ int index = 0;
+ while(compartment == null && index < getTopEditPart().getChildren().size()) {
+ if((getTopEditPart().getChildren().get(index)) instanceof ListCompartmentEditPart && (((View)((ListCompartmentEditPart)(getTopEditPart().getChildren().get(index))).getModel()).getType().equals(containerType))) { //$NON-NLS-1$
+ compartment = (ListCompartmentEditPart)(getTopEditPart().getChildren().get(index));
+ }
+ index++;
+ }
+ assertTrue("Container not found", compartment != null); //$NON-NLS-1$
+ //DESTROY SEMANTIC+ VIEW
+ assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, compartment.getChildren().size() == 1);
+ assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, ((Element)((View)getTopEditPart().getModel()).getElement()).getOwnedElements().size() == 1);
+ Request deleteViewRequest = new EditCommandRequestWrapper(new DestroyElementRequest(false));
+ Command command = ((GraphicalEditPart)compartment.getChildren().get(0)).getCommand(deleteViewRequest);
+ assertNotNull(DESTROY_DELETION + COMMAND_NULL, command);
+ assertTrue(DESTROY_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(DESTROY_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, compartment.getChildren().size() == 0);
+ assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, ((Element)((View)getTopEditPart().getModel()).getElement()).getOwnedElements().size() == 0);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ //assertTrue(DESTROY_DELETION +TEST_THE_UNDO,compartment.getChildren().size()==1);
+ assertTrue(DESTROY_DELETION + TEST_THE_UNDO, ((Element)((View)getTopEditPart().getModel()).getElement()).getOwnedElements().size() == 1);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(DESTROY_DELETION + TEST_THE_REDO, compartment.getChildren().size() == 0);
+ assertTrue(DESTROY_DELETION + TEST_THE_REDO, ((Element)((View)getTopEditPart().getModel()).getElement()).getOwnedElements().size() == 0);
+ }
+
+ /**
+ * Test drop.
+ *
+ * @param type
+ * the type
+ * @param containerType
+ * the container type
+ */
+ public void testDrop(IElementType type, String containerType) {
+ ListCompartmentEditPart compartment = null;
+ int index = 0;
+ while(compartment == null && index < getTopEditPart().getChildren().size()) {
+ if((getTopEditPart().getChildren().get(index)) instanceof ListCompartmentEditPart && (((View)((ListCompartmentEditPart)(getTopEditPart().getChildren().get(index))).getModel()).getType().equals(containerType))) { //$NON-NLS-1$
+ compartment = (ListCompartmentEditPart)(getTopEditPart().getChildren().get(index));
+ }
+ index++;
+ }
+ assertTrue("Container not found", compartment != null); //$NON-NLS-1$
+ //DROP
+ assertTrue(DROP + INITIALIZATION_TEST, compartment.getChildren().size() == 0);
+ assertTrue(DROP + INITIALIZATION_TEST, ((Element)((View)getTopEditPart().getModel()).getElement()).getOwnedElements().size() == 1);
+ DropObjectsRequest dropObjectsRequest = new DropObjectsRequest();
+ ArrayList<Element> list = new ArrayList<Element>();
+ list.add(getRootSemanticModel().getOwnedElements().get(0));
+ dropObjectsRequest.setObjects(list);
+ dropObjectsRequest.setLocation(new Point(20, 20));
+ Command command = compartment.getCommand(dropObjectsRequest);
+ assertNotNull(DROP + COMMAND_NULL, command);
+ assertTrue(DROP + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(DROP + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(DROP + TEST_THE_EXECUTION, compartment.getChildren().size() != 0);
+ assertTrue(DROP + TEST_THE_EXECUTION, ((Element)((View)getTopEditPart().getModel()).getElement()).getOwnedElements().size() != 0);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(DROP + TEST_THE_UNDO, compartment.getChildren().size() == 0);
+ assertTrue(DROP + TEST_THE_UNDO, ((Element)((View)getTopEditPart().getModel()).getElement()).getOwnedElements().size() != 0);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(DROP + TEST_THE_REDO, compartment.getChildren().size() != 0);
+ assertTrue(DROP + TEST_THE_REDO, ((Element)((View)getTopEditPart().getModel()).getElement()).getOwnedElements().size() != 0);
+ }
+
+ /**
+ * Test change container.
+ *
+ * @param topNodeType
+ * the top node type
+ * @param type
+ * the type
+ * @param containerType
+ * the container type
+ */
+ public void testChangeContainer(IElementType topNodeType, IElementType type, String containerType) {
+ ListCompartmentEditPart compartment = null;
+ int index = 0;
+ while(compartment == null && index < getTopEditPart().getChildren().size()) {
+ if((getTopEditPart().getChildren().get(index)) instanceof ListCompartmentEditPart && (((View)((ListCompartmentEditPart)(getTopEditPart().getChildren().get(index))).getModel()).getType().equals(containerType))) { //$NON-NLS-1$
+ compartment = (ListCompartmentEditPart)(getTopEditPart().getChildren().get(index));
+ }
+ index++;
+ }
+ assertTrue("Container not found", compartment != null); //$NON-NLS-1$
+ //CHANGE CONTAINER
+ assertTrue(CHANGE_CONTAINER + INITIALIZATION_TEST, compartment.getChildren().size() == 1);
+ assertTrue(CHANGE_CONTAINER + INITIALIZATION_TEST, ((Element)((View)getTopEditPart().getModel()).getElement()).getOwnedElements().size() == 1);
+ Request requestcreation = CreateViewRequestFactory.getCreateShapeRequest(topNodeType, getDiagramEditPart().getDiagramPreferencesHint());
+ Command command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CONTAINER_CREATION + COMMAND_NULL, command);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CONTAINER_CREATION + TEST_THE_EXECUTION, getRootView().getChildren().size() == 2);
+ GraphicalEditPart newContainerEditPart = (GraphicalEditPart)getDiagramEditPart().getChildren().get(1);
+ ChangeBoundsRequest changeBoundsRequest = new ChangeBoundsRequest(RequestConstants.REQ_ADD);
+ changeBoundsRequest.setEditParts((EditPart)compartment.getChildren().get(0));
+ changeBoundsRequest.setLocation(new Point(30, 30));
+ ListCompartmentEditPart newCompartment = null;
+ index = 0;
+ while(newCompartment == null && index < newContainerEditPart.getChildren().size()) {
+ if((newContainerEditPart.getChildren().get(index)) instanceof ListCompartmentEditPart && (((View)((ListCompartmentEditPart)(getTopEditPart().getChildren().get(index))).getModel()).getType().equals("" + containerType))) { //$NON-NLS-1$
+ newCompartment = (ListCompartmentEditPart)(newContainerEditPart.getChildren().get(index));
+ }
+ index++;
+ }
+ assertTrue("NewContainer not found", newCompartment != null); //$NON-NLS-1$
+ command = newCompartment.getCommand(changeBoundsRequest);
+ assertNotNull(CHANGE_CONTAINER, command);
+ assertTrue(CHANGE_CONTAINER + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(CHANGE_CONTAINER + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CHANGE_CONTAINER + TEST_THE_EXECUTION, compartment.getChildren().size() == 0);
+ assertTrue(CHANGE_CONTAINER + TEST_THE_EXECUTION, ((Element)((View)getTopEditPart().getModel()).getElement()).getOwnedElements().size() == 0);
+ assertTrue(CHANGE_CONTAINER + TEST_THE_EXECUTION, newCompartment.getChildren().size() == 1);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(CHANGE_CONTAINER + TEST_THE_UNDO, compartment.getChildren().size() == 1);
+ assertTrue(CHANGE_CONTAINER + TEST_THE_UNDO, ((Element)((View)getTopEditPart().getModel()).getElement()).getOwnedElements().size() == 1);
+ assertTrue(CHANGE_CONTAINER + TEST_THE_EXECUTION, newCompartment.getChildren().size() == 0);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(CHANGE_CONTAINER + TEST_THE_REDO, compartment.getChildren().size() == 0);
+ assertTrue(CHANGE_CONTAINER + TEST_THE_REDO, ((Element)((View)getTopEditPart().getModel()).getElement()).getOwnedElements().size() == 0);
+ assertTrue(CHANGE_CONTAINER + TEST_THE_EXECUTION, newCompartment.getChildren().size() == 1);
+ }
+
+ /**
+ * Test to create a node.
+ *
+ * @param type
+ * the type
+ * @param containerType
+ * the container type
+ * @param maskmanaged used to test if the editpart must have a mask managed edit policy
+ */
+ public void testToCreateANode(IElementType type, String containerType, boolean maskmanaged, String initialName) {
+ ListCompartmentEditPart compartment = null;
+ int index = 0;
+ while(compartment == null && index < getTopEditPart().getChildren().size()) {
+ if((getTopEditPart().getChildren().get(index)) instanceof ListCompartmentEditPart && (((View)((ListCompartmentEditPart)(getTopEditPart().getChildren().get(index))).getModel()).getType().equals(containerType))) { //$NON-NLS-1$
+ compartment = (ListCompartmentEditPart)(getTopEditPart().getChildren().get(index));
+ }
+ index++;
+ }
+ assertTrue("Container not found", compartment != null); //$NON-NLS-1$
+ //CREATION
+ assertTrue(CREATION + INITIALIZATION_TEST, compartment.getChildren().size() == 0);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 0);
+ CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getDiagramEditPart().getDiagramPreferencesHint());
+ Command command = compartment.getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CREATION + TEST_THE_EXECUTION, compartment.getChildren().size() == 1);
+ Assert.assertTrue("Node must be org.eclipse.gmf.runtime.notation.Shape",((EditPart)compartment.getChildren().get(0)).getModel() instanceof Shape); //$NON-NLS-1$
+ EditPart createdEditPart= (EditPart)compartment.getChildren().get(0);
+ testNodeEditPart(maskmanaged, createdEditPart, initialName);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(CREATION + TEST_THE_UNDO, compartment.getChildren().size() == 0);
+ assertTrue(CREATION + TEST_THE_UNDO, ((Element)((View)getTopEditPart().getModel()).getElement()).getOwnedElements().size() == 0);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue("CREATION: " + TEST_THE_REDO, compartment.getChildren().size() == 1); //$NON-NLS-1$
+
+ Assert.assertNotEquals("Diagram updater must detect that children has been created",0,getDiagramUpdater().getSemanticChildren(getRootView()).size()); //$NON-NLS-1$
+ Assert.assertEquals("Diagram updater must detect that no link has been created",0,getDiagramUpdater().getContainedLinks(getRootView()).size()); //$NON-NLS-1$
+ Assert.assertEquals ("Diagram updater must detect that no link are incoming",0,getDiagramUpdater().getIncomingLinks(((GraphicalEditPart) compartment.getChildren().get(0)).getNotationView()).size()); //$NON-NLS-1$
+ Assert.assertEquals ("Diagram updater must detect that no link are outgoing",0,getDiagramUpdater().getOutgoingLinks(((GraphicalEditPart) compartment.getChildren().get(0)).getNotationView()).size()); //$NON-NLS-1$
+ Assert.assertEquals ("Diagram updater must detect that no children has ben created in the new element",0,getDiagramUpdater().getSemanticChildren(((GraphicalEditPart) compartment.getChildren().get(0)).getNotationView()).size()); //$NON-NLS-1$
+ Assert.assertEquals ("Diagram updater must detect that no link has been created in the new element",0,getDiagramUpdater().getContainedLinks(((GraphicalEditPart) compartment.getChildren().get(0)).getNotationView()).size()); //$NON-NLS-1$
+
+
+
+ }
+ /**
+ * this method is used to test the created editpart
+ * @param maskmanaged
+ * @param createdEditPart
+ */
+ protected void testNodeEditPart(boolean maskmanaged, EditPart createdEditPart, String initialName) {
+ Assert.assertNotNull("The editpart must be created", createdEditPart); //$NON-NLS-1$
+ if( maskmanaged){
+ Assert.assertNotNull("the created editpolicy must have as MASK_MANAGED_LABEL_EDIT_POLICY", createdEditPart.getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY)); //$NON-NLS-1$
+ }
+ Assert.assertTrue("the primary editpart must be the namelabelEditpart",createdEditPart instanceof ITextAwareEditPart); //$NON-NLS-1$
+ Assert.assertTrue("the primary editpart must be the namelabelEditpart",createdEditPart instanceof GraphicalEditPart); //$NON-NLS-1$
+ String name=((GraphicalEditPart)createdEditPart).resolveSemanticElement().eClass().getName();
+ if(initialName!=null){
+ name= initialName;
+ }
+ if(name.length()<((ITextAwareEditPart)createdEditPart).getEditText().length()){
+ Assert.assertEquals(" the name must contain the name of the metaclass",name, ((ITextAwareEditPart)createdEditPart).getEditText().substring(0,name.length())); //$NON-NLS-1$
+ }
+ else{
+ //not the same it sure but display the mistake is important
+ Assert.assertEquals(" the name must contain the name of the metaclass",name, ((ITextAwareEditPart)createdEditPart).getEditText()); //$NON-NLS-1$
+ }
+ Assert.assertTrue("the primary editpart must be the namelabelEditpart",createdEditPart instanceof CompartmentEditPart); //$NON-NLS-1$
+ Assert.assertTrue("namelabelEditpart must be editable",((CompartmentEditPart)createdEditPart).isEditModeEnabled()); //$NON-NLS-1$
+ }
+
+ /**
+ * Test to create a top node.
+ *
+ * @param type
+ * the type
+ */
+ public void testToCreateATopNode(IElementType type) {
+ //CREATION
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 0);
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Element)((View)getDiagramEditPart().getModel()).getElement()).getOwnedElements().size() == 0);
+ CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getDiagramEditPart().getDiagramPreferencesHint());
+ Command command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CREATION + TEST_THE_EXECUTION, getRootView().getChildren().size() == 1);
+ topNode = (GraphicalEditPart)getDiagramEditPart().getChildren().get(0);
+ }
+
+ /**
+ * Gets the top edit part.
+ *
+ * @return the top edit part
+ */
+ public GraphicalEditPart getTopEditPart() {
+ return topNode;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.diagram.clazz.test.canonical.AbstractPapyrusTestCase#getRootSemanticModel()
+ *
+ * @return
+ */
+ @Override
+ protected Element getRootSemanticModel() {
+ // TODO Auto-generated method stub
+ return (Element)((View)getTopEditPart().getModel()).getElement();
+ }
+
+ /**
+ * Test to manage top node.
+ *
+ * @param topNodeType
+ * the top node type
+ * @param type
+ * the type
+ * @param containerType
+ * the container type
+ */
+ public void testToManageTopNode(IElementType topNodeType, IElementType type, String containerType,String initialName) {
+ testToCreateATopNode(topNodeType);
+ testToCreateANode(type, containerType, false, initialName);
+ testDestroy(type, containerType);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ testViewDeletion(type, containerType);
+ testDrop(type, containerType);
+ testChangeContainer(topNodeType, type, containerType);
+ }
+
+ /**
+ * Test to manage top node.
+ *
+ * @param topNodeType
+ * the top node type
+ * @param type
+ * the type
+ * @param containerType
+ * the container type
+ */
+ public void testToManageTopNode(IElementType topNodeType, IElementType type, String containerType) {
+ testToManageTopNode(topNodeType, type, containerType, null);
+ }
+
+ /**
+ * Test to manage top node and test if an editpolicy mask managed is applied.
+ *
+ * @param topNodeType
+ * the top node type
+ * @param type
+ * the type
+ * @param containerType
+ * the container type
+ */
+ public void testToManageTopNodeWithMask(IElementType topNodeType, IElementType type, String containerType,String initialName) {
+ testToCreateATopNode(topNodeType);
+ testToCreateANode(type, containerType, true, initialName);
+ testDestroy(type, containerType);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ testViewDeletion(type, containerType);
+ testDrop(type, containerType);
+ testChangeContainer(topNodeType, type, containerType);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestChildNode.java b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestChildNode.java
new file mode 100755
index 0000000..1d255c9
--- /dev/null
+++ b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestChildNode.java
@@ -0,0 +1,127 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.tests.canonical;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNotSame;
+import static org.junit.Assert.assertTrue;
+
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeCompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.notation.View;
+import org.junit.Before;
+
+/**
+ * The Class TestChildNode.
+ * Semantic tests shall be executed apart from the graphical test has one view may be related to a different number of UML elements
+ * in different diagram
+ */
+public abstract class TestChildNode extends AbstractTestNode {
+
+ /** The root compartment. */
+ protected ShapeCompartmentEditPart rootCompartment = null;
+ protected boolean testAffixedNode=false;
+
+
+
+ public boolean isTestAffixedNode() {
+ return testAffixedNode;
+ }
+
+
+ public void setTestAffixedNode(boolean testAffixedNode) {
+ this.testAffixedNode = testAffixedNode;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.diagram.clazz.test.canonical.AbstractPapyrusTestCase#setUp()
+ *
+ * @throws Exception
+ */
+ @Before
+ @Override
+ public void setUp() throws Exception {
+ super.setUp();
+ CreateViewRequest requestcreation = createViewRequestShapeContainer();
+ if(requestcreation != null) {
+ requestcreation.setSize(new Dimension(500, 500));
+ Command command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CONTAINER_CREATION + COMMAND_NULL, command);
+ assertNotSame(CONTAINER_CREATION + TEST_IF_THE_COMMAND_IS_CREATED, UnexecutableCommand.INSTANCE, command);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute());
+ executeOnUIThread(command);
+ }
+ assertEquals(CREATION + INITIALIZATION_TEST, 1, getDiagramEditPart().getChildren().size());
+ GraphicalEditPart containerEditPart = (GraphicalEditPart)getDiagramEditPart().getChildren().get(0);
+ rootCompartment = null;
+ int index = 0;
+ while(rootCompartment == null && index < containerEditPart.getChildren().size()) {
+ if((containerEditPart.getChildren().get(index)) instanceof ShapeCompartmentEditPart) {
+ rootCompartment = (ShapeCompartmentEditPart)(containerEditPart.getChildren().get(index));
+ }
+ index++;
+ }
+ assertNotNull("There should be at least one container for the node tests", rootCompartment); //$NON-NLS-1$
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected IGraphicalEditPart getContainerEditPart() {
+ if(testAffixedNode){
+ return (IGraphicalEditPart)rootCompartment.getParent();
+ }
+ return rootCompartment;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.diagram.clazz.test.canonical.AbstractPapyrusTestCase#getRootView()
+ *
+ * @return
+ */
+ @Override
+ protected View getRootView() {
+ return (View)getContainerEditPart().getModel();
+ }
+
+ public void testToManageNode(IElementType type, EClass eClass, IElementType containerType, boolean containerMove, int expectedGraphicalChildren, int expectedSemanticChildren, int addedGraphicalChildren, int addedSemanticChildren, boolean maskmanaged, String initialName,int numberSemanticChildreen) {
+ // create a node
+ testToCreateANode(type, expectedGraphicalChildren, expectedSemanticChildren, addedGraphicalChildren, addedSemanticChildren, maskmanaged,null, numberSemanticChildreen);
+ // creates a second one
+ testToCreateANode(type, expectedGraphicalChildren+1, expectedSemanticChildren+1, addedGraphicalChildren, addedSemanticChildren, maskmanaged,null,numberSemanticChildreen);
+ // destroy the first element
+ testDestroy(type, expectedGraphicalChildren+2*addedGraphicalChildren, 2, 1, 1);
+ // destroy the second one
+ testDestroy(type, expectedGraphicalChildren+addedGraphicalChildren, 1, 1, 1);
+ // the node has been destroyed, the UML element also. restore one element
+ undoOnUIThread();
+ // the node and the UML element are present
+ testViewDeletion(type,expectedGraphicalChildren+addedGraphicalChildren, 1, 1);
+ // The node has been deleted, the uml element is still present
+ testDrop(type, eClass,expectedGraphicalChildren,addedGraphicalChildren,addedSemanticChildren);
+ // the node and element are present
+ if(containerMove) {
+ testChangeContainer(type, containerType);
+ }
+ }
+}
diff --git a/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestCommentLink.java b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestCommentLink.java
new file mode 100755
index 0000000..d878a31
--- /dev/null
+++ b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestCommentLink.java
@@ -0,0 +1,247 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nizar GUEDIDI (CEA LIST) - Initial API and implementation
+ /*****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.tests.canonical;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.gef.ConnectionEditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.RequestConstants;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gef.requests.GroupRequest;
+import org.eclipse.gef.requests.ReconnectRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.uml2.uml.Element;
+
+public abstract class TestCommentLink extends TestLink {
+
+ /**
+ * Test view deletion.
+ *
+ * @param type
+ * the type
+ */
+ @Override
+ public void testViewDeletion(IElementType type) {
+ // DELETION OF THE VIEW
+ assertTrue(VIEW_DELETION + INITIALIZATION_TEST, source.getSourceConnections().size() == 1);
+ assertTrue(VIEW_DELETION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(VIEW_DELETION + INITIALIZATION_TEST, ((Element) source.resolveSemanticElement()).getOwnedElements().size() == 0);// 1
+ Request deleteViewRequest = new GroupRequest(RequestConstants.REQ_DELETE);
+ Command command = ((ConnectionEditPart) source.getSourceConnections().get(0)).getCommand(deleteViewRequest);
+ assertNotNull(VIEW_DELETION + COMMAND_NULL, command);
+ assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, source.getSourceConnections().size() == 0);
+ assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, ((Element) source.resolveSemanticElement()).getOwnedElements().size() == 0);// 1
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(VIEW_DELETION + TEST_THE_UNDO, source.getSourceConnections().size() == 1);
+ assertTrue(VIEW_DELETION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(VIEW_DELETION + TEST_THE_UNDO, ((Element) source.resolveSemanticElement()).getOwnedElements().size() == 0);// 1
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(VIEW_DELETION + TEST_THE_REDO, source.getSourceConnections().size() == 0);
+ assertTrue(VIEW_DELETION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(VIEW_DELETION + TEST_THE_REDO, ((Element) source.resolveSemanticElement()).getOwnedElements().size() == 0);// 1
+ }
+
+ /**
+ * Test destroy.
+ *
+ * @param type
+ * the type
+ */
+ @Override
+ public void testDestroy(IElementType type) {
+ // DESTROY SEMANTIC+ VIEW
+ assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, source.getSourceConnections().size() == 1);
+ assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, ((Element) source.resolveSemanticElement()).getOwnedElements().size() == 0);// 1
+ Request deleteViewRequest = new GroupRequest(RequestConstants.REQ_DELETE);
+ Command command = ((ConnectionEditPart) source.getSourceConnections().get(0)).getCommand(deleteViewRequest);
+ assertNotNull(DESTROY_DELETION + COMMAND_NULL, command);
+ assertTrue(DESTROY_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(DESTROY_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, source.getSourceConnections().size() == 0);
+ assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, ((Element) source.resolveSemanticElement()).getOwnedElements().size() == 0);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(DESTROY_DELETION + TEST_THE_UNDO, source.getSourceConnections().size() == 1);
+ assertTrue(DESTROY_DELETION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DESTROY_DELETION + TEST_THE_UNDO, ((Element) source.resolveSemanticElement()).getOwnedElements().size() == 0);// 1
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(DESTROY_DELETION + TEST_THE_REDO, source.getSourceConnections().size() == 0);
+ assertTrue(DESTROY_DELETION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DESTROY_DELETION + TEST_THE_REDO, ((Element) source.resolveSemanticElement()).getOwnedElements().size() == 0);
+ }
+
+ /**
+ * Test drop.
+ *
+ * @param type
+ * the type
+ */
+ @Override
+ public void testDrop(IElementType type) {
+ // DROP
+ // it is impossible to drop but you can recreat the link between this element
+ assertTrue(DROP + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(DROP + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DROP + INITIALIZATION_TEST, ((Element) source.resolveSemanticElement()).getOwnedElements().size() == 0);// 1
+ assertTrue(DROP + TEST_THE_REDO, ((Diagram) getRootView()).getEdges().size() == 0);
+ }
+
+ /**
+ * Test to create a link.
+ *
+ * @param linkType
+ * the type
+ */
+ @Override
+ public void testToCreateALink(IElementType linkType, String initialName) {
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Element) source.resolveSemanticElement()).getOwnedElements().size() == 0);
+ Command command = target.getCommand(createConnectionViewRequest(linkType, source, target));
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CREATION + TEST_THE_EXECUTION, ((Diagram) getRootView()).getEdges().size() == 1);
+ assertTrue(CREATION + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(CREATION + TEST_THE_EXECUTION, ((Element) source.resolveSemanticElement()).getOwnedElements().size() == 0);// 1
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(CREATION + TEST_THE_UNDO, getRootView().getChildren().size() == 4);
+ assertTrue(CREATION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(CREATION + TEST_THE_UNDO, ((Element) source.resolveSemanticElement()).getOwnedElements().size() == 0);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(CREATION + TEST_THE_REDO, ((Diagram) getRootView()).getEdges().size() == 1);
+ assertTrue(CREATION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(CREATION + TEST_THE_REDO, ((Element) source.resolveSemanticElement()).getOwnedElements().size() == 0);// 1
+ }
+
+ @Override
+ public void installEnvironment(IElementType sourceType, IElementType targetType) {
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 0);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 0);
+ // create the source
+ CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(sourceType, getDiagramEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(new Point(100, 100));
+ Command command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ // create the source player to test reconnect
+ requestcreation = CreateViewRequestFactory.getCreateShapeRequest(sourceType, getDiagramEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(new Point(100, 300));
+ command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ // create the target
+ requestcreation = CreateViewRequestFactory.getCreateShapeRequest(targetType, getDiagramEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(new Point(300, 100));
+ command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ // create the target player to test reconnect
+ requestcreation = CreateViewRequestFactory.getCreateShapeRequest(targetType, getDiagramEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(new Point(300, 300));
+ command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ source = (GraphicalEditPart) getDiagramEditPart().getChildren().get(0);
+ sourcePlayer = (GraphicalEditPart) getDiagramEditPart().getChildren().get(1);
+ target = (GraphicalEditPart) getDiagramEditPart().getChildren().get(2);
+ targetPlayer = (GraphicalEditPart) getDiagramEditPart().getChildren().get(3);
+ }
+
+ @Override
+ public void testTargetReconnectAMultiLink(IElementType type) {
+ // target reconnection
+ ReconnectRequest reconnectRequest = new ReconnectRequest();
+ assertTrue(THE_LINK_RECONNECT_EXISTS, (ConnectionEditPart) target.getTargetConnections().get(0) != null);
+ ConnectionEditPart binaryLink = (ConnectionEditPart) target.getTargetConnections().get(0);
+ reconnectRequest.setConnectionEditPart(binaryLink);
+ reconnectRequest.setTargetEditPart(targetPlayer);
+ reconnectRequest.setType(RequestConstants.REQ_RECONNECT_TARGET);
+ Command cmd = targetPlayer.getCommand(reconnectRequest);
+ assertTrue(RECONNECTION_TARGET + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, cmd.canExecute() == true);
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().execute(cmd);
+ // EditorUtils.getTransactionalEditingDomain().getCommandStack().execute(cmd);
+ assertTrue(RECONNECTION_TARGET + TEST_THE_EXECUTION, ((Diagram) getRootView()).getEdges().size() == 1);
+ assertTrue(RECONNECTION_TARGET + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(LINK_EXISTS_RECONNECTION_ON_TARGET, binaryLink.getTarget().equals(targetPlayer));
+ // undo
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(LINK_EXISTS_RECONNECTION_ON_TARGET + TEST_THE_UNDO, binaryLink.getTarget().equals(target));
+ // redo
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(LINK_EXISTS_RECONNECTION_ON_TARGET + TEST_THE_REDO, binaryLink.getTarget().equals(targetPlayer));
+ }
+
+ @Override
+ public void testSourceReconnectAMultiLink(IElementType type) {
+ }
+
+ /**
+ * test the drop of a link where the source and the target are the same objects
+ *
+ * @param linkType
+ * @param allowed
+ */
+ @Override
+ protected void testToDropAlinkOnTheSame(IElementType linkType, boolean allowed) {
+ }
+
+ /**
+ * test the creation of a link where the source and the target are the same objects
+ *
+ * @param linkType
+ * @param allowed
+ */
+ @Override
+ protected void testToCreateAlinkOnTheSame(IElementType linkType, boolean allowed) {
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+ // Note: Must always ask the target edit-part to create the connection, and in this case the target is 'source'
+ Command command = source.getCommand(createConnectionViewRequest(linkType, source, source));
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == allowed);
+ if (allowed) {
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram) getRootView()).getEdges().size() == 2);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(CREATION + TEST_THE_UNDO, getRootView().getChildren().size() == 4);
+ assertTrue(CREATION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(CREATION + TEST_THE_REDO, ((Diagram) getRootView()).getEdges().size() == 2);
+ assertTrue(CREATION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ }
+ }
+}
diff --git a/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestConstraintLink.java b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestConstraintLink.java
new file mode 100755
index 0000000..2a6fdc5
--- /dev/null
+++ b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestConstraintLink.java
@@ -0,0 +1,247 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nizar GUEDIDI (CEA LIST) - Initial API and implementation
+ /*****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.tests.canonical;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.gef.ConnectionEditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.RequestConstants;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gef.requests.GroupRequest;
+import org.eclipse.gef.requests.ReconnectRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.uml2.uml.Element;
+
+public abstract class TestConstraintLink extends TestLink {
+
+ /**
+ * Test view deletion.
+ *
+ * @param type
+ * the type
+ */
+ @Override
+ public void testViewDeletion(IElementType type) {
+ // DELETION OF THE VIEW
+ assertTrue(VIEW_DELETION + INITIALIZATION_TEST, source.getSourceConnections().size() == 1);
+ assertTrue(VIEW_DELETION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(VIEW_DELETION + INITIALIZATION_TEST, ((Element) source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ Request deleteViewRequest = new GroupRequest(RequestConstants.REQ_DELETE);
+ Command command = ((ConnectionEditPart) source.getSourceConnections().get(0)).getCommand(deleteViewRequest);
+ assertNotNull(VIEW_DELETION + COMMAND_NULL, command);
+ assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, source.getSourceConnections().size() == 0);
+ assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, ((Element) source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(VIEW_DELETION + TEST_THE_UNDO, source.getSourceConnections().size() == 1);
+ assertTrue(VIEW_DELETION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(VIEW_DELETION + TEST_THE_UNDO, ((Element) source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(VIEW_DELETION + TEST_THE_REDO, source.getSourceConnections().size() == 0);
+ assertTrue(VIEW_DELETION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(VIEW_DELETION + TEST_THE_REDO, ((Element) source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ }
+
+ /**
+ * Test destroy.
+ *
+ * @param type
+ * the type
+ */
+ @Override
+ public void testDestroy(IElementType type) {
+ // DESTROY SEMANTIC+ VIEW
+ assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, source.getSourceConnections().size() == 1);
+ assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, ((Element) source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ Request deleteViewRequest = new GroupRequest(RequestConstants.REQ_DELETE);
+ Command command = ((ConnectionEditPart) source.getSourceConnections().get(0)).getCommand(deleteViewRequest);
+ assertNotNull(DESTROY_DELETION + COMMAND_NULL, command);
+ assertTrue(DESTROY_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(DESTROY_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, source.getSourceConnections().size() == 0);
+ assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, ((Element) source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(DESTROY_DELETION + TEST_THE_UNDO, source.getSourceConnections().size() == 1);
+ assertTrue(DESTROY_DELETION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DESTROY_DELETION + TEST_THE_UNDO, ((Element) source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(DESTROY_DELETION + TEST_THE_REDO, source.getSourceConnections().size() == 0);
+ assertTrue(DESTROY_DELETION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DESTROY_DELETION + TEST_THE_REDO, ((Element) source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ }
+
+ /**
+ * Test drop.
+ *
+ * @param type
+ * the type
+ */
+ @Override
+ public void testDrop(IElementType type) {
+ // DROP
+ // it is impossible to drop but you can recreat the link between this element
+ assertTrue(DROP + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(DROP + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DROP + INITIALIZATION_TEST, ((Element) source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ assertTrue(DROP + TEST_THE_REDO, ((Diagram) getRootView()).getEdges().size() == 0);
+ }
+
+ /**
+ * Test to create a link.
+ *
+ * @param linkType
+ * the type
+ */
+ @Override
+ public void testToCreateALink(IElementType linkType, String initialName) {
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Element) source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ Command command = target.getCommand(createConnectionViewRequest(linkType, source, target));
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CREATION + TEST_THE_EXECUTION, ((Diagram) getRootView()).getEdges().size() == 1);
+ assertTrue(CREATION + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(CREATION + TEST_THE_EXECUTION, ((Element) source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(CREATION + TEST_THE_UNDO, getRootView().getChildren().size() == 4);
+ assertTrue(CREATION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(CREATION + TEST_THE_UNDO, ((Element) source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(CREATION + TEST_THE_REDO, ((Diagram) getRootView()).getEdges().size() == 1);
+ assertTrue(CREATION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(CREATION + TEST_THE_REDO, ((Element) source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ }
+
+ @Override
+ public void installEnvironment(IElementType sourceType, IElementType targetType) {
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 0);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 0);
+ // create the source
+ CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(sourceType, getDiagramEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(new Point(100, 100));
+ Command command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ // create the source player to test reconnect
+ requestcreation = CreateViewRequestFactory.getCreateShapeRequest(sourceType, getDiagramEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(new Point(100, 300));
+ command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ // create the target
+ requestcreation = CreateViewRequestFactory.getCreateShapeRequest(targetType, getDiagramEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(new Point(300, 100));
+ command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ // create the target player to test reconnect
+ requestcreation = CreateViewRequestFactory.getCreateShapeRequest(targetType, getDiagramEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(new Point(300, 300));
+ command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ source = (GraphicalEditPart) getDiagramEditPart().getChildren().get(0);
+ sourcePlayer = (GraphicalEditPart) getDiagramEditPart().getChildren().get(1);
+ target = (GraphicalEditPart) getDiagramEditPart().getChildren().get(2);
+ targetPlayer = (GraphicalEditPart) getDiagramEditPart().getChildren().get(3);
+ }
+
+ @Override
+ public void testTargetReconnectAMultiLink(IElementType type) {
+ // target reconnection
+ ReconnectRequest reconnectRequest = new ReconnectRequest();
+ assertTrue(THE_LINK_RECONNECT_EXISTS, (ConnectionEditPart) target.getTargetConnections().get(0) != null);
+ ConnectionEditPart binaryLink = (ConnectionEditPart) target.getTargetConnections().get(0);
+ reconnectRequest.setConnectionEditPart(binaryLink);
+ reconnectRequest.setTargetEditPart(targetPlayer);
+ reconnectRequest.setType(RequestConstants.REQ_RECONNECT_TARGET);
+ Command cmd = targetPlayer.getCommand(reconnectRequest);
+ assertTrue(RECONNECTION_TARGET + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, cmd.canExecute() == true);
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().execute(cmd);
+ // EditorUtils.getTransactionalEditingDomain().getCommandStack().execute(cmd);
+ assertTrue(RECONNECTION_TARGET + TEST_THE_EXECUTION, ((Diagram) getRootView()).getEdges().size() == 1);
+ assertTrue(RECONNECTION_TARGET + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(LINK_EXISTS_RECONNECTION_ON_TARGET, binaryLink.getTarget().equals(targetPlayer));
+ // undo
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(LINK_EXISTS_RECONNECTION_ON_TARGET + TEST_THE_UNDO, binaryLink.getTarget().equals(target));
+ // redo
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(LINK_EXISTS_RECONNECTION_ON_TARGET + TEST_THE_REDO, binaryLink.getTarget().equals(targetPlayer));
+ }
+
+ @Override
+ public void testSourceReconnectAMultiLink(IElementType type) {
+ }
+
+ /**
+ * test the drop of a link where the source and the target are the same objects
+ *
+ * @param linkType
+ * @param allowed
+ */
+ @Override
+ protected void testToDropAlinkOnTheSame(IElementType linkType, boolean allowed) {
+ }
+
+ /**
+ * test the creation of a link where the source and the target are the same objects
+ *
+ * @param linkType
+ * @param allowed
+ */
+ @Override
+ protected void testToCreateAlinkOnTheSame(IElementType linkType, boolean allowed) {
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+ // Note: Must always ask the target edit-part to create the connection, and in this case the target is 'source'
+ Command command = source.getCommand(createConnectionViewRequest(linkType, source, source));
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == allowed);
+ if (allowed) {
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram) getRootView()).getEdges().size() == 2);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(CREATION + TEST_THE_UNDO, getRootView().getChildren().size() == 4);
+ assertTrue(CREATION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(CREATION + TEST_THE_REDO, ((Diagram) getRootView()).getEdges().size() == 2);
+ assertTrue(CREATION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ }
+ }
+}
diff --git a/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestContainmentLink.java b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestContainmentLink.java
new file mode 100755
index 0000000..3623a81
--- /dev/null
+++ b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestContainmentLink.java
@@ -0,0 +1,251 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.tests.canonical;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.gef.ConnectionEditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.RequestConstants;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gef.requests.GroupRequest;
+import org.eclipse.gef.requests.ReconnectRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.gmf.runtime.diagram.ui.requests.EditCommandRequestWrapper;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.uml2.uml.Element;
+
+public abstract class TestContainmentLink extends TestLink {
+
+ /**
+ * Test view deletion.
+ *
+ * @param type
+ * the type
+ */
+ @Override
+ public void testViewDeletion(IElementType type) {
+ // DELETION OF THE VIEW
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram) getRootView()).getEdges().size() == 1);
+ assertTrue(VIEW_DELETION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 3);
+ assertTrue(VIEW_DELETION + INITIALIZATION_TEST, ((Element) source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ Request deleteViewRequest = new GroupRequest(RequestConstants.REQ_DELETE);
+ Command command = ((ConnectionEditPart) source.getSourceConnections().get(0)).getCommand(deleteViewRequest);
+ assertNotNull(VIEW_DELETION + COMMAND_NULL, command);
+ assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram) getRootView()).getEdges().size() == 0);
+ assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 3);
+ assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, ((Element) source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram) getRootView()).getEdges().size() == 1);
+ assertTrue(VIEW_DELETION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 3);
+ assertTrue(VIEW_DELETION + TEST_THE_UNDO, ((Element) source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram) getRootView()).getEdges().size() == 0);
+ assertTrue(VIEW_DELETION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 3);
+ assertTrue(VIEW_DELETION + TEST_THE_REDO, ((Element) source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ }
+
+ /**
+ * Test destroy.
+ *
+ * @param type
+ * the type
+ */
+ @Override
+ public void testDestroy(IElementType type) {
+ // DESTROY SEMANTIC+ VIEW
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram) getRootView()).getEdges().size() == 1);
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Element) source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 3);
+ Request deleteViewRequest = new EditCommandRequestWrapper(new DestroyElementRequest(false));
+ Command command = ((ConnectionEditPart) source.getSourceConnections().get(0)).getCommand(deleteViewRequest);
+ // ContainmentLink cannot be destroyed
+ assertTrue(DESTROY_DELETION + COMMAND_NULL, command == null);
+
+ }
+
+ /**
+ * Test drop.
+ *
+ * @param type
+ * the type
+ */
+ @Override
+ public void testDrop(IElementType type) {
+ // DROP
+ // it is impossible to drop but you can recreat the link between this element
+ assertTrue(DROP + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(DROP + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 3);
+ assertTrue(DROP + INITIALIZATION_TEST, ((Element) source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ assertTrue(DROP + TEST_THE_REDO, ((Diagram) getRootView()).getEdges().size() == 0);
+ }
+
+ /**
+ * Test to create a link.
+ *
+ * @param linkType
+ * the type
+ */
+ @Override
+ public void testToCreateALink(IElementType linkType, String initialName) {
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Element) source.resolveSemanticElement()).getOwnedElements().size() == 0);
+ Command command = target.getCommand(createConnectionViewRequest(linkType, source, target));
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CREATION + TEST_THE_EXECUTION, ((Diagram) getRootView()).getEdges().size() == 1);
+ assertTrue(CREATION + TEST_THE_EXECUTION, ((Element) source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(CREATION + TEST_THE_EXECUTION, ((Diagram) getRootView()).getEdges().size() == 0);
+ assertTrue(CREATION + TEST_THE_UNDO, ((Element) source.resolveSemanticElement()).getOwnedElements().size() == 0);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(CREATION + TEST_THE_EXECUTION, ((Diagram) getRootView()).getEdges().size() == 1);
+ assertTrue(CREATION + TEST_THE_EXECUTION, ((Element) source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ }
+
+ @Override
+ public void installEnvironment(IElementType sourceType, IElementType targetType) {
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 0);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 0);
+ // create the source
+ CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(sourceType, getDiagramEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(new Point(100, 100));
+ Command command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ // create the source player to test reconnect
+ requestcreation = CreateViewRequestFactory.getCreateShapeRequest(sourceType, getDiagramEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(new Point(100, 300));
+ command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ // create the target
+ requestcreation = CreateViewRequestFactory.getCreateShapeRequest(targetType, getDiagramEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(new Point(300, 100));
+ command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ // create the target player to test reconnect
+ requestcreation = CreateViewRequestFactory.getCreateShapeRequest(targetType, getDiagramEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(new Point(300, 300));
+ command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ source = (GraphicalEditPart) getDiagramEditPart().getChildren().get(0);
+ sourcePlayer = (GraphicalEditPart) getDiagramEditPart().getChildren().get(1);
+ target = (GraphicalEditPart) getDiagramEditPart().getChildren().get(2);
+ targetPlayer = (GraphicalEditPart) getDiagramEditPart().getChildren().get(3);
+ }
+
+ @Override
+ public void testTargetReconnectAMultiLink(IElementType type) {
+ // target reconnection
+ ReconnectRequest reconnectRequest = new ReconnectRequest();
+ assertTrue(THE_LINK_RECONNECT_EXISTS, (ConnectionEditPart) target.getTargetConnections().get(0) != null);
+ ConnectionEditPart binaryLink = (ConnectionEditPart) target.getTargetConnections().get(0);
+ reconnectRequest.setConnectionEditPart(binaryLink);
+ reconnectRequest.setTargetEditPart(targetPlayer);
+ reconnectRequest.setType(RequestConstants.REQ_RECONNECT_TARGET);
+ Command cmd = targetPlayer.getCommand(reconnectRequest);
+ assertTrue(RECONNECTION_TARGET + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, cmd.canExecute() == true);
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().execute(cmd);
+ // EditorUtils.getTransactionalEditingDomain().getCommandStack().execute(cmd);
+ assertTrue(RECONNECTION_TARGET + TEST_THE_EXECUTION, ((Diagram) getRootView()).getEdges().size() == 1);
+ assertTrue(RECONNECTION_TARGET + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 2);
+ assertTrue(LINK_EXISTS_RECONNECTION_ON_TARGET, binaryLink.getTarget().equals(targetPlayer));
+ // undo
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(LINK_EXISTS_RECONNECTION_ON_TARGET + TEST_THE_UNDO, binaryLink.getTarget().equals(target));
+ // redo
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(LINK_EXISTS_RECONNECTION_ON_TARGET + TEST_THE_REDO, binaryLink.getTarget().equals(targetPlayer));
+ }
+
+ @Override
+ public void testSourceReconnectAMultiLink(IElementType type) {
+ // target reconnection
+ ReconnectRequest reconnectRequest = new ReconnectRequest();
+ assertTrue(THE_LINK_TO_RECONNECT_EXISTS, ((ConnectionEditPart) source.getSourceConnections().get(0)) != null); //$NON-NLS-1$
+ ConnectionEditPart branch = ((ConnectionEditPart) source.getSourceConnections().get(0)); //$NON-NLS-1$
+ reconnectRequest.setConnectionEditPart(branch);
+ reconnectRequest.setTargetEditPart(sourcePlayer);
+ reconnectRequest.setType(RequestConstants.REQ_RECONNECT_SOURCE);
+ Command cmd = sourcePlayer.getCommand(reconnectRequest);
+ assertTrue(RECONNECTION_SOURCE + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, cmd.canExecute() == true);
+ }
+
+ /**
+ * Test to manage top node.
+ *
+ * @param type
+ * the type
+ * @param containerType
+ * the container type
+ */
+ public void testToManageLink(IElementType sourceType, IElementType targetType, IElementType linkType, IElementType containerType) {
+ installEnvironment(sourceType, targetType);
+ testToCreateALink(linkType, null);
+ testDestroy(linkType);
+ testViewDeletion(linkType);
+ testDrop(linkType);
+ testRecreation(linkType);
+ testSourceReconnectAMultiLink(linkType);
+ testTargetReconnectAMultiLink(linkType);
+ }
+
+ public void testRecreation(IElementType linkType) {
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram) getRootView()).getEdges().size() == 0);
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 3);
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Element) source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ Command command = target.getCommand(createConnectionViewRequest(linkType, source, target));
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram) getRootView()).getEdges().size() == 1);
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 3);
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Element) source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram) getRootView()).getEdges().size() == 0);
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 3);
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Element) source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram) getRootView()).getEdges().size() == 1);
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 3);
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Element) source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestContextLink.java b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestContextLink.java
new file mode 100755
index 0000000..90418c8
--- /dev/null
+++ b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestContextLink.java
@@ -0,0 +1,166 @@
+package org.eclipse.papyrus.uml.diagram.tests.canonical;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
+import java.util.ArrayList;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.gef.ConnectionEditPart;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.RequestConstants;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gef.requests.GroupRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.EditCommandRequestWrapper;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.uml2.uml.Constraint;
+import org.eclipse.uml2.uml.Element;
+
+public abstract class TestContextLink extends TestLink {
+
+ protected int rootSemanticOwnedElementsAfterDestroy = 4;
+
+ protected void manageContextLink(IElementType sourceType, IElementType targetType, IElementType linkType, IElementType containerType) {
+ testToManageLink(sourceType, targetType, linkType, containerType, false, null);
+ checkUnexecutableCreateLinkCommand(linkType, source, target);
+ checkUnexecutableCreateLinkCommand(linkType, source, targetPlayer);
+ testDestroy(linkType);
+ checkExecutableCreateLinkCommand(linkType, source, target);
+ checkExecutableCreateLinkCommand(linkType, source, targetPlayer);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ testViewDeletion(linkType);
+ checkExecutableCreateLinkCommand(linkType, source, target);
+ checkExecutableCreateLinkCommand(linkType, source, targetPlayer);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ testToManageDropConstraint();
+ }
+
+ @Override
+ public void testToCreateALink(IElementType linkType, String initialName) {
+ testCreateLink(linkType, initialName);
+ }
+
+ @Override
+ public void testToManageLink(IElementType sourceType, IElementType targetType, IElementType linkType, IElementType containerType, boolean allowedOntheSame, String initialName) {
+ installEnvironment(sourceType, targetType);
+ testToCreateALink(linkType, initialName);
+ testDestroy(linkType);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ testViewDeletion(linkType);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ }
+
+ protected void testToManageDropConstraint() {
+ testConstraintViewDeletion();
+ testDropConstraint();
+ }
+
+ //FIXME : this override must be removed and fixed!
+ @Override
+ public void testViewDeletion(IElementType type) {
+ testDestroy(type);
+ }
+
+ @Override
+ public void testDestroy(IElementType type) {
+ // DESTROY SEMANTIC+ VIEW
+ assertEquals(DESTROY_DELETION + INITIALIZATION_TEST, createdEdgesCount, calculateDiagramEdgesCount());
+ assertEquals(DESTROY_DELETION + INITIALIZATION_TEST, createdEdgesCount, source.getSourceConnections().size());
+ assertEquals(DESTROY_DELETION + INITIALIZATION_TEST, rootSemanticOwnedElements, getRootSemanticModel().getOwnedElements().size());
+ assertEquals(DESTROY_DELETION + INITIALIZATION_TEST, createdEdgesCount, getDiagramEditPart().getConnections().size());
+ ConnectionEditPart linkEditPart = (ConnectionEditPart) getDiagramEditPart().getConnections().get(0);
+
+ //Request deleteViewRequest = new GroupRequest(RequestConstants.REQ_DELETE);
+ Command command = linkEditPart.getCommand((new EditCommandRequestWrapper(new DestroyElementRequest(false))));
+ assertNotNull(DESTROY_DELETION + COMMAND_NULL, command);
+ assertTrue(DESTROY_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(DESTROY_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute());
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+
+ assertEquals(DESTROY_DELETION + TEST_THE_EXECUTION, 0, calculateDiagramEdgesCount());
+ assertEquals(DESTROY_DELETION + TEST_THE_EXECUTION, 0, source.getSourceConnections().size());
+ assertEquals(DESTROY_DELETION + TEST_THE_EXECUTION, rootSemanticOwnedElementsAfterDestroy, getRootSemanticModel().getOwnedElements().size());
+ assertTrue(DESTROY_DELETION + TEST_THE_UNDO, diagramEditor.getDiagramEditDomain().getDiagramCommandStack().canUndo());
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertEquals(DESTROY_DELETION + TEST_THE_UNDO, createdEdgesCount, calculateDiagramEdgesCount());
+ assertEquals(DESTROY_DELETION + TEST_THE_UNDO, createdEdgesCount, source.getSourceConnections().size());
+ assertEquals(DESTROY_DELETION + TEST_THE_UNDO, rootSemanticOwnedElements, getRootSemanticModel().getOwnedElements().size());
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertEquals(DESTROY_DELETION + INITIALIZATION_TEST, 0, calculateDiagramEdgesCount());
+ assertEquals(DESTROY_DELETION + TEST_THE_REDO, 0, source.getSourceConnections().size());
+ assertEquals(DESTROY_DELETION + TEST_THE_REDO, rootSemanticOwnedElementsAfterDestroy, getRootSemanticModel().getOwnedElements().size());
+ }
+
+ private void testConstraintViewDeletion() {
+ assertEquals(VIEW_DELETION + INITIALIZATION_TEST, 4, getRootEditPart().getChildren().size());
+ assertEquals(VIEW_DELETION + INITIALIZATION_TEST, createdEdgesCount, calculateDiagramEdgesCount());
+ assertEquals(VIEW_DELETION + INITIALIZATION_TEST, rootSemanticOwnedElements, getRootSemanticModel().getOwnedElements().size());
+ Request deleteViewRequest = new GroupRequest(RequestConstants.REQ_DELETE);
+ Command command = source.getCommand(deleteViewRequest);
+ assertNotNull(VIEW_DELETION + COMMAND_NULL, command);
+ assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute());
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertEquals(VIEW_DELETION + TEST_THE_EXECUTION, 3, getRootEditPart().getChildren().size());
+ assertEquals(VIEW_DELETION + TEST_THE_EXECUTION, 0, calculateDiagramEdgesCount());
+ assertEquals(VIEW_DELETION + TEST_THE_EXECUTION, rootSemanticOwnedElements, getRootSemanticModel().getOwnedElements().size());
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertEquals(VIEW_DELETION + TEST_THE_UNDO, 4, getRootEditPart().getChildren().size());
+ assertEquals(VIEW_DELETION + TEST_THE_UNDO, createdEdgesCount, calculateDiagramEdgesCount());
+ assertEquals(VIEW_DELETION + TEST_THE_UNDO, rootSemanticOwnedElements, getRootSemanticModel().getOwnedElements().size());
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertEquals(VIEW_DELETION + TEST_THE_REDO, 3, getRootEditPart().getChildren().size());
+ assertEquals(VIEW_DELETION + TEST_THE_REDO, 0, calculateDiagramEdgesCount());
+ assertEquals(VIEW_DELETION + TEST_THE_REDO, rootSemanticOwnedElements, getRootSemanticModel().getOwnedElements().size());
+ }
+
+ private void testDropConstraint() {
+ assertEquals(DROP + INITIALIZATION_TEST, 3, getRootEditPart().getChildren().size());
+ assertEquals(DROP + INITIALIZATION_TEST, rootSemanticOwnedElements, getRootSemanticModel().getOwnedElements().size());
+ assertEquals(CREATION + INITIALIZATION_TEST, 0, calculateDiagramEdgesCount());
+ DropObjectsRequest dropObjectsRequest = new DropObjectsRequest();
+ ArrayList<Element> list = new ArrayList<Element>();
+ list.add(((Element) target.resolveSemanticElement()).getOwnedElements().get(0));
+ dropObjectsRequest.setObjects(list);
+ dropObjectsRequest.setLocation(new Point(20, 20));
+ Command command = getRootEditPart().getCommand(dropObjectsRequest);
+ assertNotNull(DROP + COMMAND_NULL, command);
+ assertTrue(DROP + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(DROP + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute());
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertEquals(DROP + TEST_THE_EXECUTION, 4, getRootEditPart().getChildren().size());
+ assertEquals(DROP + TEST_THE_EXECUTION, rootSemanticOwnedElements, getRootSemanticModel().getOwnedElements().size());
+ assertEquals(DROP + TEST_THE_EXECUTION, createdEdgesCount, calculateDiagramEdgesCount());
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertEquals(DROP + TEST_THE_UNDO, 3, getRootEditPart().getChildren().size());
+ assertEquals(DROP + TEST_THE_UNDO, rootSemanticOwnedElements, getRootSemanticModel().getOwnedElements().size());
+ assertEquals(DROP + TEST_THE_UNDO, 0, calculateDiagramEdgesCount());
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertEquals(DROP + TEST_THE_REDO, 4, getRootEditPart().getChildren().size());
+ assertEquals(DROP + TEST_THE_REDO, rootSemanticOwnedElements, getRootSemanticModel().getOwnedElements().size());
+ assertEquals(DROP + TEST_THE_REDO, createdEdgesCount, calculateDiagramEdgesCount());
+ }
+
+ @Override
+ public void installEnvironment(IElementType sourceType, IElementType targetType) {
+ rootSemanticOwnedElements = 3;
+ super.installEnvironment(sourceType, targetType);
+ assertTrue(CREATION + INITIALIZATION_TEST, source.resolveSemanticElement() instanceof Constraint);
+ }
+
+ private void checkUnexecutableCreateLinkCommand(IElementType linkType, GraphicalEditPart source, GraphicalEditPart target) {
+ Command command = target.getCommand(createConnectionViewRequest(linkType, source, target));
+ assertNull("Creation of the second context link from the constraint should be forbidden.", command);
+ }
+
+ private void checkExecutableCreateLinkCommand(IElementType linkType, GraphicalEditPart source, GraphicalEditPart target) {
+ Command command = target.getCommand(createConnectionViewRequest(linkType, source, target));
+ assertTrue(command != null && command.canExecute());
+ }
+}
\ No newline at end of file
diff --git a/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestInstanceSpecification.java b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestInstanceSpecification.java
new file mode 100755
index 0000000..db02d15
--- /dev/null
+++ b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestInstanceSpecification.java
@@ -0,0 +1,129 @@
+package org.eclipse.papyrus.uml.diagram.tests.canonical;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.util.Arrays;
+import java.util.Set;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.commands.SetValueCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.papyrus.commands.wrappers.GMFtoGEFCommandWrapper;
+import org.eclipse.papyrus.uml.service.types.internal.ui.advice.InstanceSpecificationLinkEditHelperAdvice;
+import org.eclipse.uml2.uml.Association;
+import org.eclipse.uml2.uml.InstanceSpecification;
+import org.eclipse.uml2.uml.UMLPackage;
+
+public abstract class TestInstanceSpecification extends TestLink {
+
+ private GraphicalEditPart class1;
+
+ private GraphicalEditPart class2;
+
+ private GraphicalEditPart instanceSpec1;
+
+ private GraphicalEditPart instanceSpec2;
+
+ private org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditPart association12;
+
+ /**
+ * Test to manage InstanceSpecification.
+ */
+ protected void testInstanceSpecification(IElementType classType, IElementType associationType, IElementType instanceSpecification, IElementType instanceSpecificationLink) {
+ installEnvironment(classType, associationType, instanceSpecification);
+ testInstanceSpecificationLinkCreation(instanceSpecificationLink, instanceSpec1, instanceSpec2, null, 2);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ setupEditPartClassifier(instanceSpec1.resolveSemanticElement(), class1.resolveSemanticElement());
+ setupEditPartClassifier(instanceSpec2.resolveSemanticElement(), class1.resolveSemanticElement());
+ testUnexecutableInstanceSpecificationLinkCreation(instanceSpecificationLink, instanceSpec1, instanceSpec2, (Association) association12.resolveSemanticElement(), 2);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ setupEditPartClassifier(instanceSpec1.resolveSemanticElement(), class1.resolveSemanticElement());
+ setupEditPartClassifier(instanceSpec2.resolveSemanticElement(), class2.resolveSemanticElement());
+ testInstanceSpecificationLinkCreation(instanceSpecificationLink, instanceSpec1, instanceSpec2, (Association) association12.resolveSemanticElement(), 2);
+ }
+
+ private void setupEditPartClassifier(EObject source, EObject classifier) {
+ SetRequest setRequest = new SetRequest(source, UMLPackage.eINSTANCE.getInstanceSpecification_Classifier(), Arrays.asList(classifier));
+ ICommand command = createSetupEditPartClassifierCommand(source, setRequest);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute());
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(GMFtoGEFCommandWrapper.wrap(command));
+ }
+
+ protected ICommand createSetupEditPartClassifierCommand(EObject source, SetRequest setRequest) {
+ return new SetValueCommand(setRequest);
+ }
+
+ private void testInstanceSpecificationLinkCreation(IElementType instanceSpecType, GraphicalEditPart source, GraphicalEditPart target, Association association, int expectedEdges) {
+ testToCreateInstanceSpecificationLink(instanceSpecType, source, target, association, true, expectedEdges);
+ }
+
+ private void testUnexecutableInstanceSpecificationLinkCreation(IElementType instanceSpecType, GraphicalEditPart source, GraphicalEditPart target, Association association, int expectedEdges) {
+ testToCreateInstanceSpecificationLink(instanceSpecType, source, target, association, false, expectedEdges);
+ }
+
+ private void testToCreateInstanceSpecificationLink(IElementType instanceSpecType, GraphicalEditPart source, GraphicalEditPart target, Association association, boolean executable, int expectedEdges) {
+ if (association != null) {
+ Set<Association> associations = InstanceSpecificationLinkEditHelperAdvice.getModelAssociations((InstanceSpecification) source.resolveSemanticElement(), (InstanceSpecification) target.resolveSemanticElement());
+ assertEquals(CREATION + "Associations list", executable, associations.contains(association));
+ }
+ if (!executable) {
+ return;
+ }
+ CreateConnectionViewRequest request = createConnectionViewRequest(instanceSpecType, source, target);
+ InstanceSpecificationLinkEditHelperAdvice.setupSuppressDialogRequest(request, association);
+ testToCreateLink(request, source, target, expectedEdges);
+ }
+
+ private void testToCreateAssociation(IElementType associationType, GraphicalEditPart source, GraphicalEditPart target, int expectedEdges) {
+ CreateConnectionViewRequest request = createConnectionViewRequest(associationType, source, target);
+ testToCreateLink(request, source, target, expectedEdges);
+ }
+
+ private void testToCreateLink(CreateConnectionViewRequest request, GraphicalEditPart source, GraphicalEditPart target, int expectedEdges) {
+ Command command = target.getCommand(request);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute());
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertEquals(CREATION + TEST_THE_EXECUTION, expectedEdges, ((Diagram) getRootView()).getEdges().size());
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertEquals(CREATION + TEST_THE_REDO, expectedEdges, ((Diagram) getRootView()).getEdges().size());
+ }
+
+ private void installEnvironment(IElementType classType, IElementType associationType, IElementType instanceSpecification) {
+ createNode(classType, new Point(100, 100));
+ createNode(classType, new Point(400, 100));
+ createNode(instanceSpecification, new Point(100, 300));
+ createNode(instanceSpecification, new Point(400, 300));
+ createNode(instanceSpecification, new Point(100, 600));
+ class1 = (GraphicalEditPart) getDiagramEditPart().getChildren().get(0);
+ class2 = (GraphicalEditPart) getDiagramEditPart().getChildren().get(1);
+ instanceSpec1 = (GraphicalEditPart) getDiagramEditPart().getChildren().get(2);
+ instanceSpec2 = (GraphicalEditPart) getDiagramEditPart().getChildren().get(3);
+ testToCreateAssociation(associationType, class1, class2, 1);
+ association12 = (org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditPart) class1.getSourceConnections().get(0);
+ }
+
+ private void createNode(IElementType sourceType, Point location) {
+ CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(sourceType, getDiagramEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(location);
+ Command command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute()); //$NON-NLS-1$
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ }
+}
\ No newline at end of file
diff --git a/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestLink.java b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestLink.java
new file mode 100755
index 0000000..3e5104a
--- /dev/null
+++ b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestLink.java
@@ -0,0 +1,641 @@
+/*****************************************************************************
+ * Copyright (c) 2009, 2015 CEA LIST, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 440263
+ * Christian W. Damus - bug 459701
+ * Christian W. Damus - bug 476436
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.tests.canonical;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.util.ArrayList;
+import java.util.Iterator;
+
+import org.eclipse.core.commands.IHandler;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.ConnectionEditPart;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.RequestConstants;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gef.requests.ChangeBoundsRequest;
+import org.eclipse.gef.requests.GroupRequest;
+import org.eclipse.gef.requests.ReconnectRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeCompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.EditCommandRequestWrapper;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.ui.util.ServiceUtilsForActionHandlers;
+import org.eclipse.papyrus.infra.gmfdiag.common.updater.DiagramUpdater;
+import org.eclipse.papyrus.junit.utils.DisplayUtils;
+import org.eclipse.papyrus.junit.utils.rules.AnnotationRule;
+import org.eclipse.papyrus.uml.diagram.common.Activator;
+import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.commands.ICommandService;
+import org.eclipse.uml2.uml.Element;
+import org.junit.Assert;
+import org.junit.Rule;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class TestTopLink to test when this is link . The link is attached to a semantic element that has to be contained by the source and the target.
+ * To adapt when source owns the created link
+ */
+public abstract class TestLink extends AbstractPapyrusTestCase {
+
+ protected static final String THE_LINK_RECONNECT_EXISTS = "The Link exist"; //$NON-NLS-1$
+
+ protected static final String RECONNECTION_TARGET = "Reconnection of target"; //$NON-NLS-1$
+
+ protected static final String LINK_EXISTS_RECONNECTION_ON_TARGET = "Link exist on the target"; //$NON-NLS-1$
+
+ protected static final String THE_LINK_TO_RECONNECT_EXISTS = "The Link exist"; //$NON-NLS-1$
+
+ protected static final String RECONNECTION_SOURCE = "Reconnection of source"; //$NON-NLS-1$
+
+ protected static final String LINK_EXISTS_RECONNECTION_ON_SOURCE = "Link exist on the source"; //$NON-NLS-1$
+
+ protected GraphicalEditPart source = null;
+
+ protected GraphicalEditPart sourcePlayer = null;
+
+ protected GraphicalEditPart target = null;
+
+ protected GraphicalEditPart targetPlayer = null;
+
+ public abstract DiagramUpdater getDiagramUpdater();
+
+ @Rule
+ public final AnnotationRule<FixtureEditPartConfigurator> sourceConfigurator = AnnotationRule.create(SourceConfigurator.class);
+
+ @Rule
+ public final AnnotationRule<FixtureEditPartConfigurator> targetConfigurator = AnnotationRule.create(TargetConfigurator.class);
+
+ protected int rootSemanticOwnedElements = 5;
+
+ protected int createdEdgesCount = 1;
+
+ protected int createdChildsCount = 0;
+
+ protected int diagramChildrenSize = 5;
+
+ protected int initialEnvironmentChildsCount = 4;
+
+ protected int rootSemanticOwnedElementsBeforeCreatingLink = 4;
+
+ /**
+ * Test view deletion.
+ *
+ * @param type
+ * the type
+ */
+ public void testViewDeletion(IElementType type) {
+ // DELETION OF THE VIEW
+ assertTrue(VIEW_DELETION + INITIALIZATION_TEST, source.getSourceConnections().size() == 1);
+ assertTrue(VIEW_DELETION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == rootSemanticOwnedElements);
+ Request deleteViewRequest = new GroupRequest(RequestConstants.REQ_DELETE);
+ Command command = ((ConnectionEditPart) source.getSourceConnections().get(0)).getCommand(deleteViewRequest);
+ assertNotNull(VIEW_DELETION + COMMAND_NULL, command);
+ assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, source.getSourceConnections().size() == 0);
+ assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == rootSemanticOwnedElements);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(VIEW_DELETION + TEST_THE_UNDO, source.getSourceConnections().size() == 1);
+ assertTrue(VIEW_DELETION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == rootSemanticOwnedElements);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(VIEW_DELETION + TEST_THE_REDO, source.getSourceConnections().size() == 0);
+ assertTrue(VIEW_DELETION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == rootSemanticOwnedElements);
+ }
+
+ /**
+ * Retrieves the TransactionalEditingDomain
+ *
+ * @return the editing domain (can be null)
+ */
+ @Override
+ protected TransactionalEditingDomain getEditingDomain() {
+ ServiceUtilsForActionHandlers serviceUtils = ServiceUtilsForActionHandlers.getInstance();
+ TransactionalEditingDomain editingDomain = null;
+ try {
+ editingDomain = serviceUtils.getTransactionalEditingDomain();
+ } catch (ServiceException e) {
+ Activator.log.error(e);
+ }
+ return editingDomain;
+ }
+
+ /**
+ * Test destroy.
+ *
+ * @param type
+ * the type
+ */
+ public void testDestroy(IElementType type) {
+ // DESTROY SEMANTIC+ VIEW
+ assertEquals(DESTROY_DELETION + INITIALIZATION_TEST, createdEdgesCount, ((Diagram) getRootView()).getEdges().size());
+ assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, source.getSourceConnections().size() == 1);
+ assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == rootSemanticOwnedElements);
+ Request deleteViewRequest = new EditCommandRequestWrapper(new DestroyElementRequest(false));
+ Command command = ((ConnectionEditPart) source.getSourceConnections().get(0)).getCommand(deleteViewRequest);
+ assertNotNull(DESTROY_DELETION + COMMAND_NULL, command);
+ assertTrue(DESTROY_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(DESTROY_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ testEnableForDeleteFromModel();
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, ((Diagram) getRootView()).getEdges().size() == 0);
+ assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, source.getSourceConnections().size() == 0);
+ assertEquals(DESTROY_DELETION + TEST_THE_EXECUTION, 4, getRootSemanticModel().getOwnedElements().size());
+ assertTrue(DESTROY_DELETION + TEST_THE_UNDO, diagramEditor.getDiagramEditDomain().getDiagramCommandStack().canUndo() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertEquals(DESTROY_DELETION + TEST_THE_UNDO, createdEdgesCount, ((Diagram) getRootView()).getEdges().size());
+ assertTrue(DESTROY_DELETION + TEST_THE_UNDO, source.getSourceConnections().size() == 1);
+ assertTrue(DESTROY_DELETION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == rootSemanticOwnedElements);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, ((Diagram) getRootView()).getEdges().size() == 0);
+ assertTrue(DESTROY_DELETION + TEST_THE_REDO, source.getSourceConnections().size() == 0);
+ assertTrue(DESTROY_DELETION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ }
+
+ /**
+ * Test drop.
+ *
+ * @param type
+ * the type
+ */
+ public void testDrop(IElementType type) {
+ // DROP
+ assertEquals(DROP + INITIALIZATION_TEST, 4, getDiagramEditPart().getChildren().size());
+ assertTrue(DROP + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == rootSemanticOwnedElements);
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram) getRootView()).getEdges().size() == 0);
+ DropObjectsRequest dropObjectsRequest = new DropObjectsRequest();
+ ArrayList<Element> list = new ArrayList<Element>();
+ list.add(getRootSemanticModel().getOwnedElements().get(rootSemanticOwnedElements - 1));
+ dropObjectsRequest.setObjects(list);
+ dropObjectsRequest.setLocation(new Point(20, 20));
+ Command command = getDiagramEditPart().getCommand(dropObjectsRequest);
+ assertNotNull(DROP + COMMAND_NULL, command);
+ assertTrue(DROP + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(DROP + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertEquals(DROP + TEST_THE_EXECUTION, initialEnvironmentChildsCount + createdChildsCount, getDiagramEditPart().getChildren().size());
+ assertTrue(DROP + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == rootSemanticOwnedElements);
+ assertEquals(DROP + TEST_THE_EXECUTION, createdEdgesCount, ((Diagram) getRootView()).getEdges().size());
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(DROP + TEST_THE_UNDO, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(DROP + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == rootSemanticOwnedElements);
+ assertTrue(DROP + TEST_THE_UNDO, ((Diagram) getRootView()).getEdges().size() == 0);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertEquals(DROP + TEST_THE_REDO, initialEnvironmentChildsCount + createdChildsCount, getDiagramEditPart().getChildren().size());
+ assertTrue(DROP + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == rootSemanticOwnedElements);
+ assertTrue(DROP + TEST_THE_REDO, ((Diagram) getRootView()).getEdges().size() == createdEdgesCount);
+ }
+
+ /**
+ * Test change container.
+ *
+ * @param type
+ * the type
+ * @param containerType
+ * the container type
+ */
+ public void testChangeContainer(IElementType type, IElementType containerType) {
+ // CHANGE CONTAINER
+ assertTrue(CHANGE_CONTAINER + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 1);
+ assertTrue(CHANGE_CONTAINER + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 1);
+ Request requestcreation = CreateViewRequestFactory.getCreateShapeRequest(containerType, getDiagramEditPart().getDiagramPreferencesHint());
+ Command command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CONTAINER_CREATION + COMMAND_NULL, command);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CONTAINER_CREATION + TEST_THE_EXECUTION, getRootView().getChildren().size() == 2);
+ GraphicalEditPart containerEditPart = (GraphicalEditPart) getDiagramEditPart().getChildren().get(1);
+ ChangeBoundsRequest changeBoundsRequest = new ChangeBoundsRequest(RequestConstants.REQ_ADD);
+ changeBoundsRequest.setEditParts((EditPart) getDiagramEditPart().getChildren().get(0));
+ changeBoundsRequest.setLocation(new Point(30, 30));
+ ShapeCompartmentEditPart compartment = null;
+ int index = 0;
+ while (compartment == null && index < containerEditPart.getChildren().size()) {
+ if ((containerEditPart.getChildren().get(index)) instanceof ShapeCompartmentEditPart) {
+ compartment = (ShapeCompartmentEditPart) (containerEditPart.getChildren().get(index));
+ }
+ index++;
+ }
+ assertTrue("Container not found", compartment != null); //$NON-NLS-1$
+ command = compartment.getCommand(changeBoundsRequest);
+ assertNotNull(CHANGE_CONTAINER, command);
+ assertTrue(CHANGE_CONTAINER + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(CHANGE_CONTAINER + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CHANGE_CONTAINER + TEST_THE_EXECUTION, getRootView().getChildren().size() == 1);
+ assertTrue(CHANGE_CONTAINER + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 1);
+ assertTrue(CHANGE_CONTAINER + TEST_THE_EXECUTION, compartment.getChildren().size() == 1);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(CHANGE_CONTAINER + TEST_THE_UNDO, getRootView().getChildren().size() == 2);
+ assertTrue(CHANGE_CONTAINER + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 2);
+ assertTrue(CHANGE_CONTAINER + TEST_THE_EXECUTION, compartment.getChildren().size() == 0);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(CHANGE_CONTAINER + TEST_THE_REDO, getRootView().getChildren().size() == 1);
+ assertTrue(CHANGE_CONTAINER + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 1);
+ assertTrue(CHANGE_CONTAINER + TEST_THE_EXECUTION, compartment.getChildren().size() == 1);
+ }
+
+ /**
+ * Test to create a link.
+ *
+ * @param linkType
+ * the type
+ */
+ public void testToCreateALink(IElementType linkType, String initialName) {
+ testCreateLink(linkType, initialName);
+
+ Assert.assertEquals("Diagram updater must detect that node children has been created", 4, getDiagramUpdater().getSemanticChildren(getRootView()).size()); //$NON-NLS-1$
+ Assert.assertEquals("Diagram updater must detect that no link has been created", 1, getDiagramUpdater().getContainedLinks(getRootView()).size()); //$NON-NLS-1$
+ Assert.assertEquals("Diagram updater must detect that no link are incoming", 0, getDiagramUpdater().getIncomingLinks((View) ((Diagram) getRootView()).getEdges().get(0)).size()); //$NON-NLS-1$
+ Assert.assertEquals("Diagram updater must detect that no link are outgoing", 0, getDiagramUpdater().getOutgoingLinks((View) ((Diagram) getRootView()).getEdges().get(0)).size()); //$NON-NLS-1$
+ Assert.assertEquals("Diagram updater must detect that no children has ben created in the new element", 0, getDiagramUpdater().getSemanticChildren(((View) ((Diagram) getRootView()).getEdges().get(0))).size()); //$NON-NLS-1$
+ Assert.assertEquals("Diagram updater must detect that no link has been created in the new element", 0, getDiagramUpdater().getContainedLinks(((View) ((Diagram) getRootView()).getEdges().get(0))).size()); //$NON-NLS-1$
+
+ Assert.assertEquals("Diagram updater must detect that no link are incoming", 1, getDiagramUpdater().getIncomingLinks(target.getNotationView()).size()); //$NON-NLS-1$
+ Assert.assertEquals("Diagram updater must detect that no link are OutgoingLinks", 0, getDiagramUpdater().getOutgoingLinks(target.getNotationView()).size()); //$NON-NLS-1$
+ Assert.assertEquals("Diagram updater must detect that no link are IncomingLinks", 0, getDiagramUpdater().getIncomingLinks(source.getNotationView()).size()); //$NON-NLS-1$
+ Assert.assertEquals("Diagram updater must detect that no link are OutgoingLinks", 1, getDiagramUpdater().getOutgoingLinks(source.getNotationView()).size()); //$NON-NLS-1$
+ }
+
+ protected void testCreateLink(IElementType linkType, String initialName) {
+ assertEquals(CREATION + INITIALIZATION_TEST, 4, getRootEditPart().getChildren().size());
+ assertEquals(CREATION + INITIALIZATION_TEST, rootSemanticOwnedElementsBeforeCreatingLink, getRootSemanticModel().getOwnedElements().size());
+ Command command = target.getCommand(createConnectionViewRequest(linkType, source, target));
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute());
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertEquals(CREATION + INITIALIZATION_TEST, createdEdgesCount, calculateDiagramEdgesCount());
+ assertEquals(CREATION + INITIALIZATION_TEST, rootSemanticOwnedElements, getRootSemanticModel().getOwnedElements().size());
+ assertEquals(CREATION + INITIALIZATION_TEST, initialEnvironmentChildsCount + createdChildsCount, getRootEditPart().getChildren().size());
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertEquals(CREATION + TEST_THE_UNDO, 4, getRootView().getChildren().size());
+ assertEquals(CREATION + TEST_THE_UNDO, rootSemanticOwnedElementsBeforeCreatingLink, getRootSemanticModel().getOwnedElements().size());
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertEquals(CREATION + TEST_THE_REDO, createdEdgesCount, calculateDiagramEdgesCount());
+ assertEquals(CREATION + TEST_THE_REDO, rootSemanticOwnedElements, getRootSemanticModel().getOwnedElements().size());
+ ConnectionEditPart linkEditPart = (ConnectionEditPart) getDiagramEditPart().getConnections().get(0);
+ testLinkEditPart(linkEditPart, initialName);
+ }
+
+ /**
+ * calculate diagram edges count
+ */
+ protected int calculateDiagramEdgesCount() {
+ return ((Diagram) getDiagramEditPart().getDiagramView()).getEdges().size();
+ }
+
+ /**
+ * htis method is used to test the created link editpart
+ *
+ * @param linkEditPart
+ */
+ protected void testLinkEditPart(ConnectionEditPart linkEditPart, String initialName) {
+ Assert.assertNotNull("the editpart of the link must exist", linkEditPart); //$NON-NLS-1$
+ EditPolicy policy = linkEditPart.getEditPolicy(org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy.SHOW_HIDE_LABEL_ROLE);
+ Assert.assertNotNull("the link must have an edipolicy that to show or hide label", policy); //$NON-NLS-1$
+ Assert.assertTrue("the policy of the link must be an instance of ShowHideLabelEditPolicy", policy instanceof org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy); //$NON-NLS-1$
+ // get text aware
+ ITextAwareEditPart namedEditPart = null;
+
+ // FIXME we should find here a better way to get the name label => If the name is null or empty, no edit part will match whereas one should
+ if (initialName == null || initialName.isEmpty()) {
+ return;
+ }
+ for (Iterator iteratorChildren = linkEditPart.getChildren().iterator(); iteratorChildren.hasNext();) {
+ Object children = iteratorChildren.next();
+ if (children instanceof ITextAwareEditPart && (((ITextAwareEditPart) children).getEditText() != null) && (!((ITextAwareEditPart) children).getEditText().trim().equals(""))) { //$NON-NLS-1$
+ namedEditPart = (ITextAwareEditPart) children;
+ }
+ }
+ if (namedEditPart != null) {
+ testNameLabel(namedEditPart, initialName);
+ }
+
+ }
+
+ protected void testNameLabel(ITextAwareEditPart namedEditPart, String initialName) {
+ Assert.assertTrue("the primary editpart must be the namelabelEditpart", namedEditPart instanceof GraphicalEditPart); //$NON-NLS-1$
+ EObject element = ((GraphicalEditPart) namedEditPart).resolveSemanticElement();
+ String name = NamedElementUtil.isAutoNamed(element) ? element.eClass().getName() : null;
+ if (initialName != null) {
+ name = initialName;
+ }
+ if (name != null) {
+ if (name.length() < namedEditPart.getEditText().length()) {
+ Assert.assertEquals(" the name must contain the name of the metaclass", name, namedEditPart.getEditText().substring(0, name.length())); //$NON-NLS-1$
+ } else {
+ // not the same it sure but display the mistake is important
+ Assert.assertEquals(" the name must contain the name of the metaclass", name, namedEditPart.getEditText()); //$NON-NLS-1$
+ }
+ }
+ }
+
+ public void installEnvironment(IElementType sourceType, IElementType targetType) {
+ assertEquals(CREATION + INITIALIZATION_TEST, 0, getRootEditPart().getChildren().size());
+ assertEquals(CREATION + INITIALIZATION_TEST, 0, getRootSemanticModel().getOwnedElements().size());
+ // create the source
+ CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(sourceType, getRootEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(new Point(100, 100));
+ Command command = getRootEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute()); //$NON-NLS-1$
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ // create the source player to test reconnect
+ requestcreation = CreateViewRequestFactory.getCreateShapeRequest(sourceType, getRootEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(new Point(100, 300));
+ command = getRootEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute()); //$NON-NLS-1$
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ // create the target
+ requestcreation = CreateViewRequestFactory.getCreateShapeRequest(targetType, getRootEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(new Point(300, 100));
+ command = getRootEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute()); //$NON-NLS-1$
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ // create the target player to test reconnect
+ requestcreation = CreateViewRequestFactory.getCreateShapeRequest(targetType, getRootEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(new Point(300, 300));
+ command = getRootEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute()); //$NON-NLS-1$
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ source = (GraphicalEditPart) getRootEditPart().getChildren().get(0);
+ sourcePlayer = (GraphicalEditPart) getRootEditPart().getChildren().get(1);
+ target = (GraphicalEditPart) getRootEditPart().getChildren().get(2);
+ targetPlayer = (GraphicalEditPart) getRootEditPart().getChildren().get(3);
+
+ performAdditionalEnvironmentConfiguration(sourceType, targetType);
+ }
+
+ protected IGraphicalEditPart getRootEditPart() {
+ return getDiagramEditPart();
+ }
+
+ public CreateConnectionViewRequest createConnectionViewRequest(IElementType type, EditPart source, EditPart target) {
+ CreateConnectionViewRequest connectionRequest = CreateViewRequestFactory.getCreateConnectionRequest(type, ((IGraphicalEditPart) getDiagramEditPart()).getDiagramPreferencesHint());
+ connectionRequest.setSourceEditPart(null);
+ connectionRequest.setTargetEditPart(source);
+ connectionRequest.setType(RequestConstants.REQ_CONNECTION_START);
+ source.getCommand(connectionRequest);
+ // Now, setup the request in preparation to get the
+ // connection end
+ // command.
+ connectionRequest.setSourceEditPart(source);
+ connectionRequest.setTargetEditPart(target);
+ connectionRequest.setType(RequestConstants.REQ_CONNECTION_END);
+ return connectionRequest;
+ }
+
+ public void testTargetReconnectAMultiLink(IElementType type) {
+ // target reconnection
+ ReconnectRequest reconnectRequest = new ReconnectRequest();
+ assertTrue(THE_LINK_RECONNECT_EXISTS, (ConnectionEditPart) target.getTargetConnections().get(0) != null);
+ ConnectionEditPart binaryLink = (ConnectionEditPart) target.getTargetConnections().get(0);
+ reconnectRequest.setConnectionEditPart(binaryLink);
+ reconnectRequest.setTargetEditPart(targetPlayer);
+ reconnectRequest.setType(RequestConstants.REQ_RECONNECT_TARGET);
+ Command cmd = targetPlayer.getCommand(reconnectRequest);
+ assertTrue(RECONNECTION_TARGET + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, cmd.canExecute() == true);
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().execute(cmd);
+ // EditorUtils.getTransactionalEditingDomain().getCommandStack().execute(cmd);
+ assertTrue(RECONNECTION_TARGET + TEST_THE_EXECUTION, ((Diagram) getRootView()).getEdges().size() == 1);
+ assertTrue(RECONNECTION_TARGET + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 5);
+ assertTrue(LINK_EXISTS_RECONNECTION_ON_TARGET, binaryLink.getTarget().equals(targetPlayer));
+ // undo
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(LINK_EXISTS_RECONNECTION_ON_TARGET + TEST_THE_UNDO, binaryLink.getTarget().equals(target));
+ // redo
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(LINK_EXISTS_RECONNECTION_ON_TARGET + TEST_THE_REDO, binaryLink.getTarget().equals(targetPlayer));
+ }
+
+ public void testSourceReconnectAMultiLink(IElementType type) {
+ // target reconnection
+ ReconnectRequest reconnectRequest = new ReconnectRequest();
+ assertTrue(THE_LINK_TO_RECONNECT_EXISTS, (ConnectionEditPart) source.getSourceConnections().get(0) != null);
+ ConnectionEditPart branch = (ConnectionEditPart) source.getSourceConnections().get(0);
+ reconnectRequest.setConnectionEditPart(branch);
+ reconnectRequest.setTargetEditPart(sourcePlayer);
+ reconnectRequest.setType(RequestConstants.REQ_RECONNECT_SOURCE);
+ Command cmd = sourcePlayer.getCommand(reconnectRequest);
+ assertTrue(RECONNECTION_SOURCE + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, cmd.canExecute() == true);
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().execute(cmd);
+ assertTrue(RECONNECTION_SOURCE + TEST_THE_EXECUTION, ((Diagram) getRootView()).getEdges().size() == 1);
+ assertTrue(RECONNECTION_SOURCE + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 5);
+ assertTrue(LINK_EXISTS_RECONNECTION_ON_SOURCE + TEST_THE_EXECUTION, branch.getSource().equals(sourcePlayer));
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(LINK_EXISTS_RECONNECTION_ON_SOURCE + TEST_THE_UNDO, branch.getSource().equals(source));
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(LINK_EXISTS_RECONNECTION_ON_SOURCE + TEST_THE_REDO, branch.getSource().equals(sourcePlayer));
+ }
+
+ /**
+ * Test to manage top node.
+ *
+ * @param type
+ * the type
+ * @param containerType
+ * the container type
+ */
+ public void testToManageLink(IElementType sourceType, IElementType targetType, IElementType linkType, IElementType containerType, boolean allowedOntheSame, String initialName) {
+ installEnvironment(sourceType, targetType);
+ testToCreateALink(linkType, initialName);
+ testDestroy(linkType);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ testViewDeletion(linkType);
+ testDrop(linkType);
+ testSourceReconnectAMultiLink(linkType);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ testTargetReconnectAMultiLink(linkType);
+ testToCreateAlinkOnTheSame(linkType, allowedOntheSame);
+ testToDropAlinkOnTheSame(linkType, allowedOntheSame);
+ }
+
+ /**
+ * Test to manage top node.
+ *
+ * @param type
+ * the type
+ * @param containerType
+ * the container type
+ */
+ public void testToManageLink(IElementType sourceType, IElementType targetType, IElementType linkType, IElementType containerType, boolean allowedOntheSame) {
+ testToManageLink(sourceType, targetType, linkType, containerType, allowedOntheSame, null);
+ }
+
+ /**
+ * test the drop of a link where the source and the target are the same objects
+ *
+ * @param linkType
+ * @param allowed
+ */
+ protected void testToDropAlinkOnTheSame(IElementType linkType, boolean allowed) {
+ // DROP
+ if (allowed) {
+ assertTrue(DROP + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(DROP + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 6);
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram) getRootView()).getEdges().size() == 2);
+ DropObjectsRequest dropObjectsRequest = new DropObjectsRequest();
+ ArrayList<Element> list = new ArrayList<Element>();
+ list.add(getRootSemanticModel().getOwnedElements().get(5));
+ dropObjectsRequest.setObjects(list);
+ dropObjectsRequest.setLocation(new Point(20, 20));
+ Command command = getDiagramEditPart().getCommand(dropObjectsRequest);
+ assertNotNull(DROP + COMMAND_NULL, command);
+ assertTrue(DROP + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(DROP + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(DROP + TEST_THE_EXECUTION, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(DROP + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 6);
+ assertTrue(DROP + TEST_THE_EXECUTION, ((Diagram) getRootView()).getEdges().size() == 3);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(DROP + TEST_THE_UNDO, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(DROP + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 6);
+ assertTrue(DROP + TEST_THE_UNDO, ((Diagram) getRootView()).getEdges().size() == 2);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(DROP + TEST_THE_REDO, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(DROP + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 6);
+ assertTrue(DROP + TEST_THE_REDO, ((Diagram) getRootView()).getEdges().size() == 3);
+ }
+ }
+
+ /**
+ * test the creation of a link where the source and the target are the same objects
+ *
+ * @param linkType
+ * @param allowed
+ */
+ protected void testToCreateAlinkOnTheSame(IElementType linkType, boolean allowed) {
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 5);
+ // Note: Must always ask the target edit-part to create the connection, and in this case the target is 'source'
+ Command command = source.getCommand(createConnectionViewRequest(linkType, source, source));
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == allowed);
+ if (allowed) {
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram) getRootView()).getEdges().size() == 2);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 6);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(CREATION + TEST_THE_UNDO, getRootView().getChildren().size() == 4);
+ assertTrue(CREATION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 5);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(CREATION + TEST_THE_REDO, ((Diagram) getRootView()).getEdges().size() == 2);
+ assertTrue(CREATION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 6);
+ }
+ }
+
+ /**
+ * test id the handler delete from model is enable
+ */
+ protected void testEnableForDeleteFromModel() {
+ diagramEditor.setFocus();
+ DisplayUtils.flushEventLoop();
+
+ EditPart linkEditPart = (EditPart) source.getSourceConnections().get(0);
+ diagramEditor.getSite().getSelectionProvider().setSelection(new StructuredSelection(linkEditPart));
+ DisplayUtils.flushEventLoop();
+
+ ICommandService commandService = PlatformUI.getWorkbench().getService(ICommandService.class);
+ org.eclipse.core.commands.Command cmd = commandService.getCommand("org.eclipse.ui.edit.delete"); //$NON-NLS-1$
+ IHandler handler = cmd.getHandler();
+ boolean enabled = handler != null && handler.isHandled() && handler.isEnabled();
+ Assert.assertTrue("Delete from model handler must be enabled", enabled);
+ }
+
+ protected final void performAdditionalEnvironmentConfiguration(IElementType sourceType, IElementType targetType) {
+ Command additionalConfig = additionalConfig(null, source, sourceType, true);
+ additionalConfig = additionalConfig(additionalConfig, sourcePlayer, sourceType, true);
+ additionalConfig = additionalConfig(additionalConfig, target, targetType, false);
+ additionalConfig = additionalConfig(additionalConfig, targetPlayer, targetType, false);
+ if (additionalConfig != null) {
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(additionalConfig);
+ }
+ }
+
+ private Command additionalConfig(Command additionalConfig, IGraphicalEditPart editPart, IElementType elementType, boolean isSource) {
+ FixtureEditPartConfigurator configurator = isSource ? sourceConfigurator.get() : targetConfigurator.get();
+ Command config = (configurator == null) ? null : configurator.configureFixtureEditPart(editPart, elementType, isSource);
+ return (additionalConfig == null) ? config : (config == null) ? additionalConfig : additionalConfig.chain(config);
+ }
+
+ //
+ // Nested types
+ //
+
+ /**
+ * A configurator, declare via {@link SourceConfigurator} and/or {@link TargetConfigurator} annotation,
+ * of the source or target (respectively) edit-part on which the test will create links.
+ */
+ public interface FixtureEditPartConfigurator {
+ /**
+ * Obtains a command, if necessary, to configure the source or target edit-part of the test environment.
+ *
+ * @param editPart
+ * the source or target edit-part
+ * @param elementType
+ * the element-type from which the edit-part was created
+ * @param isSource
+ * whether the edit-part is the source end (not the target end) of the test environment
+ *
+ * @return a command to further configure the edit-part, or {@code null} if not needed
+ */
+ Command configureFixtureEditPart(IGraphicalEditPart editPart, IElementType elementType, boolean isSource);
+ }
+
+ @Target({ ElementType.METHOD, ElementType.TYPE })
+ @Retention(RetentionPolicy.RUNTIME)
+ public @interface SourceConfigurator {
+ Class<? extends FixtureEditPartConfigurator> value();
+ }
+
+ @Target({ ElementType.METHOD, ElementType.TYPE })
+ @Retention(RetentionPolicy.RUNTIME)
+ public @interface TargetConfigurator {
+ Class<? extends FixtureEditPartConfigurator> value();
+ }
+}
diff --git a/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestLinkOwnedBySource.java b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestLinkOwnedBySource.java
new file mode 100755
index 0000000..9d5fd3a
--- /dev/null
+++ b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestLinkOwnedBySource.java
@@ -0,0 +1,325 @@
+/*****************************************************************************
+ * Copyright (c) 2009, 2015 CEA LIST, Christian W. Damus, and others.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 459701
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.tests.canonical;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.util.ArrayList;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.gef.ConnectionEditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.RequestConstants;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gef.requests.GroupRequest;
+import org.eclipse.gef.requests.ReconnectRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.EditCommandRequestWrapper;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.uml2.uml.Element;
+
+public abstract class TestLinkOwnedBySource extends TestLink {
+
+ /**
+ * Test view deletion.
+ *
+ * @param type
+ * the type
+ */
+ @Override
+ public void testViewDeletion(IElementType type) {
+ // DELETION OF THE VIEW
+ assertTrue(VIEW_DELETION + INITIALIZATION_TEST, source.getSourceConnections().size() == 1);
+ assertTrue(VIEW_DELETION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(VIEW_DELETION + INITIALIZATION_TEST, ((Element) source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ Request deleteViewRequest = new GroupRequest(RequestConstants.REQ_DELETE);
+ Command command = ((ConnectionEditPart) source.getSourceConnections().get(0)).getCommand(deleteViewRequest);
+ assertNotNull(VIEW_DELETION + COMMAND_NULL, command);
+ assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, source.getSourceConnections().size() == 0);
+ assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, ((Element) source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(VIEW_DELETION + TEST_THE_UNDO, source.getSourceConnections().size() == 1);
+ assertTrue(VIEW_DELETION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(VIEW_DELETION + TEST_THE_UNDO, ((Element) source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(VIEW_DELETION + TEST_THE_REDO, source.getSourceConnections().size() == 0);
+ assertTrue(VIEW_DELETION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(VIEW_DELETION + TEST_THE_REDO, ((Element) source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ }
+
+ /**
+ * Test destroy.
+ *
+ * @param type
+ * the type
+ */
+ @Override
+ public void testDestroy(IElementType type) {
+ // DESTROY SEMANTIC+ VIEW
+ assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, source.getSourceConnections().size() == 1);
+ assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, ((Element) source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ Request deleteViewRequest = new EditCommandRequestWrapper(new DestroyElementRequest(false));
+ Command command = ((ConnectionEditPart) source.getSourceConnections().get(0)).getCommand(deleteViewRequest);
+ assertNotNull(DESTROY_DELETION + COMMAND_NULL, command);
+ assertTrue(DESTROY_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(DESTROY_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ testEnableForDeleteFromModel();
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, source.getSourceConnections().size() == 0);
+ assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, ((Element) source.resolveSemanticElement()).getOwnedElements().size() == 0);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(DESTROY_DELETION + TEST_THE_UNDO, source.getSourceConnections().size() == 1);
+ assertTrue(DESTROY_DELETION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DESTROY_DELETION + TEST_THE_UNDO, ((Element) source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(DESTROY_DELETION + TEST_THE_REDO, source.getSourceConnections().size() == 0);
+ assertTrue(DESTROY_DELETION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DESTROY_DELETION + TEST_THE_REDO, ((Element) source.resolveSemanticElement()).getOwnedElements().size() == 0);
+ }
+
+ /**
+ * Test drop.
+ *
+ * @param type
+ * the type
+ */
+ @Override
+ public void testDrop(IElementType type) {
+ // DROP
+ assertTrue(DROP + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(DROP + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DROP + INITIALIZATION_TEST, ((Element) source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ assertTrue(DROP + TEST_THE_REDO, ((Diagram) getRootView()).getEdges().size() == 0);
+ DropObjectsRequest dropObjectsRequest = new DropObjectsRequest();
+ ArrayList<Element> list = new ArrayList<Element>();
+ list.add(((Element) source.resolveSemanticElement()).getOwnedElements().get(0));
+ dropObjectsRequest.setObjects(list);
+ dropObjectsRequest.setLocation(new Point(20, 20));
+ Command command = getDiagramEditPart().getCommand(dropObjectsRequest);
+ assertNotNull(DROP + COMMAND_NULL, command);
+ assertTrue(DROP + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(DROP + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(DROP + TEST_THE_EXECUTION, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(DROP + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DROP + TEST_THE_EXECUTION, ((Element) source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ assertTrue(DROP + TEST_THE_EXECUTION, ((Diagram) getRootView()).getEdges().size() == 1);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(DROP + TEST_THE_REDO, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(DROP + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DROP + TEST_THE_REDO, ((Element) source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ assertTrue(DROP + TEST_THE_REDO, ((Diagram) getRootView()).getEdges().size() == 0);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(DROP + TEST_THE_REDO, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(DROP + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DROP + TEST_THE_REDO, ((Element) source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ assertTrue(DROP + TEST_THE_REDO, ((Diagram) getRootView()).getEdges().size() == 1);
+ }
+
+ /**
+ * Test to create a link.
+ *
+ * @param linkType
+ * the type
+ */
+ @Override
+ public void testToCreateALink(IElementType linkType, String initialName) {
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Element) source.resolveSemanticElement()).getOwnedElements().size() == 0);
+ Command command = target.getCommand(createConnectionViewRequest(linkType, source, target));
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CREATION + TEST_THE_EXECUTION, ((Diagram) getRootView()).getEdges().size() == 1);
+ assertTrue(CREATION + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(CREATION + TEST_THE_EXECUTION, ((Element) source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(CREATION + TEST_THE_UNDO, getRootView().getChildren().size() == 4);
+ assertTrue(CREATION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(CREATION + TEST_THE_UNDO, ((Element) source.resolveSemanticElement()).getOwnedElements().size() == 0);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(CREATION + TEST_THE_REDO, ((Diagram) getRootView()).getEdges().size() == 1);
+ assertTrue(CREATION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(CREATION + TEST_THE_REDO, ((Element) source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ }
+
+ @Override
+ public void installEnvironment(IElementType sourceType, IElementType targetType) {
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 0);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 0);
+ // create the source
+ CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(sourceType, getDiagramEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(new Point(100, 100));
+ Command command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ // create the source player to test reconnect
+ requestcreation = CreateViewRequestFactory.getCreateShapeRequest(sourceType, getDiagramEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(new Point(100, 300));
+ command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ // create the target
+ requestcreation = CreateViewRequestFactory.getCreateShapeRequest(targetType, getDiagramEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(new Point(300, 100));
+ command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ // create the target player to test reconnect
+ requestcreation = CreateViewRequestFactory.getCreateShapeRequest(targetType, getDiagramEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(new Point(300, 300));
+ command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ source = (GraphicalEditPart) getDiagramEditPart().getChildren().get(0);
+ sourcePlayer = (GraphicalEditPart) getDiagramEditPart().getChildren().get(1);
+ target = (GraphicalEditPart) getDiagramEditPart().getChildren().get(2);
+ targetPlayer = (GraphicalEditPart) getDiagramEditPart().getChildren().get(3);
+
+ performAdditionalEnvironmentConfiguration(sourceType, targetType);
+ }
+
+ @Override
+ public void testTargetReconnectAMultiLink(IElementType type) {
+ // target reconnection
+ ReconnectRequest reconnectRequest = new ReconnectRequest();
+ assertTrue(THE_LINK_RECONNECT_EXISTS, (ConnectionEditPart) target.getTargetConnections().get(0) != null);
+ ConnectionEditPart binaryLink = (ConnectionEditPart) target.getTargetConnections().get(0);
+ reconnectRequest.setConnectionEditPart(binaryLink);
+ reconnectRequest.setTargetEditPart(targetPlayer);
+ reconnectRequest.setType(RequestConstants.REQ_RECONNECT_TARGET);
+ Command cmd = targetPlayer.getCommand(reconnectRequest);
+ assertTrue(RECONNECTION_TARGET + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, cmd.canExecute() == true);
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().execute(cmd);
+ // EditorUtils.getTransactionalEditingDomain().getCommandStack().execute(cmd);
+ assertTrue(RECONNECTION_TARGET + TEST_THE_EXECUTION, ((Diagram) getRootView()).getEdges().size() == 1);
+ assertTrue(RECONNECTION_TARGET + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(LINK_EXISTS_RECONNECTION_ON_TARGET, binaryLink.getTarget().equals(targetPlayer));
+ // undo
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(LINK_EXISTS_RECONNECTION_ON_TARGET + TEST_THE_UNDO, binaryLink.getTarget().equals(target));
+ // redo
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(LINK_EXISTS_RECONNECTION_ON_TARGET + TEST_THE_REDO, binaryLink.getTarget().equals(targetPlayer));
+ }
+
+ @Override
+ public void testSourceReconnectAMultiLink(IElementType type) {
+ // target reconnection
+ ReconnectRequest reconnectRequest = new ReconnectRequest();
+ assertTrue(THE_LINK_TO_RECONNECT_EXISTS, (ConnectionEditPart) source.getSourceConnections().get(0) != null);
+ ConnectionEditPart branch = (ConnectionEditPart) source.getSourceConnections().get(0);
+ reconnectRequest.setConnectionEditPart(branch);
+ reconnectRequest.setTargetEditPart(sourcePlayer);
+ reconnectRequest.setType(RequestConstants.REQ_RECONNECT_SOURCE);
+ Command cmd = sourcePlayer.getCommand(reconnectRequest);
+ assertTrue(RECONNECTION_SOURCE + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, cmd.canExecute() == true);
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().execute(cmd);
+ assertTrue(RECONNECTION_SOURCE + TEST_THE_EXECUTION, ((Diagram) getRootView()).getEdges().size() == 1);
+ assertTrue(RECONNECTION_SOURCE + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(LINK_EXISTS_RECONNECTION_ON_SOURCE + TEST_THE_EXECUTION, branch.getSource().equals(sourcePlayer));
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(LINK_EXISTS_RECONNECTION_ON_SOURCE + TEST_THE_UNDO, branch.getSource().equals(source));
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(LINK_EXISTS_RECONNECTION_ON_SOURCE + TEST_THE_REDO, branch.getSource().equals(sourcePlayer));
+ }
+
+ /**
+ * test the drop of a link where the source and the target are the same objects
+ *
+ * @param linkType
+ * @param allowed
+ */
+ @Override
+ protected void testToDropAlinkOnTheSame(IElementType linkType, boolean allowed) {
+ // DROP
+ if (allowed) {
+ assertTrue(DROP + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(DROP + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram) getRootView()).getEdges().size() == 2);
+ DropObjectsRequest dropObjectsRequest = new DropObjectsRequest();
+ ArrayList<Element> list = new ArrayList<Element>();
+ list.add(((Element) source.resolveSemanticElement()).getOwnedElements().get(1));
+ dropObjectsRequest.setObjects(list);
+ dropObjectsRequest.setLocation(new Point(20, 20));
+ Command command = getDiagramEditPart().getCommand(dropObjectsRequest);
+ assertNotNull(DROP + COMMAND_NULL, command);
+ assertTrue(DROP + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(DROP + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(DROP + TEST_THE_EXECUTION, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(DROP + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DROP + TEST_THE_EXECUTION, ((Diagram) getRootView()).getEdges().size() == 3);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(DROP + TEST_THE_UNDO, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(DROP + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DROP + TEST_THE_UNDO, ((Diagram) getRootView()).getEdges().size() == 2);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(DROP + TEST_THE_REDO, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(DROP + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DROP + TEST_THE_REDO, ((Diagram) getRootView()).getEdges().size() == 3);
+ }
+ }
+
+ /**
+ * test the creation of a link where the source and the target are the same objects
+ *
+ * @param linkType
+ * @param allowed
+ */
+ @Override
+ protected void testToCreateAlinkOnTheSame(IElementType linkType, boolean allowed) {
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+
+ // Note: Must always ask the target edit-part to create the connection, and in this case the target is 'source'
+ Command command = source.getCommand(createConnectionViewRequest(linkType, source, source));
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == allowed);
+ if (allowed) {
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram) getRootView()).getEdges().size() == 2);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(CREATION + TEST_THE_UNDO, getRootView().getChildren().size() == 4);
+ assertTrue(CREATION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(CREATION + TEST_THE_REDO, ((Diagram) getRootView()).getEdges().size() == 2);
+ assertTrue(CREATION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ }
+ }
+}
diff --git a/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestLinkWithParent.java b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestLinkWithParent.java
new file mode 100755
index 0000000..0b0dc62
--- /dev/null
+++ b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestLinkWithParent.java
@@ -0,0 +1,390 @@
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Benoit Maggi (CEA LIST) benoit.maggi@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.tests.canonical;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.gef.ConnectionEditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.RequestConstants;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gef.requests.GroupRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.EditCommandRequestWrapper;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.uml2.uml.Element;
+
+/**
+ * The Class TestLinkWithParent use to test link between elements with parent.
+ */
+public abstract class TestLinkWithParent extends TestLink {
+
+
+ /** The Constant DEFAULT_DROP_LOCATION. */
+ protected static final Point DEFAULT_DROP_LOCATION = new Point(20, 20);
+
+ /** The default source location. */
+ protected static Point DEFAULT_SOURCE_LOCATION = new Point(300, 100);
+
+ /** The default parent location. */
+ protected static Point DEFAULT_PARENT_LOCATION = new Point(100, 100);
+
+ // dyn values
+
+ /** The begin root semantic owned element size. */
+ protected int beginRootSemanticOwnedElementSize;
+
+ /** The end root semantic owned element size. */
+ protected int endRootSemanticOwnedElementSize;
+
+ /** The begin diagram edit part children size. */
+ protected int beginDiagramEditPartChildrenSize;
+
+ /** The end diagram edit part children size. */
+ protected int endDiagramEditPartChildrenSize;
+
+ /** The begin root edge size. */
+ protected int beginRootEdgeSize;
+
+ /** The end root edge size. */
+ protected int endRootEdgeSize;
+
+ /** The begin source connections size. */
+ protected int beginSourceConnectionsSize;
+
+ /** The end source connections size. */
+ protected int endSourceConnectionsSize;
+
+ /** The begin root view children size. */
+ protected int beginRootViewChildrenSize;
+
+ /** The end root view children size. */
+ protected int endRootViewChildrenSize;
+
+ /** The parent type. */
+ public IElementType parentType;
+
+ /** The parent. */
+ public GraphicalEditPart parent;
+
+ /** The link element. */
+ private Element linkElement;
+
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.tests.canonical.TestLink#installEnvironment(org.eclipse.gmf.runtime.emf.type.core.IElementType, org.eclipse.gmf.runtime.emf.type.core.IElementType)
+ *
+ * @param sourceType
+ * @param targetType
+ */
+
+ @Override
+ public void installEnvironment(IElementType sourceType, IElementType targetType) {
+
+ // create the parent source
+ CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(parentType, getDiagramEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(DEFAULT_PARENT_LOCATION);
+ Command command = getDiagramEditPart().getCommand(requestcreation);
+ assertTrue(command.canExecute());
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ parent = (GraphicalEditPart) getDiagramEditPart().getChildren().get(0);
+
+ // create the source
+ requestcreation = CreateViewRequestFactory.getCreateShapeRequest(sourceType, getDiagramEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(DEFAULT_SOURCE_LOCATION);
+ command = parent.getCommand(requestcreation);
+ assertTrue(command.canExecute());
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ // FIXME : get(0) : header; get(1): FloatingLabel get(2) : container
+ // List<GraphicalEditPart> children = parent.getChildren();
+ // source = children.get(3);
+
+ // Get the source edit part using the semantic hint from source type.
+ source = (GraphicalEditPart) parent.getChildBySemanticHint(((IHintedType) sourceType).getSemanticHint());
+ }
+
+
+
+ /**
+ * Check that the link is impossible to create
+ *
+ * @param sourceType
+ * the source type
+ * @param targetType
+ * the target type
+ * @param linkType
+ * the link type
+ */
+ public void testImpossibleToManageLink(IElementType sourceType, IElementType targetType, IElementType linkType) {
+ installEnvironment(sourceType, targetType);
+ Command command = target.getCommand(createConnectionViewRequest(linkType, source, target));
+ assertFalse(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command != null && command.canExecute());
+ }
+
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.tests.canonical.TestLink#testToManageLink(org.eclipse.gmf.runtime.emf.type.core.IElementType, org.eclipse.gmf.runtime.emf.type.core.IElementType, org.eclipse.gmf.runtime.emf.type.core.IElementType,
+ * org.eclipse.gmf.runtime.emf.type.core.IElementType, boolean)
+ *
+ * @param sourceType
+ * @param targetType
+ * @param linkType
+ * @param containerType
+ * @param allowedOntheSame
+ */
+
+ @Override
+ public void testToManageLink(IElementType sourceType, IElementType targetType, IElementType linkType, IElementType containerType, boolean allowedOntheSame) {
+ installEnvironment(sourceType, targetType);
+ testToCreateALink(linkType, null);
+ testDestroy(linkType);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ testViewDeletion(linkType);
+ testDrop(linkType);
+ // destroy the element
+ Request deleteViewRequest = new EditCommandRequestWrapper(new DestroyElementRequest(false));
+ Command command = ((ConnectionEditPart) source.getSourceConnections().get(0)).getCommand(deleteViewRequest);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ // test link on the same
+ testToCreateAlinkOnTheSame(linkType, allowedOntheSame);
+
+ if (allowedOntheSame) {
+
+ ConnectionEditPart graphicalEditPart = (ConnectionEditPart) source.getSourceConnections().get(0);
+ View view = (View) graphicalEditPart.getModel();
+ linkElement = (Element) view.getElement();
+
+ deleteViewRequest = new GroupRequest(RequestConstants.REQ_DELETE);
+ command = ((ConnectionEditPart) source.getSourceConnections().get(0)).getCommand(deleteViewRequest);
+ assertNotNull(VIEW_DELETION + COMMAND_NULL, command);
+ assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ testToDropAlinkOnTheSame(linkType, allowedOntheSame);
+ }
+
+
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.tests.canonical.TestLink#testToCreateALink(org.eclipse.gmf.runtime.emf.type.core.IElementType)
+ *
+ * @param linkType
+ */
+
+ @Override
+ public void testToCreateALink(IElementType linkType, String initialName) {
+ assertEquals(CREATION + INITIALIZATION_TEST, beginDiagramEditPartChildrenSize, getDiagramEditPart().getChildren().size());
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == beginRootSemanticOwnedElementSize);
+ assertTrue(CREATION + INITIALIZATION_TEST, source.getSourceConnections().size() == beginSourceConnectionsSize);
+ Command command = target.getCommand(createConnectionViewRequest(linkType, source, target));
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CREATION + INITIALIZATION_TEST, source.getSourceConnections().size() == endSourceConnectionsSize);
+ ConnectionEditPart graphicalEditPart = (ConnectionEditPart) source.getSourceConnections().get(0);
+ View view = (View) graphicalEditPart.getModel();
+ linkElement = (Element) view.getElement();
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram) getRootView()).getEdges().size() == endRootEdgeSize);
+ assertEquals(CREATION + INITIALIZATION_TEST, endRootSemanticOwnedElementSize, getRootSemanticModel().getOwnedElements().size());
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertEquals(CREATION + TEST_THE_UNDO, endRootViewChildrenSize, getRootView().getChildren().size());
+ assertTrue(CREATION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == beginRootSemanticOwnedElementSize);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(CREATION + TEST_THE_REDO, ((Diagram) getRootView()).getEdges().size() == endRootEdgeSize);
+ assertTrue(CREATION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == endRootSemanticOwnedElementSize);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.tests.canonical.TestLink#testDestroy(org.eclipse.gmf.runtime.emf.type.core.IElementType)
+ *
+ * @param type
+ */
+
+ @Override
+ public void testDestroy(IElementType type) { // BMA : FIXME : unused param
+ // DESTROY SEMANTIC+ VIEW
+ assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, ((Diagram) getRootView()).getEdges().size() == endRootEdgeSize);
+ assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, source.getSourceConnections().size() == endSourceConnectionsSize);
+ assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == endRootSemanticOwnedElementSize);
+ Request deleteViewRequest = new EditCommandRequestWrapper(new DestroyElementRequest(false));
+ Command command = ((ConnectionEditPart) source.getSourceConnections().get(0)).getCommand(deleteViewRequest);
+ assertNotNull(DESTROY_DELETION + COMMAND_NULL, command);
+ assertTrue(DESTROY_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(DESTROY_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ testEnableForDeleteFromModel();
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, ((Diagram) getRootView()).getEdges().size() == beginRootEdgeSize);
+ assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, source.getSourceConnections().size() == beginSourceConnectionsSize);
+ assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == beginRootSemanticOwnedElementSize);
+ assertTrue(DESTROY_DELETION + TEST_THE_UNDO, diagramEditor.getDiagramEditDomain().getDiagramCommandStack().canUndo() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(DESTROY_DELETION + TEST_THE_UNDO, ((Diagram) getRootView()).getEdges().size() == endRootEdgeSize);
+ assertTrue(DESTROY_DELETION + TEST_THE_UNDO, source.getSourceConnections().size() == endSourceConnectionsSize);
+ assertTrue(DESTROY_DELETION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == endRootSemanticOwnedElementSize);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, ((Diagram) getRootView()).getEdges().size() == beginRootEdgeSize);
+ assertTrue(DESTROY_DELETION + TEST_THE_REDO, source.getSourceConnections().size() == beginSourceConnectionsSize);
+ assertTrue(DESTROY_DELETION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == beginRootSemanticOwnedElementSize);
+ }
+
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.tests.canonical.TestLink#testViewDeletion(org.eclipse.gmf.runtime.emf.type.core.IElementType)
+ *
+ * @param type
+ */
+
+ @Override
+ public void testViewDeletion(IElementType type) { // BMA : FIXME : unused param
+ // DELETION OF THE VIEW
+ assertTrue(VIEW_DELETION + INITIALIZATION_TEST, source.getSourceConnections().size() == endSourceConnectionsSize);
+ assertTrue(VIEW_DELETION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == endRootSemanticOwnedElementSize);
+ Request deleteViewRequest = new GroupRequest(RequestConstants.REQ_DELETE);
+ Command command = ((ConnectionEditPart) source.getSourceConnections().get(0)).getCommand(deleteViewRequest);
+ assertNotNull(VIEW_DELETION + COMMAND_NULL, command);
+ assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, source.getSourceConnections().size() == beginSourceConnectionsSize);
+ assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == endRootSemanticOwnedElementSize);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(VIEW_DELETION + TEST_THE_UNDO, source.getSourceConnections().size() == endSourceConnectionsSize);
+ assertTrue(VIEW_DELETION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == endRootSemanticOwnedElementSize);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(VIEW_DELETION + TEST_THE_REDO, source.getSourceConnections().size() == beginSourceConnectionsSize);
+ assertTrue(VIEW_DELETION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == endRootSemanticOwnedElementSize);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.tests.canonical.TestLink#testDrop(org.eclipse.gmf.runtime.emf.type.core.IElementType)
+ *
+ * @param type
+ */
+
+ @Override
+ public void testDrop(IElementType type) {// BMA : FIXME : unused param
+ // DROP
+ assertTrue(DROP + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == beginDiagramEditPartChildrenSize);
+ assertTrue(DROP + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == endRootSemanticOwnedElementSize);
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram) getRootView()).getEdges().size() == beginRootEdgeSize);
+ DropObjectsRequest dropObjectsRequest = new DropObjectsRequest();
+ List<Element> list = new ArrayList<Element>();
+ list.add(linkElement);
+ dropObjectsRequest.setObjects(list);
+ dropObjectsRequest.setLocation(DEFAULT_DROP_LOCATION);
+ Command command = getDiagramEditPart().getCommand(dropObjectsRequest);
+ assertNotNull(DROP + COMMAND_NULL, command);
+ assertTrue(DROP + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(DROP + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(DROP + TEST_THE_EXECUTION, getDiagramEditPart().getChildren().size() == endDiagramEditPartChildrenSize);
+ assertTrue(DROP + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == endRootSemanticOwnedElementSize);
+ assertTrue(DROP + TEST_THE_EXECUTION, ((Diagram) getRootView()).getEdges().size() == endRootEdgeSize);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(DROP + TEST_THE_UNDO, getDiagramEditPart().getChildren().size() == beginDiagramEditPartChildrenSize);
+ assertTrue(DROP + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == endRootSemanticOwnedElementSize);
+ assertTrue(DROP + TEST_THE_UNDO, ((Diagram) getRootView()).getEdges().size() == beginRootEdgeSize);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(DROP + TEST_THE_REDO, getDiagramEditPart().getChildren().size() == endDiagramEditPartChildrenSize);
+ assertTrue(DROP + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == endRootSemanticOwnedElementSize);
+ assertTrue(DROP + TEST_THE_REDO, ((Diagram) getRootView()).getEdges().size() == endRootEdgeSize);
+ }
+
+
+
+ /**
+ * test the drop of a link where the source and the target are the same objects.
+ *
+ * @param linkType
+ * the link type
+ * @param allowed
+ * the allowed
+ */
+ @Override
+ protected void testToDropAlinkOnTheSame(IElementType linkType, boolean allowed) {
+ // DROP
+ if (allowed) {
+ assertTrue(DROP + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == beginDiagramEditPartChildrenSize);
+ assertTrue(DROP + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == endRootSemanticOwnedElementSize);
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram) getRootView()).getEdges().size() == beginRootEdgeSize);
+ DropObjectsRequest dropObjectsRequest = new DropObjectsRequest();
+ List<Element> list = new ArrayList<Element>();
+ list.add(linkElement);
+ dropObjectsRequest.setObjects(list);
+ dropObjectsRequest.setLocation(DEFAULT_DROP_LOCATION);
+ Command command = getDiagramEditPart().getCommand(dropObjectsRequest);
+ assertNotNull(DROP + COMMAND_NULL, command);
+ assertTrue(DROP + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(DROP + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(DROP + TEST_THE_EXECUTION, getDiagramEditPart().getChildren().size() == endDiagramEditPartChildrenSize);
+ assertTrue(DROP + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == endRootSemanticOwnedElementSize);
+ assertTrue(DROP + TEST_THE_EXECUTION, ((Diagram) getRootView()).getEdges().size() == endRootEdgeSize);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(DROP + TEST_THE_UNDO, getDiagramEditPart().getChildren().size() == beginDiagramEditPartChildrenSize);
+ assertTrue(DROP + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == endRootSemanticOwnedElementSize);
+ assertTrue(DROP + TEST_THE_UNDO, ((Diagram) getRootView()).getEdges().size() == beginRootEdgeSize);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(DROP + TEST_THE_REDO, getDiagramEditPart().getChildren().size() == endDiagramEditPartChildrenSize);
+ assertTrue(DROP + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == endRootSemanticOwnedElementSize);
+ assertTrue(DROP + TEST_THE_REDO, ((Diagram) getRootView()).getEdges().size() == endRootEdgeSize);
+ }
+ }
+
+ /**
+ * test the creation of a link where the source and the target are the same objects.
+ *
+ * @param linkType
+ * the link type
+ * @param allowed
+ * the allowed
+ */
+ @Override
+ protected void testToCreateAlinkOnTheSame(IElementType linkType, boolean allowed) {
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == beginDiagramEditPartChildrenSize);
+ assertEquals(CREATION + INITIALIZATION_TEST, beginRootSemanticOwnedElementSize, getRootSemanticModel().getOwnedElements().size());
+ // Note: Must always ask the target edit-part to create the connection, and in this case the target is 'source'
+ Command command = source.getCommand(createConnectionViewRequest(linkType, source, source));
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertEquals(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute(), allowed);
+ if (allowed) {
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertEquals(CREATION + INITIALIZATION_TEST, endRootEdgeSize, ((Diagram) getRootView()).getEdges().size());
+ assertEquals(CREATION + INITIALIZATION_TEST, endRootSemanticOwnedElementSize, getRootSemanticModel().getOwnedElements().size());
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertEquals(CREATION + TEST_THE_UNDO, beginRootViewChildrenSize, getRootView().getChildren().size());
+ assertEquals(CREATION + TEST_THE_UNDO, beginRootSemanticOwnedElementSize, getRootSemanticModel().getOwnedElements().size());
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertEquals(CREATION + TEST_THE_REDO, endRootEdgeSize, ((Diagram) getRootView()).getEdges().size());
+ assertEquals(CREATION + TEST_THE_REDO, endRootSemanticOwnedElementSize, getRootSemanticModel().getOwnedElements().size());
+ }
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestListCompartmentHelper.java b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestListCompartmentHelper.java
new file mode 100755
index 0000000..9ac2d71
--- /dev/null
+++ b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestListCompartmentHelper.java
@@ -0,0 +1,262 @@
+package org.eclipse.papyrus.uml.diagram.tests.canonical;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.emf.common.command.CommandStack;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.CompoundCommand;
+import org.eclipse.gef.requests.ChangeBoundsRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.commands.wrappers.GEFtoEMFCommandWrapper;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.uml.diagram.common.part.UmlGmfDiagramEditor;
+import org.eclipse.swt.dnd.DND;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.uml2.uml.Association;
+import org.eclipse.uml2.uml.AttributeOwner;
+import org.eclipse.uml2.uml.Operation;
+import org.eclipse.uml2.uml.Property;
+import org.junit.Assert;
+
+/**
+ * ListCompartmentN test helper
+ *
+ */
+public abstract class TestListCompartmentHelper extends AbstractPapyrusTest {
+
+ private boolean myOperationFailed = false;
+
+ private final DiagramEditPart myDiagramEditPart;
+
+ /** The diagram editor. */
+ private final UmlGmfDiagramEditor myDiagramEditor;
+
+ public TestListCompartmentHelper(DiagramEditPart diagramEditPart, UmlGmfDiagramEditor diagramEditor) {
+ myDiagramEditPart = diagramEditPart;
+ myDiagramEditor = diagramEditor;
+ }
+
+ public void checkDuplicate(String parent, String parentContainer, String child) {
+ checkDuplicate(parent, parentContainer, child, null);
+ }
+
+ public void checkDuplicate(String parent, String parentContainer, String child, String nestedChild) {
+ IGraphicalEditPart parentEP = createChild(parent, myDiagramEditPart, 0);
+ IGraphicalEditPart targetEP = findChildBySemanticHint(parentEP, parentContainer);
+ IGraphicalEditPart dndEP = createChild(nestedChild != null ? nestedChild : child, targetEP, 0);
+ {
+ Command ddCommand = createDropCommand(dndEP, myDiagramEditPart);
+ Assert.assertTrue(ddCommand.canExecute());
+ executeOnUIThread(ddCommand);
+ }
+ IGraphicalEditPart canvasDnDEP = findChildBySemanticHint(myDiagramEditPart, nestedChild != null ? child : getDefaultNamedElementVisualId());
+ {
+ Command ddCommand = createDropCommand(canvasDnDEP, targetEP);
+ Assert.assertFalse(canvasDnDEP.getClass().getName() + " can't be dropped to the " + targetEP.getClass().getName() + " due the duplication behavior rule.", ddCommand.canExecute());
+ }
+ }
+
+ public void checkUnexecutableChildCreate(String targetVisualId, String targetCompartmentVisualId, String childVisualId) {
+ IGraphicalEditPart targetEP = createChild(targetVisualId, myDiagramEditPart, 0);
+ IGraphicalEditPart targetCompartmentEP = findChildBySemanticHint(targetEP, targetCompartmentVisualId);
+ Command command = getCreateChildCommand(childVisualId, targetCompartmentEP);
+ Assert.assertFalse("The " + childVisualId + "-visualId can't be created in the " + targetCompartmentEP.getClass().getName(), command.canExecute());
+ }
+
+ public void checkChildCreate(String targetVisualId, String targetCompartmentVisualId, String childVisualId) {
+ IGraphicalEditPart targetEP = createChild(targetVisualId, myDiagramEditPart, 0);
+ IGraphicalEditPart targetCompartmentEP = findChildBySemanticHint(targetEP, targetCompartmentVisualId);
+ Command command = getCreateChildCommand(childVisualId, targetCompartmentEP);
+ Assert.assertTrue("The " + childVisualId + "-visualId should be created in the " + targetCompartmentEP.getClass().getName(), command.canExecute());
+ }
+
+ public void checkUnexecutableDrop2Canvas(String targetVisualId, String targetCompartmentVisualId, String childVisualId) {
+ IGraphicalEditPart targetEP = createChild(targetVisualId, myDiagramEditPart, 0);
+ IGraphicalEditPart targetCompartmentEP = findChildBySemanticHint(targetEP, targetCompartmentVisualId);
+ IGraphicalEditPart childEP = createChild(childVisualId, targetCompartmentEP, 0);
+ EObject semantic = childEP.resolveSemanticElement();
+ Assert.assertTrue(semantic != null && (semantic instanceof Property || semantic instanceof Operation));
+ Command command = createDropCommand(childEP, myDiagramEditPart);
+ Assert.assertFalse("The " + childEP.getClass().getName() + " can't be droped to the Canvas.", command.canExecute());
+ }
+
+ public void checkDropPropertyFromModelExplorer2Canvas(String targetVisualId, String targetCompartmentVisualId, String childVisualId) throws Exception {
+ IGraphicalEditPart targetEP = createChild(targetVisualId, myDiagramEditPart, 0);
+ IGraphicalEditPart targetCompartmentEP = findChildBySemanticHint(targetEP, targetCompartmentVisualId);
+ IGraphicalEditPart childEP = createChild(childVisualId, targetCompartmentEP, 0);
+ EObject semantic = childEP.resolveSemanticElement();
+ Assert.assertTrue(semantic != null && (semantic instanceof Property || semantic instanceof Operation));
+ List<EObject> forDrop = new ArrayList<EObject>();
+ forDrop.add(semantic);
+ Command ddCommand = createDropCommandFromModelExplorer2Canvas(forDrop);
+ Assert.assertTrue(ddCommand.canExecute());
+ }
+
+ public void checkDropAssociationPropertyFromModelExplorer(String targetVisualId, String targetCompartmentVisualId, IElementType associationType) throws Exception {
+ IGraphicalEditPart sourceEP = createChild(targetVisualId, myDiagramEditPart, 0);
+ IGraphicalEditPart targetEP = createChild(targetVisualId, myDiagramEditPart, 1);
+ IGraphicalEditPart targetCompartmentEP = findChildBySemanticHint(sourceEP, targetCompartmentVisualId);
+ IGraphicalEditPart associationEP = createAssociationLink(associationType, sourceEP, targetEP);
+ assertNotNull(associationEP);
+ EObject sourceSemantic = sourceEP.resolveSemanticElement();
+ assertTrue("Source should be StructuredClassifier.", sourceSemantic instanceof AttributeOwner);
+ List<Property> sourceProperties = ((AttributeOwner) sourceSemantic).getOwnedAttributes();
+ assertEquals("Source owned attributes", 1, sourceProperties.size());
+ Property sourceProperty = sourceProperties.get(0);
+ List<EObject> forDrop = new ArrayList<EObject>();
+ forDrop.add(sourceProperty);
+ Command ddCommand = createDropCommandFromModelExplorer(forDrop, targetCompartmentEP);
+ Assert.assertTrue(ddCommand == null || false == ddCommand.canExecute());
+ }
+
+ private IGraphicalEditPart createAssociationLink(IElementType type, EditPart source, EditPart target) {
+ Command endCommand = target.getCommand(createConnectionViewRequest(type, source, target));
+ Assert.assertNotNull(endCommand);
+ Assert.assertTrue(endCommand.canExecute());
+ executeOnUIThread(endCommand);
+ Assert.assertEquals(1, myDiagramEditPart.getConnections().size());
+ IGraphicalEditPart association = (IGraphicalEditPart) myDiagramEditPart.getConnections().get(0);
+ Assert.assertTrue(association.resolveSemanticElement() instanceof Association);
+ return association;
+ }
+
+ private CreateConnectionViewRequest createConnectionViewRequest(IElementType type, EditPart source, EditPart target) {
+ CreateConnectionViewRequest connectionRequest = CreateViewRequestFactory.getCreateConnectionRequest(type, myDiagramEditPart.getDiagramPreferencesHint());
+ connectionRequest.setSourceEditPart(null);
+ connectionRequest.setTargetEditPart(source);
+ connectionRequest.setType(RequestConstants.REQ_CONNECTION_START);
+ source.getCommand(connectionRequest);
+ connectionRequest.setSourceEditPart(source);
+ connectionRequest.setTargetEditPart(target);
+ connectionRequest.setType(RequestConstants.REQ_CONNECTION_END);
+ return connectionRequest;
+ }
+
+ private Command createDropCommandFromModelExplorer2Canvas(List<EObject> elements) {
+ return myDiagramEditPart.getCommand(createDropRequestFromModelExplorer(elements));
+ }
+
+ private Command createDropCommandFromModelExplorer(List<EObject> elements, IGraphicalEditPart target) {
+ return target.getCommand(createDropRequestFromModelExplorer(elements));
+ }
+
+ private DropObjectsRequest createDropRequestFromModelExplorer(List<EObject> elements) {
+ DropObjectsRequest req = new DropObjectsRequest();
+ req.setObjects(elements);
+ req.setAllowedDetail(DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK);
+ req.setLocation(new Point(15, 15));
+ req.setRequiredDetail(DND.DROP_COPY);
+ req.setType(RequestConstants.REQ_DROP_OBJECTS);
+ return req;
+ }
+
+ private Command getCreateChildCommand(String childVID, IGraphicalEditPart container) {
+ final IElementType childType = getElementType(childVID);
+ final CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(childType, container.getDiagramPreferencesHint());
+ requestcreation.setSize(new Dimension(1, 1));
+ requestcreation.setLocation(new Point(10, 10));
+ return container.getCommand(requestcreation);
+ }
+
+ public void checkUnexecutableDrop(String targetVisualId, String targetCompartmentVisualId, String dropableVisualId) {
+ IGraphicalEditPart targetEP = createChild(targetVisualId, myDiagramEditPart, 0);
+ IGraphicalEditPart dropableEP = createChild(dropableVisualId, myDiagramEditPart, 1);
+ IGraphicalEditPart targetCompartmentEP = findChildBySemanticHint(targetEP, targetCompartmentVisualId);
+ Command command = createDropCommand(dropableEP, targetCompartmentEP);
+ Assert.assertFalse("The " + dropableEP.getClass().getName() + " can't be droped to the " + targetCompartmentEP.getClass().getName(), command.canExecute());
+ }
+
+ protected abstract String getDefaultNamedElementVisualId();
+
+ protected abstract IElementType getElementType(String childVID);
+
+ protected abstract String getVisualID(View view);
+
+ private void executeOnUIThread(final Command command) {
+ Display.getDefault().syncExec(new Runnable() {
+
+ public void run() {
+ execute(command);
+ }
+ });
+ }
+
+ private void assertLastOperationSuccessful() {
+ Assert.assertFalse("The operation failed. Look at the log, or put a breakpoint on ExecutionException or DefaultOperationHistory#notifyNotOK to find the cause.", this.myOperationFailed); //$NON-NLS-1$
+ }
+
+ /**
+ * Reset the "operation failed" state. Call this before executing each
+ * operation for which you want to test whether if failed with {@link assertLastOperationSuccessful()}.
+ */
+ private void resetLastOperationFailedState() {
+ myOperationFailed = false;
+ }
+
+ /** Execute the given command in the diagram editor. */
+ private void execute(final Command command) {
+ resetLastOperationFailedState();
+ getCommandStack().execute(new GEFtoEMFCommandWrapper(command));
+ assertLastOperationSuccessful();
+ }
+
+ /** The command stack to use to execute commands on the diagram. */
+ private CommandStack getCommandStack() {
+ // not "diagramEditor.getDiagramEditDomain().getDiagramCommandStack()"
+ // because it messes up undo contexts
+ return myDiagramEditor.getEditingDomain().getCommandStack();
+ }
+
+ private Command createDropCommand(IGraphicalEditPart child, IGraphicalEditPart newParent) {
+ CompoundCommand c = new CompoundCommand();
+ ChangeBoundsRequest changeBoundsRequest = new ChangeBoundsRequest(org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants.REQ_DRAG);
+ changeBoundsRequest.setEditParts(child);
+ changeBoundsRequest.setLocation(new Point(15, 15));
+ c.add(child.getCommand(changeBoundsRequest));
+ myDiagramEditPart.getEditingDomain().getCommandStack().execute(new GEFtoEMFCommandWrapper(c));
+ changeBoundsRequest.setType(org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants.REQ_DROP);
+ c.add(newParent.getCommand(changeBoundsRequest));
+ return c;
+ }
+
+ private IGraphicalEditPart createChild(String childVID, IGraphicalEditPart container, int number) {
+ Command cmd = getCreateChildCommand(childVID, container);
+ executeOnUIThread(cmd);
+ return findChild(container, childVID, number);
+ }
+
+
+ private IGraphicalEditPart findChild(IGraphicalEditPart parent, String vid, int number) {
+ List<?> children = parent.getChildren();
+ if (number > children.size() - 1) {
+ Assert.fail("Parent " + parent + ", type " + parent.getNotationView() + " hasn't less children then " + number);
+ }
+ IGraphicalEditPart childEP = (IGraphicalEditPart) children.get(number);
+ assertNotNull("Parent " + parent + ", type " + parent.getNotationView() + " looking for: " + vid, childEP);
+ Assert.assertEquals("Parent " + parent + ", type " + parent.getNotationView() + " looking for: " + vid, getVisualID(childEP.getNotationView()), vid);
+ return childEP;
+ }
+
+ private IGraphicalEditPart findChildBySemanticHint(IGraphicalEditPart parent, String vid) {
+ IGraphicalEditPart childEP = parent.getChildBySemanticHint(vid);
+ assertNotNull("Parent " + parent + ", type " + parent.getNotationView() + " looking for: " + vid, childEP);
+ return childEP;
+ }
+}
diff --git a/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestNested.java b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestNested.java
new file mode 100755
index 0000000..70022bc
--- /dev/null
+++ b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestNested.java
@@ -0,0 +1,184 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nizar GUEDIDI (CEA LIST) - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.tests.canonical;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ListCompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ResizableCompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.uml2.uml.Element;
+
+public abstract class TestNested extends org.eclipse.papyrus.uml.diagram.tests.canonical.AbstractPapyrusTestCase {
+
+ /** The top node. */
+ protected GraphicalEditPart topNode;
+
+ /** The Child node. */
+ protected GraphicalEditPart childNode;
+
+ /**
+ * Test to create a nested classifier node.
+ *
+ * @param type
+ * the type
+ * @param containerType
+ * the container type
+ */
+ public void testToCreateAChildLabel(IElementType type, String containerType) {
+ ListCompartmentEditPart compartment = null;
+ int index = 0;
+ while(compartment == null && index < getChildEditPart().getChildren().size()) {
+ if((getChildEditPart().getChildren().get(index)) instanceof ListCompartmentEditPart && (((View)((ListCompartmentEditPart)(getChildEditPart().getChildren().get(index))).getModel()).getType().equals(containerType))) { //$NON-NLS-1$
+ compartment = (ListCompartmentEditPart)(getChildEditPart().getChildren().get(index));
+ }
+ index++;
+ }
+ assertTrue("Container not found", compartment != null); //$NON-NLS-1$
+ //CREATION
+ assertTrue(CREATION + INITIALIZATION_TEST, compartment.getChildren().size() == 0);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModelchild().getOwnedElements().size() == 0);
+ CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getDiagramEditPart().getDiagramPreferencesHint());
+ Command command = compartment.getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CREATION + TEST_THE_EXECUTION, compartment.getChildren().size() == 1);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(CREATION + TEST_THE_UNDO, compartment.getChildren().size() == 0);
+ assertTrue(CREATION + TEST_THE_UNDO, ((Element)((View)getChildEditPart().getModel()).getElement()).getOwnedElements().size() == 0);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue("CREATION: " + TEST_THE_REDO, compartment.getChildren().size() == 1); //$NON-NLS-1$
+ }
+
+ /**
+ * Test to create a node.
+ *
+ * @param type
+ * the type
+ * @param containerType
+ * the container type
+ */
+ public void testToCreateANode(IElementType type, String containerType) {
+ ResizableCompartmentEditPart compartment = null;
+ int index = 0;
+ while(compartment == null && index < getTopEditPart().getChildren().size()) {
+ if((getTopEditPart().getChildren().get(index)) instanceof ResizableCompartmentEditPart) {
+ if((((View)((ResizableCompartmentEditPart)(getTopEditPart().getChildren().get(index))).getModel()).getType().equals(containerType))) { //$NON-NLS-1$
+ compartment = (ResizableCompartmentEditPart)(getTopEditPart().getChildren().get(index));
+ }
+ }
+ index++;
+ }
+ assertTrue("Container not found", compartment != null); //$NON-NLS-1$
+ //CREATION
+ assertTrue(CREATION + INITIALIZATION_TEST, compartment.getChildren().size() == 0);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 0);
+ CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getDiagramEditPart().getDiagramPreferencesHint());
+ Command command = compartment.getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CREATION + TEST_THE_EXECUTION, compartment.getChildren().size() == 1);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(CREATION + TEST_THE_UNDO, compartment.getChildren().size() == 0);
+ assertTrue(CREATION + TEST_THE_UNDO, ((Element)((View)getTopEditPart().getModel()).getElement()).getOwnedElements().size() == 0);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue("CREATION: " + TEST_THE_REDO, compartment.getChildren().size() == 1); //$NON-NLS-1$
+ childNode = (GraphicalEditPart)compartment.getChildren().get(0);
+ }
+
+ /**
+ * Gets the root semantic modelchild.
+ *
+ * @return the root semantic modelchild
+ */
+ private Element getRootSemanticModelchild() {
+ return (Element)((View)getChildEditPart().getModel()).getElement();
+ }
+
+ /**
+ * Test to create a top node.
+ *
+ * @param type
+ * the type
+ */
+ public void testToCreateATopNode(IElementType type) {
+ //CREATION
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 0);
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Element)((View)getDiagramEditPart().getModel()).getElement()).getOwnedElements().size() == 0);
+ CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getDiagramEditPart().getDiagramPreferencesHint());
+ Command command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CREATION + TEST_THE_EXECUTION, getRootView().getChildren().size() == 1);
+ topNode = (GraphicalEditPart)getDiagramEditPart().getChildren().get(0);
+ }
+
+ /**
+ * Gets the top edit part.
+ *
+ * @return the top edit part
+ */
+ public GraphicalEditPart getTopEditPart() {
+ return topNode;
+ }
+
+ /**
+ * Gets the Child edit part.
+ *
+ * @return the Child edit part
+ */
+ public GraphicalEditPart getChildEditPart() {
+ return childNode;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.diagram.clazz.test.canonical.AbstractPapyrusTestCase#getRootSemanticModel()
+ *
+ * @return
+ */
+ @Override
+ protected Element getRootSemanticModel() {
+ return (Element)((View)getTopEditPart().getModel()).getElement();
+ }
+
+ /**
+ * Test to manage top node.
+ *
+ * @param type
+ * the type
+ * @param containerType
+ * the container type
+ */
+ public void testToManageTopNode(IElementType parentNodeType, IElementType topNodeType, IElementType type, String containerChilType, String containerType) {
+ //Parent Node
+ testToCreateATopNode(parentNodeType);
+ //Top Node
+ testToCreateANode(topNodeType, containerChilType);
+ //Nested classifier
+ testToCreateAChildLabel(type, containerType);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestPortLocation.java b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestPortLocation.java
new file mode 100755
index 0000000..b0dd2cf
--- /dev/null
+++ b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestPortLocation.java
@@ -0,0 +1,172 @@
+package org.eclipse.papyrus.uml.diagram.tests.canonical;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.RequestConstants;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gef.requests.GroupRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.AbstractBorderedShapeEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
+import org.eclipse.gmf.runtime.emf.type.core.commands.SetValueCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.commands.wrappers.GMFtoGEFCommandWrapper;
+import org.eclipse.papyrus.infra.gmfdiag.common.service.palette.AspectUnspecifiedTypeCreationTool;
+import org.eclipse.papyrus.uml.diagram.common.locator.PortPositionLocator;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Port;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.Assert;
+
+public abstract class TestPortLocation extends AbstractPapyrusTestCase {
+
+ protected abstract IElementType getPortType();
+
+ protected void testPortLocation(IElementType container) {
+ testPortLocation(container, null, null);
+ }
+
+ protected void testPortLocation(IElementType container, String containerCompartmentVisualId, IElementType child) {
+ IGraphicalEditPart parentEP = createChild(getDiagramEditPart(), container);
+ EObject containerSemantic = parentEP.resolveSemanticElement();
+ if (containerCompartmentVisualId != null) {
+ parentEP = findChildBySemanticHint(parentEP, containerCompartmentVisualId);
+ }
+ if (child != null) {
+ parentEP = createChild(parentEP, child);
+ EObject parentSemantic = parentEP.resolveSemanticElement();
+ if (parentSemantic instanceof Property) {
+ SetValueCommand setPropertyTypeCommand = new SetValueCommand(new SetRequest(parentSemantic, UMLPackage.eINSTANCE.getTypedElement_Type(), containerSemantic));
+ executeOnUIThread(new GMFtoGEFCommandWrapper(setPropertyTypeCommand));
+ }
+ }
+ Point parentLocation = new Point(100, 100);
+ parentEP.getFigure().setBounds(new Rectangle(parentLocation, new Dimension(200, 200)));
+ Point portLocation = new Point(100, 280);
+ IGraphicalEditPart portEP = createChild(parentEP, getPortType(), portLocation);
+ Port portSemantic = (Port) portEP.resolveSemanticElement();
+ assertNotNull(portSemantic);
+ checkPortPosition(portEP);
+ testViewDeletion(portEP, child == null ? 1 : 0);
+ testDrop(parentEP, portSemantic, portLocation, child == null ? 1 : 0);
+ portEP = parentEP.getChildBySemanticHint(((IHintedType) getPortType()).getSemanticHint());
+ checkPortPosition(portEP);
+ }
+
+ private void checkPortPosition(IGraphicalEditPart port) {
+ assertNotNull(port);
+ PortPositionLocator portPositionLocator = getConstraint(port);
+ assertNotNull(portPositionLocator);
+ assertNotNull(portPositionLocator.getConstraint());
+ Assert.assertEquals(new Point(-10, 180), portPositionLocator.getConstraint().getLocation());
+ }
+
+ private IGraphicalEditPart findChildBySemanticHint(IGraphicalEditPart parent, String vid) {
+ IGraphicalEditPart childEP = parent.getChildBySemanticHint(vid);
+ assertNotNull("Parent " + parent + ", type " + parent.getNotationView() + " looking for: " + vid, childEP);
+ return childEP;
+ }
+
+ private PortPositionLocator getConstraint(IGraphicalEditPart portEP) {
+ if (false == portEP.getModel() instanceof View) {
+ return null;
+ }
+ Object constraint = ((AbstractBorderedShapeEditPart) portEP.getParent()).getBorderedFigure().getBorderItemContainer().getLayoutManager().getConstraint(portEP.getFigure());
+ if (false == constraint instanceof PortPositionLocator) {
+ return null;
+ }
+ return (PortPositionLocator) constraint;
+ }
+
+ private IGraphicalEditPart createChild(IGraphicalEditPart container, IElementType childType) {
+ return createChild(container, childType, new Point(0, 0));
+ }
+
+ private IGraphicalEditPart createChild(IGraphicalEditPart container, IElementType childType, Point location) {
+ final CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(childType, container.getDiagramPreferencesHint());
+ @SuppressWarnings("unchecked")
+ Map<Object, Object> params = requestcreation.getExtendedData();
+ params.put(AspectUnspecifiedTypeCreationTool.INITIAL_MOUSE_LOCATION_FOR_CREATION, location);
+ requestcreation.setSize(new Dimension(10, 10));
+ requestcreation.setLocation(location);
+ Command command = container.getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute());
+ executeOnUIThread(command);
+ EditPart createdEditPart = (EditPart) container.getChildren().get((container.getChildren().size() - 1));
+ Assert.assertNotNull("The editpart must be created", createdEditPart); //$NON-NLS-1$
+ Assert.assertTrue(createdEditPart instanceof IGraphicalEditPart);
+ return (IGraphicalEditPart) createdEditPart;
+ }
+
+ @SuppressWarnings("unchecked")
+ private void testViewDeletion(EditPart forHide, int expectedChildViews) {
+ assertEquals(VIEW_DELETION + INITIALIZATION_TEST, 1, getRootView().getChildren().size());
+ List<View> childViewsBefore = ((View) getRootView().getChildren().get(0)).getChildren();
+ int childViewsSize = childViewsBefore.size();
+ Request deleteViewRequest = new GroupRequest(RequestConstants.REQ_DELETE);
+ Command command = forHide.getCommand(deleteViewRequest);
+ assertNotNull(VIEW_DELETION + COMMAND_NULL, command);
+ assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute());
+ // execute hide the view
+ executeOnUIThread(command);
+ List<View> childViewsAfter = ((View) getRootView().getChildren().get(0)).getChildren();
+ assertEquals(VIEW_DELETION + " if the port has been hided.", expectedChildViews, childViewsSize - childViewsAfter.size());
+ // undo hide the view
+ undoOnUIThread();
+ childViewsAfter = ((View) getRootView().getChildren().get(0)).getChildren();
+ assertEquals(VIEW_DELETION + " UNDO if the port has been restored.", childViewsSize, childViewsAfter.size());
+ // redo hide the view
+ redoOnUIThread();
+ childViewsAfter = ((View) getRootView().getChildren().get(0)).getChildren();
+ assertEquals(VIEW_DELETION + "REDO if the port has been hided.", expectedChildViews, childViewsSize - childViewsAfter.size());
+ }
+
+ @SuppressWarnings("unchecked")
+ private void testDrop(IGraphicalEditPart container, Port port, Point location, int expectedChildViews) {
+ List<View> childViewsBefore = ((View) getRootView().getChildren().get(0)).getChildren();
+ int childViewsBeforeSize = childViewsBefore.size();
+ DropObjectsRequest dropObjectsRequest = new DropObjectsRequest();
+ ArrayList<Element> list = new ArrayList<Element>();
+ list.add(port);
+ dropObjectsRequest.setObjects(list);
+ dropObjectsRequest.setLocation(location);
+ Command command = container.getCommand(dropObjectsRequest);
+ assertNotNull(DROP + COMMAND_NULL, command);
+ assertTrue(DROP + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(DROP + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute());
+ // execute the drop
+ executeOnUIThread(command);
+ List<View> childViewsAfter = ((View) getRootView().getChildren().get(0)).getChildren();
+ assertEquals(DROP + TEST_THE_EXECUTION, expectedChildViews, childViewsAfter.size() - childViewsBeforeSize);
+ // undo the drop
+ undoOnUIThread();
+ childViewsAfter = ((View) getRootView().getChildren().get(0)).getChildren();
+ Assert.assertEquals(DROP + TEST_THE_UNDO, childViewsAfter.size(), childViewsBeforeSize);
+ // redo the drop
+ redoOnUIThread();
+ childViewsAfter = ((View) getRootView().getChildren().get(0)).getChildren();
+ Assert.assertEquals(DROP + TEST_THE_REDO, expectedChildViews, childViewsAfter.size() - childViewsBeforeSize);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestTopNode.java b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestTopNode.java
new file mode 100755
index 0000000..c68b5d5
--- /dev/null
+++ b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestTopNode.java
@@ -0,0 +1,47 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.tests.canonical;
+
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.notation.View;
+
+/**
+ * The Class TestTopNode.
+ */
+public abstract class TestTopNode extends AbstractTestNode {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected IGraphicalEditPart getContainerEditPart() {
+ return getDiagramEditPart();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected View getRootView() {
+ return (View)getContainerEditPart().getModel();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected boolean isSemanticTest() {
+ return true;
+ }
+}
diff --git a/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/createFromPalette/AbstractCreateChildLabelNodeFromPaletteTest.java b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/createFromPalette/AbstractCreateChildLabelNodeFromPaletteTest.java
new file mode 100755
index 0000000..06d5adb
--- /dev/null
+++ b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/createFromPalette/AbstractCreateChildLabelNodeFromPaletteTest.java
@@ -0,0 +1,160 @@
+/*****************************************************************************
+ * Copyright (c) 2014, 2015 CEA LIST, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus - bug 464647
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.diagram.tests.createFromPalette;
+
+import static org.hamcrest.CoreMatchers.notNullValue;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ListCompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.notation.Shape;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.updater.DiagramUpdater;
+import org.eclipse.papyrus.uml.diagram.tests.canonical.AbstractPapyrusTestCase;
+import org.eclipse.uml2.uml.Element;
+import org.junit.Assert;
+
+import com.google.common.collect.Iterables;
+
+/**
+ * @author jc236769
+ *
+ */
+public abstract class AbstractCreateChildLabelNodeFromPaletteTest extends AbstractPapyrusTestCase {
+ private GraphicalEditPart parentNode;
+
+ /**
+ * Test case for creation of a label node within a top node of the diagram.
+ */
+ public void testCreateChildLabelNodeFromPalette(IElementType topNodeType, IElementType childNodeType, String compartmentType, boolean mustPass) {
+ create(topNodeType);
+ createChildNode(childNodeType, compartmentType);
+ }
+
+ /**
+ * Test case for creation of a label node within a node that is nested within a top node of the diagram.
+ */
+ public void testCreateChildLabelNodeFromPalette(IElementType topNodeType, String topNodeCompartmentType, IElementType nestedNodeType, IElementType childNodeType, String compartmentType, boolean mustPass) {
+ create(nestedNodeType, topNodeType, topNodeCompartmentType);
+ createChildNode(childNodeType, compartmentType);
+ }
+
+ /**
+ * @param childNodeType
+ * @param compartmentType
+ * @param b
+ */
+ private void createChildNode(IElementType childNodeType, String compartmentType) {
+ ListCompartmentEditPart compartment = null;
+
+ // Find the edit-part for the compartment
+ for (Object editPart : getParentEditPart().getChildren()) {
+ if (editPart instanceof ListCompartmentEditPart && (((View) ((ListCompartmentEditPart) (editPart)).getModel()).getType().equals(compartmentType))) { //$NON-NLS-1$
+ compartment = (ListCompartmentEditPart) editPart;
+ }
+ }
+
+ assertTrue("Container compartment not found", compartment != null); //$NON-NLS-1$
+ // CREATION
+ // assertTrue(CREATION + INITIALIZATION_TEST, compartment.getChildren().size() == 0);
+ // assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 0);
+ CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(childNodeType, getDiagramEditPart().getDiagramPreferencesHint());
+ Command command = compartment.getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CREATION + TEST_THE_EXECUTION, compartment.getChildren().size() == 1);
+ Assert.assertTrue("Node must be org.eclipse.gmf.runtime.notation.Shape", ((EditPart) compartment.getChildren().get(0)).getModel() instanceof Shape); //$NON-NLS-1$
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(CREATION + TEST_THE_UNDO, compartment.getChildren().size() == 0);
+ assertTrue(CREATION + TEST_THE_UNDO, ((Element) ((View) getParentEditPart().getModel()).getElement()).getOwnedElements().size() == 0);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue("CREATION: " + TEST_THE_REDO, compartment.getChildren().size() == 1); //$NON-NLS-1$
+
+ Assert.assertNotEquals("Diagram updater must detect that children has been created", 0, getDiagramUpdater().getSemanticChildren(getRootView()).size()); //$NON-NLS-1$
+ Assert.assertEquals("Diagram updater must detect that no link has been created", 0, getDiagramUpdater().getContainedLinks(getRootView()).size()); //$NON-NLS-1$
+ Assert.assertEquals("Diagram updater must detect that no link are incoming", 0, getDiagramUpdater().getIncomingLinks(((GraphicalEditPart) compartment.getChildren().get(0)).getNotationView()).size()); //$NON-NLS-1$
+ Assert.assertEquals("Diagram updater must detect that no link are outgoing", 0, getDiagramUpdater().getOutgoingLinks(((GraphicalEditPart) compartment.getChildren().get(0)).getNotationView()).size()); //$NON-NLS-1$
+ Assert.assertEquals("Diagram updater must detect that no children has ben created in the new element", 0, getDiagramUpdater().getSemanticChildren(((GraphicalEditPart) compartment.getChildren().get(0)).getNotationView()).size()); //$NON-NLS-1$
+ Assert.assertEquals("Diagram updater must detect that no link has been created in the new element", 0, getDiagramUpdater().getContainedLinks(((GraphicalEditPart) compartment.getChildren().get(0)).getNotationView()).size()); //$NON-NLS-1$
+ }
+
+ /**
+ * Gets the top edit part.
+ *
+ * @return the top edit part
+ */
+ public GraphicalEditPart getParentEditPart() {
+ return parentNode;
+ }
+
+ public abstract DiagramUpdater getDiagramUpdater();
+
+
+ /**
+ * Create a top node.
+ *
+ * @param type
+ * the type
+ */
+ public void create(IElementType type) {
+ CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getDiagramEditPart().getDiagramPreferencesHint());
+ Command command = getDiagramEditPart().getCommand(requestcreation);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ parentNode = (GraphicalEditPart) getDiagramEditPart().getChildren().get(0);
+ }
+
+ /**
+ * Create a node nested within a top node.
+ */
+ public void create(IElementType nestedNodeType, IElementType topNodeType, String compartmentType) {
+ create(topNodeType);
+ GraphicalEditPart topNode = parentNode;
+ parentNode = null;
+
+ // Find the edit-part for the compartment
+ String compartmentVisualID = compartmentType;
+ CompartmentEditPart compartment = null;
+ for (CompartmentEditPart editPart : Iterables.filter(topNode.getChildren(), CompartmentEditPart.class)) {
+ if (compartmentVisualID.equals(((View) editPart.getModel()).getType())) { // $NON-NLS-1$
+ compartment = editPart;
+ }
+ }
+
+ CreateViewRequest request = CreateViewRequestFactory.getCreateShapeRequest(nestedNodeType, getDiagramEditPart().getDiagramPreferencesHint());
+ Command command = compartment.getCommand(request);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+
+ // Scan the compartment to find the new child
+ for (GraphicalEditPart child : Iterables.filter(compartment.getChildren(), GraphicalEditPart.class)) {
+ if (nestedNodeType.getEClass().isInstance(child.resolveSemanticElement())) {
+ parentNode = child;
+ break;
+ }
+ }
+
+ assertThat("Parent edit-part nested in top edit-part not found", parentNode, notNullValue());
+ }
+}
diff --git a/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/createFromPalette/AbstractCreateLinkFromPaletteTest.java b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/createFromPalette/AbstractCreateLinkFromPaletteTest.java
new file mode 100755
index 0000000..8e45c5d
--- /dev/null
+++ b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/createFromPalette/AbstractCreateLinkFromPaletteTest.java
@@ -0,0 +1,382 @@
+/*****************************************************************************
+ * Copyright (c) 2009, 2015 CEA LIST, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 464647
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.tests.createFromPalette;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.IHandler;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.gef.ConnectionEditPart;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.RequestConstants;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeCompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.updater.DiagramUpdater;
+import org.eclipse.papyrus.uml.diagram.tests.canonical.AbstractPapyrusTestCase;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.commands.ICommandService;
+import org.eclipse.uml2.uml.Element;
+import org.junit.Assert;
+
+/**
+ * The Class TestTopLink to test when this is link . The link is attached to a semantic element that has to be contained by the source and the target.
+ * To adapt when source owns the created link
+ */
+public abstract class AbstractCreateLinkFromPaletteTest extends AbstractPapyrusTestCase {
+
+ protected static final String THE_LINK_RECONNECT_EXISTS = "The Link exist"; //$NON-NLS-1$
+
+ protected static final String RECONNECTION_TARGET = "Reconnection of target"; //$NON-NLS-1$
+
+ protected static final String LINK_EXISTS_RECONNECTION_ON_TARGET = "Link exist on the target"; //$NON-NLS-1$
+
+ protected static final String THE_LINK_TO_RECONNECT_EXISTS = "The Link exist"; //$NON-NLS-1$
+
+ protected static final String RECONNECTION_SOURCE = "Reconnection of source"; //$NON-NLS-1$
+
+ protected static final String LINK_EXISTS_RECONNECTION_ON_SOURCE = "Link exist on the source"; //$NON-NLS-1$
+
+ protected GraphicalEditPart source = null;
+
+ protected GraphicalEditPart sourcePlayer = null;
+
+ protected GraphicalEditPart target = null;
+
+ protected GraphicalEditPart targetPlayer = null;
+
+ private Object rootCompartment;
+
+ private IGraphicalEditPart containerEditPart;
+
+ public abstract DiagramUpdater getDiagramUpdater();
+
+ /**
+ * Test to create a link.
+ *
+ * @param linkType
+ * the type
+ */
+ public void testToCreateALink(IElementType linkType, String initialName) {
+ final int mustPassOffset = (mustPass) ? 0 : -1;
+ assertTrue(CREATION + INITIALIZATION_TEST, getContainerEditPart().getChildren().size() == 4);
+ // assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+ Command command = target.getCommand(createConnectionViewRequest(linkType, source, target));
+
+ if (mustPass) {
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute());
+ } else if ((command == null) || !command.canExecute()) {
+ // Test is done
+ return;
+ }
+
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ Diagram diagram = (Diagram) getRootView();
+ assertEquals(CREATION + INITIALIZATION_TEST, 1 + mustPassOffset, diagram.getEdges().size());
+ // assertEquals(CREATION + INITIALIZATION_TEST, 5 + mustPassOffset, getContainerSemanticModel().getOwnedElements().size());
+
+ // Undo/redo only make sense if the command is supposed to work. Likewise testing the resulting edit-parts
+ if (mustPass) {
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertEquals(CREATION + TEST_THE_UNDO, 0, diagram.getEdges().size());
+ // assertEquals(CREATION + TEST_THE_UNDO, 4, getContainerSemanticModel().getOwnedElements().size());
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertEquals(CREATION + TEST_THE_REDO, 1 + mustPassOffset, diagram.getEdges().size());
+ // assertEquals(CREATION + TEST_THE_REDO, 5 + mustPassOffset, getContainerSemanticModel().getOwnedElements().size());
+
+ ConnectionEditPart linkEditPart = (ConnectionEditPart) getDiagramEditPart().getConnections().get(0);
+ testLinkEditPart(linkEditPart, initialName);
+
+ // Assert.assertEquals("Diagram updater must detect that four node children and one link have been created", 5, getDiagramUpdater().getSemanticChildren(diagram).size()); //$NON-NLS-1$
+ // Assert.assertEquals("Diagram updater must detect that no link has been created", 1, getDiagramUpdater().getContainedLinks(getRootView()).size()); //$NON-NLS-1$
+ // Assert.assertEquals("Diagram updater must detect that no link are incoming", 0, getDiagramUpdater().getIncomingLinks((View) diagram.getEdges().get(0)).size()); //$NON-NLS-1$
+ // Assert.assertEquals("Diagram updater must detect that no link are outgoing", 0, getDiagramUpdater().getOutgoingLinks((View) diagram.getEdges().get(0)).size()); //$NON-NLS-1$
+ // Assert.assertEquals("Diagram updater must detect that no children has ben created in the new element", 0, getDiagramUpdater().getSemanticChildren(((View) diagram.getEdges().get(0))).size()); //$NON-NLS-1$
+ // Assert.assertEquals("Diagram updater must detect that no link has been created in the new element", 0, getDiagramUpdater().getContainedLinks(((View) diagram.getEdges().get(0))).size()); //$NON-NLS-1$
+ //
+ // Assert.assertEquals("Diagram updater must detect that no link are incoming", 1, getDiagramUpdater().getIncomingLinks(target.getNotationView()).size()); //$NON-NLS-1$
+ // Assert.assertEquals("Diagram updater must detect that no link are OutgoingLinks", 0, getDiagramUpdater().getOutgoingLinks(target.getNotationView()).size()); //$NON-NLS-1$
+ // Assert.assertEquals("Diagram updater must detect that no link are IncomingLinks", 0, getDiagramUpdater().getIncomingLinks(source.getNotationView()).size()); //$NON-NLS-1$
+ // Assert.assertEquals("Diagram updater must detect that no link are OutgoingLinks", 1, getDiagramUpdater().getOutgoingLinks(source.getNotationView()).size()); //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * This method is used to test the created link editpart
+ *
+ * @param linkEditPart
+ */
+ protected void testLinkEditPart(ConnectionEditPart linkEditPart, String initialName) {
+ Assert.assertNotNull("the editpart of the link must exist", linkEditPart); //$NON-NLS-1$
+ EditPolicy policy = linkEditPart.getEditPolicy(org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy.SHOW_HIDE_LABEL_ROLE);
+ Assert.assertNotNull("the link must have an edipolicy that to show or hide label", policy); //$NON-NLS-1$
+ Assert.assertTrue("the policy of the link must be an instance of ShowHideLabelEditPolicy", policy instanceof org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy); //$NON-NLS-1$
+ // get text aware
+ ITextAwareEditPart namedEditPart = null;
+ for (Iterator<?> iteratorChildren = linkEditPart.getChildren().iterator(); iteratorChildren.hasNext();) {
+ Object children = iteratorChildren.next();
+ if (children instanceof ITextAwareEditPart && (((ITextAwareEditPart) children).getEditText() != null) && (!((ITextAwareEditPart) children).getEditText().trim().equals(""))) { //$NON-NLS-1$
+ namedEditPart = (ITextAwareEditPart) children;
+ }
+ }
+ if (namedEditPart != null) {
+ testNameLabel(namedEditPart, initialName);
+ }
+
+ }
+
+ protected void testNameLabel(ITextAwareEditPart namedEditPart, String initialName) {
+ Assert.assertTrue("the primary editpart must be the namelabelEditpart", namedEditPart instanceof GraphicalEditPart); //$NON-NLS-1$
+ String name = ((GraphicalEditPart) namedEditPart).resolveSemanticElement().eClass().getName();
+ if (initialName != null) {
+ name = initialName;
+ }
+ if (name.length() < namedEditPart.getEditText().length()) {
+ Assert.assertEquals(" the name must contain the name of the metaclass", name, namedEditPart.getEditText().substring(0, name.length())); //$NON-NLS-1$
+ } else {
+ // not the same it sure but display the mistake is important
+ Assert.assertEquals(" the name must contain the name of the metaclass", name, namedEditPart.getEditText()); //$NON-NLS-1$
+ }
+ }
+
+ public void installEnvironment(IElementType sourceType, IElementType targetType) {
+ // create the source
+ CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(sourceType, getDiagramEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(new Point(100, 100));
+ Command command = getContainerEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ // create the source player to test reconnect
+ requestcreation = CreateViewRequestFactory.getCreateShapeRequest(sourceType, getDiagramEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(new Point(100, 300));
+ command = getContainerEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ // create the target
+ requestcreation = CreateViewRequestFactory.getCreateShapeRequest(targetType, getDiagramEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(new Point(300, 100));
+ command = getContainerEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ // create the target player to test reconnect
+ requestcreation = CreateViewRequestFactory.getCreateShapeRequest(targetType, getDiagramEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(new Point(300, 300));
+ command = getContainerEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ source = (GraphicalEditPart) getContainerEditPart().getChildren().get(0);
+ sourcePlayer = (GraphicalEditPart) getContainerEditPart().getChildren().get(1);
+ target = (GraphicalEditPart) getContainerEditPart().getChildren().get(2);
+ targetPlayer = (GraphicalEditPart) getContainerEditPart().getChildren().get(3);
+ }
+
+ /**
+ * @param createLinkFromPaletteTest
+ * @param sourceType
+ * @param targetType
+ */
+ public void installEnvironment(IElementType sourceType, IElementType targetType, IElementType containerType) {
+ containerEditPart = createNodeOptionally(containerType, getDiagramEditPart());
+ rootCompartment = null;
+ for (Object editPart : containerEditPart.getChildren()) {
+ if (editPart instanceof ShapeCompartmentEditPart) {
+ rootCompartment = (editPart);
+ }
+ }
+ assertNotNull("There should be at least one container for the node tests", rootCompartment); //$NON-NLS-1$
+
+ installEnvironment(sourceType, targetType);
+ }
+
+ /**
+ * Returns the container edit part
+ */
+ protected IGraphicalEditPart getContainerEditPart() {
+ if (rootCompartment != null) {
+ return (IGraphicalEditPart) rootCompartment;
+ } else if (containerEditPart != null) {
+ return containerEditPart;
+ } else {
+ return getDiagramEditPart();
+ }
+ }
+
+ protected Element getContainerSemanticModel() {
+ return (Element) ((View) getContainerEditPart().getModel()).getElement();
+ }
+
+ private boolean mustPass;
+
+ public CreateConnectionViewRequest createConnectionViewRequest(IElementType type, EditPart source, EditPart target) {
+ CreateConnectionViewRequest connectionRequest = CreateViewRequestFactory.getCreateConnectionRequest(type, ((IGraphicalEditPart) getDiagramEditPart()).getDiagramPreferencesHint());
+ connectionRequest.setSourceEditPart(null);
+ connectionRequest.setTargetEditPart(source);
+ connectionRequest.setType(RequestConstants.REQ_CONNECTION_START);
+ source.getCommand(connectionRequest);
+ // Now, setup the request in preparation to get the
+ // connection end
+ // command.
+ connectionRequest.setSourceEditPart(source);
+ connectionRequest.setTargetEditPart(target);
+ connectionRequest.setType(RequestConstants.REQ_CONNECTION_END);
+ return connectionRequest;
+ }
+
+ /**
+ * Test to create a link.
+ *
+ * @param type
+ * the type
+ * @param containerType
+ * the container type
+ */
+ public void testCreateLinkFromPalette(IElementType sourceType, IElementType targetType, IElementType linkType, String initialName, boolean mustPass) {
+ installEnvironment(sourceType, targetType);
+ this.mustPass = mustPass;
+ try {
+ testToCreateALink(linkType, initialName);
+ } finally {
+ this.mustPass = true;
+ }
+ }
+
+ /**
+ * Test creation of a link of a specific type from a source to a target.
+ */
+ public void testCreateLinkFromPalette(IElementType sourceType, IElementType targetType, IElementType linkType, boolean mustPass) {
+ testCreateLinkFromPalette(sourceType, targetType, linkType, (String) null, mustPass);
+ }
+
+
+ /**
+ * Test creation of a link of a specific type from a source to a target within a particular container type.
+ */
+ public void testCreateLinkFromPalette(IElementType sourceType, IElementType targetType, IElementType linkType, IElementType containerType, boolean mustPass) {
+ testCreateLinkFromPalette(sourceType, targetType, linkType, containerType, null, mustPass);
+ }
+
+ /**
+ * Test creation of a link of a specific type from a source to a target within a particular container type.
+ */
+ public void testCreateLinkFromPalette(IElementType sourceType, IElementType targetType, IElementType linkType, IElementType containerType, String initialName, boolean mustPass) {
+ installEnvironment(sourceType, targetType, containerType);
+ this.mustPass = mustPass;
+ try {
+ testToCreateALink(linkType, initialName);
+ } finally {
+ this.mustPass = true;
+ }
+ }
+
+ /**
+ * test the drop of a link where the source and the target are the same objects
+ *
+ * @param linkType
+ * @param allowed
+ */
+ protected void testToDropAlinkOnTheSame(IElementType linkType, boolean allowed) {
+ // DROP
+ if (allowed) {
+ assertTrue(DROP + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(DROP + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 6);
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram) getRootView()).getEdges().size() == 2);
+ DropObjectsRequest dropObjectsRequest = new DropObjectsRequest();
+ ArrayList<Element> list = new ArrayList<Element>();
+ list.add(getRootSemanticModel().getOwnedElements().get(5));
+ dropObjectsRequest.setObjects(list);
+ dropObjectsRequest.setLocation(new Point(20, 20));
+ Command command = getDiagramEditPart().getCommand(dropObjectsRequest);
+ assertNotNull(DROP + COMMAND_NULL, command);
+ assertTrue(DROP + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(DROP + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(DROP + TEST_THE_EXECUTION, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(DROP + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 6);
+ assertTrue(DROP + TEST_THE_EXECUTION, ((Diagram) getRootView()).getEdges().size() == 3);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(DROP + TEST_THE_UNDO, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(DROP + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 6);
+ assertTrue(DROP + TEST_THE_UNDO, ((Diagram) getRootView()).getEdges().size() == 2);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(DROP + TEST_THE_REDO, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(DROP + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 6);
+ assertTrue(DROP + TEST_THE_REDO, ((Diagram) getRootView()).getEdges().size() == 3);
+ }
+ }
+
+ /**
+ * test the creation of a link where the source and the target are the same objects
+ *
+ * @param linkType
+ * @param allowed
+ */
+ protected void testToCreateAlinkOnTheSame(IElementType linkType, boolean allowed) {
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 5);
+ Command command = target.getCommand(createConnectionViewRequest(linkType, source, source));
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == allowed);
+ if (allowed) {
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram) getRootView()).getEdges().size() == 2);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 6);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(CREATION + TEST_THE_UNDO, getRootView().getChildren().size() == 4);
+ assertTrue(CREATION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 5);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(CREATION + TEST_THE_REDO, ((Diagram) getRootView()).getEdges().size() == 2);
+ assertTrue(CREATION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 6);
+ }
+ }
+
+ /**
+ * test id the handler delete from model is enable
+ */
+ protected void testEnableForDeleteFromModel() {
+ ICommandService commandService = PlatformUI.getWorkbench().getService(ICommandService.class);
+ org.eclipse.core.commands.Command cmd = commandService.getCommand("org.eclipse.ui.edit.delete"); //$NON-NLS-1$
+ IHandler handler = cmd.getHandler();
+ if (handler instanceof AbstractHandler) {
+ ((AbstractHandler) handler).setEnabled("org.eclipse.ui.edit.delete"); //$NON-NLS-1$
+ }
+ boolean res = handler.isEnabled();
+ assertTrue("Delete from model handler must be enable", res); //$NON-NLS-1$
+ }
+}
diff --git a/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/createFromPalette/AbstractCreateLinkOwnedBySourceFromPaletteTest.java b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/createFromPalette/AbstractCreateLinkOwnedBySourceFromPaletteTest.java
new file mode 100755
index 0000000..97feac1
--- /dev/null
+++ b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/createFromPalette/AbstractCreateLinkOwnedBySourceFromPaletteTest.java
@@ -0,0 +1,171 @@
+/*****************************************************************************
+ * Copyright (c) 2009, 2015 CEA LIST, Christian W. Damus, and others.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 464647
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.tests.createFromPalette;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.util.ArrayList;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.uml2.uml.Element;
+
+public abstract class AbstractCreateLinkOwnedBySourceFromPaletteTest extends AbstractCreateLinkFromPaletteTest {
+
+
+ /**
+ * Test to create a link.
+ *
+ * @param linkType
+ * the type
+ */
+ @Override
+ public void testToCreateALink(IElementType linkType, String initialName) {
+ assertEquals(CREATION + INITIALIZATION_TEST, 4, getContainerEditPart().getChildren().size());
+ assertEquals(CREATION + INITIALIZATION_TEST, 4, getContainerSemanticModel().getOwnedElements().size());
+ assertEquals(CREATION + INITIALIZATION_TEST, 0, ((Element) source.resolveSemanticElement()).getOwnedElements().size());
+ Command command = target.getCommand(createConnectionViewRequest(linkType, source, target));
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute());
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertEquals(CREATION + TEST_THE_EXECUTION, 1, ((Diagram) getRootView()).getEdges().size());
+ assertEquals(CREATION + TEST_THE_EXECUTION, 4, getContainerSemanticModel().getOwnedElements().size());
+ assertEquals(CREATION + TEST_THE_EXECUTION, 1, ((Element) source.resolveSemanticElement()).getOwnedElements().size());
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertEquals(CREATION + TEST_THE_UNDO, 4, getContainerEditPart().getChildren().size());
+ assertEquals(CREATION + TEST_THE_UNDO, 4, getContainerSemanticModel().getOwnedElements().size());
+ assertEquals(CREATION + TEST_THE_UNDO, 0, ((Element) source.resolveSemanticElement()).getOwnedElements().size());
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertEquals(CREATION + TEST_THE_REDO, 1, ((Diagram) getRootView()).getEdges().size());
+ assertEquals(CREATION + TEST_THE_REDO, 4, getContainerSemanticModel().getOwnedElements().size());
+ assertEquals(CREATION + TEST_THE_REDO, 1, ((Element) source.resolveSemanticElement()).getOwnedElements().size());
+ }
+
+ @Override
+ public void installEnvironment(IElementType sourceType, IElementType targetType) {
+ assertTrue(CREATION + INITIALIZATION_TEST, getContainerEditPart().getChildren().size() == 0);
+ // assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 0);
+ // create the source
+ CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(sourceType, getDiagramEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(new Point(100, 100));
+ Command command = getContainerEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ // create the source player to test reconnect
+ requestcreation = CreateViewRequestFactory.getCreateShapeRequest(sourceType, getDiagramEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(new Point(100, 300));
+ command = getContainerEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ // create the target
+ requestcreation = CreateViewRequestFactory.getCreateShapeRequest(targetType, getDiagramEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(new Point(300, 100));
+ command = getContainerEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ // create the target player to test reconnect
+ requestcreation = CreateViewRequestFactory.getCreateShapeRequest(targetType, getDiagramEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(new Point(300, 300));
+ command = getContainerEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ source = (GraphicalEditPart) getContainerEditPart().getChildren().get(0);
+ sourcePlayer = (GraphicalEditPart) getContainerEditPart().getChildren().get(1);
+ target = (GraphicalEditPart) getContainerEditPart().getChildren().get(2);
+ targetPlayer = (GraphicalEditPart) getContainerEditPart().getChildren().get(3);
+ }
+
+
+ /**
+ * test the drop of a link where the source and the target are the same objects
+ *
+ * @param linkType
+ * @param allowed
+ */
+ @Override
+ protected void testToDropAlinkOnTheSame(IElementType linkType, boolean allowed) {
+ // DROP
+ if (allowed) {
+ assertTrue(DROP + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(DROP + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram) getRootView()).getEdges().size() == 2);
+ DropObjectsRequest dropObjectsRequest = new DropObjectsRequest();
+ ArrayList<Element> list = new ArrayList<Element>();
+ list.add(((Element) source.resolveSemanticElement()).getOwnedElements().get(1));
+ dropObjectsRequest.setObjects(list);
+ dropObjectsRequest.setLocation(new Point(20, 20));
+ Command command = getDiagramEditPart().getCommand(dropObjectsRequest);
+ assertNotNull(DROP + COMMAND_NULL, command);
+ assertTrue(DROP + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(DROP + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(DROP + TEST_THE_EXECUTION, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(DROP + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DROP + TEST_THE_EXECUTION, ((Diagram) getRootView()).getEdges().size() == 3);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(DROP + TEST_THE_UNDO, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(DROP + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DROP + TEST_THE_UNDO, ((Diagram) getRootView()).getEdges().size() == 2);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(DROP + TEST_THE_REDO, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(DROP + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DROP + TEST_THE_REDO, ((Diagram) getRootView()).getEdges().size() == 3);
+ }
+ }
+
+ /**
+ * test the creation of a link where the source and the target are the same objects
+ *
+ * @param linkType
+ * @param allowed
+ */
+ @Override
+ protected void testToCreateAlinkOnTheSame(IElementType linkType, boolean allowed) {
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+ // Note: Must always ask the target edit-part to create the connection, and in this case the target is 'source'
+ Command command = source.getCommand(createConnectionViewRequest(linkType, source, source));
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == allowed);
+ if (allowed) {
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram) getRootView()).getEdges().size() == 2);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(CREATION + TEST_THE_UNDO, getRootView().getChildren().size() == 4);
+ assertTrue(CREATION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(CREATION + TEST_THE_REDO, ((Diagram) getRootView()).getEdges().size() == 2);
+ assertTrue(CREATION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ }
+ }
+}
diff --git a/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/createFromPalette/AbstractCreateNodeFromPaletteTest.java b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/createFromPalette/AbstractCreateNodeFromPaletteTest.java
new file mode 100755
index 0000000..2d30925
--- /dev/null
+++ b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/createFromPalette/AbstractCreateNodeFromPaletteTest.java
@@ -0,0 +1,335 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2015 CEA LIST, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Remi Schnekenburger (CEA LIST) - Initial API and implementation
+ * Christian W. Damus - bug 464647
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.tests.createFromPalette;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.LabelEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ResizableCompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeCompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.updater.DiagramUpdater;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editparts.UMLCompartmentEditPart;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.uml2.uml.Element;
+import org.junit.Assert;
+import org.junit.Before;
+
+/**
+ * Abstract class to test nodes
+ */
+public abstract class AbstractCreateNodeFromPaletteTest extends org.eclipse.papyrus.uml.diagram.tests.canonical.AbstractPapyrusTestCase {
+
+ /** <code>true</code> if semantic tests should be run on graphical manipulation */
+ private boolean testSemantic;
+
+ /** command computed on the ui thread */
+ protected Command command;
+
+ /** container editpart **/
+ protected GraphicalEditPart containerEditPart;
+
+ private int comaprtmentNB;
+
+ private Object rootCompartment;
+
+ /**
+ * @see org.eclipse.papyrus.diagram.clazz.test.canonical.AbstractPapyrusTestCase#setUp()
+ *
+ * @throws Exception
+ */
+ @Before
+ @Override
+ public void setUp() throws Exception {
+ super.setUp();
+ testSemantic = isSemanticTest();
+ }
+
+
+ /**
+ * Returns <code>true</code> if semantic tests should be also performed
+ *
+ * @return <code>true</code> if semantic tests should be also performed
+ */
+ protected boolean isSemanticTest() {
+ return false;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.diagram.clazz.test.canonical.AbstractPapyrusTestCase#getRootView()
+ *
+ * @return
+ */
+ @Override
+ protected View getRootView() {
+ return (View) getContainerEditPart().getModel();
+ }
+
+ public abstract DiagramUpdater getDiagramUpdater();
+
+ /**
+ * Returns the container edit part
+ */
+
+ protected IGraphicalEditPart getContainerEditPart() {
+ if (rootCompartment != null) {
+ return (IGraphicalEditPart) rootCompartment;
+ } else {
+ return containerEditPart;
+ }
+ }
+
+
+ /**
+ * Test to manage child node.
+ *
+ * @param type
+ * the type
+ * @param containerType
+ * the container type
+ */
+ public void testCreateNodeFromPalette(IElementType type, int numberSemanticChildreen, boolean mustSuceed) {
+ // create a node
+ testCreateElementFromPalette(type, 0, 1, 1, 1, numberSemanticChildreen, mustSuceed);
+
+ }
+
+
+ /**
+ * Test to manage child node from diagram
+ *
+ * @param type
+ * the type
+ */
+ public void testCreateNodeFromPalette(IElementType type, boolean mustSuceed) {
+ containerEditPart = getDiagramEditPart();
+ testCreateNodeFromPalette(type, 0, mustSuceed);
+ }
+
+ /**
+ * Test to create child node.
+ *
+ * @param type
+ * the type
+ * @param containerType
+ * the container type
+ */
+ public void testCreateNodeFromPalette(IElementType type, IElementType containerType, boolean mustSuceed) {
+ containerEditPart = createNodeOptionally(containerType, getDiagramEditPart());
+ rootCompartment = null;
+
+ for (Object editPart : containerEditPart.getChildren()) {
+ if (editPart instanceof ShapeCompartmentEditPart) {
+ rootCompartment = (editPart);
+ }
+ }
+ assertNotNull("There should be at least one container for the node tests", rootCompartment); //$NON-NLS-1$
+
+ comaprtmentNB = countCompartmentEdipart();
+
+ testCreateNodeFromPalette(type, 0, mustSuceed);
+ }
+
+
+ protected int countCompartmentEdipart() {
+ int index = 0;
+ int compartmentEditpartNB = 0;
+ while (index < containerEditPart.getChildren().size()) {
+ if ((containerEditPart.getChildren().get(index)) instanceof ResizableCompartmentEditPart) {
+ compartmentEditpartNB++;
+ }
+ index++;
+ }
+ return compartmentEditpartNB;
+ }
+
+ protected void testSizeCompartment(int expectedGraphicalChildren) {
+ if (comaprtmentNB == 0) {
+ // assertEquals(CREATION + INITIALIZATION_TEST, expectedGraphicalChildren, containerEditpart.getNotationView().getChildren().size());
+ }
+ if (comaprtmentNB == 1) {
+ // assertEquals(CREATION + INITIALIZATION_TEST, expectedGraphicalChildren, ((GraphicalEditPart)containerEditpart.getChildren().get(0)).getNotationView().getChildren().size());
+ }
+ if (comaprtmentNB > 1) {
+ boolean foundCompartment = false;
+ for (Object compartment : containerEditPart.getChildren()) {
+ if (compartment instanceof ResizableCompartmentEditPart) {
+ if (((ResizableCompartmentEditPart) compartment).getNotationView().getChildren().size() == expectedGraphicalChildren) {
+ foundCompartment = true;
+ }
+ }
+ }
+ // Assert.assertTrue("The compartment has not good size", foundCompartment);
+ }
+
+ }
+
+
+
+
+
+ /**
+ * Test to create a node.
+ *
+ * @param type
+ * the type
+ */
+ public void testCreateElementFromPalette(IElementType type, int expectedGraphicalChildren, int expectedSemanticChildren, int addedGraphicalChildren, int addedSemanticChildren, int numberSemanticChildreen, boolean mustSuceed) {
+ command = null;
+ // CREATION
+ //
+ testSizeCompartment(expectedGraphicalChildren);
+ Element root = (Element) getContainerEditPart().resolveSemanticElement();
+ List<Element> ownedElements = root.getOwnedElements();
+ if (isSemanticTest()) {
+ // assertEquals(CREATION + INITIALIZATION_TEST, expectedSemanticChildren, ownedElements.size());
+ }
+ final CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getContainerEditPart().getDiagramPreferencesHint());
+ Display.getDefault().syncExec(new Runnable() {
+
+ @Override
+ public void run() {
+ command = getContainerEditPart().getTargetEditPart(requestcreation).getCommand(requestcreation);
+ }
+ });
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ if (!mustSuceed) {
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command.equals(UnexecutableCommand.INSTANCE));
+ } else {
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, (!command.equals(UnexecutableCommand.INSTANCE)));
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute()); //$NON-NLS-1$
+ // execute the creation
+ executeOnUIThread(command);
+ testSizeCompartment(expectedGraphicalChildren + addedSemanticChildren);
+ // if(addedGraphicalChildren>=1){
+ // Assert.assertTrue("Node must be org.eclipse.gmf.runtime.notation.Shape",getRootView().getChildren().get(expectedGraphicalChildren + addedGraphicalChildren-1) instanceof Shape); //$NON-NLS-1$
+ // }
+ //
+ if (testSemantic) {
+ // assertEquals(CREATION + TEST_THE_EXECUTION, expectedSemanticChildren + addedSemanticChildren, ownedElements.size());
+ }
+ // undo the creation
+ undoOnUIThread();
+ testSizeCompartment(expectedGraphicalChildren);
+ if (testSemantic) {
+ // assertEquals(CREATION + TEST_THE_UNDO, expectedSemanticChildren, ownedElements.size());
+ }
+ // redo the creation test
+ redoOnUIThread();
+ // assertEquals(CREATION + TEST_THE_REDO, expectedGraphicalChildren + addedGraphicalChildren, getRootView().getChildren().size());
+ if (testSemantic) {
+ // assertEquals(CREATION + TEST_THE_REDO, expectedSemanticChildren + addedSemanticChildren, getRootSemanticModel().getOwnedElements().size());
+ }
+
+ EditPart createdEditPart = (EditPart) getContainerEditPart().getChildren().get((getContainerEditPart().getChildren().size() - 1));
+ Assert.assertNotNull("The editpart must be created", createdEditPart); //$NON-NLS-1$
+ //
+ //
+ // test diagram updater
+ if (getDiagramUpdater() != null) {
+ Assert.assertNotEquals("Diagram updater must detect that children has been created", 0, getDiagramUpdater().getSemanticChildren(getRootView()).size()); //$NON-NLS-1$
+ Assert.assertEquals("Diagram updater must detect that no link has been created", 0, getDiagramUpdater().getContainedLinks(getRootView()).size()); //$NON-NLS-1$
+ Assert.assertEquals("Diagram updater must detect that no link are incoming", 0, getDiagramUpdater().getIncomingLinks((View) getRootView().getChildren().get(expectedGraphicalChildren + addedGraphicalChildren - 1)).size()); //$NON-NLS-1$
+ Assert.assertEquals("Diagram updater must detect that no link are outgoing", 0, getDiagramUpdater().getOutgoingLinks((View) getRootView().getChildren().get(expectedGraphicalChildren + addedGraphicalChildren - 1)).size()); //$NON-NLS-1$
+ Assert.assertEquals(
+ "Diagram updater must detect that no children has ben created in the new element", numberSemanticChildreen, //$NON-NLS-1$
+ getDiagramUpdater().getSemanticChildren((View) getRootView().getChildren().get(expectedGraphicalChildren + addedGraphicalChildren - 1)).size());
+ Assert.assertEquals("Diagram updater must detect that no link has been created in the new element", 0, //$NON-NLS-1$
+ getDiagramUpdater().getContainedLinks((View) getRootView().getChildren().get(expectedGraphicalChildren + addedGraphicalChildren - 1)).size());
+ }
+ createdEditPart.getChildren();
+ for (Iterator<?> iteratorEditPart = createdEditPart.getChildren().iterator(); iteratorEditPart.hasNext();) {
+ Object subEditPart = iteratorEditPart.next();
+ if (subEditPart instanceof UMLCompartmentEditPart) {
+ Assert.assertNotEquals("Diagram updater must detect that children have been created", 0, getDiagramUpdater().getSemanticChildren(((CompartmentEditPart) subEditPart).getNotationView()).size()); //$NON-NLS-1$
+ }
+ Assert.assertNotEquals("Diagram updater must detect that children has been created", 0, getDiagramUpdater().getSemanticChildren((View) ((EditPart) subEditPart).getModel())); //$NON-NLS-1$
+ Assert.assertEquals("Diagram updater must detect that no link has been created", 0, getDiagramUpdater().getContainedLinks((View) ((EditPart) subEditPart).getModel()).size()); //$NON-NLS-1$
+ Assert.assertEquals("Diagram updater must detect that no link are incoming", 0, getDiagramUpdater().getIncomingLinks((View) ((EditPart) subEditPart).getModel()).size()); //$NON-NLS-1$
+ Assert.assertEquals("Diagram updater must detect that no link are outgoing", 0, getDiagramUpdater().getOutgoingLinks((View) ((EditPart) subEditPart).getModel()).size()); //$NON-NLS-1$
+
+ }
+ }
+ }
+
+ /**
+ * this method is used to test the created editpart
+ *
+ * @param maskmanaged
+ * @param createdEditPart
+ */
+ protected void testNodeEditPart(boolean maskmanaged, EditPart createdEditPart, String initialName) {
+ if (maskmanaged) {
+ Assert.assertNotNull("the created editpolicy must have as MASK_MANAGED_LABEL_EDIT_POLICY", createdEditPart.getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY)); //$NON-NLS-1$
+ }
+ int index = 0;
+ while (index < createdEditPart.getChildren().size()) {
+ if ((createdEditPart.getChildren().get(index)) instanceof ResizableCompartmentEditPart) {
+ ResizableCompartmentEditPart compartment = (ResizableCompartmentEditPart) (createdEditPart.getChildren().get(index));
+ Assert.assertFalse("compartment must not be selectable", compartment.isSelectable()); //$NON-NLS-1$
+ }
+ index++;
+ }
+ testNameLabel(createdEditPart, initialName);
+ }
+
+ protected void testNameLabel(EditPart createdEditPart, String initialName) {
+ if (createdEditPart instanceof NamedElementEditPart) {
+ GraphicalEditPart namedEditPart = (GraphicalEditPart) ((NamedElementEditPart) createdEditPart).getPrimaryChildEditPart();
+ Assert.assertTrue("the primary editpart must be the namelabelEditpart", namedEditPart instanceof ITextAwareEditPart); //$NON-NLS-1$
+ String name = namedEditPart.resolveSemanticElement().eClass().getName();
+ if (initialName != null) {
+ name = initialName;
+ }
+ if (name.length() < ((ITextAwareEditPart) namedEditPart).getEditText().length()) {
+ Assert.assertEquals(" the name must contain the name of the metaclass", name, ((ITextAwareEditPart) namedEditPart).getEditText().substring(0, name.length())); //$NON-NLS-1$
+ } else {
+ // not the same it sure but display the mistake is important
+ Assert.assertEquals(" the name must contain the name of the metaclass", name, ((ITextAwareEditPart) namedEditPart).getEditText()); //$NON-NLS-1$
+ }
+ if (namedEditPart instanceof CompartmentEditPart) {
+ Assert.assertTrue("the primary editpart must be the namelabelEditpart", namedEditPart instanceof CompartmentEditPart); //$NON-NLS-1$
+ Assert.assertTrue("namelabelEditpart must be editable", ((CompartmentEditPart) namedEditPart).isEditModeEnabled()); //$NON-NLS-1$
+ } else {
+ Assert.assertTrue("the primary editpart must be the namelabelEditpart", namedEditPart instanceof LabelEditPart); //$NON-NLS-1$
+ }
+ }
+ }
+
+
+ /**
+ * @return
+ */
+ protected CreateViewRequest createViewRequestShapeContainer() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/delete/AbstractDeleteNodeTest.java b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/delete/AbstractDeleteNodeTest.java
new file mode 100755
index 0000000..fa705b3
--- /dev/null
+++ b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/delete/AbstractDeleteNodeTest.java
@@ -0,0 +1,255 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2015 CEA LIST, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Remi Schnekenburger (CEA LIST) - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 431618
+ * Christian W. Damus - bug 464647
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.tests.delete;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.IHandler;
+import org.eclipse.core.expressions.EvaluationContext;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.LabelEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ResizableCompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.EditCommandRequestWrapper;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.updater.DiagramUpdater;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.junit.utils.DisplayUtils;
+import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
+import org.eclipse.ui.ISources;
+import org.eclipse.ui.commands.ICommandService;
+import org.junit.Assert;
+import org.junit.Before;
+
+/**
+ * Abstract class to test nodes
+ */
+public abstract class AbstractDeleteNodeTest extends org.eclipse.papyrus.uml.diagram.tests.canonical.AbstractPapyrusTestCase {
+
+ /** <code>true</code> if semantic tests should be run on graphical manipulation */
+ private boolean testSemantic;
+
+ /** command computed on the ui thread */
+ protected Command command;
+
+ /**
+ * @see org.eclipse.papyrus.diagram.clazz.test.canonical.AbstractPapyrusTestCase#setUp()
+ *
+ * @throws Exception
+ */
+ @Before
+ @Override
+ public void setUp() throws Exception {
+ super.setUp();
+ testSemantic = isSemanticTest();
+ }
+
+ /**
+ * Returns <code>true</code> if semantic tests should be also performed
+ *
+ * @return <code>true</code> if semantic tests should be also performed
+ */
+ protected boolean isSemanticTest() {
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected View getRootView() {
+ return (View) getContainerEditPart().getModel();
+ }
+
+ public abstract DiagramUpdater getDiagramUpdater();
+
+ /**
+ * Returns the container edit part
+ */
+ protected abstract IGraphicalEditPart getContainerEditPart();
+
+
+
+ /**
+ * Test to manage child node.
+ *
+ * @param type
+ * the type
+ * @param containerType
+ * the container type
+ */
+ public void testToDeleteNode(IElementType type, EClass eClass, IElementType containerType, boolean containerMove, String initialName, int numberSemanticChildreen) {
+ // create a node
+ createNodeOptionally(type, getContainerEditPart());
+ // destroy the first element
+ testDestroy(type, 2, 2, 1, 1);
+ }
+
+ /**
+ * Test to manage child node.
+ *
+ * @param type
+ * the type
+ * @param containerType
+ * the container type
+ */
+ public void testToDeleteNode(IElementType type, EClass eClass, IElementType containerType, boolean containerMove, int numberSemanticChildreen) {
+ testToDeleteNode(type, eClass, containerType, containerMove, null, numberSemanticChildreen);
+ }
+
+ /**
+ * Test to manage child node.
+ *
+ * @param type
+ * the type
+ * @param containerType
+ * the container type
+ */
+ public void testToDeleteNode(IElementType type, EClass eClass, IElementType containerType, boolean containerMove) {
+ testToDeleteNode(type, eClass, containerType, containerMove, null, 0);
+ }
+
+ /**
+ * Test destroy.
+ *
+ * @param type
+ * the type
+ */
+ public void testDestroy(IElementType type) {
+ // create a node
+ createNodeOptionally(type, getContainerEditPart());
+ testDestroy(type, 1, 1, 1, 1);
+ }
+
+ /**
+ * Test destroy.
+ *
+ * @param type
+ * the type
+ */
+ public void testDestroy(IElementType type, int expectedGraphicalChildren, int expectedSemanticChildren, int removedGraphicalChildren, int removedSemanticChildren) {
+ // DESTROY SEMANTIC + VIEW
+ assertEquals(DESTROY_DELETION + INITIALIZATION_TEST, expectedGraphicalChildren, getRootView().getChildren().size());
+ if (testSemantic) {
+ assertEquals(DESTROY_DELETION + INITIALIZATION_TEST, expectedSemanticChildren, getRootSemanticModel().getOwnedElements().size());
+ }
+ Request deleteViewRequest = new EditCommandRequestWrapper(new DestroyElementRequest(false));
+ EditPart currentEditPart = ((GraphicalEditPart) getContainerEditPart().getChildren().get(getContainerEditPart().getChildren().size() - 1));
+ Command command = currentEditPart.getCommand(deleteViewRequest);
+ assertNotNull(DESTROY_DELETION + COMMAND_NULL, command);
+ assertTrue(DESTROY_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(DESTROY_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute());
+ testEnablementOfDeleteFromModelHandler();
+ executeOnUIThread(command);
+ assertEquals(DESTROY_DELETION + TEST_THE_EXECUTION, expectedGraphicalChildren - removedGraphicalChildren, getRootView().getChildren().size());
+ if (testSemantic) {
+ assertEquals(DESTROY_DELETION + INITIALIZATION_TEST, expectedSemanticChildren - removedSemanticChildren, getRootSemanticModel().getOwnedElements().size());
+ }
+ undoOnUIThread();
+ assertEquals(DESTROY_DELETION + TEST_THE_UNDO, expectedGraphicalChildren, getRootView().getChildren().size());
+ if (testSemantic) {
+ assertEquals(DESTROY_DELETION + TEST_THE_UNDO, expectedSemanticChildren, getRootSemanticModel().getOwnedElements().size());
+ }
+ redoOnUIThread();
+ assertEquals(DESTROY_DELETION + TEST_THE_REDO, expectedGraphicalChildren - removedGraphicalChildren, getRootView().getChildren().size());
+ if (testSemantic) {
+ assertEquals(DESTROY_DELETION + TEST_THE_REDO, expectedSemanticChildren - removedSemanticChildren, getRootSemanticModel().getOwnedElements().size());
+ }
+ }
+
+ /**
+ * test id the handler delete from model is enable
+ */
+ protected void testEnablementOfDeleteFromModelHandler() {
+ ICommandService commandService = papyrusEditor.getSite().getService(ICommandService.class);
+ org.eclipse.core.commands.Command cmd = commandService.getCommand("org.eclipse.ui.edit.delete"); //$NON-NLS-1$
+ IHandler handler = cmd.getHandler();
+ if (handler instanceof AbstractHandler) {
+ // Select the edit-part that we would delete
+ ISelection selection = new StructuredSelection((getContainerEditPart().getChildren().get(0)));
+ getDiagramEditPart().getViewer().getSelectionManager().setSelection(selection);
+
+ // Propagate the selection through the Eclipse framework to the command handlers
+ DisplayUtils.flushEventLoop();
+
+ // Update the delete handler's enablement
+ EvaluationContext context = new EvaluationContext(null, selection);
+ context.addVariable(ISources.ACTIVE_CURRENT_SELECTION_NAME, selection);
+ ((AbstractHandler) handler).setEnabled(context); // $NON-NLS-1$
+ }
+ boolean res = handler.isEnabled();
+ assertTrue("Delete from model handler must be enable", res); //$NON-NLS-1$
+ }
+
+ /**
+ * this method is used to test the created editpart
+ *
+ * @param maskmanaged
+ * @param createdEditPart
+ */
+ protected void testNodeEditPart(boolean maskmanaged, EditPart createdEditPart, String initialName) {
+ if (maskmanaged) {
+ Assert.assertNotNull("the created editpolicy must have as MASK_MANAGED_LABEL_EDIT_POLICY", createdEditPart.getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY)); //$NON-NLS-1$
+ }
+ int index = 0;
+ while (index < createdEditPart.getChildren().size()) {
+ if ((createdEditPart.getChildren().get(index)) instanceof ResizableCompartmentEditPart) {
+ ResizableCompartmentEditPart compartment = (ResizableCompartmentEditPart) (createdEditPart.getChildren().get(index));
+ Assert.assertFalse("compartment must not be selectable", compartment.isSelectable()); //$NON-NLS-1$
+ }
+ index++;
+ }
+ testNameLabel(createdEditPart, initialName);
+ }
+
+ protected void testNameLabel(EditPart createdEditPart, String initialName) {
+ if (createdEditPart instanceof NamedElementEditPart) {
+ GraphicalEditPart namedEditPart = (GraphicalEditPart) ((NamedElementEditPart) createdEditPart).getPrimaryChildEditPart();
+ Assert.assertTrue("the primary editpart must be the namelabelEditpart", namedEditPart instanceof ITextAwareEditPart); //$NON-NLS-1$
+ String name = namedEditPart.resolveSemanticElement().eClass().getName();
+ if (initialName != null) {
+ name = initialName;
+ }
+ if (name.length() < ((ITextAwareEditPart) namedEditPart).getEditText().length()) {
+ Assert.assertEquals(" the name must contain the name of the metaclass", name, ((ITextAwareEditPart) namedEditPart).getEditText().substring(0, name.length())); //$NON-NLS-1$
+ } else {
+ // not the same it sure but display the mistake is important
+ Assert.assertEquals(" the name must contain the name of the metaclass", name, ((ITextAwareEditPart) namedEditPart).getEditText()); //$NON-NLS-1$
+ }
+ if (namedEditPart instanceof CompartmentEditPart) {
+ Assert.assertTrue("the primary editpart must be the namelabelEditpart", namedEditPart instanceof CompartmentEditPart); //$NON-NLS-1$
+ Assert.assertTrue("namelabelEditpart must be editable", ((CompartmentEditPart) namedEditPart).isEditModeEnabled()); //$NON-NLS-1$
+ } else {
+ Assert.assertTrue("the primary editpart must be the namelabelEditpart", namedEditPart instanceof LabelEditPart); //$NON-NLS-1$
+
+ }
+ }
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/drop/AbstractDropNodeTest.java b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/drop/AbstractDropNodeTest.java
new file mode 100755
index 0000000..de55976
--- /dev/null
+++ b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/drop/AbstractDropNodeTest.java
@@ -0,0 +1,141 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2015 CEA LIST, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Remi Schnekenburger (CEA LIST) - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 431618
+ * Christian W. Damus - bug 464647
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.tests.drop;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.util.ArrayList;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.uml2.uml.Element;
+import org.junit.Assert;
+import org.junit.Before;
+
+/**
+ * Abstract class to test nodes
+ */
+public abstract class AbstractDropNodeTest extends org.eclipse.papyrus.uml.diagram.tests.canonical.AbstractPapyrusTestCase {
+
+ /** <code>true</code> if semantic tests should be run on graphical manipulation */
+ private boolean testSemantic;
+
+ /**
+ * @see org.eclipse.papyrus.diagram.clazz.test.canonical.AbstractPapyrusTestCase#setUp()
+ *
+ * @throws Exception
+ */
+ @Before
+ @Override
+ public void setUp() throws Exception {
+ super.setUp();
+
+ testSemantic = isSemanticTest();
+
+ }
+
+ /**
+ * Returns <code>true</code> if semantic tests should be also performed
+ *
+ * @return <code>true</code> if semantic tests should be also performed
+ */
+ protected boolean isSemanticTest() {
+ return false;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.diagram.clazz.test.canonical.AbstractPapyrusTestCase#getRootView()
+ *
+ * @return
+ */
+ @Override
+ protected abstract View getRootView();
+
+ /**
+ * Returns the container edit part
+ */
+ protected abstract IGraphicalEditPart getContainerEditPart();
+
+ /**
+ * Test to drop node.
+ *
+ */
+ public void testToDropNode(IElementType type, EClass eClass, boolean mustSuceed) {
+ // Precondition for the drag node test: There must be an element in of the desired type in the semantic model.
+ createNodeOptionally(type, getContainerEditPart());
+
+ // The element can be dropped several time in the diagrams
+ testDrop(type, eClass, 1, 1, 1);
+
+ // undo the drop
+ undoOnUIThread();
+ }
+
+ /**
+ * Test drop.
+ *
+ * @param type
+ * the type
+ */
+ public void testDrop(IElementType type, EClass eClass, int expectedGraphicalChildren, int expectedSemanticChildren, int addedGraphicalChildren) {
+
+
+ // DROP
+ assertEquals(DROP + INITIALIZATION_TEST, expectedGraphicalChildren, getRootView().getChildren().size());
+ if (testSemantic) {
+ assertEquals(DROP + INITIALIZATION_TEST, expectedSemanticChildren, getRootSemanticModel().getOwnedElements().size());
+ }
+ DropObjectsRequest dropObjectsRequest = new DropObjectsRequest();
+ ArrayList<Element> list = new ArrayList<Element>();
+ for (Element element : getRootSemanticModel().getOwnedElements()) {
+ if (element != null && element.eClass().equals(eClass)) {
+ list.add(element);
+ }
+ }
+ dropObjectsRequest.setObjects(list);
+ dropObjectsRequest.setLocation(new Point(40, 40));
+ Command command = getContainerEditPart().getCommand(dropObjectsRequest);
+ assertNotNull(DROP + COMMAND_NULL, command);
+ assertTrue(DROP + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(DROP + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute());
+ // execute the drop
+ executeOnUIThread(command);
+ Assert.assertEquals(DROP + TEST_THE_EXECUTION, expectedGraphicalChildren + addedGraphicalChildren, getRootView().getChildren().size());
+ if (testSemantic) {
+ Assert.assertEquals(DROP + TEST_THE_EXECUTION, expectedSemanticChildren, getRootSemanticModel().getOwnedElements().size());
+ }
+ // undo the drop
+ undoOnUIThread();
+ Assert.assertEquals(DROP + TEST_THE_UNDO, expectedGraphicalChildren, getRootView().getChildren().size());
+ if (testSemantic) {
+ Assert.assertEquals(DROP + TEST_THE_UNDO, expectedSemanticChildren, getRootSemanticModel().getOwnedElements().size());
+ }
+ // redo the drop
+ redoOnUIThread();
+ Assert.assertEquals(DROP + TEST_THE_REDO, expectedGraphicalChildren + addedGraphicalChildren, getRootView().getChildren().size());
+ if (testSemantic) {
+ assertTrue(DROP + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() != 0);
+ }
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/edition/AbstractEditableNodeTest.java b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/edition/AbstractEditableNodeTest.java
new file mode 100755
index 0000000..2258323
--- /dev/null
+++ b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/edition/AbstractEditableNodeTest.java
@@ -0,0 +1,165 @@
+/*******************************************************************************
+ * Copyright (c) 2014, 2015 CEA LIST, Christian W. Damus, and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus - bug 464647
+ * Christian W. Damus - bug 476436
+ *
+ ******************************************************************************/
+package org.eclipse.papyrus.uml.diagram.tests.edition;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.requests.DirectEditRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.gef.ui.internal.parts.TextCellEditorEx;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.papyrus.junit.utils.rules.AnnotationRule;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultiLineCellEditor;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.IMultilineEditableFigure;
+import org.junit.Assert;
+import org.junit.Rule;
+
+/**
+ * Abstract test case definitions for testing direct-edit functionality of editable node edit-parts.
+ */
+public abstract class AbstractEditableNodeTest extends EditableElementTest {
+ @Rule
+ public final AnnotationRule<Integer> expectedKind = AnnotationRule.create(ExpectedDirectEditor.class, ExpectedDirectEditor.DEFAULT_MASK);
+
+ protected Command command = null;
+
+ @Override
+ public void testEdition(IElementType type) {
+ GraphicalEditPart createdEditpart = createNodeOptionally(type, getContainerEditPart());
+ if (!(createdEditpart instanceof ITextAwareEditPart)) {
+ EditPart nameEditpart = createdEditpart.getPrimaryChildEditPart();
+ if (nameEditpart instanceof ITextAwareEditPart) {
+ GraphicalEditPart editableEditPart = (GraphicalEditPart) nameEditpart;
+ final IFigure nameFigure = editableEditPart.getFigure();
+ final Rectangle bounds = nameFigure.getBounds();
+ final Point center = bounds.getCenter();
+ final DirectEditRequest directEditRequest = new DirectEditRequest();
+ directEditRequest.setLocation(center);
+ editableEditPart.performRequest(directEditRequest);
+
+ // test if there is not primary editpart
+ Assert.assertNull("The editpart must not references primarychildEditpart", editableEditPart.getPrimaryChildEditPart());
+
+ // to increase the covering
+ // getLabelTextHelper to refactor
+ // setLabelTextHelper to refactor
+ // getLabelIconHelper to refactor
+ // setLabelIconHelper to refactor
+ // setParser to refactor
+ // performDirectEdit(Point eventLocation) {
+ // performDirectEdit(char initialCharacter) {
+ // performDirectEditRequest(Request request) {
+ // initializeDirectEditManager(final Request request) {
+ // initExtendedEditorConfiguration() {
+ // updateExtendedEditorConfiguration() {
+ // performDefaultDirectEditorEdit(final Request theRequest) {
+ // handleNotificationEvent(Notification event) {
+
+ // getDirectEditionType
+ // Mode reflexive to Test the editor associated to the element
+ Class<?> editableEditPartClass = editableEditPart.getClass();
+ try {
+ // test is editable
+ Method methodisEditable = getMethodRecusrively(editableEditPartClass, "isEditable");
+ if (methodisEditable != null) {
+ methodisEditable.setAccessible(true);
+ Object resultdirectEditorType = methodisEditable.invoke(editableEditPart);
+ Assert.assertEquals("the editpart must be editable", true, resultdirectEditorType);
+ }
+ //
+ Method methodgetEditTextValidator = getMethodRecusrively(editableEditPartClass, "getEditTextValidator");
+ if (methodgetEditTextValidator != null) {
+ methodgetEditTextValidator.setAccessible(true);
+ Object result = methodgetEditTextValidator.invoke(editableEditPart);
+ Assert.assertNotNull("the editpart must be editable", result);
+ ICellEditorValidator cellvalidato = (ICellEditorValidator) result;
+ Assert.assertEquals("the text is valid", null, cellvalidato.isValid("MyElement"));
+
+ }
+
+
+
+
+ // performDirectEdit(Point eventLocation) {
+ // performDirectEdit(char initialCharacter) {
+
+ // call and test kind of editor
+ int directEditorType = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
+ Method methodgetDirectEditionType = getMethodRecusrively(editableEditPartClass, "getDirectEditionType");
+ if (methodgetDirectEditionType != null) {
+ directEditorType = (Integer) methodgetDirectEditionType.invoke(editableEditPart);
+ Assert.assertEquals("wrong kind of direct editor", expectedKind.get() & directEditorType, directEditorType);
+ }
+ // call and test current editor if supported and it is not contributed by some external plug-in
+ if (directEditorType == IDirectEdition.DEFAULT_DIRECT_EDITOR) {
+ Method methodGetManager = getMethodRecusrively(editableEditPartClass, "getManager");
+ if (methodGetManager != null) {
+ methodGetManager.setAccessible(true);
+ Object result = methodGetManager.invoke(editableEditPart);
+ Assert.assertTrue("the manager to edit name must be a MultilineLabelDirectEditManager", result instanceof MultilineLabelDirectEditManager);
+ MultilineLabelDirectEditManager manager = (MultilineLabelDirectEditManager) result;
+ IFigure fig = getPrimaryFigure(editableEditPart);
+
+ if (fig instanceof IMultilineEditableFigure) {
+ Assert.assertEquals("the editor of this editpart must be multiline editor", MultiLineCellEditor.class, manager.getTextCellEditorClass(editableEditPart));
+
+ } else {
+ Assert.assertEquals("the editor of this editpart must be simple editor", TextCellEditorEx.class, manager.getTextCellEditorClass(editableEditPart));
+ }
+ }
+ }
+ } catch (NoSuchMethodException e) {
+ Assert.fail(e.getMessage());
+ } catch (SecurityException e) {
+ Assert.fail(e.getMessage());
+ } catch (IllegalAccessException e) {
+ Assert.fail(e.getMessage());
+ } catch (IllegalArgumentException e) {
+ Assert.fail(e.getMessage());
+ } catch (InvocationTargetException e) {
+ Assert.fail(e.getMessage());
+ }
+
+ }
+ }
+ }
+
+ public Method getMethodRecusrively(Class<?> clazz, String methodName, Class<?>... parameterTypes) throws NoSuchMethodException {
+ try {
+ return clazz.getDeclaredMethod(methodName, parameterTypes);
+ } catch (NoSuchMethodException e) {
+ Class<?> superClazz = clazz.getSuperclass();
+ if (clazz.getSuperclass() != null) {
+ return getMethodRecusrively(superClazz, methodName, parameterTypes);
+ } else {
+ throw e;
+ }
+ } catch (SecurityException e) {
+ e.printStackTrace();
+ }
+
+ return null;
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/edition/EditableElementTest.java b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/edition/EditableElementTest.java
new file mode 100755
index 0000000..f2bde99
--- /dev/null
+++ b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/edition/EditableElementTest.java
@@ -0,0 +1,42 @@
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) - Initial API and implementation
+ /*****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.tests.edition;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.figures.BorderedNodeFigure;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.uml.diagram.tests.canonical.AbstractPapyrusTestCase;
+
+
+public abstract class EditableElementTest extends AbstractPapyrusTestCase{
+
+
+ public abstract void testEdition(IElementType type);
+ public abstract GraphicalEditPart getContainerEditPart();
+
+ /**
+ * get the primary figure that correspond to the edipart
+ * @param createdEditpart
+ * @return a Ifigure
+ */
+ protected IFigure getPrimaryFigure(GraphicalEditPart createdEditpart) {
+ if(createdEditpart.getFigure() instanceof BorderedNodeFigure){
+ IFigure nodePlate = (IFigure)((BorderedNodeFigure)createdEditpart.getFigure()).getChildren().get(0);
+ // now verify position of each subfigure
+ IFigure fig = ((IFigure)nodePlate.getChildren().get(0));
+ return fig;
+ }
+ else{return createdEditpart.getFigure(); }
+ }
+}
diff --git a/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/edition/ExpectedDirectEditor.java b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/edition/ExpectedDirectEditor.java
new file mode 100755
index 0000000..5909887
--- /dev/null
+++ b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/edition/ExpectedDirectEditor.java
@@ -0,0 +1,45 @@
+/*****************************************************************************
+ * Copyright (c) 2015 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.diagram.tests.edition;
+
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+
+/**
+ * Annotates a direct-edit test case or test suite to indicate the expected direct
+ * editor kind(s) for the element under test.
+ */
+@Retention(RUNTIME)
+@Target({ METHOD, TYPE })
+public @interface ExpectedDirectEditor {
+ /**
+ * The default kind expected by tests that are not annotated:
+ * {@link IDirectEdition#DEFAULT_DIRECT_EDITOR}.
+ */
+ int DEFAULT_MASK = IDirectEdition.DEFAULT_DIRECT_EDITOR;
+
+ /**
+ * A bit-mask of the kind(s) of direct editor accepted by the test case as
+ * valid for the element under test.
+ *
+ * @return a mask of the kinds enumerated in the {@link IDirectEdition} interface
+ */
+ int value() default DEFAULT_MASK;
+}
diff --git a/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/rules/DisableDropStrategiesRule.java b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/rules/DisableDropStrategiesRule.java
new file mode 100755
index 0000000..ae7bb28
--- /dev/null
+++ b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/rules/DisableDropStrategiesRule.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * Copyright (c) 2015 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.diagram.tests.rules;
+
+import org.eclipse.papyrus.infra.gmfdiag.dnd.policy.DropStrategyManager;
+import org.junit.rules.TestWatcher;
+import org.junit.runner.Description;
+
+/**
+ * A JUnit rule that suppresses all pluggable drop strategies for the duration
+ * of the test(s) that it decorates.
+ */
+public class DisableDropStrategiesRule extends TestWatcher {
+ private boolean restore = true;
+
+ public DisableDropStrategiesRule() {
+ super();
+ }
+
+ @Override
+ protected void starting(Description description) {
+ restore = DropStrategyManager.instance.isEnabled();
+ DropStrategyManager.instance.setEnabled(false);
+ }
+
+ @Override
+ protected void finished(Description description) {
+ DropStrategyManager.instance.setEnabled(restore);
+ }
+}
diff --git a/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/synchronization/AbstractCSSSynchronizationTest.java b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/synchronization/AbstractCSSSynchronizationTest.java
new file mode 100755
index 0000000..7616279
--- /dev/null
+++ b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/synchronization/AbstractCSSSynchronizationTest.java
@@ -0,0 +1,263 @@
+/*****************************************************************************
+ * Copyright (c) 2015 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.diagram.tests.synchronization;
+
+import java.io.InputStream;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.net.URL;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.common.util.WrappedException;
+import org.eclipse.emf.edit.command.AddCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.databinding.custom.AddCustomStyleListValueCommand;
+import org.eclipse.papyrus.infra.gmfdiag.common.helper.DiagramHelper;
+import org.eclipse.papyrus.infra.emf.gmf.util.GMFUnsafe;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagram;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSStyles;
+import org.eclipse.papyrus.infra.gmfdiag.css.properties.databinding.AddCSSStyleSheetCommand;
+import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.EmbeddedStyleSheet;
+import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StyleSheetReference;
+import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StylesheetsFactory;
+import org.eclipse.papyrus.junit.utils.JUnitUtils;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.rules.TestRule;
+import org.junit.rules.TestWatcher;
+import org.junit.runner.Description;
+import org.osgi.framework.FrameworkUtil;
+
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Lists;
+
+/**
+ * Common implementation of synchronization test cases for CSS.
+ */
+@PluginResource("resources/synch-test-model.di")
+public abstract class AbstractCSSSynchronizationTest extends AbstractSynchronizationTest {
+ @Rule
+ public final TestRule stylesheetRule = new StylesheetRule();
+
+ protected IFile cssFile;
+
+ public AbstractCSSSynchronizationTest() {
+ super();
+ }
+
+ @Before
+ @Override
+ public void makeDiagramCanonical() {
+ super.makeDiagramCanonical();
+
+ ((StylesheetRule) stylesheetRule).apply();
+ }
+
+ protected EmbeddedStyleSheet getStylesheet(String name) {
+ EmbeddedStyleSheet result = null;
+
+ for (EmbeddedStyleSheet next : Iterables.filter(getDiagramEditPart().getNotationView().eResource().getContents(), EmbeddedStyleSheet.class)) {
+ if (name.equals(next.getLabel())) {
+ result = next;
+ break;
+ }
+ }
+
+ return result;
+ }
+
+ protected void referenceEmbeddedStylesheet(String name) {
+ referenceEmbeddedStylesheet(name, false);
+ }
+
+ private void referenceEmbeddedStylesheet(String name, boolean unsafe) {
+ TransactionalEditingDomain domain = getEditingDomain();
+ View targetView = getDiagramEditPart().getNotationView();
+ EmbeddedStyleSheet css = getStylesheet(name);
+
+ Command command = new AddCSSStyleSheetCommand(domain, targetView,
+ CSSStyles.CSS_DIAGRAM_STYLESHEETS_KEY,
+ NotationPackage.Literals.EOBJECT_LIST_VALUE_STYLE, NotationPackage.Literals.EOBJECT_LIST_VALUE_STYLE__EOBJECT_LIST_VALUE,
+ css);
+
+ if (unsafe) {
+ command = GMFUnsafe.wrap(getEditingDomain(), command);
+ command.execute();
+ domain.getCommandStack().flush(); // Just in case
+ } else {
+ domain.getCommandStack().execute(command);
+ }
+
+ waitForUIEvents();
+ }
+
+ protected void referenceExternalStylesheet(String path) {
+ referenceExternalStylesheet(path, false);
+ }
+
+ private void referenceExternalStylesheet(String path, boolean unsafe) {
+ TransactionalEditingDomain domain = getEditingDomain();
+ View targetView = getDiagramEditPart().getNotationView();
+ StyleSheetReference css = StylesheetsFactory.eINSTANCE.createStyleSheetReference();
+ css.setPath(path);
+
+ Command command = new AddCSSStyleSheetCommand(domain, targetView,
+ CSSStyles.CSS_DIAGRAM_STYLESHEETS_KEY,
+ NotationPackage.Literals.EOBJECT_LIST_VALUE_STYLE, NotationPackage.Literals.EOBJECT_LIST_VALUE_STYLE__EOBJECT_LIST_VALUE,
+ css);
+
+ if (unsafe) {
+ command = GMFUnsafe.wrap(getEditingDomain(), command);
+ command.execute();
+ domain.getCommandStack().flush(); // Just in case
+ } else {
+ domain.getCommandStack().execute(command);
+ }
+
+ waitForUIEvents();
+ }
+
+ protected EmbeddedStyleSheet createEmbeddedStylesheet(String css, boolean unsafe) {
+ EmbeddedStyleSheet result = StylesheetsFactory.eINSTANCE.createEmbeddedStyleSheet();
+ result.setContent(css);
+
+ final TransactionalEditingDomain domain = getEditingDomain();
+ final View diagram = getDiagramEditPart().getNotationView();
+ Command command = new AddCommand(domain, diagram.eResource().getContents(), result);
+ command = command.chain(new AddCSSStyleSheetCommand(domain, diagram,
+ CSSStyles.CSS_DIAGRAM_STYLESHEETS_KEY,
+ NotationPackage.Literals.EOBJECT_LIST_VALUE_STYLE, NotationPackage.Literals.EOBJECT_LIST_VALUE_STYLE__EOBJECT_LIST_VALUE,
+ result));
+
+ if (unsafe) {
+ command = GMFUnsafe.wrap(domain, command);
+ command.execute();
+ domain.getCommandStack().flush(); // Just in case
+ } else {
+ domain.getCommandStack().execute(command);
+ }
+
+ waitForUIEvents();
+
+ return result;
+ }
+
+ protected void addStyleClass(View view, String name) {
+ TransactionalEditingDomain domain = getEditingDomain();
+
+ Command command = new AddCustomStyleListValueCommand(domain, view,
+ CSSStyles.CSS_GMF_CLASS_KEY,
+ NotationPackage.Literals.STRING_LIST_VALUE_STYLE, NotationPackage.Literals.STRING_LIST_VALUE_STYLE__STRING_LIST_VALUE,
+ name);
+
+ domain.getCommandStack().execute(command);
+
+ waitForUIEvents();
+ }
+
+ protected void refreshDiagram() {
+ Diagram diagram = getDiagramEditPart().getDiagramView();
+ ((CSSDiagram) diagram).getEngine().reset();
+ DiagramHelper.forceRefresh(getDiagramEditPart());
+ }
+
+ //
+ // Nested types
+ //
+
+ /**
+ * An annotation naming a CSS stylesheet embedded in the model that should be referenced
+ * as the stylesheet of the diagram in which the test is performed.
+ */
+ @Retention(RetentionPolicy.RUNTIME)
+ @Target({ ElementType.TYPE, ElementType.METHOD })
+ public @interface StylesheetRef {
+ String value();
+ }
+
+ /**
+ * An annotation naming an external CSS stylesheet resource in the model that should be referenced
+ * as the stylesheet of the diagram in which the test is performed.
+ */
+ @Retention(RetentionPolicy.RUNTIME)
+ @Target({ ElementType.TYPE, ElementType.METHOD })
+ public @interface CSSResource {
+ String value();
+ }
+
+ /**
+ * An annotation defining a CSS stylesheet (literally) that should be attached
+ * as the stylesheet of the diagram in which the test is performed.
+ */
+ @Retention(RetentionPolicy.RUNTIME)
+ @Target({ ElementType.TYPE, ElementType.METHOD })
+ public @interface CSS {
+ String value();
+ }
+
+ private class StylesheetRule extends TestWatcher {
+ private List<StylesheetRef> refs = Lists.newArrayListWithExpectedSize(1);
+ private List<CSSResource> cssResources = Lists.newArrayListWithExpectedSize(1);
+ private List<CSS> csses = Lists.newArrayListWithExpectedSize(1);
+
+ @Override
+ protected void starting(Description description) {
+ StylesheetRef ref = JUnitUtils.getAnnotation(description, StylesheetRef.class);
+ if (ref != null) {
+ refs.add(ref);
+ }
+
+ CSSResource cssRes = JUnitUtils.getAnnotation(description, CSSResource.class);
+ if (cssRes != null) {
+ cssResources.add(cssRes);
+ }
+
+ CSS css = JUnitUtils.getAnnotation(description, CSS.class);
+ if (css != null) {
+ csses.add(css);
+ }
+ }
+
+ void apply() {
+ for (StylesheetRef ref : refs) {
+ referenceEmbeddedStylesheet(ref.value(), true);
+ }
+
+ for (CSSResource cssRes : cssResources) {
+ URL url = FrameworkUtil.getBundle(AbstractCSSSynchronizationTest.this.getClass()).getEntry(cssRes.value());
+ try (InputStream contents = url.openStream()) {
+ cssFile = suiteState.getProject().getFile(URI.createURI(url.toExternalForm()).lastSegment());
+ cssFile.create(contents, false, null);
+ } catch (Exception e) {
+ throw new WrappedException(e);
+ }
+ referenceExternalStylesheet(cssFile.getFullPath().toString(), true);
+ }
+
+ for (CSS css : csses) {
+ createEmbeddedStylesheet(css.value(), true);
+ }
+ }
+ }
+
+}
diff --git a/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/synchronization/AbstractSynchronizationTest.java b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/synchronization/AbstractSynchronizationTest.java
new file mode 100755
index 0000000..b97099a
--- /dev/null
+++ b/tests/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/synchronization/AbstractSynchronizationTest.java
@@ -0,0 +1,651 @@
+/*****************************************************************************
+ * Copyright (c) 2015 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.diagram.tests.synchronization;
+
+import static org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramEditPartsUtil.isCanonical;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.notNullValue;
+import static org.hamcrest.CoreMatchers.nullValue;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.junit.Assert.fail;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.Callable;
+import java.util.concurrent.FutureTask;
+
+import org.eclipse.emf.common.util.TreeIterator;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.ENamedElement;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.edit.command.AddCommand;
+import org.eclipse.emf.edit.command.RemoveCommand;
+import org.eclipse.emf.edit.command.SetCommand;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.RequestConstants;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.requests.GroupRequest;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
+import org.eclipse.gmf.runtime.emf.core.util.PackageUtil;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.emf.gmf.command.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.infra.emf.utils.TreeIterators;
+import org.eclipse.papyrus.infra.gmfdiag.common.commands.SetCanonicalCommand;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramEditPartsUtil;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.junit.utils.DisplayUtils;
+import org.eclipse.papyrus.junit.utils.JUnitUtils;
+import org.eclipse.papyrus.junit.utils.rules.AnnotationRule;
+import org.eclipse.papyrus.uml.diagram.tests.canonical.AbstractPapyrusTestCase;
+import org.eclipse.uml2.uml.DirectedRelationship;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.eclipse.uml2.uml.util.UMLUtil;
+import org.junit.Before;
+import org.junit.Rule;
+
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Iterators;
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import com.google.common.util.concurrent.Futures;
+
+/**
+ * Common implementation of synchronization test cases.
+ */
+public abstract class AbstractSynchronizationTest extends AbstractPapyrusTestCase {
+ @Rule
+ public final AnnotationRule<Boolean> needUIEvents = AnnotationRule.createExists(NeedsUIEvents.class);
+
+ private ComposedAdapterFactory adapterFactory;
+
+ public AbstractSynchronizationTest() {
+ super();
+ }
+
+ @Before
+ public void createAdapterFactory() {
+ houseKeeper.setField("adapterFactory", new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE));
+ }
+
+ //
+ // Test framework
+ //
+
+ @Before
+ public void makeDiagramCanonical() {
+ if (!isCanonical(getDiagramEditPart())) {
+ setCanonical(true, getDiagramEditPart());
+ }
+ }
+
+ protected void testSynchronizeTopNode(IElementType elementType, String expectedEditPart) {
+ EObject element = createSemanticElement(elementType, getRootSemanticModel());
+
+ assertThat("Wrong edit part", requireEditPart(element).getNotationView().getType(), is(expectedEditPart));
+
+ undo();
+
+ assertNoView(element);
+
+ redo();
+
+ assertThat("Wrong edit part", requireEditPart(element).getNotationView().getType(), is(expectedEditPart));
+ }
+
+ protected void testSynchronizeChildNode(IElementType parentElementType, IElementType childElementType, String expectedEditPart) {
+ EObject parent = createSemanticElement(parentElementType, getRootSemanticModel());
+
+ requireEditPart(parent);
+
+ EObject element = createSemanticElement(childElementType, parent);
+
+ assertThat("Wrong child edit part", requireEditPart(element).getNotationView().getType(), is(expectedEditPart));
+
+ undo();
+
+ assertNoView(element);
+
+ redo();
+
+ assertThat("Wrong child edit part", requireEditPart(element).getNotationView().getType(), is(expectedEditPart));
+ }
+
+ protected void testSynchronizeLink(IElementType sourceElementType, IElementType targetElementType, IElementType linkElementType, String expectedEditPart) {
+ EObject source = createSemanticElement(sourceElementType, getRootSemanticModel());
+ EObject target = createSemanticElement(targetElementType, getRootSemanticModel());
+
+ requireEditPart(source);
+ requireEditPart(target);
+
+ EObject element = createSemanticLinkElement(linkElementType, source, target, findOwner(linkElementType, source));
+
+ assertThat("Wrong link edit part", requireEditPart(element).getNotationView().getType(), is(expectedEditPart));
+
+ undo();
+
+ assertNoView(element);
+
+ redo();
+
+ assertThat("Wrong link edit part", requireEditPart(element).getNotationView().getType(), is(expectedEditPart));
+ }
+
+ protected EObject findOwner(IElementType elementType, EObject initial) {
+ EObject result = null;
+ final EClass eclass = elementType.getEClass();
+
+ for (EObject next = initial; (next != null) && (result == null); next = next.eContainer()) {
+ if (PackageUtil.canContain(next.eClass(), eclass, false)) {
+ result = next;
+ }
+ }
+
+ return result;
+ }
+
+ protected void testSynchronizeLinkInContainer(IElementType containerElementType, IElementType sourceElementType, IElementType targetElementType, IElementType linkElementType, String expectedEditPart) {
+ EObject container = createSemanticElement(containerElementType, getRootSemanticModel());
+ EObject source = createSemanticElement(sourceElementType, container);
+ EObject target = createSemanticElement(targetElementType, container);
+
+ requireEditPart(source);
+ requireEditPart(target);
+
+ EObject element = createSemanticLinkElement(linkElementType, source, target, findOwner(linkElementType, source));
+
+ assertThat("Wrong link edit part", requireEditPart(element).getNotationView().getType(), is(expectedEditPart));
+
+ undo();
+
+ assertNoView(element);
+
+ redo();
+
+ assertThat("Wrong link edit part", requireEditPart(element).getNotationView().getType(), is(expectedEditPart));
+ }
+
+ protected void testSynchronizeLabelNode(IElementType parentElementType, IElementType childElementType, String expectedCompartment, String expectedEditPart) {
+ EObject parent = createSemanticElement(parentElementType, getRootSemanticModel());
+
+ requireEditPart(parent);
+
+ EObject element = createSemanticElement(childElementType, parent);
+
+ IGraphicalEditPart editPart = requireEditPart(element);
+ assertThat("Label is in wrong compartment", ((IGraphicalEditPart) editPart.getParent()).getNotationView().getType(), is(expectedCompartment));
+ assertThat("Wrong label edit part", editPart.getNotationView().getType(), is(expectedEditPart));
+
+ undo();
+
+ assertNoView(element);
+
+ redo();
+
+ editPart = requireEditPart(element);
+ assertThat("Label is in wrong compartment", ((IGraphicalEditPart) editPart.getParent()).getNotationView().getType(), is(expectedCompartment));
+ assertThat("Wrong label edit part", editPart.getNotationView().getType(), is(expectedEditPart));
+ }
+
+ protected void testSynchronizeLabelNode(IElementType topElementType, IElementType parentElementType, IElementType childElementType, String expectedCompartment, String expectedEditPart) {
+ EObject top = createSemanticElement(topElementType, getRootSemanticModel());
+ EObject parent = createSemanticElement(parentElementType, top);
+
+ requireEditPart(parent);
+
+ EObject element = createSemanticElement(childElementType, parent);
+
+ IGraphicalEditPart editPart = requireEditPart(element);
+ assertThat("Label is in wrong compartment", ((IGraphicalEditPart) editPart.getParent()).getNotationView().getType(), is(expectedCompartment));
+ assertThat("Wrong label edit part", editPart.getNotationView().getType(), is(expectedEditPart));
+
+ undo();
+
+ assertNoView(element);
+
+ redo();
+
+ editPart = requireEditPart(element);
+ assertThat("Label is in wrong compartment", ((IGraphicalEditPart) editPart.getParent()).getNotationView().getType(), is(expectedCompartment));
+ assertThat("Wrong label edit part", editPart.getNotationView().getType(), is(expectedEditPart));
+ }
+
+ protected EObject createSemanticElement(IElementType elementType, EObject container) {
+ EObject result = null;
+
+ // Don't need to create the root behavior element if the behavior diagram creation already created it for us
+ if (UMLPackage.Literals.BEHAVIOR.isSuperTypeOf(elementType.getEClass()) && (container.eContainer() == null)) {
+ result = (EObject) EcoreUtil.getObjectByType(container.eContents(), elementType.getEClass());
+ }
+ // Also, we don't nest behaviors
+ if (UMLPackage.Literals.BEHAVIOR.isSuperTypeOf(elementType.getEClass()) && (elementType.getEClass().isInstance(container))) {
+ result = container;
+ }
+
+ if (result == null) {
+ IElementEditService edit = ElementEditServiceUtils.getCommandProvider(container);
+ assertThat("Unable to get edit service for " + label(container), edit, notNullValue());
+
+ CreateElementRequest request = new CreateElementRequest(container, elementType);
+ ICommand command = edit.getEditCommand(request);
+ assertThat("Unable to get creation command for " + elementType, command, notNullValue());
+ assertThat("Creation command not executable for " + elementType, command.canExecute(), is(true));
+
+ execute(command);
+
+ result = request.getNewElement();
+ }
+
+ return result;
+ }
+
+ protected EObject createSemanticLinkElement(IElementType linkElementType, EObject source, EObject target, EObject owner) {
+ IElementEditService edit = ElementEditServiceUtils.getCommandProvider(owner);
+ assertThat("Unable to get edit service for " + label(source), edit, notNullValue());
+
+ CreateRelationshipRequest request = new CreateRelationshipRequest(source, target, linkElementType);
+ request.setContainer(owner);
+ ICommand command = edit.getEditCommand(request);
+ assertThat("Unable to get creation command for " + linkElementType, command, notNullValue());
+ assertThat("Creation command not executable for " + linkElementType, command.canExecute(), is(true));
+
+ execute(command);
+
+ return request.getNewElement();
+ }
+
+ //
+ // Assertions and stuff
+ //
+
+ protected TreeIterator<IGraphicalEditPart> allContents(EditPart root, boolean includeRoot) {
+ return TreeIterators.filter(DiagramEditPartsUtil.getAllContents(root, includeRoot), IGraphicalEditPart.class);
+ }
+
+ protected IGraphicalEditPart getEditPart(EObject element) {
+ return getEditPart(element, getDiagramEditPart());
+ }
+
+ protected IGraphicalEditPart getEditPart(EObject element, IGraphicalEditPart scope) {
+ IGraphicalEditPart result = null;
+
+ for (Iterator<IGraphicalEditPart> iter = allContents(scope, true); iter.hasNext();) {
+ IGraphicalEditPart next = iter.next();
+ View view = next.getNotationView();
+ if ((view != null) && (view.getElement() == element)) {
+ result = next;
+ break;
+ }
+ }
+
+ return result;
+ }
+
+ protected IGraphicalEditPart requireEditPart(EObject element) {
+ IGraphicalEditPart result = getEditPart(element, getDiagramEditPart());
+ assertThat("No edit part for " + label(element), result, notNullValue());
+ return result;
+ }
+
+ protected IGraphicalEditPart getConnectionEditPart(EObject element) {
+ IGraphicalEditPart result = null;
+
+ for (Iterator<IGraphicalEditPart> iter = Iterators.filter(getDiagramEditPart().getConnections().iterator(), IGraphicalEditPart.class); iter.hasNext();) {
+ IGraphicalEditPart next = iter.next();
+ View view = next.getNotationView();
+ if ((view != null) && (view.getElement() == element)) {
+ result = next;
+ break;
+ }
+ }
+
+ return result;
+ }
+
+ protected IGraphicalEditPart requireConnectionEditPart(EObject element) {
+ IGraphicalEditPart result = getConnectionEditPart(element);
+ assertThat("No connection edit part for " + label(element), result, notNullValue());
+ return result;
+ }
+
+ protected View getView(EObject element, View scope) {
+ View result = null;
+
+ for (Iterator<View> iter = Iterators.filter(scope.eAllContents(), View.class); (result == null) && iter.hasNext();) {
+ View next = iter.next();
+ if (next.getElement() == element) {
+ result = next;
+ }
+ }
+
+ return result;
+ }
+
+ protected View requireView(EObject element, View scope) {
+ View result = getView(element, scope);
+ assertThat("View not found: " + label(element), result, notNullValue());
+ return result;
+ }
+
+ protected void assertNoView(EObject element, View scope) {
+ View view = getView(element, scope);
+ assertThat("View exists: " + label(element), view, nullValue());
+ }
+
+ protected IGraphicalEditPart getCompartment(IGraphicalEditPart parent, String type) {
+ return parent.getChildBySemanticHint(type);
+ }
+
+ protected <T extends DirectedRelationship> T getRelationship(NamedElement from, NamedElement to, Class<T> type) {
+ T result = null;
+
+ for (T next : Iterables.filter(from.getSourceDirectedRelationships(), type)) {
+ if (next.getTargets().contains(to)) {
+ result = next;
+ break;
+ }
+ }
+
+ return result;
+ }
+
+ protected void execute(ICommand command) {
+ execute(GMFtoEMFCommandWrapper.wrap(command));
+ }
+
+ protected void execute(org.eclipse.emf.common.command.Command command) {
+ assertThat("Cannot execute command", command.canExecute(), is(true));
+ getCommandStack().execute(command);
+ waitForUIEvents();
+ }
+
+ protected final void waitForUIEvents() {
+ // If we're running the tests in the IDE, we should see what's happening. Or, it could be that a
+ // particular test actually needs UI events to be processed before proceeding
+ if (!JUnitUtils.isAutomatedBuildExecution() || isNeedUIEvents()) {
+ DisplayUtils.flushEventLoop();
+ }
+ }
+
+ protected final boolean isNeedUIEvents() {
+ return needUIEvents.get();
+ }
+
+ protected void execute(final Runnable writeOperation) {
+ execute(new RecordingCommand(getEditingDomain()) {
+
+ @Override
+ protected void doExecute() {
+ writeOperation.run();
+ }
+ });
+ }
+
+ protected <V> V execute(final Callable<V> writeOperation) {
+ final FutureTask<V> result = new FutureTask<V>(writeOperation);
+ execute(result);
+ return Futures.getUnchecked(result);
+ }
+
+ @Override
+ protected void undo() {
+ super.undo();
+ waitForUIEvents();
+ }
+
+ @Override
+ protected void redo() {
+ super.redo();
+ waitForUIEvents();
+ }
+
+ protected void setEditPartsCanonical(boolean canonical, Iterable<? extends EditPart> editParts) {
+ final TransactionalEditingDomain domain = getEditingDomain();
+
+ ICommand command = new CompositeTransactionalCommand(domain, "Toggle Synchronize with Model");
+ for (EditPart editPart : editParts) {
+ if (canonical != isCanonical(editPart)) {
+ command = command.compose(new SetCanonicalCommand(domain, (View) editPart.getModel(), canonical));
+ } else {
+ command = UnexecutableCommand.INSTANCE;
+ break;
+ }
+ }
+
+ command = command.reduce();
+
+ execute(command);
+ }
+
+ protected void setCanonical(boolean canonical, EditPart first, EditPart second, EditPart... rest) {
+ setEditPartsCanonical(canonical, Lists.asList(first, second, rest));
+ }
+
+ protected void setCanonical(boolean canonical, EditPart editPart) {
+ final TransactionalEditingDomain domain = getEditingDomain();
+
+ ICommand command = UnexecutableCommand.INSTANCE;
+ if (canonical != isCanonical(editPart)) {
+ command = new SetCanonicalCommand(domain, (View) editPart.getModel(), canonical);
+ }
+
+ execute(command);
+ }
+
+ protected void setElementsCanonical(boolean canonical, Iterable<? extends EObject> elements) {
+ List<EditPart> editParts = Lists.newArrayList();
+ for (EObject next : elements) {
+ editParts.add(requireEditPart(next));
+ }
+ setEditPartsCanonical(canonical, editParts);
+ }
+
+ protected void setCanonical(boolean canonical, EObject first, EObject second, EObject... rest) {
+ setElementsCanonical(canonical, Lists.asList(first, second, rest));
+ }
+
+ protected void setCanonical(boolean canonical, EObject element) {
+ setCanonical(canonical, requireEditPart(element));
+ }
+
+ /**
+ * Adds a new semantic {@code element} to the model.
+ * Relies on canonical edit policy to create the notation view.
+ */
+ protected void add(EObject owner, EObject element, EReference feature) {
+ execute(addCommand(owner, element, feature));
+ }
+
+ /**
+ * Obtains a command adding a new semantic {@code element} to the model.
+ * Relies on canonical edit policy to create the notation view.
+ */
+ protected org.eclipse.emf.common.command.Command addCommand(EObject owner, EObject element, EReference feature) {
+ return AddCommand.create(getEditingDomain(), owner, feature, element);
+ }
+
+ /**
+ * Simply removes a semantic {@code element} from the model.
+ * Relies on canonical edit policy to remove the notation view.
+ */
+ protected void remove(EObject element) {
+ execute(removeCommand(element));
+ }
+
+ /**
+ * Sets the value of some {@code feature} of an object.
+ */
+ protected void set(EObject owner, Object value, EStructuralFeature feature) {
+ execute(setCommand(owner, value, feature));
+ }
+
+ /**
+ * Obtains a command that sets the value of some {@code feature} of an object.
+ */
+ protected org.eclipse.emf.common.command.Command setCommand(EObject owner, Object value, EStructuralFeature feature) {
+ return SetCommand.create(getEditingDomain(), owner, feature, value);
+ }
+
+ /**
+ * Obtains a command removing a semantic {@code element} from the model.
+ * Relies on canonical edit policy to remove the notation view.
+ */
+ protected org.eclipse.emf.common.command.Command removeCommand(EObject element) {
+ return RemoveCommand.create(getEditingDomain(), element.eContainer(), element.eContainmentFeature(), element);
+ }
+
+ protected void delete(EditPart editPart) {
+ Command command = editPart.getCommand(new GroupRequest(RequestConstants.REQ_DELETE));
+ assertThat("No view deletion command provided", command, notNullValue());
+ assertThat("Cannot execute view deletion command", command.canExecute(), is(true));
+ execute(command);
+ }
+
+ protected String label(EObject object) {
+ String result;
+
+ if (object instanceof ENamedElement) {
+ result = ((UMLUtil.getQualifiedName((ENamedElement) object, NamedElement.SEPARATOR)));
+ } else {
+ IItemLabelProvider labels = (IItemLabelProvider) adapterFactory.adapt(object, IItemLabelProvider.class);
+ result = (labels == null) ? String.valueOf(object) : labels.getText(object);
+ }
+
+ return result;
+ }
+
+ protected View getView(EObject object) {
+ IGraphicalEditPart editPart = getEditPart(object);
+ if (editPart == null) {
+ // Maybe it's an edge
+ editPart = getConnectionEditPart(object);
+ }
+ return (editPart == null) ? null : editPart.getNotationView();
+ }
+
+ protected View requireView(EObject object) {
+ View result = getView(object);
+ assertThat("No view for " + label(object), result, notNullValue());
+ return result;
+ }
+
+ protected void assertNoView(EObject object) {
+ View view = getView(object);
+ assertThat("View exists for " + label(object), view, nullValue());
+ }
+
+ protected Map<EObject, View> getViews(Iterable<? extends EObject> objects) {
+ Map<EObject, View> result = Maps.newHashMap();
+
+ for (EObject object : objects) {
+ IGraphicalEditPart editPart = getEditPart(object);
+ if (editPart == null) {
+ // Maybe it's an edge
+ editPart = getConnectionEditPart(object);
+ }
+ if ((editPart != null) && (editPart.getNotationView() != null)) {
+ result.put(object, editPart.getNotationView());
+ }
+ }
+
+ return result;
+ }
+
+ protected Map<EObject, View> getViews(EObject first, EObject second, EObject... rest) {
+ return getViews(Lists.asList(first, second, rest));
+ }
+
+ protected Map<EObject, View> requireViews(Iterable<? extends EObject> objects) {
+ Map<EObject, View> result = Maps.newHashMap();
+
+ for (EObject object : objects) {
+ result.put(object, requireView(object));
+ }
+
+ return result;
+ }
+
+ protected Map<EObject, View> requireViews(EObject first, EObject second, EObject... rest) {
+ return requireViews(Lists.asList(first, second, rest));
+ }
+
+ protected void assertNoViews(Iterable<? extends EObject> objects) {
+ Map<EObject, View> views = getViews(objects);
+
+ if (!views.isEmpty()) {
+ fail("View exists for " + label(Iterables.getFirst(views.keySet(), null)));
+ }
+ }
+
+ protected void assertNoViews(EObject first, EObject second, EObject... rest) {
+ assertNoViews(Lists.asList(first, second, rest));
+ }
+
+ protected void assertAttached(EObject element) {
+ assertThat("Model does not contain " + label(element), element.eResource(), notNullValue());
+ }
+
+ protected void assertAttached(Iterable<? extends EObject> elements) {
+ for (EObject next : elements) {
+ assertAttached(next);
+ }
+ }
+
+ protected void assertAttached(EObject first, EObject second, EObject... rest) {
+ assertAttached(Lists.asList(first, second, rest));
+ }
+
+ protected void assertDetached(EObject element) {
+ assertThat("Model must not contain " + label(element), element.eResource(), nullValue());
+ }
+
+ protected void assertDetached(Iterable<? extends EObject> elements) {
+ for (EObject next : elements) {
+ assertDetached(next);
+ }
+ }
+
+ protected void assertDetached(EObject first, EObject second, EObject... rest) {
+ assertDetached(Lists.asList(first, second, rest));
+ }
+
+ //
+ // Nested types
+ //
+
+ @Retention(RetentionPolicy.RUNTIME)
+ @Target({ ElementType.TYPE, ElementType.METHOD })
+ public @interface NeedsUIEvents {
+ // Empty
+ }
+}
diff --git a/tests/pom.xml b/tests/pom.xml
new file mode 100755
index 0000000..9c219ac
--- /dev/null
+++ b/tests/pom.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<project>
+ <parent>
+ <groupId>org.eclipse.papyrus.sysml</groupId>
+ <artifactId>org.eclipse.papyrus.sysml.parent</artifactId>
+ <version>3.0.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>org.eclipse.papyrus.sysml.test</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ <packaging>pom</packaging>
+
+ <name>Papyrus SysML</name>
+ <description>Top container of the Papyrus SysML 1.1 modeler</description>
+
+ <modules>
+
+ <!-- SysML 1.1 tests-->
+ <module>org.eclipse.papyrus.uml.diagram.tests</module>
+
+ <module>org.eclipse.papyrus.sysml.diagram.requirement.tests</module>
+ <module>org.eclipse.papyrus.sysml.diagram.blockdefinition.tests</module>
+ <module>org.eclipse.papyrus.sysml.diagram.internalblock.tests</module>
+
+ <module>org.eclipse.papyrus.sysml.tests</module>
+ <module>org.eclipse.papyrus.sysml.service.types.tests</module>
+ <module>org.eclipse.papyrus.sysml.modelexplorer.tests</module>
+ <module>org.eclipse.papyrus.sysml.nattable.allocation.tests</module>
+ <module>org.eclipse.papyrus.sysml.nattable.requirement.tests</module>
+
+ <module>org.eclipse.papyrus.sysml.diagram.parametric.tests</module>
+
+ </modules>
+</project>